indoor.vue 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127
  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. }
  561. },
  562. created() {
  563. },
  564. onLoad(options) {
  565. if ('params' in options) {
  566. this.objValue = JSON.parse(decodeURIComponent(options.params));
  567. if (this.objValue.enginType == `old_renovation`) {
  568. this.title = '旧改工程-室内'
  569. } else if (this.objValue.enginType == `new_built`) {
  570. this.title = '新建工程-室内'
  571. }
  572. uni.setNavigationBarTitle({
  573. title: this.title
  574. })
  575. }
  576. },
  577. methods: {
  578. copyAddress() {
  579. if (uni.getStorageSync('XZQValue') != {}) {
  580. this.type = 'xzq';
  581. this.changeSelectDict(uni.getStorageSync('XZQValue'));
  582. }
  583. if (uni.getStorageSync('XQValue') != {}) {
  584. this.type = 'xq';
  585. this.changeSelect(uni.getStorageSync('XQValue'))
  586. }
  587. if (uni.getStorageSync('LDValue') != {}) {
  588. this.type = 'ld';
  589. this.changeSelect(uni.getStorageSync('LDValue'))
  590. }
  591. if (uni.getStorageSync('DYValue') != {}) {
  592. this.type = 'dy';
  593. this.changeSelect(uni.getStorageSync('DYValue'))
  594. }
  595. if (uni.getStorageSync('FJValue') != {}) {
  596. this.type = 'fj';
  597. this.changeSelect(uni.getStorageSync('FJValue'))
  598. }
  599. },
  600. //判断是否选择
  601. isEmpty(str) {
  602. return (!str || 0 === str.length);
  603. },
  604. change1() {
  605. this.change = !this.change
  606. },
  607. // 显示历史弹窗
  608. handleShowSheet() {
  609. this.shareState = true;
  610. },
  611. // 隐藏历史弹窗
  612. handleHiddenShare() {
  613. this.shareState = false;
  614. },
  615. showPhoto(index) {
  616. uni.previewImage({
  617. current: index,
  618. urls: this.imgArr,
  619. })
  620. },
  621. remove(index) {
  622. uni.showModal({
  623. title: '提示',
  624. content: '是否删除该图片或视频?',
  625. success: (res) => {
  626. if (res.confirm) {
  627. this.imgArr.splice(index, 1)
  628. if (this.imgArr.length <= 0) {
  629. this.photo = true;
  630. }
  631. }
  632. }
  633. })
  634. },
  635. choose() {
  636. let _this = this;
  637. uni.showActionSheet({
  638. title: '上传',
  639. itemList: ['图片', '视频'],
  640. success: (res) => {
  641. if (res.tapIndex == 0) {
  642. this.chooseimage()
  643. } else {
  644. this.choosevideo()
  645. }
  646. }
  647. })
  648. },
  649. chooseimage() {
  650. let _this = this;
  651. uni.chooseImage({
  652. sourceType: this.objValue.enginType == `old_renovation` ? ['camera'] : ['album', 'camera'],
  653. success(resp) {
  654. resp.tempFiles.forEach((item, index) => {
  655. const task = uni.uploadFile({
  656. url: _this.$HTTP + `/obs`,
  657. filePath: item.path,
  658. name: 'file',
  659. formData: {},
  660. header: _this.headers,
  661. success: res => {
  662. // 判断是否json字符串,将其转为json格式
  663. // let data = _this.$u.test.jsonString(res
  664. // .data) ? JSON.parse(res.data) : res.data;
  665. let data = JSON.parse(res.data);
  666. if (![200].includes(data.code)) {
  667. // this.uploadError(index, data);
  668. _this.$modal.msg(data.msg)
  669. } else {
  670. if (_this.progress === 100) {
  671. _this.imgArr.push(data.data.url)
  672. _this.$modal.msg('上传成功!')
  673. _this.photo = false;
  674. }
  675. }
  676. },
  677. fail: e => {
  678. _this.$modal.msg('上传失败!')
  679. //_this.uploadError(index, e);
  680. },
  681. complete: res => {
  682. uni.hideLoading();
  683. _this.uploading = false;
  684. }
  685. });
  686. task.onProgressUpdate(res => {
  687. _this.progress = res.progress;
  688. uni.showLoading({
  689. title: '上传中'
  690. })
  691. if (_this.progress != 100) {
  692. _this.loading = false
  693. } else {
  694. _this.loading = true
  695. }
  696. });
  697. })
  698. },
  699. })
  700. },
  701. choosevideo() {
  702. let _this = this;
  703. uni.chooseVideo({
  704. sourceType: this.objValue.enginType == `old_renovation` ? ['camera'] : ['album', 'camera'],
  705. maxDuration: 30,
  706. success(resp) {
  707. const task = uni.uploadFile({
  708. url: _this.$HTTP + `/obs`,
  709. filePath: resp.tempFilePath,
  710. name: 'file',
  711. formData: {},
  712. header: _this.headers,
  713. success: res => {
  714. // 判断是否json字符串,将其转为json格式
  715. let data = JSON.parse(res.data);
  716. if (![200].includes(res.statusCode)) {
  717. this.uploadError(index, data);
  718. } else {
  719. //上传成功
  720. if (_this.progress === 100) {
  721. _this.imgArr.push(data.data.url)
  722. _this.$modal.msg('上传成功!')
  723. _this.photo = false;
  724. }
  725. }
  726. },
  727. fail: e => {
  728. _this.$modal.msg('上传失败!')
  729. this.uploadError(index, e);
  730. },
  731. complete: res => {
  732. uni.hideLoading();
  733. _this.uploading = false;
  734. }
  735. });
  736. task.onProgressUpdate(res => {
  737. _this.progress = res.progress;
  738. uni.showLoading({
  739. title: '上传中'
  740. })
  741. if (_this.progress != 100) {
  742. _this.loading = false
  743. } else {
  744. _this.loading = true
  745. }
  746. });
  747. },
  748. })
  749. },
  750. pickerShow(e) {
  751. this.type = e; //赋值类型
  752. if (e == 'door') { //上门类型
  753. this.openDict = true;
  754. getDicts("visit_type").then(response => {
  755. this.dictOptions = response.data;
  756. });
  757. } else if (e == 'zbf') { //自闭阀类型
  758. this.open = true;
  759. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
  760. .objValue.enginClassValue, '自闭阀厂家').then(response => {
  761. this.selectList = response.data;
  762. });
  763. } else if (e == 'brand') { //品牌
  764. this.open = true;
  765. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
  766. .objValue.enginClassValue).then(response => {
  767. this.selectList = response.data;
  768. });
  769. } else if (e == 'cz') { //材质
  770. this.open = true;
  771. if (this.objValue.enginClassValue == '阀管') {
  772. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification,
  773. this
  774. .objValue.enginClassValue, "灶具管厂家").then(response => {
  775. this.selectList = response.data;
  776. });
  777. } else {
  778. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification,
  779. this
  780. .objValue.enginClassValue).then(response => {
  781. this.selectList = response.data;
  782. });
  783. }
  784. } else if (e == 'gg') { //规格
  785. if (this.isEmpty(this.materialValue.id)) {
  786. if (this.objValue.enginClassValue == '阀管') {
  787. this.$modal.msg('请选择灶具管厂家')
  788. } else {
  789. this.$modal.msg('请选择材质')
  790. }
  791. } else {
  792. this.open = true;
  793. this.selectList = this.materialList;
  794. }
  795. } else if (e == 'fsdj') {
  796. this.open = true;
  797. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
  798. .objValue.enginClassValue).then(response => {
  799. this.selectList = response.data;
  800. });
  801. } else if (e == 'kj') {
  802. //孔距
  803. this.open = true;
  804. getEnginMaterialQualityList("民用工程", this.objValue.enginType, this.objValue.enginClassification, this
  805. .objValue.enginClassValue).then(response => {
  806. this.selectList = response.data;
  807. });
  808. } else if (e == 'gczq') { //工程周期
  809. this.openDict = true;
  810. getDicts("engin_cycle").then(response => {
  811. this.dictOptions = response.data;
  812. });
  813. } else if (e == 'xzq') { //行政区
  814. if (this.isEmpty(this.projectValue.dictValue)) {
  815. this.$modal.msg('请选择工程周期')
  816. } else {
  817. this.openDict = true;
  818. getDicts("district").then(response => {
  819. this.dictOptions = response.data;
  820. });
  821. }
  822. //this.selectList = this.dictOptions;
  823. } else if (e == 'xq') { //小区
  824. if (this.isEmpty(this.XZQValue.dictValue)) {
  825. getAreaList('').then(res => {
  826. this.XQList = res.data;
  827. this.open = true;
  828. this.selectList = this.XQList;
  829. })
  830. } else {
  831. getAreaList(this.XZQValue.dictValue).then(res => {
  832. this.XQList = res.data;
  833. this.selectList = this.XQList;
  834. this.open = true;
  835. })
  836. }
  837. } else if (e == 'ld') { //楼栋
  838. if (this.isEmpty(this.XQValue.id)) {
  839. this.$modal.msg('请选择小区')
  840. } else {
  841. getBuildingList(this.XQValue.id).then(res => {
  842. this.LDList = res.data
  843. this.selectList = this.LDList;
  844. this.open = true;
  845. })
  846. }
  847. } else if (e == 'dy') { //单元
  848. if (this.isEmpty(this.LDValue.id)) {
  849. this.$modal.msg('请选择楼栋')
  850. } else {
  851. getUnitList(this.LDValue.id).then(res => {
  852. this.DYList = res.data
  853. this.selectList = this.DYList;
  854. this.open = true;
  855. })
  856. }
  857. } else if (e == 'fj') { //房间
  858. if (this.isEmpty(this.DYValue.id)) {
  859. this.$modal.msg('请选择单元')
  860. } else {
  861. getHousesList(this.DYValue.id).then(res => {
  862. this.FJList = res.data
  863. this.selectList = this.FJList;
  864. this.open = true;
  865. })
  866. }
  867. }
  868. },
  869. switchChange(e) {
  870. //'switch 发生 change 事件,携带值为', e.detail.value)
  871. this.isCheck = e.detail.value;
  872. },
  873. changeSelectDict(item, index) {
  874. this.openDict = false;
  875. if (this.type == 'door') {
  876. this.doorValue = item
  877. } else if (this.type == 'gczq') {
  878. this.projectValue = item
  879. if (!this.isEmpty(this.FJValue.id)) {
  880. //房间选完 判断 工程周期 工程周期切换
  881. this.getStatus();
  882. }
  883. } else if (this.type == 'xzq') {
  884. this.XZQValue = item;
  885. //根据行政区id获取小区数据
  886. this.XQValue = ''; //重置小区数据
  887. this.LDValue = ''; //重置楼栋数据
  888. this.DYValue = ''; //重置单元数据
  889. this.FJValue = ''; //重置房间数据
  890. this.currentResidentsPhoe = [];
  891. //this.historyName = "";
  892. this.houseHeadName = "";
  893. this.houseHeadPhone = "";
  894. this.houseHeadIDcardNumber = "";
  895. this.administrative = "";
  896. }
  897. },
  898. changeSelect(item, index) {
  899. // this.index = index;
  900. // this.address = item.communityName;
  901. this.open = false;
  902. if (this.type == 'cz') {
  903. this.materialValue = item;
  904. this.specificationValue = ''; //重置规格
  905. //根据材质ID 获取规格数据
  906. getEnginSpecificationsList(item.id).then(res => {
  907. this.materialList = res.data
  908. })
  909. } else if (this.type == 'gg') {
  910. this.specificationValue = item;
  911. } else if (this.type == 'xq') {
  912. this.XZQValue = {
  913. dictValue: item.district,
  914. dictLabel: item.districtName,
  915. };
  916. this.XQValue = item;
  917. //根据小区id 获取楼栋数据
  918. this.LDValue = ''; //重置楼栋数据
  919. this.DYValue = ''; //重置单元数据
  920. this.FJValue = ''; //重置房间数据
  921. this.currentResidentsPhoe = [];
  922. //this.historyName = "";
  923. this.houseHeadName = "";
  924. this.houseHeadPhone = "";
  925. this.houseHeadIDcardNumber = "";
  926. this.administrative = item.administrative;
  927. } else if (this.type == 'ld') {
  928. this.LDValue = item;
  929. //根据楼栋ID 获取单元数据
  930. this.DYValue = ''; //重置单元数据
  931. this.FJValue = ''; //重置房间数据
  932. this.currentResidentsPhoe = [];
  933. //this.historyName = "";
  934. this.houseHeadName = "";
  935. this.houseHeadPhone = "";
  936. this.houseHeadIDcardNumber = "";
  937. } else if (this.type == 'dy') {
  938. this.DYValue = item;
  939. //根据单元数据 获取房间数据
  940. this.FJValue = ''; //重置房间数据
  941. this.currentResidentsPhoe = [];
  942. //this.historyName = "";
  943. this.houseHeadName = "";
  944. this.houseHeadPhone = "";
  945. this.houseHeadIDcardNumber = "";
  946. } else if (this.type == 'fj') {
  947. this.FJValue = item;
  948. //this.history();
  949. this.houseHeadName = item.houseUserName;
  950. this.houseHeadPhone = item.phone;
  951. this.houseHeadIDcardNumber = item.idCard;
  952. this.currentResidentsPhoe = [];
  953. if (!this.isEmpty(item.newPhone)) {
  954. let str = item.newPhone;
  955. var array = str.split(",");
  956. array.forEach((list) => {
  957. this.currentResidentsPhoe.push({
  958. phone: list
  959. })
  960. })
  961. }
  962. if (!this.isEmpty(this.projectValue.id)) {
  963. //房间选完 判断 工程周期
  964. this.getStatus();
  965. }
  966. } else if (this.type == 'zbf') {
  967. this.SelfClosValve = item
  968. } else if (this.type == 'brand') {
  969. this.brandValue = item
  970. } else {
  971. this.LevelValue = item;
  972. }
  973. },
  974. //关闭弹窗
  975. close(e) {
  976. this.open = false
  977. },
  978. //关闭弹窗
  979. closeDict(e) {
  980. this.openDict = false
  981. },
  982. getStatus() {
  983. let param = {
  984. areaId: this.XQValue.id, // 小区id
  985. buildingId: this.LDValue.id, // 楼宇id
  986. unitId: this.DYValue.id, // 单元id
  987. houseId: this.FJValue.id, // 房间id
  988. enginCycle: this.projectValue.id, // 工程周期
  989. enginType: this.objValue.enginType, //写死 上一页面传过来的
  990. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  991. }
  992. getRoomProjectId(param).then(res => {
  993. if (res.code == '200') {
  994. if (res.data != null && res.data.zEngineeringNodeBoList != null) {
  995. res.data.zEngineeringNodeBoList.forEach((item, index) => {
  996. if (this.objValue.enginClassValue == item.type) {
  997. this.reviewStatus = item.reviewStatus;
  998. if (item.reviewStatus == '1')
  999. this.$modal.msg('当前工程已结束')
  1000. }
  1001. })
  1002. } else {
  1003. this.reviewStatus = '' //置空
  1004. }
  1005. } else {
  1006. this.$modal.msg(res.msg)
  1007. this.reviewStatus = '' //置空
  1008. }
  1009. })
  1010. },
  1011. serchByCard() {
  1012. if (this.isEmpty(this.idCard)) {
  1013. this.$modal.msg("请输入身份证号码")
  1014. return
  1015. }
  1016. if (!this.$validation.idCard(this.idCard)) {
  1017. this.$modal.msg("身份证号码格式不正确")
  1018. return
  1019. }
  1020. getRoomDetailsIDCard(this.idCard).then(res => {
  1021. if (res.code == '200' && res.data != null) {
  1022. if (!this.isEmpty(res.data.newPhone)) {
  1023. this.currentResidentsPhoe = [];
  1024. let str = res.data.newPhone;
  1025. var array = str.split(",");
  1026. array.forEach((list) => {
  1027. this.currentResidentsPhoe.push({
  1028. phone: list
  1029. })
  1030. })
  1031. }
  1032. this.houseHeadName = res.data.houseUserName;
  1033. this.houseHeadIDcardNumber = res.data.idCard;
  1034. this.houseHeadPhone = res.data.phone;
  1035. this.XZQValue = {
  1036. dictValue: res.data.district,
  1037. dictLabel: res.data.districtName
  1038. };
  1039. this.XQValue = {
  1040. id: res.data.areaId,
  1041. name: res.data.areaName
  1042. }
  1043. this.LDValue = {
  1044. id: res.data.buildingId,
  1045. name: res.data.buildingName
  1046. }
  1047. this.DYValue = {
  1048. id: res.data.unitId,
  1049. name: res.data.unitName
  1050. }
  1051. this.FJValue = {
  1052. id: res.data.id,
  1053. name: res.data.name
  1054. }
  1055. getAreaList(this.XZQValue.dictValue).then(res => {
  1056. this.XQList = res.data;
  1057. })
  1058. getBuildingList(this.XQValue.id).then(res => {
  1059. this.LDList = res.data
  1060. })
  1061. getUnitList(this.LDValue.id).then(res => {
  1062. this.DYList = res.data
  1063. })
  1064. getHousesList(this.DYValue.id).then(res => {
  1065. this.FJList = res.data
  1066. })
  1067. }
  1068. })
  1069. },
  1070. //提交数据
  1071. submit(e) {
  1072. this.tempState = e == 'submit' ? '' : '99'
  1073. if (this.isEmpty(this.projectValue.dictValue)) {
  1074. this.$modal.msg("请选择工程周期")
  1075. return
  1076. }
  1077. if (this.isEmpty(this.XZQValue.dictValue)) {
  1078. this.$modal.msg("请选择行政区")
  1079. return
  1080. }
  1081. if (this.isEmpty(this.XQValue.id)) {
  1082. this.$modal.msg("请选择小区")
  1083. return
  1084. }
  1085. if (this.isEmpty(this.LDValue.id)) {
  1086. this.$modal.msg("请选择楼栋")
  1087. return
  1088. }
  1089. if (this.isEmpty(this.DYValue.id)) {
  1090. this.$modal.msg("请选择单元")
  1091. return
  1092. }
  1093. if (this.isEmpty(this.FJValue.id)) {
  1094. this.$modal.msg("请选择房间")
  1095. return
  1096. }
  1097. if (this.isEmpty(this.BuildingName)) {
  1098. this.$modal.msg('请输入现住楼栋')
  1099. return
  1100. }
  1101. if (this.isEmpty(this.UnintName)) {
  1102. this.$modal.msg('请输入现住单元')
  1103. return
  1104. }
  1105. if (this.isEmpty(this.RoomName)) {
  1106. this.$modal.msg('请输入现住号')
  1107. return
  1108. }
  1109. if (this.currentResidentsPhoe.length <= 0) {
  1110. this.$modal.msg('现住人电话不能为空');
  1111. return
  1112. }
  1113. try {
  1114. this.currentResidentsPhoe.forEach((list) => {
  1115. if (this.isEmpty(list.phone)) {
  1116. this.$modal.msg('现住人电话不能为空')
  1117. throw new Error('End Loop')
  1118. }
  1119. if (list.phone.length == 11 || list.phone.length == 8) {} else {
  1120. this.$modal.msg('现住人电话填写错误')
  1121. throw new Error('End Loop')
  1122. }
  1123. })
  1124. } catch (e) {
  1125. if (e.message === 'End Loop') throw e
  1126. }
  1127. uni.setStorageSync("XZQValue", this.XZQValue)
  1128. uni.setStorageSync("XQValue", this.XQValue)
  1129. uni.setStorageSync("LDValue", this.LDValue)
  1130. uni.setStorageSync("DYValue", this.DYValue)
  1131. this.FJValue.newPhone = this.currentResidentsPhoe.map(item => item.phone).join();
  1132. uni.setStorageSync("FJValue", this.FJValue)
  1133. if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue == '切断阀') {
  1134. if (e == 'submit') {
  1135. if (this.isEmpty(this.brandValue.id)) {
  1136. this.$modal.msg("请选择厂家")
  1137. } else {
  1138. //this.onsubmit(e);
  1139. const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith(
  1140. '.png') || item
  1141. .endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
  1142. .endsWith('.JPEG'));
  1143. const hasVideo = this.imgArr.some(item => item.endsWith('.mp4') || item.endsWith('.MP4'));
  1144. if (hasImage && hasVideo) {
  1145. this.onsubmit(e);
  1146. } else {
  1147. this.$modal.msg('请至少上传一张照片和一个视频')
  1148. }
  1149. }
  1150. } else {
  1151. this.onsubmit(e); //暂存
  1152. }
  1153. } else if (this.objValue.enginClassValue == '打孔') {
  1154. // if (this.isEmpty(this.LevelValue.id)) {
  1155. // this.$modal.msg("请选择孔距") //打孔 判断孔距
  1156. // } else {
  1157. this.onsubmit(e);
  1158. //}
  1159. } else if (this.objValue.enginClassValue == '拆旧管') {
  1160. if (e == 'submit') {
  1161. if (this.isEmpty(this.LevelValue.id)) {
  1162. this.$modal.msg("请选择腐蚀等级") //拆旧管 判断腐蚀等级
  1163. } else {
  1164. this.onsubmit(e);
  1165. }
  1166. } else {
  1167. this.onsubmit(e); //暂存
  1168. }
  1169. } else if (this.objValue.enginClassValue == '立杠') {
  1170. //立杠 判断 材质 规格 米数
  1171. if (e == 'submit') {
  1172. if (this.isEmpty(this.materialValue.id)) {
  1173. this.$modal.msg("请选择材质")
  1174. } else if (this.isEmpty(this.specificationValue.id)) {
  1175. this.$modal.msg("请选择规格")
  1176. } else if (this.isEmpty(this.inputIntegerNumberValue)) {
  1177. this.$modal.msg("请输入米数")
  1178. } else {
  1179. if (this.isEmpty(this.inputDecimalNumberValue)) {
  1180. this.inputNumberValue = this.inputIntegerNumberValue;
  1181. } else {
  1182. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  1183. }
  1184. this.onsubmit(e);
  1185. }
  1186. } else {
  1187. this.onsubmit(e); //暂存
  1188. }
  1189. } else if (this.objValue.enginClassValue == '挂表') {
  1190. //挂表 判断 品牌
  1191. if (e == 'submit') {
  1192. if (this.isEmpty(this.brandValue.id)) {
  1193. this.$modal.msg("请选择品牌")
  1194. } else {
  1195. this.onsubmit(e);
  1196. }
  1197. } else {
  1198. this.onsubmit(e);
  1199. }
  1200. } else if (this.objValue.enginClassValue == '表后管') {
  1201. //表后管 判断 材质 规格 米数 (为必须有一张照片和一个视频)
  1202. if (e == 'submit') {
  1203. if (this.isEmpty(this.materialValue.id)) {
  1204. this.$modal.msg("请选择材质")
  1205. } else if (this.isEmpty(this.specificationValue.id)) {
  1206. this.$modal.msg("请选择规格")
  1207. } else if (this.isEmpty(this.inputIntegerNumberValue)) {
  1208. this.$modal.msg("请输入米数")
  1209. } else {
  1210. const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith(
  1211. '.png') || item
  1212. .endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
  1213. .endsWith('.JPEG'));
  1214. const hasVideo = this.imgArr.some(item => item.endsWith('.mp4') || item.endsWith('.MP4'));
  1215. if (hasImage && hasVideo) {
  1216. //表后管
  1217. this.againSubmitBHG();
  1218. } else {
  1219. this.$modal.msg('请至少上传一张照片和一个视频')
  1220. }
  1221. }
  1222. } else {
  1223. //暂存
  1224. this.againSubmitBHG();
  1225. }
  1226. } else if (this.objValue.enginClassValue == '阀管') {
  1227. //阀管 判断 材质 规格 米数
  1228. if (e == 'submit') {
  1229. if (this.isEmpty(this.doorValue.dictValue)) {
  1230. this.$modal.msg("请选择上门类型")
  1231. } else if (this.isEmpty(this.SelfClosValve.id)) {
  1232. this.$modal.msg("请选择自闭阀厂家")
  1233. } else if (this.isEmpty(this.materialValue.id)) {
  1234. this.$modal.msg("请选择灶具管厂家")
  1235. } else if (this.isEmpty(this.specificationValue.id)) {
  1236. this.$modal.msg("请选择规格")
  1237. } else {
  1238. if (this.isEmpty(this.inputDecimalNumberValue)) {
  1239. this.inputNumberValue = this.inputIntegerNumberValue;
  1240. } else {
  1241. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  1242. }
  1243. this.onsubmit(e);
  1244. }
  1245. } else {
  1246. this.onsubmit(e); //暂存
  1247. }
  1248. }
  1249. },
  1250. onsubmit(e) {
  1251. if (e == 'submit') {
  1252. if (this.imgArr.length <= 0) {
  1253. this.$modal.msg('请上传照片或视频')
  1254. return
  1255. }
  1256. }
  1257. // else if (this.loading == false) {
  1258. // this.$modal.msg('照片或视频未上传完毕,无法提交!')
  1259. // }
  1260. //else {
  1261. let phoneArr = [];
  1262. this.currentResidentsPhoe.forEach((list) => {
  1263. phoneArr.push(list.phone)
  1264. })
  1265. let AddressStr = this.XQValue.name + this.BuildingName + '栋' + this.UnintName + '单元' + this.RoomName + '号';
  1266. putRoomDetails(this.FJValue.id, phoneArr.join(),AddressStr)
  1267. .then(res => {
  1268. if (res.code == '200') {
  1269. this.againSubmit();
  1270. }
  1271. })
  1272. //}
  1273. },
  1274. againSubmitBHG() {
  1275. //表后管 特殊 提交
  1276. if (this.isEmpty(this.inputDecimalNumberValue)) {
  1277. this.inputNumberValue = this.inputIntegerNumberValue;
  1278. } else {
  1279. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  1280. }
  1281. let phoneArr = [];
  1282. this.currentResidentsPhoe.forEach((list) => {
  1283. phoneArr.push(list.phone)
  1284. })
  1285. let AddressStr = this.XQValue.name + this.BuildingName + '栋' + this.UnintName + '单元' + this.RoomName + '号';
  1286. putRoomDetails(this.FJValue.id, phoneArr.join(),AddressStr)
  1287. .then(res => {
  1288. if (res.code == '200') {
  1289. let param = {
  1290. district: this.XZQValue.dictValue,
  1291. areaId: this.XQValue.id,
  1292. buildingId: this.LDValue.id,
  1293. unitId: this.DYValue.id,
  1294. houseId: this.FJValue.id,
  1295. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1296. enginClassification: this.objValue
  1297. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1298. enginCycle: this.projectValue.dictValue, //工程周期
  1299. zEngineeringNodeBo: {
  1300. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1301. zEngineeringInfoBo: {
  1302. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1303. state: this.tempState,
  1304. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1305. zEngineeringMaterialBo: [{
  1306. materialQuality: this.materialValue.id, //材质
  1307. specifications: this.specificationValue.id, //规格
  1308. number: this.inputNumberValue //米数
  1309. }]
  1310. }
  1311. }
  1312. }
  1313. uni.showLoading()
  1314. addTearOldPipe(param).then(res => {
  1315. if (res.code == '200') {
  1316. uni.hideLoading()
  1317. uni.showToast({
  1318. title: res.msg,
  1319. icon: 'none',
  1320. //显示持续时间为 1秒
  1321. duration: 1000
  1322. });
  1323. uni.navigateBack();
  1324. }
  1325. })
  1326. }
  1327. })
  1328. },
  1329. againSubmit() {
  1330. //提交
  1331. let param = '';
  1332. if (this.objValue.enginClassValue == '拆旧管' || this.objValue.enginClassValue ==
  1333. '打孔') { //拆旧管 打孔
  1334. param = {
  1335. district: this.XZQValue.dictValue,
  1336. areaId: this.XQValue.id,
  1337. buildingId: this.LDValue.id,
  1338. unitId: this.DYValue.id,
  1339. houseId: this.FJValue.id,
  1340. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1341. enginClassification: this.objValue
  1342. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1343. enginCycle: this.projectValue.dictValue, //工程周期
  1344. zEngineeringNodeBo: {
  1345. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1346. zEngineeringInfoBo: {
  1347. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1348. state: this.tempState,
  1349. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1350. zEngineeringMaterialBo: [{
  1351. corrosionLevel: this.LevelValue.id //腐蚀等级 //孔距
  1352. }]
  1353. }
  1354. }
  1355. }
  1356. //this.onsubmit(param)
  1357. } else if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue ==
  1358. '切断阀') { //报警器切断阀
  1359. param = {
  1360. district: this.XZQValue.dictValue,
  1361. areaId: this.XQValue.id,
  1362. buildingId: this.LDValue.id,
  1363. unitId: this.DYValue.id,
  1364. houseId: this.FJValue.id,
  1365. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1366. enginClassification: this.objValue
  1367. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1368. enginCycle: this.projectValue.dictValue, //工程周期
  1369. zEngineeringNodeBo: {
  1370. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1371. zEngineeringInfoBo: {
  1372. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1373. state: this.tempState,
  1374. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1375. zEngineeringMaterialBo: [{
  1376. brand: this.brandValue.id, //品牌
  1377. // number: this.inputNumberValue //米数
  1378. }]
  1379. }
  1380. }
  1381. }
  1382. } else if (this.objValue.enginClassValue == '立杠') { //立杠
  1383. param = {
  1384. district: this.XZQValue.dictValue,
  1385. areaId: this.XQValue.id,
  1386. buildingId: this.LDValue.id,
  1387. unitId: this.DYValue.id,
  1388. houseId: this.FJValue.id,
  1389. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1390. enginClassification: this.objValue
  1391. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1392. enginCycle: this.projectValue.dictValue, //工程周期
  1393. zEngineeringNodeBo: {
  1394. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1395. zEngineeringInfoBo: {
  1396. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1397. state: this.tempState,
  1398. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1399. zEngineeringMaterialBo: [{
  1400. materialQuality: this.materialValue.id, //材质
  1401. specifications: this.specificationValue.id, //规格
  1402. number: this.inputNumberValue //米数
  1403. }]
  1404. }
  1405. }
  1406. }
  1407. } else if (this.objValue.enginClassValue == '挂表') { //挂表
  1408. param = {
  1409. district: this.XZQValue.dictValue,
  1410. areaId: this.XQValue.id,
  1411. buildingId: this.LDValue.id,
  1412. unitId: this.DYValue.id,
  1413. houseId: this.FJValue.id,
  1414. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1415. enginClassification: this.objValue
  1416. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1417. enginCycle: this.projectValue.dictValue, //工程周期
  1418. zEngineeringNodeBo: {
  1419. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1420. zEngineeringInfoBo: {
  1421. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1422. state: this.tempState,
  1423. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1424. zEngineeringMaterialBo: [{
  1425. brand: this.brandValue.id, //品牌
  1426. //number: this.inputNumberValue //米数
  1427. }]
  1428. }
  1429. }
  1430. }
  1431. } else if (this.objValue.enginClassValue == '阀管') { //自闭阀
  1432. if (!this.isEmpty(this.specificationValue.name)) {
  1433. var onlyNumbers = this.specificationValue.name.replace(/[^\d.]/g, '');
  1434. }
  1435. param = {
  1436. district: this.XZQValue.dictValue,
  1437. areaId: this.XQValue.id,
  1438. buildingId: this.LDValue.id,
  1439. unitId: this.DYValue.id,
  1440. houseId: this.FJValue.id,
  1441. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1442. enginClassification: this.objValue
  1443. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1444. enginCycle: this.projectValue.dictValue, //工程周期
  1445. zEngineeringNodeBo: {
  1446. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1447. zEngineeringInfoBo: {
  1448. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1449. state: this.tempState,
  1450. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1451. zEngineeringMaterialBo: [{
  1452. visitType: this.doorValue.dictValue, //上门类型
  1453. selfClosingValveType: this.SelfClosValve.id, //自闭阀类型
  1454. materialQuality: this.materialValue.id, //材质
  1455. specifications: this.specificationValue.id, //规格
  1456. number: onlyNumbers //米数
  1457. }]
  1458. }
  1459. }
  1460. }
  1461. }
  1462. uni.showLoading()
  1463. addTearOldPipe(param).then(res => {
  1464. if (res.code == '200') {
  1465. uni.hideLoading()
  1466. uni.showToast({
  1467. title: res.msg,
  1468. icon: 'none',
  1469. //显示持续时间为 3秒
  1470. duration: 2000
  1471. });
  1472. setTimeout(function() {
  1473. uni.navigateBack();
  1474. }, 1000)
  1475. }
  1476. })
  1477. },
  1478. history() {
  1479. this.LevelValue = {};
  1480. this.imgArr = [];
  1481. this.materialValue = {};
  1482. this.specificationValue = {};
  1483. this.inputIntegerNumberValue = '';
  1484. this.inputDecimalNumberValue = '';
  1485. this.brandValue = {};
  1486. this.doorValue = {};
  1487. this.SelfClosValve = {};
  1488. if (this.isEmpty(this.projectValue.dictValue)) {
  1489. this.$modal.msg("请选择工程周期")
  1490. return
  1491. }
  1492. if (this.isEmpty(this.XZQValue.dictValue)) {
  1493. this.$modal.msg("请选择行政区")
  1494. return
  1495. }
  1496. if (this.isEmpty(this.XQValue.id)) {
  1497. this.$modal.msg("请选择小区")
  1498. return
  1499. }
  1500. if (this.isEmpty(this.LDValue.id)) {
  1501. this.$modal.msg("请选择楼栋")
  1502. return
  1503. }
  1504. if (this.isEmpty(this.DYValue.id)) {
  1505. this.$modal.msg("请选择单元")
  1506. return
  1507. }
  1508. if (this.isEmpty(this.FJValue.id)) {
  1509. this.$modal.msg("请选择房间")
  1510. return
  1511. }
  1512. let param = {
  1513. areaId: this.XQValue.id, // 小区id
  1514. buildingId: this.LDValue.id, // 楼宇id
  1515. unitId: this.DYValue.id, // 单元id
  1516. houseId: this.FJValue.id, // 房间id
  1517. enginCycle: this.projectValue.dictValue, // 工程周期
  1518. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1519. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1520. }
  1521. getRoomProjectId(param).then(res => {
  1522. if (res.code == '200') {
  1523. if (res.data != null) {
  1524. getRoomProjectList(res.data.id, this.objValue.enginClassValue).then(res => {
  1525. // this.historyName = res.data.zEngineeringNodeBo.reviewStatus == '0' ?
  1526. // '未通过' : '已通过'
  1527. // if (res.data.zEngineeringNodeBo.reviewStatus != null && res.data.zEngineeringNodeBo.reviewStatus == '99') {
  1528. // this.historyName = '恢复暂存';
  1529. // } else {
  1530. // this.historyName = '';
  1531. // }
  1532. this.historyList = res.data
  1533. if (res.data.zEngineeringNodeBo != null) {
  1534. if (res.data.zEngineeringNodeBo.reviewStatus == '1') {
  1535. // this.showHistoryList();
  1536. this.$modal.msg("当前步骤以审核通过请谨慎!")
  1537. } else if (res.data.zEngineeringNodeBo.reviewStatus == '99') {
  1538. let dataJson = res.data.zEngineeringNodeBo
  1539. .zEngineeringInfoBoList[0];
  1540. this.imgArr = dataJson.zEngiineeringPhotoBoList;
  1541. if (this.objValue.enginClassValue == '拆旧管') {
  1542. this.LevelValue.id = dataJson
  1543. .zEngineeringMaterialBo[0]
  1544. .corrosionLevel
  1545. this.LevelValue.name = dataJson
  1546. .zEngineeringMaterialBo[0]
  1547. .corrosionLevelName
  1548. } else if (this.objValue.enginClassValue == '立杠' || this.objValue
  1549. .enginClassValue == '表后管') {
  1550. this.materialValue.id = dataJson.zEngineeringMaterialBo[0].materialQuality;
  1551. if (!this.isEmpty(this.materialValue.id) && this.materialValue.id != null) {
  1552. //根据材质ID 获取规格数据
  1553. getEnginSpecificationsList(this.materialValue.id).then(res => {
  1554. this.materialList = res.data
  1555. })
  1556. }
  1557. this.specificationValue.id = dataJson
  1558. .zEngineeringMaterialBo[0]
  1559. .specifications;
  1560. this.materialValue.name = dataJson.zEngineeringMaterialBo[0]
  1561. .materialQualityName;
  1562. this.specificationValue.name = dataJson
  1563. .zEngineeringMaterialBo[0].specificationsName;
  1564. if (dataJson.zEngineeringMaterialBo[0].number != null) {
  1565. this.inputIntegerNumberValue = this.getIntegerPart(
  1566. dataJson
  1567. .zEngineeringMaterialBo[0].number, 0);
  1568. this.inputDecimalNumberValue = this.getIntegerPart(dataJson
  1569. .zEngineeringMaterialBo[0].number, 1);
  1570. }
  1571. } else if (this.objValue.enginClassValue == '报警器' || this.objValue
  1572. .enginClassValue == '切断阀' || this.objValue
  1573. .enginClassValue == '挂表') {
  1574. this.brandValue.id = dataJson.zEngineeringMaterialBo[0]
  1575. .brand
  1576. this.brandValue.name = dataJson.zEngineeringMaterialBo[0]
  1577. .brandName
  1578. } else if (this.objValue.enginClassValue == '阀管') {
  1579. this.doorValue.dictValue = dataJson
  1580. .zEngineeringMaterialBo[0]
  1581. .visitType;
  1582. this.doorValue.dictLabel = dataJson
  1583. .zEngineeringMaterialBo[0]
  1584. .visitType;
  1585. this.SelfClosValve.id = dataJson
  1586. .zEngineeringMaterialBo[0]
  1587. .selfClosingValveType;
  1588. this.SelfClosValve.name = dataJson
  1589. .zEngineeringMaterialBo[0]
  1590. .selfClosingValveTypeName;
  1591. this.materialValue.id = dataJson
  1592. .zEngineeringMaterialBo[0]
  1593. .materialQuality;
  1594. if (!this.isEmpty(this.materialValue.id) && this.materialValue.id != null) {
  1595. //根据材质ID 获取规格数据
  1596. getEnginSpecificationsList(this.materialValue.id).then(res => {
  1597. this.materialList = res.data
  1598. })
  1599. }
  1600. this.specificationValue.id = dataJson
  1601. .zEngineeringMaterialBo[0]
  1602. .specifications;
  1603. this.materialValue.name = dataJson.zEngineeringMaterialBo[0]
  1604. .materialQualityName;
  1605. this.specificationValue.name = dataJson
  1606. .zEngineeringMaterialBo[0].specificationsName;
  1607. }
  1608. } else {
  1609. this.$modal.msg("暂无暂存信息")
  1610. }
  1611. } else {
  1612. this.$modal.msg("暂无历史信息")
  1613. }
  1614. })
  1615. } else {
  1616. this.$modal.msg("暂无工程信息")
  1617. }
  1618. } else {
  1619. this.$modal.msg(res.msg)
  1620. }
  1621. })
  1622. },
  1623. getIntegerPart(numStr, i) {
  1624. if (numStr != null && numStr != undefined && numStr != '') {
  1625. return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
  1626. }
  1627. },
  1628. setInfoBoNumber(key, number, i) {
  1629. let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0]
  1630. .number;
  1631. let resAry = Ynumber.toString().split('.');
  1632. resAry[i] = number
  1633. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[0].number = resAry
  1634. .join('.');
  1635. },
  1636. showHistoryList() {
  1637. this.$refs.refShare.handleShowShare();
  1638. }
  1639. }
  1640. }
  1641. </script>
  1642. <style lang="scss">
  1643. .container-text {
  1644. display: flex;
  1645. align-items: center;
  1646. justify-content: space-between;
  1647. color: #b2b2b2;
  1648. position: relative;
  1649. }
  1650. .container {
  1651. display: flex;
  1652. align-items: center;
  1653. justify-content: space-between;
  1654. padding: 10px;
  1655. position: relative;
  1656. }
  1657. .uni-list {
  1658. border: 1xp solid #eee;
  1659. }
  1660. .to-right-icon {
  1661. width: 15px;
  1662. height: 15px;
  1663. position: absolute;
  1664. top: 50%;
  1665. transform: translateY(-50%);
  1666. }
  1667. .text {
  1668. font-size: 16px;
  1669. color: #333;
  1670. }
  1671. .background {
  1672. // border: 15px solid hsla(0, 0%, 100%, .5);
  1673. background: white;
  1674. background-clip: padding-box;
  1675. padding: 20rpx;
  1676. border-radius: 20rpx;
  1677. margin: 20rpx 10rpx;
  1678. /*从padding开始往外面裁剪背景*/
  1679. }
  1680. .btn {
  1681. width: 715rpx;
  1682. height: 69rpx;
  1683. background: #79A4F0;
  1684. border-radius: 6rpx;
  1685. font-size: 25rpx;
  1686. font-family: Microsoft YaHei;
  1687. font-weight: 400;
  1688. color: #FFFFFF;
  1689. line-height: 69rpx;
  1690. margin-top: 40rpx;
  1691. margin-bottom: 100rpx;
  1692. }
  1693. .number {
  1694. display: flex;
  1695. /* 水平居中显示子元素 */
  1696. align-items: flex-start;
  1697. /* 垂直居中显示子元素 */
  1698. justify-content: space-between;
  1699. /* 左右间距等于间距大小 */
  1700. padding: 10px;
  1701. /* 设置padding以提高视觉效果 */
  1702. }
  1703. .tj-btn {
  1704. height: 69rpx;
  1705. background: #3184f0;
  1706. border-radius: 6rpx;
  1707. font-size: 25rpx;
  1708. font-weight: 400;
  1709. color: #FFFFFF;
  1710. line-height: 69rpx;
  1711. margin: 40rpx 70rpx;
  1712. }
  1713. .sc-btn {
  1714. height: 69rpx;
  1715. background: #f0686b;
  1716. border-radius: 6rpx;
  1717. font-size: 25rpx;
  1718. font-weight: 400;
  1719. color: #FFFFFF;
  1720. line-height: 69rpx;
  1721. margin: 40rpx;
  1722. }
  1723. .num-style {
  1724. background: #e8f4f9;
  1725. margin: 20rpx;
  1726. padding: 10rpx;
  1727. border-radius: 20rpx;
  1728. border: 1px solid #d4e3f0;
  1729. }
  1730. .textarea {
  1731. margin-top: 10upx;
  1732. width: 100%;
  1733. border: 1rpx solid red;
  1734. min-height: 100upx;
  1735. line-height: 20px;
  1736. }
  1737. page {
  1738. background: #f2f2f2;
  1739. }
  1740. .flex-x {
  1741. display: flex;
  1742. align-items: center;
  1743. }
  1744. .template_title,
  1745. .template_title1,
  1746. .template_title_list {
  1747. height: 90rpx;
  1748. background: #fff;
  1749. justify-content: space-between;
  1750. padding: 0 30rpx;
  1751. box-sizing: border-box;
  1752. }
  1753. .template_title1 {
  1754. background: none;
  1755. }
  1756. .template_title_list {
  1757. margin-bottom: 4rpx;
  1758. }
  1759. .template_title>view,
  1760. .template_title1>view {
  1761. font-size: 32rpx;
  1762. color: #8f8f8f;
  1763. flex-shrink: 0;
  1764. margin-right: 20rpx;
  1765. }
  1766. .template_title>input {
  1767. font-size: 28rpx;
  1768. color: #808080;
  1769. text-align: right;
  1770. flex-grow: 1;
  1771. }
  1772. /* 添加内容 */
  1773. .add_con>text {
  1774. font-size: 40rpx;
  1775. color: #f16765;
  1776. display: block;
  1777. margin-right: 20rpx;
  1778. margin-left: 10rpx;
  1779. line-height: 44rpx;
  1780. }
  1781. .add_con>view {
  1782. font-size: 32rpx;
  1783. color: #7885cb;
  1784. }
  1785. /* 删除内容 */
  1786. .del {
  1787. font-size: 32rpx;
  1788. color: #f16765;
  1789. margin-right: 14rpx;
  1790. padding: 20rpx;
  1791. }
  1792. input {
  1793. flex-grow: 1;
  1794. font-size: 28rpx;
  1795. color: #808080;
  1796. }
  1797. // .container {
  1798. // display: flex;
  1799. // align-items: center;
  1800. // justify-content: space-between;
  1801. // padding: 10px;
  1802. // position: relative;
  1803. // }
  1804. // .uni-list {
  1805. // border: 1xp solid #eee;
  1806. // }
  1807. // .to-right-icon {
  1808. // width: 15px;
  1809. // height: 15px;
  1810. // position: absolute;
  1811. // top: 50%;
  1812. // transform: translateY(-50%);
  1813. // }
  1814. // .text {
  1815. // font-size: 16px;
  1816. // color: #333;
  1817. // }
  1818. // .background {
  1819. // // border: 15px solid hsla(0, 0%, 100%, .5);
  1820. // background: white;
  1821. // background-clip: padding-box;
  1822. // padding: 20rpx;
  1823. // border-radius: 20rpx;
  1824. // margin: 20rpx;
  1825. // /*从padding开始往外面裁剪背景*/
  1826. // }
  1827. // .btn {
  1828. // width: 715rpx;
  1829. // height: 69rpx;
  1830. // background: #79A4F0;
  1831. // border-radius: 6rpx;
  1832. // font-size: 25rpx;
  1833. // font-family: Microsoft YaHei;
  1834. // font-weight: 400;
  1835. // color: #FFFFFF;
  1836. // line-height: 69rpx;
  1837. // margin-top: 40rpx;
  1838. // margin-bottom: 100rpx;
  1839. // }
  1840. // .number {
  1841. // display: flex;
  1842. // /* 水平居中显示子元素 */
  1843. // align-items: flex-start;
  1844. // /* 垂直居中显示子元素 */
  1845. // justify-content: space-between;
  1846. // /* 左右间距等于间距大小 */
  1847. // padding: 10px;
  1848. // /* 设置padding以提高视觉效果 */
  1849. // }
  1850. // .textarea {
  1851. // margin-top: 10upx;
  1852. // width: 100%;
  1853. // border: 1rpx solid red;
  1854. // min-height: 100upx;
  1855. // line-height: 20px;
  1856. // }
  1857. </style>