apply-clients 3.5.4-77 → 3.5.4-78

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 (36) hide show
  1. package/build/dev-server.js +10 -5
  2. package/package.json +1 -1
  3. package/src/App.vue +25 -25
  4. package/src/apply.js +137 -137
  5. package/src/components/android/AppCheckTakePic.vue +168 -168
  6. package/src/components/android/Process/AppServiceControl.vue +1755 -1755
  7. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  8. package/src/components/product/PcZhihuanManagement.vue +160 -160
  9. package/src/filiale/fugou/android/AppAddMaterialScience.vue +448 -448
  10. package/src/filiale/fugou/android/AppAddReplacement.vue +341 -341
  11. package/src/filiale/fugou/android/AppChargeManagement.vue +739 -739
  12. package/src/filiale/fugou/android/AppDevicesManagement.vue +519 -519
  13. package/src/filiale/fugou/android/AppServiceControl.vue +1843 -1843
  14. package/src/filiale/fugou/android/AppZhihuanManagement.vue +191 -191
  15. package/src/filiale/fugou/android.js +15 -15
  16. package/src/filiale/fugou/pc/AddReplacement.vue +340 -340
  17. package/src/filiale/fugou/pc/ExplorationSelect.vue +525 -515
  18. package/src/filiale/fugou/pc/InstallationDetails.vue +646 -646
  19. package/src/filiale/fugou/pc/ServiceControl.vue +1703 -1704
  20. package/src/filiale/fugou/pc/ServiceView.vue +941 -0
  21. package/src/filiale/fugou/pc/addMaterialScience.vue +481 -481
  22. package/src/filiale/fugou/pc/addressAndUserinfoManagement.vue +216 -216
  23. package/src/filiale/fugou/pc/devicesManagement.vue +483 -483
  24. package/src/filiale/fugou/pc.js +2 -1
  25. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
  26. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
  27. package/src/filiale/qianneng/android.js +15 -15
  28. package/src/filiale/qianneng/pc/Applydetail.vue +378 -378
  29. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  30. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +526 -526
  31. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +639 -639
  32. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1681 -1681
  33. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +548 -548
  34. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2075 -2075
  35. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1058 -1058
  36. package/src/main.js +3 -2
