apply-clients 3.3.216 → 3.4.1

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 (96) hide show
  1. package/android.html +23 -23
  2. package/index.html +33 -33
  3. package/package.json +3 -3
  4. package/src/AndroidApp.vue +35 -30
  5. package/src/App.vue +20 -20
  6. package/src/android.js +21 -21
  7. package/src/apply.js +81 -90
  8. package/src/applyAndroid.js +1 -23
  9. package/src/components/android/AppOnetomany.vue +301 -285
  10. package/src/components/android/AppServiceView.vue +566 -570
  11. package/src/components/android/AppSign.vue +142 -142
  12. package/src/components/android/AppTakePic.vue +143 -144
  13. package/src/components/android/Process/AppExplorationUser.vue +320 -270
  14. package/src/components/android/Process/AppServiceControl.vue +757 -686
  15. package/src/components/android/Process/Processes/AppInstallationDetails.vue +456 -466
  16. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -0
  17. package/src/components/android/ProgressReport/ProgressReportList.vue +209 -0
  18. package/src/components/android/Supervisory/AppProcessSupervisory.vue +73 -152
  19. package/src/components/android/Supervisory/AppSupervisoryCart.vue +121 -115
  20. package/src/components/android/TaskGraph.vue +125 -0
  21. package/src/components/product/ApplyCharge/ApplyChargeList.vue +36 -50
  22. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +3 -3
  23. package/src/components/product/Function/InstallFunction.vue +125 -122
  24. package/src/components/product/Function/InstallInfoSelect.vue +292 -318
  25. package/src/components/product/Function/Service/FunctionServiceControl.vue +222 -254
  26. package/src/components/product/Function/StopApplyCrrdList.vue +176 -0
  27. package/src/components/product/Function/functions/ApplyRecordCancel.vue +102 -0
  28. package/src/components/product/Function/functions/StopInstall.vue +106 -0
  29. package/src/components/product/Onetomany.vue +377 -296
  30. package/src/components/product/Order/OrderApply.vue +30 -30
  31. package/src/components/product/Order/OrderApplyList.vue +78 -67
  32. package/src/components/product/Order/OrderMessage.vue +11 -87
  33. package/src/components/product/Process/ExplorationSelect.vue +410 -369
  34. package/src/components/product/Process/ExplorationUser.vue +138 -128
  35. package/src/components/product/Process/Processes/InstallationDetails.vue +592 -504
  36. package/src/components/product/Process/Processes/Print/img/10101.png +0 -0
  37. package/src/components/product/Process/Processes/Print/img/1010109.png +0 -0
  38. package/src/components/product/Process/Processes/Print/img/1010110.png +0 -0
  39. package/src/components/product/Process/Processes/Print/img/1010111.png +0 -0
  40. package/src/components/product/Process/Processes/Print/img/1010112.png +0 -0
  41. package/src/components/product/Process/Processes/Print/printCharge.vue +142 -0
  42. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +207 -181
  43. package/src/components/product/Process/Processes/chargeManagement.vue +639 -638
  44. package/src/components/product/Process/Processes/devicesManagement.vue +22 -2
  45. package/src/components/product/Process/Processes/selectApply.vue +1 -1
  46. package/src/components/product/Process/Service/ServiceControl.vue +1254 -883
  47. package/src/components/product/Process/Service/ShowBackReason.vue +33 -0
  48. package/src/components/product/ServiceView.vue +631 -741
  49. package/src/components/product/Stop/StopApply.vue +103 -103
  50. package/src/components/product/Stop/StopApplyList.vue +269 -254
  51. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +186 -517
  52. package/src/components/product/Supervisory/SupervisoryControl.vue +100 -108
  53. package/src/components/product/Supervisory/SupervisoryList.vue +233 -253
  54. package/src/components/product/Supervisory/SupervisoryhCart.vue +107 -124
  55. package/src/components/product/VueUtils/ApplyUpload.vue +273 -264
  56. package/src/components/product/VueUtils/HighMeter.vue +208 -0
  57. package/src/expandcssAndroid.less +1034 -517
  58. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +548 -414
  59. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +754 -456
  60. package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +60 -0
  61. package/src/filiale/yuchuan/android.js +7 -8
  62. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -517
  63. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +343 -343
  64. package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +270 -231
  65. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +147 -131
  66. package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +66 -0
  67. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +759 -0
  68. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +470 -0
  69. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +879 -517
  70. package/src/filiale/yuchuan/pc.js +11 -13
  71. package/src/main.js +23 -23
  72. package/src/components/android/Function/AppFunctionServiceControl.vue +0 -329
  73. package/src/components/android/Function/AppInstallFunction.vue +0 -330
  74. package/src/components/android/Process/Processes/AppBuildSign.vue +0 -47
  75. package/src/components/android/Process/Processes/AppChargeManagement.vue +0 -468
  76. package/src/components/android/Process/Processes/AppDevicesManagement.vue +0 -490
  77. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +0 -297
  78. package/src/components/android/Process/Processes/AppjiaSign.vue +0 -47
  79. package/src/components/android/Process/Processes/AppjiafangSign.vue +0 -47
  80. package/src/components/android/Process/Processes/ApptechnologySign.vue +0 -47
  81. package/src/components/image/dwg.jpg +0 -0
  82. package/src/components/image/yasuobao.jpg +0 -0
  83. package/src/components/product/Function/Inform.vue +0 -73
  84. package/src/components/product/Function/MarketSurvey.vue +0 -81
  85. package/src/components/product/Process/Processes/printCharge.vue +0 -121
  86. package/src/components/product/Process/ShowBackReason.vue +0 -33
  87. package/src/components/product/Supervisory/Service/printChargeNode.vue +0 -873
  88. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +0 -1090
  89. package/src/components/product/VueUtils/ToolsPage.vue +0 -51
  90. package/src/components/product/VueUtils/Tree.vue +0 -330
  91. package/src/filiale/wuan/android.js +0 -0
  92. package/src/filiale/wuan/pc.js +0 -4
  93. package/src/filiale/yuchuan/android/AppServiceView.vue +0 -599
  94. package/src/filiale/yuchuan/android/Reserve/ApplyReserve.vue +0 -200
  95. package/src/filiale/yuchuan/android/SiteSurvey/TaskGraph.vue +0 -137
  96. package/src/filiale/yuchuan/pc/Process/Processes/MapCom.vue +0 -51
