apply-clients 3.5.5-82 → 3.5.5-83

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