apply-clients 3.4.76 → 3.4.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/package.json +1 -1
  2. package/src/components/product/Ignition/IgnitionListManage.vue +420 -420
  3. package/src/components/product/Process/Service/ServiceControl.vue +1928 -1928
  4. package/src/filiale/hongda/pc/ServiceView.vue +1037 -1037
  5. package/dist-android/static/0.68b45dd6665d95e65c33.js +0 -2
  6. package/dist-android/static/1.80d8977616c7c12b7af9.js +0 -1
  7. package/dist-android/static/10.f5b38719cf759cdaf30b.js +0 -2
  8. package/dist-android/static/11.da9d1dc6b3d3b0afdfb0.js +0 -2
  9. package/dist-android/static/12.0a445de8782b0c9e90bf.js +0 -1
  10. package/dist-android/static/13.922509a433e667a476e5.js +0 -1
  11. package/dist-android/static/14.db06181765d81baf5cbb.js +0 -1
  12. package/dist-android/static/15.0d662b8ce36cc983f55f.js +0 -1
  13. package/dist-android/static/16.02ffeb80c794d52cc05b.js +0 -1
  14. package/dist-android/static/17.9df21714d8510c924622.js +0 -1
  15. package/dist-android/static/18.23870c83910093244c4d.js +0 -1
  16. package/dist-android/static/19.05a7de4086cdeaf941a3.js +0 -1
  17. package/dist-android/static/2.a8212d24013b8aff0e90.js +0 -1
  18. package/dist-android/static/20.77ef8859683206c4053b.js +0 -1
  19. package/dist-android/static/21.7a2b8cbdd87e750bb68c.js +0 -1
  20. package/dist-android/static/22.fcb6d54375cc2aed8d8a.js +0 -1
  21. package/dist-android/static/23.2a43413ded0c53f046b0.js +0 -1
  22. package/dist-android/static/24.773855dfeab42a232778.js +0 -1
  23. package/dist-android/static/25.4144e5e465dfe1930e8a.js +0 -1
  24. package/dist-android/static/27.92303edf5e513839988d.js +0 -13
  25. package/dist-android/static/28.ec077b1393009a6ac91d.js +0 -3
  26. package/dist-android/static/29.6519a95fc0f8cf001aca.js +0 -3
  27. package/dist-android/static/3.d03c06455952af580398.js +0 -1
  28. package/dist-android/static/30.da90dfe911c6c930a460.js +0 -2
  29. package/dist-android/static/31.7510bed78757fe6f5429.js +0 -1
  30. package/dist-android/static/32.4fde305b2f004b2f8ae6.js +0 -1
  31. package/dist-android/static/33.b7c4eebaca777a1739cc.js +0 -2
  32. package/dist-android/static/34.b8fce20028dae1fe22c7.js +0 -1
  33. package/dist-android/static/35.bacc1f42bc3aaba3f6c1.js +0 -1
  34. package/dist-android/static/36.be29bd4ca2eee30d18d3.js +0 -1
  35. package/dist-android/static/37.b6b19986f63d12cb6583.js +0 -1
  36. package/dist-android/static/38.fce6d8c12747a01dd095.js +0 -1
  37. package/dist-android/static/39.a559012aafe7aff96d0d.js +0 -1
  38. package/dist-android/static/4.4aafc84956e965362a8c.js +0 -13
  39. package/dist-android/static/40.61ff080ce5dea5d201d5.js +0 -1
  40. package/dist-android/static/41.7029304a3d33521ca1c6.js +0 -1
  41. package/dist-android/static/42.de71132c19548f6f89a7.js +0 -1
  42. package/dist-android/static/43.4eca68b0f272638b9797.js +0 -1
  43. package/dist-android/static/44.321d337802ce2f113887.js +0 -1
  44. package/dist-android/static/45.f0b260e67c4cdb5845aa.js +0 -1
  45. package/dist-android/static/46.3d8bf661bd9d1167ddce.js +0 -1
  46. package/dist-android/static/47.d3039cbe7ef9270019b8.js +0 -1
  47. package/dist-android/static/48.612417d81cafc13f8142.js +0 -1
  48. package/dist-android/static/49.fba314518cbdab8a90e7.js +0 -1
  49. package/dist-android/static/5.0d01bce56926c132aa6b.js +0 -13
  50. package/dist-android/static/50.486e579f125840977f43.js +0 -1
  51. package/dist-android/static/51.8324ad7f396f978a05e8.js +0 -1
  52. package/dist-android/static/52.886647248ac26f5140db.js +0 -1
  53. package/dist-android/static/53.93a2ccb1a3130abfa79e.js +0 -1
  54. package/dist-android/static/54.0a74c8035e75eeb595c5.js +0 -1
  55. package/dist-android/static/55.9976fa21f7ddcfdfc4a0.js +0 -1
  56. package/dist-android/static/56.219c17b93279098dbddb.js +0 -1
  57. package/dist-android/static/57.8492d8c5c99205b55dc7.js +0 -1
  58. package/dist-android/static/58.312d1b2ee57d0d64b52f.js +0 -2
  59. package/dist-android/static/59.2d4f7176b27424e3009e.js +0 -1
  60. package/dist-android/static/6.bce74f8df7973b9c7451.js +0 -13
  61. package/dist-android/static/60.12567cf9aff324a95a7d.js +0 -1
  62. package/dist-android/static/61.66e9834fbb82ee452f8e.js +0 -2
  63. package/dist-android/static/62.328ba82e50967bd864f6.js +0 -1
  64. package/dist-android/static/63.19e45135d67e7e7026bd.js +0 -2
  65. package/dist-android/static/64.a43534ecf2a1a17a1314.js +0 -1
  66. package/dist-android/static/65.c51325b67a704bcf87d4.js +0 -1
  67. package/dist-android/static/66.6def8535daa57eac38fe.js +0 -1
  68. package/dist-android/static/67.1263ab1b5bf1005070a7.js +0 -1
  69. package/dist-android/static/68.bf2224572c3cd510c532.js +0 -1
  70. package/dist-android/static/69.d5b8358203dfa6e4cc62.js +0 -1
  71. package/dist-android/static/7.39164eae605d873940b6.js +0 -13
  72. package/dist-android/static/70.b129fa555a5a7daaf0a8.js +0 -1
  73. package/dist-android/static/71.503ac7365bb788a3c2ba.js +0 -1
  74. package/dist-android/static/72.f46bd9238f50d475747b.js +0 -1
  75. package/dist-android/static/73.d33ed35134b25f21bc08.js +0 -1
  76. package/dist-android/static/74.be31f1b4d678ba6e0387.js +0 -1
  77. package/dist-android/static/75.41da68b38db6400ed47f.js +0 -1
  78. package/dist-android/static/76.6323b38d846ed3faf8e3.js +0 -1
  79. package/dist-android/static/77.002152fa076232e2a7ef.js +0 -1
  80. package/dist-android/static/78.589f59b4c82a65920bce.js +0 -1
  81. package/dist-android/static/79.cd5521b0b7b86d567459.js +0 -1
  82. package/dist-android/static/8.667600d040abe33aa1d4.js +0 -13
  83. package/dist-android/static/80.f3549dbf5a1b23a294a1.js +0 -1
  84. package/dist-android/static/81.ca2ec2b72e1b4449853c.js +0 -1
  85. package/dist-android/static/82.2bdcb170eaa5bdee9aaf.js +0 -1
  86. package/dist-android/static/83.a168d74f18a60c9b2a67.js +0 -1
  87. package/dist-android/static/84.772e2e67ba55134fec9a.js +0 -1
  88. package/dist-android/static/85.8680fd727f1e68d8b5f1.js +0 -1
  89. package/dist-android/static/86.1532b3659b8c032df0a3.js +0 -1
  90. package/dist-android/static/87.3c45f14e992d0d0de21a.js +0 -1
  91. package/dist-android/static/88.34c3d55993269cb4bee7.js +0 -1
  92. package/dist-android/static/89.8c0cd296c36febba47d6.js +0 -1
  93. package/dist-android/static/9.7f2db78822a32aaa40cd.js +0 -13
  94. package/dist-android/static/90.6534c9442526cb9627b6.js +0 -1
  95. package/dist-android/static/91.67ac346acb5c96fc6c7e.js +0 -1
  96. package/dist-android/static/appf2f018d386daaf983c8f.js +0 -136
  97. package/dist-android/static/doc.jpg +0 -0
  98. package/dist-android/static/dwg.png +0 -0
  99. package/dist-android/static/images/lefticon/anjianjihua.png +0 -0
  100. package/dist-android/static/images/lefticon/danganguanli.png +0 -0
  101. package/dist-android/static/images/lefticon/shouqishoufei.png +0 -0
  102. package/dist-android/static/images/lefticon/wulianwang.png +0 -0
  103. package/dist-android/static/images/lefticon/xitongguanli.png +0 -0
  104. package/dist-android/static/images/lefticon/yingyechaxun.png +0 -0
  105. package/dist-android/static/images/lefticon/yuyinkefu.png +0 -0
  106. package/dist-android/static/images/lefticon/zongheyewu.png +0 -0
  107. package/dist-android/static/images/lefticon//345/215/241/346/234/215/345/212/241/347/256/241/347/220/206.png +0 -0
  108. package/dist-android/static/images/lefticon//345/220/210/345/220/214/347/256/241/347/220/206.png +0 -0
  109. package/dist-android/static/images/lefticon//345/233/276/345/261/2023/346/213/267/350/264/2354.png +0 -0
  110. package/dist-android/static/images/lefticon//345/233/276/345/261/202577.png +0 -0
  111. package/dist-android/static/images/lefticon//345/233/276/345/261/2028/346/213/267/350/264/23513.png +0 -0
  112. package/dist-android/static/images/lefticon//345/256/211/346/243/200/350/256/241/345/210/222.png +0 -0
  113. package/dist-android/static/images/lefticon//345/276/256/344/277/241/346/234/215/345/212/241.png +0 -0
  114. package/dist-android/static/images/lefticon//346/212/245/345/273/272/347/263/273/347/273/237.png +0 -0
  115. package/dist-android/static/images/lefticon//346/212/245/350/241/250/346/237/245/350/257/242.png +0 -0
  116. package/dist-android/static/images/lefticon//346/227/245/345/270/270/347/256/241/347/220/206.png +0 -0
  117. package/dist-android/static/images/lefticon//346/234/272/350/241/250/347/256/241/347/220/206.png +0 -0
  118. package/dist-android/static/images/lefticon//346/237/245/350/257/242/345/210/227/350/241/250.png +0 -0
  119. package/dist-android/static/images/lefticon//347/263/273/347/273/237/350/256/276/347/275/256.png +0 -0
  120. package/dist-android/static/images/lefticon//347/273/217/350/220/245/347/256/241/346/216/247.png +0 -0
  121. package/dist-android/static/images/lefticon//347/273/274/345/220/210/344/270/232/345/212/241.png +0 -0
  122. package/dist-android/static/images/lefticon//347/273/274/345/220/210/346/237/245/350/257/242.png +0 -0
  123. package/dist-android/static/images/lefticon//350/217/234/345/215/225/344/274/270/347/274/251.png +0 -0
  124. package/dist-android/static/images/lefticon//351/200/200/345/207/272/347/263/273/347/273/237.png +0 -0
  125. package/dist-android/static/images/lefticonNew//345/215/241/346/234/215/345/212/241/347/256/241/347/220/206.png +0 -0
  126. package/dist-android/static/images/lefticonNew//345/220/210/345/220/214/347/256/241/347/220/206.png +0 -0
  127. package/dist-android/static/images/lefticonNew//345/221/274/345/217/253/347/263/273/347/273/237.png +0 -0
  128. package/dist-android/static/images/lefticonNew//345/224/256/346/260/224/346/224/266/350/264/271.png +0 -0
  129. package/dist-android/static/images/lefticonNew//345/233/276/345/261/2023/346/213/267/350/264/2354.png +0 -0
  130. package/dist-android/static/images/lefticonNew//345/233/276/345/261/202577.png +0 -0
  131. package/dist-android/static/images/lefticonNew//345/233/276/345/261/2028/346/213/267/350/264/23513.png +0 -0
  132. package/dist-android/static/images/lefticonNew//345/256/211/346/243/200/346/237/245/347/234/213.png +0 -0
  133. package/dist-android/static/images/lefticonNew//345/256/211/346/243/200/350/256/241/345/210/222.png +0 -0
  134. package/dist-android/static/images/lefticonNew//345/276/256/344/277/241/346/234/215/345/212/241.png +0 -0
  135. package/dist-android/static/images/lefticonNew//346/212/245/345/273/272/347/263/273/347/273/237.png +0 -0
  136. package/dist-android/static/images/lefticonNew//346/212/245/350/241/250/346/237/245/350/257/242.png +0 -0
  137. package/dist-android/static/images/lefticonNew//346/227/245/345/270/270/347/256/241/347/220/206.png +0 -0
  138. package/dist-android/static/images/lefticonNew//346/234/272/350/241/250/347/256/241/347/220/206.png +0 -0
  139. package/dist-android/static/images/lefticonNew//346/237/245/350/257/242/345/210/227/350/241/250.png +0 -0
  140. package/dist-android/static/images/lefticonNew//346/241/243/346/241/210/347/256/241/347/220/206.png +0 -0
  141. package/dist-android/static/images/lefticonNew//347/211/251/350/201/224/347/275/221/350/241/250.png +0 -0
  142. package/dist-android/static/images/lefticonNew//347/263/273/347/273/237/347/256/241/347/220/206.png +0 -0
  143. package/dist-android/static/images/lefticonNew//347/263/273/347/273/237/350/256/276/347/275/256.png +0 -0
  144. package/dist-android/static/images/lefticonNew//347/273/217/350/220/245/347/256/241/346/216/247.png +0 -0
  145. package/dist-android/static/images/lefticonNew//347/273/274/345/220/210/344/270/232/345/212/241.png +0 -0
  146. package/dist-android/static/images/lefticonNew//347/273/274/345/220/210/346/237/245/350/257/242.png +0 -0
  147. package/dist-android/static/images/lefticonNew//350/217/234/345/215/225/344/274/270/347/274/251.png +0 -0
  148. package/dist-android/static/images/lefticonNew//351/200/200/345/207/272/347/263/273/347/273/237.png +0 -0
  149. package/dist-android/static/imgerror.jpg +0 -0
  150. package/dist-android/static/jsoneditor-icons.svg +0 -893
  151. package/dist-android/static/newStyle/clear.png +0 -0
  152. package/dist-android/static/newStyle/fife.png +0 -0
  153. package/dist-android/static/newStyle/hidden.png +0 -0
  154. package/dist-android/static/newStyle/label-clear.png +0 -0
  155. package/dist-android/static/newStyle/left-img.png +0 -0
  156. package/dist-android/static/newStyle/list_ok.png +0 -0
  157. package/dist-android/static/newStyle/login-check.png +0 -0
  158. package/dist-android/static/newStyle/login-con.png +0 -0
  159. package/dist-android/static/newStyle/login-do.gif +0 -0
  160. package/dist-android/static/newStyle/login-f.png +0 -0
  161. package/dist-android/static/newStyle/login-info.png +0 -0
  162. package/dist-android/static/newStyle/login-left.png +0 -0
  163. package/dist-android/static/newStyle/login-org.png +0 -0
  164. package/dist-android/static/newStyle/login-pwd.png +0 -0
  165. package/dist-android/static/newStyle/login-user.png +0 -0
  166. package/dist-android/static/newStyle/loginbg.gif +0 -0
  167. package/dist-android/static/newStyle/loginbg1280.gif +0 -0
  168. package/dist-android/static/newStyle/loginbg1366.gif +0 -0
  169. package/dist-android/static/newStyle/setting.png +0 -0
  170. package/dist-android/static/newStyle/setting1.png +0 -0
  171. package/dist-android/static/newStyle/shirk.png +0 -0
  172. package/dist-android/static/newStyle/stretch_bottom.png +0 -0
  173. package/dist-android/static/newStyle/stretch_left.png +0 -0
  174. package/dist-android/static/newStyle/stretch_right.png +0 -0
  175. package/dist-android/static/newStyle/stretch_top.png +0 -0
  176. package/dist-android/static/newStyle/system-off.png +0 -0
  177. package/dist-android/static/pdf.jpg +0 -0
  178. package/dist-android/static//344/270/213/350/275/275/350/256/241/345/210/222.png +0 -0
  179. package/dist-android/static//344/273/273/345/212/241/346/237/245/350/257/242.png +0 -0
  180. package/dist-android/static//344/277/241/346/201/257/345/205/254/345/221/212.png +0 -0
  181. package/dist-android/static//345/205/254/345/221/212/346/237/245/347/234/213.png +0 -0
  182. package/dist-android/static//345/206/214/345/206/205/351/241/272/345/272/217/344/277/256/346/224/271.png +0 -0
  183. package/dist-android/static//345/215/241/350/241/250/345/234/250/347/272/277/346/212/204/350/241/250.png +0 -0
  184. package/dist-android/static//345/220/210/345/220/214/347/255/276/350/256/242.png +0 -0
  185. package/dist-android/static//345/234/250/347/272/277/345/256/211/346/243/200.png +0 -0
  186. package/dist-android/static//345/234/250/347/272/277/345/267/241/346/243/200.png +0 -0
  187. package/dist-android/static//345/234/250/347/272/277/346/212/204/350/241/250.png +0 -0
  188. package/dist-android/static//345/234/250/347/272/277/346/212/242/344/277/256.png +0 -0
  189. package/dist-android/static//345/234/250/347/272/277/346/212/245/350/243/205.png +0 -0
  190. package/dist-android/static//345/234/250/347/272/277/346/223/215/344/275/234.png +0 -0
  191. package/dist-android/static//345/234/250/347/272/277/347/273/264/344/277/256.png +0 -0
  192. package/dist-android/static//345/234/250/347/272/277/347/274/264/350/264/271.png +0 -0
  193. package/dist-android/static//345/234/250/347/272/277/351/200/232/346/260/224.png +0 -0
  194. package/dist-android/static//345/256/211/346/243/200/345/267/262/345/212/236.png +0 -0
  195. package/dist-android/static//345/256/211/346/243/200/345/276/205/345/212/236.png +0 -0
  196. package/dist-android/static//345/256/211/346/243/200/346/212/275/345/215/225.png +0 -0
  197. package/dist-android/static//345/256/211/346/243/200/347/273/264/344/277/256/346/226/275/345/267/245.png +0 -0
  198. package/dist-android/static//345/256/211/350/243/205/344/270/212/344/274/240.png +0 -0
  199. package/dist-android/static//345/256/211/350/243/205/345/267/262/345/212/236.png +0 -0
  200. package/dist-android/static//345/256/211/350/243/205/345/276/205/345/212/236.png +0 -0
  201. package/dist-android/static//345/256/236/345/220/215/350/256/244/350/257/201.png +0 -0
  202. package/dist-android/static//345/256/242/346/234/215/347/256/241/347/220/206.png +0 -0
  203. package/dist-android/static//345/267/241/346/243/200/344/270/212/344/274/240.png +0 -0
  204. package/dist-android/static//345/267/241/346/243/200/345/267/262/345/212/236.png +0 -0
  205. package/dist-android/static//345/267/245/347/250/213/346/212/245/344/273/267.png +0 -0
  206. package/dist-android/static//345/267/245/347/250/213/346/226/275/345/267/245.png +0 -0
  207. package/dist-android/static//345/267/245/347/250/213/346/264/276/345/267/245.png +0 -0
  208. package/dist-android/static//345/267/245/347/250/213/351/230/237/346/264/276/345/267/245.png +0 -0
  209. package/dist-android/static//345/274/200/345/205/263/351/230/200.png +0 -0
  210. package/dist-android/static//345/275/242/347/212/2664.png +0 -0
  211. package/dist-android/static//346/211/271/351/207/217/346/212/204/350/241/250.png +0 -0
  212. package/dist-android/static//346/212/204/350/241/250/344/270/212/344/274/240.png +0 -0
  213. package/dist-android/static//346/212/204/350/241/250/345/267/262/345/212/236.png +0 -0
  214. package/dist-android/static//346/212/204/350/241/250/345/276/205/345/212/236.png +0 -0
  215. package/dist-android/static//346/212/204/350/241/250/350/256/260/345/275/225.png +0 -0
  216. package/dist-android/static//346/212/245/345/273/272/346/234/215/345/212/241.png +0 -0
  217. package/dist-android/static//346/224/266/350/264/271/346/261/207/346/200/273/350/241/250.png +0 -0
  218. package/dist-android/static//346/224/266/350/264/271/350/256/260/345/275/225.png +0 -0
  219. package/dist-android/static//346/226/275/345/267/245/344/277/241/346/201/257.png +0 -0
  220. package/dist-android/static//346/227/245/346/212/245/346/237/245/350/257/242.png +0 -0
  221. package/dist-android/static//346/241/243/346/241/210/344/277/256/346/224/271.png +0 -0
  222. package/dist-android/static//346/265/201/347/250/213/344/270/232/345/212/241.png +0 -0
  223. package/dist-android/static//346/265/201/347/250/213/347/233/221/346/216/247.png +0 -0
  224. package/dist-android/static//347/216/260/345/234/272/345/213/230/345/257/237.png +0 -0
  225. package/dist-android/static//347/233/221/347/220/206/345/215/225/344/275/215/346/264/276/345/267/245.png +0 -0
  226. package/dist-android/static//347/247/273/345/212/250/346/212/204/350/241/250.png +0 -0
  227. package/dist-android/static//347/247/273/345/212/250/346/212/204/350/241/250/345/267/262/345/212/236.png +0 -0
  228. package/dist-android/static//347/273/237/350/256/241/346/212/245/350/241/250.png +0 -0
  229. package/dist-android/static//347/273/264/344/277/256/346/264/276/345/215/225.png +0 -0
  230. package/dist-android/static//350/220/245/344/270/232/345/233/276/350/241/250.png +0 -0
  231. package/dist-android/static//350/241/250/345/206/214/351/241/272/345/272/217.png +0 -0
  232. package/dist-android/static//350/260/203/344/273/267/350/241/245/345/267/256/347/274/264/350/264/271.png +0 -0
  233. package/dist-android/static//350/277/233/345/272/246/345/210/227/350/241/250.png +0 -0
  234. package/dist-android/static//351/200/200/345/207/272/347/231/273/345/275/225.png +0 -0
  235. package/dist-android/static//351/200/201/346/260/224/344/270/212/344/274/240.png +0 -0
  236. package/dist-android/static//351/200/201/346/260/224/345/267/262/345/212/236.png +0 -0
  237. package/dist-android/static//351/200/201/346/260/224/345/276/205/345/212/236.png +0 -0
  238. package/dist-android/static//351/200/232/346/260/224/347/202/271/347/201/253.png +0 -0
  239. package/dist-android/static//351/232/220/346/202/243/345/244/204/347/220/206.png +0 -0
  240. package/dist-android/static//351/233/206/344/270/255/345/256/211/346/243/200.png +0 -0
  241. package/dist-android/static//351/253/230/345/257/206/345/205/254/345/221/212.png +0 -0
