apply-clients 3.5.4-8 → 3.5.4-80

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 (103) hide show
  1. package/build/dev-server.js +6 -2
  2. package/package.json +2 -2
  3. package/src/App.vue +4 -4
  4. package/src/apply.js +2 -3
  5. package/src/applyAndroid.js +2 -0
  6. package/src/assets//344/270/213/350/275/275.png +0 -0
  7. package/src/components/android/AppCheckTakePic.vue +168 -0
  8. package/src/components/android/Process/AppServiceControl.vue +4 -0
  9. package/src/components/android/Process/Processes/AppChargeManagementNew.vue +637 -0
  10. package/src/components/image/dxf.png +0 -0
  11. package/src/components/product/Function/Service/FunctionServiceControl.vue +1 -1
  12. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  13. package/src/components/product/MaterialsManage/MaterialsBase.vue +5 -1
  14. package/src/components/product/MaterialsManage/MaterialsManage.vue +2 -2
  15. package/src/components/product/PcZhihuanManagement.vue +160 -0
  16. package/src/components/product/Process/ExplorationSelect.vue +4 -1
  17. package/src/components/product/Process/ExplorationUser.vue +1 -0
  18. package/src/components/product/Process/Processes/chargeManagement.vue +1 -1
  19. package/src/components/product/ServiceView.vue +22 -1
  20. package/src/components/product/Supervisory/SupervisoryControl.vue +1 -0
  21. package/src/filiale/baiyin/android/AppServiceControl.vue +1762 -0
  22. package/src/filiale/baiyin/android/ByAddMaterialScience.vue +823 -0
  23. package/src/filiale/baiyin/android/ByDeviceManagement.vue +916 -0
  24. package/src/filiale/baiyin/android.js +8 -0
  25. package/src/filiale/fugou/android/AppAddMaterialScience.vue +448 -0
  26. package/src/filiale/fugou/android/AppAddReplacement.vue +341 -0
  27. package/src/filiale/fugou/android/AppChargeManagement.vue +739 -625
  28. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -0
  29. package/src/filiale/fugou/android/AppInstallationDetails.vue +541 -0
  30. package/src/filiale/fugou/android/AppServiceControl.vue +38 -5
  31. package/src/filiale/fugou/android/AppZhihuanManagement.vue +191 -0
  32. package/src/filiale/fugou/android.js +7 -1
  33. package/src/filiale/fugou/pc/AddReplacement.vue +340 -0
  34. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -0
  35. package/src/filiale/fugou/pc/InstallationDetails.vue +54 -43
  36. package/src/filiale/fugou/pc/ServiceControl.vue +125 -379
  37. package/src/filiale/fugou/pc/ServiceView.vue +941 -0
  38. package/src/filiale/fugou/pc/addMaterialScience.vue +481 -0
  39. package/src/filiale/fugou/pc/addressAndUserinfoManagement.vue +216 -0
  40. package/src/filiale/fugou/pc/devicesManagement.vue +483 -0
  41. package/src/filiale/fugou/pc.js +13 -7
  42. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -481
  43. package/src/filiale/gongyi/android/AppDisclosurerecord.vue +214 -0
  44. package/src/filiale/gongyi/android/AppInstallationDetails.vue +15 -10
  45. package/src/filiale/gongyi/android/AppLegacyIssues.vue +309 -0
  46. package/src/filiale/gongyi/android/AppSign.vue +16 -3
  47. package/src/filiale/gongyi/android/AppSupplementalAgreement.vue +298 -0
  48. package/src/filiale/gongyi/android.js +3 -0
  49. package/src/filiale/gongyi/pc/ApplyUpload.vue +31 -39
  50. package/src/filiale/gongyi/pc/PcAddLogs.vue +12 -4
  51. package/src/filiale/gongyi/pc/PcDisclosurerecord.vue +218 -0
  52. package/src/filiale/gongyi/pc/PcLegacyIssues.vue +309 -0
  53. package/src/filiale/gongyi/pc/SupervisoryServiceControl.vue +1 -1
  54. package/src/filiale/gongyi/pc/SupervisoryServiceView.vue +1005 -0
  55. package/src/filiale/gongyi/pc/addMaterialScience.vue +43 -7
  56. package/src/filiale/gongyi/pc/chargeManagement.vue +765 -0
  57. package/src/filiale/gongyi/pc/supplementalAgreement.vue +277 -0
  58. package/src/filiale/gongyi/pc.js +6 -1
  59. package/src/filiale/hongda/pc/SupervisoryList.vue +13 -0
  60. package/src/filiale/jinhuang/pc/ServiceControl.vue +1925 -0
  61. package/src/filiale/jinhuang/pc/chargeManagementNew.vue +589 -0
  62. package/src/filiale/jinhuang/pc.js +7 -0
  63. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -0
  64. package/src/filiale/qianneng/android/AppExplorationUser.vue +490 -490
  65. package/src/filiale/qianneng/android/AppInstallationDetails.vue +541 -541
  66. package/src/filiale/qianneng/android.js +15 -14
  67. package/src/filiale/qianneng/pc/ApplyUpload.vue +5 -4
  68. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +704 -704
  69. package/src/filiale/qianneng/pc/Applydetail.vue +378 -383
  70. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  71. package/src/filiale/qianneng/pc/InstallationDetails.vue +614 -587
  72. package/src/filiale/qianneng/pc/ServiceControl.vue +1384 -1384
  73. package/src/filiale/qianneng/pc/printactivatecard.vue +311 -311
  74. package/src/filiale/ruihua/pc/ServiceControl.vue +20 -0
  75. package/src/filiale/ruihua/pc/printVentilation.vue +21 -6
  76. package/src/filiale/shexian/android/AppServiceControl.vue +12 -2
  77. package/src/filiale/shexian/android/AppTakePic.vue +15 -55
  78. package/src/filiale/siyangRH/android/AppAddMaterialScience.vue +0 -2
  79. package/src/filiale/siyangRH/pc/ApplyUpload.vue +324 -324
  80. package/src/filiale/siyangRH/pc/chargeManagement.vue +810 -0
  81. package/src/filiale/siyangRH/pc.js +1 -0
  82. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +527 -511
  83. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +639 -609
  84. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +12 -0
  85. package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +956 -961
  86. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1681 -1648
  87. package/src/filiale/yangchunboneng/android/AppSuperServiceControl.vue +1 -1
  88. package/src/filiale/yangchunboneng/android/AppUpload.vue +78 -9
  89. package/src/filiale/yangchunboneng/android/MaterIialOne.vue +31 -19
  90. package/src/filiale/yangchunboneng/android.js +1 -1
  91. package/src/filiale/yangchunboneng/pc/ApplyUpload.vue +235 -218
  92. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +548 -508
  93. package/src/filiale/yangchunboneng/pc/ExplorationUser.vue +191 -0
  94. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2075 -1871
  95. package/src/filiale/yangchunboneng/pc/SupervisoryControlNew.vue +142 -0
  96. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +69 -14
  97. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +628 -0
  98. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControl.vue +902 -0
  99. package/src/filiale/yangchunboneng/pc/SupervisoryServiceControlNew.vue +901 -0
  100. package/src/filiale/yangchunboneng/pc/SupervisoryServiceView.vue +1117 -0
  101. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1059 -960
  102. package/src/filiale/yangchunboneng/pc.js +7 -1
  103. package/src/main.js +1 -1
