apply-clients 3.5.4-2 → 3.5.4-21

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