apply-clients 3.5.6-21 → 3.5.6-23

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