apply-clients 3.5.5-101 → 3.5.5-103

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