indoor.vue 56 KB

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