apply-clients 3.4.69 → 3.4.71

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