indoor.vue 56 KB

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