[update] 修改企标制修订流程

This commit is contained in:
lideqin
2023-12-22 17:36:09 +08:00
parent 74e553ddf7
commit 386707e7ba
8 changed files with 42 additions and 28 deletions
@@ -419,13 +419,12 @@ export default {
} else { } else {
// 选了否 // 选了否
this.validatorRules.commitText.rules[0].required = true this.validatorRules.commitText.rules[0].required = true
const obj = {}
obj.commitText = '驳回' + this.processInfoForm.getFieldValue('commitText')
this.$nextTick(() => {
this.processInfoForm.setFieldsValue(pick(obj, 'commitText'))
})
this.rejectBtnDisabled = false this.rejectBtnDisabled = false
this.agreeBtnDisabled = true this.agreeBtnDisabled = true
const obj = { commitText: '驳回' }
this.$nextTick(() => {
this.approvalInfoForm.setFieldsValue(pick(obj, 'commitText'))
})
} }
}, },
// 保存 // 保存
@@ -501,9 +500,12 @@ export default {
param.flowUser = personnelObj param.flowUser = personnelObj
// 业务基本信息部分表单 // 业务基本信息部分表单
param.data = {} param.data = {}
// 上方表单
param.data.businessJson = JSON.stringify(data.formInline) param.data.businessJson = JSON.stringify(data.formInline)
// 其他起草人表格数据 // 其他起草人表格数据
param.data.otherDraftUserVOS = data.dataSource param.data.otherDraftUserVOS = data.dataSource
// 企标计划id
param.data.espId = data.formInline.espId
let func let func
if (this.$route.query.taskId) { if (this.$route.query.taskId) {
// 有taskId说明是驳回的提交 // 有taskId说明是驳回的提交
@@ -360,7 +360,6 @@ export default {
trigger: 'change' trigger: 'change'
}] }]
}, },
disabled: false,
optionsData: {}, // 标签管理中维护字段的下拉框数据 optionsData: {}, // 标签管理中维护字段的下拉框数据
isEditSetData: false, // 是否正在初始化设置值,为了不执行某些watch isEditSetData: false, // 是否正在初始化设置值,为了不执行某些watch
innerDisabledField: [], // 不可更改的字段 innerDisabledField: [], // 不可更改的字段
@@ -519,6 +518,10 @@ export default {
} }
}) })
}, },
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 4、从企标计划选择企标编号的话,把其他字段也回显 // 4、从企标计划选择企标编号的话,把其他字段也回显
listChange (value) { listChange (value) {
console.log(value) console.log(value)
@@ -27,9 +27,9 @@
{{ $t('workCenter.enStandardRevision.deadlineForComments') }} {{ $t('workCenter.enStandardRevision.deadlineForComments') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="deadlineForComments"> <a-form-model-item class="item-model" prop="adviceDeadline">
<a-date-picker <a-date-picker
v-model="formInline.deadlineForComments" v-model="formInline.adviceDeadline"
:showTime="false" :showTime="false"
:disabled="disabled" :disabled="disabled"
value-format="YYYY-MM-DD"> value-format="YYYY-MM-DD">
@@ -44,13 +44,13 @@
{{ $t('workCenter.enStandardRevision.workingGroup') }} {{ $t('workCenter.enStandardRevision.workingGroup') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="workingGroup"> <a-form-model-item class="item-model" prop="workGroup">
<user-select-by-work-group v-model="formInline.workingGroup" <user-select-by-work-group v-model="formInline.workGroup"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.workingGroup')" :placeholder="$t('pleaseSelect')+$t('workCenter.enStandardRevision.workingGroup')"
:disabled="disabled" :disabled="disabled"
filedName="workingGroup" filedName="workGroup"
@nameChange="userSelectNameChange" @nameChange="userSelectNameChange"
:nameStr="formInline.workingGroup_dictText" :nameStr="formInline.workGroup_dictText"
type="checkbox"/> type="checkbox"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
@@ -79,7 +79,7 @@ export default {
formInline: {}, formInline: {},
rules: { rules: {
// 征求意见截止日期 // 征求意见截止日期
deadlineForComments: [ adviceDeadline: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.deadlineForComments') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.deadlineForComments') + this.$t('cannotEmpty'),
@@ -87,7 +87,7 @@ export default {
} }
], ],
// 工作组 // 工作组
workingGroup: [ workGroup: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.workingGroup') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.workingGroup') + this.$t('cannotEmpty'),
@@ -313,9 +313,15 @@ export default {
await this.$refs.ruleForm.validate(valid => { await this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
if (this.formInline.inspectFlag === 1 && this.dataSource && this.dataSource.length > 0) { if (this.formInline.inspectFlag === 1 && this.dataSource && this.dataSource.length > 0) {
// 有数据可以抛出 if (this.dataSource.map(item => item.rectificationDepartment).every(item => !!item)) {
data = Object.assign({}, this.formInline) // 每一个的整改部门都填了
data.inspectContents = this.dataSource // 有数据可以抛出
data = Object.assign({}, this.formInline)
data.inspectContents = this.dataSource
} else {
this.$message.warning(this.$t('pleaseCompleteTableInfo'))
data = false
}
} else if (this.formInline.inspectFlag === 0) { } else if (this.formInline.inspectFlag === 0) {
// 有数据可以抛出 // 有数据可以抛出
data = Object.assign({}, this.formInline) data = Object.assign({}, this.formInline)
@@ -30,9 +30,9 @@
{{ $t('workCenter.enStandardRevision.implementationDate') }} {{ $t('workCenter.enStandardRevision.implementationDate') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="implementationDate"> <a-form-model-item class="item-model" prop="implementDate">
<a-date-picker <a-date-picker
v-model="formInline.implementationDate" v-model="formInline.implementDate"
:showTime="false" :showTime="false"
:disabled="disabled" :disabled="disabled"
value-format="YYYY-MM-DD"> value-format="YYYY-MM-DD">
@@ -86,7 +86,7 @@ export default {
} }
], ],
// 实施日期 // 实施日期
implementationDate: [ implementDate: [
{ {
required: true, required: true,
message: this.$t('workCenter.enStandardRevision.implementationDate') + this.$t('cannotEmpty'), message: this.$t('workCenter.enStandardRevision.implementationDate') + this.$t('cannotEmpty'),
@@ -100,7 +100,7 @@ export default {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
// 给表单赋值,在线编辑不知道要怎么赋值? // 给表单赋值,在线编辑不知道要怎么赋值?
// this.formInline = this.formInline = Object.assign({}, data)
// 给表单赋值 // 给表单赋值
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.baseInfoForm.initData(data) this.$refs.baseInfoForm.initData(data)
@@ -109,8 +109,7 @@ export default {
// 外层要获取数据 // 外层要获取数据
getData () { getData () {
// 把数据抛出,在线编辑不知道要不要抛 // 把数据抛出,在线编辑不知道要不要抛
const data = {} const data = Object.assign({}, this.formInline)
data.formInline = this.formInline
return data return data
}, },
// 外层获取数据要过校验,返回false表示没有通过校验 // 外层获取数据要过校验,返回false表示没有通过校验
@@ -118,7 +117,7 @@ export default {
let data = {} let data = {}
await this.$refs.ruleForm.validate(valid => { await this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
data.formInline = this.formInline data = Object.assign({}, this.formInline)
} else { } else {
data = false data = false
} }
@@ -135,7 +135,7 @@ export default {
if (formData) { if (formData) {
// 有数据可以抛出 // 有数据可以抛出
const data = {} const data = {}
data.dataSource = this.dataSource data.otherDraftUserVOS = this.dataSource
data.formInline = formData.formInline data.formInline = formData.formInline
return data return data
} else { } else {
@@ -30,8 +30,8 @@
{{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }} {{ $t('workCenter.enterpriseInitChangePlan.authorizationDepart') }}
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="authorizationDepart"> <a-form-model-item class="item-model" prop="authDept">
<j-select-depart v-model="formInline.authorizationDepart" <j-select-depart v-model="formInline.authDept"
:disabled="disabled" :disabled="disabled"
:backDepart="true" /> :backDepart="true" />
</a-form-model-item> </a-form-model-item>
@@ -195,7 +195,7 @@ export default {
} }
], ],
// 授权部门 // 授权部门
authorizationDepart: [ authDept: [
{ {
required: true, required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.authorizationDepart') + this.$t('cannotEmpty'), message: this.$t('workCenter.enterpriseInitChangePlan.authorizationDepart') + this.$t('cannotEmpty'),
@@ -200,6 +200,10 @@ export default {
}) })
return data return data
}, },
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
},
// 是否可进行评审会 // 是否可进行评审会
reviewMeetingFlagChange () { reviewMeetingFlagChange () {
// 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击 // 选是的话,驳回按钮置灰,不可点击;选否,备注变成必填,内容自动带入“驳回”,下方同意按钮置灰,不可点击