@@ -0,0 +1,1762 @@
1
+ <template>
2
+ <div class="col-sm-12 col-xs-12 p-10">
3
+ <accordion one-at-a-time="true">
4
+ <panel :header="selectdata.defname" :is-open="true" type="primary">
5
+ <work-busy :is-busy="excessive"></work-busy>
6
+ <app-service-view v-ref:serviceview :data="show_data" v-if="showview"></app-service-view>
7
+ </panel>
8
+ <panel header="拍照" :is-open="false" type="primary" v-if="selectdata.f_process_id">
9
+ <app-take-pic :blobid="selectdata.f_process_id" :defname="selectdata.defname" :isdelete="true" :istakepic="true" :istype="true"></app-take-pic>
10
+ </panel>
11
+ <panel header="签字" :is-open="false" type="primary" v-if="selectdata.f_process_id">
12
+ <app-sign :blobid="selectdata.f_process_id" :defname="selectdata.defname" @sign-success="signSuccess" :file-path="selectdata.f_process_id"@sign-clean="signClean"></app-sign>
13
+ </panel>
14
+ </accordion>
15
+ </div>
16
+ </template>
17
+ <script>
18
+ import Vue from 'vue'
19
+ import {HttpResetClass} from 'vue-client'
20
+ import {isEmpty} from '../../../components/Util'
21
+ // Date格式化
22
+ Date.prototype.Format = function (fmt) {
23
+ var o = {
24
+ 'M+': this.getMonth() + 1, // 月份
25
+ 'd+': this.getDate(), // 日
26
+ 'H+': this.getHours(), // 小时
27
+ 'm+': this.getMinutes(), // 分
28
+ 's+': this.getSeconds(), // 秒
29
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
30
+ 'S': this.getMilliseconds() // 毫秒
31
+ }
32
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
33
+ for (var k in o) {
34
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
35
+ }
36
+ return fmt
37
+ }
38
+ export default {
39
+ title: '报建流程业务控制层',
40
+ props: ['selectdata'],
41
+ data () {
42
+ return {
43
+ json_datas: null,
44
+ data: null,
45
+ show_data: null,
46
+ showview: false,
47
+ config: {},
48
+ excessive:false
49
+ }
50
+ },
51
+ ready () {
52
+ this.refurbish()
53
+ },
54
+ methods: {
55
+ /*获取服务人*/
56
+ getServicPeo(){
57
+ this.setLabelValue("服务人",Vue.user.name)
58
+ },
59
+ async buttonCommit() {
60
+ if(this.show_data.button.button_name){
61
+ this.$refs.serviceview.disablebtu()
62
+ }
63
+ console.log('222222222')
64
+ if (this.show_data.button.before) {
65
+ await this[this.show_data.button.before]()
66
+ }
67
+ // 点击重置按钮就重置数据
68
+ if (this.show_data.button.button_name === '重置') {
69
+ this.$dispatch('breakControl', this.selectdata)
70
+ return
71
+ }
72
+ this.show_data.user = Vue.user
73
+ // this.show_data.user = {"f_show_department_name":"","parentname":"市场部","functions":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"客服系统","icon":"/images/lefticon/档案管理.png","hasright":false,"resourcetype":"function","parentid":"27","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"city-manage","hasright":true,"resourcetype":"function","parentid":"212","children":[],"selfid":"231","name":"街道管理","templatename":"functionedit","id":"230","position":"1","fullname":"资源管理.功能模块.客服系统.档案管理.街道管理","fullid":"3.21.27.212.230","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"area-manage","hasright":true,"resourcetype":"function","parentid":"212","children":[],"selfid":"219","name":"小区管理","templatename":"functionedit","id":"218","position":"3","fullname":"资源管理.功能模块.客服系统.档案管理.小区管理","fullid":"3.21.27.212.218","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"address-manage","hasright":true,"resourcetype":"function","parentid":"212","children":[],"selfid":"33664","name":"地址管理","templatename":"functionedit","id":"33663","position":"5","fullname":"资源管理.功能模块.客服系统.档案管理.地址管理","fullid":"3.21.27.212.33663","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"file-user-files","hasright":true,"resourcetype":"function","parentid":"212","children":[],"selfid":"237","name":"用户档案","templatename":"functionedit","id":"236","position":"5","fullname":"资源管理.功能模块.客服系统.档案管理.用户档案","fullid":"3.21.27.212.236","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"档案管理","link":"file-user-files-new","hasright":true,"resourcetype":"function","parentid":"212","f_parentname":"档案管理","children":[],"selfid":"39450","name":"预备户管理","templatename":"functionedit","id":"39449","position":"6","fullname":"资源管理.功能模块.客服系统.档案管理.预备户管理","fullid":"3.21.27.212.39449","tablename":"t_function"}],"selfid":"213","name":"档案管理","templatename":"functionedit","id":"212","position":"2","fullname":"资源管理.功能模块.客服系统.档案管理","fullid":"3.21.27.212","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"客服系统","icon":"/images/lefticon/报建系统.png","hasright":true,"resourcetype":"function","parentid":"27","f_parentname":"客服系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"install-function","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34680","name":"功能业务","templatename":"functionedit","id":"34679","position":"1","fullname":"资源管理.功能模块.客服系统.报建业务.功能业务","fullid":"3.21.27.34673.34679","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"exploration-user","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34686","name":"流程业务","templatename":"functionedit","id":"34685","position":"2","fullname":"资源管理.功能模块.客服系统.报建业务.流程业务","fullid":"3.21.27.34673.34685","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"supervisory-control","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34692","name":"流程监控","templatename":"functionedit","id":"34691","position":"3","fullname":"资源管理.功能模块.客服系统.报建业务.流程监控","fullid":"3.21.27.34673.34691","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"apply-charge-search","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34698","name":"收费明细","templatename":"functionedit","id":"34697","position":"4","fullname":"资源管理.功能模块.客服系统.报建业务.收费明细","fullid":"3.21.27.34673.34697","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"order-apply","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34704","name":"预约申请","templatename":"functionedit","id":"34703","position":"5","fullname":"资源管理.功能模块.客服系统.报建业务.预约申请","fullid":"3.21.27.34673.34703","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"15","parentname":"报建业务","link":"stop-apply","hasright":true,"resourcetype":"function","parentid":"34673","f_parentname":"报建业务","children":[],"selfid":"34710","name":"终止报建","templatename":"functionedit","id":"34709","position":"6","fullname":"资源管理.功能模块.客服系统.报建业务.终止报建","fullid":"3.21.27.34673.34709","tablename":"t_function"}],"selfid":"34674","name":"报建业务","templatename":"functionedit","id":"34673","position":"12","fullname":"资源管理.功能模块.客服系统.报建业务","fullid":"3.21.27.34673","tablename":"t_function"}],"qrcode":"/rs/user/getQRcode?QRCODE=12b2-1631604191812-03447","rolesnames":"营业厅报装,市场部报装,设计部报装,工程部报装,运营部报装,财务部报装,角色监控","roles":"51383,51485,51707,51767,51833,51905,52289","f_sex":"男","f_icon":"tree_user","fullnames":"河南亿星集团实业有限公司.周口市天然气有限公司.市场部.报建测试","dir":"ZhouKou","userid":"12b2-1631604191812-03447","accesstime":"1632214307117","parentid":"46545","f_show_rolestr":"","fullids":"30463.10101.46545.51953.","number":"10101","f_dep_id":"1010101201","f_idnumber":null,"selfid":"51954","templatename":"useredit","logindate":"2021-09-14 18:46:54","id":"51953","state":"在职","tablename":"t_user","deptype":"部门","depids":"46545","loginid":"15","imgid":null,"f_user_telephone":null,"rolestr":"营业厅报装,市场部报装,设计部报装,工程部报装,运营部报装,财务部报装,角色监控","deps":"市场部","loginnum":"0","f_age":null,"resourcetype":"user","orgid":"10101","f_department_name":"周口市场部","ename":"bjcs","deleted":"false","entitytype":"t_user","f_description":null,"loginip":"192.168.66.37","name":"报建测试","position":"1","orgs":"周口市天然气有限公司","haslicense":true,"f_role_name":"营业厅报装 市场部报装 设计部报装 工程部报装 运营部报装 财务部报装 角色监控 ","f_allArea":[],"f_gasman":[{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"15294978548","rolestr":"抄表员","resourcetype":"user","userid":"100814","parentid":"46581","f_department_name":"周口客服部","ename":"100814","password":"1","deleted":"false","entitytype":"t_user","selfid":"100814","name":"高雪荣","templatename":"useredit","id":"100814","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"},{"qrcode":"/rs/user/getQRcode?QRCODE=004","roles":"51959","f_sex":"男","f_icon":"tree_user","userid":"004","accesstime":"1631765198067","parentid":"46581","password":"1","selfid":"59044","templatename":"useredit","id":"59043","state":"在职","tablename":"t_user","loginid":"15","rolestr":"抄表员","resourcetype":"user","f_department_name":"周口客服部","ename":"cbcs","deleted":"false","entitytype":"t_user","loginip":"10.10.10.1","name":"抄表测试","position":"23","haslicense":"true","f_role_name":"抄表员 "},{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"18538602709","rolestr":"抄表员","resourcetype":"user","userid":"100462","parentid":"46581","f_department_name":"周口客服部","ename":"100462","password":"1","deleted":"false","entitytype":"t_user","selfid":"100462","name":"刘林静","templatename":"useredit","id":"100462","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"},{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"18839409830","rolestr":"抄表员","resourcetype":"user","userid":"100528","parentid":"46581","f_department_name":"周口客服部","ename":"100528","password":"1","deleted":"false","entitytype":"t_user","selfid":"100528","name":"秦春梅","templatename":"useredit","id":"100528","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"},{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"13243376616","rolestr":"抄表员","resourcetype":"user","userid":"102935","parentid":"46581","f_department_name":"周口客服部","ename":"102935","password":"1","deleted":"false","entitytype":"t_user","selfid":"102935","name":"石磊","templatename":"useredit","id":"102935","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"},{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"18538602706","rolestr":"抄表员","resourcetype":"user","userid":"100818","parentid":"46581","f_department_name":"周口客服部","ename":"100818","password":"1","deleted":"false","entitytype":"t_user","selfid":"100818","name":"白静","templatename":"useredit","id":"100818","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"},{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"15294991670","rolestr":"抄表员","resourcetype":"user","userid":"102934","parentid":"46581","f_department_name":"周口客服部","ename":"102934","password":"1","deleted":"false","entitytype":"t_user","selfid":"102934","name":"郭新胜","templatename":"useredit","id":"102934","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"},{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"15036438918","rolestr":"抄表员","resourcetype":"user","userid":"103392","accesstime":"1631757950369","parentid":"46581","f_department_name":"周口客服部","ename":"103392","password":"1","deleted":"false","entitytype":"t_user","loginip":"10.10.10.1","selfid":"103392","name":"牛永胜","templatename":"useredit","id":"103392","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"},{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"13592232789","rolestr":"抄表员","resourcetype":"user","userid":"100337","parentid":"46581","f_department_name":"周口客服部","ename":"100337","password":"1","deleted":"false","entitytype":"t_user","selfid":"100337","name":"王雪丽","templatename":"useredit","id":"100337","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"},{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"17796528119","rolestr":"抄表员","resourcetype":"user","userid":"101021","parentid":"46581","f_department_name":"周口客服部","ename":"101021","password":"1","deleted":"false","entitytype":"t_user","selfid":"101021","name":"张书荣","templatename":"useredit","id":"101021","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"},{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"18839409832","rolestr":"抄表员","resourcetype":"user","userid":"100330","parentid":"46581","f_department_name":"周口客服部","ename":"100330","password":"1","deleted":"false","entitytype":"t_user","selfid":"100330","name":"武文平","templatename":"useredit","id":"100330","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"},{"loginid":"1","roles":"51959","f_icon":"tree_user","f_user_telephone":"13839441227","rolestr":"抄表员","resourcetype":"user","userid":"100871","parentid":"46581","f_department_name":"周口客服部","ename":"100871","password":"1","deleted":"false","entitytype":"t_user","selfid":"100871","name":"李明磊","templatename":"useredit","id":"100871","position":"23","state":"在职","tablename":"t_user","f_role_name":"抄表员"}],"lics":[]}
74
+ this.show_data.start_activity = this.json_datas.start_activity
75
+ this.show_data.xmlfilename = this.json_datas.workflow_xmlfilename
76
+
77
+ console.log("查看报警器材料1---------")
78
+ 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 === '完工'){
79
+ console.log("查看报警器材料2---------")
80
+ //判断是否添加报警器材料
81
+ let bjqlag = false
82
+ let datatemp = {
83
+ 'bjqid':"",
84
+ 'fprocessid':"",
85
+ 'sqvalue':"",
86
+ 'f_bjq_sid':"",
87
+ 'f_material_code':""
88
+ }
89
+ let bjqststedata = {
90
+ "sid":"",
91
+ "bjqtype":"",
92
+ "f_process_id":"",
93
+ "bjqstate":"",
94
+ "f_userinfo_code":""
95
+ }
96
+ let numOne = [];
97
+ console.log("查看报警器材料3---------",this.show_data)
98
+ console.log("查看报警器材料4---------",this.show_data.onetomany)
99
+
100
+ let http = new HttpResetClass()
101
+ let data = {
102
+ tablename: `t_material_apply`,
103
+ condition: `f_process_id='${this.show_data.f_process_id}'`
104
+ }
105
+ let res = await http.load(
106
+ 'POST',
107
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
108
+ {data: data},
109
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
110
+ )
111
+ res.data.forEach(item => {
112
+ if (item.f_material_name.substr(0,3) === '报警器'){
113
+ var bjname = item.f_material_name.split("-")
114
+ bjqststedata.sid = item.f_bjq_sid
115
+ bjqststedata.f_process_id = item.f_process_id
116
+ bjqststedata.bjqtype = bjname[1]
117
+ //====================================
118
+ bjqlag = true
119
+ datatemp.bjqid = item.id
120
+ datatemp.fprocessid = item.f_process_id
121
+ datatemp.f_bjq_sid = item.f_bjq_sid
122
+ datatemp.f_material_code = item.f_material_code
123
+ datatemp.f_bjq_lng = item.f_bjq_lng
124
+ datatemp.f_bjq_lat = item.f_bjq_lat
125
+ datatemp.f_bjq_gaode_lng = item.f_bjq_gaode_lng
126
+ datatemp.f_bjq_gaode_lat = item.f_bjq_gaode_lng
127
+ datatemp.f_bjq_baidu_lng = item.f_bjq_baidu_lng
128
+ datatemp.f_bjq_baidu_lat = item.f_bjq_baidu_lat
129
+ numOne.push(item.f_bjq_sid)
130
+ }
131
+ })
132
+ // this.show_data.onetomany.forEach(item=>{
133
+ // console.log("查看报警器材料",item)
134
+ // item.rows.forEach(i=>{
135
+ // if (i.f_material_name.substr(0,3) === '报警器'){
136
+ // var bjname = i.f_material_name.split("-")
137
+ // bjqststedata.sid = i.f_bjq_sid
138
+ // bjqststedata.f_process_id = i.f_process_id
139
+ // bjqststedata.bjqtype = bjname[1]
140
+ // //====================================
141
+ // bjqlag = true
142
+ // datatemp.bjqid = i.id
143
+ // datatemp.fprocessid = i.f_process_id
144
+ // datatemp.f_bjq_sid = i.f_bjq_sid
145
+ // datatemp.f_material_code = i.f_material_code
146
+ // datatemp.f_bjq_lng = i.f_bjq_lng
147
+ // datatemp.f_bjq_lat = i.f_bjq_lat
148
+ // datatemp.f_bjq_gaode_lng = i.f_bjq_gaode_lng
149
+ // datatemp.f_bjq_gaode_lat = i.f_bjq_gaode_lng
150
+ // datatemp.f_bjq_baidu_lng = i.f_bjq_baidu_lng
151
+ // datatemp.f_bjq_baidu_lat = i.f_bjq_baidu_lat
152
+ // numOne.push(i.f_bjq_sid)
153
+ // }
154
+ // })
155
+ // })
156
+ if (!bjqlag){
157
+ this.$showMessage('请添加报警器物料信息!!!')
158
+ return
159
+ }
160
+ if (numOne.length > 1){
161
+ this.$showMessage("暂时支持单个报警器物料安装!!!")
162
+ return
163
+ }
164
+ datatemp.sqvalue = this.show_data.areaData.sqvalue
165
+
166
+ bjqststedata.f_userinfo_code = this.show_data.f_userinfo_code
167
+ //判断是否推送 及推送的状态
168
+ //查询是否存在, 以型号及厂家判断
169
+ let bjqres = await this.$resetpost(
170
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/getbjqsyncinfo`,
171
+ bjqststedata
172
+ )
173
+ if (bjqres.data.bjqstate != "成功"){
174
+ //区域地址存入材料记录表
175
+ let areares = await this.$resetpost(
176
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/saveArea`,
177
+ // `rs/logic/saveArea`,
178
+ {data: datatemp},
179
+ {resolveMsg: null, rejectMsg: '区域地址保存失败'}
180
+ )
181
+
182
+ // 完工之后推送数据到汉威
183
+ let adddata = {
184
+ f_bjq_sid : datatemp.f_bjq_sid,
185
+ f_material_code : datatemp.f_material_code,
186
+ f_bjq_lng : datatemp.f_bjq_lng,
187
+ f_bjq_lat : datatemp.f_bjq_lat,
188
+ f_orgid : this.show_data.f_orgid,
189
+ f_bjq_address: this.show_data.areaData.sqvalue,
190
+ f_user_name: this.show_data.f_user_name,
191
+ f_address: this.show_data.f_address,
192
+ f_user_phone: this.show_data.f_phone,
193
+ f_userinfo_code: this.show_data.f_userinfo_code,
194
+ installtime: this.show_data.f_construction_date,
195
+ }
196
+ let res = await this.$resetpost(
197
+ `${this.$androidUtil.getProxyUrl()}/ncc/rs/logic/bjqadduser`,
198
+ // `ncc/rs/logic/bjqadduser`,
199
+ // `${this.$androidUtil.getProxyUrl()}/rs/logic/bjqadduser`,
200
+ adddata
201
+ )
202
+ if (res.data.code != 200){
203
+ if (bjqres.data.bjqstate.length == 0){
204
+ bjqststedata.bjqstate = "失败"
205
+ let bjqres3 = await this.$resetpost(
206
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/addbjqsyncinfo`,
207
+ bjqststedata
208
+ )
209
+ }
210
+ this.$showMessage(res.data.msg)
211
+ return
212
+ }
213
+
214
+ //更改记录表状态
215
+ if (bjqres.data.bjqstate === "失败"){
216
+ bjqststedata.bjqstate = "成功"
217
+ let bjqres1 = await this.$resetpost(
218
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/updatebjqsyncinfo`,
219
+ bjqststedata
220
+ )
221
+ }else{
222
+ bjqststedata.bjqstate = "成功"
223
+ let bjqres2 = await this.$resetpost(
224
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/addbjqsyncinfo`,
225
+ bjqststedata
226
+ )
227
+ }
228
+ }
229
+ }
230
+ if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && (this.show_data.button.button_name === '提交'||this.show_data.button.button_name === '保存')){
231
+ let dataz = {
232
+ condition: `u.id = ${this.show_data.id}`,
233
+ data: {
234
+ id: Vue.user.id,
235
+ orgid: Vue.user.orgid
236
+ }
237
+ }
238
+ let http = new HttpResetClass()
239
+ let restpz = await http.load(
240
+ 'POST',
241
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/checkuser`,
242
+ {data: dataz},
243
+ {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
244
+ )
245
+ this.show_data.actid=restpz.data[0].actid
246
+ }
247
+ if(this.show_data.button.button_name != '返回'){
248
+ let model = Object.assign({}, this.show_data, model)
249
+ let http = new HttpResetClass()
250
+ let requestData = {
251
+ tables: ["t_apply"],
252
+ start_activity: this.json_datas.start_activity,
253
+ model: model,
254
+ loginUser: Vue.user,
255
+ workflow_xmlfilename: this.json_datas.workflow_xmlfilename
256
+ }
257
+ this.excessive=true
258
+ let res = await this.$resetpost(
259
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyProductService`,
260
+ {data:requestData},
261
+ {resolveMsg: null, rejectMsg: '数据保存失败'}
262
+ )
263
+ this.excessive=false
264
+ if (this.show_data.button.after) {
265
+ this[this.show_data.button.after]()
266
+ }
267
+ }else {
268
+ if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装缴费' ){
269
+ if (this.show_data.button.after) {
270
+ this[this.show_data.button.after]()
271
+ }
272
+ this.$dispatch('confirm')
273
+ this.$dispatch('confirm')
274
+ }else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '工程派工'){
275
+ if (this.show_data.button.after) {
276
+ this[this.show_data.button.after]()
277
+ }
278
+ this.$dispatch('confirm')
279
+ this.$dispatch('confirm')
280
+ this.$dispatch('confirm')
281
+ }else{
282
+ if (this.show_data.button.after) {
283
+ this[this.show_data.button.after]()
284
+ }
285
+
286
+ this.$dispatch('confirm')
287
+ }
288
+
289
+ }
290
+
291
+ // 返回上层
292
+ if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装申请' && this.show_data.button.button_name === '合同'){
293
+ this.excessive=true
294
+ let data = {
295
+ tablename: 't_apply',
296
+ condition: `f_process_id='${this.show_data.f_process_id}'`
297
+ }
298
+ let http = new HttpResetClass()
299
+ let restp = await http.load(
300
+ 'POST',
301
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
302
+ {data: data},
303
+ {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
304
+ )
305
+ restp.data[0].processname = '散户报建流程'
306
+ restp.data[0].defname = '合同签订'
307
+ let _this = this
308
+ this.$dispatch('gotoson', {
309
+ _this: _this,
310
+ title: restp.data[0].defname,
311
+ safe: true
312
+ })
313
+ this.$goto('app-service-control', {selectdata: restp.data[0]}, 'self')
314
+ this.excessive=false
315
+
316
+ } else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '合同签订' && this.show_data.button.button_name === '提交'){
317
+ this.excessive=true
318
+ let data2 = {
319
+ condition: `u.id = ${this.show_data.id}`,
320
+ data: {
321
+ id: Vue.user.id,
322
+ orgid: Vue.user.orgid
323
+ }
324
+ }
325
+ let http = new HttpResetClass()
326
+ let restp1 = await http.load(
327
+ 'POST',
328
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/checkuser`,
329
+ {data: data2},
330
+ {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
331
+ )
332
+ console.log('打印查询的内容',restp1)
333
+ // restp1.data[0].processname = '散户报建流程'
334
+ // restp1.data[0].defname = '报装缴费'
335
+
336
+ let _this = this
337
+ this.$dispatch('gotoson', {
338
+ _this: _this,
339
+ title: restp1.data[0].defname,
340
+ safe: true
341
+ })
342
+ this.$goto('app-service-control', {selectdata: restp1.data[0]}, 'self')
343
+ this.excessive=false
344
+ }else if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname === '报装缴费' && this.show_data.button.button_name === '提交'){
345
+ this.excessive=true
346
+ let data3 = {
347
+ condition: `u.id = ${this.show_data.id}`,
348
+ data: {
349
+ id: Vue.user.id,
350
+ orgid: Vue.user.orgid
351
+ }
352
+ }
353
+ let http = new HttpResetClass()
354
+ let restp2 = await http.load(
355
+ 'POST',
356
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/checkuser`,
357
+ {data: data3},
358
+ {resolveMsg: null, rejectMsg: '报建数据查询失败!!!'}
359
+ )
360
+ console.log('打印查询的内容',restp2)
361
+ if(restp2.length>0){
362
+ let _this = this
363
+ this.$dispatch('gotoson', {
364
+ _this: _this,
365
+ title: restp2.data[0].defname,
366
+ safe: true
367
+ })
368
+ this.$goto('app-service-control', {selectdata: restp2.data[0]}, 'self')
369
+ this.excessive=false
370
+ }else{
371
+ this.excessive=false
372
+ this.$dispatch('confirm')
373
+ this.$dispatch('confirm')
374
+ this.$dispatch('confirm')
375
+ }
376
+ }
377
+ else{
378
+ this.excessive=false
379
+ // console.log('-----')
380
+ this.$dispatch('confirm')
381
+ }
382
+
383
+
384
+ },
385
+ async refurbish() {
386
+ let xmldata = {
387
+ data: Vue.user,
388
+ workname: this.selectdata.processname
389
+ }
390
+ let res = await this.$resetpost(
391
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`,
392
+ {data:xmldata},
393
+ {resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
394
+ )
395
+
396
+ this.json_datas = res.data.workflow_vue
397
+
398
+ let sum = 0
399
+ let jsonData = {}
400
+ if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
401
+ this.$showMessage("网络故障,请刷新页面")
402
+ return
403
+ }
404
+ this.json_datas.activitys.forEach(item => {
405
+ if (this.selectdata.defname === item.title) {
406
+ jsonData = item // 拿到当前节点的json配置信息
407
+ sum++ // 节点名一样的个数
408
+ }
409
+ return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
410
+ })
411
+
412
+ if (sum === 0) {
413
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
414
+ return
415
+ }
416
+ if (sum > 1) {
417
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
418
+ return
419
+ }
420
+
421
+ this.selectdata = Object.assign({}, this.selectdata, jsonData)
422
+
423
+ // fields 字段填充值
424
+ for (const item of this.selectdata.fields) {
425
+ if (!item.value) {
426
+ item.value = null
427
+ }
428
+
429
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
430
+ if (item.eval) {
431
+ let user = Vue.user
432
+ // 将PC用户信息 替换成 APP的
433
+ item.value = eval(item.default.replace('this.$login.f', 'user'))
434
+ } else {
435
+ item.value = item.default
436
+ }
437
+ }
438
+
439
+ if (this.selectdata[item.field]) {
440
+ // 将json字符串格式化赋值给value
441
+ if (String(this.selectdata[item.field]).startsWith("{")) {
442
+ item.value = JSON.parse(this.selectdata[item.field])
443
+ } else {
444
+ item.value = this.selectdata[item.field]
445
+ }
446
+ }
447
+ if (this.selectdata[item.field] === 0) {
448
+ item.value = 0
449
+ }
450
+
451
+ // datepicker
452
+ if (item.type === 'datepicker' && !item.value && item.default) {
453
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
454
+ }
455
+
456
+ // 如果配置类型为select,优先从参数列表获取options
457
+ if (item.type === 'select' || item.type === 'checkbox') {
458
+ if (item.param) {
459
+ let temp = this.$appdata.getParam(item.label)
460
+
461
+ if (temp && temp.length > 0) {
462
+ item.options = temp
463
+ }
464
+
465
+ if (item.paramLabel) {
466
+ temp = this.$appdata.getParam(item.paramLabel)
467
+ if (temp && temp.length > 0) {
468
+ item.options = temp
469
+ }
470
+ }
471
+ }
472
+ console.log("item.ready"+item.ready)
473
+ if (item.ready) {
474
+ item.options = await this[item.ready]()
475
+ }
476
+ }
477
+
478
+
479
+ if (item.type === 'checkbox') {
480
+ if (this.selectdata[item.field]) {
481
+ item.value = JSON.parse(this.selectdata[item.field])
482
+ } else {
483
+ item.value = []
484
+ }
485
+ }
486
+ }
487
+
488
+ // 控制组件
489
+ if (this.selectdata.components) {
490
+ this.selectdata.components.forEach(item => {
491
+ if (!item.mark) {
492
+ item.mark = 0
493
+ }
494
+ })
495
+ }
496
+
497
+ // 初始化onetomany
498
+ if (this.selectdata.onetomany) {
499
+ for (const item of this.selectdata.onetomany) {
500
+ let res = null
501
+ if (item.queryEvent) {
502
+ res = this[item.queryEvent]()
503
+ } else {
504
+ let http = new HttpResetClass()
505
+ let data = {
506
+ tablename: item.tables[0],
507
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
508
+ }
509
+ res = await http.load(
510
+ 'POST',
511
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
512
+ // `rs/sql/apply_singleTable`,
513
+ {data: data},
514
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
515
+ )
516
+ }
517
+
518
+ item.rows = res.data
519
+
520
+ // 初始化onetomany中的fields
521
+ for (const field of item.fields) {
522
+ if (!field.value) {
523
+ if (field.value !== 0) {
524
+ field.value = null
525
+ }
526
+ }
527
+
528
+ if (field.default || field.default === 0) {
529
+ field.value = field.default
530
+ }
531
+
532
+ // datepicker
533
+ if (field.type === 'datepicker' && !field.value && field.default) {
534
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
535
+ }
536
+
537
+ if (field.type === 'select') {
538
+
539
+ if (field.param) {
540
+ let temp = this.$appdata.getParam(field.label)
541
+
542
+ if (temp && temp.length > 0) {
543
+ field.options = temp
544
+ }
545
+
546
+ if (field.paramLabel) {
547
+ temp = this.$appdata.getParam(field.paramLabel)
548
+ if (temp && temp.length > 0) {
549
+ item.options = temp
550
+ }
551
+ }
552
+ }
553
+
554
+ }
555
+ }
556
+ }
557
+ }
558
+
559
+ // 初始化 buttons_fields
560
+ for (const item of this.selectdata.buttons) {
561
+ if (item.button_name === '下发') {
562
+ let data = {
563
+ source: item.source,
564
+ userid: Vue.user.id
565
+ // userid: '51953'
566
+ }
567
+ if (item.sourceMethod) {
568
+ data.source = this[item.sourceMethod]()
569
+ }
570
+ if (!data.source) {
571
+ this.$showMessage("请配置获取人员表达式")
572
+ return
573
+ }
574
+ let res = await this.$resetpost(
575
+ `${this.$androidUtil.getProxyUrl()}/rs/search`,
576
+ // `rs/search`,
577
+ {data: data},
578
+ {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
579
+ )
580
+
581
+ let options = res.data.map(source => {
582
+ return {
583
+ "label": source.name,
584
+ "value": source.id
585
+ }
586
+ })
587
+
588
+ if (item.button_fields.length !== 1) {
589
+ this.$showMessage("下发有且只能有一个字段!!!")
590
+ return
591
+ }
592
+
593
+ item.button_fields[0].options = options
594
+ }
595
+ if (item.button_fields) {
596
+ item.button_fields.forEach(x => {
597
+ // 如果配置类型为select,优先从参数列表获取options
598
+ if (x.type === 'select') {
599
+
600
+ if (x.param) {
601
+ let temp = this.$appdata.getParam(x.label)
602
+
603
+ if (temp && temp.length > 0) {
604
+ x.options = temp
605
+ }
606
+
607
+ if (x.paramLabel) {
608
+ temp = this.$appdata.getParam(x.paramLabel)
609
+ if (temp && temp.length > 0) {
610
+ x.options = temp
611
+ }
612
+ }
613
+ }
614
+
615
+ }
616
+ })
617
+ }
618
+ }
619
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
620
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
621
+ this.show_data = temp
622
+ for (const item of this.show_data.fields) {
623
+ if(item.label=='气价名称' && !isEmpty(this.show_data.f_price_name)){
624
+ item.options.forEach(x=>{
625
+ if(x.label==this.show_data.f_price_name){
626
+ item.value=x.value
627
+ }
628
+ })
629
+ }
630
+ }
631
+ if(!this.show_data.showfei){
632
+ this.$set('show_data.showfei', '未收费')
633
+ }
634
+ //this.show_data.showfei=false
635
+
636
+ this.$nextTick(() => {
637
+ this.showview = true
638
+ })
639
+ this.getServicPeo()
640
+ },
641
+ signClean () {
642
+ this.selectdata.f_construction_sign = null
643
+ },
644
+ signSuccess (fileUrl) {
645
+ console.log('==============签字回调==================')
646
+ console.log(fileUrl)
647
+ this.selectdata.f_construction_sign = fileUrl
648
+ },
649
+ // 金额转大写
650
+ smalltoBIG(n) {
651
+ let fraction = ['角', '分'];
652
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
653
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
654
+ let head = n < 0 ? '欠' : '';
655
+ n = Math.abs(n);
656
+
657
+ let s = '';
658
+
659
+ for (var i = 0; i < fraction.length; i++) {
660
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
661
+ }
662
+ s = s || '整';
663
+ n = Math.floor(n);
664
+
665
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
666
+ let p = '';
667
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
668
+ p = digit[n % 10] + unit[1][j] + p;
669
+ n = Math.floor(n / 10);
670
+ }
671
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
672
+ }
673
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
674
+ },
675
+ getLableValue(label) {
676
+ for (const item of this.show_data.fields) {
677
+ if (item.label === label && item.type !== 'number') {
678
+ return item.value || ''
679
+ }
680
+ if (item.label === label && item.type === 'number') {
681
+ return item.value || 0
682
+ }
683
+ }
684
+ },
685
+ getLableOptions(label) {
686
+ for (const item of this.show_data.fields) {
687
+ if (item.label === label) {
688
+ return item.options
689
+ }
690
+ }
691
+ },
692
+ hideLabels(...labels) {
693
+ for (const item of this.show_data.fields) {
694
+ if (labels.includes(item.label)) {
695
+ item.hidden = true
696
+ }
697
+ }
698
+ },
699
+ requiredLabels(...labels) {
700
+ for (const item of this.show_data.fields) {
701
+ if (labels.includes(item.label)) {
702
+ item.required = true
703
+ }
704
+ }
705
+ },
706
+ electiveLabels(...labels) {
707
+ for (const item of this.show_data.fields) {
708
+ if (labels.includes(item.label)) {
709
+ item.required = false
710
+ }
711
+ }
712
+ },
713
+ showLabels(...labels) {
714
+ for (const item of this.show_data.fields) {
715
+ if (labels.includes(item.label)) {
716
+ item.hidden = false
717
+ }
718
+ }
719
+ },
720
+ setLabelValue(label, value) {
721
+ for (const item of this.show_data.fields) {
722
+ if (item.label === label) {
723
+ item.value = value
724
+ this.show_data[item.field] = value
725
+ }
726
+ }
727
+ },
728
+ setLabelOptions(label, options) {
729
+ for (const item of this.show_data.fields) {
730
+ if (item.label === label) {
731
+ item.options = options
732
+ }
733
+ }
734
+ },
735
+ disabledButtons(...buttons) {
736
+ for (const item of this.show_data.buttons) {
737
+ if (buttons.includes(item.button_name)) {
738
+ item.disabled = true
739
+ }
740
+ }
741
+ },
742
+ enableButtons(...buttons) {
743
+ for (const item of this.show_data.buttons) {
744
+ if (buttons.includes(item.button_name)) {
745
+ item.disabled = false
746
+ }
747
+ }
748
+ },
749
+ showButtons(...buttons) {
750
+ for (const item of this.show_data.buttons) {
751
+ if (buttons.includes(item.button_name)) {
752
+ item.hidden = false
753
+ }
754
+ }
755
+ },
756
+ hideButtons(...buttons) {
757
+ for (const item of this.show_data.buttons) {
758
+ if (buttons.includes(item.button_name)) {
759
+ item.hidden = true
760
+ }
761
+ }
762
+ },
763
+ async streetChange () {
764
+ if (isEmpty(this.show_data.f_street)) {
765
+ return
766
+ }
767
+
768
+ let data = {
769
+ tablename: 't_area',
770
+ // condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
771
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_street = '${this.show_data.f_street}'`
772
+ }
773
+ let http = new HttpResetClass()
774
+ let res = await http.load(
775
+ 'POST',
776
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
777
+ {data: data},
778
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
779
+ )
780
+
781
+ this.setLabelOptions('集收单位', res.data.map(item => {
782
+ return {
783
+ label: item.f_residential_area,
784
+ value: item.f_residential_area
785
+ }
786
+ }))
787
+ },
788
+ // 获取集收单位
789
+ async getArea () {
790
+ let data = {
791
+ tablename: 't_area',
792
+ condition: `f_filialeid = '${Vue.user.orgid}'`
793
+ }
794
+ let http = new HttpResetClass()
795
+ let res = await http.load(
796
+ 'POST',
797
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
798
+ {data: data},
799
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
800
+ )
801
+
802
+ return res.data.map(item => {
803
+ return {
804
+ label: item.f_residential_area,
805
+ value: item.f_residential_area
806
+ }
807
+ })
808
+ },
809
+ async pcdChange () {
810
+ if (isEmpty(this.show_data.f_pcd)) {
811
+ return
812
+ }
813
+
814
+ let data = {
815
+ tablename: 't_street',
816
+ // condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
817
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
818
+ }
819
+ let f_address_type = this.getLableValue('地址类型')
820
+
821
+ if (f_address_type === '民用市区') {
822
+ // data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
823
+ data.condition = `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
824
+ }
825
+ if (f_address_type === '民用乡镇') {
826
+ // data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
827
+ data.condition = `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
828
+ }
829
+
830
+ let http = new HttpResetClass()
831
+ let res = await http.load(
832
+ 'POST',
833
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
834
+ {data: data},
835
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
836
+ )
837
+
838
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
839
+ return {
840
+ label: item.f_street,
841
+ value: item.f_street
842
+ }
843
+ }))
844
+ },
845
+ async addressInitialization () {
846
+ //this.$getConfig(this, 'UserAddress')
847
+ //获取地址配置文件
848
+ try {
849
+ let res = await new HttpResetClass().load('get',`${this.$androidUtil.getProxyUrl()}/rs/vue/UserAddress.json`,null,{resolveMsg: null, rejectMsg: null})
850
+ Object.assign(this.config, res.data)
851
+ } catch (error) {
852
+ console.log("未获取到地址信息")
853
+ }
854
+ console.log("???????????不走了吗!")
855
+ let f_address_type = this.show_data.f_address_type
856
+
857
+ for (const item of this.show_data.fields) {
858
+ if (f_address_type === '民用市区') {
859
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
860
+ item.hidden = false
861
+ item.required = true
862
+ }
863
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
864
+ item.hidden = false
865
+ item.required = false
866
+ }
867
+ if (item.label === '地址') {
868
+ item.readonly = true
869
+ }
870
+ }
871
+ if (f_address_type === '民用乡镇') {
872
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
873
+ item.hidden = false
874
+ item.required = true
875
+ }
876
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
877
+ item.hidden = false
878
+ item.required = false
879
+ }
880
+ if (item.label === '楼层') {
881
+ item.hidden = true
882
+ item.required = false
883
+ }
884
+ if (item.label === '地址') {
885
+ item.readonly = true
886
+ }
887
+ }
888
+ if (f_address_type === '特殊地址') {
889
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
890
+ item.hidden = false
891
+ item.required = true
892
+ }
893
+ if (item.label === '集收单位') {
894
+ item.hidden = false
895
+ item.required = false
896
+ }
897
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
898
+ item.hidden = true
899
+ item.required = false
900
+ }
901
+ if (item.label === '地址') {
902
+ item.readonly = false
903
+ }
904
+ }
905
+
906
+ if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
907
+ item.hidden = true
908
+ }
909
+ }
910
+ },
911
+
912
+ async checkDuplicate(index) {
913
+ let http = new HttpResetClass()
914
+ let data = {
915
+ tablename: 't_apply',
916
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
917
+ }
918
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data: data}, {
919
+ resolveMsg: null,
920
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
921
+ })
922
+ if (res.data.length > 0) {
923
+ this.show_data.fields[index].value = null
924
+ this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
925
+ }
926
+ },
927
+ async breakControl () {
928
+ if (this.show_data.id) {
929
+ let data = {
930
+ condition: `u.id = ${this.show_data.id}`,
931
+ data: {
932
+ id: Vue.user.id,
933
+ orgid: Vue.user.orgid
934
+ // id: '51953',
935
+ // orgid: '10101'
936
+ }
937
+ }
938
+ let res = await this.$resetpost(
939
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/checkuser`,
940
+ // `rs/sql/checkuser`,
941
+ {data: data},
942
+ {resolveMsg: null, rejectMsg: '数据更新失败,请手查询更新!!!'}
943
+ )
944
+
945
+ this.selectdata = res.data[0]
946
+ } else {
947
+ this.selectdata = servicedata
948
+ }
949
+
950
+ this.refurbish()
951
+ },
952
+ async addressTips () {
953
+ let res = ''
954
+ if (this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') {
955
+ res = await this.$showMessage('报警器报建下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
956
+ }else{
957
+ res = await this.$showMessage('增容改管下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
958
+ }
959
+ if (res == 'confirm') {
960
+ return
961
+ }
962
+ throw '用户信息确认!!!'
963
+ },
964
+ // 缴费前置
965
+ chargeBefore () {
966
+ if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
967
+ this.$showAlert('费用未结清!!!', 'warning', 3000)
968
+ throw null
969
+ }
970
+ },
971
+ // 施工前置
972
+ async constructionBefore () {
973
+ let http = new HttpResetClass()
974
+ let data = {
975
+ condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_meter_classify is null and f_meternumber is null`
976
+ }
977
+ let res = await http.load(
978
+ 'POST',
979
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/countApplyUserinfo`,
980
+ {data: data},
981
+ {
982
+ resolveMsg: null,
983
+ rejectMsg: '安装明细查询失败!!!'
984
+ })
985
+ if (res.data[0].num > 0) {
986
+ this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
987
+ throw `还有${res.data[0].num}户未安装,无法提交`
988
+ }
989
+ },
990
+ changePipeBuild () {
991
+ if (this.selectdata.f_process_dep === '工程部') {
992
+ return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
993
+ }
994
+ if (this.selectdata.f_process_dep === '运营部') {
995
+ return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
996
+ }
997
+ return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
998
+ },
999
+ async getPrice (f_price_id) {
1000
+ console.log('=======================')
1001
+ console.log(f_price_id)
1002
+
1003
+ let data = {
1004
+ condition: `sp.f_filialeid = '${Vue.user.orgid}'`
1005
+ }
1006
+
1007
+ if (!isEmpty(f_price_id)) {
1008
+ data.condition = `sp.f_filialeid = '${Vue.user.orgid}' and sp.f_price_id = ${f_price_id}`
1009
+ }
1010
+ let http = new HttpResetClass()
1011
+ let res = await http.load(
1012
+ 'POST',
1013
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applyGetPrice`,
1014
+ {data: data},
1015
+ {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
1016
+ )
1017
+
1018
+ return res.data.map(item => {
1019
+ return {
1020
+ label: item.f_price_name,
1021
+ value: item
1022
+ }
1023
+ })
1024
+ },
1025
+ //获取抄表册
1026
+ async getMeterBook () {
1027
+ let data = {
1028
+ tablename: 't_meter_book',
1029
+ condition: `f_book_state='有效' `
1030
+ }
1031
+ let http = new HttpResetClass()
1032
+ let res = await http.load(
1033
+ 'POST',
1034
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1035
+ {data: data},
1036
+ {resolveMsg: null, rejectMsg: '抄表册查询失败!!!'}
1037
+ )
1038
+ return res.data.map(item => {
1039
+ return {
1040
+ label: item.f_book_name,
1041
+ value: item.f_book_code
1042
+ }
1043
+ })
1044
+ },
1045
+ async getDesignerPeople () {
1046
+ let data = {
1047
+ source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
1048
+ userid: Vue.user.id
1049
+ }
1050
+
1051
+ let http = new HttpResetClass()
1052
+ let res = await http.load(
1053
+ 'POST',
1054
+ `${this.$androidUtil.getProxyUrl()}/rs/search`,
1055
+ {data: data},
1056
+ {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
1057
+ )
1058
+
1059
+ return res.data.map(item => {
1060
+ return {
1061
+ label: item.name,
1062
+ value: item.id
1063
+ }
1064
+ })
1065
+ },
1066
+ async surveyStopApply () {
1067
+ console.log('终止报建!!!!!')
1068
+
1069
+ this.show_data.f_stop_reason = '现场勘察不符合报装条件'
1070
+
1071
+ let data = {
1072
+ data: this.show_data,
1073
+ user: Vue.user
1074
+ }
1075
+
1076
+ let res = await this.$resetpost(
1077
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/surveyStopApply`,
1078
+ {data: data},
1079
+ {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
1080
+ )
1081
+ if(res.data==200){
1082
+ this.$dispatch('loadPage')
1083
+ this.$showMessage('终止报建成功!!!')
1084
+ this.$back()
1085
+ throw '终止报建!!!'
1086
+ }else{
1087
+ this.$showMessage('终止报建失败!!!')
1088
+ }
1089
+ },
1090
+ async getDevInfo () {
1091
+ let data = {
1092
+ tablename: 't_dev_info',
1093
+ condition: `f_orgid = '${Vue.user.orgid}'`
1094
+ }
1095
+ let http = new HttpResetClass()
1096
+ let res = await http.load(
1097
+ 'POST',
1098
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1099
+ {data: data},
1100
+ {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
1101
+ )
1102
+
1103
+ return res.data.map(item => {
1104
+ return {
1105
+ label: item.f_dev_name,
1106
+ value: item.f_dev_name
1107
+ }
1108
+ })
1109
+ },
1110
+ // 获取片区
1111
+ async getSliceArea () {
1112
+ let data = {
1113
+ source: 'this.getParentByType($organization$).getAllChildrens().where(row.getType() == $zone$)',
1114
+ userid: Vue.user.id
1115
+ }
1116
+
1117
+ let http = new HttpResetClass()
1118
+ let res = await http.load(
1119
+ 'POST',
1120
+ `${this.$androidUtil.getProxyUrl()}/rs/search`,
1121
+ {data: data},
1122
+ {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
1123
+ )
1124
+
1125
+ return res.data.map(item => {
1126
+ return {
1127
+ label: item.name,
1128
+ value: item.name
1129
+ }
1130
+ })
1131
+ },
1132
+ // 获取区县
1133
+ async getPcd () {
1134
+ let data = {
1135
+ tablename: 't_pcd',
1136
+ condition: `f_filialeid = '${Vue.user.orgid}'`
1137
+ }
1138
+ let http = new HttpResetClass()
1139
+ let res = await http.load(
1140
+ 'POST',
1141
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1142
+ {data: data},
1143
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
1144
+ )
1145
+
1146
+ return res.data.map(item => {
1147
+ return {
1148
+ label: item.f_pcd,
1149
+ value: item.f_pcd
1150
+ }
1151
+ })
1152
+ }
1153
+
1154
+ },
1155
+ events: {
1156
+ async 'startSignActivity'() {
1157
+ this.hideButtons('签字')
1158
+ let data = {
1159
+ apply: this.show_data,
1160
+ user: Vue.user
1161
+ }
1162
+ let res = await this.$resetpost(
1163
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/startSignActivity`,
1164
+ {data: data},
1165
+ {resolveMsg: '签字流程已发起!!!', rejectMsg: '签字发起失败!!!'}
1166
+ )
1167
+ this.breakControl()
1168
+ },
1169
+ 'complyInstallation' (index) {
1170
+ if (this.show_data.f_is_have === '否') {
1171
+ this.hideButtons('提交', '出图', '缴费')
1172
+ this.showButtons('终止')
1173
+ }
1174
+ if (this.show_data.f_is_have === '是') {
1175
+ this.hideButtons('终止')
1176
+ this.showButtons('提交', '出图', '缴费')
1177
+ }
1178
+ },
1179
+ async 'igniteDispatchReadyEvent' () {
1180
+ let data = {
1181
+ tablename: 'activityins',
1182
+ condition: `processid = '${this.show_data.f_process_id}' and defname = '工程施工' and state = '结束'`
1183
+ }
1184
+ let http = new HttpResetClass()
1185
+ let res = await http.load(
1186
+ 'POST',
1187
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1188
+ {data: data},
1189
+ {resolveMsg: null, rejectMsg: '查询失败!!!'}
1190
+ )
1191
+ if (res.data.length <= 0) {
1192
+ console.log('+++++++++++++++++++++++++++++')
1193
+ console.log('没有施工,不能退回')
1194
+ this.hideButtons('退回')
1195
+ }
1196
+ },
1197
+ 'breakControl' (val) {
1198
+ this.breakControl(val)
1199
+ },
1200
+ // 检查重复
1201
+ 'checkRepeat' (index) {
1202
+ this.checkDuplicate(index)
1203
+ },
1204
+ 'buildReadyEvent' () {
1205
+ this.setLabelValue('施工单位', Vue.user.name)
1206
+ this.setLabelValue('施工安装时间', new Date().Format('yyyy-MM-dd HH:mm:ss'))
1207
+ },
1208
+ // 选择材料
1209
+ async materialNameChenge (index, fieldIndex) {
1210
+ let material = this.show_data.onetomany[index].fields[fieldIndex].value
1211
+
1212
+ this.show_data.onetomany[index].fields.forEach(item => {
1213
+ if (material[item.field]) {
1214
+ item.value = material[item.field]
1215
+ }
1216
+ })
1217
+ },
1218
+ // 打开模态框获取材料
1219
+ async 'getMaterialName' (index) {
1220
+ let data = {
1221
+ condition: `1=1`
1222
+ }
1223
+ let http = new HttpResetClass()
1224
+ let res = await http.load(
1225
+ 'POST',
1226
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
1227
+ {data: data},
1228
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
1229
+ )
1230
+
1231
+ this.show_data.onetomany[index].fields.forEach(field => {
1232
+ if (field.label === '选择材料') {
1233
+ field.options = res.data.map(item => {
1234
+ return {
1235
+ 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}`,
1236
+ 'value': item
1237
+ }
1238
+ })
1239
+ }
1240
+ })
1241
+ },
1242
+ // 选择气价
1243
+ 'priceChange' (index) {
1244
+ if (isEmpty(this.show_data.stairPrice)) {
1245
+ return
1246
+ }
1247
+
1248
+ let stairPrice = this.getLableValue('气价名称')
1249
+
1250
+ this.setLabelValue('气价类型', stairPrice.f_price_type)
1251
+ this.setLabelValue('用气性质', stairPrice.f_gasproperties)
1252
+ this.setLabelValue('价格', stairPrice.f_price)
1253
+ this.setLabelValue('客户类型', stairPrice.f_user_type)
1254
+ this.show_data.f_price_id = stairPrice.id
1255
+ this.show_data.f_price_name = stairPrice.f_price_name
1256
+ },
1257
+ // 是否购买保险
1258
+ isInsureChange (index) {
1259
+ let f_is_insure = this.getLableValue('是否购买保险')
1260
+ for (const item of this.show_data.fields) {
1261
+ if (f_is_insure === '是') {
1262
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1263
+ item.hidden = false
1264
+ item.required = true
1265
+ }
1266
+ if (item.label === '保险备注') {
1267
+ item.hidden = false
1268
+ }
1269
+ } else {
1270
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1271
+ item.hidden = true
1272
+ item.required = false
1273
+ }
1274
+ }
1275
+ }
1276
+ },
1277
+ // 通气点火初始化
1278
+ async 'gasReadyEvent' () {
1279
+ console.log('----通气点火初始化----')
1280
+ if (!isEmpty(this.show_data.f_price_id)) {
1281
+ let priceList = await this.getPrice(this.show_data.f_price_id)
1282
+ this.setLabelValue('气价名称', priceList[0].value)
1283
+ }
1284
+
1285
+ let data = {
1286
+ tablename: 't_userfees',
1287
+ condition: `f_orgid = '${Vue.user.orgid}' and f_userinfo_id = '${this.show_data.f_userinfo_id}' and f_state = '待执行'`
1288
+ }
1289
+
1290
+ console.log('---------查询是否有待执行保险-----------')
1291
+ let http = new HttpResetClass()
1292
+ let res = await http.load(
1293
+ 'POST',
1294
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1295
+ {data: data},
1296
+ {resolveMsg: null, rejectMsg: '保险查询失败!!!'}
1297
+ )
1298
+ if (res.data.length > 0) {
1299
+ console.log('----------具有待执行保险------------')
1300
+ this.setLabelValue('待执行保险', '是')
1301
+ for (const item of this.show_data.fields) {
1302
+ if (item.label === '保费开始日期' || item.label === '是否购买保险' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1303
+ item.hidden = true
1304
+ item.required = false
1305
+ item.value = null
1306
+ }
1307
+ }
1308
+ console.log('----------具有待执行保险------------')
1309
+ } else {
1310
+ console.log('----------不有待执行保险------------')
1311
+ this.setLabelValue('待执行保险', '否')
1312
+ for (const item of this.show_data.fields) {
1313
+ if (item.label === '是否购买保险' || item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1314
+ item.hidden = false
1315
+ item.required = true
1316
+ }
1317
+ }
1318
+ console.log('----------具有待执行保险------------')
1319
+ }
1320
+
1321
+ // 初始化显示内容
1322
+ let f_is_insure = this.getLableValue('是否购买保险')
1323
+ for (const item of this.show_data.fields) {
1324
+ if (f_is_insure === '是') {
1325
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1326
+ item.hidden = false
1327
+ item.required = true
1328
+ }
1329
+ if (item.label === '保险备注') {
1330
+ item.hidden = false
1331
+ }
1332
+ // 本期保费到期时间默认一年
1333
+ if (isEmpty(this.selectdata.f_ins_expiration_date)) {
1334
+ let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
1335
+ this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
1336
+ }
1337
+ }
1338
+ if (f_is_insure === '否') {
1339
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1340
+ item.hidden = true
1341
+ item.required = false
1342
+ }
1343
+ }
1344
+ }
1345
+ },
1346
+ // 合同金额失去焦点
1347
+ async 'contractMoneyChange' (index) {
1348
+ let data = {
1349
+ operator: '+',
1350
+ num1: this.show_data.f_contract_money || 0,
1351
+ num2: this.getLableValue('追加金额') || 0
1352
+ }
1353
+ let res = await this.$resetpost(
1354
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/compute`,
1355
+ {data: data},
1356
+ {resolveMsg: null, rejectMsg: '金额计算失败!!!'}
1357
+ )
1358
+
1359
+ this.setLabelValue('应交金额', res.data)
1360
+ },
1361
+ // ===========================================
1362
+ async 'button'() {
1363
+ console.log('-----')
1364
+ await this.buttonCommit()
1365
+ },
1366
+ // 失去焦点出触发事件
1367
+ 'onchange' (index) {
1368
+ if (this.show_data.defname === '报装申请') {
1369
+ if (
1370
+ this.show_data.fields[index].label === '区/县' ||
1371
+ this.show_data.fields[index].label === '街道/乡镇' ||
1372
+ this.show_data.fields[index].label === '集收单位' ||
1373
+ this.show_data.fields[index].label === '楼号/组' ||
1374
+ this.show_data.fields[index].label === '单元/排' ||
1375
+ this.show_data.fields[index].label === '楼层' ||
1376
+ this.show_data.fields[index].label === '门牌号'
1377
+ ) {
1378
+
1379
+ let f_pcd = this.getLableValue('区/县') || ''
1380
+ let f_street = this.getLableValue('街道/乡镇') || ''
1381
+ let f_residential_area = this.getLableValue('集收单位') || ''
1382
+ let f_building = this.getLableValue('楼号/组') || ''
1383
+ let f_building_suffix = f_building ? this.config.f_building_suffix : ''
1384
+ let f_unit = this.getLableValue('单元/排') || ''
1385
+ let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
1386
+ let f_floor = this.getLableValue('楼层') || ''
1387
+ let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
1388
+ let f_room = this.getLableValue('门牌号') || ''
1389
+ let f_room_suffix = f_room ? this.config.f_room_suffix : ''
1390
+
1391
+ let f_address = null
1392
+
1393
+ let f_address_type = this.show_data.f_address_type
1394
+ 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
1395
+ /*if (f_address_type === '民用城区') {
1396
+ f_address = 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
1397
+ }
1398
+ if (f_address_type === '民用农村') {
1399
+ f_address = f_building + f_unit + f_floor + f_room
1400
+ }
1401
+ if (f_address_type === '特殊城区') {
1402
+ f_address = f_street + f_residential_area
1403
+ }*/
1404
+ this.setLabelValue("地址", f_address)
1405
+ }
1406
+ }
1407
+ },
1408
+ async 'getDesignerPeople' () {
1409
+ let data = {
1410
+ source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
1411
+ userid: this.$login.f.id
1412
+ }
1413
+
1414
+ let http = new HttpResetClass()
1415
+ let res = await http.load(
1416
+ 'POST',
1417
+ `rs/search`,
1418
+ {data: data},
1419
+ {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
1420
+ )
1421
+
1422
+ return res.data.map(item => {
1423
+ return {
1424
+ label: item.name,
1425
+ value: item.id
1426
+ }
1427
+ })
1428
+ },
1429
+ // 申请节点初始化
1430
+ 'applyReadyEvent' () {
1431
+ this.addressInitialization()
1432
+
1433
+ this.pcdChange()
1434
+ this.streetChange()
1435
+ },
1436
+ // 街道失去焦点
1437
+ async 'streetChange' (index) {
1438
+ if (isEmpty(this.show_data.f_street)) {
1439
+ return
1440
+ }
1441
+
1442
+ this.setLabelValue('集收单位', null)
1443
+
1444
+ let data = {
1445
+ tablename: 't_area',
1446
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_street = '${this.show_data.f_street}'`
1447
+ }
1448
+ let http = new HttpResetClass()
1449
+ let res = await http.load(
1450
+ 'POST',
1451
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1452
+ {data: data},
1453
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1454
+ )
1455
+
1456
+ this.setLabelOptions('集收单位', res.data.map(item => {
1457
+ return {
1458
+ label: item.f_residential_area,
1459
+ value: item.f_residential_area
1460
+ }
1461
+ }))
1462
+ },
1463
+ // 选择报建项目
1464
+ 'selectApply' (row) {
1465
+ this.setLabelValue('工程名称', row.f_entry_name)
1466
+ this.setLabelValue('工程编号', row.f_apply_num)
1467
+ this.setLabelValue('报建类型', row.f_apply_type)
1468
+ this.setLabelValue('用户名称', row.f_user_name)
1469
+ this.setLabelValue('用户电话', row.f_phone)
1470
+ this.setLabelValue('证件类型', row.f_credentials)
1471
+ this.setLabelValue('证件号码', row.f_idnumber)
1472
+ this.setLabelValue('地址', row.f_address)
1473
+ this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
1474
+
1475
+ this.show_data.parentApply = JSON.parse(JSON.stringify(row))
1476
+
1477
+ delete row.id
1478
+ delete row.actid
1479
+ delete row.defid
1480
+ delete row.defname
1481
+ delete row.version
1482
+ delete row.f_apply_num
1483
+ delete row.f_sub_state
1484
+ delete row.f_apply_type
1485
+ delete row.f_process_id
1486
+
1487
+ this.show_data = Object.assign({}, this.show_data, row)
1488
+
1489
+ this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
1490
+ },
1491
+ // 区县失去焦点
1492
+ async 'pcdChange' (index) {
1493
+ if (isEmpty(this.show_data.f_pcd)) {
1494
+ return
1495
+ }
1496
+
1497
+ this.setLabelValue('街道/乡镇', null)
1498
+ this.setLabelValue('集收单位', null)
1499
+
1500
+
1501
+
1502
+ let data = {
1503
+ tablename: 't_street',
1504
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1505
+ }
1506
+ let f_address_type = this.getLableValue('地址类型')
1507
+
1508
+ if (f_address_type === '民用市区') {
1509
+ data.condition = `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
1510
+ }
1511
+ if (f_address_type === '民用乡镇') {
1512
+ data.condition = `f_filialeid = '${Vue.user.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
1513
+ }
1514
+
1515
+ let http = new HttpResetClass()
1516
+ let res = await http.load(
1517
+ 'POST',
1518
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1519
+ {data: data},
1520
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
1521
+ )
1522
+
1523
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
1524
+ return {
1525
+ label: item.f_street,
1526
+ value: item.f_street
1527
+ }
1528
+ }))
1529
+ },
1530
+ // 选择用户档案信息
1531
+ 'selectUserinfo' (row) {
1532
+ this.setLabelValue('用户编号', row.f_userinfo_code)
1533
+ this.setLabelValue('用户名称', row.f_user_name)
1534
+ this.setLabelValue('用户电话', row.f_user_phone)
1535
+ this.setLabelValue('证件类型', row.f_credentials)
1536
+ this.setLabelValue('证件号码', row.f_idnumber)
1537
+ this.setLabelValue('地址', row.f_address)
1538
+
1539
+ this.show_data.f_userinfo_id = row.f_userinfo_id
1540
+ this.show_data.f_userinfo_code = row.f_userinfo_code
1541
+ },
1542
+ // 地址类型失去焦点
1543
+ 'addressTypeChange' (index) {
1544
+ this.setLabelValue('街道/乡镇', null)
1545
+ this.setLabelValue('集收单位', null)
1546
+ let f_address_type = this.show_data.fields[index].value
1547
+ for (const item of this.show_data.fields) {
1548
+ if (f_address_type === '民用市区') {
1549
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
1550
+ item.hidden = false
1551
+ item.required = true
1552
+ item.value = null
1553
+ }
1554
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1555
+ item.hidden = false
1556
+ item.required = false
1557
+ item.value = null
1558
+ }
1559
+ if (item.label === '地址') {
1560
+ item.readonly = true
1561
+ item.value = null
1562
+ }
1563
+ }
1564
+ if (f_address_type === '民用乡镇') {
1565
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号') {
1566
+ item.hidden = false
1567
+ item.required = true
1568
+ item.value = null
1569
+ }
1570
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1571
+ item.hidden = false
1572
+ item.required = false
1573
+ item.value = null
1574
+ }
1575
+ if (item.label === '楼层') {
1576
+ item.hidden = true
1577
+ item.required = false
1578
+ item.value = null
1579
+ }
1580
+ if (item.label === '地址') {
1581
+ item.readonly = true
1582
+ item.value = null
1583
+ }
1584
+ }
1585
+ if (f_address_type === '特殊地址') {
1586
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
1587
+ item.hidden = false
1588
+ item.required = true
1589
+ item.value = null
1590
+ }
1591
+ if (item.label === '集收单位') {
1592
+ item.hidden = false
1593
+ item.required = false
1594
+ item.value = null
1595
+ }
1596
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
1597
+ item.hidden = true
1598
+ item.required = false
1599
+ item.value = null
1600
+ }
1601
+ if (item.label === '地址') {
1602
+ item.readonly = false
1603
+ item.value = null
1604
+ }
1605
+ }
1606
+ }
1607
+ },
1608
+ // 搜索小区
1609
+ async 'searchArea' (area, index) {
1610
+ let data = {
1611
+ tablename: 't_area',
1612
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_street = '${this.show_data.f_street}' and f_residential_area like '%${area}%'`
1613
+ }
1614
+ let http = new HttpResetClass()
1615
+ let res = await http.load(
1616
+ 'POST',
1617
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1618
+ {data: data},
1619
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1620
+ )
1621
+
1622
+ if (res.data.length === 0) {
1623
+ return
1624
+ }
1625
+
1626
+ this.setLabelOptions('集收单位', res.data.map(item => {
1627
+ return {
1628
+ label: item.f_residential_area,
1629
+ value: item.f_residential_area
1630
+ }
1631
+ }))
1632
+ },
1633
+ // 搜索小区
1634
+ async 'searchAreaCollective' (area, index) {
1635
+ let data = {
1636
+ tablename: 't_area',
1637
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_residential_area like '%${area}%'`
1638
+ }
1639
+ let http = new HttpResetClass()
1640
+ let res = await http.load(
1641
+ 'POST',
1642
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1643
+ {data: data},
1644
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1645
+ )
1646
+
1647
+ if (res.data.length === 0) {
1648
+ return
1649
+ }
1650
+
1651
+ this.setLabelOptions('集收单位', res.data.map(item => {
1652
+ return {
1653
+ label: item.f_residential_area,
1654
+ value: item.f_residential_area
1655
+ }
1656
+ }))
1657
+ },
1658
+ // 团购转散户初始化
1659
+ 'apply2ReadyEvent' () {
1660
+ if (this.show_data.f_apply_source === '线下发起') {
1661
+ this.addressInitialization()
1662
+ this.hideLabels('用户编号')
1663
+ this.electiveLabels('用户编号')
1664
+ this.showLabels('片区', '地址类型')
1665
+ this.requiredLabels('片区', '地址类型')
1666
+ }
1667
+ if (this.show_data.f_apply_source === '自动发起') {
1668
+ this.hideLabels('片区', '地址类型')
1669
+ this.electiveLabels('片区', '地址类型',)
1670
+ }
1671
+ },
1672
+ 'onblur' (index) {},
1673
+ 'oninput' (index) {},
1674
+ 'initializtionView' () {},
1675
+ async 'onchangeModal' (index, fieldIndex) {
1676
+ },
1677
+ async 'onblurModal' (index, fieldIndex) {
1678
+
1679
+ },
1680
+ async 'oninputModal' (index, fieldIndex) {
1681
+
1682
+ },
1683
+ async 'onetomanydelete' (index, rowIndex) {
1684
+
1685
+ let http = new HttpResetClass()
1686
+
1687
+ let res = await http.load(
1688
+ 'DELETE',
1689
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
1690
+ null,
1691
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
1692
+ )
1693
+ res = await this.$resetpost(
1694
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
1695
+ this.show_data
1696
+ )
1697
+ this.breakControl()
1698
+ },
1699
+ async 'onetomanyupdate' (index, rowIndex) {
1700
+ let data = this.show_data.onetomany[index].rows[rowIndex]
1701
+
1702
+ this.show_data.onetomany[index].fields.forEach(item => {
1703
+ data[item.field] = item.value
1704
+ })
1705
+ let res = await this.$resetpost(
1706
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1707
+ data
1708
+ )
1709
+ res = await this.$resetpost(
1710
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
1711
+ this.show_data
1712
+ )
1713
+ this.breakControl()
1714
+ },
1715
+ async 'onetomanyadd' (index) {
1716
+ let data = {
1717
+ f_process_id : this.show_data.f_process_id,
1718
+ f_operator_id: Vue.user.id,
1719
+ f_operator: Vue.user.name,
1720
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
1721
+ f_orgid: Vue.user.orgid,
1722
+ f_orgname: Vue.user.orgs
1723
+ }
1724
+ this.show_data.onetomany[index].fields.forEach(item => {
1725
+ data[item.field] = item.value
1726
+ })
1727
+ let res = await this.$resetpost(
1728
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1729
+ data
1730
+ )
1731
+ res = await this.$resetpost(
1732
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
1733
+ this.show_data
1734
+ )
1735
+ this.breakControl()
1736
+ },
1737
+ 'onbutchange' (index) {
1738
+
1739
+ },
1740
+ 'onbutblur' (index) {
1741
+
1742
+ },
1743
+ 'onbutinput' (index) {
1744
+
1745
+ },
1746
+ 'changeShowfei' (val) {
1747
+ console.log('回调修改父组件属性----'+val)
1748
+ this.show_data.showfei=val
1749
+ }
1750
+ },
1751
+ watch: {
1752
+ /*async 'show_data.showfei' (val) {
1753
+ console.log(`支付成功!!!!!!${val}`)
1754
+ if(this.show_data.showfei=='已付款'){
1755
+ await this.buttonCommit()
1756
+ }
1757
+ }*/
1758
+ }
1759
+ }
1760
+ </script>
1761
+ <style scoped>
1762
+ </style>