@@ -1,414 +1,548 @@
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
- <app-service-view v-ref:serviceview :data="show_data" v-if="showview"></app-service-view>
6
- </panel>
7
- <!-- <panel header="拍照" :is-open="false" type="primary" v-if="selectdata.f_process_id">-->
8
- <!-- <app-take-pic :blobid="selectdata.f_process_id" type="手机照片" :defname="selectdata.defname" :isdelete="true" :istakepic="true"></app-take-pic>-->
9
- <!-- </panel>-->
10
- </accordion>
11
- </div>
12
- </template>
13
- <script>
14
- import Vue from 'vue'
15
- import {HttpResetClass} from 'vue-client'
16
- import {isEmpty} from '../../../../components/Util'
17
- // Date格式化
18
- Date.prototype.Format = function (fmt) {
19
- var o = {
20
- 'M+': this.getMonth() + 1, // 月份
21
- 'd+': this.getDate(), //
22
- 'H+': this.getHours(), // 小时
23
- 'm+': this.getMinutes(), //
24
- 's+': this.getSeconds(), //
25
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
26
- 'S': this.getMilliseconds() // 毫秒
27
- }
28
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
29
- for (var k in o) {
30
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
31
- }
32
- return fmt
33
- }
34
- export default {
35
- title: '报建流程业务控制层',
36
- props: ['selectdata'],
37
- data () {
38
- return {
39
- json_datas: null,
40
- data: null,
41
- show_data: null,
42
- showview: false
43
- }
44
- },
45
- ready () {
46
- this.getApplyConfig()
47
- },
48
- methods: {
49
- async getApplyConfig() {
50
- let http = new HttpResetClass()
51
- let data = {
52
- workname: this.selectdata.processname
53
- }
54
-
55
- // let res = await this.$resetpost(
56
- // 'rs/logic/ApplyGetConfigs',
57
- // {data: data},
58
- // {resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
59
- // )
60
-
61
- // this.json_datas = res.data
62
- this.json_datas = {"workflow_xmlfilename":"民用报建流程","activitys":[{"tables":["t_apply"],"buttons":[{"button_name":"保存"},{"button_name":"提交"}],"title":"现场勘察","fields":[{"field":"f_entry_name","readonly":true,"disabled":false,"label":"项目名称","type":"input","value":null,"required":true},{"field":"f_contact","readonly":true,"disabled":false,"label":"联系人","type":"input","required":true},{
63
- "label": "竣工时间",
64
- "type": "datepicker",
65
- "field": "f_completion_time",
66
- "placeholder": "请输入",
67
- "readonly": false,
68
- "required": true
69
- },{"field":"f_phone","readonly":true,"disabled":false,"label":"联系电话","type":"tel","required":true},{"field":"f_credentials","readonly":true,"options":[{"label":"身份证","value":"身份证"},{"label":"营业执照","value":"营业执照"}],"disabled":true,"label":"证件类型","placeholder":"请选择","type":"select","required":true},{"field":"f_idnumber","readonly":true,"disabled":false,"label":"证件号码","type":"input","required":true},{"field":"f_apply_type","readonly":true,"options":[{"label":"民用报建","value":"民用报建"},{"label":"非民用报建","value":"非民用报建"}],"disabled":true,"label":"报建类型","placeholder":"请选择","type":"select","required":true},{"field":"f_user_nature","readonly":true,"options":[{"label":"民用","value":"民用"},{"label":"非民用","value":"非民用"},{"label":"其他","value":"其他"}],"disabled":true,"label":"用户性质","placeholder":"请选择","type":"select","value":null,"required":true},{"field":"f_apply_count","readonly":true,"disabled":false,"label":"申请户数","type":"input","required":true},{"field":"f_order_address","readonly":true,"bootstraped":"","value_bootstraped":"","disabled":false,"label":"定位地址","type":"input","required":true},{"field":"f_installed_households","readonly":false,"disabled":false,"label":"安装户数","type":"input","required":true},{"field":"f_gas_nature","readonly":false,"options":[{"label":"民用单户","value":"民用单户"},{"label":"民用多户","value":"民用多户"}],"disabled":false,"label":"用气类型","placeholder":"请选择","type":"select","value":null,"required":true},{"field":"f_slice_area","readonly":false,"options":[{"label":"210国道西片区","value":"210国道西片区"},{"label":"长城路片区","value":"长城路片区"}],"disabled":false,"label":"片区","placeholder":"请选择","type":"select","value":null,"required":true},{"field":"f_survey_opinion","readonly":false,"disabled":false,"label":"勘察意见","type":"textarea","rows":2,"required":false},{"field":"f_design_company","readonly":false,"options":[{"label":"陕西省创天成工程技术有限公司","value":"陕西省创天成工程技术有限公司"},{"label":"陕西省燃气设计院有限公司","value":"陕西省燃气设计院有限公司"}],"disabled":false,"label":"设计单位","placeholder":"请选择","type":"select","value":null,"required":true},{"field":"f_designer_people","readonly":false,"options":[{"label":"程智","value":"程智"},{"label":"张强","value":"张强"}],"disabled":false,"label":"设计人","placeholder":"请选择","type":"select","value":null,"required":true},{"field":"f_design_opinion","readonly":false,"disabled":false,"label":"报建备注","type":"textarea","rows":2,"required":false},{"field":"f_apply_remarks","readonly":true,"disabled":false,"label":"报建备注","type":"textarea","rows":2,"required":false}]},{"tables":["t_apply"],"title":"完工","fields":[{"field":"f_successful","disabled":true,"label":"完工","type":"input","value":"---success---"}]}],"start_activity":"信息确认"}
70
-
71
- let sum = 0
72
- let jsonData = {}
73
- if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
74
- this.$showMessage("网络故障,请刷新页面")
75
- return
76
- }
77
-
78
- for (let i = 0; i < this.json_datas.activitys.length; i++) {
79
- if (this.selectdata.defname === this.json_datas.activitys[i].title) {
80
- jsonData = this.json_datas.activitys[i] // 拿到当前节点的json配置信息
81
- sum++ // 节点名一样的个数
82
- }
83
- }
84
- if (sum === 1) {
85
- this.data = null
86
- this.data = jsonData
87
- // selectdata 填充 data
88
- this.data = Object.assign({}, this.data, this.selectdata)
89
- this.initializeJSON()
90
- } else if (sum === 0) {
91
- this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
92
- } else {
93
- this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
94
- }
95
- },
96
- // json配置数据处理
97
- async initializeJSON() {
98
- // 有默认值,value就给默认值,没有就是null
99
- this.data.fields.forEach(item => {
100
- if (!item.value) {
101
- if (item.value === 0) {
102
- item.value = 0
103
- } else {
104
- item.value = null
105
- }
106
- }
107
- if (item.default || item.default === 0) {
108
- item.value = item.default
109
- }
110
- if (this.selectdata[item.field]) {
111
- // 将json字符串格式化赋值给value
112
- if (String(this.selectdata[item.field]).startsWith("{")) {
113
- item.value = JSON.parse(this.selectdata[item.field])
114
- this.selectdata[item.field] = JSON.parse(this.selectdata[item.field])
115
- } else {
116
- item.value = this.selectdata[item.field]
117
- }
118
- } else {
119
- if (this.selectdata[item.field] === 0) {
120
- item.value = 0
121
- }
122
- }
123
-
124
- // datepicker 没有值给当时值
125
- if (item.type === 'datepicker' && !item.value && item.default) {
126
- item.value = new Date().Format('yyyy-MM-dd HH:mm:ss')
127
- }
128
-
129
- // 如果配置类型为select,优先从参数列表获取options
130
- if (item.type === 'select') {
131
- let temp = null
132
-
133
- temp = this.$appdata.getParam(item.label)
134
-
135
- if (temp && temp.length > 0 && item.label) {
136
- item.options = temp
137
- } else {
138
- if (item.paramLabel) {
139
- temp = this.$appdata.getParam(item.paramLabel)
140
- if (temp && temp.length > 0) {
141
- item.options = temp
142
- }
143
- }
144
- }
145
- }
146
- })
147
-
148
- // 控制组件
149
- if (this.data.components) {
150
- this.data.components.forEach(item => {
151
- item.mark = 0
152
- })
153
- }
154
-
155
- // 初始化 buttons_fields
156
- for (let i = 0; i < this.data.buttons.length; i++) {
157
- // 下发按钮相关配置
158
- if (this.data.buttons[i].button_name === '下发') {
159
- if (this.data.buttons[i].button_fields && this.data.buttons[i].button_fields.length === 1) {
160
- if (this.data.buttons[i].source){
161
- let http = new HttpResetClass()
162
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {
163
- source: this.data.buttons[i].source,
164
- userid: Vue.user.id
165
- }, {resolveMsg: null, rejectMsg: null})
166
-
167
- let options = []
168
- for (let i = 0; i < res.data.length; i++) {
169
- options.push(
170
- {
171
- "label": res.data[i].name,
172
- "value": res.data[i].id
173
- }
174
- )
175
- }
176
- this.data.buttons[i].button_fields[0]['options'] = options
177
- } else {
178
- this.$showMessage("请配置获取人员表达式")
179
- }
180
- } else {
181
- this.$showMessage("下发按钮必须满足 当且仅当一个字段")
182
- }
183
- }
184
- if (this.data.buttons[i].button_fields) {
185
- this.data.buttons[i].button_fields.forEach(item => {
186
- // 如果配置类型为select,优先从参数列表获取options
187
- if (item.type === 'select' && this.$appdata.getParam(item.label)) {
188
- item.options = this.$appdata.getParam(item.label)
189
- }
190
- })
191
- }
192
- }
193
-
194
- // onetomany 数据获取
195
- if (this.data.onetomany) {
196
- for (let index = 0; index < this.data.onetomany.length; index++) {
197
- let res = null
198
- if (!this.data.onetomany[index].queryEvent || this.data.onetomany[index].queryEvent === 'default'){
199
- let http = new HttpResetClass()
200
- let data = {
201
- tablename: this.data.onetomany[index].tables[0],
202
- condition: `${this.data.onetomany[index].condition ? this.data.onetomany[index].condition : '1=1'} and f_process_id = '${this.selectdata.f_process_id}'`
203
- }
204
- res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {
205
- resolveMsg: null,
206
- rejectMsg: 'onetomany查询失败'
207
- })
208
- } else {
209
- res = await this[this.data.onetomany[index].queryEvent]()
210
- }
211
-
212
- // 初始化 onetomany
213
- this.data.onetomany[index].rows = res.data
214
-
215
- // 初始化onetomany中的fields
216
- for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
217
- if (!this.data.onetomany[index].fields[j].value) {
218
- if (this.data.onetomany[index].fields[j].value === 0) {
219
- this.data.onetomany[index].fields[j].value = 0
220
- } else {
221
- this.data.onetomany[index].fields[j].value = null
222
- }
223
- }
224
- if (this.data.onetomany[index].fields[j].default || this.data.onetomany[index].fields[j].default === 0) {
225
- this.data.onetomany[index].fields[j].value = this.data.onetomany[index].fields[j].default
226
- }
227
- // 如果配置类型为select,优先从参数列表获取options
228
- if (this.data.onetomany[index].fields[j].type === 'select') {
229
- let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
230
- if (temp && temp.length > 0) {
231
- this.data.onetomany[index].fields[j].options = temp
232
- }
233
- }
234
- }
235
- }
236
- }
237
-
238
- // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
239
- let temp = JSON.parse(JSON.stringify(this.data))
240
-
241
- this.show_data = temp
242
- this.$nextTick(() => {
243
- this.showview = true
244
- })
245
- },
246
- async buttonBefore(model) {
247
- return model
248
- },
249
- async checkDuplicate(index) {
250
- let http = new HttpResetClass()
251
- let data = {
252
- tablename: 't_apply',
253
- condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
254
- }
255
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {
256
- resolveMsg: null,
257
- rejectMsg: `${this.show_data.fields[index].label}查询失败`
258
- })
259
- if (res.data.length > 0) {
260
- this.show_data.fields[index].value = null
261
- throw `${this.show_data.fields[index].label}已存在!!!`
262
- }
263
- }
264
- },
265
- events: {
266
- async 'initializtionView'() {
267
- },
268
- // 失去焦点出触发事件
269
- async 'onchange'(index) {
270
- // 号码检测
271
- if (this.show_data.fields[index].label === '电话号码') {
272
- let phone = this.show_data.fields[index].value
273
- // 电话号码效验
274
- if (!(/^1[3456789]\d{9}$/.test(phone))) {
275
- this.show_data.fields[index].value = ""
276
- this.$showMessage("电话号码格式不正确,请重新输入!!!")
277
- }
278
- }
279
- },
280
- // 获取view层button事件/
281
- async 'button'(model) {
282
- // 修改提交数据
283
- model = Object.assign({}, this.selectdata, model)
284
- // 点击重置按钮就重置数据
285
- if (model.button.button_name === '重置') {
286
- this.breakControl()
287
- return
288
- }
289
-
290
- // 提交前置
291
- try {
292
- model = await this.buttonBefore(model)
293
- } catch (e) {
294
- this.$showMessage(e)
295
- return
296
- }
297
-
298
- let http = new HttpResetClass()
299
- let requestData = {
300
- tables: this.data.tables,
301
- start_activity: this.json_datas.start_activity,
302
- model: model,
303
- loginUser: Vue.user,
304
- // loginUser: {"parentname":"生产经营部","functions":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"客服系统","icon":"/images/lefticon/报建系统.png","hasright":false,"resourcetype":"function","parentid":"21","f_parentname":"客服系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"报建业务","link":"install-function","hasright":true,"resourcetype":"function","parentid":"195729","f_parentname":"报建业务","children":[],"selfid":"319029","name":"报建业务","templatename":"functionedit","id":"319028","position":"2","fullname":"资源管理.功能模块.客服系统.报建业务.报建业务","fullid":"3.17.21.195729.319028","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"报建业务","link":"exploration-user","hasright":true,"resourcetype":"function","parentid":"195729","f_parentname":"报建业务","children":[],"selfid":"319035","name":"报建流程","templatename":"functionedit","id":"319034","position":"3","fullname":"资源管理.功能模块.客服系统.报建业务.报建流程","fullid":"3.17.21.195729.319034","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"报建业务","link":"supervisory-control","hasright":true,"resourcetype":"function","parentid":"195729","f_parentname":"报建业务","children":[],"selfid":"319041","name":"流程监控","templatename":"functionedit","id":"319040","position":"4","fullname":"资源管理.功能模块.客服系统.报建业务.流程监控","fullid":"3.17.21.195729.319040","tablename":"t_function","showmodel":"右边"}],"selfid":"195730","name":"报建业务","templatename":"functionedit","id":"195729","position":"21","fullname":"资源管理.功能模块.客服系统.报建业务","fullid":"3.17.21.195729","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"客服系统","hasright":true,"resourcetype":"function","parentid":"21","f_parentname":"客服系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"台账系统","link":"ledger-process-business","hasright":true,"resourcetype":"function","parentid":"183292","f_parentname":"台账系统","children":[],"selfid":"183299","name":"流程业务","templatename":"functionedit","id":"183298","position":"1","fullname":"资源管理.功能模块.客服系统.台账系统.流程业务","fullid":"3.17.21.183292.183298","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"台账系统","link":"ledger-process-supervisory","hasright":true,"resourcetype":"function","parentid":"183292","f_parentname":"台账系统","children":[],"selfid":"188532","name":"流程监控","templatename":"functionedit","id":"188531","position":"2","fullname":"资源管理.功能模块.客服系统.台账系统.流程监控","fullid":"3.17.21.183292.188531","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"台账系统","link":"ledger-install-function","hasright":true,"resourcetype":"function","parentid":"183292","f_parentname":"台账系统","children":[],"selfid":"196444","name":"功能业务","templatename":"functionedit","id":"196443","position":"3","fullname":"资源管理.功能模块.客服系统.台账系统.功能业务","fullid":"3.17.21.183292.196443","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"台账系统","hasright":true,"resourcetype":"function","parentid":"183292","f_parentname":"台账系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"合同管理","link":"purchase-contract","hasright":true,"resourcetype":"function","parentid":"188543","f_parentname":"合同管理","children":[],"selfid":"188550","name":"采购合同","templatename":"functionedit","id":"188549","position":"1","fullname":"资源管理.功能模块.客服系统.台账系统.合同管理.采购合同","fullid":"3.17.21.183292.188543.188549","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"合同管理","link":"repair-contract","hasright":true,"resourcetype":"function","parentid":"188543","f_parentname":"合同管理","children":[],"selfid":"188658","name":"维修合同","templatename":"functionedit","id":"188657","position":"2","fullname":"资源管理.功能模块.客服系统.台账系统.合同管理.维修合同","fullid":"3.17.21.183292.188543.188657","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"合同管理","link":"other-contract","hasright":true,"resourcetype":"function","parentid":"188543","f_parentname":"合同管理","children":[],"selfid":"188664","name":"其他合同","templatename":"functionedit","id":"188663","position":"3","fullname":"资源管理.功能模块.客服系统.台账系统.合同管理.其他合同","fullid":"3.17.21.183292.188543.188663","tablename":"t_function"}],"selfid":"188544","name":"合同管理","templatename":"functionedit","id":"188543","position":"4","fullname":"资源管理.功能模块.客服系统.台账系统.合同管理","fullid":"3.17.21.183292.188543","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"台账系统","hasright":true,"resourcetype":"function","parentid":"183292","f_parentname":"台账系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"材料管理","link":"inventory-information","hasright":true,"resourcetype":"function","parentid":"188627","f_parentname":"材料管理","children":[],"selfid":"188640","name":"材料库存","templatename":"functionedit","id":"188639","position":"1","fullname":"资源管理.功能模块.客服系统.台账系统.材料管理.材料库存","fullid":"3.17.21.183292.188627.188639","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"材料管理","link":"warehousing-record","hasright":true,"resourcetype":"function","parentid":"188627","f_parentname":"材料管理","children":[],"selfid":"188646","name":"入库记录","templatename":"functionedit","id":"188645","position":"2","fullname":"资源管理.功能模块.客服系统.台账系统.材料管理.入库记录","fullid":"3.17.21.183292.188627.188645","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"材料管理","link":"delivery-record","hasright":true,"resourcetype":"function","parentid":"188627","f_parentname":"材料管理","children":[],"selfid":"188652","name":"出库记录","templatename":"functionedit","id":"188651","position":"3","fullname":"资源管理.功能模块.客服系统.台账系统.材料管理.出库记录","fullid":"3.17.21.183292.188627.188651","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"材料管理","link":"outbound-order","hasright":true,"resourcetype":"function","parentid":"188627","f_parentname":"材料管理","children":[],"selfid":"198662","name":"出库单记录","templatename":"functionedit","id":"198661","position":"4","fullname":"资源管理.功能模块.客服系统.台账系统.材料管理.出库单记录","fullid":"3.17.21.183292.188627.198661","tablename":"t_function"}],"selfid":"188628","name":"材料管理","templatename":"functionedit","id":"188627","position":"5","fullname":"资源管理.功能模块.客服系统.台账系统.材料管理","fullid":"3.17.21.183292.188627","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"台账系统","hasright":true,"resourcetype":"function","parentid":"183292","f_parentname":"台账系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"秦华物料","link":"picking-record","hasright":true,"resourcetype":"function","parentid":"238277","f_parentname":"秦华物料","children":[],"selfid":"238284","name":"领料记录","templatename":"functionedit","id":"238283","position":"1","fullname":"资源管理.功能模块.客服系统.台账系统.秦华物料.领料记录","fullid":"3.17.21.183292.238277.238283","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"秦华物料","link":"seasoning-record","hasright":true,"resourcetype":"function","parentid":"238277","f_parentname":"秦华物料","children":[],"selfid":"238290","name":"调料记录","templatename":"functionedit","id":"238289","position":"2","fullname":"资源管理.功能模块.客服系统.台账系统.秦华物料.调料记录","fullid":"3.17.21.183292.238277.238289","tablename":"t_function"}],"selfid":"238278","name":"秦华物料","templatename":"functionedit","id":"238277","position":"6","fullname":"资源管理.功能模块.客服系统.台账系统.秦华物料","fullid":"3.17.21.183292.238277","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"台账系统","hasright":true,"resourcetype":"function","parentid":"183292","f_parentname":"台账系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"设备管理","link":"facility-inventory","hasright":true,"resourcetype":"function","parentid":"188633","f_parentname":"设备管理","children":[],"selfid":"189114","name":"设备库存","templatename":"functionedit","id":"189113","position":"1","fullname":"资源管理.功能模块.客服系统.台账系统.设备管理.设备库存","fullid":"3.17.21.183292.188633.189113","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"设备管理","link":"employ-record","hasright":true,"resourcetype":"function","parentid":"188633","f_parentname":"设备管理","children":[],"selfid":"257321","name":"使用记录","templatename":"functionedit","id":"257320","position":"4","fullname":"资源管理.功能模块.客服系统.台账系统.设备管理.使用记录","fullid":"3.17.21.183292.188633.257320","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"设备管理","link":"service-record","hasright":true,"resourcetype":"function","parentid":"188633","f_parentname":"设备管理","children":[],"selfid":"189102","name":"维修记录","templatename":"functionedit","id":"189101","position":"5","fullname":"资源管理.功能模块.客服系统.台账系统.设备管理.维修记录","fullid":"3.17.21.183292.188633.189101","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"设备管理","link":"scrap-record","hasright":true,"resourcetype":"function","parentid":"188633","f_parentname":"设备管理","children":[],"selfid":"189108","name":"报废记录","templatename":"functionedit","id":"189107","position":"6","fullname":"资源管理.功能模块.客服系统.台账系统.设备管理.报废记录","fullid":"3.17.21.183292.188633.189107","tablename":"t_function"}],"selfid":"188634","name":"设备管理","templatename":"functionedit","id":"188633","position":"7","fullname":"资源管理.功能模块.客服系统.台账系统.设备管理","fullid":"3.17.21.183292.188633","tablename":"t_function"}],"selfid":"183293","name":"台账系统","templatename":"functionedit","id":"183292","position":"27","fullname":"资源管理.功能模块.客服系统.台账系统","fullid":"3.17.21.183292","tablename":"t_function"}],"qrcode":"/rs/user/getQRcode?QRCODE=1015-1622454565681-74540","rolesnames":"结算组,预决算组,生产组,设备材料组,主体项目部,客户项目部","roles":"178650,178656,178662,178668,178674,178680","f_sex":"男","f_icon":"tree_user","fullnames":"西安市天然气工程有限责任公司.生产经营部.台账测试","dir":"qinhuagongcheng","accesstime":"1625456996393","userid":"1015-1622454565681-74540","parentid":"178638","fullids":"178632.178638.178686.","selfid":"178687","templatename":"useredit","logindate":"2021-06-08 16:11:44.527","id":"178686","state":"在职","tablename":"t_user","deptype":"部门","depids":"178638","loginid":"11","initpassword":"1","rolestr":"结算组,预决算组,生产组,设备材料组,主体项目部,客户项目部","deps":"生产经营部","loginnum":"0","resourcetype":"user","orgid":"178632","f_department_name":"生产经营部","ename":"tzcs","deleted":"false","entitytype":"t_user","loginip":"192.168.120.243","name":"台账测试","position":"1","orgs":"西安市天然气工程有限责任公司","f_role_name":"结算组 预决算组 生产组 设备材料组 主体项目部 客户项目部 ","f_allArea":[],"f_gasman":[],"lics":[]},
305
- workflow_xmlfilename: this.json_datas.workflow_xmlfilename
306
- }
307
- // 下发,提交,保存,退回通用业务后台处理logic
308
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyProductService`, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
309
- // let res = await http.load('POST', `rs/logic/ApplyProductService`, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
310
-
311
- if (res.data.code === 200) {
312
- this.$dispatch('confirm')
313
- } else {
314
- if (res.data.msg) {
315
- this.$showMessage(res.data.msg)
316
- }
317
- }
318
- },
319
-
320
- // onetomany模态框默认监听监听事件
321
- async 'onetomanydelete'(i, j) {
322
- console.log('默认删除')
323
- let http = new HttpResetClass()
324
- let data = {
325
- table: this.show_data.onetomany[i].tables[0],
326
- row: this.show_data.onetomany[i].rows[j]
327
- }
328
- let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/onetomanyDefaultDeleteEvent`, {data: data}, {
329
- resolveMsg: null,
330
- rejectMsg: '删除失败'
331
- })
332
-
333
- if (res.data <= 0){
334
- this.$showMessage('删除失败')
335
- return
336
- }
337
-
338
- this.breakControl()
339
- },
340
- async 'onetomanyadd'(index) {
341
-
342
- let data = {
343
- f_process_id : this.show_data.f_process_id
344
- }
345
- this.show_data.onetomany[index].fields.forEach(item => {
346
- data[item.field] = item.value
347
- })
348
- let res = await this.$resetpost(
349
- `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
350
- data
351
- )
352
-
353
- this.breakControl()
354
- },
355
- async 'onetomanyupdate'(i, j) {
356
- let onetomany = this.show_data.onetomany[i]
357
- let data = onetomany.rows[j]
358
-
359
- onetomany.fields.forEach(item => {
360
- data[item.field] = item.value
361
- })
362
- let res = await this.$resetpost(
363
- `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[i].tables[0]}`,
364
- data
365
- )
366
-
367
- this.breakControl()
368
- },
369
- // onetomany模态框监听事件
370
- async 'onchange_modal'(index, i) {
371
- },
372
- async 'oninput_modal'(index, i) {
373
- },
374
- error_check(index) {
375
- // 时间格式检测
376
- if (this.show_data.fields[index].type === 'datepicker' && !isEmpty(this.show_data.fields[index].value)) {
377
-
378
- let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
379
- let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
380
- let datetimeReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
381
- if (this.show_data.fields[index].format) {
382
- if (this.show_data.fields[index].format === 'yyyy-MM-dd') {
383
- if (!dateReg.test(this.show_data.fields[index].value)) {
384
- this.show_data.fields[index].value = ''
385
- this.$showMessage(this.show_data.fields[index].label + '格式错误如:2021-01-01')
386
- }
387
- }
388
- if (this.show_data.fields[index].format === 'HH:mm:ss') {
389
- if (!timeReg.test(this.show_data.fields[index].value)) {
390
- this.show_data.fields[index].value = ''
391
- this.$showMessage(this.show_data.fields[index].label + '格式错误如:00:00:00')
392
- }
393
- }
394
- if (this.show_data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
395
- if (!datetimeReg.test(this.show_data.fields[index].value)) {
396
- this.show_data.fields[index].value = ''
397
- this.$showMessage(this.show_data.fields[index].label + '格式错误如:2021-01-01 00:00:00')
398
- }
399
- }
400
- } else {
401
- if (!dateReg.test(this.show_data.fields[index].value)) {
402
- this.show_data.fields[index].value = ''
403
- this.$showMessage(this.show_data.fields[index].label + '格式错误如:2021-01-01')
404
- }
405
- }
406
- }
407
- },
408
- },
409
- watch: {
410
- }
411
- }
412
- </script>
413
- <style scoped>
414
- </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
+ <app-service-view v-ref:serviceview :data="show_data" v-if="showview"></app-service-view>
6
+ </panel>
7
+ <panel header="拍照" :is-open="false" type="primary" v-if="selectdata.f_process_id">
8
+ <app-take-pic :blobid="selectdata.f_process_id" :defname="selectdata.defname" :isdelete="true" :istakepic="true" :istype="true"></app-take-pic>
9
+ </panel>
10
+ </accordion>
11
+ </div>
12
+ </template>
13
+ <script>
14
+ import Vue from 'vue'
15
+ import {HttpResetClass} from 'vue-client'
16
+ // Date格式化
17
+ Date.prototype.Format = function (fmt) {
18
+ var o = {
19
+ 'M+': this.getMonth() + 1, // 月份
20
+ 'd+': this.getDate(), //
21
+ 'H+': this.getHours(), // 小时
22
+ 'm+': this.getMinutes(), //
23
+ 's+': this.getSeconds(), //
24
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
25
+ 'S': this.getMilliseconds() // 毫秒
26
+ }
27
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
28
+ for (var k in o) {
29
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
30
+ }
31
+ return fmt
32
+ }
33
+ export default {
34
+ title: '报建流程业务控制层',
35
+ props: ['selectdata'],
36
+ data () {
37
+ return {
38
+ json_datas: null,
39
+ data: null,
40
+ show_data: null,
41
+ showview: false,
42
+ config: {}
43
+ }
44
+ },
45
+ ready () {
46
+ this.refurbish()
47
+ },
48
+ methods: {
49
+ async refurbish() {
50
+ let data = {
51
+ workname: this.selectdata.processname
52
+ }
53
+
54
+ let res = await this.$resetpost(
55
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`,
56
+ {data: data},
57
+ {resolveMsg: null, rejectMsg: '配置数据获取失败!!!'}
58
+ )
59
+
60
+ this.json_datas = res.data
61
+ // this.json_datas = {"start_activity":"报装申请","workflow_xmlfilename":"民用报建流程","activitys":[{"title":"报装申请","tables":["t_apply"],"fields":[{"label":"报建类型","type":"select","field":"f_apply_type","readonly":true,"required":true,"disabled":true,"placeholder":"请选择","param":true,"options":[]},{"label":"报建性质","type":"select","field":"f_apply_nature","readonly":false,"required":true,"disabled":false,"placeholder":"请选择","param":true,"options":[],"onchange":"applyNatureChange"},{"label":"用户名称","type":"input","field":"f_user_name","readonly":false,"disabled":false,"required":true},{"label":"用户电话","type":"tel","field":"f_phone","readonly":false,"disabled":false,"required":true},{"label":"微信号","type":"input","field":"f_wechat_number","readonly":false,"disabled":false,"required":true},{"label":"证件类型","type":"select","field":"f_credentials","readonly":false,"required":true,"disabled":false,"placeholder":"请选择","param":true,"options":[]},{"label":"证件号码","type":"input","field":"f_idnumber","readonly":false,"required":true,"disabled":false},{"label":"申请户数","type":"number","field":"f_apply_count","readonly":false,"required":true,"disabled":false},{"label":"片区","type":"select","field":"f_slice_area","hidden":true,"readonly":false,"required":true,"disabled":false,"ready":"getSliceArea","options":[]},{"label":"省市区","type":"select","field":"f_pcd","hidden":true,"readonly":false,"required":true,"disabled":false,"ready":"getPcd","onchange":"pcdChange","options":[]},{"label":"街道","type":"select","field":"f_street","hidden":true,"readonly":false,"required":true,"disabled":false,"onchange":"streetChange","options":[]},{"label":"小区","type":"select","field":"f_residential_area","hidden":true,"readonly":false,"required":true,"disabled":false,"options":[],"selectSearch":"searchArea"},{"label":"地址","type":"textarea","field":"f_order_address","rows":1,"readonly":true,"required":true,"disabled":false},{"label":"备注","type":"textarea","field":"f_apply_remarks","rows":2,"readonly":false,"required":false,"disabled":false}],"components":[],"buttons":[{"button_name":"保存"},{"button_name":"提交","disabled":true}],"readyEvent":""},{"title":"报建受理","tables":["t_apply"],"fields":[{"label":"报建类型","type":"input","field":"f_apply_type","readonly":true,"disabled":false,"required":true},{"label":"报建性质","type":"input","field":"f_apply_nature","readonly":true,"disabled":false,"required":true},{"label":"用户名称","type":"input","field":"f_user_name","readonly":true,"disabled":false,"required":true},{"label":"用户电话","type":"tel","field":"f_phone","readonly":true,"disabled":false,"required":true},{"label":"微信号","type":"input","field":"f_wechat_number","readonly":true,"disabled":false,"required":true},{"label":"证件类型","type":"input","field":"f_credentials","readonly":true,"disabled":false,"required":true},{"label":"证件号码","type":"input","field":"f_idnumber","readonly":true,"required":true,"disabled":false},{"label":"申请户数","type":"number","field":"f_apply_count","readonly":true,"required":true,"disabled":false},{"label":"片区","type":"select","field":"f_slice_area","hidden":true,"readonly":false,"required":true,"disabled":false,"ready":"getSliceArea","options":[]},{"label":"省市区","type":"select","field":"f_pcd","hidden":true,"readonly":false,"required":true,"disabled":false,"ready":"getPcd","onchange":"pcdChange","options":[]},{"label":"街道","type":"select","field":"f_street","hidden":true,"readonly":false,"required":true,"disabled":false,"onchange":"streetChange","options":[]},{"label":"小区","type":"select","field":"f_residential_area","hidden":true,"readonly":false,"required":true,"disabled":false,"options":[],"selectSearch":"searchArea"},{"label":"地址","type":"textarea","field":"f_order_address","rows":1,"readonly":true,"required":true,"disabled":false},{"label":"备注","type":"textarea","field":"f_apply_remarks","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"受理时间","type":"datepicker","field":"f_accept_time","readonly":false,"required":true,"disabled":false,"default":true},{"label":"受理人","type":"input","field":"f_accept_people","readonly":false,"required":true,"disabled":false,"default":"this.$login.f.name","eval":true},{"label":"是否满足安装条件","type":"select","field":"f_accept_install","readonly":false,"required":true,"disabled":false,"options":[{"label":"是","value":"是"},{"label":"否","value":"否"}]},{"label":"受理结果","type":"textarea","field":"f_accept_result","rows":2,"readonly":false,"required":false,"disabled":false}],"components":[],"buttons":[{"button_name":"保存"},{"button_name":"下发","source":"this.getParentByType($organization$).getChildByName($营业厅报装$).getChildren()","button_fields":[{"label":"下发给","type":"select","field":"f_issue_man","placeholder":"请输入","readonly":false,"disabled":false,"required":true,"options":[]}],"disabled":true}],"readyEvent":""},{"title":"现场勘察","tables":["t_apply"],"fields":[{"label":"报建类型","type":"input","field":"f_apply_type","readonly":true,"disabled":false,"required":true},{"label":"报建性质","type":"input","field":"f_apply_nature","readonly":true,"disabled":false,"required":true},{"label":"用户名称","type":"input","field":"f_user_name","readonly":true,"disabled":false,"required":true},{"label":"用户电话","type":"tel","field":"f_phone","readonly":true,"disabled":false,"required":true},{"label":"微信号","type":"input","field":"f_wechat_number","readonly":true,"disabled":false,"required":true},{"label":"证件类型","type":"input","field":"f_credentials","readonly":true,"disabled":false,"required":true},{"label":"证件号码","type":"input","field":"f_idnumber","readonly":true,"required":true,"disabled":false},{"label":"申请户数","type":"number","field":"f_apply_count","readonly":true,"required":true,"disabled":false},{"label":"安装户数","type":"number","field":"f_install_count","readonly":false,"required":true,"disabled":false,"onchange":"installCountChange"},{"label":"地址","type":"textarea","field":"f_order_address","rows":1,"readonly":true,"required":true,"disabled":false},{"label":"备注","type":"textarea","field":"f_apply_remarks","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"勘察时间","type":"datepicker","field":"f_survey_date","readonly":false,"required":true,"disabled":false,"default":true},{"label":"勘察人员","type":"input","field":"f_survey_people","readonly":false,"required":true,"disabled":false,"default":"this.$login.f.name","eval":true},{"label":"是否满足安装条件","type":"select","field":"f_survey_opinion","readonly":false,"required":true,"disabled":false,"options":[{"label":"是","value":"是"},{"label":"否","value":"否"}]},{"label":"勘察结果","type":"textarea","field":"f_prospecting_result","rows":2,"readonly":false,"required":false,"disabled":false}],"components":[],"buttons":[{"button_name":"保存"},{"button_name":"提交","disabled":true}]},{"title":"收费标准","tables":["t_apply"],"fields":[{"label":"报建类型","type":"input","field":"f_apply_type","readonly":true,"disabled":false,"required":true},{"label":"报建性质","type":"input","field":"f_apply_nature","readonly":true,"disabled":false,"required":true},{"label":"用户名称","type":"input","field":"f_user_name","readonly":true,"disabled":false,"required":true},{"label":"用户电话","type":"tel","field":"f_phone","readonly":true,"disabled":false,"required":true},{"label":"微信号","type":"input","field":"f_wechat_number","readonly":true,"disabled":false,"required":true},{"label":"证件类型","type":"input","field":"f_credentials","readonly":true,"disabled":false,"required":true},{"label":"证件号码","type":"input","field":"f_idnumber","readonly":true,"required":true,"disabled":false},{"label":"申请户数","type":"number","field":"f_apply_count","readonly":true,"required":true,"disabled":false},{"label":"安装户数","type":"number","field":"f_install_count","readonly":true,"required":true,"disabled":false},{"label":"地址","type":"textarea","field":"f_order_address","rows":1,"readonly":true,"required":true,"disabled":false},{"label":"备注","type":"textarea","field":"f_apply_remarks","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"工程费单价","type":"number","field":"f_price","readonly":false,"required":true,"disabled":false,"onchange":"priceChange"},{"label":"工程材料费","type":"input","field":"f_due_money","readonly":true,"disabled":false,"required":true},{"label":"用气性质","type":"select","field":"f_gas_nature","placeholder":"","readonly":false,"disabled":false,"required":true,"param":true,"options":[]},{"label":"气价类型","type":"select","field":"f_price_type","placeholder":"","readonly":false,"disabled":false,"required":true,"param":true,"options":[]},{"label":"收费标准备注","type":"textarea","field":"f_due_money_remarks","rows":2,"readonly":false,"required":false,"disabled":false}],"components":[],"buttons":[{"button_name":"保存"},{"button_name":"提交","disabled":true}]},{"title":"报装缴费","tables":["t_apply"],"fields":[{"label":"报建类型","type":"input","field":"f_apply_type","readonly":true,"disabled":false,"required":true},{"label":"报建性质","type":"input","field":"f_apply_nature","readonly":true,"disabled":false,"required":true},{"label":"用户名称","type":"input","field":"f_user_name","readonly":true,"disabled":false,"required":true},{"label":"用户电话","type":"tel","field":"f_phone","readonly":true,"disabled":false,"required":true},{"label":"微信号","type":"input","field":"f_wechat_number","readonly":true,"disabled":false,"required":true},{"label":"证件类型","type":"input","field":"f_credentials","readonly":true,"disabled":false,"required":true},{"label":"证件号码","type":"input","field":"f_idnumber","readonly":true,"required":true,"disabled":false},{"label":"申请户数","type":"number","field":"f_apply_count","readonly":true,"required":true,"disabled":false},{"label":"安装户数","type":"number","field":"f_install_count","readonly":true,"required":true,"disabled":false},{"label":"地址","type":"textarea","field":"f_order_address","rows":1,"readonly":true,"required":true,"disabled":false},{"label":"备注","type":"textarea","field":"f_apply_remarks","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"收费标准备注","type":"textarea","field":"f_due_money_remarks","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"工程费单价","type":"number","field":"f_price","readonly":true,"required":true,"disabled":false},{"label":"应交总金额","type":"input","field":"f_due_money","readonly":true,"disabled":false,"required":true},{"label":"累计缴费金额","type":"input","field":"f_cumulative_payment_money","readonly":true,"disabled":false,"required":true},{"label":"未结总金额","type":"input","field":"f_surplus_money","readonly":true,"disabled":false,"required":true},{"label":"付款比例","type":"input","field":"f_payment_ratio","readonly":true,"disabled":false,"required":true},{"label":"购货单位识别号","type":"input","field":"f_taxpayer_id","readonly":false,"disabled":false,"required":true},{"label":"购货单位名称","type":"input","field":"f_paper_name","readonly":false,"disabled":false,"required":true},{"label":"购货单位银行账号","type":"input","field":"f_paper_account","readonly":false,"disabled":false,"required":true},{"label":"购货单位地址电话","type":"input","field":"f_address_phone","readonly":false,"disabled":false,"required":true},{"label":"登记开票类型","type":"select","field":"f_paper_type","placeholder":"","readonly":false,"disabled":false,"required":true,"param":true,"paramLabel":"票据类型","options":[]}],"components":[{"title":"缴费明细","device":"pc","name":"apply-charge-management"}],"buttons":[{"button_name":"保存"},{"before":"chargeBefore","button_name":"提交","disabled":true}]},{"title":"合同签订","tables":["t_apply"],"fields":[{"label":"报建类型","type":"input","field":"f_apply_type","readonly":true,"disabled":false,"required":true},{"label":"报建性质","type":"input","field":"f_apply_nature","readonly":true,"disabled":false,"required":true},{"label":"用户名称","type":"input","field":"f_user_name","readonly":true,"disabled":false,"required":true},{"label":"用户电话","type":"tel","field":"f_phone","readonly":true,"disabled":false,"required":true},{"label":"微信号","type":"input","field":"f_wechat_number","readonly":true,"disabled":false,"required":true},{"label":"证件类型","type":"input","field":"f_credentials","readonly":true,"disabled":false,"required":true},{"label":"证件号码","type":"input","field":"f_idnumber","readonly":true,"required":true,"disabled":false},{"label":"申请户数","type":"number","field":"f_apply_count","readonly":true,"required":true,"disabled":false},{"label":"安装户数","type":"number","field":"f_install_count","readonly":true,"required":true,"disabled":false},{"label":"地址","type":"textarea","field":"f_order_address","rows":1,"readonly":true,"required":true,"disabled":false},{"label":"备注","type":"textarea","field":"f_apply_remarks","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"合同编号","type":"input","field":"f_contract_number","readonly":false,"required":true,"disabled":false,"onchange":"checkRepeat"},{"label":"合同金额","type":"number","field":"f_contract_money","readonly":true,"required":true,"disabled":false,"default":"this.selectdata.f_due_money","eval":true},{"label":"合同签订时间","type":"datepicker","field":"f_contract_date","readonly":false,"required":true,"disabled":false,"default":true},{"label":"合同备注","type":"textarea","field":"f_contract_remarks","rows":2,"readonly":false,"required":true,"disabled":false},{"label":"受理结果","type":"textarea","field":"f_accept_result","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"勘察结果","type":"textarea","field":"f_prospecting_result","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"收费标准备注","type":"textarea","field":"f_due_money_remarks","rows":2,"readonly":true,"required":false,"disabled":false}],"components":[],"buttons":[{"button_name":"保存"},{"button_name":"提交","disabled":true}]},{"title":"设计出图","tables":["t_apply"],"fields":[{"label":"报建类型","type":"input","field":"f_apply_type","readonly":true,"disabled":false,"required":true},{"label":"报建性质","type":"input","field":"f_apply_nature","readonly":true,"disabled":false,"required":true},{"label":"用户名称","type":"input","field":"f_user_name","readonly":true,"disabled":false,"required":true},{"label":"用户电话","type":"tel","field":"f_phone","readonly":true,"disabled":false,"required":true},{"label":"微信号","type":"input","field":"f_wechat_number","readonly":true,"disabled":false,"required":true},{"label":"证件类型","type":"input","field":"f_credentials","readonly":true,"disabled":false,"required":true},{"label":"证件号码","type":"input","field":"f_idnumber","readonly":true,"required":true,"disabled":false},{"label":"申请户数","type":"number","field":"f_apply_count","readonly":true,"required":true,"disabled":false},{"label":"安装户数","type":"number","field":"f_install_count","readonly":true,"required":true,"disabled":false},{"label":"地址","type":"textarea","field":"f_order_address","rows":1,"readonly":true,"required":true,"disabled":false},{"label":"备注","type":"textarea","field":"f_apply_remarks","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"设计派工日期","type":"datepicker","field":"f_drawing_time","readonly":false,"required":true,"disabled":false,"default":true},{"label":"设计人","type":"input","field":"f_designer_people","readonly":false,"required":true,"disabled":false,"default":"this.$login.f.name","eval":true},{"label":"设计出图说明","type":"textarea","field":"f_design_opinion","rows":2,"readonly":false,"required":false,"disabled":false}],"components":[],"buttons":[{"button_name":"保存"},{"button_name":"提交","disabled":true}]},{"title":"工程派工","tables":["t_apply"],"fields":[{"label":"报建类型","type":"input","field":"f_apply_type","readonly":true,"disabled":false,"required":true},{"label":"报建性质","type":"input","field":"f_apply_nature","readonly":true,"disabled":false,"required":true},{"label":"用户名称","type":"input","field":"f_user_name","readonly":true,"disabled":false,"required":true},{"label":"用户电话","type":"tel","field":"f_phone","readonly":true,"disabled":false,"required":true},{"label":"微信号","type":"input","field":"f_wechat_number","readonly":true,"disabled":false,"required":true},{"label":"证件类型","type":"input","field":"f_credentials","readonly":true,"disabled":false,"required":true},{"label":"证件号码","type":"input","field":"f_idnumber","readonly":true,"required":true,"disabled":false},{"label":"申请户数","type":"number","field":"f_apply_count","readonly":true,"required":true,"disabled":false},{"label":"安装户数","type":"number","field":"f_install_count","readonly":true,"required":true,"disabled":false},{"label":"地址","type":"textarea","field":"f_order_address","rows":1,"readonly":true,"required":true,"disabled":false},{"label":"备注","type":"textarea","field":"f_apply_remarks","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"派工日期","type":"datepicker","field":"f_release_date","readonly":false,"required":true,"disabled":false,"default":true},{"label":"施工单位","type":"select","field":"f_construction_unit","placeholder":"","readonly":false,"disabled":false,"required":true,"param":true,"options":[]},{"label":"材料备注","type":"textarea","field":"f_materials_remarks","rows":2,"readonly":false,"required":true,"disabled":false},{"label":"开具号","type":"input","field":"f_issue_number","readonly":false,"disabled":false,"required":true},{"label":"设计周期","type":"input","field":"f_designer_period","readonly":false,"disabled":false,"required":true},{"label":"工期","type":"input","field":"f_time_project","readonly":false,"disabled":false,"required":true},{"label":"派工类型","type":"select","field":"f_dispatching_type","placeholder":"","readonly":false,"disabled":false,"required":true,"param":true,"options":[]},{"label":"气表品牌","type":"select","field":"f_meter_brand","placeholder":"","readonly":false,"disabled":false,"required":true,"options":[],"ready":"getMeterBrand","onchange":"meterBrandChenge"},{"label":"气表型号","type":"select","field":"f_meter_style","placeholder":"","readonly":false,"disabled":false,"required":true,"options":[]}],"components":[],"buttons":[{"button_name":"保存"},{"button_name":"下发","source":"this.getParentByType($organization$).getChildByName($营业厅报装$).getChildren()","button_fields":[{"label":"下发给","type":"select","field":"f_issue_man","placeholder":"请输入","readonly":false,"disabled":false,"required":true,"options":[]}],"disabled":true}]},{"title":"工程施工","tables":["t_apply"],"fields":[{"label":"报建类型","type":"input","field":"f_apply_type","readonly":true,"disabled":false,"required":true},{"label":"报建性质","type":"input","field":"f_apply_nature","readonly":true,"disabled":false,"required":true},{"label":"用户名称","type":"input","field":"f_user_name","readonly":true,"disabled":false,"required":true},{"label":"用户电话","type":"tel","field":"f_phone","readonly":true,"disabled":false,"required":true},{"label":"微信号","type":"input","field":"f_wechat_number","readonly":true,"disabled":false,"required":true},{"label":"证件类型","type":"input","field":"f_credentials","readonly":true,"disabled":false,"required":true},{"label":"证件号码","type":"input","field":"f_idnumber","readonly":true,"required":true,"disabled":false},{"label":"申请户数","type":"number","field":"f_apply_count","readonly":true,"required":true,"disabled":false},{"label":"安装户数","type":"number","field":"f_install_count","readonly":true,"required":true,"disabled":false},{"label":"地址","type":"textarea","field":"f_order_address","rows":1,"readonly":true,"required":true,"disabled":false},{"label":"备注","type":"textarea","field":"f_apply_remarks","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"施工单位","type":"input","field":"f_construction_unit","placeholder":"","readonly":true,"disabled":false,"required":true},{"label":"工期","type":"input","field":"f_time_project","readonly":true,"disabled":false,"required":true},{"label":"派工类型","type":"input","field":"f_dispatching_type","placeholder":"","readonly":true,"disabled":false,"required":true},{"label":"户内出单日期","type":"datepicker","field":"f_outdoors_time","readonly":false,"required":true,"disabled":false},{"label":"户内回单日期","type":"datepicker","field":"f_outdoors_receipt_time","readonly":false,"required":true,"disabled":false},{"label":"户内施工备注","type":"textarea","field":"f_outdoors_remarks","rows":2,"readonly":false,"required":false,"disabled":false},{"label":"庭院出单日期","type":"datepicker","field":"f_courtyard_time","readonly":false,"required":true,"disabled":false},{"label":"庭院回单日期","type":"datepicker","field":"f_courtyard_receipt_time","readonly":false,"required":true,"disabled":false},{"label":"庭院施工备注","type":"textarea","field":"f_courtyard_remarks","rows":2,"readonly":false,"required":false,"disabled":false}],"components":[{"title":"安装明细","device":"pc","name":"installation-details"},{"title":"安装明细","device":"app","name":"app-installation-details"}],"buttons":[{"button_name":"保存"},{"button_name":"提交","disabled":true}]},{"title":"通气点火","tables":["t_apply"],"fields":[{"label":"工程编号","type":"input","field":"f_apply_num","readonly":true,"disabled":false,"required":true},{"label":"报建类型","type":"input","field":"f_apply_type","readonly":true,"required":true,"disabled":false},{"label":"报建性质","type":"input","field":"f_apply_nature","readonly":true,"required":true,"disabled":false},{"label":"用户编号","type":"input","field":"f_userinfo_code","readonly":true,"disabled":false,"required":true},{"label":"用户名称","type":"input","field":"f_user_name","readonly":true,"disabled":false,"required":true},{"label":"用户电话","type":"tel","field":"f_phone","readonly":true,"disabled":false,"required":true},{"label":"地址","type":"textarea","field":"f_address","rows":1,"readonly":true,"required":true,"disabled":false},{"label":"施工单位","type":"input","field":"f_construction_unit","readonly":true,"required":true,"disabled":false},{"label":"施工安装时间","type":"datepicker","field":"f_construction_date","readonly":true,"required":true,"disabled":true},{"bootstraped":"col-sm-12 col-xs-12","label":"安装项目","type":"checkbox","field":"f_install_project","readonly":true,"required":true,"disabled":true,"param":true},{"label":"施工备注","type":"textarea","field":"f_construction_remarks","rows":2,"readonly":true,"required":false,"disabled":false},{"label":"点火人","type":"input","field":"f_igniter_people","readonly":true,"required":true,"disabled":false,"default":"this.$login.f.name","eval":true},{"label":"通气时间","type":"datepicker","field":"f_ventilate_date","readonly":true,"required":true,"disabled":true,"default":true},{"label":"通气情况","type":"textarea","field":"f_gas_result","readonly":false,"required":true,"disabled":false,"rows":"9","default":"客户如认可以下内容请签字,如有不认可之处请说明情况\n1、气密性检测合格,已对各接口处进行查漏无泄漏\n2、燃气表运转正常并告知用户。灶具点火测试正常。使用金属波纹管\n3、已向用户讲解安全常识及注意事项。发放《用户使用手册》并张贴提示标签\n4、灶具品牌\n5、油烟机品牌\n6、热水器品牌\n7、壁挂炉品牌\n8、金属波纹品牌"},{"label":"通气备注","type":"textarea","field":"f_gas_remarks","readonly":false,"required":false,"disabled":false},{"label":"气价名称","type":"select","field":"stairPrice","readonly":false,"required":true,"disabled":false,"ready":"getPrice","onchange":"priceChange","options":[]},{"label":"气价类型","type":"input","field":"f_price_type","readonly":true,"required":false,"disabled":false},{"label":"用气性质","type":"input","field":"f_gas_nature","readonly":true,"required":false,"disabled":false},{"label":"价格","type":"input","field":"f_stair_price","readonly":true,"required":false,"disabled":false},{"label":"客户类型","type":"input","field":"f_user_type","readonly":true,"required":false,"disabled":false},{"label":"待执行保险","type":"input","field":"f_execute_insure","readonly":true,"disabled":false,"required":true},{"label":"是否购买保险","type":"select","field":"f_is_insure","placeholder":"请输入","readonly":false,"disabled":false,"required":true,"options":[{"label":"是","value":"是"},{"label":"否","value":"否"}],"default":"否","onchange":"isInsureChange"},{"label":"保费开始日期","type":"datepicker","field":"f_ins_start_date","readonly":false,"required":true,"disabled":false,"default":true,"format":"yyyy-MM-dd","hidden":true},{"label":"保费结束日期","type":"datepicker","field":"f_ins_expiration_date","readonly":false,"required":true,"disabled":false,"hidden":true},{"label":"险种","type":"select","field":"f_insurance_type","readonly":false,"disabled":false,"required":true,"options":[],"param":true,"hidden":true},{"label":"保费金额","type":"number","field":"f_insurance_money","placeholder":"请输入","readonly":false,"required":true,"hidden":true},{"label":"保险备注","type":"textarea","field":"f_ins_comments","rows":2,"readonly":false,"required":false,"disabled":false,"hidden":true}],"components":[{"title":"安装明细","device":"pc","name":"installation-details"},{"title":"安装明细","device":"app","name":"app-installation-details"},{"title":"用气设备","device":"pc","name":"apply-devices-management"},{"title":"用气设备","device":"app","name":"app-apply-devices-management"}],"buttons":[{"button_name":"保存"},{"button_name":"提交","disabled":true},{"button_name":"退回","button_fields":[{"label":"退回原因","type":"input","field":"f_back_reason","placeholder":"请输入","readonly":false,"disabled":false,"required":true}]}],"readyEvent":"gasReadyEvent"},{"title":"完工","tables":["t_apply"],"fields":[{"label":"完工","type":"input","field":"f_successful","disabled":true,"value":"---success---"}]}]}
62
+
63
+ let sum = 0
64
+ let jsonData = {}
65
+ if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
66
+ this.$showMessage("网络故障,请刷新页面")
67
+ return
68
+ }
69
+ this.json_datas.activitys.forEach(item => {
70
+ if (this.selectdata.defname === item.title) {
71
+ jsonData = item // 拿到当前节点的json配置信息
72
+ sum++ // 节点名一样的个数
73
+ }
74
+ return this.selectdata.defname === item.title // 拿到当前节点的json配置信息
75
+ })
76
+
77
+ if (sum === 0) {
78
+ this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
79
+ return
80
+ }
81
+ if (sum > 1) {
82
+ this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
83
+ return
84
+ }
85
+
86
+ this.selectdata = Object.assign({}, this.selectdata, jsonData)
87
+
88
+ // fields 字段填充值
89
+ for (const item of this.selectdata.fields) {
90
+ if (!item.value) {
91
+ item.value = null
92
+ }
93
+
94
+ if (!item.value && (item.default || item.default === 0) && item.type !== 'datepicker') {
95
+ if (item.eval) {
96
+ let user = Vue.user
97
+ // 将PC用户信息 替换成 APP的
98
+ item.value = eval(item.default.replace('this.$login.f', 'user'))
99
+ } else {
100
+ item.value = item.default
101
+ }
102
+ }
103
+
104
+ if (this.selectdata[item.field]) {
105
+ // 将json字符串格式化赋值给value
106
+ if (String(this.selectdata[item.field]).startsWith("{")) {
107
+ item.value = JSON.parse(this.selectdata[item.field])
108
+ } else {
109
+ item.value = this.selectdata[item.field]
110
+ }
111
+ }
112
+ if (this.selectdata[item.field] === 0) {
113
+ item.value = 0
114
+ }
115
+
116
+ // datepicker
117
+ if (item.type === 'datepicker' && !item.value && item.default) {
118
+ item.value = new Date().Format(`${item.format ? item.format : 'yyyy-MM-dd HH:mm:ss'}`)
119
+ }
120
+
121
+ // 如果配置类型为select,优先从参数列表获取options
122
+ if (item.type === 'select' || item.type === 'checkbox') {
123
+ if (item.param) {
124
+ let temp = this.$appdata.getParam(item.label)
125
+
126
+ if (temp && temp.length > 0) {
127
+ item.options = temp
128
+ }
129
+
130
+ if (item.paramLabel) {
131
+ temp = this.$appdata.getParam(item.paramLabel)
132
+ if (temp && temp.length > 0) {
133
+ item.options = temp
134
+ }
135
+ }
136
+ }
137
+
138
+ if (item.ready) {
139
+ item.options = await this[item.ready]()
140
+ }
141
+ }
142
+
143
+
144
+ if (item.type === 'checkbox') {
145
+ if (this.selectdata[item.field]) {
146
+ item.value = JSON.parse(this.selectdata[item.field])
147
+ } else {
148
+ item.value = []
149
+ }
150
+ }
151
+ }
152
+
153
+ // 控制组件
154
+ if (this.selectdata.components) {
155
+ this.selectdata.components.forEach(item => {
156
+ if (!item.mark) {
157
+ item.mark = 0
158
+ }
159
+ })
160
+ }
161
+
162
+ // 初始化onetomany
163
+ if (this.selectdata.onetomany) {
164
+ for (const item of this.selectdata.onetomany) {
165
+ let res = null
166
+ if (item.queryEvent) {
167
+ res = this[item.queryEvent]()
168
+ } else {
169
+ let http = new HttpResetClass()
170
+ let data = {
171
+ tablename: item.tables[0],
172
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
173
+ }
174
+ res = await http.load(
175
+ 'POST',
176
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`,
177
+ // `rs/sql/singleTable`,
178
+ {data: data},
179
+ {resolveMsg: null, rejectMsg: 'onetomany查询失败'}
180
+ )
181
+ }
182
+
183
+ item.rows = res.data
184
+
185
+ // 初始化onetomany中的fields
186
+ for (const field of item.fields) {
187
+ if (!field.value) {
188
+ if (field.value !== 0) {
189
+ field.value = null
190
+ }
191
+ }
192
+
193
+ if (field.default || field.default === 0) {
194
+ field.value = field.default
195
+ }
196
+
197
+ // datepicker
198
+ if (field.type === 'datepicker' && !field.value && field.default) {
199
+ field.value = new Date().Format(`${field.format ? field.format : 'yyyy-MM-dd HH:mm:ss'}`)
200
+ }
201
+
202
+ if (field.type === 'select') {
203
+
204
+ if (field.param) {
205
+ let temp = this.$appdata.getParam(field.label)
206
+
207
+ if (temp && temp.length > 0) {
208
+ field.options = temp
209
+ }
210
+
211
+ if (field.paramLabel) {
212
+ temp = this.$appdata.getParam(field.paramLabel)
213
+ if (temp && temp.length > 0) {
214
+ item.options = temp
215
+ }
216
+ }
217
+ }
218
+
219
+ }
220
+ }
221
+ }
222
+ }
223
+
224
+ // 初始化 buttons_fields
225
+ for (const item of this.selectdata.buttons) {
226
+ if (item.button_name === '下发') {
227
+ let data = {
228
+ source: item.source,
229
+ userid: Vue.user.id
230
+ // userid: '51953'
231
+ }
232
+ if (item.sourceMethod) {
233
+ data.source = this[item.sourceMethod]()
234
+ }
235
+ if (!data.source) {
236
+ this.$showMessage("请配置获取人员表达式")
237
+ return
238
+ }
239
+ let res = await this.$resetpost(
240
+ `${this.$androidUtil.getProxyUrl()}/rs/search`,
241
+ // `rs/search`,
242
+ {data: data},
243
+ {resolveMsg: null, rejectMsg: '下发人员查询失败!!!'}
244
+ )
245
+
246
+ let options = res.data.map(source => {
247
+ return {
248
+ "label": source.name,
249
+ "value": source.id
250
+ }
251
+ })
252
+
253
+ if (item.button_fields.length !== 1) {
254
+ this.$showMessage("下发有且只能有一个字段!!!")
255
+ return
256
+ }
257
+
258
+ item.button_fields[0].options = options
259
+ }
260
+ if (item.button_fields) {
261
+ item.button_fields.forEach(x => {
262
+ // 如果配置类型为select,优先从参数列表获取options
263
+ if (x.type === 'select') {
264
+
265
+ if (x.param) {
266
+ let temp = this.$appdata.getParam(x.label)
267
+
268
+ if (temp && temp.length > 0) {
269
+ x.options = temp
270
+ }
271
+
272
+ if (x.paramLabel) {
273
+ temp = this.$appdata.getParam(x.paramLabel)
274
+ if (temp && temp.length > 0) {
275
+ x.options = temp
276
+ }
277
+ }
278
+ }
279
+
280
+ }
281
+ })
282
+ }
283
+ }
284
+
285
+ // 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
286
+ let temp = JSON.parse(JSON.stringify(this.selectdata))
287
+
288
+ this.show_data = temp
289
+ this.$nextTick(() => {
290
+ this.showview = true
291
+ })
292
+ },
293
+ // 金额转大写
294
+ smalltoBIG(n) {
295
+ let fraction = ['角', '分'];
296
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
297
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
298
+ let head = n < 0 ? '欠' : '';
299
+ n = Math.abs(n);
300
+
301
+ let s = '';
302
+
303
+ for (var i = 0; i < fraction.length; i++) {
304
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
305
+ }
306
+ s = s || '整';
307
+ n = Math.floor(n);
308
+
309
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
310
+ let p = '';
311
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
312
+ p = digit[n % 10] + unit[1][j] + p;
313
+ n = Math.floor(n / 10);
314
+ }
315
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
316
+ }
317
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
318
+ },
319
+ getLableValue(label) {
320
+ for (const item of this.show_data.fields) {
321
+ if (item.label === label && item.type !== 'number') {
322
+ return item.value || ''
323
+ }
324
+ if (item.label === label && item.type === 'number') {
325
+ return item.value || 0
326
+ }
327
+ }
328
+ },
329
+ getLableOptions(label) {
330
+ for (const item of this.show_data.fields) {
331
+ if (item.label === label) {
332
+ return item.options
333
+ }
334
+ }
335
+ },
336
+ setLabelValue(label, value) {
337
+ for (const item of this.show_data.fields) {
338
+ if (item.label === label) {
339
+ item.value = value
340
+ this.show_data[item.field] = value
341
+ }
342
+ }
343
+ },
344
+ setLabelOptions(label, options) {
345
+ for (const item of this.show_data.fields) {
346
+ if (item.label === label) {
347
+ item.options = options
348
+ }
349
+ }
350
+ },
351
+ async checkDuplicate(index) {
352
+ let http = new HttpResetClass()
353
+ let data = {
354
+ tablename: 't_apply',
355
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
356
+ }
357
+ let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {
358
+ resolveMsg: null,
359
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
360
+ })
361
+ if (res.data.length > 0) {
362
+ this.show_data.fields[index].value = null
363
+ this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
364
+ }
365
+ },
366
+ async breakControl () {
367
+ if (this.show_data.id) {
368
+ let data = {
369
+ condition: `u.id = ${this.show_data.id}`,
370
+ data: {
371
+ id: Vue.user.id,
372
+ orgid: Vue.user.orgid
373
+ // id: '51953',
374
+ // orgid: '10101'
375
+ }
376
+ }
377
+ let res = await this.$resetpost(
378
+ `${this.$androidUtil.getProxyUrl()}/rs/sql/checkuser`,
379
+ // `rs/sql/checkuser`,
380
+ {data: data},
381
+ {resolveMsg: null, rejectMsg: '数据更新失败,请手查询更新!!!'}
382
+ )
383
+
384
+ this.selectdata = res.data[0]
385
+ } else {
386
+ this.selectdata = servicedata
387
+ }
388
+
389
+ this.refurbish()
390
+ }
391
+ },
392
+ events: {
393
+ // ===========================================
394
+ 'breakControl' () {
395
+ this.breakControl()
396
+ },
397
+ // 检查重复
398
+ 'checkRepeat' (index) {
399
+ this.checkDuplicate(index)
400
+ },
401
+ async 'button'() {
402
+ if (this.show_data.button.before) {
403
+ await this[this.show_data.button.before]()
404
+ }
405
+ // 点击重置按钮就重置数据
406
+ if (this.show_data.button.button_name === '重置') {
407
+ this.$dispatch('breakControl', this.selectdata)
408
+ return
409
+ }
410
+
411
+ this.show_data.user = Vue.user
412
+ // 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":[]}
413
+ this.show_data.start_activity = this.json_datas.start_activity
414
+ this.show_data.xmlfilename = this.json_datas.workflow_xmlfilename
415
+
416
+ let res = await this.$resetpost(
417
+ // `rs/logic/ApplyProductService`,
418
+ `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyProductService`,
419
+ {data: this.show_data},
420
+ {resolveMsg: null, rejectMsg: '数据保存失败'}
421
+ )
422
+
423
+ if (this.show_data.button.after) {
424
+ this[this.show_data.button.after]()
425
+ }
426
+ // 返回上层
427
+ this.$dispatch('confirm')
428
+ },
429
+ // 失去焦点出触发事件
430
+ 'onchange' (index) {
431
+ if (this.show_data.defname === '报装申请') {
432
+ if (
433
+ this.show_data.fields[index].label === '街道' ||
434
+ this.show_data.fields[index].label === '小区' ||
435
+ this.show_data.fields[index].label === '楼号(乡/镇)' ||
436
+ this.show_data.fields[index].label === '单元(村)' ||
437
+ this.show_data.fields[index].label === '楼层(组)' ||
438
+ this.show_data.fields[index].label === '门牌号(号)'
439
+ ) {
440
+
441
+ let f_street = this.getLableValue('街道')
442
+ let f_residential_area = this.getLableValue('小区')
443
+ let f_building = this.getLableValue('楼号(乡/镇)')
444
+ let f_building_suffix = f_building ? this.config.f_building_suffix : ''
445
+ let f_unit = this.getLableValue('单元(村)')
446
+ let f_unit_suffix = f_unit ? this.config.f_unit_suffix : ''
447
+ let f_floor = this.getLableValue('楼层(组)')
448
+ let f_floor_suffix = f_floor ? this.config.f_floor_suffix : ''
449
+ let f_room = this.getLableValue('门牌号(号)')
450
+ let f_room_suffix = f_room ? this.config.f_room_suffix : ''
451
+
452
+ let f_address = null
453
+
454
+ let f_address_type = this.show_data.f_address_type
455
+ if (f_address_type === '民用城区') {
456
+ 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
457
+ }
458
+ if (f_address_type === '民用农村') {
459
+ f_address = f_building + f_unit + f_floor + f_room
460
+ }
461
+ if (f_address_type === '特殊城区') {
462
+ f_address = f_street + f_residential_area
463
+ }
464
+ this.setLabelValue("地址", f_address)
465
+ }
466
+ }
467
+ },
468
+ 'onblur' (index) {},
469
+ 'oninput' (index) {},
470
+ 'initializtionView' () {},
471
+ async 'onchangeModal' (index, fieldIndex) {
472
+ },
473
+ async 'onblurModal' (index, fieldIndex) {
474
+
475
+ },
476
+ async 'oninputModal' (index, fieldIndex) {
477
+
478
+ },
479
+ async 'onetomanydelete' (index, rowIndex) {
480
+
481
+ let http = new HttpResetClass()
482
+
483
+ let res = await http.load(
484
+ 'DELETE',
485
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}/${this.show_data.onetomany[index].rows[rowIndex].id}`,
486
+ null,
487
+ {resolveMsg: null, rejectMsg: '删除失败!!!'}
488
+ )
489
+ res = await this.$resetpost(
490
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
491
+ this.show_data
492
+ )
493
+ this.breakControl()
494
+ },
495
+ async 'onetomanyupdate' (index, rowIndex) {
496
+ let data = this.show_data.onetomany[index].rows[rowIndex]
497
+
498
+ this.show_data.onetomany[index].fields.forEach(item => {
499
+ data[item.field] = item.value
500
+ })
501
+ let res = await this.$resetpost(
502
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
503
+ data
504
+ )
505
+ res = await this.$resetpost(
506
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
507
+ this.show_data
508
+ )
509
+ this.breakControl()
510
+ },
511
+ async 'onetomanyadd' (index) {
512
+ let data = {
513
+ f_process_id : this.show_data.f_process_id,
514
+ f_operator_id: Vue.user.id,
515
+ f_operator: Vue.user.name,
516
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
517
+ f_orgid: Vue.user.orgid,
518
+ f_orgname: Vue.user.orgs
519
+ }
520
+ this.show_data.onetomany[index].fields.forEach(item => {
521
+ data[item.field] = item.value
522
+ })
523
+ let res = await this.$resetpost(
524
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
525
+ data
526
+ )
527
+ res = await this.$resetpost(
528
+ `${this.$androidUtil.getProxyUrl()}/rs/entity/t_apply`,
529
+ this.show_data
530
+ )
531
+ this.breakControl()
532
+ },
533
+ 'onbutchange' (index) {
534
+
535
+ },
536
+ 'onbutblur' (index) {
537
+
538
+ },
539
+ 'onbutinput' (index) {
540
+
541
+ }
542
+ },
543
+ watch: {
544
+ }
545
+ }
546
+ </script>
547
+ <style scoped>
548
+ </style>