apply-clients 3.5.6-21 → 3.5.6-22

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