[update] 修改企标制修订流程
This commit is contained in:
+45
-14
@@ -384,12 +384,26 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 初始化流程信息
|
// 初始化流程信息
|
||||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
||||||
// 初始化流程审批信息,草稿进来的才回显审批信息
|
// 草稿进来的回显
|
||||||
if (type === 'draft') {
|
if (type === 'draft') {
|
||||||
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
|
// 初始化流程信息
|
||||||
|
const prcObj = Object.assign({}, this.model)
|
||||||
|
prcObj.dueTime = this.model.processDueDate
|
||||||
|
prcObj.prcMes = this.model.processDescription
|
||||||
|
this.processInfoForm.setFieldsValue(pick(prcObj, 'prcName', 'dueTime', 'prcMes'))
|
||||||
|
// 初始化流程审批信息
|
||||||
|
prcObj.commitText = this.model.handleText
|
||||||
|
prcObj.commitFile = this.model.handleFile
|
||||||
|
this.approvalInfoForm.setFieldsValue(pick(prcObj, 'commitText', 'commitFile'))
|
||||||
|
this.model.data = JSON.parse(this.model.infoJsonStr).data
|
||||||
|
// 如果是节点1的保存回显人员信息
|
||||||
|
if (this.currentNode === 1) {
|
||||||
|
this.draftInitPersonInfo(JSON.parse(this.model.infoJsonStr).personnelObj)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.$refs.baseInfoRef) {
|
||||||
|
this.$refs.baseInfoRef.initData(this.model.data)
|
||||||
}
|
}
|
||||||
// 初始化业务基本信息中组件内容
|
|
||||||
this.$refs.baseInfoRef.initData(this.model.data)
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
@@ -438,26 +452,43 @@ export default {
|
|||||||
const personnelObj = this.$refs.personnelInfo.getDataObj()
|
const personnelObj = this.$refs.personnelInfo.getDataObj()
|
||||||
// 需要传给后端的
|
// 需要传给后端的
|
||||||
const paramObj = {}
|
const paramObj = {}
|
||||||
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
// 流程信息
|
||||||
paramObj.flowUser = personnelObj
|
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.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
|
||||||
|
paramObj.basicTaskInfoDTO.handleText = paramObj.basicTaskInfoDTO.commitText
|
||||||
|
paramObj.basicTaskInfoDTO.handleFile = paramObj.basicTaskInfoDTO.commitFile
|
||||||
|
paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId
|
||||||
|
// paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
||||||
|
// paramObj.flowUser = personnelObj
|
||||||
// 业务基本信息
|
// 业务基本信息
|
||||||
if (this.$refs.baseInfoRef) {
|
if (this.$refs.baseInfoRef) {
|
||||||
// 业务基本信息
|
// 业务基本信息
|
||||||
const baseInfo = this.$refs.baseInfoRef.getData()
|
const baseInfo = this.$refs.baseInfoRef.getData()
|
||||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...baseInfo.formInline }
|
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...baseInfo }
|
||||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||||
if (!flag || (baseInfo.dataSource && baseInfo.dataSource.length <= 0)) {
|
if (!flag) {
|
||||||
// 提示至少填写一项
|
// 提示至少填写一项
|
||||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||||
return
|
return
|
||||||
}
|
|
||||||
if (baseInfo.dataSource) {
|
|
||||||
paramObj.dataList = baseInfo.dataSource.map(item => {
|
|
||||||
return { ...item, ...baseInfo.formInline }
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
paramObj.dataList = [baseInfo.formInline]
|
// 业务基本信息和人员信息
|
||||||
|
paramObj.infoJsonStr = JSON.stringify({
|
||||||
|
data: Object.assign({}, baseInfo),
|
||||||
|
personnelObj: personnelObj
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
// if (baseInfo.dataSource) {
|
||||||
|
// paramObj.dataList = baseInfo.dataSource.map(item => {
|
||||||
|
// return { ...item, ...baseInfo.formInline }
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// paramObj.dataList = [baseInfo.formInline]
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
// 需要外层信息至少填了一项
|
// 需要外层信息至少填了一项
|
||||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
||||||
|
|||||||
+2
-2
@@ -122,14 +122,14 @@ export default {
|
|||||||
getData () {
|
getData () {
|
||||||
// 把数据抛出,在线编辑不知道要不要抛
|
// 把数据抛出,在线编辑不知道要不要抛
|
||||||
const data = {}
|
const data = {}
|
||||||
data.dataSource = this.dataSource
|
data.advices = this.dataSource
|
||||||
return data
|
return data
|
||||||
},
|
},
|
||||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
getDataValidate () {
|
getDataValidate () {
|
||||||
if (this.dataSource && this.dataSource.length > 0) {
|
if (this.dataSource && this.dataSource.length > 0) {
|
||||||
const data = {}
|
const data = {}
|
||||||
data.dataSource = this.dataSource
|
data.advices = this.dataSource
|
||||||
return data
|
return data
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||||
|
|||||||
+41
-43
@@ -2,59 +2,57 @@
|
|||||||
<div>
|
<div>
|
||||||
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
<base-info-form ref="baseInfoForm" v-bind="$attrs" disabled></base-info-form>
|
||||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||||
<div class="collapsible-panel-form">
|
<div class="form-flex-box">
|
||||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
<!-- 标准文本 -->
|
||||||
<!-- 标准文本 -->
|
<div class="box-title-text form-flex-item">
|
||||||
<div class="box-title-text form-flex-item">
|
<div class="title-text">
|
||||||
<div class="title-text">
|
|
||||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.standardText')">
|
||||||
{{ $t('workCenter.enStandardRevision.standardText') }}
|
{{ $t('workCenter.enStandardRevision.standardText') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
<a-form-model-item class="item-model">
|
|
||||||
<div class="online-edit-wrapper">
|
|
||||||
<!-- todo: 还不确定这里展示的是什么 -->
|
|
||||||
<p>企业标准</p>
|
|
||||||
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
|
||||||
</div>
|
|
||||||
</a-form-model-item>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 是否开启征求意见 -->
|
<a-form-model-item class="item-model">
|
||||||
<div class="box-title-text form-flex-item">
|
<div class="online-edit-wrapper">
|
||||||
<div class="title-text">
|
<!-- todo: 还不确定这里展示的是什么 -->
|
||||||
|
<p>企业标准</p>
|
||||||
|
<a-button type="primary">{{ $t('workCenter.enStandardRevision.onLineEditing') }}</a-button>
|
||||||
|
</div>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
<!-- 是否开启征求意见 -->
|
||||||
|
<div class="box-title-text form-flex-item">
|
||||||
|
<div class="title-text">
|
||||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isOpenComment')">
|
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.isOpenComment')">
|
||||||
{{ $t('workCenter.enStandardRevision.isOpenComment') }}
|
{{ $t('workCenter.enStandardRevision.isOpenComment') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
<a-form-model-item class="item-model" prop="adviceFlag">
|
|
||||||
<a-radio-group v-model="formInline.adviceFlag">
|
|
||||||
<a-radio :value="1">
|
|
||||||
{{ $t('yes') }}
|
|
||||||
</a-radio>
|
|
||||||
<a-radio :value="0">
|
|
||||||
{{ $t('not') }}
|
|
||||||
</a-radio>
|
|
||||||
</a-radio-group>
|
|
||||||
</a-form-model-item>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 部门联络人 -->
|
<a-form-model-item class="item-model" prop="adviceFlag">
|
||||||
<div class="box-title-text form-flex-item">
|
<a-radio-group v-model="formInline.adviceFlag">
|
||||||
<div class="title-text">
|
<a-radio :value="1">
|
||||||
<span class="required" v-if="rules.contactUser[0].required">*</span>
|
{{ $t('yes') }}
|
||||||
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departmentalLiaison')">
|
</a-radio>
|
||||||
|
<a-radio :value="0">
|
||||||
|
{{ $t('not') }}
|
||||||
|
</a-radio>
|
||||||
|
</a-radio-group>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
<!-- 部门联络人 -->
|
||||||
|
<div class="box-title-text form-flex-item">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="required" v-if="rules.contactUser[0].required">*</span>
|
||||||
|
<span class="title-text-text" :title="$t('workCenter.enStandardRevision.departmentalLiaison')">
|
||||||
{{ $t('workCenter.enStandardRevision.departmentalLiaison') }}
|
{{ $t('workCenter.enStandardRevision.departmentalLiaison') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
|
||||||
<a-form-model-item class="item-model" prop="contactUser">
|
|
||||||
<user-selection v-model="formInline.contactUser"
|
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departmentalLiaison')"
|
|
||||||
:disabled="disabled"
|
|
||||||
filedName="contactUser"
|
|
||||||
@nameChange="userSelectNameChange"
|
|
||||||
:nameStr="formInline.contactUser_dictText"
|
|
||||||
type="checkbox"/>
|
|
||||||
</a-form-model-item>
|
|
||||||
</div>
|
</div>
|
||||||
|
<a-form-model-item class="item-model" prop="contactUser">
|
||||||
|
<user-selection v-model="formInline.contactUser"
|
||||||
|
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.departmentalLiaison')"
|
||||||
|
:disabled="disabled"
|
||||||
|
filedName="contactUser"
|
||||||
|
@nameChange="userSelectNameChange"
|
||||||
|
:nameStr="formInline.contactUser_dictText"
|
||||||
|
type="checkbox"/>
|
||||||
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
@@ -123,7 +121,7 @@ export default {
|
|||||||
let data = {}
|
let data = {}
|
||||||
await this.$refs.ruleForm.validate(valid => {
|
await this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const data = Object.assign({}, this.formInline)
|
data = Object.assign({}, this.formInline)
|
||||||
} else {
|
} else {
|
||||||
data = false
|
data = false
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -101,7 +101,7 @@ export default {
|
|||||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
initData (data) {
|
initData (data) {
|
||||||
// 给表单赋值,在线编辑不知道要怎么赋值?
|
// 给表单赋值,在线编辑不知道要怎么赋值?
|
||||||
this.formInline = Object.assign(data)
|
this.formInline = Object.assign({}, data)
|
||||||
// 给表单赋值
|
// 给表单赋值
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.baseInfoForm.initData(data)
|
this.$refs.baseInfoForm.initData(data)
|
||||||
|
|||||||
+5
-6
@@ -292,8 +292,8 @@ export default {
|
|||||||
initData (data) {
|
initData (data) {
|
||||||
// 给表格赋值,在线编辑不知道要怎么赋值?
|
// 给表格赋值,在线编辑不知道要怎么赋值?
|
||||||
this.drafterDataSource = data.otherDraftUserVOS
|
this.drafterDataSource = data.otherDraftUserVOS
|
||||||
// this.dataSource =
|
this.dataSource = data.inspectContents || []
|
||||||
// this.formInline =
|
this.formInline = Object.assign({}, data)
|
||||||
// 给表单赋值
|
// 给表单赋值
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.baseInfoForm.initData(data)
|
this.$refs.baseInfoForm.initData(data)
|
||||||
@@ -302,9 +302,8 @@ export default {
|
|||||||
// 外层要获取数据
|
// 外层要获取数据
|
||||||
getData () {
|
getData () {
|
||||||
// 把数据抛出,在线编辑不知道要不要抛
|
// 把数据抛出,在线编辑不知道要不要抛
|
||||||
const data = {}
|
const data = Object.assign({}, this.formInline)
|
||||||
data.dataSource = this.dataSource
|
data.inspectContents = this.dataSource || []
|
||||||
data.formInline = this.formInline
|
|
||||||
return data
|
return data
|
||||||
},
|
},
|
||||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
@@ -317,7 +316,7 @@ export default {
|
|||||||
// 每一个的整改部门都填了
|
// 每一个的整改部门都填了
|
||||||
// 有数据可以抛出
|
// 有数据可以抛出
|
||||||
data = Object.assign({}, this.formInline)
|
data = Object.assign({}, this.formInline)
|
||||||
data.inspectContents = this.dataSource
|
data.inspectContents = this.dataSource || []
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
|
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
|
||||||
data = false
|
data = false
|
||||||
|
|||||||
@@ -124,8 +124,8 @@ export default {
|
|||||||
getData () {
|
getData () {
|
||||||
// 把数据抛出,在线编辑不知道要不要抛
|
// 把数据抛出,在线编辑不知道要不要抛
|
||||||
const data = {}
|
const data = {}
|
||||||
data.dataSource = this.dataSource
|
data.otherDraftUserVOS = this.dataSource
|
||||||
data.formInline = this.$refs.baseInfoForm.formInline
|
data.businessJson = JSON.stringify(this.$refs.baseInfoForm.formInline)
|
||||||
return data
|
return data
|
||||||
},
|
},
|
||||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
|
|||||||
+3
-1
@@ -119,6 +119,8 @@ export default {
|
|||||||
// 外层要获取数据
|
// 外层要获取数据
|
||||||
getData () {
|
getData () {
|
||||||
// 把数据抛出
|
// 把数据抛出
|
||||||
|
const data = {}
|
||||||
|
data.otherDraftUserVOS = this.dataSource
|
||||||
return this.dataSource
|
return this.dataSource
|
||||||
},
|
},
|
||||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
@@ -138,7 +140,7 @@ export default {
|
|||||||
this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseUploadStandard'))
|
this.$message.warning(this.$t('workCenter.enStandardRevision.pleaseUploadStandard'))
|
||||||
data = false
|
data = false
|
||||||
} else {
|
} else {
|
||||||
data.dataSource = this.dataSource
|
data.otherDraftUserVOS = this.dataSource
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data = false
|
data = false
|
||||||
|
|||||||
@@ -299,7 +299,17 @@ export default {
|
|||||||
getData () {
|
getData () {
|
||||||
// 把数据抛出,在线编辑不知道要不要抛
|
// 把数据抛出,在线编辑不知道要不要抛
|
||||||
const data = {}
|
const data = {}
|
||||||
data.reviewMeetingDetails = this.dataSource
|
const arr = []
|
||||||
|
for (const item in this.dataSource) {
|
||||||
|
if (item % 3 === 0 && this.dataSource[item].evaluateScore && this.dataSource[item].deductionScoreReason) {
|
||||||
|
// 是有评分和扣分理由的行
|
||||||
|
arr.push({
|
||||||
|
...this.dataSource[item],
|
||||||
|
evaluateItem: ((item % 3) + 1) + ''
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data.reviewMeetingDetails = arr
|
||||||
return data
|
return data
|
||||||
},
|
},
|
||||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
|
|||||||
Reference in New Issue
Block a user