indoor.vue 69 KB

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