indoor.vue 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095
  1. <template>
  2. <scroll-view>
  3. <view class="background">
  4. <view>
  5. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  6. <view style="display: flex;align-items: center;">房间信息
  7. <image :src="loadImgSrc('icon_copy.png')" @click='copyAddress()' style="display: flex;justify-content:flex-end; margin-left: 10px;width: 15px;height: 15px;">
  8. </image>
  9. </view>
  10. <image v-if="changefj==false" :src="loadImgSrc('icon_user_open.png')" @click='this.changefj = !this.changefj' style="display: flex;justify-content:flex-end; margin-right: 10px;width: 15px;height: 15px;">
  11. </image>
  12. <image v-if="changefj==true" :src="loadImgSrc('icon_user_close.png')" @click='this.changefj = !this.changefj' style="display: flex;justify-content:flex-end; margin-right: 10px;width: 15px;height: 15px;">
  13. </image>
  14. </view>
  15. </view>
  16. <view v-show="changefj">
  17. <view class="uni-list">
  18. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  19. <view>
  20. 行政区
  21. </view>
  22. <view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;" @click="pickerShow('xzq')">
  23. <span style="color: darkgray;">请选择行政区</span>
  24. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  25. </view>
  26. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
  27. <span style="color: black;">{{XZQValue.dictLabel}}</span>
  28. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="uni-list">
  33. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  34. <view>
  35. 小区
  36. </view>
  37. <view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
  38. <span style="color: darkgray;">请选择小区</span>
  39. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  40. </view>
  41. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
  42. <span style="color: black;">{{XQValue.name}}</span>
  43. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="uni-list">
  48. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  49. <view class="uni-list-cell-left">
  50. 楼栋
  51. </view>
  52. <view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
  53. <span style="color: darkgray;">请选择楼栋</span>
  54. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  55. </view>
  56. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
  57. <span style="color: black;">{{LDValue.name}}</span>
  58. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="uni-list" style="margin-top: 10;">
  63. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  64. <view class="uni-list-cell-left">
  65. 单元
  66. </view>
  67. <view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
  68. <span style="color: darkgray;">请选择单元</span>
  69. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  70. </view>
  71. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
  72. <span style="color: black;">{{DYValue.name}}</span>
  73. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="uni-list">
  78. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  79. <view class="uni-list-cell-left">
  80. 房间
  81. </view>
  82. <view v-if="this.isEmpty(this.FJValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
  83. <span style="color: darkgray;">请选择房间</span>
  84. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  85. </view>
  86. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
  87. <span style="color: black;">{{FJValue.name}}</span>
  88. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  89. </view>
  90. </view>
  91. <view v-for="(user,index) in currentResidentsPhoe" :key="index" class="num-style">
  92. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  93. <spane>现住人电话</spane>
  94. <view style="display: flex; justify-content: flex-end; ">
  95. <input class="uni-input" type="tel" v-model="user.phone" maxlength="11" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx; "></input>
  96. </view>
  97. </view>
  98. <button v-if="index!=0" @click="this.currentResidentsPhoe.splice(index,1)" class="sc-btn">删除</button>
  99. </view>
  100. <button @click="this.currentResidentsPhoe.push({phone:''})" class="tj-btn">添加</button>
  101. </view>
  102. </view>
  103. </view>
  104. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name" subtitleKey="id" v-model="name"></SelectPicker>
  105. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict" titleKey="dictLabel" subtitleKey="dictValue" v-model="name"></SelectPicker>
  106. </view>
  107. <view class="background">
  108. <input class="uni-input" type="idcard" v-model="idCard" maxlength="18" placeholder="请输入身份证号码" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx; "></input>
  109. </view>
  110. <button class="tj-btn" style="margin: 40rpx 90rpx;" @click="serchByCard"> 搜索</button>
  111. <view class="background">
  112. <view>
  113. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  114. 户主信息
  115. <image v-if="change==false" :src="loadImgSrc('icon_user_open.png')" @click='change1' style="display: flex;justify-content:flex-end; margin-right: 10px;width: 15px;height: 15px;">
  116. </image>
  117. <image v-if="change==true" :src="loadImgSrc('icon_user_close.png')" @click='change1' style="display: flex;justify-content:flex-end; margin-right: 10px;width: 15px;height: 15px;">
  118. </image>
  119. </view>
  120. </view>
  121. <view v-show="change">
  122. <view class="uni-list">
  123. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  124. <view class="uni-list-cell-left">
  125. 户主姓名
  126. </view>
  127. <view class="uni-list-cell-db" style="margin-top: 10;">
  128. <span style="color: darkgray;" v-model="houseHeadName">{{houseHeadName}}</span>
  129. </view>
  130. </view>
  131. </view>
  132. <view class="uni-list">
  133. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  134. <view class="uni-list-cell-left">
  135. 户主电话
  136. </view>
  137. <view class="uni-list-cell-db" style="margin-top: 10;">
  138. <span style="color: darkgray;" v-model="houseHeadPhone">{{houseHeadPhone}}</span>
  139. </view>
  140. </view>
  141. </view>
  142. <view class="uni-list">
  143. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  144. <view class="uni-list-cell-left">
  145. 户主身份证号码
  146. </view>
  147. <view class="uni-list-cell-db" style="margin-top: 10;">
  148. <span style="color: darkgray;" v-model="houseHeadIDcardNumber">{{houseHeadIDcardNumber}}</span>
  149. </view>
  150. </view>
  151. </view>
  152. <view class="uni-list">
  153. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  154. <view class="uni-list-cell-left">
  155. 管理所
  156. </view>
  157. <view class="uni-list-cell-db" style="margin-top: 10;">
  158. <span style="color: darkgray;" v-model="administrative">{{administrative}}</span>
  159. </view>
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. <!--报警器切断阀-->
  165. <view class="background">
  166. <view v-if="objValue.enginClassValue=='报警器'||objValue.enginClassValue=='切断阀'">
  167. <view class="uni-list">
  168. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  169. {{objValue.enginClassValue}}
  170. <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history" v-if="objValue.enginType == 'old_renovation'">{{historyName}}</span>
  171. </view>
  172. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  173. <text>厂 家</text>
  174. <view v-if="this.isEmpty(this.brandValue.id)" style="margin-top: 10;" @click="pickerShow('brand')">
  175. <span style="color: darkgray;">请选择厂家</span>
  176. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  177. </view>
  178. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brand')">
  179. <span style="color: black;">{{brandValue.name}}</span>
  180. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  181. </view>
  182. </view>
  183. </view>
  184. </view>
  185. <!--拆旧管-->
  186. <view v-if="objValue.enginClassValue=='拆旧管'">
  187. <view class="uni-list">
  188. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  189. 拆旧管
  190. <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history" v-if="objValue.enginType == 'old_renovation'">{{historyName}}</span>
  191. </view>
  192. <view class="container" style="margin-bottom: 20PX;border-bottom: 1px solid #f8f8f8;">
  193. <view>
  194. 腐蚀等级
  195. </view>
  196. <view v-if="this.isEmpty(this.LevelValue.id)" style="margin-top: 10;" @click="pickerShow('fsdj')">
  197. <span style="color: darkgray;">请选择腐蚀等级</span>
  198. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  199. </view>
  200. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fsdj')">
  201. <span style="color: black;">{{LevelValue.name}}</span>
  202. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  203. </view>
  204. </view>
  205. </view>
  206. </view>
  207. <view v-if="objValue.enginClassValue=='打孔'">
  208. <view class="uni-list">
  209. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  210. 打孔
  211. <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history" v-if="objValue.enginType == 'old_renovation'">{{historyName}}</span>
  212. </view>
  213. <!-- <view class="container" style="margin-bottom: 20PX;border-bottom: 1px solid #f8f8f8;">
  214. <view>
  215. 孔距
  216. </view>
  217. <view v-if="this.isEmpty(this.LevelValue.id)" style="margin-top: 10;"
  218. @click="pickerShow('kj')">
  219. <span style="color: darkgray;">请选择孔距</span>
  220. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  221. </view>
  222. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('kj')">
  223. <span style="color: black;">{{LevelValue.name}}</span>
  224. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  225. </view>
  226. </view> -->
  227. </view>
  228. </view>
  229. <!--立杠-->
  230. <view v-else-if="objValue.enginClassValue=='立杠'">
  231. <view class="uni-list" style="margin-bottom: 20px;">
  232. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  233. 立杠
  234. <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history" v-if="objValue.enginType == 'old_renovation'">{{historyName}}</span>
  235. </view>
  236. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  237. <view>
  238. 材 质
  239. </view>
  240. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;" @click="pickerShow('cz')">
  241. <span style="color: darkgray;">请选择材质</span>
  242. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  243. </view>
  244. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  245. <span style="color: black;">{{materialValue.name}}</span>
  246. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  247. </view>
  248. </view>
  249. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  250. <view>
  251. 规 格
  252. </view>
  253. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;" @click="pickerShow('gg')">
  254. <span style="color: darkgray;">请选择规格</span>
  255. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  256. </view>
  257. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  258. <span style="color: black;">{{specificationValue.name}}</span>
  259. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  260. </view>
  261. </view>
  262. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  263. <text>米 数</text>
  264. <!-- style="margin-left: 10px;text-align: right;" -->
  265. <view style="display: flex; justify-content: right; width: 70%;">
  266. <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  267. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  268. <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  269. </view>
  270. </view>
  271. </view>
  272. </view>
  273. <!--挂表-->
  274. <view v-else-if="objValue.enginClassValue=='挂表'">
  275. <view class="uni-list" style="margin-bottom: 20px;">
  276. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  277. 挂表
  278. <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history" v-if="objValue.enginType == 'old_renovation'">{{historyName}}</span>
  279. </view>
  280. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  281. <view>
  282. 品 牌
  283. </view>
  284. <view v-if="this.isEmpty(this.brandValue.id)" style="margin-top: 10;" @click="pickerShow('brand')">
  285. <span style="color: darkgray;">请选择品牌</span>
  286. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  287. </view>
  288. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brand')">
  289. <span style="color: black;">{{brandValue.name}}</span>
  290. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  291. </view>
  292. </view>
  293. </view>
  294. </view>
  295. <!--表后管-->
  296. <view v-else-if="objValue.enginClassValue=='表后管'">
  297. <view class="uni-list" style="margin-bottom: 20px;">
  298. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  299. 表后管
  300. <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history" v-if="objValue.enginType == 'old_renovation'">{{historyName}}</span>
  301. </view>
  302. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  303. <view>
  304. 材 质
  305. </view>
  306. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;" @click="pickerShow('cz')">
  307. <span style="color: darkgray;">请选择材质</span>
  308. </view>
  309. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  310. <span style="color: black;">{{materialValue.name}}</span>
  311. </view>
  312. </view>
  313. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  314. <view>
  315. 规 格
  316. </view>
  317. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;" @click="pickerShow('gg')">
  318. <span style="color: darkgray;">请选择规格</span>
  319. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  320. </view>
  321. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  322. <span style="color: black;">{{specificationValue.name}}</span>
  323. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  324. </view>
  325. </view>
  326. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  327. <text>米 数</text>
  328. <!-- style="margin-left: 10px;text-align: right;" -->
  329. <view style="display: flex; justify-content: right; width: 70%;">
  330. <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  331. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  332. <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  333. </view>
  334. </view>
  335. </view>
  336. </view>
  337. <!--阀管-->
  338. <view v-else-if="objValue.enginClassValue=='阀管'">
  339. <view class="uni-list" style="margin-bottom: 20px;">
  340. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  341. 阀管
  342. <span style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;" @click="history" v-if="objValue.enginType == 'old_renovation'">{{historyName}}</span>
  343. </view>
  344. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  345. <view>
  346. 上门类型
  347. </view>
  348. <view v-if="this.isEmpty(this.doorValue.dictValue)" style="margin-top: 10;" @click="pickerShow('door')">
  349. <span style="color: darkgray;">请选择上门类型</span>
  350. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  351. </view>
  352. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('door')">
  353. <span style="color: black;">{{doorValue.dictLabel}}</span>
  354. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  355. </view>
  356. </view>
  357. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  358. <view>
  359. 自闭阀厂家
  360. </view>
  361. <view v-if="this.isEmpty(this.SelfClosValve.id)" style="margin-top: 10;" @click="pickerShow('zbf')">
  362. <span style="color: darkgray;">请选择自闭阀厂家</span>
  363. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  364. </view>
  365. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('zbf')">
  366. <span style="color: black;">{{SelfClosValve.name}}</span>
  367. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  368. </view>
  369. </view>
  370. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  371. <view>
  372. 灶具管厂家
  373. </view>
  374. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;" @click="pickerShow('cz')">
  375. <span style="color: darkgray;">请选择灶具管厂家</span>
  376. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  377. </view>
  378. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  379. <span style="color: black;">{{materialValue.name}}</span>
  380. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  381. </view>
  382. </view>
  383. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  384. <view>
  385. 规 格
  386. </view>
  387. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;" @click="pickerShow('gg')">
  388. <span style="color: darkgray;">请选择规格</span>
  389. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  390. </view>
  391. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  392. <span style="color: black;">{{specificationValue.name}}</span>
  393. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  394. </view>
  395. </view>
  396. <!-- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  397. <text>米 数</text>
  398. <view style="display: flex; justify-content: right; width: 70%;">
  399. <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6"
  400. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  401. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  402. <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1"
  403. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  404. </view>
  405. </view> -->
  406. </view>
  407. </view>
  408. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  409. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  410. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  411. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()" v-show="reviewStatus!='1'"></image>
  412. <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
  413. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  414. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index)">
  415. </image>
  416. </view>
  417. <view v-else>
  418. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  419. </view>
  420. <view @click="remove(index)" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  421. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  422. </image>
  423. </view>
  424. </view>
  425. </view>
  426. <view v-if="objValue.enginType == 'old_renovation'" style="margin-top: 10px;">
  427. <view v-if="objValue.enginClassValue=='拆旧管'">
  428. <span class="container-text">(1)拆除前照片(能体现出周边环境的宏观照片)</span>
  429. <span class="container-text">(2)拆除的立杠照片(如腐蚀严重需增加腐蚀处特写照片)</span>
  430. <span class="container-text">(3)立杠腐蚀照片</span>
  431. </view>
  432. <view v-if="objValue.enginClassValue=='立杠'">
  433. <span class="container-text">改造完成后的宏观照片,热收缩套照片,立杠要求有卡子及三通、表弯头、立杠刷油均匀</span>
  434. </view>
  435. <view v-if="objValue.enginClassValue=='挂表'">
  436. <span class="container-text">安装后的业主家燃气表正面能看清相关信息的照片</span>
  437. </view>
  438. <view v-if="objValue.enginClassValue=='表后管'">
  439. <span class="container-text">表后管整体照片+表至自闭阀区间的管道走向视频,表后管需按照施工标准横平竖直且有卡子固定</span>
  440. </view>
  441. <view v-if="objValue.enginClassValue=='阀管'">
  442. <span class="container-text">(1)自闭阀照片(自闭阀必须安装底座)</span>
  443. <span class="container-text">(2)灶具连接处照片</span>
  444. <span class="container-text">(3)打压照片</span>
  445. <span class="container-text">(4)回执单照片</span>
  446. </view>
  447. </view>
  448. </view>
  449. </view>
  450. <view class=" action-btn" v-show="reviewStatus!='1'" style="display: flex;padding: 5px;">
  451. <button @click="submit('submit')" class="btn cu-btn block bg-blue lg round" style="margin-right: 10px;">确认上传</button>
  452. <button @click="submit('save')" class="btn cu-btn block bg-blue lg round" v-if="objValue.enginType == 'old_renovation'">暂存</button>
  453. </view>
  454. <bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
  455. </scroll-view>
  456. </template>
  457. <script>
  458. import SelectPicker from '../../../components/selectPicker/select_picker.vue'
  459. import bottomSheet from '../../../components/bottomSheet/bottomSheet.vue'
  460. import {
  461. getDicts
  462. } from "@/api/system/dict/data";
  463. import {
  464. getAreaList,
  465. getBuildingList,
  466. getUnitList,
  467. getHousesList,
  468. addTearOldPipe,
  469. getEnginMaterialQualityList,
  470. getEnginSpecificationsList,
  471. getRoomProjectList,
  472. getRoomProjectId,
  473. getRoomDetailsIDCard,
  474. putRoomDetails
  475. } from '@/api/common'
  476. import {
  477. getToken
  478. } from '../../../utils/auth';
  479. import {
  480. showConfirm
  481. } from '../../../utils/common';
  482. import {
  483. login
  484. } from '../../../api/login';
  485. export default {
  486. components: {
  487. SelectPicker,
  488. bottomSheet
  489. },
  490. data() {
  491. return {
  492. headers: {
  493. Authorization: "Bearer " + getToken()
  494. },
  495. historyName: '恢复暂存',
  496. houseHeadName: '',
  497. houseHeadPhone: '',
  498. houseHeadIDcardNumber: '',
  499. administrative: '',
  500. type: '',
  501. changefj: false,
  502. change: false,
  503. open: false,
  504. reviewStatus: '', //是否可以点击
  505. objValue: '', //上一页面传过来的值 新增接口用
  506. openDict: false,
  507. selectList: [],
  508. dictOptions: [],
  509. imgArr: [],
  510. idCard: '',
  511. XQValue: {},
  512. XZQValue: {},
  513. projectValue: {
  514. 'dictValue': '0'
  515. },
  516. currentResidentsPhoe: [{
  517. phone: ''
  518. }],
  519. LevelValue: {},
  520. LDValue: {},
  521. DYValue: {},
  522. FJValue: {},
  523. specificationValue: {}, //规格
  524. materialValue: {}, //材质
  525. brandValue: {}, //品牌
  526. doorValue: {}, //上门类型
  527. SelfClosValve: {}, //自闭阀类型
  528. materialList: '', //材质list
  529. XQList: '',
  530. LDList: '',
  531. DYList: '',
  532. FJList: '',
  533. progress: 0, //上传图片进度百分比
  534. loading: false,
  535. isCheck: true, //是否按照施工图纸施工
  536. inputNumberValue: '',
  537. inputIntegerNumberValue: '',
  538. inputDecimalNumberValue: '',
  539. title: '',
  540. historyList: {}, //历史数据
  541. tempState: '',
  542. tempSelectList: [],
  543. }
  544. },
  545. created() {
  546. },
  547. onLoad(options) {
  548. if ('params' in options) {
  549. this.objValue = JSON.parse(decodeURIComponent(options.params));
  550. if (this.objValue.enginType == `old_renovation`) {
  551. this.title = '旧改工程-室内'
  552. } else if (this.objValue.enginType == `new_built`) {
  553. this.title = '新建工程-室内'
  554. }
  555. uni.setNavigationBarTitle({
  556. title: this.title
  557. })
  558. }
  559. },
  560. methods: {
  561. copyAddress() {
  562. if (uni.getStorageSync('XZQValue') != {}) {
  563. this.type = 'xzq';
  564. this.changeSelectDict(uni.getStorageSync('XZQValue'));
  565. }
  566. if (uni.getStorageSync('XQValue') != {}) {
  567. this.type = 'xq';
  568. this.changeSelect(uni.getStorageSync('XQValue'))
  569. }
  570. if (uni.getStorageSync('LDValue') != {}) {
  571. this.type = 'ld';
  572. this.changeSelect(uni.getStorageSync('LDValue'))
  573. }
  574. if (uni.getStorageSync('DYValue') != {}) {
  575. this.type = 'dy';
  576. this.changeSelect(uni.getStorageSync('DYValue'))
  577. }
  578. if (uni.getStorageSync('FJValue') != {}) {
  579. this.type = 'fj';
  580. this.changeSelect(uni.getStorageSync('FJValue'))
  581. }
  582. },
  583. //判断是否选择
  584. isEmpty(str) {
  585. return (!str || 0 === str.length);
  586. },
  587. change1() {
  588. this.change = !this.change
  589. },
  590. // 显示历史弹窗
  591. handleShowSheet() {
  592. this.shareState = true;
  593. },
  594. // 隐藏历史弹窗
  595. handleHiddenShare() {
  596. this.shareState = false;
  597. },
  598. showPhoto(index) {
  599. uni.previewImage({
  600. current: index,
  601. urls: this.imgArr,
  602. })
  603. },
  604. remove(index) {
  605. uni.showModal({
  606. title: '提示',
  607. content: '是否删除该图片或视频?',
  608. success: (res) => {
  609. if (res.confirm) {
  610. this.imgArr.splice(index, 1)
  611. if (this.imgArr.length <= 0) {
  612. this.photo = true;
  613. }
  614. }
  615. }
  616. })
  617. },
  618. choose() {
  619. let _this = this;
  620. uni.showActionSheet({
  621. title: '上传',
  622. itemList: ['图片', '视频'],
  623. success: (res) => {
  624. if (res.tapIndex == 0) {
  625. this.chooseimage()
  626. } else {
  627. this.choosevideo()
  628. }
  629. }
  630. })
  631. },
  632. chooseimage() {
  633. let _this = this;
  634. uni.chooseImage({
  635. sourceType: this.objValue.enginType == `old_renovation` ? ['camera'] : ['album', 'camera'],
  636. success(resp) {
  637. resp.tempFiles.forEach((item, index) => {
  638. const task = uni.uploadFile({
  639. url: _this.$HTTP + `/obs`,
  640. filePath: item.path,
  641. name: 'file',
  642. formData: {},
  643. header: _this.headers,
  644. success: res => {
  645. // 判断是否json字符串,将其转为json格式
  646. // let data = _this.$u.test.jsonString(res
  647. // .data) ? JSON.parse(res.data) : res.data;
  648. let data = JSON.parse(res.data);
  649. if (![200].includes(data.code)) {
  650. // this.uploadError(index, data);
  651. _this.$modal.msg(data.msg)
  652. } else {
  653. if (_this.progress === 100) {
  654. _this.imgArr.push(data.data.url)
  655. _this.$modal.msg('上传成功!')
  656. _this.photo = false;
  657. }
  658. }
  659. },
  660. fail: e => {
  661. _this.$modal.msg('上传失败!')
  662. //_this.uploadError(index, e);
  663. },
  664. complete: res => {
  665. uni.hideLoading();
  666. _this.uploading = false;
  667. }
  668. });
  669. task.onProgressUpdate(res => {
  670. _this.progress = res.progress;
  671. uni.showLoading({
  672. title: '上传中'
  673. })
  674. if (_this.progress != 100) {
  675. _this.loading = false
  676. } else {
  677. _this.loading = true
  678. }
  679. });
  680. })
  681. },
  682. })
  683. },
  684. choosevideo() {
  685. let _this = this;
  686. uni.chooseVideo({
  687. sourceType: this.objValue.enginType == `old_renovation` ? ['camera'] : ['album', 'camera'],
  688. maxDuration: 30,
  689. success(resp) {
  690. const task = uni.uploadFile({
  691. url: _this.$HTTP + `/obs`,
  692. filePath: resp.tempFilePath,
  693. name: 'file',
  694. formData: {},
  695. header: _this.headers,
  696. success: res => {
  697. // 判断是否json字符串,将其转为json格式
  698. let data = JSON.parse(res.data);
  699. if (![200].includes(res.statusCode)) {
  700. this.uploadError(index, data);
  701. } else {
  702. //上传成功
  703. if (_this.progress === 100) {
  704. _this.imgArr.push(data.data.url)
  705. _this.$modal.msg('上传成功!')
  706. _this.photo = false;
  707. }
  708. }
  709. },
  710. fail: e => {
  711. _this.$modal.msg('上传失败!')
  712. this.uploadError(index, e);
  713. },
  714. complete: res => {
  715. uni.hideLoading();
  716. _this.uploading = false;
  717. }
  718. });
  719. task.onProgressUpdate(res => {
  720. _this.progress = res.progress;
  721. uni.showLoading({
  722. title: '上传中'
  723. })
  724. if (_this.progress != 100) {
  725. _this.loading = false
  726. } else {
  727. _this.loading = true
  728. }
  729. });
  730. },
  731. })
  732. },
  733. pickerShow(e) {
  734. this.type = e; //赋值类型
  735. if (e == 'door') { //上门类型
  736. this.openDict = true;
  737. getDicts("visit_type").then(response => {
  738. this.dictOptions = response.data;
  739. });
  740. } else if (e == 'zbf') { //自闭阀类型
  741. this.open = true;
  742. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
  743. .objValue.enginClassValue, '自闭阀厂家').then(response => {
  744. this.selectList = response.data;
  745. });
  746. } else if (e == 'brand') { //品牌
  747. this.open = true;
  748. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
  749. .objValue.enginClassValue).then(response => {
  750. this.selectList = response.data;
  751. });
  752. } else if (e == 'cz') { //材质
  753. this.open = true;
  754. if (this.objValue.enginClassValue == '阀管') {
  755. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification,
  756. this
  757. .objValue.enginClassValue, "灶具管厂家").then(response => {
  758. this.selectList = response.data;
  759. });
  760. } else {
  761. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification,
  762. this
  763. .objValue.enginClassValue).then(response => {
  764. this.selectList = response.data;
  765. });
  766. }
  767. } else if (e == 'gg') { //规格
  768. if (this.isEmpty(this.materialValue.id)) {
  769. if (this.objValue.enginClassValue == '阀管') {
  770. this.$modal.msg('请选择灶具管厂家')
  771. } else {
  772. this.$modal.msg('请选择材质')
  773. }
  774. } else {
  775. this.open = true;
  776. this.selectList = this.materialList;
  777. }
  778. } else if (e == 'fsdj') {
  779. this.open = true;
  780. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
  781. .objValue.enginClassValue).then(response => {
  782. this.selectList = response.data;
  783. });
  784. } else if (e == 'kj') {
  785. //孔距
  786. this.open = true;
  787. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
  788. .objValue.enginClassValue).then(response => {
  789. this.selectList = response.data;
  790. });
  791. } else if (e == 'gczq') { //工程周期
  792. this.openDict = true;
  793. getDicts("engin_cycle").then(response => {
  794. this.dictOptions = response.data;
  795. });
  796. } else if (e == 'xzq') { //行政区
  797. if (this.isEmpty(this.projectValue.dictValue)) {
  798. this.$modal.msg('请选择工程周期')
  799. } else {
  800. this.openDict = true;
  801. getDicts("district").then(response => {
  802. this.dictOptions = response.data;
  803. });
  804. }
  805. //this.selectList = this.dictOptions;
  806. } else if (e == 'xq') { //小区
  807. if (this.isEmpty(this.XZQValue.dictValue)) {
  808. getAreaList('').then(res => {
  809. this.XQList = res.data;
  810. this.open = true;
  811. this.selectList = this.XQList;
  812. })
  813. } else {
  814. getAreaList(this.XZQValue.dictValue).then(res => {
  815. this.XQList = res.data;
  816. this.selectList = this.XQList;
  817. this.open = true;
  818. })
  819. }
  820. } else if (e == 'ld') { //楼栋
  821. if (this.isEmpty(this.XQValue.id)) {
  822. this.$modal.msg('请选择小区')
  823. } else {
  824. getBuildingList(this.XQValue.id).then(res => {
  825. this.LDList = res.data
  826. this.selectList = this.LDList;
  827. this.open = true;
  828. })
  829. }
  830. } else if (e == 'dy') { //单元
  831. if (this.isEmpty(this.LDValue.id)) {
  832. this.$modal.msg('请选择楼栋')
  833. } else {
  834. getUnitList(this.LDValue.id).then(res => {
  835. this.DYList = res.data
  836. this.selectList = this.DYList;
  837. this.open = true;
  838. })
  839. }
  840. } else if (e == 'fj') { //房间
  841. if (this.isEmpty(this.DYValue.id)) {
  842. this.$modal.msg('请选择单元')
  843. } else {
  844. getHousesList(this.DYValue.id).then(res => {
  845. this.FJList = res.data
  846. this.selectList = this.FJList;
  847. this.open = true;
  848. })
  849. }
  850. }
  851. },
  852. switchChange(e) {
  853. //'switch 发生 change 事件,携带值为', e.detail.value)
  854. this.isCheck = e.detail.value;
  855. },
  856. changeSelectDict(item, index) {
  857. this.openDict = false;
  858. if (this.type == 'door') {
  859. this.doorValue = item
  860. } else if (this.type == 'gczq') {
  861. this.projectValue = item
  862. if (!this.isEmpty(this.FJValue.id)) {
  863. //房间选完 判断 工程周期 工程周期切换
  864. this.getStatus();
  865. }
  866. } else if (this.type == 'xzq') {
  867. this.XZQValue = item;
  868. //根据行政区id获取小区数据
  869. this.XQValue = ''; //重置小区数据
  870. this.LDValue = ''; //重置楼栋数据
  871. this.DYValue = ''; //重置单元数据
  872. this.FJValue = ''; //重置房间数据
  873. this.currentResidentsPhoe = [];
  874. //this.historyName = "";
  875. this.houseHeadName = "";
  876. this.houseHeadPhone = "";
  877. this.houseHeadIDcardNumber = "";
  878. this.administrative = "";
  879. }
  880. },
  881. changeSelect(item, index) {
  882. // this.index = index;
  883. // this.address = item.communityName;
  884. this.open = false;
  885. if (this.type == 'cz') {
  886. this.materialValue = item;
  887. this.specificationValue = ''; //重置规格
  888. //根据材质ID 获取规格数据
  889. getEnginSpecificationsList(item.id).then(res => {
  890. this.materialList = res.data
  891. })
  892. } else if (this.type == 'gg') {
  893. this.specificationValue = item;
  894. } else if (this.type == 'xq') {
  895. this.XZQValue = {
  896. dictValue: item.district,
  897. dictLabel: item.districtName,
  898. };
  899. this.XQValue = item;
  900. //根据小区id 获取楼栋数据
  901. this.LDValue = ''; //重置楼栋数据
  902. this.DYValue = ''; //重置单元数据
  903. this.FJValue = ''; //重置房间数据
  904. this.currentResidentsPhoe = [];
  905. //this.historyName = "";
  906. this.houseHeadName = "";
  907. this.houseHeadPhone = "";
  908. this.houseHeadIDcardNumber = "";
  909. this.administrative = item.administrative;
  910. } else if (this.type == 'ld') {
  911. this.LDValue = item;
  912. //根据楼栋ID 获取单元数据
  913. this.DYValue = ''; //重置单元数据
  914. this.FJValue = ''; //重置房间数据
  915. this.currentResidentsPhoe = [];
  916. //this.historyName = "";
  917. this.houseHeadName = "";
  918. this.houseHeadPhone = "";
  919. this.houseHeadIDcardNumber = "";
  920. } else if (this.type == 'dy') {
  921. this.DYValue = item;
  922. //根据单元数据 获取房间数据
  923. this.FJValue = ''; //重置房间数据
  924. this.currentResidentsPhoe = [];
  925. //this.historyName = "";
  926. this.houseHeadName = "";
  927. this.houseHeadPhone = "";
  928. this.houseHeadIDcardNumber = "";
  929. } else if (this.type == 'fj') {
  930. this.FJValue = item;
  931. //this.history();
  932. this.houseHeadName = item.houseUserName;
  933. this.houseHeadPhone = item.phone;
  934. this.houseHeadIDcardNumber = item.idCard;
  935. this.currentResidentsPhoe = [];
  936. if (!this.isEmpty(item.newPhone)) {
  937. let str = item.newPhone;
  938. var array = str.split(",");
  939. array.forEach((list) => {
  940. this.currentResidentsPhoe.push({
  941. phone: list
  942. })
  943. })
  944. }
  945. if (!this.isEmpty(this.projectValue.id)) {
  946. //房间选完 判断 工程周期
  947. this.getStatus();
  948. }
  949. } else if (this.type == 'zbf') {
  950. this.SelfClosValve = item
  951. } else if (this.type == 'brand') {
  952. this.brandValue = item
  953. } else {
  954. this.LevelValue = item;
  955. }
  956. },
  957. //关闭弹窗
  958. close(e) {
  959. this.open = false
  960. },
  961. //关闭弹窗
  962. closeDict(e) {
  963. this.openDict = false
  964. },
  965. getStatus() {
  966. let param = {
  967. areaId: this.XQValue.id, // 小区id
  968. buildingId: this.LDValue.id, // 楼宇id
  969. unitId: this.DYValue.id, // 单元id
  970. houseId: this.FJValue.id, // 房间id
  971. enginCycle: this.projectValue.id, // 工程周期
  972. enginType: this.objValue.enginType, //写死 上一页面传过来的
  973. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  974. }
  975. getRoomProjectId(param).then(res => {
  976. if (res.code == '200') {
  977. if (res.data != null && res.data.zEngineeringNodeBoList != null) {
  978. res.data.zEngineeringNodeBoList.forEach((item, index) => {
  979. if (this.objValue.enginClassValue == item.type) {
  980. this.reviewStatus = item.reviewStatus;
  981. if (item.reviewStatus == '1')
  982. this.$modal.msg('当前工程已结束')
  983. }
  984. })
  985. } else {
  986. this.reviewStatus = '' //置空
  987. }
  988. } else {
  989. this.$modal.msg(res.msg)
  990. this.reviewStatus = '' //置空
  991. }
  992. })
  993. },
  994. serchByCard() {
  995. if (this.isEmpty(this.idCard)) {
  996. this.$modal.msg("请输入身份证号码")
  997. return
  998. }
  999. if (!this.$validation.idCard(this.idCard)) {
  1000. this.$modal.msg("身份证号码格式不正确")
  1001. return
  1002. }
  1003. getRoomDetailsIDCard(this.idCard).then(res => {
  1004. if (res.code == '200' && res.data != null) {
  1005. if (!this.isEmpty(res.data.newPhone)) {
  1006. this.currentResidentsPhoe = [];
  1007. let str = res.data.newPhone;
  1008. var array = str.split(",");
  1009. array.forEach((list) => {
  1010. this.currentResidentsPhoe.push({
  1011. phone: list
  1012. })
  1013. })
  1014. }
  1015. this.houseHeadName = res.data.houseUserName;
  1016. this.houseHeadIDcardNumber = res.data.idCard;
  1017. this.houseHeadPhone = res.data.phone;
  1018. this.XZQValue = {
  1019. dictValue: res.data.district,
  1020. dictLabel: res.data.districtName
  1021. };
  1022. this.XQValue = {
  1023. id: res.data.areaId,
  1024. name: res.data.areaName
  1025. }
  1026. this.LDValue = {
  1027. id: res.data.buildingId,
  1028. name: res.data.buildingName
  1029. }
  1030. this.DYValue = {
  1031. id: res.data.unitId,
  1032. name: res.data.unitName
  1033. }
  1034. this.FJValue = {
  1035. id: res.data.id,
  1036. name: res.data.name
  1037. }
  1038. getAreaList(this.XZQValue.dictValue).then(res => {
  1039. this.XQList = res.data;
  1040. })
  1041. getBuildingList(this.XQValue.id).then(res => {
  1042. this.LDList = res.data
  1043. })
  1044. getUnitList(this.LDValue.id).then(res => {
  1045. this.DYList = res.data
  1046. })
  1047. getHousesList(this.DYValue.id).then(res => {
  1048. this.FJList = res.data
  1049. })
  1050. }
  1051. })
  1052. },
  1053. //提交数据
  1054. submit(e) {
  1055. this.tempState = e == 'submit' ? '' : '99'
  1056. if (this.isEmpty(this.projectValue.dictValue)) {
  1057. this.$modal.msg("请选择工程周期")
  1058. return
  1059. }
  1060. if (this.isEmpty(this.XZQValue.dictValue)) {
  1061. this.$modal.msg("请选择行政区")
  1062. return
  1063. }
  1064. if (this.isEmpty(this.XQValue.id)) {
  1065. this.$modal.msg("请选择小区")
  1066. return
  1067. }
  1068. if (this.isEmpty(this.LDValue.id)) {
  1069. this.$modal.msg("请选择楼栋")
  1070. return
  1071. }
  1072. if (this.isEmpty(this.DYValue.id)) {
  1073. this.$modal.msg("请选择单元")
  1074. return
  1075. }
  1076. if (this.isEmpty(this.FJValue.id)) {
  1077. this.$modal.msg("请选择房间")
  1078. return
  1079. }
  1080. if (this.currentResidentsPhoe.length <= 0) {
  1081. this.$modal.msg('现住人电话不能为空');
  1082. return
  1083. }
  1084. try {
  1085. this.currentResidentsPhoe.forEach((list) => {
  1086. if (this.isEmpty(list.phone)) {
  1087. this.$modal.msg('现住人电话不能为空')
  1088. throw new Error('End Loop')
  1089. }
  1090. if (list.phone.length == 11 || list.phone.length == 8) {} else {
  1091. this.$modal.msg('现住人电话填写错误')
  1092. throw new Error('End Loop')
  1093. }
  1094. })
  1095. } catch (e) {
  1096. if (e.message === 'End Loop') throw e
  1097. }
  1098. uni.setStorageSync("XZQValue", this.XZQValue)
  1099. uni.setStorageSync("XQValue", this.XQValue)
  1100. uni.setStorageSync("LDValue", this.LDValue)
  1101. uni.setStorageSync("DYValue", this.DYValue)
  1102. this.FJValue.newPhone = this.currentResidentsPhoe.map(item => item.phone).join();
  1103. uni.setStorageSync("FJValue", this.FJValue)
  1104. if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue == '切断阀') {
  1105. if (e == 'submit') {
  1106. if (this.isEmpty(this.brandValue.id)) {
  1107. this.$modal.msg("请选择厂家")
  1108. } else {
  1109. //this.onsubmit(e);
  1110. const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith(
  1111. '.png') || item
  1112. .endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
  1113. .endsWith('.JPEG'));
  1114. const hasVideo = this.imgArr.some(item => item.endsWith('.mp4') || item.endsWith('.MP4'));
  1115. if (hasImage && hasVideo) {
  1116. this.onsubmit(e);
  1117. } else {
  1118. this.$modal.msg('请至少上传一张照片和一个视频')
  1119. }
  1120. }
  1121. } else {
  1122. this.onsubmit(e); //暂存
  1123. }
  1124. } else if (this.objValue.enginClassValue == '打孔') {
  1125. // if (this.isEmpty(this.LevelValue.id)) {
  1126. // this.$modal.msg("请选择孔距") //打孔 判断孔距
  1127. // } else {
  1128. this.onsubmit(e);
  1129. //}
  1130. } else if (this.objValue.enginClassValue == '拆旧管') {
  1131. if (e == 'submit') {
  1132. if (this.isEmpty(this.LevelValue.id)) {
  1133. this.$modal.msg("请选择腐蚀等级") //拆旧管 判断腐蚀等级
  1134. } else {
  1135. this.onsubmit(e);
  1136. }
  1137. } else {
  1138. this.onsubmit(e); //暂存
  1139. }
  1140. } else if (this.objValue.enginClassValue == '立杠') {
  1141. //立杠 判断 材质 规格 米数
  1142. if (e == 'submit') {
  1143. if (this.isEmpty(this.materialValue.id)) {
  1144. this.$modal.msg("请选择材质")
  1145. } else if (this.isEmpty(this.specificationValue.id)) {
  1146. this.$modal.msg("请选择规格")
  1147. } else if (this.isEmpty(this.inputIntegerNumberValue)) {
  1148. this.$modal.msg("请输入米数")
  1149. } else {
  1150. if (this.isEmpty(this.inputDecimalNumberValue)) {
  1151. this.inputNumberValue = this.inputIntegerNumberValue;
  1152. } else {
  1153. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  1154. }
  1155. this.onsubmit(e);
  1156. }
  1157. } else {
  1158. this.onsubmit(e); //暂存
  1159. }
  1160. } else if (this.objValue.enginClassValue == '挂表') {
  1161. //挂表 判断 品牌
  1162. if (e == 'submit') {
  1163. if (this.isEmpty(this.brandValue.id)) {
  1164. this.$modal.msg("请选择品牌")
  1165. } else {
  1166. this.onsubmit(e);
  1167. }
  1168. } else {
  1169. this.onsubmit(e);
  1170. }
  1171. } else if (this.objValue.enginClassValue == '表后管') {
  1172. //表后管 判断 材质 规格 米数 (为必须有一张照片和一个视频)
  1173. if (e == 'submit') {
  1174. if (this.isEmpty(this.materialValue.id)) {
  1175. this.$modal.msg("请选择材质")
  1176. } else if (this.isEmpty(this.specificationValue.id)) {
  1177. this.$modal.msg("请选择规格")
  1178. } else if (this.isEmpty(this.inputIntegerNumberValue)) {
  1179. this.$modal.msg("请输入米数")
  1180. } else {
  1181. const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith(
  1182. '.png') || item
  1183. .endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
  1184. .endsWith('.JPEG'));
  1185. const hasVideo = this.imgArr.some(item => item.endsWith('.mp4') || item.endsWith('.MP4'));
  1186. if (hasImage && hasVideo) {
  1187. //表后管
  1188. this.againSubmitBHG();
  1189. } else {
  1190. this.$modal.msg('请至少上传一张照片和一个视频')
  1191. }
  1192. }
  1193. } else {
  1194. //暂存
  1195. this.againSubmitBHG();
  1196. }
  1197. } else if (this.objValue.enginClassValue == '阀管') {
  1198. //阀管 判断 材质 规格 米数
  1199. if (e == 'submit') {
  1200. if (this.isEmpty(this.doorValue.dictValue)) {
  1201. this.$modal.msg("请选择上门类型")
  1202. } else if (this.isEmpty(this.SelfClosValve.id)) {
  1203. this.$modal.msg("请选择自闭阀厂家")
  1204. } else if (this.isEmpty(this.materialValue.id)) {
  1205. this.$modal.msg("请选择灶具管厂家")
  1206. } else if (this.isEmpty(this.specificationValue.id)) {
  1207. this.$modal.msg("请选择规格")
  1208. } else {
  1209. if (this.isEmpty(this.inputDecimalNumberValue)) {
  1210. this.inputNumberValue = this.inputIntegerNumberValue;
  1211. } else {
  1212. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  1213. }
  1214. this.onsubmit(e);
  1215. }
  1216. } else {
  1217. this.onsubmit(e); //暂存
  1218. }
  1219. }
  1220. },
  1221. onsubmit(e) {
  1222. if (e == 'submit') {
  1223. if (this.imgArr.length <= 0) {
  1224. this.$modal.msg('请上传照片或视频')
  1225. return
  1226. }
  1227. }
  1228. // else if (this.loading == false) {
  1229. // this.$modal.msg('照片或视频未上传完毕,无法提交!')
  1230. // }
  1231. //else {
  1232. let phoneArr = [];
  1233. this.currentResidentsPhoe.forEach((list) => {
  1234. phoneArr.push(list.phone)
  1235. })
  1236. putRoomDetails(this.FJValue.id, phoneArr.join())
  1237. .then(res => {
  1238. if (res.code == '200') {
  1239. this.againSubmit();
  1240. }
  1241. })
  1242. //}
  1243. },
  1244. againSubmitBHG() {
  1245. //表后管 特殊 提交
  1246. if (this.isEmpty(this.inputDecimalNumberValue)) {
  1247. this.inputNumberValue = this.inputIntegerNumberValue;
  1248. } else {
  1249. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  1250. }
  1251. let phoneArr = [];
  1252. this.currentResidentsPhoe.forEach((list) => {
  1253. phoneArr.push(list.phone)
  1254. })
  1255. putRoomDetails(this.FJValue.id, phoneArr
  1256. .join())
  1257. .then(res => {
  1258. if (res.code == '200') {
  1259. let param = {
  1260. district: this.XZQValue.dictValue,
  1261. areaId: this.XQValue.id,
  1262. buildingId: this.LDValue.id,
  1263. unitId: this.DYValue.id,
  1264. houseId: this.FJValue.id,
  1265. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1266. enginClassification: this.objValue
  1267. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1268. enginCycle: this.projectValue.dictValue, //工程周期
  1269. zEngineeringNodeBo: {
  1270. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1271. zEngineeringInfoBo: {
  1272. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1273. state: this.tempState,
  1274. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1275. zEngineeringMaterialBo: [{
  1276. materialQuality: this.materialValue.id, //材质
  1277. specifications: this.specificationValue.id, //规格
  1278. number: this.inputNumberValue //米数
  1279. }]
  1280. }
  1281. }
  1282. }
  1283. uni.showLoading()
  1284. addTearOldPipe(param).then(res => {
  1285. if (res.code == '200') {
  1286. uni.hideLoading()
  1287. uni.showToast({
  1288. title: res.msg,
  1289. icon: 'none',
  1290. //显示持续时间为 1秒
  1291. duration: 1000
  1292. });
  1293. uni.navigateBack();
  1294. }
  1295. })
  1296. }
  1297. })
  1298. },
  1299. againSubmit() {
  1300. //提交
  1301. let param = '';
  1302. if (this.objValue.enginClassValue == '拆旧管' || this.objValue.enginClassValue ==
  1303. '打孔') { //拆旧管 打孔
  1304. param = {
  1305. district: this.XZQValue.dictValue,
  1306. areaId: this.XQValue.id,
  1307. buildingId: this.LDValue.id,
  1308. unitId: this.DYValue.id,
  1309. houseId: this.FJValue.id,
  1310. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1311. enginClassification: this.objValue
  1312. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1313. enginCycle: this.projectValue.dictValue, //工程周期
  1314. zEngineeringNodeBo: {
  1315. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1316. zEngineeringInfoBo: {
  1317. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1318. state: this.tempState,
  1319. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1320. zEngineeringMaterialBo: [{
  1321. corrosionLevel: this.LevelValue.id //腐蚀等级 //孔距
  1322. }]
  1323. }
  1324. }
  1325. }
  1326. //this.onsubmit(param)
  1327. } else if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue ==
  1328. '切断阀') { //报警器切断阀
  1329. param = {
  1330. district: this.XZQValue.dictValue,
  1331. areaId: this.XQValue.id,
  1332. buildingId: this.LDValue.id,
  1333. unitId: this.DYValue.id,
  1334. houseId: this.FJValue.id,
  1335. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1336. enginClassification: this.objValue
  1337. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1338. enginCycle: this.projectValue.dictValue, //工程周期
  1339. zEngineeringNodeBo: {
  1340. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1341. zEngineeringInfoBo: {
  1342. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1343. state: this.tempState,
  1344. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1345. zEngineeringMaterialBo: [{
  1346. brand: this.brandValue.id, //品牌
  1347. // number: this.inputNumberValue //米数
  1348. }]
  1349. }
  1350. }
  1351. }
  1352. } else if (this.objValue.enginClassValue == '立杠') { //立杠
  1353. param = {
  1354. district: this.XZQValue.dictValue,
  1355. areaId: this.XQValue.id,
  1356. buildingId: this.LDValue.id,
  1357. unitId: this.DYValue.id,
  1358. houseId: this.FJValue.id,
  1359. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1360. enginClassification: this.objValue
  1361. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1362. enginCycle: this.projectValue.dictValue, //工程周期
  1363. zEngineeringNodeBo: {
  1364. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1365. zEngineeringInfoBo: {
  1366. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1367. state: this.tempState,
  1368. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1369. zEngineeringMaterialBo: [{
  1370. materialQuality: this.materialValue.id, //材质
  1371. specifications: this.specificationValue.id, //规格
  1372. number: this.inputNumberValue //米数
  1373. }]
  1374. }
  1375. }
  1376. }
  1377. } else if (this.objValue.enginClassValue == '挂表') { //挂表
  1378. param = {
  1379. district: this.XZQValue.dictValue,
  1380. areaId: this.XQValue.id,
  1381. buildingId: this.LDValue.id,
  1382. unitId: this.DYValue.id,
  1383. houseId: this.FJValue.id,
  1384. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1385. enginClassification: this.objValue
  1386. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1387. enginCycle: this.projectValue.dictValue, //工程周期
  1388. zEngineeringNodeBo: {
  1389. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1390. zEngineeringInfoBo: {
  1391. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1392. state: this.tempState,
  1393. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1394. zEngineeringMaterialBo: [{
  1395. brand: this.brandValue.id, //品牌
  1396. //number: this.inputNumberValue //米数
  1397. }]
  1398. }
  1399. }
  1400. }
  1401. } else if (this.objValue.enginClassValue == '阀管') { //自闭阀
  1402. if (!this.isEmpty(this.specificationValue.name)) {
  1403. var onlyNumbers = this.specificationValue.name.replace(/[^\d.]/g, '');
  1404. }
  1405. param = {
  1406. district: this.XZQValue.dictValue,
  1407. areaId: this.XQValue.id,
  1408. buildingId: this.LDValue.id,
  1409. unitId: this.DYValue.id,
  1410. houseId: this.FJValue.id,
  1411. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1412. enginClassification: this.objValue
  1413. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1414. enginCycle: this.projectValue.dictValue, //工程周期
  1415. zEngineeringNodeBo: {
  1416. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1417. zEngineeringInfoBo: {
  1418. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1419. state: this.tempState,
  1420. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1421. zEngineeringMaterialBo: [{
  1422. visitType: this.doorValue.dictValue, //上门类型
  1423. selfClosingValveType: this.SelfClosValve.id, //自闭阀类型
  1424. materialQuality: this.materialValue.id, //材质
  1425. specifications: this.specificationValue.id, //规格
  1426. number: onlyNumbers //米数
  1427. }]
  1428. }
  1429. }
  1430. }
  1431. }
  1432. uni.showLoading()
  1433. addTearOldPipe(param).then(res => {
  1434. if (res.code == '200') {
  1435. uni.hideLoading()
  1436. uni.showToast({
  1437. title: res.msg,
  1438. icon: 'none',
  1439. //显示持续时间为 3秒
  1440. duration: 2000
  1441. });
  1442. setTimeout(function() {
  1443. uni.navigateBack();
  1444. }, 1000)
  1445. }
  1446. })
  1447. },
  1448. history() {
  1449. this.LevelValue = {};
  1450. this.imgArr = [];
  1451. this.materialValue = {};
  1452. this.specificationValue = {};
  1453. this.inputIntegerNumberValue = '';
  1454. this.inputDecimalNumberValue = '';
  1455. this.brandValue = {};
  1456. this.doorValue = {};
  1457. this.SelfClosValve = {};
  1458. if (this.isEmpty(this.projectValue.dictValue)) {
  1459. this.$modal.msg("请选择工程周期")
  1460. return
  1461. }
  1462. if (this.isEmpty(this.XZQValue.dictValue)) {
  1463. this.$modal.msg("请选择行政区")
  1464. return
  1465. }
  1466. if (this.isEmpty(this.XQValue.id)) {
  1467. this.$modal.msg("请选择小区")
  1468. return
  1469. }
  1470. if (this.isEmpty(this.LDValue.id)) {
  1471. this.$modal.msg("请选择楼栋")
  1472. return
  1473. }
  1474. if (this.isEmpty(this.DYValue.id)) {
  1475. this.$modal.msg("请选择单元")
  1476. return
  1477. }
  1478. if (this.isEmpty(this.FJValue.id)) {
  1479. this.$modal.msg("请选择房间")
  1480. return
  1481. }
  1482. let param = {
  1483. areaId: this.XQValue.id, // 小区id
  1484. buildingId: this.LDValue.id, // 楼宇id
  1485. unitId: this.DYValue.id, // 单元id
  1486. houseId: this.FJValue.id, // 房间id
  1487. enginCycle: this.projectValue.dictValue, // 工程周期
  1488. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1489. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1490. }
  1491. getRoomProjectId(param).then(res => {
  1492. if (res.code == '200') {
  1493. if (res.data != null) {
  1494. getRoomProjectList(res.data.id, this.objValue.enginClassValue).then(res => {
  1495. // this.historyName = res.data.zEngineeringNodeBo.reviewStatus == '0' ?
  1496. // '未通过' : '已通过'
  1497. // if (res.data.zEngineeringNodeBo.reviewStatus != null && res.data.zEngineeringNodeBo.reviewStatus == '99') {
  1498. // this.historyName = '恢复暂存';
  1499. // } else {
  1500. // this.historyName = '';
  1501. // }
  1502. this.historyList = res.data
  1503. if (res.data.zEngineeringNodeBo != null) {
  1504. if (res.data.zEngineeringNodeBo.reviewStatus == '1') {
  1505. // this.showHistoryList();
  1506. this.$modal.msg("当前步骤以审核通过请谨慎!")
  1507. } else if (res.data.zEngineeringNodeBo.reviewStatus == '99') {
  1508. let dataJson = res.data.zEngineeringNodeBo
  1509. .zEngineeringInfoBoList[0];
  1510. this.imgArr = dataJson.zEngiineeringPhotoBoList;
  1511. if (this.objValue.enginClassValue == '拆旧管') {
  1512. this.LevelValue.id = dataJson
  1513. .zEngineeringMaterialBo[0]
  1514. .corrosionLevel
  1515. this.LevelValue.name = dataJson
  1516. .zEngineeringMaterialBo[0]
  1517. .corrosionLevelName
  1518. } else if (this.objValue.enginClassValue == '立杠' || this.objValue
  1519. .enginClassValue == '表后管') {
  1520. this.materialValue.id = dataJson.zEngineeringMaterialBo[0].materialQuality;
  1521. if (!this.isEmpty(this.materialValue.id) && this.materialValue.id != null) {
  1522. //根据材质ID 获取规格数据
  1523. getEnginSpecificationsList(this.materialValue.id).then(res => {
  1524. this.materialList = res.data
  1525. })
  1526. }
  1527. this.specificationValue.id = dataJson
  1528. .zEngineeringMaterialBo[0]
  1529. .specifications;
  1530. this.materialValue.name = dataJson.zEngineeringMaterialBo[0]
  1531. .materialQualityName;
  1532. this.specificationValue.name = dataJson
  1533. .zEngineeringMaterialBo[0].specificationsName;
  1534. if (dataJson.zEngineeringMaterialBo[0].number != null) {
  1535. this.inputIntegerNumberValue = this.getIntegerPart(
  1536. dataJson
  1537. .zEngineeringMaterialBo[0].number, 0);
  1538. this.inputDecimalNumberValue = this.getIntegerPart(dataJson
  1539. .zEngineeringMaterialBo[0].number, 1);
  1540. }
  1541. } else if (this.objValue.enginClassValue == '报警器' || this.objValue
  1542. .enginClassValue == '切断阀' || this.objValue
  1543. .enginClassValue == '挂表') {
  1544. this.brandValue.id = dataJson.zEngineeringMaterialBo[0]
  1545. .brand
  1546. this.brandValue.name = dataJson.zEngineeringMaterialBo[0]
  1547. .brandName
  1548. } else if (this.objValue.enginClassValue == '阀管') {
  1549. this.doorValue.dictValue = dataJson
  1550. .zEngineeringMaterialBo[0]
  1551. .visitType;
  1552. this.doorValue.dictLabel = dataJson
  1553. .zEngineeringMaterialBo[0]
  1554. .visitType;
  1555. this.SelfClosValve.id = dataJson
  1556. .zEngineeringMaterialBo[0]
  1557. .selfClosingValveType;
  1558. this.SelfClosValve.name = dataJson
  1559. .zEngineeringMaterialBo[0]
  1560. .selfClosingValveTypeName;
  1561. this.materialValue.id = dataJson
  1562. .zEngineeringMaterialBo[0]
  1563. .materialQuality;
  1564. if (!this.isEmpty(this.materialValue.id) && this.materialValue.id != null) {
  1565. //根据材质ID 获取规格数据
  1566. getEnginSpecificationsList(this.materialValue.id).then(res => {
  1567. this.materialList = res.data
  1568. })
  1569. }
  1570. this.specificationValue.id = dataJson
  1571. .zEngineeringMaterialBo[0]
  1572. .specifications;
  1573. this.materialValue.name = dataJson.zEngineeringMaterialBo[0]
  1574. .materialQualityName;
  1575. this.specificationValue.name = dataJson
  1576. .zEngineeringMaterialBo[0].specificationsName;
  1577. }
  1578. } else {
  1579. this.$modal.msg("暂无暂存信息")
  1580. }
  1581. } else {
  1582. this.$modal.msg("暂无历史信息")
  1583. }
  1584. })
  1585. } else {
  1586. this.$modal.msg("暂无工程信息")
  1587. }
  1588. } else {
  1589. this.$modal.msg(res.msg)
  1590. }
  1591. })
  1592. },
  1593. getIntegerPart(numStr, i) {
  1594. if (numStr != null && numStr != undefined && numStr != '') {
  1595. return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
  1596. }
  1597. },
  1598. setInfoBoNumber(key, number, i) {
  1599. let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0]
  1600. .number;
  1601. let resAry = Ynumber.toString().split('.');
  1602. resAry[i] = number
  1603. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0].number = resAry
  1604. .join('.');
  1605. },
  1606. showHistoryList() {
  1607. this.$refs.refShare.handleShowShare();
  1608. }
  1609. }
  1610. }
  1611. </script>
  1612. <style lang="scss">
  1613. .container-text {
  1614. display: flex;
  1615. align-items: center;
  1616. justify-content: space-between;
  1617. color: #b2b2b2;
  1618. position: relative;
  1619. }
  1620. .container {
  1621. display: flex;
  1622. align-items: center;
  1623. justify-content: space-between;
  1624. padding: 10px;
  1625. position: relative;
  1626. }
  1627. .uni-list {
  1628. border: 1xp solid #eee;
  1629. }
  1630. .to-right-icon {
  1631. width: 15px;
  1632. height: 15px;
  1633. position: absolute;
  1634. top: 50%;
  1635. transform: translateY(-50%);
  1636. }
  1637. .text {
  1638. font-size: 16px;
  1639. color: #333;
  1640. }
  1641. .background {
  1642. // border: 15px solid hsla(0, 0%, 100%, .5);
  1643. background: white;
  1644. background-clip: padding-box;
  1645. padding: 20rpx;
  1646. border-radius: 20rpx;
  1647. margin: 20rpx 10rpx;
  1648. /*从padding开始往外面裁剪背景*/
  1649. }
  1650. .btn {
  1651. width: 715rpx;
  1652. height: 69rpx;
  1653. background: #79A4F0;
  1654. border-radius: 6rpx;
  1655. font-size: 25rpx;
  1656. font-family: Microsoft YaHei;
  1657. font-weight: 400;
  1658. color: #FFFFFF;
  1659. line-height: 69rpx;
  1660. margin-top: 40rpx;
  1661. margin-bottom: 100rpx;
  1662. }
  1663. .number {
  1664. display: flex;
  1665. /* 水平居中显示子元素 */
  1666. align-items: flex-start;
  1667. /* 垂直居中显示子元素 */
  1668. justify-content: space-between;
  1669. /* 左右间距等于间距大小 */
  1670. padding: 10px;
  1671. /* 设置padding以提高视觉效果 */
  1672. }
  1673. .tj-btn {
  1674. height: 69rpx;
  1675. background: #3184f0;
  1676. border-radius: 6rpx;
  1677. font-size: 25rpx;
  1678. font-weight: 400;
  1679. color: #FFFFFF;
  1680. line-height: 69rpx;
  1681. margin: 40rpx 70rpx;
  1682. }
  1683. .sc-btn {
  1684. height: 69rpx;
  1685. background: #f0686b;
  1686. border-radius: 6rpx;
  1687. font-size: 25rpx;
  1688. font-weight: 400;
  1689. color: #FFFFFF;
  1690. line-height: 69rpx;
  1691. margin: 40rpx;
  1692. }
  1693. .num-style {
  1694. background: #e8f4f9;
  1695. margin: 20rpx;
  1696. padding: 10rpx;
  1697. border-radius: 20rpx;
  1698. border: 1px solid #d4e3f0;
  1699. }
  1700. .textarea {
  1701. margin-top: 10upx;
  1702. width: 100%;
  1703. border: 1rpx solid red;
  1704. min-height: 100upx;
  1705. line-height: 20px;
  1706. }
  1707. page {
  1708. background: #f2f2f2;
  1709. }
  1710. .flex-x {
  1711. display: flex;
  1712. align-items: center;
  1713. }
  1714. .template_title,
  1715. .template_title1,
  1716. .template_title_list {
  1717. height: 90rpx;
  1718. background: #fff;
  1719. justify-content: space-between;
  1720. padding: 0 30rpx;
  1721. box-sizing: border-box;
  1722. }
  1723. .template_title1 {
  1724. background: none;
  1725. }
  1726. .template_title_list {
  1727. margin-bottom: 4rpx;
  1728. }
  1729. .template_title>view,
  1730. .template_title1>view {
  1731. font-size: 32rpx;
  1732. color: #8f8f8f;
  1733. flex-shrink: 0;
  1734. margin-right: 20rpx;
  1735. }
  1736. .template_title>input {
  1737. font-size: 28rpx;
  1738. color: #808080;
  1739. text-align: right;
  1740. flex-grow: 1;
  1741. }
  1742. /* 添加内容 */
  1743. .add_con>text {
  1744. font-size: 40rpx;
  1745. color: #f16765;
  1746. display: block;
  1747. margin-right: 20rpx;
  1748. margin-left: 10rpx;
  1749. line-height: 44rpx;
  1750. }
  1751. .add_con>view {
  1752. font-size: 32rpx;
  1753. color: #7885cb;
  1754. }
  1755. /* 删除内容 */
  1756. .del {
  1757. font-size: 32rpx;
  1758. color: #f16765;
  1759. margin-right: 14rpx;
  1760. padding: 20rpx;
  1761. }
  1762. input {
  1763. flex-grow: 1;
  1764. font-size: 28rpx;
  1765. color: #808080;
  1766. }
  1767. // .container {
  1768. // display: flex;
  1769. // align-items: center;
  1770. // justify-content: space-between;
  1771. // padding: 10px;
  1772. // position: relative;
  1773. // }
  1774. // .uni-list {
  1775. // border: 1xp solid #eee;
  1776. // }
  1777. // .to-right-icon {
  1778. // width: 15px;
  1779. // height: 15px;
  1780. // position: absolute;
  1781. // top: 50%;
  1782. // transform: translateY(-50%);
  1783. // }
  1784. // .text {
  1785. // font-size: 16px;
  1786. // color: #333;
  1787. // }
  1788. // .background {
  1789. // // border: 15px solid hsla(0, 0%, 100%, .5);
  1790. // background: white;
  1791. // background-clip: padding-box;
  1792. // padding: 20rpx;
  1793. // border-radius: 20rpx;
  1794. // margin: 20rpx;
  1795. // /*从padding开始往外面裁剪背景*/
  1796. // }
  1797. // .btn {
  1798. // width: 715rpx;
  1799. // height: 69rpx;
  1800. // background: #79A4F0;
  1801. // border-radius: 6rpx;
  1802. // font-size: 25rpx;
  1803. // font-family: Microsoft YaHei;
  1804. // font-weight: 400;
  1805. // color: #FFFFFF;
  1806. // line-height: 69rpx;
  1807. // margin-top: 40rpx;
  1808. // margin-bottom: 100rpx;
  1809. // }
  1810. // .number {
  1811. // display: flex;
  1812. // /* 水平居中显示子元素 */
  1813. // align-items: flex-start;
  1814. // /* 垂直居中显示子元素 */
  1815. // justify-content: space-between;
  1816. // /* 左右间距等于间距大小 */
  1817. // padding: 10px;
  1818. // /* 设置padding以提高视觉效果 */
  1819. // }
  1820. // .textarea {
  1821. // margin-top: 10upx;
  1822. // width: 100%;
  1823. // border: 1rpx solid red;
  1824. // min-height: 100upx;
  1825. // line-height: 20px;
  1826. // }
  1827. </style>