apply-clients 3.2.32 → 3.2.37
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.
- package/package.json +1 -1
- package/src/AndroidApp.vue +26 -26
- package/src/App.vue +20 -20
- package/src/apply.js +67 -67
- package/src/applyAndroid.js +24 -24
- package/src/components/Util.js +359 -359
- package/src/components/app_apply/AppOnetomany.vue +90 -90
- package/src/components/app_apply/AppServiceView.vue +664 -664
- package/src/components/app_apply/AppTakePic.vue +112 -112
- package/src/components/app_apply/Process/AppExplorationUser.vue +310 -310
- package/src/components/app_apply/Process/AppServiceControl.vue +409 -409
- package/src/components/app_apply/Process/Processes/AppInstallationDetails.vue +456 -456
- package/src/components/app_apply/Supervisory/AppProcessSupervisory.vue +300 -300
- package/src/components/app_apply/Supervisory/AppSupervisoryCart.vue +121 -121
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +251 -251
- package/src/components/product/ApplyCharge/ApplyChargeReport.vue +107 -107
- package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +30 -30
- package/src/components/product/Function/InstallFunction.vue +147 -147
- package/src/components/product/Function/InstallInfoSelect.vue +281 -281
- package/src/components/product/Function/Service/FunctionServiceControl.vue +245 -245
- package/src/components/product/Function/StopApplyCrrdList.vue +176 -176
- package/src/components/product/Function/functions/StopInstall.vue +106 -106
- package/src/components/product/Process/ExplorationSelect.vue +346 -346
- package/src/components/product/Process/ExplorationUser.vue +134 -134
- package/src/components/product/Process/Processes/InstallationDetails.vue +243 -233
- package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +201 -201
- package/src/components/product/Process/Processes/chargeManagement.vue +555 -555
- package/src/components/product/Process/Processes/printCharge.vue +133 -133
- package/src/components/product/Process/Processes/supplementalAgreement.vue +297 -297
- package/src/components/product/Process/ShowBackReason.vue +32 -32
- package/src/components/product/ServiceView.vue +759 -759
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +199 -199
- package/src/components/product/Supervisory/SupervisoryControl.vue +119 -119
- package/src/components/product/Supervisory/SupervisoryList.vue +208 -208
- package/src/components/product/Supervisory/SupervisoryhCart.vue +103 -103
- package/src/components/product/VueUtils/ApplyUpload.vue +261 -261
- package/src/main.js +23 -23
|
@@ -1,409 +1,409 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="col-sm-12 col-xs-12" style="padding: 10px">
|
|
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 '../../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 xmldata = {
|
|
52
|
-
data: Vue.user,
|
|
53
|
-
// data: {"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":"city-manage","hasright":true,"resourcetype":"function","parentid":"82","f_parentname":"档案管理","children":[],"selfid":"1552","name":"街道管理","templatename":"functionedit","id":"1551","position":"3","fullname":"资源管理.功能模块.客服系统.档案管理.街道管理","fullid":"3.17.21.82.1551","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"档案管理","link":"area-manage","hasright":true,"resourcetype":"function","parentid":"82","f_parentname":"档案管理","children":[],"selfid":"149","name":"小区管理","templatename":"functionedit","id":"148","position":"4","fullname":"资源管理.功能模块.客服系统.档案管理.小区管理","fullid":"3.17.21.82.148","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"档案管理","link":"address-manage","hasright":true,"resourcetype":"function","parentid":"82","f_parentname":"档案管理","children":[],"selfid":"155","name":"地址管理","templatename":"functionedit","id":"154","position":"5","fullname":"资源管理.功能模块.客服系统.档案管理.地址管理","fullid":"3.17.21.82.154","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"档案管理","link":"file-user-files","hasright":true,"resourcetype":"function","parentid":"82","f_parentname":"档案管理","children":[],"selfid":"83661","name":"档案信息","templatename":"functionedit","id":"83660","position":"10","fullname":"资源管理.功能模块.客服系统.档案管理.档案信息","fullid":"3.17.21.82.83660","tablename":"t_function","showmodel":"[\"右边\"]"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"档案管理","link":"file-user-files-new","hasright":true,"resourcetype":"function","parentid":"82","f_parentname":"档案管理","children":[],"selfid":"397738","name":"预备户建档","templatename":"functionedit","id":"397737","position":"12","fullname":"资源管理.功能模块.客服系统.档案管理.预备户建档","fullid":"3.17.21.82.397737","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"user-files","hasright":true,"resourcetype":"function","parentid":"82","children":[],"selfid":"3","name":"用户档案","templatename":"functionedit","id":"2","position":"17","fullname":"资源管理.功能模块.客服系统.档案管理.用户档案","fullid":"3.17.21.82.2","tablename":"t_function"}],"selfid":"83","name":"档案管理","templatename":"functionedit","id":"82","position":"2","fullname":"资源管理.功能模块.客服系统.档案管理","fullid":"3.17.21.82","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"客服系统","icon":"/images/lefticon/售气收费.png","hasright":true,"resourcetype":"function","parentid":"21","f_parentname":"客服系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"售气收费","link":"charge-manage","hasright":true,"resourcetype":"function","parentid":"88","f_parentname":"售气收费","children":[],"selfid":"173","name":"收费(综合)","templatename":"functionedit","id":"172","position":"1","fullname":"资源管理.功能模块.客服系统.售气收费.收费(综合)","fullid":"3.17.21.88.172","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"售气收费","link":"charge-manage-new","hasright":true,"resourcetype":"function","parentid":"88","f_parentname":"售气收费","children":[],"selfid":"533134","name":"新版收费","templatename":"functionedit","id":"533133","position":"2","fullname":"资源管理.功能模块.客服系统.售气收费.新版收费","fullid":"3.17.21.88.533133","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"售气收费","link":"insurance-manage","hasright":true,"resourcetype":"function","parentid":"88","f_parentname":"售气收费","children":[],"selfid":"586351","name":"保险收费","templatename":"functionedit","id":"586350","position":"3","fullname":"资源管理.功能模块.客服系统.售气收费.保险收费","fullid":"3.17.21.88.586350","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"售气收费","link":"meter-charge","hasright":true,"resourcetype":"function","parentid":"88","children":[],"selfid":"255341","name":"收费","templatename":"functionedit","id":"255340","position":"4","fullname":"资源管理.功能模块.客服系统.售气收费.收费","fullid":"3.17.21.88.255340","tablename":"t_function"}],"selfid":"89","name":"售气收费","templatename":"functionedit","id":"88","position":"3","fullname":"资源管理.功能模块.客服系统.售气收费","fullid":"3.17.21.88","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"客服系统","icon":"/images/lefticon/综合查询.png","hasright":false,"resourcetype":"function","parentid":"21","f_parentname":"客服系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"综合业务","link":"gas-brand-manage","hasright":true,"resourcetype":"function","parentid":"94","f_parentname":"综合业务","children":[],"selfid":"185","name":"气表管理","templatename":"functionedit","id":"184","position":"2","fullname":"资源管理.功能模块.客服系统.综合业务.气表管理","fullid":"3.17.21.94.184","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"综合业务","link":"param-manage","hasright":true,"resourcetype":"function","parentid":"94","f_parentname":"综合业务","children":[],"selfid":"191","name":"参数管理","templatename":"functionedit","id":"190","position":"3","fullname":"资源管理.功能模块.客服系统.综合业务.参数管理","fullid":"3.17.21.94.190","tablename":"t_function","showmodel":"右边"}],"selfid":"95","name":"综合业务","templatename":"functionedit","id":"94","position":"4","fullname":"资源管理.功能模块.客服系统.综合业务","fullid":"3.17.21.94","tablename":"t_function","showmodel":"右边"},{"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":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"报建业务","link":"apply-charge-search","hasright":true,"resourcetype":"function","parentid":"195729","f_parentname":"报建业务","children":[],"selfid":"319047","name":"收费明细","templatename":"functionedit","id":"319046","position":"5","fullname":"资源管理.功能模块.客服系统.报建业务.收费明细","fullid":"3.17.21.195729.319046","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"报建业务","link":"apply-charge-report","hasright":true,"resourcetype":"function","parentid":"195729","f_parentname":"报建业务","children":[],"selfid":"198758","name":"收费报表","templatename":"functionedit","id":"198757","position":"6","fullname":"资源管理.功能模块.客服系统.报建业务.收费报表","fullid":"3.17.21.195729.198757","tablename":"t_function"}],"selfid":"195730","name":"报建业务","templatename":"functionedit","id":"195729","position":"21","fullname":"资源管理.功能模块.客服系统.报建业务","fullid":"3.17.21.195729","tablename":"t_function","showmodel":"右边"}],"qrcode":"/rs/user/getQRcode?QRCODE=8888","rolesnames":"营业厅报装,市场部报装,工程部报装,财务部报装,客服中心报装","roles":"99232,174614,174620,174626,174632","f_sex":"男","f_icon":"tree_user","fullnames":"武安明星.客服中心.bjcs","dir":"mingxing","accesstime":"1626420492744","userid":"8888","parentid":"174608","fullids":"559465.174608.17713.","number":"55665","selfid":"17714","templatename":"useredit","logindate":"2021-03-09 11:17:36.727","id":"17713","state":"在职","tablename":"t_user","deptype":"部门","depids":"174608","loginid":"11","imgid":null,"initpassword":"1","rolestr":"营业厅报装,市场部报装,工程部报装,财务部报装,客服中心报装","deps":"客服中心","loginnum":"0","resourcetype":"user","orgid":"559465","f_department_name":"客服中心","ename":"bjcs","deleted":"false","entitytype":"t_user","loginip":"192.168.120.141","name":"bjcs","position":"1","orgs":"武安明星","f_role_name":"营业厅报装 市场部报装 工程部报装 财务部报装 客服中心报装 ","f_allArea":[],"f_gasman":[],"lics":[]},
|
|
54
|
-
workname: this.selectdata.processname
|
|
55
|
-
}
|
|
56
|
-
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`, {data: xmldata}, {resolveMsg: null, rejectMsg: null})
|
|
57
|
-
// let res = await http.load('POST', `rs/logic/ApplyGetConfigs`, {data: xmldata}, {resolveMsg: null, rejectMsg: null})
|
|
58
|
-
|
|
59
|
-
if (res.data.code && res.data.code === 200) {
|
|
60
|
-
this.json_datas = res.data.workflow_vue
|
|
61
|
-
} else {
|
|
62
|
-
this.$showMessage('获取报建配置失败,原因:' + res.data.msg)
|
|
63
|
-
return
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
let sum = 0
|
|
67
|
-
let jsonData = {}
|
|
68
|
-
if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
|
|
69
|
-
this.$showMessage("网络故障,请刷新页面")
|
|
70
|
-
return
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
for (let i = 0; i < this.json_datas.activitys.length; i++) {
|
|
74
|
-
if (this.selectdata.defname === this.json_datas.activitys[i].title) {
|
|
75
|
-
jsonData = this.json_datas.activitys[i] // 拿到当前节点的json配置信息
|
|
76
|
-
sum++ // 节点名一样的个数
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (sum === 1) {
|
|
80
|
-
this.data = null
|
|
81
|
-
this.data = jsonData
|
|
82
|
-
// selectdata 填充 data
|
|
83
|
-
this.data = Object.assign({}, this.data, this.selectdata)
|
|
84
|
-
this.initializeJSON()
|
|
85
|
-
} else if (sum === 0) {
|
|
86
|
-
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
87
|
-
} else {
|
|
88
|
-
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
// json配置数据处理
|
|
92
|
-
async initializeJSON() {
|
|
93
|
-
// 有默认值,value就给默认值,没有就是null
|
|
94
|
-
this.data.fields.forEach(item => {
|
|
95
|
-
if (!item.value) {
|
|
96
|
-
if (item.value === 0) {
|
|
97
|
-
item.value = 0
|
|
98
|
-
} else {
|
|
99
|
-
item.value = null
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (item.default || item.default === 0) {
|
|
103
|
-
item.value = item.default
|
|
104
|
-
}
|
|
105
|
-
if (this.selectdata[item.field]) {
|
|
106
|
-
// 将json字符串格式化赋值给value
|
|
107
|
-
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
108
|
-
item.value = JSON.parse(this.selectdata[item.field])
|
|
109
|
-
this.selectdata[item.field] = JSON.parse(this.selectdata[item.field])
|
|
110
|
-
} else {
|
|
111
|
-
item.value = this.selectdata[item.field]
|
|
112
|
-
}
|
|
113
|
-
} else {
|
|
114
|
-
if (this.selectdata[item.field] === 0) {
|
|
115
|
-
item.value = 0
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// datepicker 没有值给当时值
|
|
120
|
-
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
121
|
-
item.value = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
// 如果配置类型为select,优先从参数列表获取options
|
|
125
|
-
if (item.type === 'select') {
|
|
126
|
-
let temp = null
|
|
127
|
-
|
|
128
|
-
temp = this.$appdata.getParam(item.label)
|
|
129
|
-
|
|
130
|
-
if (temp && temp.length > 0 && item.label) {
|
|
131
|
-
item.options = temp
|
|
132
|
-
} else {
|
|
133
|
-
if (item.paramLabel) {
|
|
134
|
-
temp = this.$appdata.getParam(item.paramLabel)
|
|
135
|
-
if (temp && temp.length > 0) {
|
|
136
|
-
item.options = temp
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
// 控制组件
|
|
144
|
-
if (this.data.components) {
|
|
145
|
-
this.data.components.forEach(item => {
|
|
146
|
-
item.mark = 0
|
|
147
|
-
})
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// 初始化 buttons_fields
|
|
151
|
-
for (let i = 0; i < this.data.buttons.length; i++) {
|
|
152
|
-
// 下发按钮相关配置
|
|
153
|
-
if (this.data.buttons[i].button_name === '下发') {
|
|
154
|
-
if (this.data.buttons[i].button_fields && this.data.buttons[i].button_fields.length === 1) {
|
|
155
|
-
if (this.data.buttons[i].source){
|
|
156
|
-
let http = new HttpResetClass()
|
|
157
|
-
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {
|
|
158
|
-
source: this.data.buttons[i].source,
|
|
159
|
-
userid: Vue.user.id
|
|
160
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
161
|
-
|
|
162
|
-
let options = []
|
|
163
|
-
for (let i = 0; i < res.data.length; i++) {
|
|
164
|
-
options.push(
|
|
165
|
-
{
|
|
166
|
-
"label": res.data[i].name,
|
|
167
|
-
"value": res.data[i].id
|
|
168
|
-
}
|
|
169
|
-
)
|
|
170
|
-
}
|
|
171
|
-
this.data.buttons[i].button_fields[0]['options'] = options
|
|
172
|
-
} else {
|
|
173
|
-
this.$showMessage("请配置获取人员表达式")
|
|
174
|
-
}
|
|
175
|
-
} else {
|
|
176
|
-
this.$showMessage("下发按钮必须满足 当且仅当一个字段")
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
if (this.data.buttons[i].button_fields) {
|
|
180
|
-
this.data.buttons[i].button_fields.forEach(item => {
|
|
181
|
-
// 如果配置类型为select,优先从参数列表获取options
|
|
182
|
-
if (item.type === 'select' && this.$appdata.getParam(item.label)) {
|
|
183
|
-
item.options = this.$appdata.getParam(item.label)
|
|
184
|
-
}
|
|
185
|
-
})
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// onetomany 数据获取
|
|
190
|
-
if (this.data.onetomany) {
|
|
191
|
-
for (let index = 0; index < this.data.onetomany.length; index++) {
|
|
192
|
-
let res = null
|
|
193
|
-
if (!this.data.onetomany[index].queryEvent || this.data.onetomany[index].queryEvent === 'default'){
|
|
194
|
-
let http = new HttpResetClass()
|
|
195
|
-
let data = {
|
|
196
|
-
tablename: this.data.onetomany[index].tables[0],
|
|
197
|
-
condition: `${this.data.onetomany[index].condition ? this.data.onetomany[index].condition : '1=1'} and f_process_id = '${this.selectdata.f_process_id}'`
|
|
198
|
-
}
|
|
199
|
-
res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {
|
|
200
|
-
resolveMsg: null,
|
|
201
|
-
rejectMsg: 'onetomany查询失败'
|
|
202
|
-
})
|
|
203
|
-
} else {
|
|
204
|
-
res = await this[this.data.onetomany[index].queryEvent]()
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// 初始化 onetomany
|
|
208
|
-
this.data.onetomany[index].rows = res.data
|
|
209
|
-
|
|
210
|
-
// 初始化onetomany中的fields
|
|
211
|
-
for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
|
|
212
|
-
if (!this.data.onetomany[index].fields[j].value) {
|
|
213
|
-
if (this.data.onetomany[index].fields[j].value === 0) {
|
|
214
|
-
this.data.onetomany[index].fields[j].value = 0
|
|
215
|
-
} else {
|
|
216
|
-
this.data.onetomany[index].fields[j].value = null
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
if (this.data.onetomany[index].fields[j].default || this.data.onetomany[index].fields[j].default === 0) {
|
|
220
|
-
this.data.onetomany[index].fields[j].value = this.data.onetomany[index].fields[j].default
|
|
221
|
-
}
|
|
222
|
-
// 如果配置类型为select,优先从参数列表获取options
|
|
223
|
-
if (this.data.onetomany[index].fields[j].type === 'select') {
|
|
224
|
-
let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
|
|
225
|
-
if (temp && temp.length > 0) {
|
|
226
|
-
this.data.onetomany[index].fields[j].options = temp
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
234
|
-
let temp = JSON.parse(JSON.stringify(this.data))
|
|
235
|
-
|
|
236
|
-
this.show_data = temp
|
|
237
|
-
this.$nextTick(() => {
|
|
238
|
-
this.showview = true
|
|
239
|
-
})
|
|
240
|
-
},
|
|
241
|
-
async buttonBefore(model) {
|
|
242
|
-
return model
|
|
243
|
-
},
|
|
244
|
-
async checkDuplicate(index) {
|
|
245
|
-
let http = new HttpResetClass()
|
|
246
|
-
let data = {
|
|
247
|
-
tablename: 't_apply',
|
|
248
|
-
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
249
|
-
}
|
|
250
|
-
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {
|
|
251
|
-
resolveMsg: null,
|
|
252
|
-
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
253
|
-
})
|
|
254
|
-
if (res.data.length > 0) {
|
|
255
|
-
this.show_data.fields[index].value = null
|
|
256
|
-
throw `${this.show_data.fields[index].label}已存在!!!`
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
events: {
|
|
261
|
-
async 'initializtionView'() {
|
|
262
|
-
},
|
|
263
|
-
// 失去焦点出触发事件
|
|
264
|
-
async 'onchange'(index) {
|
|
265
|
-
// 号码检测
|
|
266
|
-
if (this.show_data.fields[index].label === '电话号码') {
|
|
267
|
-
let phone = this.show_data.fields[index].value
|
|
268
|
-
// 电话号码效验
|
|
269
|
-
if (!(/^1[3456789]\d{9}$/.test(phone))) {
|
|
270
|
-
this.show_data.fields[index].value = ""
|
|
271
|
-
this.$showMessage("电话号码格式不正确,请重新输入!!!")
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
// 获取view层button事件/
|
|
276
|
-
async 'button'(model) {
|
|
277
|
-
// 修改提交数据
|
|
278
|
-
model = Object.assign({}, this.selectdata, model)
|
|
279
|
-
// 点击重置按钮就重置数据
|
|
280
|
-
if (model.button.button_name === '重置') {
|
|
281
|
-
this.breakControl()
|
|
282
|
-
return
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// 提交前置
|
|
286
|
-
try {
|
|
287
|
-
model = await this.buttonBefore(model)
|
|
288
|
-
} catch (e) {
|
|
289
|
-
this.$showMessage(e)
|
|
290
|
-
return
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
let http = new HttpResetClass()
|
|
294
|
-
let requestData = {
|
|
295
|
-
tables: this.data.tables,
|
|
296
|
-
start_activity: this.json_datas.start_activity,
|
|
297
|
-
model: model,
|
|
298
|
-
loginUser: Vue.user,
|
|
299
|
-
// 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":[]},
|
|
300
|
-
workflow_xmlfilename: this.json_datas.workflow_xmlfilename
|
|
301
|
-
}
|
|
302
|
-
// 下发,提交,保存,退回通用业务后台处理logic
|
|
303
|
-
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyProductService`, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
|
|
304
|
-
// let res = await http.load('POST', `rs/logic/ApplyProductService`, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
|
|
305
|
-
|
|
306
|
-
if (res.data.code === 200) {
|
|
307
|
-
this.$dispatch('confirm')
|
|
308
|
-
} else {
|
|
309
|
-
if (res.data.msg) {
|
|
310
|
-
this.$showMessage(res.data.msg)
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
|
|
315
|
-
// onetomany模态框默认监听监听事件
|
|
316
|
-
async 'onetomanydelete'(i, j) {
|
|
317
|
-
console.log('默认删除')
|
|
318
|
-
let http = new HttpResetClass()
|
|
319
|
-
let data = {
|
|
320
|
-
table: this.show_data.onetomany[i].tables[0],
|
|
321
|
-
row: this.show_data.onetomany[i].rows[j]
|
|
322
|
-
}
|
|
323
|
-
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/onetomanyDefaultDeleteEvent`, {data: data}, {
|
|
324
|
-
resolveMsg: null,
|
|
325
|
-
rejectMsg: '删除失败'
|
|
326
|
-
})
|
|
327
|
-
|
|
328
|
-
if (res.data <= 0){
|
|
329
|
-
this.$showMessage('删除失败')
|
|
330
|
-
return
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
this.breakControl()
|
|
334
|
-
},
|
|
335
|
-
async 'onetomanyadd'(index) {
|
|
336
|
-
|
|
337
|
-
let data = {
|
|
338
|
-
f_process_id : this.show_data.f_process_id
|
|
339
|
-
}
|
|
340
|
-
this.show_data.onetomany[index].fields.forEach(item => {
|
|
341
|
-
data[item.field] = item.value
|
|
342
|
-
})
|
|
343
|
-
let res = await this.$resetpost(
|
|
344
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
345
|
-
data
|
|
346
|
-
)
|
|
347
|
-
|
|
348
|
-
this.breakControl()
|
|
349
|
-
},
|
|
350
|
-
async 'onetomanyupdate'(i, j) {
|
|
351
|
-
let onetomany = this.show_data.onetomany[i]
|
|
352
|
-
let data = onetomany.rows[j]
|
|
353
|
-
|
|
354
|
-
onetomany.fields.forEach(item => {
|
|
355
|
-
data[item.field] = item.value
|
|
356
|
-
})
|
|
357
|
-
let res = await this.$resetpost(
|
|
358
|
-
`${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[i].tables[0]}`,
|
|
359
|
-
data
|
|
360
|
-
)
|
|
361
|
-
|
|
362
|
-
this.breakControl()
|
|
363
|
-
},
|
|
364
|
-
// onetomany模态框监听事件
|
|
365
|
-
async 'onchange_modal'(index, i) {
|
|
366
|
-
},
|
|
367
|
-
async 'oninput_modal'(index, i) {
|
|
368
|
-
},
|
|
369
|
-
error_check(index) {
|
|
370
|
-
// 时间格式检测
|
|
371
|
-
if (this.show_data.fields[index].type === 'datepicker' && !isEmpty(this.show_data.fields[index].value)) {
|
|
372
|
-
|
|
373
|
-
let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
|
|
374
|
-
let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
|
|
375
|
-
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$/
|
|
376
|
-
if (this.show_data.fields[index].format) {
|
|
377
|
-
if (this.show_data.fields[index].format === 'yyyy-MM-dd') {
|
|
378
|
-
if (!dateReg.test(this.show_data.fields[index].value)) {
|
|
379
|
-
this.show_data.fields[index].value = ''
|
|
380
|
-
this.$showMessage(this.show_data.fields[index].label + '格式错误如:2021-01-01')
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
if (this.show_data.fields[index].format === 'HH:mm:ss') {
|
|
384
|
-
if (!timeReg.test(this.show_data.fields[index].value)) {
|
|
385
|
-
this.show_data.fields[index].value = ''
|
|
386
|
-
this.$showMessage(this.show_data.fields[index].label + '格式错误如:00:00:00')
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
if (this.show_data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
|
|
390
|
-
if (!datetimeReg.test(this.show_data.fields[index].value)) {
|
|
391
|
-
this.show_data.fields[index].value = ''
|
|
392
|
-
this.$showMessage(this.show_data.fields[index].label + '格式错误如:2021-01-01 00:00:00')
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
} else {
|
|
396
|
-
if (!dateReg.test(this.show_data.fields[index].value)) {
|
|
397
|
-
this.show_data.fields[index].value = ''
|
|
398
|
-
this.$showMessage(this.show_data.fields[index].label + '格式错误如:2021-01-01')
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
},
|
|
403
|
-
},
|
|
404
|
-
watch: {
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
</script>
|
|
408
|
-
<style scoped>
|
|
409
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="col-sm-12 col-xs-12" style="padding: 10px">
|
|
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 '../../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 xmldata = {
|
|
52
|
+
data: Vue.user,
|
|
53
|
+
// data: {"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":"city-manage","hasright":true,"resourcetype":"function","parentid":"82","f_parentname":"档案管理","children":[],"selfid":"1552","name":"街道管理","templatename":"functionedit","id":"1551","position":"3","fullname":"资源管理.功能模块.客服系统.档案管理.街道管理","fullid":"3.17.21.82.1551","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"档案管理","link":"area-manage","hasright":true,"resourcetype":"function","parentid":"82","f_parentname":"档案管理","children":[],"selfid":"149","name":"小区管理","templatename":"functionedit","id":"148","position":"4","fullname":"资源管理.功能模块.客服系统.档案管理.小区管理","fullid":"3.17.21.82.148","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"档案管理","link":"address-manage","hasright":true,"resourcetype":"function","parentid":"82","f_parentname":"档案管理","children":[],"selfid":"155","name":"地址管理","templatename":"functionedit","id":"154","position":"5","fullname":"资源管理.功能模块.客服系统.档案管理.地址管理","fullid":"3.17.21.82.154","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"档案管理","link":"file-user-files","hasright":true,"resourcetype":"function","parentid":"82","f_parentname":"档案管理","children":[],"selfid":"83661","name":"档案信息","templatename":"functionedit","id":"83660","position":"10","fullname":"资源管理.功能模块.客服系统.档案管理.档案信息","fullid":"3.17.21.82.83660","tablename":"t_function","showmodel":"[\"右边\"]"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"档案管理","link":"file-user-files-new","hasright":true,"resourcetype":"function","parentid":"82","f_parentname":"档案管理","children":[],"selfid":"397738","name":"预备户建档","templatename":"functionedit","id":"397737","position":"12","fullname":"资源管理.功能模块.客服系统.档案管理.预备户建档","fullid":"3.17.21.82.397737","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"档案管理","link":"user-files","hasright":true,"resourcetype":"function","parentid":"82","children":[],"selfid":"3","name":"用户档案","templatename":"functionedit","id":"2","position":"17","fullname":"资源管理.功能模块.客服系统.档案管理.用户档案","fullid":"3.17.21.82.2","tablename":"t_function"}],"selfid":"83","name":"档案管理","templatename":"functionedit","id":"82","position":"2","fullname":"资源管理.功能模块.客服系统.档案管理","fullid":"3.17.21.82","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"客服系统","icon":"/images/lefticon/售气收费.png","hasright":true,"resourcetype":"function","parentid":"21","f_parentname":"客服系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"售气收费","link":"charge-manage","hasright":true,"resourcetype":"function","parentid":"88","f_parentname":"售气收费","children":[],"selfid":"173","name":"收费(综合)","templatename":"functionedit","id":"172","position":"1","fullname":"资源管理.功能模块.客服系统.售气收费.收费(综合)","fullid":"3.17.21.88.172","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"售气收费","link":"charge-manage-new","hasright":true,"resourcetype":"function","parentid":"88","f_parentname":"售气收费","children":[],"selfid":"533134","name":"新版收费","templatename":"functionedit","id":"533133","position":"2","fullname":"资源管理.功能模块.客服系统.售气收费.新版收费","fullid":"3.17.21.88.533133","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"售气收费","link":"insurance-manage","hasright":true,"resourcetype":"function","parentid":"88","f_parentname":"售气收费","children":[],"selfid":"586351","name":"保险收费","templatename":"functionedit","id":"586350","position":"3","fullname":"资源管理.功能模块.客服系统.售气收费.保险收费","fullid":"3.17.21.88.586350","tablename":"t_function"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","parentname":"售气收费","link":"meter-charge","hasright":true,"resourcetype":"function","parentid":"88","children":[],"selfid":"255341","name":"收费","templatename":"functionedit","id":"255340","position":"4","fullname":"资源管理.功能模块.客服系统.售气收费.收费","fullid":"3.17.21.88.255340","tablename":"t_function"}],"selfid":"89","name":"售气收费","templatename":"functionedit","id":"88","position":"3","fullname":"资源管理.功能模块.客服系统.售气收费","fullid":"3.17.21.88","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"客服系统","icon":"/images/lefticon/综合查询.png","hasright":false,"resourcetype":"function","parentid":"21","f_parentname":"客服系统","children":[{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"综合业务","link":"gas-brand-manage","hasright":true,"resourcetype":"function","parentid":"94","f_parentname":"综合业务","children":[],"selfid":"185","name":"气表管理","templatename":"functionedit","id":"184","position":"2","fullname":"资源管理.功能模块.客服系统.综合业务.气表管理","fullid":"3.17.21.94.184","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"综合业务","link":"param-manage","hasright":true,"resourcetype":"function","parentid":"94","f_parentname":"综合业务","children":[],"selfid":"191","name":"参数管理","templatename":"functionedit","id":"190","position":"3","fullname":"资源管理.功能模块.客服系统.综合业务.参数管理","fullid":"3.17.21.94.190","tablename":"t_function","showmodel":"右边"}],"selfid":"95","name":"综合业务","templatename":"functionedit","id":"94","position":"4","fullname":"资源管理.功能模块.客服系统.综合业务","fullid":"3.17.21.94","tablename":"t_function","showmodel":"右边"},{"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":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"报建业务","link":"apply-charge-search","hasright":true,"resourcetype":"function","parentid":"195729","f_parentname":"报建业务","children":[],"selfid":"319047","name":"收费明细","templatename":"functionedit","id":"319046","position":"5","fullname":"资源管理.功能模块.客服系统.报建业务.收费明细","fullid":"3.17.21.195729.319046","tablename":"t_function","showmodel":"右边"},{"pagenames":"公共通讯录维护模板","processnames":"发邮件流程","loginid":"11","parentname":"报建业务","link":"apply-charge-report","hasright":true,"resourcetype":"function","parentid":"195729","f_parentname":"报建业务","children":[],"selfid":"198758","name":"收费报表","templatename":"functionedit","id":"198757","position":"6","fullname":"资源管理.功能模块.客服系统.报建业务.收费报表","fullid":"3.17.21.195729.198757","tablename":"t_function"}],"selfid":"195730","name":"报建业务","templatename":"functionedit","id":"195729","position":"21","fullname":"资源管理.功能模块.客服系统.报建业务","fullid":"3.17.21.195729","tablename":"t_function","showmodel":"右边"}],"qrcode":"/rs/user/getQRcode?QRCODE=8888","rolesnames":"营业厅报装,市场部报装,工程部报装,财务部报装,客服中心报装","roles":"99232,174614,174620,174626,174632","f_sex":"男","f_icon":"tree_user","fullnames":"武安明星.客服中心.bjcs","dir":"mingxing","accesstime":"1626420492744","userid":"8888","parentid":"174608","fullids":"559465.174608.17713.","number":"55665","selfid":"17714","templatename":"useredit","logindate":"2021-03-09 11:17:36.727","id":"17713","state":"在职","tablename":"t_user","deptype":"部门","depids":"174608","loginid":"11","imgid":null,"initpassword":"1","rolestr":"营业厅报装,市场部报装,工程部报装,财务部报装,客服中心报装","deps":"客服中心","loginnum":"0","resourcetype":"user","orgid":"559465","f_department_name":"客服中心","ename":"bjcs","deleted":"false","entitytype":"t_user","loginip":"192.168.120.141","name":"bjcs","position":"1","orgs":"武安明星","f_role_name":"营业厅报装 市场部报装 工程部报装 财务部报装 客服中心报装 ","f_allArea":[],"f_gasman":[],"lics":[]},
|
|
54
|
+
workname: this.selectdata.processname
|
|
55
|
+
}
|
|
56
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyGetConfigs`, {data: xmldata}, {resolveMsg: null, rejectMsg: null})
|
|
57
|
+
// let res = await http.load('POST', `rs/logic/ApplyGetConfigs`, {data: xmldata}, {resolveMsg: null, rejectMsg: null})
|
|
58
|
+
|
|
59
|
+
if (res.data.code && res.data.code === 200) {
|
|
60
|
+
this.json_datas = res.data.workflow_vue
|
|
61
|
+
} else {
|
|
62
|
+
this.$showMessage('获取报建配置失败,原因:' + res.data.msg)
|
|
63
|
+
return
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
let sum = 0
|
|
67
|
+
let jsonData = {}
|
|
68
|
+
if (!this.json_datas || !this.json_datas.activitys || this.json_datas.activitys.length === 0) {
|
|
69
|
+
this.$showMessage("网络故障,请刷新页面")
|
|
70
|
+
return
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
for (let i = 0; i < this.json_datas.activitys.length; i++) {
|
|
74
|
+
if (this.selectdata.defname === this.json_datas.activitys[i].title) {
|
|
75
|
+
jsonData = this.json_datas.activitys[i] // 拿到当前节点的json配置信息
|
|
76
|
+
sum++ // 节点名一样的个数
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (sum === 1) {
|
|
80
|
+
this.data = null
|
|
81
|
+
this.data = jsonData
|
|
82
|
+
// selectdata 填充 data
|
|
83
|
+
this.data = Object.assign({}, this.data, this.selectdata)
|
|
84
|
+
this.initializeJSON()
|
|
85
|
+
} else if (sum === 0) {
|
|
86
|
+
this.$showMessage(`没有在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置`)
|
|
87
|
+
} else {
|
|
88
|
+
this.$showMessage(`在JSON配置文件中找到活动名为:(${this.selectdata.defname})的节点配置:${sum}个`)
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
// json配置数据处理
|
|
92
|
+
async initializeJSON() {
|
|
93
|
+
// 有默认值,value就给默认值,没有就是null
|
|
94
|
+
this.data.fields.forEach(item => {
|
|
95
|
+
if (!item.value) {
|
|
96
|
+
if (item.value === 0) {
|
|
97
|
+
item.value = 0
|
|
98
|
+
} else {
|
|
99
|
+
item.value = null
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (item.default || item.default === 0) {
|
|
103
|
+
item.value = item.default
|
|
104
|
+
}
|
|
105
|
+
if (this.selectdata[item.field]) {
|
|
106
|
+
// 将json字符串格式化赋值给value
|
|
107
|
+
if (String(this.selectdata[item.field]).startsWith("{")) {
|
|
108
|
+
item.value = JSON.parse(this.selectdata[item.field])
|
|
109
|
+
this.selectdata[item.field] = JSON.parse(this.selectdata[item.field])
|
|
110
|
+
} else {
|
|
111
|
+
item.value = this.selectdata[item.field]
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
if (this.selectdata[item.field] === 0) {
|
|
115
|
+
item.value = 0
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// datepicker 没有值给当时值
|
|
120
|
+
if (item.type === 'datepicker' && !item.value && item.default) {
|
|
121
|
+
item.value = new Date().Format('yyyy-MM-dd HH:mm:ss')
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
125
|
+
if (item.type === 'select') {
|
|
126
|
+
let temp = null
|
|
127
|
+
|
|
128
|
+
temp = this.$appdata.getParam(item.label)
|
|
129
|
+
|
|
130
|
+
if (temp && temp.length > 0 && item.label) {
|
|
131
|
+
item.options = temp
|
|
132
|
+
} else {
|
|
133
|
+
if (item.paramLabel) {
|
|
134
|
+
temp = this.$appdata.getParam(item.paramLabel)
|
|
135
|
+
if (temp && temp.length > 0) {
|
|
136
|
+
item.options = temp
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
// 控制组件
|
|
144
|
+
if (this.data.components) {
|
|
145
|
+
this.data.components.forEach(item => {
|
|
146
|
+
item.mark = 0
|
|
147
|
+
})
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// 初始化 buttons_fields
|
|
151
|
+
for (let i = 0; i < this.data.buttons.length; i++) {
|
|
152
|
+
// 下发按钮相关配置
|
|
153
|
+
if (this.data.buttons[i].button_name === '下发') {
|
|
154
|
+
if (this.data.buttons[i].button_fields && this.data.buttons[i].button_fields.length === 1) {
|
|
155
|
+
if (this.data.buttons[i].source){
|
|
156
|
+
let http = new HttpResetClass()
|
|
157
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {
|
|
158
|
+
source: this.data.buttons[i].source,
|
|
159
|
+
userid: Vue.user.id
|
|
160
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
161
|
+
|
|
162
|
+
let options = []
|
|
163
|
+
for (let i = 0; i < res.data.length; i++) {
|
|
164
|
+
options.push(
|
|
165
|
+
{
|
|
166
|
+
"label": res.data[i].name,
|
|
167
|
+
"value": res.data[i].id
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
this.data.buttons[i].button_fields[0]['options'] = options
|
|
172
|
+
} else {
|
|
173
|
+
this.$showMessage("请配置获取人员表达式")
|
|
174
|
+
}
|
|
175
|
+
} else {
|
|
176
|
+
this.$showMessage("下发按钮必须满足 当且仅当一个字段")
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
if (this.data.buttons[i].button_fields) {
|
|
180
|
+
this.data.buttons[i].button_fields.forEach(item => {
|
|
181
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
182
|
+
if (item.type === 'select' && this.$appdata.getParam(item.label)) {
|
|
183
|
+
item.options = this.$appdata.getParam(item.label)
|
|
184
|
+
}
|
|
185
|
+
})
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// onetomany 数据获取
|
|
190
|
+
if (this.data.onetomany) {
|
|
191
|
+
for (let index = 0; index < this.data.onetomany.length; index++) {
|
|
192
|
+
let res = null
|
|
193
|
+
if (!this.data.onetomany[index].queryEvent || this.data.onetomany[index].queryEvent === 'default'){
|
|
194
|
+
let http = new HttpResetClass()
|
|
195
|
+
let data = {
|
|
196
|
+
tablename: this.data.onetomany[index].tables[0],
|
|
197
|
+
condition: `${this.data.onetomany[index].condition ? this.data.onetomany[index].condition : '1=1'} and f_process_id = '${this.selectdata.f_process_id}'`
|
|
198
|
+
}
|
|
199
|
+
res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {
|
|
200
|
+
resolveMsg: null,
|
|
201
|
+
rejectMsg: 'onetomany查询失败'
|
|
202
|
+
})
|
|
203
|
+
} else {
|
|
204
|
+
res = await this[this.data.onetomany[index].queryEvent]()
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// 初始化 onetomany
|
|
208
|
+
this.data.onetomany[index].rows = res.data
|
|
209
|
+
|
|
210
|
+
// 初始化onetomany中的fields
|
|
211
|
+
for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
|
|
212
|
+
if (!this.data.onetomany[index].fields[j].value) {
|
|
213
|
+
if (this.data.onetomany[index].fields[j].value === 0) {
|
|
214
|
+
this.data.onetomany[index].fields[j].value = 0
|
|
215
|
+
} else {
|
|
216
|
+
this.data.onetomany[index].fields[j].value = null
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (this.data.onetomany[index].fields[j].default || this.data.onetomany[index].fields[j].default === 0) {
|
|
220
|
+
this.data.onetomany[index].fields[j].value = this.data.onetomany[index].fields[j].default
|
|
221
|
+
}
|
|
222
|
+
// 如果配置类型为select,优先从参数列表获取options
|
|
223
|
+
if (this.data.onetomany[index].fields[j].type === 'select') {
|
|
224
|
+
let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
|
|
225
|
+
if (temp && temp.length > 0) {
|
|
226
|
+
this.data.onetomany[index].fields[j].options = temp
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// 消除双向绑定,避免子组件(显示层)数据更改,父组件(控制层)也更改
|
|
234
|
+
let temp = JSON.parse(JSON.stringify(this.data))
|
|
235
|
+
|
|
236
|
+
this.show_data = temp
|
|
237
|
+
this.$nextTick(() => {
|
|
238
|
+
this.showview = true
|
|
239
|
+
})
|
|
240
|
+
},
|
|
241
|
+
async buttonBefore(model) {
|
|
242
|
+
return model
|
|
243
|
+
},
|
|
244
|
+
async checkDuplicate(index) {
|
|
245
|
+
let http = new HttpResetClass()
|
|
246
|
+
let data = {
|
|
247
|
+
tablename: 't_apply',
|
|
248
|
+
condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
|
|
249
|
+
}
|
|
250
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {
|
|
251
|
+
resolveMsg: null,
|
|
252
|
+
rejectMsg: `${this.show_data.fields[index].label}查询失败`
|
|
253
|
+
})
|
|
254
|
+
if (res.data.length > 0) {
|
|
255
|
+
this.show_data.fields[index].value = null
|
|
256
|
+
throw `${this.show_data.fields[index].label}已存在!!!`
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
events: {
|
|
261
|
+
async 'initializtionView'() {
|
|
262
|
+
},
|
|
263
|
+
// 失去焦点出触发事件
|
|
264
|
+
async 'onchange'(index) {
|
|
265
|
+
// 号码检测
|
|
266
|
+
if (this.show_data.fields[index].label === '电话号码') {
|
|
267
|
+
let phone = this.show_data.fields[index].value
|
|
268
|
+
// 电话号码效验
|
|
269
|
+
if (!(/^1[3456789]\d{9}$/.test(phone))) {
|
|
270
|
+
this.show_data.fields[index].value = ""
|
|
271
|
+
this.$showMessage("电话号码格式不正确,请重新输入!!!")
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
// 获取view层button事件/
|
|
276
|
+
async 'button'(model) {
|
|
277
|
+
// 修改提交数据
|
|
278
|
+
model = Object.assign({}, this.selectdata, model)
|
|
279
|
+
// 点击重置按钮就重置数据
|
|
280
|
+
if (model.button.button_name === '重置') {
|
|
281
|
+
this.breakControl()
|
|
282
|
+
return
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// 提交前置
|
|
286
|
+
try {
|
|
287
|
+
model = await this.buttonBefore(model)
|
|
288
|
+
} catch (e) {
|
|
289
|
+
this.$showMessage(e)
|
|
290
|
+
return
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
let http = new HttpResetClass()
|
|
294
|
+
let requestData = {
|
|
295
|
+
tables: this.data.tables,
|
|
296
|
+
start_activity: this.json_datas.start_activity,
|
|
297
|
+
model: model,
|
|
298
|
+
loginUser: Vue.user,
|
|
299
|
+
// 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":[]},
|
|
300
|
+
workflow_xmlfilename: this.json_datas.workflow_xmlfilename
|
|
301
|
+
}
|
|
302
|
+
// 下发,提交,保存,退回通用业务后台处理logic
|
|
303
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/ApplyProductService`, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
|
|
304
|
+
// let res = await http.load('POST', `rs/logic/ApplyProductService`, {data: requestData}, {resolveMsg: null, rejectMsg: '数据保存失败'})
|
|
305
|
+
|
|
306
|
+
if (res.data.code === 200) {
|
|
307
|
+
this.$dispatch('confirm')
|
|
308
|
+
} else {
|
|
309
|
+
if (res.data.msg) {
|
|
310
|
+
this.$showMessage(res.data.msg)
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
|
|
315
|
+
// onetomany模态框默认监听监听事件
|
|
316
|
+
async 'onetomanydelete'(i, j) {
|
|
317
|
+
console.log('默认删除')
|
|
318
|
+
let http = new HttpResetClass()
|
|
319
|
+
let data = {
|
|
320
|
+
table: this.show_data.onetomany[i].tables[0],
|
|
321
|
+
row: this.show_data.onetomany[i].rows[j]
|
|
322
|
+
}
|
|
323
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/onetomanyDefaultDeleteEvent`, {data: data}, {
|
|
324
|
+
resolveMsg: null,
|
|
325
|
+
rejectMsg: '删除失败'
|
|
326
|
+
})
|
|
327
|
+
|
|
328
|
+
if (res.data <= 0){
|
|
329
|
+
this.$showMessage('删除失败')
|
|
330
|
+
return
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
this.breakControl()
|
|
334
|
+
},
|
|
335
|
+
async 'onetomanyadd'(index) {
|
|
336
|
+
|
|
337
|
+
let data = {
|
|
338
|
+
f_process_id : this.show_data.f_process_id
|
|
339
|
+
}
|
|
340
|
+
this.show_data.onetomany[index].fields.forEach(item => {
|
|
341
|
+
data[item.field] = item.value
|
|
342
|
+
})
|
|
343
|
+
let res = await this.$resetpost(
|
|
344
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[index].tables[0]}`,
|
|
345
|
+
data
|
|
346
|
+
)
|
|
347
|
+
|
|
348
|
+
this.breakControl()
|
|
349
|
+
},
|
|
350
|
+
async 'onetomanyupdate'(i, j) {
|
|
351
|
+
let onetomany = this.show_data.onetomany[i]
|
|
352
|
+
let data = onetomany.rows[j]
|
|
353
|
+
|
|
354
|
+
onetomany.fields.forEach(item => {
|
|
355
|
+
data[item.field] = item.value
|
|
356
|
+
})
|
|
357
|
+
let res = await this.$resetpost(
|
|
358
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/${this.show_data.onetomany[i].tables[0]}`,
|
|
359
|
+
data
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
this.breakControl()
|
|
363
|
+
},
|
|
364
|
+
// onetomany模态框监听事件
|
|
365
|
+
async 'onchange_modal'(index, i) {
|
|
366
|
+
},
|
|
367
|
+
async 'oninput_modal'(index, i) {
|
|
368
|
+
},
|
|
369
|
+
error_check(index) {
|
|
370
|
+
// 时间格式检测
|
|
371
|
+
if (this.show_data.fields[index].type === 'datepicker' && !isEmpty(this.show_data.fields[index].value)) {
|
|
372
|
+
|
|
373
|
+
let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
|
|
374
|
+
let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
|
|
375
|
+
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$/
|
|
376
|
+
if (this.show_data.fields[index].format) {
|
|
377
|
+
if (this.show_data.fields[index].format === 'yyyy-MM-dd') {
|
|
378
|
+
if (!dateReg.test(this.show_data.fields[index].value)) {
|
|
379
|
+
this.show_data.fields[index].value = ''
|
|
380
|
+
this.$showMessage(this.show_data.fields[index].label + '格式错误如:2021-01-01')
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
if (this.show_data.fields[index].format === 'HH:mm:ss') {
|
|
384
|
+
if (!timeReg.test(this.show_data.fields[index].value)) {
|
|
385
|
+
this.show_data.fields[index].value = ''
|
|
386
|
+
this.$showMessage(this.show_data.fields[index].label + '格式错误如:00:00:00')
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
if (this.show_data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
|
|
390
|
+
if (!datetimeReg.test(this.show_data.fields[index].value)) {
|
|
391
|
+
this.show_data.fields[index].value = ''
|
|
392
|
+
this.$showMessage(this.show_data.fields[index].label + '格式错误如:2021-01-01 00:00:00')
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
} else {
|
|
396
|
+
if (!dateReg.test(this.show_data.fields[index].value)) {
|
|
397
|
+
this.show_data.fields[index].value = ''
|
|
398
|
+
this.$showMessage(this.show_data.fields[index].label + '格式错误如:2021-01-01')
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
watch: {
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
</script>
|
|
408
|
+
<style scoped>
|
|
409
|
+
</style>
|