@zscreate/zhxy-app-component 1.0.276 → 1.0.278
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.
|
@@ -1025,7 +1025,7 @@ export default {
|
|
|
1025
1025
|
genList[i].model,
|
|
1026
1026
|
{
|
|
1027
1027
|
comments: '',
|
|
1028
|
-
operator: userInfo.username,
|
|
1028
|
+
operator: userInfo.realname || userInfo.username,
|
|
1029
1029
|
operationTime: moment().format('YYYY-MM-DD HH:mm:ss'),
|
|
1030
1030
|
userSign: ''
|
|
1031
1031
|
}
|
|
@@ -1220,24 +1220,31 @@ export default {
|
|
|
1220
1220
|
// console.log(promiseArr)
|
|
1221
1221
|
// 校验审核表单
|
|
1222
1222
|
promiseArr.push(new Promise((resolve, reject) => {
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1223
|
+
let item = this.models[this.verifyNode]
|
|
1224
|
+
let widgets = this.dataObj.list.filter(obj => obj.model === this.verifyNode || obj.type === 'hnkj-confirm') || []
|
|
1225
|
+
|
|
1226
|
+
widgets.forEach( (widget) => {
|
|
1227
|
+
item = this.models[widget.model]
|
|
1228
|
+
if (item && widget) {
|
|
1229
|
+
let rules = {
|
|
1230
|
+
comments: widget.type === 'hnkj-confirm' ? [ { required: widget.options.required , message: widget.options.placeholder }] : [{ required: widget.options.opinionRequire, message: '请输入审批意见' }],
|
|
1231
|
+
operation: widget.type === 'hnkj-confirm' ? [ { required: widget.options.required , message: `请选择${widget.options.operation}` }] : []
|
|
1232
|
+
}
|
|
1233
|
+
utils.validateField(item, rules , Object.keys(rules), (success, errors) => {
|
|
1230
1234
|
if (success) {
|
|
1231
|
-
|
|
1235
|
+
resolve()
|
|
1232
1236
|
} else {
|
|
1233
|
-
|
|
1237
|
+
reject(errors)
|
|
1234
1238
|
}
|
|
1235
|
-
|
|
1239
|
+
},{
|
|
1236
1240
|
showMessage: true
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1241
|
+
})
|
|
1242
|
+
}
|
|
1243
|
+
})
|
|
1244
|
+
if (!widgets.length) {
|
|
1245
|
+
resolve()
|
|
1240
1246
|
}
|
|
1247
|
+
|
|
1241
1248
|
}))
|
|
1242
1249
|
}
|
|
1243
1250
|
Promise.all(promiseArr).then((result) => {
|