apply-clients 3.5.4-96 → 3.5.4-97

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