apply-clients 3.4.91 → 3.4.93

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