@@ -1,1843 +1,1843 @@
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 {
490
- item.value = []
491
- }
492
- }
493
- }
494
-
495
- // 控制组件
496
- if (this.selectdata.components) {
497
- this.selectdata.components.forEach(item => {
498
- if (!item.mark) {
499
- item.mark = 0
500
- }
501
- })
502
- }
503
-
504
- // 初始化onetomany
505
- if (this.selectdata.onetomany) {
506
- for (const item of this.selectdata.onetomany) {
507
- let res = null
508
- if (item.queryEvent) {
509
- res = this[item.queryEvent]()
510
- } else {
511
- let http = new HttpResetClass()
512
- let data = {
513
- tablename: item.tables[0],
514
- condition: `f_process_id='${this.selectdata.f_process_id}'`
515
- }
516
- res = await http.load(
517
- 'POST',
518
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
519
- // `rs/sql/apply_singleTable`,
520
- {data: data},
521
- {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
522
- )
523
- }
524
-
525
- item.rows = res.data
526
-
527
- // 初始化onetomany中的fields
528
- for (const field of item.fields) {
529
- if (!field.value) {
530
- if (field.value !== 0) {
531
- field.value = null
532
- }
533
- }
534
-
535
- if (field.default || field.default === 0) {
536
- field.value = field.default
537
- }
538
-
539
- // datepicker
540
- if (field.type === 'datepicker' && !field.value && field.default) {
541
- field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
542
- }
543
-
544
- if (field.type === 'select') {
545
-
546
- if (field.param) {
547
- let temp = this.$appdata.getParam(field.label)
548
-
549
- if (temp && temp.length > 0) {
550
- field.options = temp
551
- }
552
-
553
- if (field.paramLabel) {
554
- temp = this.$appdata.getParam(field.paramLabel)
555
- if (temp && temp.length > 0) {
556
- item.options = temp
557
- }
558
- }
559
- }
560
-
561
- }
562
- }
563
- }
564
- }
565
-
566
- // 初始化 buttons_fields
567
- for (const item of this.selectdata.buttons) {
568
- if (item.button_name === '下发') {
569
- let data = {
570
- source: item.source,
571
- userid: Vue.user.id
572
- // userid: '51953'
573
- }
574
- if (item.sourceMethod) {
575
- data.source = this[item.sourceMethod]()
576
- }
577
- if (!data.source) {
578
- this.$showMessage("请配置获取人员表达式")
579
- return
580
- }
581
- let res = await this.$resetpost(
582
- `${this.$androidUtil.getProxyUrl()}/rs/search`,
583
- // `rs/search`,
584
- {data: data},
585
- {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
586
- )
587
-
588
- let options = res.data.map(source => {
589
- return {
590
- "label": source.name,
591
- "value": source.id
592
- }
593
- })
594
-
595
- if (item.button_fields.length !== 1) {
596
- this.$showMessage("下发有且只能有一个字段!!!")
597
- return
598
- }
599
-
600
- item.button_fields[0].options = options
601
- }
602
- if (item.button_fields) {
603
- item.button_fields.forEach(x => {
604
- // 如果配置类型为select,优先从参数列表获取options
605
- if (x.type === 'select') {
606
-
607
- if (x.param) {
608
- let temp = this.$appdata.getParam(x.label)
609
-
610
- if (temp && temp.length > 0) {
611
- x.options = temp
612
- }
613
-
614
- if (x.paramLabel) {
615
- temp = this.$appdata.getParam(x.paramLabel)
616
- if (temp && temp.length > 0) {
617
- x.options = temp
618
- }
619
- }
620
- }
621
-
622
- }
623
- })
624
- }
625
- }
626
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
627
- let temp = JSON.parse(JSON.stringify(this.selectdata))
628
- this.show_data = temp
629
- for (const item of this.show_data.fields) {
630
- if(item.label=='气价名称' && !isEmpty(this.show_data.f_price_name)){
631
- item.options.forEach(x=>{
632
- if(x.label==this.show_data.f_price_name){
633
- item.value=x.value
634
- }
635
- })
636
- }
637
- }
638
- if(!this.show_data.showfei){
639
- this.$set('show_data.showfei', '未收费')
640
- }
641
- //this.show_data.showfei=false
642
-
643
- this.$nextTick(() => {
644
- this.showview = true
645
- })
646
- this.getServicPeo()
647
- },
648
- signClean () {
649
- this.selectdata.f_construction_sign = null
650
- },
651
- signSuccess (fileUrl) {
652
- console.log('==============签字回调==================')
653
- console.log(fileUrl)
654
- this.selectdata.f_construction_sign = fileUrl
655
- },
656
- // 金额转大写
657
- smalltoBIG(n) {
658
- let fraction = ['角', '分'];
659
- let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
660
- let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
661
- let head = n < 0 ? '欠' : '';
662
- n = Math.abs(n);
663
-
664
- let s = '';
665
-
666
- for (var i = 0; i < fraction.length; i++) {
667
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
668
- }
669
- s = s || '整';
670
- n = Math.floor(n);
671
-
672
- for (var i = 0; i < unit[0].length && n > 0; i++) {
673
- let p = '';
674
- for (var j = 0; j < unit[1].length && n > 0; j++) {
675
- p = digit[n % 10] + unit[1][j] + p;
676
- n = Math.floor(n / 10);
677
- }
678
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
679
- }
680
- return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
681
- },
682
- getLableValue(label) {
683
- for (const item of this.show_data.fields) {
684
- if (item.label === label && item.type !== 'number') {
685
- return item.value || ''
686
- }
687
- if (item.label === label && item.type === 'number') {
688
- return item.value || 0
689
- }
690
- }
691
- },
692
- getLableOptions(label) {
693
- for (const item of this.show_data.fields) {
694
- if (item.label === label) {
695
- return item.options
696
- }
697
- }
698
- },
699
- hideLabels(...labels) {
700
- for (const item of this.show_data.fields) {
701
- if (labels.includes(item.label)) {
702
- item.hidden = true
703
- }
704
- }
705
- },
706
- requiredLabels(...labels) {
707
- for (const item of this.show_data.fields) {
708
- if (labels.includes(item.label)) {
709
- item.required = true
710
- }
711
- }
712
- },
713
- electiveLabels(...labels) {
714
- for (const item of this.show_data.fields) {
715
- if (labels.includes(item.label)) {
716
- item.required = false
717
- }
718
- }
719
- },
720
- showLabels(...labels) {
721
- for (const item of this.show_data.fields) {
722
- if (labels.includes(item.label)) {
723
- item.hidden = false
724
- }
725
- }
726
- },
727
- setLabelValue(label, value) {
728
- for (const item of this.show_data.fields) {
729
- if (item.label === label) {
730
- item.value = value
731
- this.show_data[item.field] = value
732
- }
733
- }
734
- },
735
- setLabelOptions(label, options) {
736
- for (const item of this.show_data.fields) {
737
- if (item.label === label) {
738
- item.options = options
739
- }
740
- }
741
- },
742
- disabledButtons(...buttons) {
743
- for (const item of this.show_data.buttons) {
744
- if (buttons.includes(item.button_name)) {
745
- item.disabled = true
746
- }
747
- }
748
- },
749
- enableButtons(...buttons) {
750
- for (const item of this.show_data.buttons) {
751
- if (buttons.includes(item.button_name)) {
752
- item.disabled = false
753
- }
754
- }
755
- },
756
- showButtons(...buttons) {
757
- for (const item of this.show_data.buttons) {
758
- if (buttons.includes(item.button_name)) {
759
- item.hidden = false
760
- }
761
- }
762
- },
763
- hideButtons(...buttons) {
764
- for (const item of this.show_data.buttons) {
765
- if (buttons.includes(item.button_name)) {
766
- item.hidden = true
767
- }
768
- }
769
- },
770
- async streetChange () {
771
- if (isEmpty(this.show_data.f_street)) {
772
- return
773
- }
774
-
775
- let data = {
776
- tablename: 't_area',
777
- // condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
778
- condition: `f_filialeid = '${Vue.user.orgid}' and f_street = '${this.show_data.f_street}'`
779
- }
780
- let http = new HttpResetClass()
781
- let res = await http.load(
782
- 'POST',
783
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
784
- {data: data},
785
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
786
- )
787
-
788
- this.setLabelOptions('集收单位', res.data.map(item => {
789
- return {
790
- label: item.f_residential_area,
791
- value: item.f_residential_area
792
- }
793
- }))
794
- },
795
- // 获取集收单位
796
- async getArea () {
797
- let data = {
798
- tablename: 't_area',
799
- condition: `f_filialeid = '${Vue.user.orgid}'`
800
- }
801
- let http = new HttpResetClass()
802
- let res = await http.load(
803
- 'POST',
804
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
805
- {data: data},
806
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
807
- )
808
-
809
- return res.data.map(item => {
810
- return {
811
- label: item.f_residential_area,
812
- value: item.f_residential_area
813
- }
814
- })
815
- },
816
- async pcdChange () {
817
- if (isEmpty(this.show_data.f_pcd)) {
818
- return
819
- }
820
-
821
- let data = {
822
- tablename: 't_street',
823
- // condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
824
- condition: `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
825
- }
826
- let f_address_type = this.getLableValue('地址类型')
827
-
828
- if (f_address_type === '民用市区') {
829
- // data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
830
- data.condition = `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
831
- }
832
- if (f_address_type === '民用乡镇') {
833
- // data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
834
- data.condition = `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
835
- }
836
-
837
- let http = new HttpResetClass()
838
- let res = await http.load(
839
- 'POST',
840
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
841
- {data: data},
842
- {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
843
- )
844
-
845
- this.setLabelOptions('街道/乡镇', res.data.map(item => {
846
- return {
847
- label: item.f_street,
848
- value: item.f_street
849
- }
850
- }))
851
- },
852
- async addressInitialization () {
853
- //this.$getConfig(this, 'UserAddress')
854
- //获取地址配置文件
855
- try {
856
- let res = await new HttpResetClass().load('get',`${this.$androidUtil.getProxyUrl()}/rs/vue/UserAddress.json`,null,{resolveMsg: null, rejectMsg: null})
857
- Object.assign(this.config, res.data)
858
- } catch (error) {
859
- console.log("未获取到地址信息")
860
- }
861
- console.log("???????????不走了吗!")
862
- let f_address_type = this.show_data.f_address_type
863
- for (const item of this.show_data.fields) {
864
- if (f_address_type === '民用市区') {
865
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号'|| item.label === '小区') {
866
- item.hidden = false
867
- item.required = true
868
- }
869
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
870
- item.hidden = false
871
- item.required = false
872
- }
873
- if (item.label === '地址') {
874
- item.readonly = true
875
- }
876
- }
877
- if (f_address_type === '民用乡镇') {
878
- if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号'|| item.label === '小区') {
879
- item.hidden = false
880
- item.required = true
881
- }
882
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
883
- item.hidden = false
884
- item.required = false
885
- }
886
- if (item.label === '楼层') {
887
- item.hidden = true
888
- item.required = false
889
- }
890
- if (item.label === '地址') {
891
- item.readonly = true
892
- }
893
- }
894
- if (f_address_type === '特殊地址') {
895
- if (item.label === '区/县' || item.label === '街道/乡镇') {
896
- item.hidden = false
897
- item.required = true
898
- }
899
- if (item.label === '集收单位') {
900
- item.hidden = false
901
- item.required = false
902
- }
903
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
904
- item.hidden = true
905
- item.required = false
906
- }
907
- if (item.label === '地址') {
908
- item.readonly = false
909
- }
910
- }
911
-
912
- if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
913
- item.hidden = true
914
- }
915
- }
916
- },
917
-
918
- async checkDuplicate(index) {
919
- let http = new HttpResetClass()
920
- let data = {
921
- tablename: 't_apply',
922
- condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
923
- }
924
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data: data}, {
925
- resolveMsg: null,
926
- rejectMsg: `${this.show_data.fields[index].label}查询失败`
927
- })
928
- if (res.data.length > 0) {
929
- this.show_data.fields[index].value = null
930
- this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
931
- }
932
- },
933
- async breakControl () {
934
- if (this.show_data.id) {
935
- let data = {
936
- condition: `u.id = ${this.show_data.id}`,
937
- data: {
938
- id: Vue.user.id,
939
- orgid: Vue.user.orgid
940
- // id: '51953',
941
- // orgid: '10101'
942
- }
943
- }
944
- let res = await this.$resetpost(
945
- `${this.$androidUtil.getProxyUrl()}/rs/sql/checkuser`,
946
- // `rs/sql/checkuser`,
947
- {data: data},
948
- {resolveMsg: null, rejectMsg: '数据更新失败,请手查询更新!!!'}
949
- )
950
-
951
- this.selectdata = res.data[0]
952
- } else {
953
- this.selectdata = servicedata
954
- }
955
-
956
- this.refurbish()
957
- },
958
- async addressTips () {
959
- let res = ''
960
- if (this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') {
961
- res = await this.$showMessage('报警器报建下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
962
- }else{
963
- res = await this.$showMessage('增容改管下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
964
- }
965
- if (res == 'confirm') {
966
- return
967
- }
968
- throw '用户信息确认!!!'
969
- },
970
- // 缴费前置
971
- chargeBefore () {
972
- if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
973
- this.$showAlert('费用未结清!!!', 'warning', 3000)
974
- throw null
975
- }
976
- if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname==="通气点火"){
977
- let ventilation = this.getLableValue('是否具备通气条件')
978
- if(ventilation==='否'){
979
- let remark=this.getLableValue('通气备注')
980
- if(isEmpty(remark)){
981
- this.$showMessage(`不满足通气条件,请进行拍照,并备注说明!!!`)
982
- throw null
983
- }else{
984
- this.$showMessage(`不满足通气条件,请进行拍照!!!`)
985
- }
986
- }
987
- }
988
- },
989
- //通气点火前置
990
- async ventilationBefore() {
991
- let http = new HttpResetClass()
992
- let data = {
993
- tablename: 't_files',
994
- condition: `f_blobid= '${this.show_data.f_process_id}' and defname='${this.show_data.defname}' and fremarks='手机拍照' `
995
- }
996
- let res = await http.load(
997
- 'POST',
998
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
999
- {data: data},
1000
- {resolveMsg: null, rejectMsg: '抄表册查询失败!!!'}
1001
- )
1002
- if (this.show_data.f_is_ventilation == '否') {
1003
- //不满足通气条件
1004
- if (this.show_data.f_mark_ventilation == '' ||this.show_data.f_mark_ventilation==null) {
1005
- this.$showMessage(`不满足通气条件,请进行备注说明!!!`)
1006
- throw null
1007
- }
1008
- if(res.data.length <= 0){
1009
- this.$showMessage(`不满足通气条件,需拍照片进行上传!!!`)
1010
- throw null
1011
- }
1012
- }
1013
- },
1014
- // 施工前置
1015
- async constructionBefore () {
1016
- let http = new HttpResetClass()
1017
- let data = {
1018
- condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_meter_classify is null and f_meternumber is null`
1019
- }
1020
- let res = await http.load(
1021
- 'POST',
1022
- `${this.$androidUtil.getProxyUrl()}/rs/sql/countApplyUserinfo`,
1023
- {data: data},
1024
- {
1025
- resolveMsg: null,
1026
- rejectMsg: '安装明细查询失败!!!'
1027
- })
1028
- if (res.data[0].num > 0) {
1029
- this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
1030
- throw `还有${res.data[0].num}户未安装,无法提交`
1031
- }
1032
- },
1033
- changePipeBuild () {
1034
- if (this.selectdata.f_process_dep === '工程部') {
1035
- return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
1036
- }
1037
- if (this.selectdata.f_process_dep === '运营部') {
1038
- return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
1039
- }
1040
- return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
1041
- },
1042
- async getPrice (f_price_id) {
1043
- console.log('=======================')
1044
- console.log(f_price_id)
1045
-
1046
- let data = {
1047
- condition: `sp.f_filialeid = '${Vue.user.orgid}'`
1048
- }
1049
-
1050
- if (!isEmpty(f_price_id)) {
1051
- data.condition = `sp.f_filialeid = '${Vue.user.orgid}' and sp.f_price_id = ${f_price_id}`
1052
- }
1053
- let http = new HttpResetClass()
1054
- let res = await http.load(
1055
- 'POST',
1056
- `${this.$androidUtil.getProxyUrl()}/rs/sql/applyGetPrice`,
1057
- {data: data},
1058
- {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
1059
- )
1060
-
1061
- return res.data.map(item => {
1062
- return {
1063
- label: item.f_price_name,
1064
- value: item
1065
- }
1066
- })
1067
- },
1068
- //获取抄表册
1069
- async getMeterBook () {
1070
- let data = {
1071
- tablename: 't_meter_book',
1072
- condition: `f_book_state='有效' `
1073
- }
1074
- let http = new HttpResetClass()
1075
- let res = await http.load(
1076
- 'POST',
1077
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1078
- {data: data},
1079
- {resolveMsg: null, rejectMsg: '抄表册查询失败!!!'}
1080
- )
1081
- return res.data.map(item => {
1082
- return {
1083
- label: item.f_book_name,
1084
- value: item.f_book_code
1085
- }
1086
- })
1087
- },
1088
- async getDesignerPeople () {
1089
- let data = {
1090
- source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
1091
- userid: Vue.user.id
1092
- }
1093
-
1094
- let http = new HttpResetClass()
1095
- let res = await http.load(
1096
- 'POST',
1097
- `${this.$androidUtil.getProxyUrl()}/rs/search`,
1098
- {data: data},
1099
- {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
1100
- )
1101
-
1102
- return res.data.map(item => {
1103
- return {
1104
- label: item.name,
1105
- value: item.id
1106
- }
1107
- })
1108
- },
1109
- async surveyStopApply () {
1110
- console.log('终止报建!!!!!')
1111
-
1112
- this.show_data.f_stop_reason = '现场勘察不符合报装条件'
1113
-
1114
- let data = {
1115
- data: this.show_data,
1116
- user: Vue.user
1117
- }
1118
-
1119
- let res = await this.$resetpost(
1120
- `${this.$androidUtil.getProxyUrl()}/rs/logic/surveyStopApply`,
1121
- {data: data},
1122
- {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
1123
- )
1124
- if(res.data==200){
1125
- this.$dispatch('loadPage')
1126
- this.$showMessage('终止报建成功!!!')
1127
- this.$back()
1128
- throw '终止报建!!!'
1129
- }else{
1130
- this.$showMessage('终止报建失败!!!')
1131
- }
1132
- },
1133
- async getDevInfo () {
1134
- let data = {
1135
- tablename: 't_dev_info',
1136
- condition: `f_orgid = '${Vue.user.orgid}'`
1137
- }
1138
- let http = new HttpResetClass()
1139
- let res = await http.load(
1140
- 'POST',
1141
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1142
- {data: data},
1143
- {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
1144
- )
1145
-
1146
- return res.data.map(item => {
1147
- return {
1148
- label: item.f_dev_name,
1149
- value: item.f_dev_name
1150
- }
1151
- })
1152
- },
1153
- // 获取片区
1154
- async getSliceArea () {
1155
- let data = {
1156
- tablename: 't_community',
1157
- condition: `f_filialeid = '${Vue.user.orgid}'`
1158
- }
1159
- let http = new HttpResetClass()
1160
- let res = await http.load(
1161
- 'POST',
1162
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1163
- {data: data},
1164
- {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
1165
- )
1166
- return res.data.map(item => {
1167
- return {
1168
- label: item.f_community_name,
1169
- value: item.f_community_name
1170
- }
1171
- })
1172
- },
1173
- // 获取区县
1174
- async getPcd () {
1175
- let data = {
1176
- tablename: 't_pcd',
1177
- condition: `f_filialeid = '${Vue.user.orgid}'`
1178
- }
1179
- let http = new HttpResetClass()
1180
- let res = await http.load(
1181
- 'POST',
1182
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1183
- {data: data},
1184
- {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
1185
- )
1186
-
1187
- return res.data.map(item => {
1188
- return {
1189
- label: item.f_pcd,
1190
- value: item.f_pcd
1191
- }
1192
- })
1193
- }
1194
-
1195
- },
1196
- events: {
1197
- 'complyInstallation' (index) {
1198
- if (this.show_data.f_is_have === '否') {
1199
- this.hideButtons('提交', '出图', '缴费')
1200
- this.showButtons('终止')
1201
- }
1202
- if (this.show_data.f_is_have === '是') {
1203
- this.hideButtons('终止')
1204
- this.showButtons('提交', '出图', '缴费')
1205
- }
1206
- },
1207
- async 'igniteDispatchReadyEvent' () {
1208
- let data = {
1209
- tablename: 'activityins',
1210
- condition: `processid = '${this.show_data.f_process_id}' and defname = '工程施工' and state = '结束'`
1211
- }
1212
- let http = new HttpResetClass()
1213
- let res = await http.load(
1214
- 'POST',
1215
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1216
- {data: data},
1217
- {resolveMsg: null, rejectMsg: '查询失败!!!'}
1218
- )
1219
- if (res.data.length <= 0) {
1220
- console.log('+++++++++++++++++++++++++++++')
1221
- console.log('没有施工,不能退回')
1222
- this.hideButtons('退回')
1223
- }
1224
- },
1225
- 'breakControl' (val) {
1226
- this.breakControl(val)
1227
- },
1228
- // 检查重复
1229
- 'checkRepeat' (index) {
1230
- this.checkDuplicate(index)
1231
- },
1232
- 'buildReadyEvent' () {
1233
- this.setLabelValue('施工单位', Vue.user.name)
1234
- this.setLabelValue('施工安装时间', new Date().Format('yyyy-MM-dd HH:mm:ss'))
1235
- },
1236
- // 选择材料
1237
- async materialNameChenge (index, fieldIndex) {
1238
- let material = this.show_data.onetomany[index].fields[fieldIndex].value
1239
-
1240
- this.show_data.onetomany[index].fields.forEach(item => {
1241
- if (material[item.field]) {
1242
- item.value = material[item.field]
1243
- }
1244
- })
1245
- },
1246
- // 打开模态框获取材料
1247
- async 'getMaterialName' (index) {
1248
- let data = {
1249
- condition: `1=1`
1250
- }
1251
- let http = new HttpResetClass()
1252
- let res = await http.load(
1253
- 'POST',
1254
- `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
1255
- {data: data},
1256
- {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
1257
- )
1258
-
1259
- this.show_data.onetomany[index].fields.forEach(field => {
1260
- if (field.label === '选择材料') {
1261
- field.options = res.data.map(item => {
1262
- return {
1263
- 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}`,
1264
- 'value': item
1265
- }
1266
- })
1267
- }
1268
- })
1269
- },
1270
- // 选择气价
1271
- 'priceChange' (index) {
1272
- if (isEmpty(this.show_data.stairPrice)) {
1273
- return
1274
- }
1275
-
1276
- let stairPrice = this.getLableValue('气价名称')
1277
-
1278
- this.setLabelValue('气价类型', stairPrice.f_price_type)
1279
- this.setLabelValue('用气性质', stairPrice.f_gasproperties)
1280
- this.setLabelValue('价格', stairPrice.f_price)
1281
- this.setLabelValue('客户类型', stairPrice.f_user_type)
1282
- this.show_data.f_price_id = stairPrice.id
1283
- this.show_data.f_price_name = stairPrice.f_price_name
1284
- },
1285
- // 是否购买保险
1286
- isInsureChange (index) {
1287
- let f_is_insure = this.getLableValue('是否购买保险')
1288
- for (const item of this.show_data.fields) {
1289
- if (f_is_insure === '是') {
1290
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1291
- item.hidden = false
1292
- item.required = true
1293
- }
1294
- if (item.label === '保险备注') {
1295
- item.hidden = false
1296
- }
1297
- } else {
1298
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1299
- item.hidden = true
1300
- item.required = false
1301
- }
1302
- }
1303
- }
1304
- },
1305
- // 通气点火初始化
1306
- async 'gasReadyEvent' () {
1307
- console.log('----通气点火初始化----')
1308
- if (!isEmpty(this.show_data.f_price_id)) {
1309
- let priceList = await this.getPrice(this.show_data.f_price_id)
1310
- this.setLabelValue('气价名称', priceList[0].value)
1311
- }
1312
-
1313
- let data = {
1314
- tablename: 't_userfees',
1315
- condition: `f_orgid = '${Vue.user.orgid}' and f_userinfo_id = '${this.show_data.f_userinfo_id}' and f_state = '待执行'`
1316
- }
1317
-
1318
- console.log('---------查询是否有待执行保险-----------')
1319
- let http = new HttpResetClass()
1320
- let res = await http.load(
1321
- 'POST',
1322
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1323
- {data: data},
1324
- {resolveMsg: null, rejectMsg: '保险查询失败!!!'}
1325
- )
1326
- if (res.data.length > 0) {
1327
- console.log('----------具有待执行保险------------')
1328
- this.setLabelValue('待执行保险', '是')
1329
- for (const item of this.show_data.fields) {
1330
- if (item.label === '保费开始日期' || item.label === '是否购买保险' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1331
- item.hidden = true
1332
- item.required = false
1333
- item.value = null
1334
- }
1335
- }
1336
- console.log('----------具有待执行保险------------')
1337
- } else {
1338
- console.log('----------不有待执行保险------------')
1339
- this.setLabelValue('待执行保险', '否')
1340
- for (const item of this.show_data.fields) {
1341
- if (item.label === '是否购买保险' || item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1342
- item.hidden = false
1343
- item.required = true
1344
- }
1345
- }
1346
- console.log('----------具有待执行保险------------')
1347
- }
1348
-
1349
- // 初始化显示内容
1350
- let f_is_insure = this.getLableValue('是否购买保险')
1351
- for (const item of this.show_data.fields) {
1352
- if (f_is_insure === '是') {
1353
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1354
- item.hidden = false
1355
- item.required = true
1356
- }
1357
- if (item.label === '保险备注') {
1358
- item.hidden = false
1359
- }
1360
- // 本期保费到期时间默认一年
1361
- if (isEmpty(this.selectdata.f_ins_expiration_date)) {
1362
- let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
1363
- this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
1364
- }
1365
- }
1366
- if (f_is_insure === '否') {
1367
- if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1368
- item.hidden = true
1369
- item.required = false
1370
- }
1371
- }
1372
- }
1373
- },
1374
- // 合同金额失去焦点
1375
- async 'contractMoneyChange' (index) {
1376
- let data = {
1377
- operator: '加',
1378
- num1: this.show_data.f_contract_money || 0,
1379
- num2: this.getLableValue('追加金额') || 0
1380
- }
1381
- let res = await this.$resetpost(
1382
- `${this.$androidUtil.getProxyUrl()}/rs/logic/compute`,
1383
- {data: data},
1384
- {resolveMsg: null, rejectMsg: '金额计算失败!!!'}
1385
- )
1386
-
1387
- this.setLabelValue('应交金额', res.data)
1388
- var bag=this.smalltoBIG(this.show_data.f_contract_money)
1389
- this.setLabelValue('金额大写', bag)
1390
- },
1391
- // ===========================================
1392
- async 'button'() {
1393
- console.log('-----')
1394
- await this.buttonCommit()
1395
- },
1396
- //行政村失去焦点
1397
- async 'sliceChange' (index) {
1398
- if (isEmpty(this.show_data.f_slice_area)) {
1399
- return
1400
- }
1401
- /*查询行政村code,获取下面的小区*/
1402
- var lableValue = this.getLableValue("片区/行政村");
1403
- let data1 = {
1404
- tablename: 't_community',
1405
- condition: `f_filialeid = '${Vue.user.orgid}' and f_community_name='${ lableValue}'`
1406
- }
1407
- let http1 = new HttpResetClass()
1408
- let res1 = await http1.load(
1409
- 'POST',
1410
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1411
- {data: data1},
1412
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1413
- )
1414
- let code=res1.data[0].id
1415
- let data = {
1416
- tablename: 't_area',
1417
- condition: `f_filialeid = '${Vue.user.orgid}' and f_community_id='${code}'`
1418
- }
1419
- let http = new HttpResetClass()
1420
- let res = await http.load(
1421
- 'POST',
1422
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1423
- {data: data},
1424
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1425
- )
1426
- debugger
1427
- this.setLabelOptions('小区', res.data.map(item => {
1428
- return {
1429
- label: item.f_residential_area,
1430
- value: item.f_residential_area
1431
- }
1432
- }))
1433
- },
1434
- // 失去焦点出触发事件
1435
- 'onchange' (index) {
1436
- if (this.show_data.defname === '报装申请') {
1437
- if (
1438
- this.show_data.fields[index].label === '区/县' ||
1439
- this.show_data.fields[index].label === '街道/乡镇' ||
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
- ) {
1448
-
1449
- let f_pcd = this.getLableValue('区/县') || ''
1450
- let f_street = this.getLableValue('街道/乡镇') || ''
1451
- let f_xingzheng = this.getLableValue('片区/行政村') || ''
1452
- let f_residential_area = this.getLableValue('集收单位')?this.getLableValue('集收单位'):this.getLableValue('小区') || ''
1453
- let f_building = this.getLableValue('楼号/组') || ''
1454
- let f_building_suffix = f_building ? this.config.f_building_suffix : ''
1455
- let f_unit = this.getLableValue('单元/排') || ''
1456
- let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
1457
- let f_floor = this.getLableValue('楼层') || ''
1458
- let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
1459
- let f_room = this.getLableValue('门牌号') || ''
1460
- let f_room_suffix = f_room ? this.config.f_room_suffix : ''
1461
-
1462
- let f_address = null
1463
-
1464
- let f_address_type = this.show_data.f_address_type
1465
- 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
1466
- /*if (f_address_type === '民用城区') {
1467
- 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
1468
- }
1469
- if (f_address_type === '民用农村') {
1470
- f_address = f_building + f_unit + f_floor + f_room
1471
- }
1472
- if (f_address_type === '特殊城区') {
1473
- f_address = f_street + f_residential_area
1474
- }*/
1475
- this.setLabelValue("地址", f_address)
1476
- }
1477
- }
1478
- },
1479
- async 'getDesignerPeople' () {
1480
- let data = {
1481
- source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
1482
- userid: Vue.user.id
1483
- }
1484
-
1485
- let http = new HttpResetClass()
1486
- let res = await http.load(
1487
- 'POST',
1488
- `${this.$androidUtil.getProxyUrl()}/rs/search`,
1489
- {data: data},
1490
- {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
1491
- )
1492
-
1493
- return res.data.map(item => {
1494
- return {
1495
- label: item.name,
1496
- value: item.id
1497
- }
1498
- })
1499
- },
1500
- // 申请节点初始化
1501
- 'applyReadyEvent' () {
1502
- this.addressInitialization()
1503
-
1504
- this.pcdChange()
1505
- this.streetChange()
1506
- },
1507
- // 街道失去焦点
1508
- async 'streetChange' (index) {
1509
- /*查询此街道下面的行政村*/
1510
- if (isEmpty(this.show_data.f_street)) {
1511
- return
1512
- }
1513
- var lableValue = this.getLableValue("街道/乡镇");
1514
- let data1 = {
1515
- tablename: 't_community',
1516
- condition: `f_filialeid = '${Vue.user.orgid}' and f_street='${lableValue}'`
1517
- }
1518
- let http1 = new HttpResetClass()
1519
- let res1 = await http1.load(
1520
- 'POST',
1521
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1522
- {data: data1},
1523
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1524
- )
1525
- this.setLabelOptions('片区/行政村', res1.data.map(item => {
1526
- return {
1527
- label: item.f_community_name,
1528
- value: item.f_community_name
1529
- }
1530
- }))
1531
- },
1532
- // 选择报建项目
1533
- 'selectApply' (row) {
1534
- this.setLabelValue('工程名称', row.f_entry_name)
1535
- this.setLabelValue('工程编号', row.f_apply_num)
1536
- this.setLabelValue('报建类型', row.f_apply_type)
1537
- this.setLabelValue('用户名称', row.f_user_name)
1538
- this.setLabelValue('用户电话', row.f_phone)
1539
- this.setLabelValue('证件类型', row.f_credentials)
1540
- this.setLabelValue('证件号码', row.f_idnumber)
1541
- this.setLabelValue('地址', row.f_address)
1542
- this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
1543
-
1544
- this.show_data.parentApply = JSON.parse(JSON.stringify(row))
1545
-
1546
- delete row.id
1547
- delete row.actid
1548
- delete row.defid
1549
- delete row.defname
1550
- delete row.version
1551
- delete row.f_apply_num
1552
- delete row.f_sub_state
1553
- delete row.f_apply_type
1554
- delete row.f_process_id
1555
-
1556
- this.show_data = Object.assign({}, this.show_data, row)
1557
-
1558
- this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
1559
- },
1560
- // 区县失去焦点
1561
- async 'pcdChange' (index) {
1562
- if (isEmpty(this.show_data.f_pcd)) {
1563
- return
1564
- }
1565
-
1566
- this.setLabelValue('街道/乡镇', null)
1567
- this.setLabelValue('集收单位', null)
1568
-
1569
-
1570
-
1571
- let data = {
1572
- tablename: 't_street',
1573
- condition: `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1574
- }
1575
- let f_address_type = this.getLableValue('地址类型')
1576
-
1577
- if (f_address_type === '民用市区') {
1578
- data.condition = `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
1579
- }
1580
- if (f_address_type === '民用乡镇') {
1581
- data.condition = `f_filialeid = '${Vue.user.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
1582
- }
1583
-
1584
- let http = new HttpResetClass()
1585
- let res = await http.load(
1586
- 'POST',
1587
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1588
- {data: data},
1589
- {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
1590
- )
1591
-
1592
- this.setLabelOptions('街道/乡镇', res.data.map(item => {
1593
- return {
1594
- label: item.f_street,
1595
- value: item.f_street
1596
- }
1597
- }))
1598
- },
1599
- // 选择用户档案信息
1600
- 'selectUserinfo' (row) {
1601
- this.setLabelValue('用户编号', row.f_userinfo_code)
1602
- this.setLabelValue('用户名称', row.f_user_name)
1603
- this.setLabelValue('用户电话', row.f_user_phone)
1604
- this.setLabelValue('证件类型', row.f_credentials)
1605
- this.setLabelValue('证件号码', row.f_idnumber)
1606
- this.setLabelValue('地址', row.f_address)
1607
-
1608
- this.show_data.f_userinfo_id = row.f_userinfo_id
1609
- this.show_data.f_userinfo_code = row.f_userinfo_code
1610
- },
1611
- // 地址类型失去焦点
1612
- // 地址类型失去焦点
1613
- 'addressTypeChange' (index) {
1614
- this.setLabelValue('街道/乡镇', null)
1615
- this.setLabelValue('集收单位', null)
1616
- let f_address_type = this.show_data.fields[index].value
1617
- for (const item of this.show_data.fields) {
1618
- if (f_address_type === '民用市区') {
1619
- if ( item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '小区') {
1620
- item.hidden = false
1621
- item.required = true
1622
- item.value = null
1623
- }
1624
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1625
- item.hidden = false
1626
- item.required = false
1627
- item.value = null
1628
- }
1629
- if (item.label === '地址') {
1630
- item.readonly = true
1631
- item.value = null
1632
- }
1633
- }
1634
- if (f_address_type === '民用乡镇') {
1635
- if ( item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '小区') {
1636
- item.hidden = false
1637
- item.required = true
1638
- item.value = null
1639
- }
1640
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1641
- item.hidden = false
1642
- item.required = false
1643
- item.value = null
1644
- }
1645
- if (item.label === '楼层') {
1646
- item.hidden = true
1647
- item.required = false
1648
- item.value = null
1649
- }
1650
- if (item.label === '地址') {
1651
- item.readonly = true
1652
- item.value = null
1653
- }
1654
- }
1655
- if (f_address_type === '特殊地址') {
1656
- if ( item.label === '街道/乡镇') {
1657
- item.hidden = false
1658
- item.required = true
1659
- item.value = null
1660
- }
1661
- if (item.label === '集收单位') {
1662
- item.hidden = false
1663
- item.required = false
1664
- item.value = null
1665
- }
1666
- if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' ) {
1667
- item.hidden = true
1668
- item.required = false
1669
- item.value = null
1670
- }
1671
- if (item.label === '地址') {
1672
- item.readonly = false
1673
- item.value = null
1674
- }
1675
- }
1676
- }
1677
- this.pcdChange()
1678
- },
1679
- async 'searchArea' (area, index) {
1680
- let data = {
1681
- tablename: 't_area',
1682
- condition: `f_filialeid = '${Vue.user.orgid}' and f_community='${this.show_data.f_slice_area}' and f_residential_area like '%${area}%'`
1683
- }
1684
- let http = new HttpResetClass()
1685
- let res = await http.load(
1686
- 'POST',
1687
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1688
- {data: data},
1689
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1690
- )
1691
-
1692
- if (res.data.length === 0) {
1693
- return
1694
- }
1695
- this.setLabelOptions('小区', res.data.map(item => {
1696
- return {
1697
- label: item.f_residential_area,
1698
- value: item.f_residential_area
1699
- }
1700
- }))
1701
- },
1702
- // 搜索小区
1703
- async 'searchAreaCollective' (area, index) {
1704
- let data = {
1705
- tablename: 't_area',
1706
- condition: `f_filialeid = '${Vue.user.orgid}' and f_residential_area like '%${area}%'`
1707
- }
1708
- let http = new HttpResetClass()
1709
- let res = await http.load(
1710
- 'POST',
1711
- `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1712
- {data: data},
1713
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1714
- )
1715
-
1716
- if (res.data.length === 0) {
1717
- return
1718
- }
1719
-
1720
- this.setLabelOptions('集收单位', res.data.map(item => {
1721
- return {
1722
- label: item.f_residential_area,
1723
- value: item.f_residential_area
1724
- }
1725
- }))
1726
- },
1727
- // 团购转散户初始化
1728
- 'apply2ReadyEvent' () {
1729
- if (this.show_data.f_apply_source === '线下发起') {
1730
- this.addressInitialization()
1731
- this.hideLabels('用户编号')
1732
- this.electiveLabels('用户编号')
1733
- this.showLabels('片区', '地址类型')
1734
- this.requiredLabels('片区', '地址类型')
1735
- }
1736
- if (this.show_data.f_apply_source === '自动发起') {
1737
- this.hideLabels('片区', '地址类型')
1738
- this.electiveLabels('片区', '地址类型',)
1739
- }
1740
- },
1741
- 'onblur' (index) {
1742
- if(this.show_data.fields[index].label==="优惠金额"){
1743
- let contract=this.getLableValue('合同金额')
1744
- let add=this.getLableValue('追加款')
1745
- let money = this.getLableValue('优惠金额')
1746
- //转为数字,然后contract减去money,保留两位小数
1747
- let money_num = parseFloat(money)
1748
- let add_num = parseFloat(add)
1749
- let contract_num = parseFloat(contract)
1750
- let new_contract = contract_num+add_num - money_num
1751
- this.setLabelValue('应交金额', new_contract.toFixed(2))
1752
- }
1753
- },
1754
- 'oninput' (index) {},
1755
- 'initializtionView' () {},
1756
- async 'onchangeModal' (index, fieldIndex) {
1757
- },
1758
- async 'onblurModal' (index, fieldIndex) {
1759
-
1760
- },
1761
- async 'oninputModal' (index, fieldIndex) {
1762
-
1763
- },
1764
- async 'onetomanydelete' (index, rowIndex) {
1765
-
1766
- let http = new HttpResetClass()
1767
-
1768
- let res = await http.load(
1769
- 'DELETE',
1770
- `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
1771
- null,
1772
- {resolveMsg: null, rejectMsg: '删除失败!!!'}
1773
- )
1774
- res = await this.$resetpost(
1775
- `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
1776
- this.show_data
1777
- )
1778
- this.breakControl()
1779
- },
1780
- async 'onetomanyupdate' (index, rowIndex) {
1781
- let data = this.show_data.onetomany[index].rows[rowIndex]
1782
-
1783
- this.show_data.onetomany[index].fields.forEach(item => {
1784
- data[item.field] = item.value
1785
- })
1786
- let res = await this.$resetpost(
1787
- `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1788
- data
1789
- )
1790
- res = await this.$resetpost(
1791
- `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
1792
- this.show_data
1793
- )
1794
- this.breakControl()
1795
- },
1796
- async 'onetomanyadd' (index) {
1797
- let data = {
1798
- f_process_id : this.show_data.f_process_id,
1799
- f_operator_id: Vue.user.id,
1800
- f_operator: Vue.user.name,
1801
- f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
1802
- f_orgid: Vue.user.orgid,
1803
- f_orgname: Vue.user.orgs
1804
- }
1805
- this.show_data.onetomany[index].fields.forEach(item => {
1806
- data[item.field] = item.value
1807
- })
1808
- let res = await this.$resetpost(
1809
- `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1810
- data
1811
- )
1812
- res = await this.$resetpost(
1813
- `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
1814
- this.show_data
1815
- )
1816
- this.breakControl()
1817
- },
1818
- 'onbutchange' (index) {
1819
-
1820
- },
1821
- 'onbutblur' (index) {
1822
-
1823
- },
1824
- 'onbutinput' (index) {
1825
-
1826
- },
1827
- 'changeShowfei' (val) {
1828
- console.log('回调修改父组件属性----'+val)
1829
- this.show_data.showfei=val
1830
- }
1831
- },
1832
- watch: {
1833
- /*async 'show_data.showfei' (val) {
1834
- console.log(`支付成功!!!!!!${val}`)
1835
- if(this.show_data.showfei=='已付款'){
1836
- await this.buttonCommit()
1837
- }
1838
- }*/
1839
- }
1840
- }
1841
- </script>
1842
- <style scoped>
1843
- </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 {
490
+ item.value = []
491
+ }
492
+ }
493
+ }
494
+
495
+ // 控制组件
496
+ if (this.selectdata.components) {
497
+ this.selectdata.components.forEach(item => {
498
+ if (!item.mark) {
499
+ item.mark = 0
500
+ }
501
+ })
502
+ }
503
+
504
+ // 初始化onetomany
505
+ if (this.selectdata.onetomany) {
506
+ for (const item of this.selectdata.onetomany) {
507
+ let res = null
508
+ if (item.queryEvent) {
509
+ res = this[item.queryEvent]()
510
+ } else {
511
+ let http = new HttpResetClass()
512
+ let data = {
513
+ tablename: item.tables[0],
514
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
515
+ }
516
+ res = await http.load(
517
+ 'POST',
518
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
519
+ // `rs/sql/apply_singleTable`,
520
+ {data: data},
521
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
522
+ )
523
+ }
524
+
525
+ item.rows = res.data
526
+
527
+ // 初始化onetomany中的fields
528
+ for (const field of item.fields) {
529
+ if (!field.value) {
530
+ if (field.value !== 0) {
531
+ field.value = null
532
+ }
533
+ }
534
+
535
+ if (field.default || field.default === 0) {
536
+ field.value = field.default
537
+ }
538
+
539
+ // datepicker
540
+ if (field.type === 'datepicker' && !field.value && field.default) {
541
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
542
+ }
543
+
544
+ if (field.type === 'select') {
545
+
546
+ if (field.param) {
547
+ let temp = this.$appdata.getParam(field.label)
548
+
549
+ if (temp && temp.length > 0) {
550
+ field.options = temp
551
+ }
552
+
553
+ if (field.paramLabel) {
554
+ temp = this.$appdata.getParam(field.paramLabel)
555
+ if (temp && temp.length > 0) {
556
+ item.options = temp
557
+ }
558
+ }
559
+ }
560
+
561
+ }
562
+ }
563
+ }
564
+ }
565
+
566
+ // 初始化 buttons_fields
567
+ for (const item of this.selectdata.buttons) {
568
+ if (item.button_name === '下发') {
569
+ let data = {
570
+ source: item.source,
571
+ userid: Vue.user.id
572
+ // userid: '51953'
573
+ }
574
+ if (item.sourceMethod) {
575
+ data.source = this[item.sourceMethod]()
576
+ }
577
+ if (!data.source) {
578
+ this.$showMessage("请配置获取人员表达式")
579
+ return
580
+ }
581
+ let res = await this.$resetpost(
582
+ `${this.$androidUtil.getProxyUrl()}/rs/search`,
583
+ // `rs/search`,
584
+ {data: data},
585
+ {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
586
+ )
587
+
588
+ let options = res.data.map(source => {
589
+ return {
590
+ "label": source.name,
591
+ "value": source.id
592
+ }
593
+ })
594
+
595
+ if (item.button_fields.length !== 1) {
596
+ this.$showMessage("下发有且只能有一个字段!!!")
597
+ return
598
+ }
599
+
600
+ item.button_fields[0].options = options
601
+ }
602
+ if (item.button_fields) {
603
+ item.button_fields.forEach(x => {
604
+ // 如果配置类型为select,优先从参数列表获取options
605
+ if (x.type === 'select') {
606
+
607
+ if (x.param) {
608
+ let temp = this.$appdata.getParam(x.label)
609
+
610
+ if (temp && temp.length > 0) {
611
+ x.options = temp
612
+ }
613
+
614
+ if (x.paramLabel) {
615
+ temp = this.$appdata.getParam(x.paramLabel)
616
+ if (temp && temp.length > 0) {
617
+ x.options = temp
618
+ }
619
+ }
620
+ }
621
+
622
+ }
623
+ })
624
+ }
625
+ }
626
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
627
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
628
+ this.show_data = temp
629
+ for (const item of this.show_data.fields) {
630
+ if(item.label=='气价名称' && !isEmpty(this.show_data.f_price_name)){
631
+ item.options.forEach(x=>{
632
+ if(x.label==this.show_data.f_price_name){
633
+ item.value=x.value
634
+ }
635
+ })
636
+ }
637
+ }
638
+ if(!this.show_data.showfei){
639
+ this.$set('show_data.showfei', '未收费')
640
+ }
641
+ //this.show_data.showfei=false
642
+
643
+ this.$nextTick(() => {
644
+ this.showview = true
645
+ })
646
+ this.getServicPeo()
647
+ },
648
+ signClean () {
649
+ this.selectdata.f_construction_sign = null
650
+ },
651
+ signSuccess (fileUrl) {
652
+ console.log('==============签字回调==================')
653
+ console.log(fileUrl)
654
+ this.selectdata.f_construction_sign = fileUrl
655
+ },
656
+ // 金额转大写
657
+ smalltoBIG(n) {
658
+ let fraction = ['角', '分'];
659
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
660
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
661
+ let head = n < 0 ? '欠' : '';
662
+ n = Math.abs(n);
663
+
664
+ let s = '';
665
+
666
+ for (var i = 0; i < fraction.length; i++) {
667
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
668
+ }
669
+ s = s || '整';
670
+ n = Math.floor(n);
671
+
672
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
673
+ let p = '';
674
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
675
+ p = digit[n % 10] + unit[1][j] + p;
676
+ n = Math.floor(n / 10);
677
+ }
678
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
679
+ }
680
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
681
+ },
682
+ getLableValue(label) {
683
+ for (const item of this.show_data.fields) {
684
+ if (item.label === label && item.type !== 'number') {
685
+ return item.value || ''
686
+ }
687
+ if (item.label === label && item.type === 'number') {
688
+ return item.value || 0
689
+ }
690
+ }
691
+ },
692
+ getLableOptions(label) {
693
+ for (const item of this.show_data.fields) {
694
+ if (item.label === label) {
695
+ return item.options
696
+ }
697
+ }
698
+ },
699
+ hideLabels(...labels) {
700
+ for (const item of this.show_data.fields) {
701
+ if (labels.includes(item.label)) {
702
+ item.hidden = true
703
+ }
704
+ }
705
+ },
706
+ requiredLabels(...labels) {
707
+ for (const item of this.show_data.fields) {
708
+ if (labels.includes(item.label)) {
709
+ item.required = true
710
+ }
711
+ }
712
+ },
713
+ electiveLabels(...labels) {
714
+ for (const item of this.show_data.fields) {
715
+ if (labels.includes(item.label)) {
716
+ item.required = false
717
+ }
718
+ }
719
+ },
720
+ showLabels(...labels) {
721
+ for (const item of this.show_data.fields) {
722
+ if (labels.includes(item.label)) {
723
+ item.hidden = false
724
+ }
725
+ }
726
+ },
727
+ setLabelValue(label, value) {
728
+ for (const item of this.show_data.fields) {
729
+ if (item.label === label) {
730
+ item.value = value
731
+ this.show_data[item.field] = value
732
+ }
733
+ }
734
+ },
735
+ setLabelOptions(label, options) {
736
+ for (const item of this.show_data.fields) {
737
+ if (item.label === label) {
738
+ item.options = options
739
+ }
740
+ }
741
+ },
742
+ disabledButtons(...buttons) {
743
+ for (const item of this.show_data.buttons) {
744
+ if (buttons.includes(item.button_name)) {
745
+ item.disabled = true
746
+ }
747
+ }
748
+ },
749
+ enableButtons(...buttons) {
750
+ for (const item of this.show_data.buttons) {
751
+ if (buttons.includes(item.button_name)) {
752
+ item.disabled = false
753
+ }
754
+ }
755
+ },
756
+ showButtons(...buttons) {
757
+ for (const item of this.show_data.buttons) {
758
+ if (buttons.includes(item.button_name)) {
759
+ item.hidden = false
760
+ }
761
+ }
762
+ },
763
+ hideButtons(...buttons) {
764
+ for (const item of this.show_data.buttons) {
765
+ if (buttons.includes(item.button_name)) {
766
+ item.hidden = true
767
+ }
768
+ }
769
+ },
770
+ async streetChange () {
771
+ if (isEmpty(this.show_data.f_street)) {
772
+ return
773
+ }
774
+
775
+ let data = {
776
+ tablename: 't_area',
777
+ // condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${this.show_data.f_street}'`
778
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_street = '${this.show_data.f_street}'`
779
+ }
780
+ let http = new HttpResetClass()
781
+ let res = await http.load(
782
+ 'POST',
783
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
784
+ {data: data},
785
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
786
+ )
787
+
788
+ this.setLabelOptions('集收单位', res.data.map(item => {
789
+ return {
790
+ label: item.f_residential_area,
791
+ value: item.f_residential_area
792
+ }
793
+ }))
794
+ },
795
+ // 获取集收单位
796
+ async getArea () {
797
+ let data = {
798
+ tablename: 't_area',
799
+ condition: `f_filialeid = '${Vue.user.orgid}'`
800
+ }
801
+ let http = new HttpResetClass()
802
+ let res = await http.load(
803
+ 'POST',
804
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
805
+ {data: data},
806
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
807
+ )
808
+
809
+ return res.data.map(item => {
810
+ return {
811
+ label: item.f_residential_area,
812
+ value: item.f_residential_area
813
+ }
814
+ })
815
+ },
816
+ async pcdChange () {
817
+ if (isEmpty(this.show_data.f_pcd)) {
818
+ return
819
+ }
820
+
821
+ let data = {
822
+ tablename: 't_street',
823
+ // condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
824
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
825
+ }
826
+ let f_address_type = this.getLableValue('地址类型')
827
+
828
+ if (f_address_type === '民用市区') {
829
+ // data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
830
+ data.condition = `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
831
+ }
832
+ if (f_address_type === '民用乡镇') {
833
+ // data.condition = `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
834
+ data.condition = `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
835
+ }
836
+
837
+ let http = new HttpResetClass()
838
+ let res = await http.load(
839
+ 'POST',
840
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
841
+ {data: data},
842
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
843
+ )
844
+
845
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
846
+ return {
847
+ label: item.f_street,
848
+ value: item.f_street
849
+ }
850
+ }))
851
+ },
852
+ async addressInitialization () {
853
+ //this.$getConfig(this, 'UserAddress')
854
+ //获取地址配置文件
855
+ try {
856
+ let res = await new HttpResetClass().load('get',`${this.$androidUtil.getProxyUrl()}/rs/vue/UserAddress.json`,null,{resolveMsg: null, rejectMsg: null})
857
+ Object.assign(this.config, res.data)
858
+ } catch (error) {
859
+ console.log("未获取到地址信息")
860
+ }
861
+ console.log("???????????不走了吗!")
862
+ let f_address_type = this.show_data.f_address_type
863
+ for (const item of this.show_data.fields) {
864
+ if (f_address_type === '民用市区') {
865
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号'|| item.label === '小区') {
866
+ item.hidden = false
867
+ item.required = true
868
+ }
869
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
870
+ item.hidden = false
871
+ item.required = false
872
+ }
873
+ if (item.label === '地址') {
874
+ item.readonly = true
875
+ }
876
+ }
877
+ if (f_address_type === '民用乡镇') {
878
+ if (item.label === '区/县' || item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '门牌号'|| item.label === '小区') {
879
+ item.hidden = false
880
+ item.required = true
881
+ }
882
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
883
+ item.hidden = false
884
+ item.required = false
885
+ }
886
+ if (item.label === '楼层') {
887
+ item.hidden = true
888
+ item.required = false
889
+ }
890
+ if (item.label === '地址') {
891
+ item.readonly = true
892
+ }
893
+ }
894
+ if (f_address_type === '特殊地址') {
895
+ if (item.label === '区/县' || item.label === '街道/乡镇') {
896
+ item.hidden = false
897
+ item.required = true
898
+ }
899
+ if (item.label === '集收单位') {
900
+ item.hidden = false
901
+ item.required = false
902
+ }
903
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' || item.label === '门牌号') {
904
+ item.hidden = true
905
+ item.required = false
906
+ }
907
+ if (item.label === '地址') {
908
+ item.readonly = false
909
+ }
910
+ }
911
+
912
+ if (this.show_data.f_apply_source === '线下发起' && item.label === '预约地址') {
913
+ item.hidden = true
914
+ }
915
+ }
916
+ },
917
+
918
+ async checkDuplicate(index) {
919
+ let http = new HttpResetClass()
920
+ let data = {
921
+ tablename: 't_apply',
922
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
923
+ }
924
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`, {data: data}, {
925
+ resolveMsg: null,
926
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
927
+ })
928
+ if (res.data.length > 0) {
929
+ this.show_data.fields[index].value = null
930
+ this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
931
+ }
932
+ },
933
+ async breakControl () {
934
+ if (this.show_data.id) {
935
+ let data = {
936
+ condition: `u.id = ${this.show_data.id}`,
937
+ data: {
938
+ id: Vue.user.id,
939
+ orgid: Vue.user.orgid
940
+ // id: '51953',
941
+ // orgid: '10101'
942
+ }
943
+ }
944
+ let res = await this.$resetpost(
945
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/checkuser`,
946
+ // `rs/sql/checkuser`,
947
+ {data: data},
948
+ {resolveMsg: null, rejectMsg: '数据更新失败,请手查询更新!!!'}
949
+ )
950
+
951
+ this.selectdata = res.data[0]
952
+ } else {
953
+ this.selectdata = servicedata
954
+ }
955
+
956
+ this.refurbish()
957
+ },
958
+ async addressTips () {
959
+ let res = ''
960
+ if (this.show_data.f_apply_type === '报警器报建' || this.show_data.f_apply_type === '工商业报警器报建') {
961
+ res = await this.$showMessage('报警器报建下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
962
+ }else{
963
+ res = await this.$showMessage('增容改管下单后将不能修改用户信息,请确认用户信息地址等是否正确,如不完善可在档案中进行修正!!!')
964
+ }
965
+ if (res == 'confirm') {
966
+ return
967
+ }
968
+ throw '用户信息确认!!!'
969
+ },
970
+ // 缴费前置
971
+ chargeBefore () {
972
+ if (Number(this.show_data.f_due_money) > Number(this.show_data.f_cumulative_payment_money) || Number(this.show_data.f_surplus_money) > 0) {
973
+ this.$showAlert('费用未结清!!!', 'warning', 3000)
974
+ throw null
975
+ }
976
+ if(this.show_data.f_apply_type === '散户报建' && this.show_data.defname==="通气点火"){
977
+ let ventilation = this.getLableValue('是否具备通气条件')
978
+ if(ventilation==='否'){
979
+ let remark=this.getLableValue('通气备注')
980
+ if(isEmpty(remark)){
981
+ this.$showMessage(`不满足通气条件,请进行拍照,并备注说明!!!`)
982
+ throw null
983
+ }else{
984
+ this.$showMessage(`不满足通气条件,请进行拍照!!!`)
985
+ }
986
+ }
987
+ }
988
+ },
989
+ //通气点火前置
990
+ async ventilationBefore() {
991
+ let http = new HttpResetClass()
992
+ let data = {
993
+ tablename: 't_files',
994
+ condition: `f_blobid= '${this.show_data.f_process_id}' and defname='${this.show_data.defname}' and fremarks='手机拍照' `
995
+ }
996
+ let res = await http.load(
997
+ 'POST',
998
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
999
+ {data: data},
1000
+ {resolveMsg: null, rejectMsg: '抄表册查询失败!!!'}
1001
+ )
1002
+ if (this.show_data.f_is_ventilation == '否') {
1003
+ //不满足通气条件
1004
+ if (this.show_data.f_mark_ventilation == '' ||this.show_data.f_mark_ventilation==null) {
1005
+ this.$showMessage(`不满足通气条件,请进行备注说明!!!`)
1006
+ throw null
1007
+ }
1008
+ if(res.data.length <= 0){
1009
+ this.$showMessage(`不满足通气条件,需拍照片进行上传!!!`)
1010
+ throw null
1011
+ }
1012
+ }
1013
+ },
1014
+ // 施工前置
1015
+ async constructionBefore () {
1016
+ let http = new HttpResetClass()
1017
+ let data = {
1018
+ condition: `ui.f_process_id = '${this.show_data.f_process_id}' and uf.f_meter_classify is null and f_meternumber is null`
1019
+ }
1020
+ let res = await http.load(
1021
+ 'POST',
1022
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/countApplyUserinfo`,
1023
+ {data: data},
1024
+ {
1025
+ resolveMsg: null,
1026
+ rejectMsg: '安装明细查询失败!!!'
1027
+ })
1028
+ if (res.data[0].num > 0) {
1029
+ this.$showAlert(`还有${res.data[0].num}户未安装,无法提交`, 'warning', 3000)
1030
+ throw `还有${res.data[0].num}户未安装,无法提交`
1031
+ }
1032
+ },
1033
+ changePipeBuild () {
1034
+ if (this.selectdata.f_process_dep === '工程部') {
1035
+ return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
1036
+ }
1037
+ if (this.selectdata.f_process_dep === '运营部') {
1038
+ return 'this.getParentByType($organization$).getChildByName($运营部报装$).getChildren()'
1039
+ }
1040
+ return 'this.getParentByType($organization$).getChildByName($工程部报装$).getChildren()'
1041
+ },
1042
+ async getPrice (f_price_id) {
1043
+ console.log('=======================')
1044
+ console.log(f_price_id)
1045
+
1046
+ let data = {
1047
+ condition: `sp.f_filialeid = '${Vue.user.orgid}'`
1048
+ }
1049
+
1050
+ if (!isEmpty(f_price_id)) {
1051
+ data.condition = `sp.f_filialeid = '${Vue.user.orgid}' and sp.f_price_id = ${f_price_id}`
1052
+ }
1053
+ let http = new HttpResetClass()
1054
+ let res = await http.load(
1055
+ 'POST',
1056
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/applyGetPrice`,
1057
+ {data: data},
1058
+ {resolveMsg: null, rejectMsg: '气价查询失败!!!'}
1059
+ )
1060
+
1061
+ return res.data.map(item => {
1062
+ return {
1063
+ label: item.f_price_name,
1064
+ value: item
1065
+ }
1066
+ })
1067
+ },
1068
+ //获取抄表册
1069
+ async getMeterBook () {
1070
+ let data = {
1071
+ tablename: 't_meter_book',
1072
+ condition: `f_book_state='有效' `
1073
+ }
1074
+ let http = new HttpResetClass()
1075
+ let res = await http.load(
1076
+ 'POST',
1077
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1078
+ {data: data},
1079
+ {resolveMsg: null, rejectMsg: '抄表册查询失败!!!'}
1080
+ )
1081
+ return res.data.map(item => {
1082
+ return {
1083
+ label: item.f_book_name,
1084
+ value: item.f_book_code
1085
+ }
1086
+ })
1087
+ },
1088
+ async getDesignerPeople () {
1089
+ let data = {
1090
+ source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
1091
+ userid: Vue.user.id
1092
+ }
1093
+
1094
+ let http = new HttpResetClass()
1095
+ let res = await http.load(
1096
+ 'POST',
1097
+ `${this.$androidUtil.getProxyUrl()}/rs/search`,
1098
+ {data: data},
1099
+ {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
1100
+ )
1101
+
1102
+ return res.data.map(item => {
1103
+ return {
1104
+ label: item.name,
1105
+ value: item.id
1106
+ }
1107
+ })
1108
+ },
1109
+ async surveyStopApply () {
1110
+ console.log('终止报建!!!!!')
1111
+
1112
+ this.show_data.f_stop_reason = '现场勘察不符合报装条件'
1113
+
1114
+ let data = {
1115
+ data: this.show_data,
1116
+ user: Vue.user
1117
+ }
1118
+
1119
+ let res = await this.$resetpost(
1120
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/surveyStopApply`,
1121
+ {data: data},
1122
+ {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
1123
+ )
1124
+ if(res.data==200){
1125
+ this.$dispatch('loadPage')
1126
+ this.$showMessage('终止报建成功!!!')
1127
+ this.$back()
1128
+ throw '终止报建!!!'
1129
+ }else{
1130
+ this.$showMessage('终止报建失败!!!')
1131
+ }
1132
+ },
1133
+ async getDevInfo () {
1134
+ let data = {
1135
+ tablename: 't_dev_info',
1136
+ condition: `f_orgid = '${Vue.user.orgid}'`
1137
+ }
1138
+ let http = new HttpResetClass()
1139
+ let res = await http.load(
1140
+ 'POST',
1141
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1142
+ {data: data},
1143
+ {resolveMsg: null, rejectMsg: '公司查询失败!!!'}
1144
+ )
1145
+
1146
+ return res.data.map(item => {
1147
+ return {
1148
+ label: item.f_dev_name,
1149
+ value: item.f_dev_name
1150
+ }
1151
+ })
1152
+ },
1153
+ // 获取片区
1154
+ async getSliceArea () {
1155
+ let data = {
1156
+ tablename: 't_community',
1157
+ condition: `f_filialeid = '${Vue.user.orgid}'`
1158
+ }
1159
+ let http = new HttpResetClass()
1160
+ let res = await http.load(
1161
+ 'POST',
1162
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1163
+ {data: data},
1164
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
1165
+ )
1166
+ return res.data.map(item => {
1167
+ return {
1168
+ label: item.f_community_name,
1169
+ value: item.f_community_name
1170
+ }
1171
+ })
1172
+ },
1173
+ // 获取区县
1174
+ async getPcd () {
1175
+ let data = {
1176
+ tablename: 't_pcd',
1177
+ condition: `f_filialeid = '${Vue.user.orgid}'`
1178
+ }
1179
+ let http = new HttpResetClass()
1180
+ let res = await http.load(
1181
+ 'POST',
1182
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1183
+ {data: data},
1184
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
1185
+ )
1186
+
1187
+ return res.data.map(item => {
1188
+ return {
1189
+ label: item.f_pcd,
1190
+ value: item.f_pcd
1191
+ }
1192
+ })
1193
+ }
1194
+
1195
+ },
1196
+ events: {
1197
+ 'complyInstallation' (index) {
1198
+ if (this.show_data.f_is_have === '否') {
1199
+ this.hideButtons('提交', '出图', '缴费')
1200
+ this.showButtons('终止')
1201
+ }
1202
+ if (this.show_data.f_is_have === '是') {
1203
+ this.hideButtons('终止')
1204
+ this.showButtons('提交', '出图', '缴费')
1205
+ }
1206
+ },
1207
+ async 'igniteDispatchReadyEvent' () {
1208
+ let data = {
1209
+ tablename: 'activityins',
1210
+ condition: `processid = '${this.show_data.f_process_id}' and defname = '工程施工' and state = '结束'`
1211
+ }
1212
+ let http = new HttpResetClass()
1213
+ let res = await http.load(
1214
+ 'POST',
1215
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1216
+ {data: data},
1217
+ {resolveMsg: null, rejectMsg: '查询失败!!!'}
1218
+ )
1219
+ if (res.data.length <= 0) {
1220
+ console.log('+++++++++++++++++++++++++++++')
1221
+ console.log('没有施工,不能退回')
1222
+ this.hideButtons('退回')
1223
+ }
1224
+ },
1225
+ 'breakControl' (val) {
1226
+ this.breakControl(val)
1227
+ },
1228
+ // 检查重复
1229
+ 'checkRepeat' (index) {
1230
+ this.checkDuplicate(index)
1231
+ },
1232
+ 'buildReadyEvent' () {
1233
+ this.setLabelValue('施工单位', Vue.user.name)
1234
+ this.setLabelValue('施工安装时间', new Date().Format('yyyy-MM-dd HH:mm:ss'))
1235
+ },
1236
+ // 选择材料
1237
+ async materialNameChenge (index, fieldIndex) {
1238
+ let material = this.show_data.onetomany[index].fields[fieldIndex].value
1239
+
1240
+ this.show_data.onetomany[index].fields.forEach(item => {
1241
+ if (material[item.field]) {
1242
+ item.value = material[item.field]
1243
+ }
1244
+ })
1245
+ },
1246
+ // 打开模态框获取材料
1247
+ async 'getMaterialName' (index) {
1248
+ let data = {
1249
+ condition: `1=1`
1250
+ }
1251
+ let http = new HttpResetClass()
1252
+ let res = await http.load(
1253
+ 'POST',
1254
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
1255
+ {data: data},
1256
+ {resolveMsg: null, rejectMsg: '材料查询失败!!!'}
1257
+ )
1258
+
1259
+ this.show_data.onetomany[index].fields.forEach(field => {
1260
+ if (field.label === '选择材料') {
1261
+ field.options = res.data.map(item => {
1262
+ return {
1263
+ 'label': `${item.f_material_name}--${item.f_material_style}--${item.f_material_unit}`,
1264
+ 'value': item
1265
+ }
1266
+ })
1267
+ }
1268
+ })
1269
+ },
1270
+ // 选择气价
1271
+ 'priceChange' (index) {
1272
+ if (isEmpty(this.show_data.stairPrice)) {
1273
+ return
1274
+ }
1275
+
1276
+ let stairPrice = this.getLableValue('气价名称')
1277
+
1278
+ this.setLabelValue('气价类型', stairPrice.f_price_type)
1279
+ this.setLabelValue('用气性质', stairPrice.f_gasproperties)
1280
+ this.setLabelValue('价格', stairPrice.f_price)
1281
+ this.setLabelValue('客户类型', stairPrice.f_user_type)
1282
+ this.show_data.f_price_id = stairPrice.id
1283
+ this.show_data.f_price_name = stairPrice.f_price_name
1284
+ },
1285
+ // 是否购买保险
1286
+ isInsureChange (index) {
1287
+ let f_is_insure = this.getLableValue('是否购买保险')
1288
+ for (const item of this.show_data.fields) {
1289
+ if (f_is_insure === '是') {
1290
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1291
+ item.hidden = false
1292
+ item.required = true
1293
+ }
1294
+ if (item.label === '保险备注') {
1295
+ item.hidden = false
1296
+ }
1297
+ } else {
1298
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1299
+ item.hidden = true
1300
+ item.required = false
1301
+ }
1302
+ }
1303
+ }
1304
+ },
1305
+ // 通气点火初始化
1306
+ async 'gasReadyEvent' () {
1307
+ console.log('----通气点火初始化----')
1308
+ if (!isEmpty(this.show_data.f_price_id)) {
1309
+ let priceList = await this.getPrice(this.show_data.f_price_id)
1310
+ this.setLabelValue('气价名称', priceList[0].value)
1311
+ }
1312
+
1313
+ let data = {
1314
+ tablename: 't_userfees',
1315
+ condition: `f_orgid = '${Vue.user.orgid}' and f_userinfo_id = '${this.show_data.f_userinfo_id}' and f_state = '待执行'`
1316
+ }
1317
+
1318
+ console.log('---------查询是否有待执行保险-----------')
1319
+ let http = new HttpResetClass()
1320
+ let res = await http.load(
1321
+ 'POST',
1322
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1323
+ {data: data},
1324
+ {resolveMsg: null, rejectMsg: '保险查询失败!!!'}
1325
+ )
1326
+ if (res.data.length > 0) {
1327
+ console.log('----------具有待执行保险------------')
1328
+ this.setLabelValue('待执行保险', '是')
1329
+ for (const item of this.show_data.fields) {
1330
+ if (item.label === '保费开始日期' || item.label === '是否购买保险' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1331
+ item.hidden = true
1332
+ item.required = false
1333
+ item.value = null
1334
+ }
1335
+ }
1336
+ console.log('----------具有待执行保险------------')
1337
+ } else {
1338
+ console.log('----------不有待执行保险------------')
1339
+ this.setLabelValue('待执行保险', '否')
1340
+ for (const item of this.show_data.fields) {
1341
+ if (item.label === '是否购买保险' || item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1342
+ item.hidden = false
1343
+ item.required = true
1344
+ }
1345
+ }
1346
+ console.log('----------具有待执行保险------------')
1347
+ }
1348
+
1349
+ // 初始化显示内容
1350
+ let f_is_insure = this.getLableValue('是否购买保险')
1351
+ for (const item of this.show_data.fields) {
1352
+ if (f_is_insure === '是') {
1353
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额') {
1354
+ item.hidden = false
1355
+ item.required = true
1356
+ }
1357
+ if (item.label === '保险备注') {
1358
+ item.hidden = false
1359
+ }
1360
+ // 本期保费到期时间默认一年
1361
+ if (isEmpty(this.selectdata.f_ins_expiration_date)) {
1362
+ let f_ins_expiration_date = new Date().setFullYear(new Date().getFullYear() + 1)
1363
+ this.setLabelValue("保费结束日期", new Date(f_ins_expiration_date).Format('yyyy-MM-dd'))
1364
+ }
1365
+ }
1366
+ if (f_is_insure === '否') {
1367
+ if (item.label === '保费开始日期' || item.label === '保费结束日期' || item.label === '险种' || item.label === '保费金额' || item.label === '保险备注') {
1368
+ item.hidden = true
1369
+ item.required = false
1370
+ }
1371
+ }
1372
+ }
1373
+ },
1374
+ // 合同金额失去焦点
1375
+ async 'contractMoneyChange' (index) {
1376
+ let data = {
1377
+ operator: '加',
1378
+ num1: this.show_data.f_contract_money || 0,
1379
+ num2: this.getLableValue('追加金额') || 0
1380
+ }
1381
+ let res = await this.$resetpost(
1382
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/compute`,
1383
+ {data: data},
1384
+ {resolveMsg: null, rejectMsg: '金额计算失败!!!'}
1385
+ )
1386
+
1387
+ this.setLabelValue('应交金额', res.data)
1388
+ var bag=this.smalltoBIG(this.show_data.f_contract_money)
1389
+ this.setLabelValue('金额大写', bag)
1390
+ },
1391
+ // ===========================================
1392
+ async 'button'() {
1393
+ console.log('-----')
1394
+ await this.buttonCommit()
1395
+ },
1396
+ //行政村失去焦点
1397
+ async 'sliceChange' (index) {
1398
+ if (isEmpty(this.show_data.f_slice_area)) {
1399
+ return
1400
+ }
1401
+ /*查询行政村code,获取下面的小区*/
1402
+ var lableValue = this.getLableValue("片区/行政村");
1403
+ let data1 = {
1404
+ tablename: 't_community',
1405
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_community_name='${ lableValue}'`
1406
+ }
1407
+ let http1 = new HttpResetClass()
1408
+ let res1 = await http1.load(
1409
+ 'POST',
1410
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1411
+ {data: data1},
1412
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1413
+ )
1414
+ let code=res1.data[0].id
1415
+ let data = {
1416
+ tablename: 't_area',
1417
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_community_id='${code}'`
1418
+ }
1419
+ let http = new HttpResetClass()
1420
+ let res = await http.load(
1421
+ 'POST',
1422
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1423
+ {data: data},
1424
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1425
+ )
1426
+ debugger
1427
+ this.setLabelOptions('小区', res.data.map(item => {
1428
+ return {
1429
+ label: item.f_residential_area,
1430
+ value: item.f_residential_area
1431
+ }
1432
+ }))
1433
+ },
1434
+ // 失去焦点出触发事件
1435
+ 'onchange' (index) {
1436
+ if (this.show_data.defname === '报装申请') {
1437
+ if (
1438
+ this.show_data.fields[index].label === '区/县' ||
1439
+ this.show_data.fields[index].label === '街道/乡镇' ||
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
+ ) {
1448
+
1449
+ let f_pcd = this.getLableValue('区/县') || ''
1450
+ let f_street = this.getLableValue('街道/乡镇') || ''
1451
+ let f_xingzheng = this.getLableValue('片区/行政村') || ''
1452
+ let f_residential_area = this.getLableValue('集收单位')?this.getLableValue('集收单位'):this.getLableValue('小区') || ''
1453
+ let f_building = this.getLableValue('楼号/组') || ''
1454
+ let f_building_suffix = f_building ? this.config.f_building_suffix : ''
1455
+ let f_unit = this.getLableValue('单元/排') || ''
1456
+ let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
1457
+ let f_floor = this.getLableValue('楼层') || ''
1458
+ let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
1459
+ let f_room = this.getLableValue('门牌号') || ''
1460
+ let f_room_suffix = f_room ? this.config.f_room_suffix : ''
1461
+
1462
+ let f_address = null
1463
+
1464
+ let f_address_type = this.show_data.f_address_type
1465
+ 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
1466
+ /*if (f_address_type === '民用城区') {
1467
+ 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
1468
+ }
1469
+ if (f_address_type === '民用农村') {
1470
+ f_address = f_building + f_unit + f_floor + f_room
1471
+ }
1472
+ if (f_address_type === '特殊城区') {
1473
+ f_address = f_street + f_residential_area
1474
+ }*/
1475
+ this.setLabelValue("地址", f_address)
1476
+ }
1477
+ }
1478
+ },
1479
+ async 'getDesignerPeople' () {
1480
+ let data = {
1481
+ source: 'this.getParentByType($organization$).getChildByName($设计部报装$).getChildren()',
1482
+ userid: Vue.user.id
1483
+ }
1484
+
1485
+ let http = new HttpResetClass()
1486
+ let res = await http.load(
1487
+ 'POST',
1488
+ `${this.$androidUtil.getProxyUrl()}/rs/search`,
1489
+ {data: data},
1490
+ {resolveMsg: null, rejectMsg: '设计人员查询失败!!!'}
1491
+ )
1492
+
1493
+ return res.data.map(item => {
1494
+ return {
1495
+ label: item.name,
1496
+ value: item.id
1497
+ }
1498
+ })
1499
+ },
1500
+ // 申请节点初始化
1501
+ 'applyReadyEvent' () {
1502
+ this.addressInitialization()
1503
+
1504
+ this.pcdChange()
1505
+ this.streetChange()
1506
+ },
1507
+ // 街道失去焦点
1508
+ async 'streetChange' (index) {
1509
+ /*查询此街道下面的行政村*/
1510
+ if (isEmpty(this.show_data.f_street)) {
1511
+ return
1512
+ }
1513
+ var lableValue = this.getLableValue("街道/乡镇");
1514
+ let data1 = {
1515
+ tablename: 't_community',
1516
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_street='${lableValue}'`
1517
+ }
1518
+ let http1 = new HttpResetClass()
1519
+ let res1 = await http1.load(
1520
+ 'POST',
1521
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1522
+ {data: data1},
1523
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1524
+ )
1525
+ this.setLabelOptions('片区/行政村', res1.data.map(item => {
1526
+ return {
1527
+ label: item.f_community_name,
1528
+ value: item.f_community_name
1529
+ }
1530
+ }))
1531
+ },
1532
+ // 选择报建项目
1533
+ 'selectApply' (row) {
1534
+ this.setLabelValue('工程名称', row.f_entry_name)
1535
+ this.setLabelValue('工程编号', row.f_apply_num)
1536
+ this.setLabelValue('报建类型', row.f_apply_type)
1537
+ this.setLabelValue('用户名称', row.f_user_name)
1538
+ this.setLabelValue('用户电话', row.f_phone)
1539
+ this.setLabelValue('证件类型', row.f_credentials)
1540
+ this.setLabelValue('证件号码', row.f_idnumber)
1541
+ this.setLabelValue('地址', row.f_address)
1542
+ this.setLabelValue('累计缴费金额', row.f_cumulative_payment_money)
1543
+
1544
+ this.show_data.parentApply = JSON.parse(JSON.stringify(row))
1545
+
1546
+ delete row.id
1547
+ delete row.actid
1548
+ delete row.defid
1549
+ delete row.defname
1550
+ delete row.version
1551
+ delete row.f_apply_num
1552
+ delete row.f_sub_state
1553
+ delete row.f_apply_type
1554
+ delete row.f_process_id
1555
+
1556
+ this.show_data = Object.assign({}, this.show_data, row)
1557
+
1558
+ this.show_data.f_parent_process_id = this.show_data.parentApply.f_process_id
1559
+ },
1560
+ // 区县失去焦点
1561
+ async 'pcdChange' (index) {
1562
+ if (isEmpty(this.show_data.f_pcd)) {
1563
+ return
1564
+ }
1565
+
1566
+ this.setLabelValue('街道/乡镇', null)
1567
+ this.setLabelValue('集收单位', null)
1568
+
1569
+
1570
+
1571
+ let data = {
1572
+ tablename: 't_street',
1573
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}'`
1574
+ }
1575
+ let f_address_type = this.getLableValue('地址类型')
1576
+
1577
+ if (f_address_type === '民用市区') {
1578
+ data.condition = `f_filialeid = '${Vue.user.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '市区'`
1579
+ }
1580
+ if (f_address_type === '民用乡镇') {
1581
+ data.condition = `f_filialeid = '${Vue.user.f.orgid}' and f_pcd = '${this.show_data.f_pcd}' and f_iscity = '乡镇'`
1582
+ }
1583
+
1584
+ let http = new HttpResetClass()
1585
+ let res = await http.load(
1586
+ 'POST',
1587
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1588
+ {data: data},
1589
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
1590
+ )
1591
+
1592
+ this.setLabelOptions('街道/乡镇', res.data.map(item => {
1593
+ return {
1594
+ label: item.f_street,
1595
+ value: item.f_street
1596
+ }
1597
+ }))
1598
+ },
1599
+ // 选择用户档案信息
1600
+ 'selectUserinfo' (row) {
1601
+ this.setLabelValue('用户编号', row.f_userinfo_code)
1602
+ this.setLabelValue('用户名称', row.f_user_name)
1603
+ this.setLabelValue('用户电话', row.f_user_phone)
1604
+ this.setLabelValue('证件类型', row.f_credentials)
1605
+ this.setLabelValue('证件号码', row.f_idnumber)
1606
+ this.setLabelValue('地址', row.f_address)
1607
+
1608
+ this.show_data.f_userinfo_id = row.f_userinfo_id
1609
+ this.show_data.f_userinfo_code = row.f_userinfo_code
1610
+ },
1611
+ // 地址类型失去焦点
1612
+ // 地址类型失去焦点
1613
+ 'addressTypeChange' (index) {
1614
+ this.setLabelValue('街道/乡镇', null)
1615
+ this.setLabelValue('集收单位', null)
1616
+ let f_address_type = this.show_data.fields[index].value
1617
+ for (const item of this.show_data.fields) {
1618
+ if (f_address_type === '民用市区') {
1619
+ if ( item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '小区') {
1620
+ item.hidden = false
1621
+ item.required = true
1622
+ item.value = null
1623
+ }
1624
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1625
+ item.hidden = false
1626
+ item.required = false
1627
+ item.value = null
1628
+ }
1629
+ if (item.label === '地址') {
1630
+ item.readonly = true
1631
+ item.value = null
1632
+ }
1633
+ }
1634
+ if (f_address_type === '民用乡镇') {
1635
+ if ( item.label === '街道/乡镇' || item.label === '集收单位' || item.label === '小区') {
1636
+ item.hidden = false
1637
+ item.required = true
1638
+ item.value = null
1639
+ }
1640
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层') {
1641
+ item.hidden = false
1642
+ item.required = false
1643
+ item.value = null
1644
+ }
1645
+ if (item.label === '楼层') {
1646
+ item.hidden = true
1647
+ item.required = false
1648
+ item.value = null
1649
+ }
1650
+ if (item.label === '地址') {
1651
+ item.readonly = true
1652
+ item.value = null
1653
+ }
1654
+ }
1655
+ if (f_address_type === '特殊地址') {
1656
+ if ( item.label === '街道/乡镇') {
1657
+ item.hidden = false
1658
+ item.required = true
1659
+ item.value = null
1660
+ }
1661
+ if (item.label === '集收单位') {
1662
+ item.hidden = false
1663
+ item.required = false
1664
+ item.value = null
1665
+ }
1666
+ if (item.label === '楼号/组' || item.label === '单元/排' || item.label === '楼层' ) {
1667
+ item.hidden = true
1668
+ item.required = false
1669
+ item.value = null
1670
+ }
1671
+ if (item.label === '地址') {
1672
+ item.readonly = false
1673
+ item.value = null
1674
+ }
1675
+ }
1676
+ }
1677
+ this.pcdChange()
1678
+ },
1679
+ async 'searchArea' (area, index) {
1680
+ let data = {
1681
+ tablename: 't_area',
1682
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_community='${this.show_data.f_slice_area}' and f_residential_area like '%${area}%'`
1683
+ }
1684
+ let http = new HttpResetClass()
1685
+ let res = await http.load(
1686
+ 'POST',
1687
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1688
+ {data: data},
1689
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1690
+ )
1691
+
1692
+ if (res.data.length === 0) {
1693
+ return
1694
+ }
1695
+ this.setLabelOptions('小区', res.data.map(item => {
1696
+ return {
1697
+ label: item.f_residential_area,
1698
+ value: item.f_residential_area
1699
+ }
1700
+ }))
1701
+ },
1702
+ // 搜索小区
1703
+ async 'searchAreaCollective' (area, index) {
1704
+ let data = {
1705
+ tablename: 't_area',
1706
+ condition: `f_filialeid = '${Vue.user.orgid}' and f_residential_area like '%${area}%'`
1707
+ }
1708
+ let http = new HttpResetClass()
1709
+ let res = await http.load(
1710
+ 'POST',
1711
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable`,
1712
+ {data: data},
1713
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
1714
+ )
1715
+
1716
+ if (res.data.length === 0) {
1717
+ return
1718
+ }
1719
+
1720
+ this.setLabelOptions('集收单位', res.data.map(item => {
1721
+ return {
1722
+ label: item.f_residential_area,
1723
+ value: item.f_residential_area
1724
+ }
1725
+ }))
1726
+ },
1727
+ // 团购转散户初始化
1728
+ 'apply2ReadyEvent' () {
1729
+ if (this.show_data.f_apply_source === '线下发起') {
1730
+ this.addressInitialization()
1731
+ this.hideLabels('用户编号')
1732
+ this.electiveLabels('用户编号')
1733
+ this.showLabels('片区', '地址类型')
1734
+ this.requiredLabels('片区', '地址类型')
1735
+ }
1736
+ if (this.show_data.f_apply_source === '自动发起') {
1737
+ this.hideLabels('片区', '地址类型')
1738
+ this.electiveLabels('片区', '地址类型',)
1739
+ }
1740
+ },
1741
+ 'onblur' (index) {
1742
+ if(this.show_data.fields[index].label==="优惠金额"){
1743
+ let contract=this.getLableValue('合同金额')
1744
+ let add=this.getLableValue('追加款')
1745
+ let money = this.getLableValue('优惠金额')
1746
+ //转为数字,然后contract减去money,保留两位小数
1747
+ let money_num = parseFloat(money)
1748
+ let add_num = parseFloat(add)
1749
+ let contract_num = parseFloat(contract)
1750
+ let new_contract = contract_num+add_num - money_num
1751
+ this.setLabelValue('应交金额', new_contract.toFixed(2))
1752
+ }
1753
+ },
1754
+ 'oninput' (index) {},
1755
+ 'initializtionView' () {},
1756
+ async 'onchangeModal' (index, fieldIndex) {
1757
+ },
1758
+ async 'onblurModal' (index, fieldIndex) {
1759
+
1760
+ },
1761
+ async 'oninputModal' (index, fieldIndex) {
1762
+
1763
+ },
1764
+ async 'onetomanydelete' (index, rowIndex) {
1765
+
1766
+ let http = new HttpResetClass()
1767
+
1768
+ let res = await http.load(
1769
+ 'DELETE',
1770
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
1771
+ null,
1772
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
1773
+ )
1774
+ res = await this.$resetpost(
1775
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
1776
+ this.show_data
1777
+ )
1778
+ this.breakControl()
1779
+ },
1780
+ async 'onetomanyupdate' (index, rowIndex) {
1781
+ let data = this.show_data.onetomany[index].rows[rowIndex]
1782
+
1783
+ this.show_data.onetomany[index].fields.forEach(item => {
1784
+ data[item.field] = item.value
1785
+ })
1786
+ let res = await this.$resetpost(
1787
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1788
+ data
1789
+ )
1790
+ res = await this.$resetpost(
1791
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
1792
+ this.show_data
1793
+ )
1794
+ this.breakControl()
1795
+ },
1796
+ async 'onetomanyadd' (index) {
1797
+ let data = {
1798
+ f_process_id : this.show_data.f_process_id,
1799
+ f_operator_id: Vue.user.id,
1800
+ f_operator: Vue.user.name,
1801
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
1802
+ f_orgid: Vue.user.orgid,
1803
+ f_orgname: Vue.user.orgs
1804
+ }
1805
+ this.show_data.onetomany[index].fields.forEach(item => {
1806
+ data[item.field] = item.value
1807
+ })
1808
+ let res = await this.$resetpost(
1809
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
1810
+ data
1811
+ )
1812
+ res = await this.$resetpost(
1813
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
1814
+ this.show_data
1815
+ )
1816
+ this.breakControl()
1817
+ },
1818
+ 'onbutchange' (index) {
1819
+
1820
+ },
1821
+ 'onbutblur' (index) {
1822
+
1823
+ },
1824
+ 'onbutinput' (index) {
1825
+
1826
+ },
1827
+ 'changeShowfei' (val) {
1828
+ console.log('回调修改父组件属性----'+val)
1829
+ this.show_data.showfei=val
1830
+ }
1831
+ },
1832
+ watch: {
1833
+ /*async 'show_data.showfei' (val) {
1834
+ console.log(`支付成功!!!!!!${val}`)
1835
+ if(this.show_data.showfei=='已付款'){
1836
+ await this.buttonCommit()
1837
+ }
1838
+ }*/
1839
+ }
1840
+ }
1841
+ </script>
1842
+ <style scoped>
1843
+ </style>