apply-clients 3.5.4-90 → 3.5.4-92

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