[update] 市场清单发布流程
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
||||||
disabled
|
disabled
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
v-decorator="['prcName', validatorRules.prcName]" />
|
v-decorator="['processName', validatorRules.processName]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
v-decorator="['dueTime']" />
|
v-decorator="['processDueDate']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-decorator="['prcMes']" />
|
v-decorator="['processDescription']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<template v-if="currentNode !== 1">
|
<template v-if="currentNode !== 1">
|
||||||
@@ -107,11 +107,11 @@
|
|||||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
v-decorator="['commitText', validatorRules.commitText]" />
|
v-decorator="['handleText', validatorRules.handleText]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!--附件-->
|
<!--附件-->
|
||||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('attach')" :colon="formItemColon">
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('attach')" :colon="formItemColon">
|
||||||
<j-upload v-decorator="['commitFile']" return-id multiple />
|
<j-upload v-decorator="['handleFile']" return-id multiple />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -285,13 +285,13 @@ export default {
|
|||||||
},
|
},
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
// 流程名称
|
// 流程名称
|
||||||
prcName: {
|
processName: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }
|
{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }
|
||||||
],
|
],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
commitText: {
|
handleText: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
|
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
|
||||||
],
|
],
|
||||||
@@ -322,19 +322,19 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (type === 'todo') {
|
if (type === 'todo') {
|
||||||
// 初始化流程信息
|
// 初始化流程信息
|
||||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
this.processInfoForm.setFieldsValue(pick(this.model.common, 'processName', 'processDueDate', 'processDescription'))
|
||||||
}
|
}
|
||||||
// 有草稿json按草稿进来的回显
|
// 有草稿json按草稿进来的回显
|
||||||
if (this.model.infoJsonStr) {
|
if (this.model.infoJsonStr) {
|
||||||
// 初始化流程信息
|
// 初始化流程信息
|
||||||
const prcObj = Object.assign({}, this.model)
|
const prcObj = Object.assign({}, this.model)
|
||||||
prcObj.dueTime = this.model.processDueDate
|
prcObj.processDueDate = this.model.processDueDate
|
||||||
prcObj.prcMes = this.model.processDescription
|
prcObj.processDescription = this.model.processDescription
|
||||||
this.processInfoForm.setFieldsValue(pick(prcObj, 'prcName', 'dueTime', 'prcMes'))
|
this.processInfoForm.setFieldsValue(pick(prcObj, 'processName', 'processDueDate', 'processDescription'))
|
||||||
// 初始化流程审批信息
|
// 初始化流程审批信息
|
||||||
prcObj.commitText = this.model.handleText
|
prcObj.handleText = this.model.handleText
|
||||||
prcObj.commitFile = this.model.handleFile
|
prcObj.handleFile = this.model.handleFile
|
||||||
this.approvalInfoForm.setFieldsValue(pick(prcObj, 'commitText', 'commitFile'))
|
this.approvalInfoForm.setFieldsValue(pick(prcObj, 'handleText', 'handleFile'))
|
||||||
this.model.data = JSON.parse(this.model.infoJsonStr).data
|
this.model.data = JSON.parse(this.model.infoJsonStr).data
|
||||||
// 如果是节点1的保存回显人员信息
|
// 如果是节点1的保存回显人员信息
|
||||||
if (this.currentNode === 1) {
|
if (this.currentNode === 1) {
|
||||||
@@ -359,9 +359,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 业务基本信息组件中获取到流程名称改变后的值
|
// 业务基本信息组件中获取到流程名称改变后的值
|
||||||
processNameChange (value) {
|
processNameChange (value) {
|
||||||
const param = { prcName: value }
|
const param = { processName: value }
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.processInfoForm.setFieldsValue(pick(param, 'prcName'))
|
this.processInfoForm.setFieldsValue(pick(param, 'processName'))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
@@ -389,14 +389,9 @@ export default {
|
|||||||
const paramObj = {}
|
const paramObj = {}
|
||||||
// 流程信息
|
// 流程信息
|
||||||
paramObj.basicProcessInfoDTO = Object.assign({}, processInfoForm)
|
paramObj.basicProcessInfoDTO = Object.assign({}, processInfoForm)
|
||||||
paramObj.basicProcessInfoDTO.processName = paramObj.basicProcessInfoDTO.prcName
|
|
||||||
paramObj.basicProcessInfoDTO.processDueDate = paramObj.basicProcessInfoDTO.dueTime
|
|
||||||
paramObj.basicProcessInfoDTO.processDescription = paramObj.basicProcessInfoDTO.prcMes
|
|
||||||
paramObj.basicProcessInfoDTO.processInstanceId = this.$route.query.processInstanceId
|
paramObj.basicProcessInfoDTO.processInstanceId = this.$route.query.processInstanceId
|
||||||
// 流程审批信息
|
// 流程审批信息
|
||||||
paramObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
|
paramObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
|
||||||
paramObj.basicTaskInfoDTO.handleText = paramObj.basicTaskInfoDTO.commitText
|
|
||||||
paramObj.basicTaskInfoDTO.handleFile = paramObj.basicTaskInfoDTO.commitFile
|
|
||||||
paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId
|
paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId
|
||||||
// 草稿id
|
// 草稿id
|
||||||
if (this.model.infoJsonStr) {
|
if (this.model.infoJsonStr) {
|
||||||
@@ -428,50 +423,58 @@ export default {
|
|||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// if (this.loading) return
|
if (this.loading) return
|
||||||
// // 流程信息的校验
|
// 流程信息的校验
|
||||||
// this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
// // 流程审批信息的校验
|
// 流程审批信息的校验
|
||||||
// this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
// const data = await this.$refs.baseInfoRef.getDataValidate()
|
// 获取业务信息businessInfoDTO
|
||||||
// if (!err && !approvalErr && data) {
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
// // 人员信息的数据, 处理成对象
|
if (!err && !approvalErr && data) {
|
||||||
// const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
// 人员信息的数据, 处理成对象
|
||||||
// if (!personnelObj) {
|
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||||
// this.switchValue = 'user'
|
if (!personnelObj) {
|
||||||
// return
|
this.switchValue = 'user'
|
||||||
// }
|
return
|
||||||
// this.loading = true
|
}
|
||||||
// const paramObj = {} // 需要传给后端的数据
|
this.loading = true
|
||||||
// paramObj.common = { ...values, ...approvalValues }
|
const paramObj = {} // 需要传给后端的数据
|
||||||
// // 草稿id
|
// 流程信息
|
||||||
// if (this.model.infoJsonStr) {
|
paramObj.basicProcessInfoDTO = values
|
||||||
// paramObj.common.draftId = this.model.id
|
// 流程审批信息
|
||||||
// }
|
paramObj.basicTaskInfoDTO = approvalValues
|
||||||
// paramObj.flowUser = personnelObj
|
// 草稿id
|
||||||
// paramObj.data = data.formInline
|
if (this.model.infoJsonStr) {
|
||||||
// let func
|
paramObj.draftId = this.model.id
|
||||||
// if (this.$route.query.taskId) {
|
}
|
||||||
// // 有taskId说明是驳回的提交
|
// 人员信息
|
||||||
// func = marketListReleaseAgree
|
paramObj.userInfoMap = personnelObj
|
||||||
// paramObj.common.taskId = this.$route.query.taskId
|
// 业务信息
|
||||||
// } else {
|
paramObj.businessInfoDTO = data
|
||||||
// func = marketListReleaseApproval
|
// JSON字符串
|
||||||
// }
|
paramObj.infoJsonStr = JSON.stringify(paramObj)
|
||||||
// func(paramObj).then(res => {
|
let func
|
||||||
// if (res.success) {
|
if (this.$route.query.taskId) {
|
||||||
// this.$message.success(res.message)
|
// 有taskId说明是驳回的提交
|
||||||
// this.goBack()
|
func = marketListReleaseAgree
|
||||||
// } else {
|
paramObj.common.taskId = this.$route.query.taskId
|
||||||
// this.$message.warning(res.message)
|
} else {
|
||||||
// this.loading = false
|
func = marketListReleaseApproval
|
||||||
// }
|
}
|
||||||
// })
|
func(paramObj).then(res => {
|
||||||
// } else {
|
if (res.success) {
|
||||||
// this.switchValue = 'base'
|
this.$message.success(res.message)
|
||||||
// }
|
this.goBack()
|
||||||
// })
|
} else {
|
||||||
// })
|
this.$message.warning(res.message)
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.switchValue = 'base'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 转办
|
// 转办
|
||||||
handleTurnTo () {
|
handleTurnTo () {
|
||||||
@@ -502,9 +505,9 @@ export default {
|
|||||||
// 同意
|
// 同意
|
||||||
handleAgree () {
|
handleAgree () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.validatorRules.commitText.rules[0].required = false
|
this.validatorRules.handleText.rules[0].required = false
|
||||||
if (!this.approvalInfoForm.getFieldValue('commitText')) {
|
if (!this.approvalInfoForm.getFieldValue('handleText')) {
|
||||||
this.approvalInfoForm.setFieldsValue({ commitText: '同意' })
|
this.approvalInfoForm.setFieldsValue({ handleText: '同意' })
|
||||||
}
|
}
|
||||||
this.approvalInfoForm.validateFields((err, values) => {
|
this.approvalInfoForm.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
@@ -527,8 +530,8 @@ export default {
|
|||||||
// 驳回
|
// 驳回
|
||||||
handleReject () {
|
handleReject () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.validatorRules.commitText.rules[0].required = true
|
this.validatorRules.handleText.rules[0].required = true
|
||||||
if (!this.approvalInfoForm.getFieldValue('commitText')) {
|
if (!this.approvalInfoForm.getFieldValue('handleText')) {
|
||||||
this.$message.warning(this.$t('pleaseEnterRemarks'))
|
this.$message.warning(this.$t('pleaseEnterRemarks'))
|
||||||
this.switchValue = 'base'
|
this.switchValue = 'base'
|
||||||
}
|
}
|
||||||
@@ -548,7 +551,7 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.validatorRules.commitText.rules[0].required = false
|
this.validatorRules.handleText.rules[0].required = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user