@@ -1,1928 +1,1928 @@
1
- <template>
2
- <div class="" v-if="showview">
3
- <show-back-reason :selectdata="show_data"></show-back-reason>
4
- <service-view v-ref:serviceview :data="show_data"></service-view>
5
- </div>
6
- </template>
7
- <script>
8
- import Vue from 'vue'
9
- import {HttpResetClass} from 'vue-client'
10
- import {isEmpty} from "../../../Util";
11
-
12
- // Date格式化
13
- Date.prototype.Format = function (fmt) {
14
- var o = {
15
- "M+": this.getMonth() + 1, //月份
16
- "d+": this.getDate(), //日
17
- "H+": this.getHours(), //小时
18
- "m+": this.getMinutes(), //分
19
- "s+": this.getSeconds(), //秒
20
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
21
- "S": this.getMilliseconds() //毫秒
22
- };
23
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
24
- for (var k in o)
25
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
26
- return fmt;
27
- }
28
-
29
- export default {
30
- title: '报建流程业务控制层',
31
- props: ['selectdata'],
32
- data () {
33
- return {
34
- data: null, // 数据库数据,json配置文件数据的数据集合
35
- json_datas: null, // Json配置文件集合
36
- showview: false, // 控制显示service-view组件
37
- show_data: null, // 给view层显示的数据
38
- config: {},
39
- Pricetype:''
40
- }
41
- },
42
- ready () {
43
- this.refurbish()
44
- },
45
- methods: {
46
- async servicer(){
47
- let data = {
48
- tablename: 't_user',
49
- condition: `1=1`
50
- }
51
- let http = new HttpResetClass()
52
- let res = await http.load(
53
- 'POST',
54
- `rs/sql/apply_singleTable`,
55
- {data: data},
56
- {resolveMsg: null, rejectMsg: '服务人查询失败!!!'}
57
- )
58
- this.setLabelOptions('服务人', res.data.map(item => {
59
- return {
60
- label: item.name,
61
- value: item.name
62
- }
63
- }))
64
- },
65
- async ceshi(){
66
- for (let i = 0; i < this.show_data.fields.length; i++) {
67
- if (this.show_data.defname==='报装申请' && this.show_data.fields[i].label === '合同编号') {
68
- debugger
69
- let http2 = new HttpResetClass()
70
- let applyNum = await http2.load('POST', 'rs/logic/getProjectNo', {
71
- data: {
72
- f_filiale: this.$login.f.orgs,
73
- f_order_id: this.selectdata.f_order_id
74
- }
75
- }, {resolveMsg: null, rejectMsg: null})
76
- debugger
77
- console.log("生成的合同编号为:" + applyNum.data)
78
- this.show_data.fields[i].value = applyNum.data
79
- }
80
- }
81
- },
82
-
83
- // 组件初始化操作
84
- async refurbish() {
85
- this.json_datas = this.$workflow_vue
86
- let sum = 0
87
- let jsonData = {}
88
- if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
89
- this.$showMessage("网络故障,请刷新页面")
90
- return
91
- }
92
- this.json_datas.activitys.forEach(item => {
93
- if (this.selectdata.defname === item.title) {
94
- jsonData = item // 拿到当前节点的json配置信息
95
- sum++ // 节点名一样的个数
96
- }
97
- return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
98
- })
99
-
100
- if (sum === 0) {
101
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
102
- return
103
- }
104
- if (sum > 1) {
105
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
106
- return
107
- }
108
-
109
- this.selectdata = Object.assign({}, this.selectdata, jsonData)
110
-
111
- // fields 字段填充值
112
- for (const item of this.selectdata.fields) {
113
- if (!item.value) {
114
- item.value = null
115
- }
116
- if(this.selectdata.f_apply_type === '集体报建' && this.selectdata.defname === '报装缴费'){
117
- if(item.label === '未结总金额'){
118
- item.value = this.selectdata.f_due_money - this.selectdata.f_cumulative_payment_money
119
- }
120
- if(item.label === '付款比例'){
121
- item.value = (this.selectdata.f_cumulative_payment_money/this.selectdata.f_due_money * 100) + '%'
122
- }
123
- }
124
- if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
125
- if (item.eval) {
126
- item.value = eval(item.default)
127
- } else {
128
- item.value = item.default
129
- }
130
- }
131
-
132
- if (this.selectdata[item.field]) {
133
- // 将json字符串格式化赋值给value
134
- if (String(this.selectdata[item.field]).startsWith("{")) {
135
- item.value = JSON.parse(this.selectdata[item.field])
136
- } else {
137
- item.value = this.selectdata[item.field]
138
- }
139
- }
140
- if (this.selectdata[item.field] === 0) {
141
- item.value = 0
142
- }
143
-
144
- // datepicker
145
- if (item.type === 'datepicker' && !item.value && item.default) {
146
- item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
147
- }
148
- // 如果配置类型为select,优先从参数列表获取options
149
- if (item.type === 'select' || item.type === 'checkbox') {
150
- if (item.param) {
151
- let temp = this.$appdata.getParam(item.label)
152
-
153
- if (temp && temp.length > 0) {
154
- item.options = temp
155
- }
156
-
157
- if (item.paramLabel) {
158
- temp = this.$appdata.getParam(item.paramLabel)
159
- if (temp && temp.length > 0) {
160
- item.options = temp
161
- }
162
- }
163
- }
164
-
165
- if (item.ready) {
166
- console.log(item.ready)
167
- item.options = await this[item.ready]()
168
-
169
- }
170
- }
171
-
172
-
173
- if (item.type === 'checkbox') {
174
- if (this.selectdata[item.field]) {
175
- item.value = JSON.parse(this.selectdata[item.field])
176
- } else {
177
- item.value = []
178
- }
179
- }
180
-
181
- this.selectdata[item.field] = item.value
182
- }
183
-
184
- // 控制组件
185
- if (this.selectdata.components) {
186
- this.selectdata.components.forEach(item => {
187
- if (!item.mark) {
188
- item.mark = 0
189
- }
190
- })
191
- }
192
- // 初始化onetomany
193
- if (this.selectdata.onetomany) {
194
- for (const item of this.selectdata.onetomany) {
195
- let res = null
196
- if (item.queryEvent) {
197
- res = this[item.queryEvent]()
198
- } else {
199
- let data = {
200
- tablename: item.tables[0],
201
- condition: `f_process_id='${this.selectdata.f_process_id}'`
202
- }
203
- res = await this.$resetpost(
204
- 'rs/sql/apply_singleTable',
205
- {data: data},
206
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
207
- )
208
- }
209
-
210
- item.rows = res.data
211
-
212
- // 初始化onetomany中的fields
213
- for (const field of item.fields) {
214
- if (!field.value) {
215
- if (field.value !== 0) {
216
- field.value = null
217
- }
218
- }
219
-
220
- if (field.default || field.default === 0) {
221
- field.value = field.default
222
- }
223
-
224
- // datepicker
225
- if (field.type === 'datepicker' && !field.value && field.default) {
226
- field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
227
- }
228
-
229
- if (field.type === 'select') {
230
-
231
- let temp = this.$appdata.getParam(field.label)
232
-
233
- if (temp && temp.length > 0) {
234
- field.options = temp
235
- }
236
-
237
- if (field.paramLabel) {
238
- temp = this.$appdata.getParam(field.paramLabel)
239
- if (temp && temp.length > 0) {
240
- item.options = temp
241
- }
242
- }
243
- }
244
- }
245
- }
246
- }
247
- // 初始化 buttons_fields
248
- for (const item of this.selectdata.buttons) {
249
- if (item.button_name === '下发') {
250
-
251
- let data = {
252
- source: item.source,
253
- userid: this.$login.f.id
254
- }
255
- if (item.sourceMethod) {
256
- data.source = this[item.sourceMethod]()
257
- }
258
- if (!data.source) {
259
- this.$showMessage("请配置获取人员表达式")
260
- return
261
- }
262
-
263
- let res = await this.$resetpost(
264
- 'rs/search',
265
- {data: data},
266
- {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
267
- )
268
-
269
- let options = res.data.map(source => {
270
- return {
271
- "label": source.name,
272
- "value": source.id
273
- }
274
- })
275
-
276
- if (item.button_fields.length !== 1) {
277
- this.$showMessage("下发有且只能有一个字段!!!")
278
- return
279
- }
280
-
281
- item.button_fields[0].options = options
282
- }
283
- if (item.button_fields) {
284
- item.button_fields.forEach(x => {
285
- // 如果配置类型为select,优先从参数列表获取options
286
- if (x.type === 'select') {
287
-
288
- if (x.param) {
289
- let temp = this.$appdata.getParam(x.label)
290
-
291
- if (temp && temp.length > 0) {
292
- x.options = temp
293
- }
294
-
295
- if (x.paramLabel) {
296
- temp = this.$appdata.getParam(x.paramLabel)
297
- if (temp && temp.length > 0) {
298
- x.options = temp
299
- }
300
- }
301
- }
302
-
303
- }
304
- })
305
- }
306
- }
307
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
308
- let temp = JSON.parse(JSON.stringify(this.selectdata))
309
- console.log('打印下temp',temp)
310
- this.show_data = temp
311
- this.$nextTick(() => {
312
- this.showview = true
313
- })
314
- },
315
- // 金额转大写
316
- smalltoBIG(n) {
317
- let fraction = ['角', '分'];
318
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
319
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
320
- let head = n < 0 ? '欠' : '';
321
- n = Math.abs(n);
322
-
323
- let s = '';
324
-
325
- for (var i = 0; i < fraction.length; i++) {
326
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
327
- }
328
- s = s || '整';
329
- n = Math.floor(n);
330
-
331
- for (var i = 0; i < unit[0].length && n > 0; i++) {
332
- let p = '';
333
- for (var j = 0; j < unit[1].length && n > 0; j++) {
334
- p = digit[n % 10] + unit[1][j] + p;
335
- n = Math.floor(n / 10);
336
- }
337
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
338
- }
339
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
340
- },
341
- getLableValue(label) {
342
- for (const item of this.show_data.fields) {
343
- if (item.label === label && item.type !== 'number') {
344
- return item.value || ''
345
- }
346
- if (item.label === label && item.type === 'number') {
347
- return item.value || 0
348
- }
349
- }
350
- },
351
- getLableOptions(label) {
352
- for (const item of this.show_data.fields) {
353
- if (item.label === label) {
354
- return item.options
355
- }
356
- }
357
- },
358
- setLabelValue(label, value) {
359
- for (const item of this.show_data.fields) {
360
- if (item.label === label) {
361
- item.value = value
362
- this.show_data[item.field] = value
363
- }
364
- }
365
- },
366
- setLabelOptions(label, options) {
367
- for (const item of this.show_data.fields) {
368
- if (item.label === label) {
369
- item.options = options
370
- }
371
- }
372
- },
373
- showLabels(...labels) {
374
- for (const item of this.show_data.fields) {
375
- if (labels.includes(item.label)) {
376
- item.hidden = false
377
- }
378
- }
379
- },
380
- hideLabels(...labels) {
381
- for (const item of this.show_data.fields) {
382
- if (labels.includes(item.label)) {
383
- item.hidden = true
384
- }
385
- }
386
- },
387
- requiredLabels(...labels) {
388
- for (const item of this.show_data.fields) {
389
- if (labels.includes(item.label)) {
390
- item.required = true
391
- }
392
- }
393
- },
394
- electiveLabels(...labels) {
395
- for (const item of this.show_data.fields) {
396
- if (labels.includes(item.label)) {
397
- item.required = false
398
- }
399
- }
400
- },
401
- readonlyLabels(...labels) {
402
- for (const item of this.show_data.fields) {
403
- if (labels.includes(item.label)) {
404
- item.readonly = true
405
- item.disabled = true
406
- }
407
- }
408
- },
409
- readwriteLabels(...labels) {
410
- for (const item of this.show_data.fields) {
411
- if (labels.includes(item.label)) {
412
- item.readonly = false
413
- item.disabled = false
414
- }
415
- }
416
- },
417
- disabledButtons(...buttons) {
418
- for (const item of this.show_data.buttons) {
419
- if (buttons.includes(item.button_name)) {
420
- item.disabled = true
421
- }
422
- }
423
- },
424
- enableButtons(...buttons) {
425
- for (const item of this.show_data.buttons) {
426
- if (buttons.includes(item.button_name)) {
427
- item.disabled = false
428
- }
429
- }
430
- },
431
- showButtons(...buttons) {
432
- for (const item of this.show_data.buttons) {
433
- if (buttons.includes(item.button_name)) {
434
- item.hidden = false
435
- }
436
- }
437
- },
438
- hideButtons(...buttons) {
439
- for (const item of this.show_data.buttons) {
440
- if (buttons.includes(item.button_name)) {
441
- item.hidden = true
442
- }
443
- }
444
- },
445
- async checkDuplicate(index) {
446
- let http = new HttpResetClass()
447
- let data = {
448
- tablename: 't_apply',
449
- condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
450
- }
451
- let res = await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {
452
- resolveMsg: null,
453
- rejectMsg: `${this.show_data.fields[index].label}查询失败`
454
- })
455
- if (res.data.length > 0) {
456
- this.show_data.fields[index].value = null
457
- this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
458
- }
459
- },
460
- // 获取片区
461
- async getSliceArea () {
462
- let data = {
463
- source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
464
- userid: this.$login.f.id
465
- }
466
-
467
- let http = new HttpResetClass()
468
- let res = await http.load(
469
- 'POST',
470
- `rs/search`,
471
- {data: data},
472
- {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
473
- )
474
-
475
- return res.data.map(item => {
476
- return {
477
- label: item.name,
478
- value: item.name
479
- }
480
- })
481
- },
482
- // 获取区县
483
- async getPcd () {
484
- let data = {
485
- tablename: 't_pcd',
486
- condition: `f_filialeid = '${this.$login.f.orgid}'`
487
- }
488
- let http = new HttpResetClass()
489
- let res = await http.load(
490
- 'POST',
491
- `rs/sql/apply_singleTable`,
492
- {data: data},
493
- {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
494
- )
495
-
496
- return res.data.map(item => {
497
- return {
498
- label: item.f_pcd,
499
- value: item.f_pcd
500
- }
501
- })
502
- },
503
- // 获取集收单位
504
- async getArea () {
505
- let data = {
506
- tablename: 't_area',
507
- condition: `f_filialeid = '${this.$login.f.orgid}'`
508
- }
509
- let http = new HttpResetClass()
510
- let res = await http.load(
511
- 'POST',
512
- `rs/sql/apply_singleTable`,
513
- {data: data},
514
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
515
- )
516
-
517
- return res.data.map(item => {
518
- return {
519
- label: item.f_residential_area,
520
- value: item.f_residential_area
521
- }
522
- })
523
- },
524
- // 缴费前置
525
- chargeBefore () {
526
- if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
527
- this.$showAlert('费用未结清!!!', 'warning', 3000)
528
- throw null
529
- }
530
- },
531
- // 施工前置 加表具后状态是待开通 提交后是正常 所以这里的判断条件需改正 (and uf.f_meter_classify is null and f_meternumber is null)
532
- async constructionBefore () {
533
- let http = new HttpResetClass()
534
- let data = {
535
- condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_meter_classify is null and f_meternumber is null`
536
- }
537
- let res = await http.load(
538
- 'POST',
539
- 'rs/sql/countApplyUserinfo',
540
- {data: data},
541
- {
542
- resolveMsg: null,
543
- rejectMsg: '安装明细查询失败!!!'
544
- })
545
- if (res.data[0].num > 0) {
546
- this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
547
- throw `还有${res.data[0].num}户未安装,无法提交`
548
- }
549
- },
550
- changePipeBuild () {
551
- if (this.selectdata.f_process_dep === '工程部') {
552
- return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
553
- }
554
- if (this.selectdata.f_process_dep === '运营部') {
555
- return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
556
- }
557
- return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
558
- },
559
- // async getDevInfo () {
560
- // let data = {
561
- // tablename: 't_dev_info',
562
- // condition: `f_orgid = '${this.$login.f.orgid}'`
563
- // }
564
- // let http = new HttpResetClass()
565
- // let res = await http.load(
566
- // 'POST',
567
- // `rs/sql/apply_singleTable`,
568
- // {data: data},
569
- // {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
570
- // )
571
- //
572
- // return res.data.map(item => {
573
- // return {
574
- // label: item.f_dev_name,
575
- // value: item.f_dev_name
576
- // }
577
- // })
578
- // },
579
- async getPrice (f_price_id) {
580
- console.log('=======================')
581
- console.log(f_price_id)
582
-
583
- let data = {
584
- condition: `sp.f_filialeid = '${this.$login.f.orgid}'`
585
- }
586
- // if(this.Pricetype==='机表'){
587
- // data.condition=`sp.f_custom = '机表'`
588
- // }
589
- // if(this.Pricetype==='非机表'){
590
- // data.condition=`sp.f_custom = '非机表'`
591
- // }
592
-
593
- if (!isEmpty(f_price_id)) {
594
- data.condition = `sp.f_filialeid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
595
- }
596
- let http = new HttpResetClass()
597
- let res = await http.load(
598
- 'POST',
599
- `rs/sql/applyGetPrice`,
600
- {data: data},
601
- {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
602
- )
603
-
604
- let a= res.data.map(item => {
605
- return {
606
- label: item.f_price_name,
607
- value: item
608
- }
609
- })
610
- this.selectdata.fields.forEach(field => {
611
- if (field.label === '气价名称') {
612
- field.options = a}
613
- })
614
- return a
615
- },
616
- addressInitialization () {
617
- this.$getConfig(this, 'UserAddress')
618
-
619
- let f_address_type = this.show_data.f_address_type
620
-
621
- for (const item of this.show_data.fields) {
622
- if (f_address_type === '民用市区') {
623
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
624
- item.hidden = false
625
- item.required = true
626
- }
627
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
628
- item.hidden = false
629
- item.required = false
630
- }
631
- if (item.label === '地址') {
632
- item.readonly = true
633
- }
634
- }
635
- if (f_address_type === '民用乡镇') {
636
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
637
- item.hidden = false
638
- item.required = true
639
- }
640
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
641
- item.hidden = false
642
- item.required = false
643
- }
644
- if (item.label === '楼层') {
645
- item.hidden = true
646
- item.required = false
647
- }
648
- if (item.label === '地址') {
649
- item.readonly = true
650
- }
651
- }
652
- if (f_address_type === '特殊地址') {
653
- if (item.label === '区/县' || item.label === '街道/乡镇') {
654
- item.hidden = false
655
- item.required = true
656
- }
657
- if (item.label === '集收单位') {
658
- item.hidden = false
659
- if (this.show_data.f_apply_type === '工商户报建'){
660
- item.required = false
661
- } else {
662
- item.required = false
663
- }
664
-
665
- }
666
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
667
- item.hidden = true
668
- item.required = false
669
- }
670
- if (item.label === '地址') {
671
- item.readonly = false
672
- }
673
- }
674
-
675
- if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
676
- item.hidden = true
677
- }
678
- }
679
- },
680
- async streetChange () {
681
- if (isEmpty(this.show_data.f_street)) {
682
- return
683
- }
684
-
685
- let data = {
686
- tablename: 't_area',
687
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
688
- }
689
- let http = new HttpResetClass()
690
- let res = await http.load(
691
- 'POST',
692
- `rs/sql/apply_singleTable`,
693
- {data: data},
694
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
695
- )
696
-
697
- this.setLabelOptions('集收单位', res.data.map(item => {
698
- return {
699
- label: item.f_residential_area,
700
- value: item.f_residential_area
701
- }
702
- }))
703
- },
704
- async pcdChange () {
705
- if (isEmpty(this.show_data.f_pcd)) {
706
- return
707
- }
708
-
709
- let data = {
710
- tablename: 't_street',
711
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
712
- }
713
- let f_address_type = this.getLableValue('地址类型')
714
-
715
- if (f_address_type === '民用市区') {
716
- data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
717
- }
718
- if (f_address_type === '民用乡镇') {
719
- data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
720
- }
721
-
722
- let http = new HttpResetClass()
723
- let res = await http.load(
724
- 'POST',
725
- `rs/sql/apply_singleTable`,
726
- {data: data},
727
- {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
728
- )
729
-
730
- this.setLabelOptions('街道/乡镇', res.data.map(item => {
731
- return {
732
- label: item.f_street,
733
- value: item.f_street
734
- }
735
- }))
736
- },
737
- async addressTips () {
738
- // console.log('======================='+this.show_data.f_apply_type)
739
- let res = ''
740
- if (this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') {
741
- res = await this.$showMessage('报警器报建下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
742
- }else{
743
- res = await this.$showMessage('增容改管下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
744
- }
745
- if (res == 'confirm') {
746
- return
747
- }
748
- throw '用户信息确认!!!'
749
- },
750
- async getDesignerPeople () {
751
- let data = {
752
- source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
753
- userid: this.$login.f.id
754
- }
755
-
756
- let http = new HttpResetClass()
757
- let res = await http.load(
758
- 'POST',
759
- `rs/search`,
760
- {data: data},
761
- {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
762
- )
763
-
764
- return res.data.map(item => {
765
- return {
766
- label: item.name,
767
- value: item.id
768
- }
769
- })
770
- },
771
- async surveyStopApply () {
772
- console.log('终止报建!!!!!')
773
-
774
- this.show_data.f_stop_reason = '现场勘察不符合报装条件'
775
-
776
- let data = {
777
- data: this.show_data,
778
- user: this.$login.f
779
- }
780
-
781
- let res = await this.$resetpost(
782
- `rs/logic/surveyStopApply`,
783
- {data: data},
784
- {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
785
- )
786
-
787
- this.$dispatch('loadPage')
788
-
789
- throw '终止报建!!!'
790
- },
791
- async contract_number() {
792
- console.log("进入编号合同编号生成",this.$login.f.orgs)
793
- let f_contract_number = ''
794
- const nowDate = new Date();
795
- const date = {
796
- year: nowDate.getFullYear(),
797
- month: nowDate.getMonth() + 1,
798
- day: nowDate.getDate()
799
- }
800
-
801
- function upperCaseChars(dir) {
802
- let string = '';
803
- switch (dir){
804
- case '周口市天然气有限公司':
805
- string = 'ZK' // 当表达式的结果等于 房产 时,则执行该代码
806
- break;
807
- case '项城市天然气有限公司':
808
- string = "XC" // 当表达式的结果等于 自建房 时,则执行该代码
809
- break;
810
- case '西华县天然气有限公司':
811
- string = 'XH' // 当表达式的结果等于 商业 时,则执行该代码
812
- break;
813
- case '鹿邑县天然气有限公司':
814
- string = 'LY' // 当表达式的结果等于 工业 时,则执行该代码
815
- break;
816
- case '郸城县天然气有限公司':
817
- string = 'DC' // 当表达式的结果等于 中压 时,则执行该代码
818
- break;
819
- case '测试公司(一)':
820
- string = 'CS' // 当表达式的结果等于 中压 时,则执行该代码
821
- break;
822
- case '甘泉县丰源天然气有限责任公司':
823
- string = 'GQ' // 当表达式的结果等于 中压 时,则执行该代码
824
- break;
825
- default : 'HT'
826
- break; // 如果没有与表达式相同的公司,则执行该代码
827
- }
828
- return string;
829
- }
830
-
831
- const dir = upperCaseChars(this.$login.f.orgs) //分公司
832
-
833
- let type = 0 //类型
834
-
835
- switch (this.show_data.f_entry_type){
836
- case '城区/县城':
837
- type = 1 // 当表达式的结果等于 城区 时,则执行该代码
838
- break;
839
- case '新农村':
840
- type = 2 // 当表达式的结果等于 新农村 时,则执行该代码
841
- break;
842
- case '测试':
843
- type = 3 // 当表达式的结果等于 新农村 时,则执行该代码
844
- break;
845
- default :
846
- break; // 如果没有与表达式相同的值,则执行该代码
847
- }
848
-
849
- let nature = 0 // 性质
850
- switch (this.show_data.f_apply_nature){
851
- case '楼房':
852
- nature = 1 // 当表达式的结果等于 楼房 时,则执行该代码
853
- break;
854
- case '房产':
855
- nature = 1 // 当表达式的结果等于 房产 时,则执行该代码
856
- break;
857
- case '自建房':
858
- nature = 2 // 当表达式的结果等于 自建房 时,则执行该代码
859
- break;
860
- case '商业':
861
- nature = 3 // 当表达式的结果等于 商业 时,则执行该代码
862
- break;
863
- case '学校':
864
- nature = 3 // 当表达式的结果等于 学校 时,则执行该代码
865
- break;
866
- case '福利机构':
867
- nature = 3 // 当表达式的结果等于 福利机构 时,则执行该代码
868
- break;
869
- case '其他':
870
- nature = 3 // 当表达式的结果等于 其他 时,则执行该代码
871
- break;
872
- case '工业':
873
- nature = 4 // 当表达式的结果等于 工业 时,则执行该代码
874
- break;
875
- case '中压':
876
- nature = 5 // 当表达式的结果等于 中压 时,则执行该代码
877
- break;
878
- case '测试':
879
- nature = 6 // 当表达式的结果等于 中压 时,则执行该代码
880
- break;
881
- default :
882
- break; // 如果没有与表达式相同的值,则执行该代码
883
- }
884
-
885
- const newMonth = date.month >= 10 ? date.month : '0' + date.month //月份
886
- const dataYm = date.year + '-01-01'
887
- const newYear = date.year + 1
888
- const year = date.year.toString().substring(2,4) //年份
889
-
890
- let data = {
891
- orgid: this.$login.f.orgid
892
- }
893
-
894
- let http = new HttpResetClass()
895
- let res = await http.load('POST', 'rs/sql/contractCount', {data:data}, {
896
- resolveMsg: null,
897
- rejectMsg: null
898
- })
899
- let oldDate
900
- for (const item of res.data) {
901
- if (item.name === '合同编号最后更新日期'){
902
- oldDate = item.value
903
- }
904
- }
905
- for (const item of res.data){
906
- if (item.name === '合同编号'){
907
- if (item.value === 0 || Date.parse(oldDate) < Date.parse(dataYm)) {
908
- f_contract_number = dir + type + nature + year + newMonth + '001'
909
- console.log("触发if", f_contract_number)
910
- } else {
911
- let count = item.value
912
- f_contract_number = dir + type + nature + year + newMonth + this.PrefixInteger(count, 3)
913
- console.log("触发else", f_contract_number)
914
- }
915
- }
916
- }
917
- this.selectdata.f_contract_number = f_contract_number
918
- this.show_data.f_contract_number = f_contract_number
919
- return f_contract_number
920
- },
921
- PrefixInteger(num, n) {
922
- return (Array(n).join(0) + num).slice(-n);
923
- },
924
- // 单价失去焦点
925
- async priceSum () {
926
- if (isEmpty(this.show_data.f_price)) {
927
- return
928
- }
929
- let data = {
930
- operator: '*',
931
- num1: this.show_data.f_price,
932
- num2: this.show_data.f_install_count
933
- }
934
- let http = new HttpResetClass()
935
- let res = await http.load(
936
- 'POST',
937
- `rs/logic/compute`,
938
- {data: data},
939
- {resolveMsg: null, rejectMsg: '工程材料费计算失败!!!'}
940
- )
941
-
942
- this.setLabelValue('工程材料费', res.data)
943
- },
944
- },
945
- events: {
946
- 'priceType'(index){
947
- this.Pricetype = this.getLableValue('所属类型')
948
- console.log('打印方法值',this.getPrice(this.show_data.f_price_id))
949
- for (const item of this.show_data.fields) {
950
- if (this.show_data.f_sprice_type !=null && this.show_data.f_sprice_type !='') {
951
- if(item.label==='气价名称'){
952
- this.getPrice().then(value =>{
953
- item.options=value
954
- })
955
- console.log('最终',item.options)
956
- }
957
- }
958
- }
959
- },
960
- 'complyInstallation' (index) {
961
- if (this.show_data.f_is_have === '否') {
962
- this.hideButtons('提交', '出图', '缴费')
963
- this.showButtons('终止')
964
- }
965
- if (this.show_data.f_is_have === '是') {
966
- this.hideButtons('终止')
967
- this.showButtons('提交', '出图', '缴费')
968
- }
969
- },
970
- async 'igniteDispatchReadyEvent' () {
971
- let data = {
972
- tablename: 'activityins',
973
- condition: `processid = '${this.show_data.f_process_id}' and defname = '工程施工' and state = '结束'`
974
- }
975
- let http = new HttpResetClass()
976
- let res = await http.load(
977
- 'POST',
978
- `rs/sql/apply_singleTable`,
979
- {data: data},
980
- {resolveMsg: null, rejectMsg: '查询失败!!!'}
981
- )
982
- if (res.data.length <= 0) {
983
- console.log('+++++++++++++++++++++++++++++')
984
- console.log('没有施工,不能退回')
985
- this.hideButtons('退回')
986
- }
987
- },
988
- 'buildReadyEvent' () {
989
- this.setLabelValue('施工单位', this.$login.f.name)
990
- this.setLabelValue('施工安装时间', new Date().Format('yyyy-MM-dd HH:mm:ss'))
991
- },
992
- // 选择材料
993
- async materialNameChenge (index, fieldIndex) {
994
- let material = this.show_data.onetomany[index].fields[fieldIndex].value
995
-
996
- this.show_data.onetomany[index].fields.forEach(item => {
997
- if (material[item.field]) {
998
- item.value = material[item.field]
999
- }
1000
- })
1001
- },
1002
- // 打开模态框获取材料
1003
- async 'getMaterialName' (index) {
1004
- let data = {
1005
- condition: `1=1`
1006
- }
1007
- let http = new HttpResetClass()
1008
- let res = await http.load(
1009
- 'POST',
1010
- `rs/sql/getStockMaterial`,
1011
- {data: data},
1012
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
1013
- )
1014
-
1015
- this.show_data.onetomany[index].fields.forEach(field => {
1016
- if (field.label === '选择材料') {
1017
- field.options = res.data.map(item => {
1018
- return {
1019
- 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}`,
1020
- 'value': item
1021
- }
1022
- })
1023
- }
1024
- })
1025
- },
1026
- // 搜索小区
1027
- async 'searchArea' (area, index) {
1028
- let data = {
1029
- tablename: 't_area',
1030
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}' and f_residential_area like '%${area}%'`
1031
- }
1032
- let http = new HttpResetClass()
1033
- let res = await http.load(
1034
- 'POST',
1035
- `rs/sql/apply_singleTable`,
1036
- {data: data},
1037
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1038
- )
1039
-
1040
- if (res.data.length === 0) {
1041
- return
1042
- }
1043
-
1044
- this.setLabelOptions('集收单位', res.data.map(item => {
1045
- return {
1046
- label: item.f_residential_area,
1047
- value: item.f_residential_area
1048
- }
1049
- }))
1050
- },
1051
- // 搜索小区
1052
- async 'searchAreaCollective' (area, index) {
1053
- let data = {
1054
- tablename: 't_area',
1055
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_residential_area like '%${area}%'`
1056
- }
1057
- let http = new HttpResetClass()
1058
- let res = await http.load(
1059
- 'POST',
1060
- `rs/sql/apply_singleTable`,
1061
- {data: data},
1062
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1063
- )
1064
-
1065
- if (res.data.length === 0) {
1066
- return
1067
- }
1068
-
1069
- this.setLabelOptions('集收单位', res.data.map(item => {
1070
- return {
1071
- label: item.f_residential_area,
1072
- value: item.f_residential_area
1073
- }
1074
- }))
1075
- },
1076
- // 选择气价
1077
- 'priceChange' (index) {
1078
- if (isEmpty(this.show_data.stairPrice)) {
1079
- return
1080
- }
1081
-
1082
- let stairPrice = this.getLableValue('气价名称')
1083
-
1084
- this.setLabelValue('气价类型', stairPrice.f_price_type)
1085
- this.setLabelValue('用气性质', stairPrice.f_gasproperties)
1086
- this.setLabelValue('价格', stairPrice.f_price)
1087
- this.setLabelValue('客户类型', stairPrice.f_user_type)
1088
- this.show_data.f_price_id = stairPrice.id
1089
- this.show_data.f_price_name = stairPrice.f_price_name
1090
- },
1091
- // 选择开发商
1092
- // async 'devInfoChange' (index) {
1093
- // if (isEmpty(this.show_data.f_company_name)) {
1094
- // return
1095
- // }
1096
- // let data = {
1097
- // tablename: 't_dev_info',
1098
- // condition: `f_orgid = '${this.$login.f.orgid}' and f_dev_name = '${this.show_data.f_company_name}'`
1099
- // }
1100
- // let res = await this.$resetpost(
1101
- // `rs/sql/apply_singleTable`,
1102
- // {data: data},
1103
- // {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
1104
- // )
1105
- // this.show_data.f_dev_id = res.data[0].id
1106
- // this.show_data.f_dev_code = res.data[0].f_dev_code
1107
- // this.setLabelValue('法人名称', res.data[0].f_legal_person)
1108
- // this.setLabelValue('身份证', res.data[0].f_idnumber)
1109
- // this.setLabelValue('营业执照', res.data[0].f_license_num)
1110
- // },
1111
- // 退款金额
1112
- 'refundMoneyChange' (index) {
1113
- let f_cumulative_payment_money = this.show_data.f_cumulative_payment_money
1114
- let f_refund_money = this.show_data.fields[index].value
1115
-
1116
- if (f_refund_money > f_cumulative_payment_money) {
1117
- this.$showAlert('退款金额不能大于累计缴费金额!!!', 'warning', 3000)
1118
- this.show_data.fields[index].value = null
1119
- }
1120
- },
1121
- // 检查重复
1122
- 'checkRepeat' (index) {
1123
- this.checkDuplicate(index)
1124
- },
1125
- // 选择报建项目
1126
- 'selectApply' (row) {
1127
- this.setLabelValue('工程名称', row.f_entry_name)
1128
- this.setLabelValue('工程编号', row.f_apply_num)
1129
- this.setLabelValue('报建类型', row.f_apply_type)
1130
- this.setLabelValue('用户名称', row.f_user_name)
1131
- this.setLabelValue('用户电话', row.f_phone)
1132
- this.setLabelValue('证件类型', row.f_credentials)
1133
- this.setLabelValue('证件号码', row.f_idnumber)
1134
- this.setLabelValue('地址', row.f_address)
1135
- this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
1136
-
1137
- this.show_data.parentApply = JSON.parse(JSON.stringify(row))
1138
-
1139
- delete row.id
1140
- delete row.actid
1141
- delete row.defid
1142
- delete row.defname
1143
- delete row.version
1144
- delete row.f_apply_num
1145
- delete row.f_sub_state
1146
- delete row.f_apply_type
1147
- delete row.f_process_id
1148
-
1149
- this.show_data = Object.assign({}, this.show_data, row)
1150
-
1151
- this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
1152
- },
1153
- // 是否终止
1154
- 'isStopChange' (index) {
1155
- let f_is_stop = this.show_data.f_is_stop
1156
-
1157
- for (const item of this.show_data.fields) {
1158
- if (f_is_stop === '是') {
1159
- if (item.label === '终止原因') {
1160
- item.hidden = false
1161
- item.required = true
1162
- }
1163
- } else {
1164
- if (item.label === '终止原因') {
1165
- item.hidden = true
1166
- item.required = false
1167
- }
1168
- }
1169
- }
1170
- },
1171
- // 终止报建初始化
1172
- async 'stopApplyReadyEvent' () {
1173
-
1174
- let f_is_stop = this.getLableValue('是否终止')
1175
-
1176
- for (const item of this.show_data.fields) {
1177
- if (f_is_stop === '是') {
1178
- if (item.label === '终止原因') {
1179
- item.hidden = false
1180
- item.required = true
1181
- }
1182
- } else {
1183
- if (item.label === '终止原因') {
1184
- item.hidden = true
1185
- item.required = false
1186
- }
1187
- }
1188
- }
1189
-
1190
- if (isEmpty(this.show_data.f_parent_process_id)) {
1191
- return
1192
- }
1193
- let data = {
1194
- condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
1195
- data: {
1196
- id: this.$login.f.id,
1197
- orgid: this.$login.f.orgid
1198
- }
1199
- }
1200
- let res = await this.$resetpost(
1201
- `rs/sql/supervisory`,
1202
- {data: data},
1203
- {resolveMsg: null, rejectMsg: '项目查询失败!!!'}
1204
- )
1205
- this.show_data.parentApply = res.data[0]
1206
- },
1207
- // 选择用户档案信息
1208
- 'selectUserinfo' (row) {
1209
- this.setLabelValue('用户编号', row.f_userinfo_code)
1210
- this.setLabelValue('用户名称', row.f_user_name)
1211
- this.setLabelValue('用户电话', row.f_user_phone)
1212
- this.setLabelValue('证件类型', row.f_credentials)
1213
- this.setLabelValue('证件号码', row.f_idnumber)
1214
- this.setLabelValue('地址', row.f_address)
1215
-
1216
- this.show_data.f_userinfo_id = row.f_userinfo_id
1217
- this.show_data.f_userinfo_code = row.f_userinfo_code
1218
- },
1219
- // 是否购买保险
1220
- async 'isInsureChange' (index) {
1221
- if (!this.show_data.f_is_insure) {
1222
- return
1223
- }
1224
- let f_is_insure = this.show_data.f_is_insure
1225
- for (const item of this.show_data.fields) {
1226
- if (f_is_insure === '是') {
1227
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1228
- item.hidden = false
1229
- item.required = true
1230
- }
1231
- if (item.label === '保险备注') {
1232
- item.hidden = false
1233
- }
1234
- } else {
1235
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1236
- item.hidden = true
1237
- item.required = false
1238
- }
1239
- }
1240
- }
1241
- },
1242
- // 通气点火初始化
1243
- async 'gasReadyEvent' () {
1244
- // 是否有气价信息
1245
- if (!isEmpty(this.show_data.f_price_id)) {
1246
- let priceList = await this.getPrice(this.show_data.f_price_id)
1247
- this.setLabelValue('气价名称', priceList[0].value)
1248
- }
1249
-
1250
- let data = {
1251
- tablename: 't_userfees',
1252
- condition: `f_orgid = '${this.$login.f.orgid}' and f_userinfo_id = '${this.show_data.f_userinfo_id}' and f_state = '待执行'`
1253
- }
1254
- let http = new HttpResetClass()
1255
- let res = await http.load(
1256
- 'POST',
1257
- `rs/sql/apply_singleTable`,
1258
- {data: data},
1259
- {resolveMsg: null, rejectMsg: '保险查询失败!!!'}
1260
- )
1261
- if (res.data.length > 0) {
1262
- this.setLabelValue('待执行保险', '是')
1263
- for (const item of this.show_data.fields) {
1264
- if (item.label === '保费开始日期' || item.label === '是否购买保险' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1265
- item.hidden = true
1266
- item.required = false
1267
- item.value = null
1268
- }
1269
- }
1270
- } else {
1271
- this.setLabelValue('待执行保险', '否')
1272
- for (const item of this.show_data.fields) {
1273
- if (item.label === '是否购买保险' || item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1274
- item.hidden = false
1275
- item.required = true
1276
- }
1277
- }
1278
- }
1279
-
1280
- // 保险初始化显示内容
1281
- let f_is_insure = this.getLableValue('是否购买保险')
1282
- for (const item of this.show_data.fields) {
1283
- if (f_is_insure === '是') {
1284
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1285
- item.hidden = false
1286
- item.required = true
1287
- }
1288
- if (item.label === '保险备注') {
1289
- item.hidden = false
1290
- }
1291
- // 本期保费到期时间默认一年
1292
- if (isEmpty(this.selectdata.f_ins_expiration_date)) {
1293
- let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
1294
- this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
1295
- }
1296
- }
1297
- if (f_is_insure === '否') {
1298
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1299
- item.hidden = true
1300
- item.required = false
1301
- }
1302
- }
1303
- }
1304
- },
1305
- // 合同金额失去焦点
1306
- async 'contractMoneyChange' (index) {
1307
- let data = {
1308
- operator: '+',
1309
- num1: this.show_data.f_contract_money || 0,
1310
- num2: this.getLableValue('追加金额') || 0
1311
- }
1312
- let res = await this.$resetpost(
1313
- `rs/logic/compute`,
1314
- {data: data},
1315
- {resolveMsg: null, rejectMsg: '金额计算失败!!!'}
1316
- )
1317
-
1318
- this.setLabelValue('应交金额', res.data)
1319
- },
1320
- // 街道失去焦点
1321
- async 'streetChange' (index) {
1322
- if (isEmpty(this.show_data.f_street)) {
1323
- return
1324
- }
1325
-
1326
- this.setLabelValue('集收单位', null)
1327
-
1328
- let data = {
1329
- tablename: 't_area',
1330
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
1331
- }
1332
- let http = new HttpResetClass()
1333
- let res = await http.load(
1334
- 'POST',
1335
- `rs/sql/apply_singleTable`,
1336
- {data: data},
1337
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1338
- )
1339
-
1340
- this.setLabelOptions('集收单位', res.data.map(item => {
1341
- return {
1342
- label: item.f_residential_area,
1343
- value: item.f_residential_area
1344
- }
1345
- }))
1346
- },
1347
- // 区县失去焦点
1348
- async 'pcdChange' (index) {
1349
- if (isEmpty(this.show_data.f_pcd)) {
1350
- return
1351
- }
1352
-
1353
- this.setLabelValue('街道/乡镇', null)
1354
- this.setLabelValue('集收单位', null)
1355
-
1356
-
1357
-
1358
- let data = {
1359
- tablename: 't_street',
1360
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1361
- }
1362
- let f_address_type = this.getLableValue('地址类型')
1363
-
1364
- if (f_address_type === '民用市区') {
1365
- data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
1366
- }
1367
- if (f_address_type === '民用乡镇') {
1368
- data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
1369
- }
1370
-
1371
- let http = new HttpResetClass()
1372
- let res = await http.load(
1373
- 'POST',
1374
- `rs/sql/apply_singleTable`,
1375
- {data: data},
1376
- {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
1377
- )
1378
-
1379
- this.setLabelOptions('街道/乡镇', res.data.map(item => {
1380
- return {
1381
- label: item.f_street,
1382
- value: item.f_street
1383
- }
1384
- }))
1385
- },
1386
- // 地址类型失去焦点
1387
- 'addressTypeChange' (index) {
1388
- this.setLabelValue('街道/乡镇', null)
1389
- this.setLabelValue('集收单位', null)
1390
- let f_address_type = this.show_data.fields[index].value
1391
- for (const item of this.show_data.fields) {
1392
- if (f_address_type === '民用市区') {
1393
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
1394
- item.hidden = false
1395
- item.required = true
1396
- item.value = null
1397
- }
1398
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1399
- item.hidden = false
1400
- item.required = false
1401
- item.value = null
1402
- }
1403
- if (item.label === '地址') {
1404
- item.readonly = true
1405
- item.value = null
1406
- }
1407
- }
1408
- if (f_address_type === '民用乡镇') {
1409
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
1410
- item.hidden = false
1411
- item.required = true
1412
- item.value = null
1413
- }
1414
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1415
- item.hidden = false
1416
- item.required = false
1417
- item.value = null
1418
- }
1419
- if (item.label === '楼层') {
1420
- item.hidden = true
1421
- item.required = false
1422
- item.value = null
1423
- }
1424
- if (item.label === '地址') {
1425
- item.readonly = true
1426
- item.value = null
1427
- }
1428
- }
1429
- if (f_address_type === '特殊地址') {
1430
- if (item.label === '区/县' || item.label === '街道/乡镇') {
1431
- item.hidden = false
1432
- item.required = true
1433
- item.value = null
1434
- }
1435
- if (item.label === '集收单位') {
1436
- item.hidden = false
1437
- item.required = false
1438
- item.value = null
1439
- }
1440
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
1441
- item.hidden = true
1442
- item.required = false
1443
- item.value = null
1444
- }
1445
- if (item.label === '地址') {
1446
- item.readonly = false
1447
- item.value = null
1448
- }
1449
- }
1450
- }
1451
- },
1452
- // 团购转散户初始化
1453
- 'apply2ReadyEvent' () {
1454
- if (this.show_data.f_apply_source === '线下发起') {
1455
- this.addressInitialization()
1456
- this.hideLabels('用户编号')
1457
- this.electiveLabels('用户编号')
1458
- this.showLabels('片区', '地址类型')
1459
- this.requiredLabels('片区', '地址类型')
1460
- }
1461
- if (this.show_data.f_apply_source === '自动发起') {
1462
- this.hideLabels('片区', '地址类型')
1463
- this.electiveLabels('片区', '地址类型',)
1464
- }
1465
- },
1466
- // 申请节点初始化
1467
- 'applyReadyEvent' () {
1468
- this.addressInitialization()
1469
- this.pcdChange()
1470
- this.streetChange()
1471
- },
1472
- // ===========================================
1473
- async 'button'() {
1474
- if (this.show_data.button.before) {
1475
- await this[this.show_data.button.before]()
1476
- }
1477
- // 点击重置按钮就重置数据
1478
- if (this.show_data.button.button_name === '重置') {
1479
- this.$dispatch('breakControl', this.selectdata)
1480
- return
1481
- }
1482
-
1483
- this.show_data.user = this.$login.f
1484
- this.show_data.start_activity = this.$workflow_vue.start_activity
1485
- this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
1486
-
1487
- if ((this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') && this.show_data.defname === '工程施工' && this.show_data.f_sub_state !='完工' && this.show_data.button.button_name === '完工'){
1488
- //判断是否添加报警器材料
1489
- let bjqlag = false
1490
- let datatemp = {
1491
- 'bjqid':"",
1492
- 'fprocessid':"",
1493
- 'sqvalue':"",
1494
- 'f_bjq_sid':"",
1495
- 'f_material_code':"",
1496
- 'f_bjq_baidu_lng':"",
1497
- 'f_bjq_baidu_lat':"",
1498
- 'f_bjq_gaode_lng':"",
1499
- 'f_bjq_gaode_lat':""
1500
- }
1501
-
1502
- let bjqststedata = {
1503
- "sid":"",
1504
- "bjqtype":"",
1505
- "f_process_id":"",
1506
- "bjqstate":"",
1507
- "f_userinfo_code":""
1508
- }
1509
- let numOne = [];
1510
-
1511
- let http = new HttpResetClass()
1512
- let data = {
1513
- tablename: `t_material_apply`,
1514
- condition: `f_process_id='${this.show_data.f_process_id}'`
1515
- }
1516
- let res = await http.load(
1517
- 'POST',
1518
- `rs/sql/apply_singleTable`,
1519
- {data: data},
1520
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
1521
- )
1522
- res.data.forEach(item => {
1523
- if (item.f_material_name.substr(0,3) === '报警器'){
1524
- var bjname = item.f_material_name.split("-")
1525
- bjqststedata.sid = item.f_bjq_sid
1526
- bjqststedata.f_process_id = item.f_process_id
1527
- bjqststedata.bjqtype = bjname[1]
1528
- //====================================
1529
- bjqlag = true
1530
- datatemp.bjqid = item.id
1531
- datatemp.fprocessid = item.f_process_id
1532
- datatemp.f_bjq_sid = item.f_bjq_sid
1533
- datatemp.f_material_code = item.f_material_code
1534
- datatemp.f_bjq_lng = item.f_bjq_lng
1535
- datatemp.f_bjq_lat = item.f_bjq_lat
1536
- datatemp.f_bjq_gaode_lng = item.f_bjq_gaode_lng
1537
- datatemp.f_bjq_gaode_lat = item.f_bjq_gaode_lng
1538
- datatemp.f_bjq_baidu_lng = item.f_bjq_baidu_lng
1539
- datatemp.f_bjq_baidu_lat = item.f_bjq_baidu_lat
1540
- numOne.push(item.f_bjq_sid)
1541
- }
1542
- })
1543
-
1544
- // this.show_data.onetomany.forEach(item=>{
1545
- // console.log("查看报警器材料",item)
1546
- // item.rows.forEach(i=>{
1547
- // if (i.f_material_name.substr(0,3) === '报警器'){
1548
- // var bjname = i.f_material_name.split("-")
1549
- // bjqststedata.sid = i.f_bjq_sid
1550
- // bjqststedata.f_process_id = i.f_process_id
1551
- // bjqststedata.bjqtype = bjname[1]
1552
- // //====================================
1553
- // bjqlag = true
1554
- // datatemp.bjqid = i.id
1555
- // datatemp.fprocessid = i.f_process_id
1556
- // datatemp.f_bjq_sid = i.f_bjq_sid
1557
- // datatemp.f_material_code = i.f_material_code
1558
- // numOne.push(i.f_bjq_sid)
1559
- // }
1560
- // })
1561
- // })
1562
- if (!bjqlag){
1563
- this.$showMessage('请添加报警器物料信息!!!')
1564
- return
1565
- }
1566
- if (numOne.length > 1){
1567
- this.$showMessage("暂时支持单个报警器物料安装!!!")
1568
- return
1569
- }
1570
- datatemp.sqvalue = this.show_data.areaData.sqvalue
1571
- datatemp.f_bjq_baidu_lng = this.show_data.templatlng.baidutemplng
1572
- datatemp.f_bjq_baidu_lat = this.show_data.templatlng.baidutemplat
1573
- datatemp.f_bjq_gaode_lng = this.show_data.templatlng.gaodetemplng
1574
- datatemp.f_bjq_gaode_lat = this.show_data.templatlng.gaodetemplat
1575
- datatemp.f_bjq_lng = this.show_data.templatlng.baidutemplng
1576
- datatemp.f_bjq_lat = this.show_data.templatlng.baidutemplat
1577
-
1578
- bjqststedata.f_userinfo_code = this.show_data.f_userinfo_code
1579
-
1580
- //判断是否推送 及推送的状态
1581
- //查询是否存在, 以型号及厂家判断
1582
- let bjqres = await this.$resetpost(
1583
- `rs/logic/getbjqsyncinfo`,
1584
- bjqststedata
1585
- )
1586
- if (bjqres.data.bjqstate != "成功"){
1587
- //区域地址存入材料记录表
1588
- let areares = await this.$resetpost(
1589
- `rs/logic/saveArea`,
1590
- {data: datatemp},
1591
- {resolveMsg: null, rejectMsg: '区域地址保存失败'}
1592
- )
1593
-
1594
- //完工之后推送数据到汉威
1595
- let adddata = {
1596
- f_bjq_sid : datatemp.f_bjq_sid,
1597
- f_material_code : datatemp.f_material_code,
1598
- f_bjq_address: this.show_data.areaData.sqvalue,
1599
- f_user_name: this.show_data.f_user_name,
1600
- f_address: this.show_data.f_address,
1601
- f_user_phone: this.show_data.f_phone,
1602
- f_userinfo_code: this.show_data.f_userinfo_code,
1603
- installtime: this.show_data.f_construction_date,
1604
- f_orgid : this.show_data.f_orgid,
1605
- f_bjq_lng: datatemp.f_bjq_baidu_lng,
1606
- f_bjq_lat: datatemp.f_bjq_baidu_lat
1607
- }
1608
- let res = await this.$resetpost(
1609
- `ncc/rs/logic/bjqadduser`,
1610
- // `rs/logic/bjqadduser`,
1611
- adddata
1612
- )
1613
- if (res.data.code != 200){
1614
- if (bjqres.data.bjqstate.length == 0){
1615
- bjqststedata.bjqstate = "失败"
1616
- let bjqres3 = await this.$resetpost(
1617
- `rs/logic/addbjqsyncinfo`,
1618
- bjqststedata
1619
- )
1620
- }
1621
- this.$showMessage(res.data.msg)
1622
- return
1623
- }
1624
- //更改记录表状态
1625
- if (bjqres.data.bjqstate === "失败"){
1626
- bjqststedata.bjqstate = "成功"
1627
- let bjqres1 = await this.$resetpost(
1628
- `rs/logic/updatebjqsyncinfo`,
1629
- bjqststedata
1630
- )
1631
- }else{
1632
- bjqststedata.bjqstate = "成功"
1633
- let bjqres2 = await this.$resetpost(
1634
- `rs/logic/addbjqsyncinfo`,
1635
- bjqststedata
1636
- )
1637
- }
1638
- }
1639
- }
1640
- if ((this.show_data.f_apply_type === '工商户报建' || this.show_data.f_apply_type === '团购报建')
1641
- && (this.show_data.defname === '报装申请') && this.show_data.button.button_name === '提交'){
1642
- await this.contract_number()
1643
- }
1644
- // if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && (this.show_data.button.button_name === '保存'||this.show_data.button.button_name === '提交')){
1645
- // let dataz = {
1646
- // condition: `u.id = ${this.show_data.id}`,
1647
- // data: {
1648
- // id: this.$login.f.id,
1649
- // orgid: this.$login.f.orgid
1650
- // }
1651
- // }
1652
- // let http = new HttpResetClass()
1653
- // let restpz = await http.load(
1654
- // 'POST',
1655
- // `rs/sql/checkuser`,
1656
- // {data: dataz},
1657
- // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1658
- // )
1659
- // this.show_data.actid=restpz.data[0].actid
1660
- // }
1661
- let res = await this.$resetpost(
1662
- `rs/logic/ApplyProductService`,
1663
- {data: this.show_data},
1664
- {resolveMsg: null, rejectMsg: '数据保存失败'}
1665
- )
1666
-
1667
-
1668
- if (this.show_data.button.after) {
1669
- this[this.show_data.button.after]()
1670
- }
1671
- // // 改管报建 增容报建 优化
1672
- // if((this.show_data.f_apply_type === '改管报建'||this.show_data.f_apply_type === '增容报建') && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '缴费'){
1673
- // let datagg = {
1674
- // condition: `t.f_process_id='${this.show_data.f_process_id}'`,
1675
- // }
1676
- // let http = new HttpResetClass()
1677
- // let restgg = await http.load(
1678
- // 'POST',
1679
- // `rs/sql/checkusertwo`,
1680
- // {data: datagg},
1681
- // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1682
- // )
1683
- // debugger
1684
- // if(this.show_data.f_apply_type === '改管报建'){
1685
- // restgg.data[0].processname = '改管报建流程'
1686
- // restgg.data[0].defname = '报装缴费'
1687
- // }else{
1688
- // restgg.data[0].processname = '增容报建流程'
1689
- // restgg.data[0].defname = '报装缴费'
1690
- // }
1691
- // restgg.data[0].actid = restgg.data[0].actid + 1
1692
- // this.$dispatch('apply',restgg.data[0])
1693
- //
1694
- // }
1695
- //
1696
- // // 退款报建 优化
1697
- // if(this.show_data.f_apply_type === '退款报建' && this.show_data.defname === '终止报建' && this.show_data.button.button_name === '提交'){
1698
- // let datatk = {
1699
- // condition: `t.f_process_id='${this.show_data.f_process_id}'`,
1700
- // }
1701
- // let http = new HttpResetClass()
1702
- // let resttk = await http.load(
1703
- // 'POST',
1704
- // `rs/sql/checkusertwo`,
1705
- // {data: datatk},
1706
- // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1707
- // )
1708
- // debugger
1709
- // resttk.data[0].processname = '退款报建流程'
1710
- // resttk.data[0].defname = '退款'
1711
- // this.$dispatch('apply',resttk.data[0])
1712
- //
1713
- // }
1714
- //
1715
- //
1716
- // if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '合同'){
1717
- // let data = {
1718
- // tablename: 't_apply',
1719
- // condition: `f_process_id='${this.show_data.f_process_id}'`
1720
- // }
1721
- // let http = new HttpResetClass()
1722
- // let restp = await http.load(
1723
- // 'POST',
1724
- // `rs/sql/apply_singleTable`,
1725
- // {data: data},
1726
- // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1727
- // )
1728
- // debugger
1729
- // restp.data[0].processname = '散户报建流程'
1730
- // restp.data[0].defname = '合同签订'
1731
- // this.$dispatch('apply',restp.data[0])
1732
- //
1733
- // } else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && this.show_data.button.button_name === '提交'){
1734
- // let data2 = {
1735
- // condition: `u.id = ${this.show_data.id}`,
1736
- // data: {
1737
- // id: this.$login.f.id,
1738
- // orgid: this.$login.f.orgid
1739
- // }
1740
- // }
1741
- // let http = new HttpResetClass()
1742
- // let restp1 = await http.load(
1743
- // 'POST',
1744
- // `rs/sql/checkuser`,
1745
- // {data: data2},
1746
- // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1747
- // )
1748
- // debugger
1749
- // console.log('有没有发请求打印查询的内容restp1',restp1)
1750
- // // restp1.data[0].processname = '散户报建流程'
1751
- // // restp1.data[0].defname = '报装缴费'
1752
- // this.$dispatch('apply',restp1.data[0])
1753
- // }else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装缴费' && this.show_data.button.button_name === '提交'){
1754
- // let data3 = {
1755
- // condition: `u.id = ${this.show_data.id}`,
1756
- // data: {
1757
- // id: this.$login.f.id,
1758
- // orgid: this.$login.f.orgid
1759
- // }
1760
- // }
1761
- // let http = new HttpResetClass()
1762
- // let restp2 = await http.load(
1763
- // 'POST',
1764
- // `rs/sql/checkuser`,
1765
- // {data: data3},
1766
- // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1767
- // )
1768
- // debugger
1769
- // console.log('打印查询的内容',restp2)
1770
- // if(restp2.length>0){
1771
- // this.$dispatch('apply',restp2.data[0])
1772
- // }else{
1773
- // debugger
1774
- // this.$dispatch('loadPage')
1775
- // }
1776
- // }
1777
- // else{
1778
- // this.$dispatch('loadPage')
1779
- // }
1780
- this.$dispatch('loadPage')
1781
- },
1782
- // 失去焦点出触发事件
1783
- 'onchange' (index) {
1784
- if (this.show_data.defname === '报装申请' || this.show_data.defname === '信息确认') {
1785
- debugger
1786
- if (
1787
- this.show_data.fields[index].label === '区/县' ||
1788
- this.show_data.fields[index].label === '街道/乡镇' ||
1789
- this.show_data.fields[index].label === '集收单位' ||
1790
- this.show_data.fields[index].label === '楼号/组' ||
1791
- this.show_data.fields[index].label === '单元/排' ||
1792
- this.show_data.fields[index].label === '楼层' ||
1793
- this.show_data.fields[index].label === '门牌号'
1794
- ) {
1795
-
1796
- let f_pcd = this.getLableValue('区/县') || ''
1797
- let f_street = this.getLableValue('街道/乡镇') || ''
1798
- let f_residential_area = this.getLableValue('集收单位') || ''
1799
- let f_building = this.getLableValue('楼号/组') || ''
1800
- // let f_building_suffix = f_building ? this.config.f_building_suffix : ''
1801
- let f_building_suffix = f_building ? '号楼' : ''
1802
- let f_unit = this.getLableValue('单元/排') || ''
1803
- // let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
1804
- let f_unit_suffix = f_unit ? '单元' : ''
1805
- let f_floor = this.getLableValue('楼层') || ''
1806
- // let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
1807
- let f_floor_suffix = f_floor ? '层' : ''
1808
- let f_room = this.getLableValue('门牌号') || ''
1809
- // let f_room_suffix = f_room ? this.config.f_room_suffix : ''
1810
- let f_room_suffix = f_room ? '室' : ''
1811
-
1812
- let f_address = f_pcd + f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix
1813
- this.setLabelValue("地址", f_address)
1814
- }
1815
- }
1816
- },
1817
- selectSearch (val, index) {},
1818
- 'onblur' (index) {},
1819
- 'oninput' (index) {},
1820
- 'initializtionView' () {},
1821
- async 'onchangeModal' (index, fieldIndex) {
1822
- },
1823
- async 'onblurModal' (index, fieldIndex) {
1824
-
1825
- },
1826
- async 'oninputModal' (index, fieldIndex) {
1827
-
1828
- },
1829
- async 'onetomanydelete' (index, rowIndex) {
1830
-
1831
- let http = new HttpResetClass()
1832
-
1833
- let res = await http.load(
1834
- 'DELETE',
1835
- `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
1836
- null,
1837
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
1838
- )
1839
-
1840
- res = await this.$resetpost(
1841
- 'rs/entity/t_apply',
1842
- this.show_data
1843
- )
1844
-
1845
- this.$dispatch('breakControl', this.show_data)
1846
- },
1847
- async 'onetomanyupdate' (index, rowIndex) {
1848
- let data = this.show_data.onetomany[index].rows[rowIndex]
1849
-
1850
- this.show_data.onetomany[index].fields.forEach(item => {
1851
- data[item.field] = item.value
1852
- })
1853
- let res = await this.$resetpost(
1854
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1855
- data
1856
- )
1857
-
1858
- res = await this.$resetpost(
1859
- 'rs/entity/t_apply',
1860
- this.show_data
1861
- )
1862
-
1863
- this.$dispatch('breakControl', this.show_data)
1864
- },
1865
- async 'onetomanyadd' (index) {
1866
- let data = {
1867
- f_process_id : this.show_data.f_process_id,
1868
- f_operator_id: this.$login.f.id,
1869
- f_operator: this.$login.f.name,
1870
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
1871
- f_orgid: this.$login.f.orgid,
1872
- f_orgname: this.$login.f.orgs
1873
- }
1874
- this.show_data.onetomany[index].fields.forEach(item => {
1875
- data[item.field] = item.value
1876
- })
1877
- let res = await this.$resetpost(
1878
- `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1879
- data
1880
- )
1881
-
1882
- res = await this.$resetpost(
1883
- 'rs/entity/t_apply',
1884
- this.show_data
1885
- )
1886
-
1887
- this.$dispatch('breakControl', this.show_data)
1888
- },
1889
- async 'importEvent' (index, table, configName, filepath) {
1890
- let data = {
1891
- selectdata: this.show_data,
1892
- table: table,
1893
- filepath: filepath,
1894
- configName: configName,
1895
- user: this.$login.f
1896
- }
1897
-
1898
- let res = await this.$resetpost(
1899
- `rs/logic/importEvent`,
1900
- data
1901
- )
1902
-
1903
- this.$dispatch('breakControl', this.show_data)
1904
- },
1905
- 'onbutchange' (index) {
1906
-
1907
- },
1908
- 'onbutblur' (index) {
1909
-
1910
- },
1911
- 'onbutinput' (index) {
1912
-
1913
-
1914
- }
1915
- },
1916
- watch: {
1917
- }
1918
- }
1919
- </script>
1920
- <style scoped>
1921
- /*清除model中的浮动*/
1922
- .clearfix:after,.clearfix:before{
1923
- display: table;
1924
- }
1925
- .clearfix:after{
1926
- clear: both;
1927
- }
1928
- </style>
1
+ <template>
2
+ <div class="" v-if="showview">
3
+ <show-back-reason :selectdata="show_data"></show-back-reason>
4
+ <service-view v-ref:serviceview :data="show_data"></service-view>
5
+ </div>
6
+ </template>
7
+ <script>
8
+ import Vue from 'vue'
9
+ import {HttpResetClass} from 'vue-client'
10
+ import {isEmpty} from "../../../Util";
11
+
12
+ // Date格式化
13
+ Date.prototype.Format = function (fmt) {
14
+ var o = {
15
+ "M+": this.getMonth() + 1, //月份
16
+ "d+": this.getDate(), //日
17
+ "H+": this.getHours(), //小时
18
+ "m+": this.getMinutes(), //分
19
+ "s+": this.getSeconds(), //秒
20
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
21
+ "S": this.getMilliseconds() //毫秒
22
+ };
23
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
24
+ for (var k in o)
25
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
26
+ return fmt;
27
+ }
28
+
29
+ export default {
30
+ title: '报建流程业务控制层',
31
+ props: ['selectdata'],
32
+ data () {
33
+ return {
34
+ data: null, // 数据库数据,json配置文件数据的数据集合
35
+ json_datas: null, // Json配置文件集合
36
+ showview: false, // 控制显示service-view组件
37
+ show_data: null, // 给view层显示的数据
38
+ config: {},
39
+ Pricetype:''
40
+ }
41
+ },
42
+ ready () {
43
+ this.refurbish()
44
+ },
45
+ methods: {
46
+ async servicer(){
47
+ let data = {
48
+ tablename: 't_user',
49
+ condition: `1=1`
50
+ }
51
+ let http = new HttpResetClass()
52
+ let res = await http.load(
53
+ 'POST',
54
+ `rs/sql/apply_singleTable`,
55
+ {data: data},
56
+ {resolveMsg: null, rejectMsg: '服务人查询失败!!!'}
57
+ )
58
+ this.setLabelOptions('服务人', res.data.map(item => {
59
+ return {
60
+ label: item.name,
61
+ value: item.name
62
+ }
63
+ }))
64
+ },
65
+ async ceshi(){
66
+ for (let i = 0; i < this.show_data.fields.length; i++) {
67
+ if (this.show_data.defname==='报装申请' && this.show_data.fields[i].label === '合同编号') {
68
+ debugger
69
+ let http2 = new HttpResetClass()
70
+ let applyNum = await http2.load('POST', 'rs/logic/getProjectNo', {
71
+ data: {
72
+ f_filiale: this.$login.f.orgs,
73
+ f_order_id: this.selectdata.f_order_id
74
+ }
75
+ }, {resolveMsg: null, rejectMsg: null})
76
+ debugger
77
+ console.log("生成的合同编号为:" + applyNum.data)
78
+ this.show_data.fields[i].value = applyNum.data
79
+ }
80
+ }
81
+ },
82
+
83
+ // 组件初始化操作
84
+ async refurbish() {
85
+ this.json_datas = this.$workflow_vue
86
+ let sum = 0
87
+ let jsonData = {}
88
+ if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
89
+ this.$showMessage("网络故障,请刷新页面")
90
+ return
91
+ }
92
+ this.json_datas.activitys.forEach(item => {
93
+ if (this.selectdata.defname === item.title) {
94
+ jsonData = item // 拿到当前节点的json配置信息
95
+ sum++ // 节点名一样的个数
96
+ }
97
+ return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
98
+ })
99
+
100
+ if (sum === 0) {
101
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
102
+ return
103
+ }
104
+ if (sum > 1) {
105
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
106
+ return
107
+ }
108
+
109
+ this.selectdata = Object.assign({}, this.selectdata, jsonData)
110
+
111
+ // fields 字段填充值
112
+ for (const item of this.selectdata.fields) {
113
+ if (!item.value) {
114
+ item.value = null
115
+ }
116
+ if(this.selectdata.f_apply_type === '集体报建' && this.selectdata.defname === '报装缴费'){
117
+ if(item.label === '未结总金额'){
118
+ item.value = this.selectdata.f_due_money - this.selectdata.f_cumulative_payment_money
119
+ }
120
+ if(item.label === '付款比例'){
121
+ item.value = (this.selectdata.f_cumulative_payment_money/this.selectdata.f_due_money * 100) + '%'
122
+ }
123
+ }
124
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
125
+ if (item.eval) {
126
+ item.value = eval(item.default)
127
+ } else {
128
+ item.value = item.default
129
+ }
130
+ }
131
+
132
+ if (this.selectdata[item.field]) {
133
+ // 将json字符串格式化赋值给value
134
+ if (String(this.selectdata[item.field]).startsWith("{")) {
135
+ item.value = JSON.parse(this.selectdata[item.field])
136
+ } else {
137
+ item.value = this.selectdata[item.field]
138
+ }
139
+ }
140
+ if (this.selectdata[item.field] === 0) {
141
+ item.value = 0
142
+ }
143
+
144
+ // datepicker
145
+ if (item.type === 'datepicker' && !item.value && item.default) {
146
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
147
+ }
148
+ // 如果配置类型为select,优先从参数列表获取options
149
+ if (item.type === 'select' || item.type === 'checkbox') {
150
+ if (item.param) {
151
+ let temp = this.$appdata.getParam(item.label)
152
+
153
+ if (temp && temp.length > 0) {
154
+ item.options = temp
155
+ }
156
+
157
+ if (item.paramLabel) {
158
+ temp = this.$appdata.getParam(item.paramLabel)
159
+ if (temp && temp.length > 0) {
160
+ item.options = temp
161
+ }
162
+ }
163
+ }
164
+
165
+ if (item.ready) {
166
+ console.log(item.ready)
167
+ item.options = await this[item.ready]()
168
+
169
+ }
170
+ }
171
+
172
+
173
+ if (item.type === 'checkbox') {
174
+ if (this.selectdata[item.field]) {
175
+ item.value = JSON.parse(this.selectdata[item.field])
176
+ } else {
177
+ item.value = []
178
+ }
179
+ }
180
+
181
+ this.selectdata[item.field] = item.value
182
+ }
183
+
184
+ // 控制组件
185
+ if (this.selectdata.components) {
186
+ this.selectdata.components.forEach(item => {
187
+ if (!item.mark) {
188
+ item.mark = 0
189
+ }
190
+ })
191
+ }
192
+ // 初始化onetomany
193
+ if (this.selectdata.onetomany) {
194
+ for (const item of this.selectdata.onetomany) {
195
+ let res = null
196
+ if (item.queryEvent) {
197
+ res = this[item.queryEvent]()
198
+ } else {
199
+ let data = {
200
+ tablename: item.tables[0],
201
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
202
+ }
203
+ res = await this.$resetpost(
204
+ 'rs/sql/apply_singleTable',
205
+ {data: data},
206
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
207
+ )
208
+ }
209
+
210
+ item.rows = res.data
211
+
212
+ // 初始化onetomany中的fields
213
+ for (const field of item.fields) {
214
+ if (!field.value) {
215
+ if (field.value !== 0) {
216
+ field.value = null
217
+ }
218
+ }
219
+
220
+ if (field.default || field.default === 0) {
221
+ field.value = field.default
222
+ }
223
+
224
+ // datepicker
225
+ if (field.type === 'datepicker' && !field.value && field.default) {
226
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
227
+ }
228
+
229
+ if (field.type === 'select') {
230
+
231
+ let temp = this.$appdata.getParam(field.label)
232
+
233
+ if (temp && temp.length > 0) {
234
+ field.options = temp
235
+ }
236
+
237
+ if (field.paramLabel) {
238
+ temp = this.$appdata.getParam(field.paramLabel)
239
+ if (temp && temp.length > 0) {
240
+ item.options = temp
241
+ }
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ // 初始化 buttons_fields
248
+ for (const item of this.selectdata.buttons) {
249
+ if (item.button_name === '下发') {
250
+
251
+ let data = {
252
+ source: item.source,
253
+ userid: this.$login.f.id
254
+ }
255
+ if (item.sourceMethod) {
256
+ data.source = this[item.sourceMethod]()
257
+ }
258
+ if (!data.source) {
259
+ this.$showMessage("请配置获取人员表达式")
260
+ return
261
+ }
262
+
263
+ let res = await this.$resetpost(
264
+ 'rs/search',
265
+ {data: data},
266
+ {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
267
+ )
268
+
269
+ let options = res.data.map(source => {
270
+ return {
271
+ "label": source.name,
272
+ "value": source.id
273
+ }
274
+ })
275
+
276
+ if (item.button_fields.length !== 1) {
277
+ this.$showMessage("下发有且只能有一个字段!!!")
278
+ return
279
+ }
280
+
281
+ item.button_fields[0].options = options
282
+ }
283
+ if (item.button_fields) {
284
+ item.button_fields.forEach(x => {
285
+ // 如果配置类型为select,优先从参数列表获取options
286
+ if (x.type === 'select') {
287
+
288
+ if (x.param) {
289
+ let temp = this.$appdata.getParam(x.label)
290
+
291
+ if (temp && temp.length > 0) {
292
+ x.options = temp
293
+ }
294
+
295
+ if (x.paramLabel) {
296
+ temp = this.$appdata.getParam(x.paramLabel)
297
+ if (temp && temp.length > 0) {
298
+ x.options = temp
299
+ }
300
+ }
301
+ }
302
+
303
+ }
304
+ })
305
+ }
306
+ }
307
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
308
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
309
+ console.log('打印下temp',temp)
310
+ this.show_data = temp
311
+ this.$nextTick(() => {
312
+ this.showview = true
313
+ })
314
+ },
315
+ // 金额转大写
316
+ smalltoBIG(n) {
317
+ let fraction = ['角', '分'];
318
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
319
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
320
+ let head = n < 0 ? '欠' : '';
321
+ n = Math.abs(n);
322
+
323
+ let s = '';
324
+
325
+ for (var i = 0; i < fraction.length; i++) {
326
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
327
+ }
328
+ s = s || '整';
329
+ n = Math.floor(n);
330
+
331
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
332
+ let p = '';
333
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
334
+ p = digit[n % 10] + unit[1][j] + p;
335
+ n = Math.floor(n / 10);
336
+ }
337
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
338
+ }
339
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
340
+ },
341
+ getLableValue(label) {
342
+ for (const item of this.show_data.fields) {
343
+ if (item.label === label && item.type !== 'number') {
344
+ return item.value || ''
345
+ }
346
+ if (item.label === label && item.type === 'number') {
347
+ return item.value || 0
348
+ }
349
+ }
350
+ },
351
+ getLableOptions(label) {
352
+ for (const item of this.show_data.fields) {
353
+ if (item.label === label) {
354
+ return item.options
355
+ }
356
+ }
357
+ },
358
+ setLabelValue(label, value) {
359
+ for (const item of this.show_data.fields) {
360
+ if (item.label === label) {
361
+ item.value = value
362
+ this.show_data[item.field] = value
363
+ }
364
+ }
365
+ },
366
+ setLabelOptions(label, options) {
367
+ for (const item of this.show_data.fields) {
368
+ if (item.label === label) {
369
+ item.options = options
370
+ }
371
+ }
372
+ },
373
+ showLabels(...labels) {
374
+ for (const item of this.show_data.fields) {
375
+ if (labels.includes(item.label)) {
376
+ item.hidden = false
377
+ }
378
+ }
379
+ },
380
+ hideLabels(...labels) {
381
+ for (const item of this.show_data.fields) {
382
+ if (labels.includes(item.label)) {
383
+ item.hidden = true
384
+ }
385
+ }
386
+ },
387
+ requiredLabels(...labels) {
388
+ for (const item of this.show_data.fields) {
389
+ if (labels.includes(item.label)) {
390
+ item.required = true
391
+ }
392
+ }
393
+ },
394
+ electiveLabels(...labels) {
395
+ for (const item of this.show_data.fields) {
396
+ if (labels.includes(item.label)) {
397
+ item.required = false
398
+ }
399
+ }
400
+ },
401
+ readonlyLabels(...labels) {
402
+ for (const item of this.show_data.fields) {
403
+ if (labels.includes(item.label)) {
404
+ item.readonly = true
405
+ item.disabled = true
406
+ }
407
+ }
408
+ },
409
+ readwriteLabels(...labels) {
410
+ for (const item of this.show_data.fields) {
411
+ if (labels.includes(item.label)) {
412
+ item.readonly = false
413
+ item.disabled = false
414
+ }
415
+ }
416
+ },
417
+ disabledButtons(...buttons) {
418
+ for (const item of this.show_data.buttons) {
419
+ if (buttons.includes(item.button_name)) {
420
+ item.disabled = true
421
+ }
422
+ }
423
+ },
424
+ enableButtons(...buttons) {
425
+ for (const item of this.show_data.buttons) {
426
+ if (buttons.includes(item.button_name)) {
427
+ item.disabled = false
428
+ }
429
+ }
430
+ },
431
+ showButtons(...buttons) {
432
+ for (const item of this.show_data.buttons) {
433
+ if (buttons.includes(item.button_name)) {
434
+ item.hidden = false
435
+ }
436
+ }
437
+ },
438
+ hideButtons(...buttons) {
439
+ for (const item of this.show_data.buttons) {
440
+ if (buttons.includes(item.button_name)) {
441
+ item.hidden = true
442
+ }
443
+ }
444
+ },
445
+ async checkDuplicate(index) {
446
+ let http = new HttpResetClass()
447
+ let data = {
448
+ tablename: 't_apply',
449
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
450
+ }
451
+ let res = await http.load('POST', 'rs/sql/apply_singleTable', {data: data}, {
452
+ resolveMsg: null,
453
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
454
+ })
455
+ if (res.data.length > 0) {
456
+ this.show_data.fields[index].value = null
457
+ this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
458
+ }
459
+ },
460
+ // 获取片区
461
+ async getSliceArea () {
462
+ let data = {
463
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
464
+ userid: this.$login.f.id
465
+ }
466
+
467
+ let http = new HttpResetClass()
468
+ let res = await http.load(
469
+ 'POST',
470
+ `rs/search`,
471
+ {data: data},
472
+ {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
473
+ )
474
+
475
+ return res.data.map(item => {
476
+ return {
477
+ label: item.name,
478
+ value: item.name
479
+ }
480
+ })
481
+ },
482
+ // 获取区县
483
+ async getPcd () {
484
+ let data = {
485
+ tablename: 't_pcd',
486
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
487
+ }
488
+ let http = new HttpResetClass()
489
+ let res = await http.load(
490
+ 'POST',
491
+ `rs/sql/apply_singleTable`,
492
+ {data: data},
493
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
494
+ )
495
+
496
+ return res.data.map(item => {
497
+ return {
498
+ label: item.f_pcd,
499
+ value: item.f_pcd
500
+ }
501
+ })
502
+ },
503
+ // 获取集收单位
504
+ async getArea () {
505
+ let data = {
506
+ tablename: 't_area',
507
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
508
+ }
509
+ let http = new HttpResetClass()
510
+ let res = await http.load(
511
+ 'POST',
512
+ `rs/sql/apply_singleTable`,
513
+ {data: data},
514
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
515
+ )
516
+
517
+ return res.data.map(item => {
518
+ return {
519
+ label: item.f_residential_area,
520
+ value: item.f_residential_area
521
+ }
522
+ })
523
+ },
524
+ // 缴费前置
525
+ chargeBefore () {
526
+ if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
527
+ this.$showAlert('费用未结清!!!', 'warning', 3000)
528
+ throw null
529
+ }
530
+ },
531
+ // 施工前置 加表具后状态是待开通 提交后是正常 所以这里的判断条件需改正 (and uf.f_meter_classify is null and f_meternumber is null)
532
+ async constructionBefore () {
533
+ let http = new HttpResetClass()
534
+ let data = {
535
+ condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_meter_classify is null and f_meternumber is null`
536
+ }
537
+ let res = await http.load(
538
+ 'POST',
539
+ 'rs/sql/countApplyUserinfo',
540
+ {data: data},
541
+ {
542
+ resolveMsg: null,
543
+ rejectMsg: '安装明细查询失败!!!'
544
+ })
545
+ if (res.data[0].num > 0) {
546
+ this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
547
+ throw `还有${res.data[0].num}户未安装,无法提交`
548
+ }
549
+ },
550
+ changePipeBuild () {
551
+ if (this.selectdata.f_process_dep === '工程部') {
552
+ return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
553
+ }
554
+ if (this.selectdata.f_process_dep === '运营部') {
555
+ return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
556
+ }
557
+ return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
558
+ },
559
+ // async getDevInfo () {
560
+ // let data = {
561
+ // tablename: 't_dev_info',
562
+ // condition: `f_orgid = '${this.$login.f.orgid}'`
563
+ // }
564
+ // let http = new HttpResetClass()
565
+ // let res = await http.load(
566
+ // 'POST',
567
+ // `rs/sql/apply_singleTable`,
568
+ // {data: data},
569
+ // {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
570
+ // )
571
+ //
572
+ // return res.data.map(item => {
573
+ // return {
574
+ // label: item.f_dev_name,
575
+ // value: item.f_dev_name
576
+ // }
577
+ // })
578
+ // },
579
+ async getPrice (f_price_id) {
580
+ console.log('=======================')
581
+ console.log(f_price_id)
582
+
583
+ let data = {
584
+ condition: `sp.f_filialeid = '${this.$login.f.orgid}'`
585
+ }
586
+ // if(this.Pricetype==='机表'){
587
+ // data.condition=`sp.f_custom = '机表'`
588
+ // }
589
+ // if(this.Pricetype==='非机表'){
590
+ // data.condition=`sp.f_custom = '非机表'`
591
+ // }
592
+
593
+ if (!isEmpty(f_price_id)) {
594
+ data.condition = `sp.f_filialeid = '${this.$login.f.orgid}' and sp.f_price_id = ${f_price_id}`
595
+ }
596
+ let http = new HttpResetClass()
597
+ let res = await http.load(
598
+ 'POST',
599
+ `rs/sql/applyGetPrice`,
600
+ {data: data},
601
+ {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
602
+ )
603
+
604
+ let a= res.data.map(item => {
605
+ return {
606
+ label: item.f_price_name,
607
+ value: item
608
+ }
609
+ })
610
+ this.selectdata.fields.forEach(field => {
611
+ if (field.label === '气价名称') {
612
+ field.options = a}
613
+ })
614
+ return a
615
+ },
616
+ addressInitialization () {
617
+ this.$getConfig(this, 'UserAddress')
618
+
619
+ let f_address_type = this.show_data.f_address_type
620
+
621
+ for (const item of this.show_data.fields) {
622
+ if (f_address_type === '民用市区') {
623
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
624
+ item.hidden = false
625
+ item.required = true
626
+ }
627
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
628
+ item.hidden = false
629
+ item.required = false
630
+ }
631
+ if (item.label === '地址') {
632
+ item.readonly = true
633
+ }
634
+ }
635
+ if (f_address_type === '民用乡镇') {
636
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
637
+ item.hidden = false
638
+ item.required = true
639
+ }
640
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
641
+ item.hidden = false
642
+ item.required = false
643
+ }
644
+ if (item.label === '楼层') {
645
+ item.hidden = true
646
+ item.required = false
647
+ }
648
+ if (item.label === '地址') {
649
+ item.readonly = true
650
+ }
651
+ }
652
+ if (f_address_type === '特殊地址') {
653
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
654
+ item.hidden = false
655
+ item.required = true
656
+ }
657
+ if (item.label === '集收单位') {
658
+ item.hidden = false
659
+ if (this.show_data.f_apply_type === '工商户报建'){
660
+ item.required = false
661
+ } else {
662
+ item.required = false
663
+ }
664
+
665
+ }
666
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
667
+ item.hidden = true
668
+ item.required = false
669
+ }
670
+ if (item.label === '地址') {
671
+ item.readonly = false
672
+ }
673
+ }
674
+
675
+ if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
676
+ item.hidden = true
677
+ }
678
+ }
679
+ },
680
+ async streetChange () {
681
+ if (isEmpty(this.show_data.f_street)) {
682
+ return
683
+ }
684
+
685
+ let data = {
686
+ tablename: 't_area',
687
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
688
+ }
689
+ let http = new HttpResetClass()
690
+ let res = await http.load(
691
+ 'POST',
692
+ `rs/sql/apply_singleTable`,
693
+ {data: data},
694
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
695
+ )
696
+
697
+ this.setLabelOptions('集收单位', res.data.map(item => {
698
+ return {
699
+ label: item.f_residential_area,
700
+ value: item.f_residential_area
701
+ }
702
+ }))
703
+ },
704
+ async pcdChange () {
705
+ if (isEmpty(this.show_data.f_pcd)) {
706
+ return
707
+ }
708
+
709
+ let data = {
710
+ tablename: 't_street',
711
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
712
+ }
713
+ let f_address_type = this.getLableValue('地址类型')
714
+
715
+ if (f_address_type === '民用市区') {
716
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
717
+ }
718
+ if (f_address_type === '民用乡镇') {
719
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
720
+ }
721
+
722
+ let http = new HttpResetClass()
723
+ let res = await http.load(
724
+ 'POST',
725
+ `rs/sql/apply_singleTable`,
726
+ {data: data},
727
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
728
+ )
729
+
730
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
731
+ return {
732
+ label: item.f_street,
733
+ value: item.f_street
734
+ }
735
+ }))
736
+ },
737
+ async addressTips () {
738
+ // console.log('======================='+this.show_data.f_apply_type)
739
+ let res = ''
740
+ if (this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') {
741
+ res = await this.$showMessage('报警器报建下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
742
+ }else{
743
+ res = await this.$showMessage('增容改管下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
744
+ }
745
+ if (res == 'confirm') {
746
+ return
747
+ }
748
+ throw '用户信息确认!!!'
749
+ },
750
+ async getDesignerPeople () {
751
+ let data = {
752
+ source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
753
+ userid: this.$login.f.id
754
+ }
755
+
756
+ let http = new HttpResetClass()
757
+ let res = await http.load(
758
+ 'POST',
759
+ `rs/search`,
760
+ {data: data},
761
+ {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
762
+ )
763
+
764
+ return res.data.map(item => {
765
+ return {
766
+ label: item.name,
767
+ value: item.id
768
+ }
769
+ })
770
+ },
771
+ async surveyStopApply () {
772
+ console.log('终止报建!!!!!')
773
+
774
+ this.show_data.f_stop_reason = '现场勘察不符合报装条件'
775
+
776
+ let data = {
777
+ data: this.show_data,
778
+ user: this.$login.f
779
+ }
780
+
781
+ let res = await this.$resetpost(
782
+ `rs/logic/surveyStopApply`,
783
+ {data: data},
784
+ {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
785
+ )
786
+
787
+ this.$dispatch('loadPage')
788
+
789
+ throw '终止报建!!!'
790
+ },
791
+ async contract_number() {
792
+ console.log("进入编号合同编号生成",this.$login.f.orgs)
793
+ let f_contract_number = ''
794
+ const nowDate = new Date();
795
+ const date = {
796
+ year: nowDate.getFullYear(),
797
+ month: nowDate.getMonth() + 1,
798
+ day: nowDate.getDate()
799
+ }
800
+
801
+ function upperCaseChars(dir) {
802
+ let string = '';
803
+ switch (dir){
804
+ case '周口市天然气有限公司':
805
+ string = 'ZK' // 当表达式的结果等于 房产 时,则执行该代码
806
+ break;
807
+ case '项城市天然气有限公司':
808
+ string = "XC" // 当表达式的结果等于 自建房 时,则执行该代码
809
+ break;
810
+ case '西华县天然气有限公司':
811
+ string = 'XH' // 当表达式的结果等于 商业 时,则执行该代码
812
+ break;
813
+ case '鹿邑县天然气有限公司':
814
+ string = 'LY' // 当表达式的结果等于 工业 时,则执行该代码
815
+ break;
816
+ case '郸城县天然气有限公司':
817
+ string = 'DC' // 当表达式的结果等于 中压 时,则执行该代码
818
+ break;
819
+ case '测试公司(一)':
820
+ string = 'CS' // 当表达式的结果等于 中压 时,则执行该代码
821
+ break;
822
+ case '甘泉县丰源天然气有限责任公司':
823
+ string = 'GQ' // 当表达式的结果等于 中压 时,则执行该代码
824
+ break;
825
+ default : 'HT'
826
+ break; // 如果没有与表达式相同的公司,则执行该代码
827
+ }
828
+ return string;
829
+ }
830
+
831
+ const dir = upperCaseChars(this.$login.f.orgs) //分公司
832
+
833
+ let type = 0 //类型
834
+
835
+ switch (this.show_data.f_entry_type){
836
+ case '城区/县城':
837
+ type = 1 // 当表达式的结果等于 城区 时,则执行该代码
838
+ break;
839
+ case '新农村':
840
+ type = 2 // 当表达式的结果等于 新农村 时,则执行该代码
841
+ break;
842
+ case '测试':
843
+ type = 3 // 当表达式的结果等于 新农村 时,则执行该代码
844
+ break;
845
+ default :
846
+ break; // 如果没有与表达式相同的值,则执行该代码
847
+ }
848
+
849
+ let nature = 0 // 性质
850
+ switch (this.show_data.f_apply_nature){
851
+ case '楼房':
852
+ nature = 1 // 当表达式的结果等于 楼房 时,则执行该代码
853
+ break;
854
+ case '房产':
855
+ nature = 1 // 当表达式的结果等于 房产 时,则执行该代码
856
+ break;
857
+ case '自建房':
858
+ nature = 2 // 当表达式的结果等于 自建房 时,则执行该代码
859
+ break;
860
+ case '商业':
861
+ nature = 3 // 当表达式的结果等于 商业 时,则执行该代码
862
+ break;
863
+ case '学校':
864
+ nature = 3 // 当表达式的结果等于 学校 时,则执行该代码
865
+ break;
866
+ case '福利机构':
867
+ nature = 3 // 当表达式的结果等于 福利机构 时,则执行该代码
868
+ break;
869
+ case '其他':
870
+ nature = 3 // 当表达式的结果等于 其他 时,则执行该代码
871
+ break;
872
+ case '工业':
873
+ nature = 4 // 当表达式的结果等于 工业 时,则执行该代码
874
+ break;
875
+ case '中压':
876
+ nature = 5 // 当表达式的结果等于 中压 时,则执行该代码
877
+ break;
878
+ case '测试':
879
+ nature = 6 // 当表达式的结果等于 中压 时,则执行该代码
880
+ break;
881
+ default :
882
+ break; // 如果没有与表达式相同的值,则执行该代码
883
+ }
884
+
885
+ const newMonth = date.month >= 10 ? date.month : '0' + date.month //月份
886
+ const dataYm = date.year + '-01-01'
887
+ const newYear = date.year + 1
888
+ const year = date.year.toString().substring(2,4) //年份
889
+
890
+ let data = {
891
+ orgid: this.$login.f.orgid
892
+ }
893
+
894
+ let http = new HttpResetClass()
895
+ let res = await http.load('POST', 'rs/sql/contractCount', {data:data}, {
896
+ resolveMsg: null,
897
+ rejectMsg: null
898
+ })
899
+ let oldDate
900
+ for (const item of res.data) {
901
+ if (item.name === '合同编号最后更新日期'){
902
+ oldDate = item.value
903
+ }
904
+ }
905
+ for (const item of res.data){
906
+ if (item.name === '合同编号'){
907
+ if (item.value === 0 || Date.parse(oldDate) < Date.parse(dataYm)) {
908
+ f_contract_number = dir + type + nature + year + newMonth + '001'
909
+ console.log("触发if", f_contract_number)
910
+ } else {
911
+ let count = item.value
912
+ f_contract_number = dir + type + nature + year + newMonth + this.PrefixInteger(count, 3)
913
+ console.log("触发else", f_contract_number)
914
+ }
915
+ }
916
+ }
917
+ this.selectdata.f_contract_number = f_contract_number
918
+ this.show_data.f_contract_number = f_contract_number
919
+ return f_contract_number
920
+ },
921
+ PrefixInteger(num, n) {
922
+ return (Array(n).join(0) + num).slice(-n);
923
+ },
924
+ // 单价失去焦点
925
+ async priceSum () {
926
+ if (isEmpty(this.show_data.f_price)) {
927
+ return
928
+ }
929
+ let data = {
930
+ operator: '*',
931
+ num1: this.show_data.f_price,
932
+ num2: this.show_data.f_install_count
933
+ }
934
+ let http = new HttpResetClass()
935
+ let res = await http.load(
936
+ 'POST',
937
+ `rs/logic/compute`,
938
+ {data: data},
939
+ {resolveMsg: null, rejectMsg: '工程材料费计算失败!!!'}
940
+ )
941
+
942
+ this.setLabelValue('工程材料费', res.data)
943
+ },
944
+ },
945
+ events: {
946
+ 'priceType'(index){
947
+ this.Pricetype = this.getLableValue('所属类型')
948
+ console.log('打印方法值',this.getPrice(this.show_data.f_price_id))
949
+ for (const item of this.show_data.fields) {
950
+ if (this.show_data.f_sprice_type !=null && this.show_data.f_sprice_type !='') {
951
+ if(item.label==='气价名称'){
952
+ this.getPrice().then(value =>{
953
+ item.options=value
954
+ })
955
+ console.log('最终',item.options)
956
+ }
957
+ }
958
+ }
959
+ },
960
+ 'complyInstallation' (index) {
961
+ if (this.show_data.f_is_have === '否') {
962
+ this.hideButtons('提交', '出图', '缴费')
963
+ this.showButtons('终止')
964
+ }
965
+ if (this.show_data.f_is_have === '是') {
966
+ this.hideButtons('终止')
967
+ this.showButtons('提交', '出图', '缴费')
968
+ }
969
+ },
970
+ async 'igniteDispatchReadyEvent' () {
971
+ let data = {
972
+ tablename: 'activityins',
973
+ condition: `processid = '${this.show_data.f_process_id}' and defname = '工程施工' and state = '结束'`
974
+ }
975
+ let http = new HttpResetClass()
976
+ let res = await http.load(
977
+ 'POST',
978
+ `rs/sql/apply_singleTable`,
979
+ {data: data},
980
+ {resolveMsg: null, rejectMsg: '查询失败!!!'}
981
+ )
982
+ if (res.data.length <= 0) {
983
+ console.log('+++++++++++++++++++++++++++++')
984
+ console.log('没有施工,不能退回')
985
+ this.hideButtons('退回')
986
+ }
987
+ },
988
+ 'buildReadyEvent' () {
989
+ this.setLabelValue('施工单位', this.$login.f.name)
990
+ this.setLabelValue('施工安装时间', new Date().Format('yyyy-MM-dd HH:mm:ss'))
991
+ },
992
+ // 选择材料
993
+ async materialNameChenge (index, fieldIndex) {
994
+ let material = this.show_data.onetomany[index].fields[fieldIndex].value
995
+
996
+ this.show_data.onetomany[index].fields.forEach(item => {
997
+ if (material[item.field]) {
998
+ item.value = material[item.field]
999
+ }
1000
+ })
1001
+ },
1002
+ // 打开模态框获取材料
1003
+ async 'getMaterialName' (index) {
1004
+ let data = {
1005
+ condition: `1=1`
1006
+ }
1007
+ let http = new HttpResetClass()
1008
+ let res = await http.load(
1009
+ 'POST',
1010
+ `rs/sql/getStockMaterial`,
1011
+ {data: data},
1012
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
1013
+ )
1014
+
1015
+ this.show_data.onetomany[index].fields.forEach(field => {
1016
+ if (field.label === '选择材料') {
1017
+ field.options = res.data.map(item => {
1018
+ return {
1019
+ 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}`,
1020
+ 'value': item
1021
+ }
1022
+ })
1023
+ }
1024
+ })
1025
+ },
1026
+ // 搜索小区
1027
+ async 'searchArea' (area, index) {
1028
+ let data = {
1029
+ tablename: 't_area',
1030
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}' and f_residential_area like '%${area}%'`
1031
+ }
1032
+ let http = new HttpResetClass()
1033
+ let res = await http.load(
1034
+ 'POST',
1035
+ `rs/sql/apply_singleTable`,
1036
+ {data: data},
1037
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1038
+ )
1039
+
1040
+ if (res.data.length === 0) {
1041
+ return
1042
+ }
1043
+
1044
+ this.setLabelOptions('集收单位', res.data.map(item => {
1045
+ return {
1046
+ label: item.f_residential_area,
1047
+ value: item.f_residential_area
1048
+ }
1049
+ }))
1050
+ },
1051
+ // 搜索小区
1052
+ async 'searchAreaCollective' (area, index) {
1053
+ let data = {
1054
+ tablename: 't_area',
1055
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_residential_area like '%${area}%'`
1056
+ }
1057
+ let http = new HttpResetClass()
1058
+ let res = await http.load(
1059
+ 'POST',
1060
+ `rs/sql/apply_singleTable`,
1061
+ {data: data},
1062
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1063
+ )
1064
+
1065
+ if (res.data.length === 0) {
1066
+ return
1067
+ }
1068
+
1069
+ this.setLabelOptions('集收单位', res.data.map(item => {
1070
+ return {
1071
+ label: item.f_residential_area,
1072
+ value: item.f_residential_area
1073
+ }
1074
+ }))
1075
+ },
1076
+ // 选择气价
1077
+ 'priceChange' (index) {
1078
+ if (isEmpty(this.show_data.stairPrice)) {
1079
+ return
1080
+ }
1081
+
1082
+ let stairPrice = this.getLableValue('气价名称')
1083
+
1084
+ this.setLabelValue('气价类型', stairPrice.f_price_type)
1085
+ this.setLabelValue('用气性质', stairPrice.f_gasproperties)
1086
+ this.setLabelValue('价格', stairPrice.f_price)
1087
+ this.setLabelValue('客户类型', stairPrice.f_user_type)
1088
+ this.show_data.f_price_id = stairPrice.id
1089
+ this.show_data.f_price_name = stairPrice.f_price_name
1090
+ },
1091
+ // 选择开发商
1092
+ // async 'devInfoChange' (index) {
1093
+ // if (isEmpty(this.show_data.f_company_name)) {
1094
+ // return
1095
+ // }
1096
+ // let data = {
1097
+ // tablename: 't_dev_info',
1098
+ // condition: `f_orgid = '${this.$login.f.orgid}' and f_dev_name = '${this.show_data.f_company_name}'`
1099
+ // }
1100
+ // let res = await this.$resetpost(
1101
+ // `rs/sql/apply_singleTable`,
1102
+ // {data: data},
1103
+ // {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
1104
+ // )
1105
+ // this.show_data.f_dev_id = res.data[0].id
1106
+ // this.show_data.f_dev_code = res.data[0].f_dev_code
1107
+ // this.setLabelValue('法人名称', res.data[0].f_legal_person)
1108
+ // this.setLabelValue('身份证', res.data[0].f_idnumber)
1109
+ // this.setLabelValue('营业执照', res.data[0].f_license_num)
1110
+ // },
1111
+ // 退款金额
1112
+ 'refundMoneyChange' (index) {
1113
+ let f_cumulative_payment_money = this.show_data.f_cumulative_payment_money
1114
+ let f_refund_money = this.show_data.fields[index].value
1115
+
1116
+ if (f_refund_money > f_cumulative_payment_money) {
1117
+ this.$showAlert('退款金额不能大于累计缴费金额!!!', 'warning', 3000)
1118
+ this.show_data.fields[index].value = null
1119
+ }
1120
+ },
1121
+ // 检查重复
1122
+ 'checkRepeat' (index) {
1123
+ this.checkDuplicate(index)
1124
+ },
1125
+ // 选择报建项目
1126
+ 'selectApply' (row) {
1127
+ this.setLabelValue('工程名称', row.f_entry_name)
1128
+ this.setLabelValue('工程编号', row.f_apply_num)
1129
+ this.setLabelValue('报建类型', row.f_apply_type)
1130
+ this.setLabelValue('用户名称', row.f_user_name)
1131
+ this.setLabelValue('用户电话', row.f_phone)
1132
+ this.setLabelValue('证件类型', row.f_credentials)
1133
+ this.setLabelValue('证件号码', row.f_idnumber)
1134
+ this.setLabelValue('地址', row.f_address)
1135
+ this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
1136
+
1137
+ this.show_data.parentApply = JSON.parse(JSON.stringify(row))
1138
+
1139
+ delete row.id
1140
+ delete row.actid
1141
+ delete row.defid
1142
+ delete row.defname
1143
+ delete row.version
1144
+ delete row.f_apply_num
1145
+ delete row.f_sub_state
1146
+ delete row.f_apply_type
1147
+ delete row.f_process_id
1148
+
1149
+ this.show_data = Object.assign({}, this.show_data, row)
1150
+
1151
+ this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
1152
+ },
1153
+ // 是否终止
1154
+ 'isStopChange' (index) {
1155
+ let f_is_stop = this.show_data.f_is_stop
1156
+
1157
+ for (const item of this.show_data.fields) {
1158
+ if (f_is_stop === '是') {
1159
+ if (item.label === '终止原因') {
1160
+ item.hidden = false
1161
+ item.required = true
1162
+ }
1163
+ } else {
1164
+ if (item.label === '终止原因') {
1165
+ item.hidden = true
1166
+ item.required = false
1167
+ }
1168
+ }
1169
+ }
1170
+ },
1171
+ // 终止报建初始化
1172
+ async 'stopApplyReadyEvent' () {
1173
+
1174
+ let f_is_stop = this.getLableValue('是否终止')
1175
+
1176
+ for (const item of this.show_data.fields) {
1177
+ if (f_is_stop === '是') {
1178
+ if (item.label === '终止原因') {
1179
+ item.hidden = false
1180
+ item.required = true
1181
+ }
1182
+ } else {
1183
+ if (item.label === '终止原因') {
1184
+ item.hidden = true
1185
+ item.required = false
1186
+ }
1187
+ }
1188
+ }
1189
+
1190
+ if (isEmpty(this.show_data.f_parent_process_id)) {
1191
+ return
1192
+ }
1193
+ let data = {
1194
+ condition: `f_process_id = '${this.show_data.f_parent_process_id}'`,
1195
+ data: {
1196
+ id: this.$login.f.id,
1197
+ orgid: this.$login.f.orgid
1198
+ }
1199
+ }
1200
+ let res = await this.$resetpost(
1201
+ `rs/sql/supervisory`,
1202
+ {data: data},
1203
+ {resolveMsg: null, rejectMsg: '项目查询失败!!!'}
1204
+ )
1205
+ this.show_data.parentApply = res.data[0]
1206
+ },
1207
+ // 选择用户档案信息
1208
+ 'selectUserinfo' (row) {
1209
+ this.setLabelValue('用户编号', row.f_userinfo_code)
1210
+ this.setLabelValue('用户名称', row.f_user_name)
1211
+ this.setLabelValue('用户电话', row.f_user_phone)
1212
+ this.setLabelValue('证件类型', row.f_credentials)
1213
+ this.setLabelValue('证件号码', row.f_idnumber)
1214
+ this.setLabelValue('地址', row.f_address)
1215
+
1216
+ this.show_data.f_userinfo_id = row.f_userinfo_id
1217
+ this.show_data.f_userinfo_code = row.f_userinfo_code
1218
+ },
1219
+ // 是否购买保险
1220
+ async 'isInsureChange' (index) {
1221
+ if (!this.show_data.f_is_insure) {
1222
+ return
1223
+ }
1224
+ let f_is_insure = this.show_data.f_is_insure
1225
+ for (const item of this.show_data.fields) {
1226
+ if (f_is_insure === '是') {
1227
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1228
+ item.hidden = false
1229
+ item.required = true
1230
+ }
1231
+ if (item.label === '保险备注') {
1232
+ item.hidden = false
1233
+ }
1234
+ } else {
1235
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1236
+ item.hidden = true
1237
+ item.required = false
1238
+ }
1239
+ }
1240
+ }
1241
+ },
1242
+ // 通气点火初始化
1243
+ async 'gasReadyEvent' () {
1244
+ // 是否有气价信息
1245
+ if (!isEmpty(this.show_data.f_price_id)) {
1246
+ let priceList = await this.getPrice(this.show_data.f_price_id)
1247
+ this.setLabelValue('气价名称', priceList[0].value)
1248
+ }
1249
+
1250
+ let data = {
1251
+ tablename: 't_userfees',
1252
+ condition: `f_orgid = '${this.$login.f.orgid}' and f_userinfo_id = '${this.show_data.f_userinfo_id}' and f_state = '待执行'`
1253
+ }
1254
+ let http = new HttpResetClass()
1255
+ let res = await http.load(
1256
+ 'POST',
1257
+ `rs/sql/apply_singleTable`,
1258
+ {data: data},
1259
+ {resolveMsg: null, rejectMsg: '保险查询失败!!!'}
1260
+ )
1261
+ if (res.data.length > 0) {
1262
+ this.setLabelValue('待执行保险', '是')
1263
+ for (const item of this.show_data.fields) {
1264
+ if (item.label === '保费开始日期' || item.label === '是否购买保险' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1265
+ item.hidden = true
1266
+ item.required = false
1267
+ item.value = null
1268
+ }
1269
+ }
1270
+ } else {
1271
+ this.setLabelValue('待执行保险', '否')
1272
+ for (const item of this.show_data.fields) {
1273
+ if (item.label === '是否购买保险' || item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1274
+ item.hidden = false
1275
+ item.required = true
1276
+ }
1277
+ }
1278
+ }
1279
+
1280
+ // 保险初始化显示内容
1281
+ let f_is_insure = this.getLableValue('是否购买保险')
1282
+ for (const item of this.show_data.fields) {
1283
+ if (f_is_insure === '是') {
1284
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1285
+ item.hidden = false
1286
+ item.required = true
1287
+ }
1288
+ if (item.label === '保险备注') {
1289
+ item.hidden = false
1290
+ }
1291
+ // 本期保费到期时间默认一年
1292
+ if (isEmpty(this.selectdata.f_ins_expiration_date)) {
1293
+ let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
1294
+ this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
1295
+ }
1296
+ }
1297
+ if (f_is_insure === '否') {
1298
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1299
+ item.hidden = true
1300
+ item.required = false
1301
+ }
1302
+ }
1303
+ }
1304
+ },
1305
+ // 合同金额失去焦点
1306
+ async 'contractMoneyChange' (index) {
1307
+ let data = {
1308
+ operator: '+',
1309
+ num1: this.show_data.f_contract_money || 0,
1310
+ num2: this.getLableValue('追加金额') || 0
1311
+ }
1312
+ let res = await this.$resetpost(
1313
+ `rs/logic/compute`,
1314
+ {data: data},
1315
+ {resolveMsg: null, rejectMsg: '金额计算失败!!!'}
1316
+ )
1317
+
1318
+ this.setLabelValue('应交金额', res.data)
1319
+ },
1320
+ // 街道失去焦点
1321
+ async 'streetChange' (index) {
1322
+ if (isEmpty(this.show_data.f_street)) {
1323
+ return
1324
+ }
1325
+
1326
+ this.setLabelValue('集收单位', null)
1327
+
1328
+ let data = {
1329
+ tablename: 't_area',
1330
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
1331
+ }
1332
+ let http = new HttpResetClass()
1333
+ let res = await http.load(
1334
+ 'POST',
1335
+ `rs/sql/apply_singleTable`,
1336
+ {data: data},
1337
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1338
+ )
1339
+
1340
+ this.setLabelOptions('集收单位', res.data.map(item => {
1341
+ return {
1342
+ label: item.f_residential_area,
1343
+ value: item.f_residential_area
1344
+ }
1345
+ }))
1346
+ },
1347
+ // 区县失去焦点
1348
+ async 'pcdChange' (index) {
1349
+ if (isEmpty(this.show_data.f_pcd)) {
1350
+ return
1351
+ }
1352
+
1353
+ this.setLabelValue('街道/乡镇', null)
1354
+ this.setLabelValue('集收单位', null)
1355
+
1356
+
1357
+
1358
+ let data = {
1359
+ tablename: 't_street',
1360
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1361
+ }
1362
+ let f_address_type = this.getLableValue('地址类型')
1363
+
1364
+ if (f_address_type === '民用市区') {
1365
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
1366
+ }
1367
+ if (f_address_type === '民用乡镇') {
1368
+ data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
1369
+ }
1370
+
1371
+ let http = new HttpResetClass()
1372
+ let res = await http.load(
1373
+ 'POST',
1374
+ `rs/sql/apply_singleTable`,
1375
+ {data: data},
1376
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
1377
+ )
1378
+
1379
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
1380
+ return {
1381
+ label: item.f_street,
1382
+ value: item.f_street
1383
+ }
1384
+ }))
1385
+ },
1386
+ // 地址类型失去焦点
1387
+ 'addressTypeChange' (index) {
1388
+ this.setLabelValue('街道/乡镇', null)
1389
+ this.setLabelValue('集收单位', null)
1390
+ let f_address_type = this.show_data.fields[index].value
1391
+ for (const item of this.show_data.fields) {
1392
+ if (f_address_type === '民用市区') {
1393
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
1394
+ item.hidden = false
1395
+ item.required = true
1396
+ item.value = null
1397
+ }
1398
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1399
+ item.hidden = false
1400
+ item.required = false
1401
+ item.value = null
1402
+ }
1403
+ if (item.label === '地址') {
1404
+ item.readonly = true
1405
+ item.value = null
1406
+ }
1407
+ }
1408
+ if (f_address_type === '民用乡镇') {
1409
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
1410
+ item.hidden = false
1411
+ item.required = true
1412
+ item.value = null
1413
+ }
1414
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1415
+ item.hidden = false
1416
+ item.required = false
1417
+ item.value = null
1418
+ }
1419
+ if (item.label === '楼层') {
1420
+ item.hidden = true
1421
+ item.required = false
1422
+ item.value = null
1423
+ }
1424
+ if (item.label === '地址') {
1425
+ item.readonly = true
1426
+ item.value = null
1427
+ }
1428
+ }
1429
+ if (f_address_type === '特殊地址') {
1430
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
1431
+ item.hidden = false
1432
+ item.required = true
1433
+ item.value = null
1434
+ }
1435
+ if (item.label === '集收单位') {
1436
+ item.hidden = false
1437
+ item.required = false
1438
+ item.value = null
1439
+ }
1440
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
1441
+ item.hidden = true
1442
+ item.required = false
1443
+ item.value = null
1444
+ }
1445
+ if (item.label === '地址') {
1446
+ item.readonly = false
1447
+ item.value = null
1448
+ }
1449
+ }
1450
+ }
1451
+ },
1452
+ // 团购转散户初始化
1453
+ 'apply2ReadyEvent' () {
1454
+ if (this.show_data.f_apply_source === '线下发起') {
1455
+ this.addressInitialization()
1456
+ this.hideLabels('用户编号')
1457
+ this.electiveLabels('用户编号')
1458
+ this.showLabels('片区', '地址类型')
1459
+ this.requiredLabels('片区', '地址类型')
1460
+ }
1461
+ if (this.show_data.f_apply_source === '自动发起') {
1462
+ this.hideLabels('片区', '地址类型')
1463
+ this.electiveLabels('片区', '地址类型',)
1464
+ }
1465
+ },
1466
+ // 申请节点初始化
1467
+ 'applyReadyEvent' () {
1468
+ this.addressInitialization()
1469
+ this.pcdChange()
1470
+ this.streetChange()
1471
+ },
1472
+ // ===========================================
1473
+ async 'button'() {
1474
+ if (this.show_data.button.before) {
1475
+ await this[this.show_data.button.before]()
1476
+ }
1477
+ // 点击重置按钮就重置数据
1478
+ if (this.show_data.button.button_name === '重置') {
1479
+ this.$dispatch('breakControl', this.selectdata)
1480
+ return
1481
+ }
1482
+
1483
+ this.show_data.user = this.$login.f
1484
+ this.show_data.start_activity = this.$workflow_vue.start_activity
1485
+ this.show_data.xmlfilename = this.$workflow_vue.workflow_xmlfilename
1486
+
1487
+ if ((this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') && this.show_data.defname === '工程施工' && this.show_data.f_sub_state !='完工' && this.show_data.button.button_name === '完工'){
1488
+ //判断是否添加报警器材料
1489
+ let bjqlag = false
1490
+ let datatemp = {
1491
+ 'bjqid':"",
1492
+ 'fprocessid':"",
1493
+ 'sqvalue':"",
1494
+ 'f_bjq_sid':"",
1495
+ 'f_material_code':"",
1496
+ 'f_bjq_baidu_lng':"",
1497
+ 'f_bjq_baidu_lat':"",
1498
+ 'f_bjq_gaode_lng':"",
1499
+ 'f_bjq_gaode_lat':""
1500
+ }
1501
+
1502
+ let bjqststedata = {
1503
+ "sid":"",
1504
+ "bjqtype":"",
1505
+ "f_process_id":"",
1506
+ "bjqstate":"",
1507
+ "f_userinfo_code":""
1508
+ }
1509
+ let numOne = [];
1510
+
1511
+ let http = new HttpResetClass()
1512
+ let data = {
1513
+ tablename: `t_material_apply`,
1514
+ condition: `f_process_id='${this.show_data.f_process_id}'`
1515
+ }
1516
+ let res = await http.load(
1517
+ 'POST',
1518
+ `rs/sql/apply_singleTable`,
1519
+ {data: data},
1520
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
1521
+ )
1522
+ res.data.forEach(item => {
1523
+ if (item.f_material_name.substr(0,3) === '报警器'){
1524
+ var bjname = item.f_material_name.split("-")
1525
+ bjqststedata.sid = item.f_bjq_sid
1526
+ bjqststedata.f_process_id = item.f_process_id
1527
+ bjqststedata.bjqtype = bjname[1]
1528
+ //====================================
1529
+ bjqlag = true
1530
+ datatemp.bjqid = item.id
1531
+ datatemp.fprocessid = item.f_process_id
1532
+ datatemp.f_bjq_sid = item.f_bjq_sid
1533
+ datatemp.f_material_code = item.f_material_code
1534
+ datatemp.f_bjq_lng = item.f_bjq_lng
1535
+ datatemp.f_bjq_lat = item.f_bjq_lat
1536
+ datatemp.f_bjq_gaode_lng = item.f_bjq_gaode_lng
1537
+ datatemp.f_bjq_gaode_lat = item.f_bjq_gaode_lng
1538
+ datatemp.f_bjq_baidu_lng = item.f_bjq_baidu_lng
1539
+ datatemp.f_bjq_baidu_lat = item.f_bjq_baidu_lat
1540
+ numOne.push(item.f_bjq_sid)
1541
+ }
1542
+ })
1543
+
1544
+ // this.show_data.onetomany.forEach(item=>{
1545
+ // console.log("查看报警器材料",item)
1546
+ // item.rows.forEach(i=>{
1547
+ // if (i.f_material_name.substr(0,3) === '报警器'){
1548
+ // var bjname = i.f_material_name.split("-")
1549
+ // bjqststedata.sid = i.f_bjq_sid
1550
+ // bjqststedata.f_process_id = i.f_process_id
1551
+ // bjqststedata.bjqtype = bjname[1]
1552
+ // //====================================
1553
+ // bjqlag = true
1554
+ // datatemp.bjqid = i.id
1555
+ // datatemp.fprocessid = i.f_process_id
1556
+ // datatemp.f_bjq_sid = i.f_bjq_sid
1557
+ // datatemp.f_material_code = i.f_material_code
1558
+ // numOne.push(i.f_bjq_sid)
1559
+ // }
1560
+ // })
1561
+ // })
1562
+ if (!bjqlag){
1563
+ this.$showMessage('请添加报警器物料信息!!!')
1564
+ return
1565
+ }
1566
+ if (numOne.length > 1){
1567
+ this.$showMessage("暂时支持单个报警器物料安装!!!")
1568
+ return
1569
+ }
1570
+ datatemp.sqvalue = this.show_data.areaData.sqvalue
1571
+ datatemp.f_bjq_baidu_lng = this.show_data.templatlng.baidutemplng
1572
+ datatemp.f_bjq_baidu_lat = this.show_data.templatlng.baidutemplat
1573
+ datatemp.f_bjq_gaode_lng = this.show_data.templatlng.gaodetemplng
1574
+ datatemp.f_bjq_gaode_lat = this.show_data.templatlng.gaodetemplat
1575
+ datatemp.f_bjq_lng = this.show_data.templatlng.baidutemplng
1576
+ datatemp.f_bjq_lat = this.show_data.templatlng.baidutemplat
1577
+
1578
+ bjqststedata.f_userinfo_code = this.show_data.f_userinfo_code
1579
+
1580
+ //判断是否推送 及推送的状态
1581
+ //查询是否存在, 以型号及厂家判断
1582
+ let bjqres = await this.$resetpost(
1583
+ `rs/logic/getbjqsyncinfo`,
1584
+ bjqststedata
1585
+ )
1586
+ if (bjqres.data.bjqstate != "成功"){
1587
+ //区域地址存入材料记录表
1588
+ let areares = await this.$resetpost(
1589
+ `rs/logic/saveArea`,
1590
+ {data: datatemp},
1591
+ {resolveMsg: null, rejectMsg: '区域地址保存失败'}
1592
+ )
1593
+
1594
+ //完工之后推送数据到汉威
1595
+ let adddata = {
1596
+ f_bjq_sid : datatemp.f_bjq_sid,
1597
+ f_material_code : datatemp.f_material_code,
1598
+ f_bjq_address: this.show_data.areaData.sqvalue,
1599
+ f_user_name: this.show_data.f_user_name,
1600
+ f_address: this.show_data.f_address,
1601
+ f_user_phone: this.show_data.f_phone,
1602
+ f_userinfo_code: this.show_data.f_userinfo_code,
1603
+ installtime: this.show_data.f_construction_date,
1604
+ f_orgid : this.show_data.f_orgid,
1605
+ f_bjq_lng: datatemp.f_bjq_baidu_lng,
1606
+ f_bjq_lat: datatemp.f_bjq_baidu_lat
1607
+ }
1608
+ let res = await this.$resetpost(
1609
+ `ncc/rs/logic/bjqadduser`,
1610
+ // `rs/logic/bjqadduser`,
1611
+ adddata
1612
+ )
1613
+ if (res.data.code != 200){
1614
+ if (bjqres.data.bjqstate.length == 0){
1615
+ bjqststedata.bjqstate = "失败"
1616
+ let bjqres3 = await this.$resetpost(
1617
+ `rs/logic/addbjqsyncinfo`,
1618
+ bjqststedata
1619
+ )
1620
+ }
1621
+ this.$showMessage(res.data.msg)
1622
+ return
1623
+ }
1624
+ //更改记录表状态
1625
+ if (bjqres.data.bjqstate === "失败"){
1626
+ bjqststedata.bjqstate = "成功"
1627
+ let bjqres1 = await this.$resetpost(
1628
+ `rs/logic/updatebjqsyncinfo`,
1629
+ bjqststedata
1630
+ )
1631
+ }else{
1632
+ bjqststedata.bjqstate = "成功"
1633
+ let bjqres2 = await this.$resetpost(
1634
+ `rs/logic/addbjqsyncinfo`,
1635
+ bjqststedata
1636
+ )
1637
+ }
1638
+ }
1639
+ }
1640
+ if ((this.show_data.f_apply_type === '工商户报建' || this.show_data.f_apply_type === '团购报建')
1641
+ && (this.show_data.defname === '报装申请') && this.show_data.button.button_name === '提交'){
1642
+ await this.contract_number()
1643
+ }
1644
+ // if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && (this.show_data.button.button_name === '保存'||this.show_data.button.button_name === '提交')){
1645
+ // let dataz = {
1646
+ // condition: `u.id = ${this.show_data.id}`,
1647
+ // data: {
1648
+ // id: this.$login.f.id,
1649
+ // orgid: this.$login.f.orgid
1650
+ // }
1651
+ // }
1652
+ // let http = new HttpResetClass()
1653
+ // let restpz = await http.load(
1654
+ // 'POST',
1655
+ // `rs/sql/checkuser`,
1656
+ // {data: dataz},
1657
+ // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1658
+ // )
1659
+ // this.show_data.actid=restpz.data[0].actid
1660
+ // }
1661
+ let res = await this.$resetpost(
1662
+ `rs/logic/ApplyProductService`,
1663
+ {data: this.show_data},
1664
+ {resolveMsg: null, rejectMsg: '数据保存失败'}
1665
+ )
1666
+
1667
+
1668
+ if (this.show_data.button.after) {
1669
+ this[this.show_data.button.after]()
1670
+ }
1671
+ // // 改管报建 增容报建 优化
1672
+ // if((this.show_data.f_apply_type === '改管报建'||this.show_data.f_apply_type === '增容报建') && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '缴费'){
1673
+ // let datagg = {
1674
+ // condition: `t.f_process_id='${this.show_data.f_process_id}'`,
1675
+ // }
1676
+ // let http = new HttpResetClass()
1677
+ // let restgg = await http.load(
1678
+ // 'POST',
1679
+ // `rs/sql/checkusertwo`,
1680
+ // {data: datagg},
1681
+ // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1682
+ // )
1683
+ // debugger
1684
+ // if(this.show_data.f_apply_type === '改管报建'){
1685
+ // restgg.data[0].processname = '改管报建流程'
1686
+ // restgg.data[0].defname = '报装缴费'
1687
+ // }else{
1688
+ // restgg.data[0].processname = '增容报建流程'
1689
+ // restgg.data[0].defname = '报装缴费'
1690
+ // }
1691
+ // restgg.data[0].actid = restgg.data[0].actid + 1
1692
+ // this.$dispatch('apply',restgg.data[0])
1693
+ //
1694
+ // }
1695
+ //
1696
+ // // 退款报建 优化
1697
+ // if(this.show_data.f_apply_type === '退款报建' && this.show_data.defname === '终止报建' && this.show_data.button.button_name === '提交'){
1698
+ // let datatk = {
1699
+ // condition: `t.f_process_id='${this.show_data.f_process_id}'`,
1700
+ // }
1701
+ // let http = new HttpResetClass()
1702
+ // let resttk = await http.load(
1703
+ // 'POST',
1704
+ // `rs/sql/checkusertwo`,
1705
+ // {data: datatk},
1706
+ // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1707
+ // )
1708
+ // debugger
1709
+ // resttk.data[0].processname = '退款报建流程'
1710
+ // resttk.data[0].defname = '退款'
1711
+ // this.$dispatch('apply',resttk.data[0])
1712
+ //
1713
+ // }
1714
+ //
1715
+ //
1716
+ // if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '合同'){
1717
+ // let data = {
1718
+ // tablename: 't_apply',
1719
+ // condition: `f_process_id='${this.show_data.f_process_id}'`
1720
+ // }
1721
+ // let http = new HttpResetClass()
1722
+ // let restp = await http.load(
1723
+ // 'POST',
1724
+ // `rs/sql/apply_singleTable`,
1725
+ // {data: data},
1726
+ // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1727
+ // )
1728
+ // debugger
1729
+ // restp.data[0].processname = '散户报建流程'
1730
+ // restp.data[0].defname = '合同签订'
1731
+ // this.$dispatch('apply',restp.data[0])
1732
+ //
1733
+ // } else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && this.show_data.button.button_name === '提交'){
1734
+ // let data2 = {
1735
+ // condition: `u.id = ${this.show_data.id}`,
1736
+ // data: {
1737
+ // id: this.$login.f.id,
1738
+ // orgid: this.$login.f.orgid
1739
+ // }
1740
+ // }
1741
+ // let http = new HttpResetClass()
1742
+ // let restp1 = await http.load(
1743
+ // 'POST',
1744
+ // `rs/sql/checkuser`,
1745
+ // {data: data2},
1746
+ // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1747
+ // )
1748
+ // debugger
1749
+ // console.log('有没有发请求打印查询的内容restp1',restp1)
1750
+ // // restp1.data[0].processname = '散户报建流程'
1751
+ // // restp1.data[0].defname = '报装缴费'
1752
+ // this.$dispatch('apply',restp1.data[0])
1753
+ // }else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装缴费' && this.show_data.button.button_name === '提交'){
1754
+ // let data3 = {
1755
+ // condition: `u.id = ${this.show_data.id}`,
1756
+ // data: {
1757
+ // id: this.$login.f.id,
1758
+ // orgid: this.$login.f.orgid
1759
+ // }
1760
+ // }
1761
+ // let http = new HttpResetClass()
1762
+ // let restp2 = await http.load(
1763
+ // 'POST',
1764
+ // `rs/sql/checkuser`,
1765
+ // {data: data3},
1766
+ // {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
1767
+ // )
1768
+ // debugger
1769
+ // console.log('打印查询的内容',restp2)
1770
+ // if(restp2.length>0){
1771
+ // this.$dispatch('apply',restp2.data[0])
1772
+ // }else{
1773
+ // debugger
1774
+ // this.$dispatch('loadPage')
1775
+ // }
1776
+ // }
1777
+ // else{
1778
+ // this.$dispatch('loadPage')
1779
+ // }
1780
+ this.$dispatch('loadPage')
1781
+ },
1782
+ // 失去焦点出触发事件
1783
+ 'onchange' (index) {
1784
+ if (this.show_data.defname === '报装申请' || this.show_data.defname === '信息确认') {
1785
+ debugger
1786
+ if (
1787
+ this.show_data.fields[index].label === '区/县' ||
1788
+ this.show_data.fields[index].label === '街道/乡镇' ||
1789
+ this.show_data.fields[index].label === '集收单位' ||
1790
+ this.show_data.fields[index].label === '楼号/组' ||
1791
+ this.show_data.fields[index].label === '单元/排' ||
1792
+ this.show_data.fields[index].label === '楼层' ||
1793
+ this.show_data.fields[index].label === '门牌号'
1794
+ ) {
1795
+
1796
+ let f_pcd = this.getLableValue('区/县') || ''
1797
+ let f_street = this.getLableValue('街道/乡镇') || ''
1798
+ let f_residential_area = this.getLableValue('集收单位') || ''
1799
+ let f_building = this.getLableValue('楼号/组') || ''
1800
+ // let f_building_suffix = f_building ? this.config.f_building_suffix : ''
1801
+ let f_building_suffix = f_building ? '号楼' : ''
1802
+ let f_unit = this.getLableValue('单元/排') || ''
1803
+ // let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
1804
+ let f_unit_suffix = f_unit ? '单元' : ''
1805
+ let f_floor = this.getLableValue('楼层') || ''
1806
+ // let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
1807
+ let f_floor_suffix = f_floor ? '层' : ''
1808
+ let f_room = this.getLableValue('门牌号') || ''
1809
+ // let f_room_suffix = f_room ? this.config.f_room_suffix : ''
1810
+ let f_room_suffix = f_room ? '室' : ''
1811
+
1812
+ let f_address = f_pcd + f_street + f_residential_area + f_building + f_building_suffix + f_unit + f_unit_suffix + f_floor + f_floor_suffix + f_room + f_room_suffix
1813
+ this.setLabelValue("地址", f_address)
1814
+ }
1815
+ }
1816
+ },
1817
+ selectSearch (val, index) {},
1818
+ 'onblur' (index) {},
1819
+ 'oninput' (index) {},
1820
+ 'initializtionView' () {},
1821
+ async 'onchangeModal' (index, fieldIndex) {
1822
+ },
1823
+ async 'onblurModal' (index, fieldIndex) {
1824
+
1825
+ },
1826
+ async 'oninputModal' (index, fieldIndex) {
1827
+
1828
+ },
1829
+ async 'onetomanydelete' (index, rowIndex) {
1830
+
1831
+ let http = new HttpResetClass()
1832
+
1833
+ let res = await http.load(
1834
+ 'DELETE',
1835
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
1836
+ null,
1837
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
1838
+ )
1839
+
1840
+ res = await this.$resetpost(
1841
+ 'rs/entity/t_apply',
1842
+ this.show_data
1843
+ )
1844
+
1845
+ this.$dispatch('breakControl', this.show_data)
1846
+ },
1847
+ async 'onetomanyupdate' (index, rowIndex) {
1848
+ let data = this.show_data.onetomany[index].rows[rowIndex]
1849
+
1850
+ this.show_data.onetomany[index].fields.forEach(item => {
1851
+ data[item.field] = item.value
1852
+ })
1853
+ let res = await this.$resetpost(
1854
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1855
+ data
1856
+ )
1857
+
1858
+ res = await this.$resetpost(
1859
+ 'rs/entity/t_apply',
1860
+ this.show_data
1861
+ )
1862
+
1863
+ this.$dispatch('breakControl', this.show_data)
1864
+ },
1865
+ async 'onetomanyadd' (index) {
1866
+ let data = {
1867
+ f_process_id : this.show_data.f_process_id,
1868
+ f_operator_id: this.$login.f.id,
1869
+ f_operator: this.$login.f.name,
1870
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
1871
+ f_orgid: this.$login.f.orgid,
1872
+ f_orgname: this.$login.f.orgs
1873
+ }
1874
+ this.show_data.onetomany[index].fields.forEach(item => {
1875
+ data[item.field] = item.value
1876
+ })
1877
+ let res = await this.$resetpost(
1878
+ `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1879
+ data
1880
+ )
1881
+
1882
+ res = await this.$resetpost(
1883
+ 'rs/entity/t_apply',
1884
+ this.show_data
1885
+ )
1886
+
1887
+ this.$dispatch('breakControl', this.show_data)
1888
+ },
1889
+ async 'importEvent' (index, table, configName, filepath) {
1890
+ let data = {
1891
+ selectdata: this.show_data,
1892
+ table: table,
1893
+ filepath: filepath,
1894
+ configName: configName,
1895
+ user: this.$login.f
1896
+ }
1897
+
1898
+ let res = await this.$resetpost(
1899
+ `rs/logic/importEvent`,
1900
+ data
1901
+ )
1902
+
1903
+ this.$dispatch('breakControl', this.show_data)
1904
+ },
1905
+ 'onbutchange' (index) {
1906
+
1907
+ },
1908
+ 'onbutblur' (index) {
1909
+
1910
+ },
1911
+ 'onbutinput' (index) {
1912
+
1913
+
1914
+ }
1915
+ },
1916
+ watch: {
1917
+ }
1918
+ }
1919
+ </script>
1920
+ <style scoped>
1921
+ /*清除model中的浮动*/
1922
+ .clearfix:after,.clearfix:before{
1923
+ display: table;
1924
+ }
1925
+ .clearfix:after{
1926
+ clear: both;
1927
+ }
1928
+ </style>