indoor.vue 71 KB

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