indoor.vue 70 KB

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