[update] 企标流程联调

This commit is contained in:
lideqin
2023-11-01 15:43:17 +08:00
parent e25bbfbc5c
commit d8a44a4ae6
12 changed files with 301 additions and 136 deletions
@@ -24,7 +24,7 @@
@change="event => event.target.value = event.target.value.trim()"
disabled
:maxLength="50"
v-decorator="['processName', validatorRules.processName]" />
v-decorator="['prcName', validatorRules.prcName]" />
</a-form-item>
</a-col>
<a-col :span="12">
@@ -34,7 +34,7 @@
style="width: 100%"
:disabled="disabled"
value-format="YYYY-MM-DD"
v-decorator="['deadlineDate']" />
v-decorator="['dueTime']" />
</a-form-item>
</a-col>
<a-col :span="24">
@@ -44,7 +44,7 @@
:maxLength="500"
:rows="4"
:disabled="disabled"
v-decorator="['processDescription']" />
v-decorator="['prcMes']" />
</a-form-item>
</a-col>
</a-row>
@@ -68,11 +68,11 @@
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
:maxLength="500"
:rows="4"
v-decorator="['remarks', validatorRules.remarks]" />
v-decorator="['commitText', validatorRules.commitText]" />
</a-form-item>
<!--附件-->
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('businessSupport.questionAnswer.attach')">
<j-upload v-decorator="['attachment']" return-id />
<j-upload v-decorator="['commitFile']" return-id />
</a-form-item>
</a-form>
</div>
@@ -134,7 +134,8 @@ const personalInfo = [ // 人员信息的数据
nodeName: '主起草人发起',
nodeRoleName: '发起人',
canChoose: false,
userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
userList: Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')',
fieldName: 'mainDraftUser'
},
{
id: 2,
@@ -142,7 +143,7 @@ const personalInfo = [ // 人员信息的数据
nodeRoleName: '相关人员',
canChoose: true,
chooseType: 'checkbox',
fieldName: ''
fieldName: 'relatedUser'
},
{
id: 3,
@@ -150,7 +151,7 @@ const personalInfo = [ // 人员信息的数据
nodeRoleName: '起草人主管级领导',
canChoose: true,
chooseType: 'radio',
fieldName: ''
fieldName: 'mainDraftUserLeader'
},
{
id: 4,
@@ -158,7 +159,7 @@ const personalInfo = [ // 人员信息的数据
nodeRoleName: '标准化',
canChoose: true,
chooseType: 'radio',
fieldName: ''
fieldName: 'standardizationUser'
},
{
id: 5,
@@ -166,7 +167,7 @@ const personalInfo = [ // 人员信息的数据
nodeRoleName: '起草人主管级上一级领导',
canChoose: true,
chooseType: 'radio',
fieldName: ''
fieldName: 'mainDraftUserLeaderLeader'
}
]
@@ -233,13 +234,13 @@ export default {
},
validatorRules: {
// 流程名称
processName: {
prcName: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }
],
validateTrigger: 'blur'
},
remarks: {
commitText: {
rules: [
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
],
@@ -262,9 +263,9 @@ export default {
this.model = res.result
this.$nextTick(() => {
// 初始化流程信息
this.processInfoForm.setFieldsValue(pick(this.model[0], 'processName', 'deadlineDate', 'processDescription'))
this.processInfoForm.setFieldsValue(pick(this.model[0], 'prcName', 'dueTime', 'prcMes'))
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'remarks', 'attachment'))
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'commitText', 'commitFile'))
})
// 初始化业务基本信息的申请类型和项目类别
this.formInline.applicationCategory = this.model[0].applicationCategory
@@ -289,9 +290,9 @@ export default {
},
// 业务基本信息组件中获取到流程名称改变后的值
processNameChange (value) {
const param = { processName: value }
const param = { prcName: value }
this.$nextTick(() => {
this.processInfoForm.setFieldsValue(pick(param, 'processName'))
this.processInfoForm.setFieldsValue(pick(param, 'prcName'))
})
},
// 保存
@@ -332,6 +333,7 @@ export default {
enStandardChangeSave(arr).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -346,7 +348,7 @@ export default {
const personnelInfo = this.$refs.personnelInfo.stepsData
const personnelObj = {}
for (const item of personnelInfo) {
if (item.fieldName) {
if (item.fieldName && item.canChoose) {
personnelObj[item.fieldName] = item.user
}
}
@@ -365,6 +367,7 @@ export default {
enStandardChangeApproval(arr).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -393,6 +396,7 @@ export default {
enStandardChangeTurnTo(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -413,6 +417,7 @@ export default {
enStandardChangeAgree(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
@@ -425,8 +430,8 @@ export default {
// 驳回
handleReject () {
if (this.loading) return
this.validatorRules.remarks.rules[0].required = true
if (!this.approvalInfoForm.getFieldValue('remarks')) {
this.validatorRules.commitText.rules[0].required = true
if (!this.approvalInfoForm.getFieldValue('commitText')) {
this.$message.warning(this.$t('pleaseEnterRemarks'))
}
this.$nextTick(() => {
@@ -438,16 +443,20 @@ export default {
enStandardChangeReject(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
this.validatorRules.remarks.rules[0].required = false
this.validatorRules.commitText.rules[0].required = false
})
}
})
})
},
goBack () {
this.$router.go(-1)
}
}
}
@@ -7,7 +7,7 @@
:can-drag="true"
:scroll="{x: '100%'}"
ref="table"
rowKey="enterpriseStandardPlanId"
:rowKey="(index) => {return index}"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
@@ -27,12 +27,12 @@
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardNo">
<a-form-model-item class="item-model" prop="standardNumber">
<standard-selection :source="StandardSource.ENTERPRISE.value"
:disabled="disabled"
:disabledSourceSearch="true"
type="radio"
v-model="formInline.enStandardNo"
v-model="formInline.standardNumber"
@listChange="listChange" />
</a-form-model-item>
</div>
@@ -43,9 +43,9 @@
{{ $t('workCenter.enterpriseInitChangePlan.enterpriseStandardName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardName">
<a-form-model-item class="item-model" prop="standardName">
<a-input class="box-input"
v-model="formInline.enStandardName"
v-model="formInline.standardName"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.enterpriseStandardName')" />
@@ -59,10 +59,10 @@
{{ $t('workCenter.enterpriseInitChangePlan.standardGradeClassification') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardClassification">
<a-form-model-item class="item-model" prop="gradeClassification">
<j-dict-select-tag class="box-input"
:disabled="disabled"
v-model="formInline.enStandardClassification"
v-model="formInline.gradeClassification"
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.standardGradeClassification')"
:type="'select'"
:triggerChange="false"
@@ -77,9 +77,9 @@
{{ $t('workCenter.enterpriseInitChangePlan.standardSystem') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardSystem">
<a-form-model-item class="item-model" prop="standardSystem">
<a-tree-select
v-model="formInline.enStandardSystem"
v-model="formInline.standardSystem"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
style="width: 100%"
:disabled="disabled"
@@ -96,10 +96,10 @@
{{ $t('workCenter.enterpriseInitChangePlan.standardEnglishName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="enStandardEnglishName">
<a-form-model-item class="item-model" prop="englishName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.enStandardEnglishName"
v-model="formInline.englishName"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
:placeholder="$t('pleaseEnter')+$t('workCenter.enterpriseInitChangePlan.standardEnglishName')" />
@@ -130,9 +130,9 @@
{{ $t('workCenter.enStandardChange.materialDate') }}
</span>
</div>
<a-form-model-item class="item-model" prop="materialDate">
<a-form-model-item class="item-model" prop="implementationDate">
<a-date-picker
v-model="formInline.materialDate"
v-model="formInline.implementationDate"
:showTime="false"
:disabled="disabled"
value-format="YYYY-MM-DD">
@@ -146,10 +146,10 @@
{{ $t('workCenter.enStandardChange.isTry') }}
</span>
</div>
<a-form-model-item class="item-model" prop="isTry">
<a-form-model-item class="item-model" prop="tryFlag">
<j-dict-select-tag class="box-input"
:disabled="disabled"
v-model="formInline.isTry"
v-model="formInline.tryFlag"
:placeholder="$t('pleaseSelect')+$t('workCenter.enStandardChange.isTry')"
:type="'select'"
:triggerChange="false"
@@ -181,8 +181,8 @@
{{ $t('workCenter.enterpriseInitChangePlan.partName') }}
</span>
</div>
<a-form-model-item class="item-model" prop="componentName">
<a-tree-select v-model="formInline.componentName"
<a-form-model-item class="item-model" prop="partName">
<a-tree-select v-model="formInline.partName"
:disabled="disabled"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
style="width: 100%"
@@ -228,11 +228,11 @@
{{ $t('workCenter.enStandardChange.scopeOfApplication') }}
</span>
</div>
<a-form-model-item class="item-model" prop="scopeOfApplication">
<a-form-model-item class="item-model" prop="standardScope">
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.enStandardChange.scopeOfApplication')"
:maxLength="500"
:disabled="disabled"
v-model="formInline.scopeOfApplication" :rows="4" />
v-model="formInline.standardScope" :rows="4" />
</a-form-model-item>
</div>
<!-- 代替标准号 -->
@@ -349,12 +349,12 @@ export default {
},
watch: {
// 企标编号监视
'formInline.enStandardNo' (value) {
this.$emit('processNameChange', (value || '') + '-' + (this.formInline.enStandardName || '') + '-' + '企标更改')
'formInline.standardNumber' (value) {
this.$emit('processNameChange', (value || '') + '-' + (this.formInline.standardName || '') + '-' + '企标更改')
},
// 企标名称监视
'formInline.enStandardName' (value) {
this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (value || '') + '-' + '企标更改')
'formInline.standardName' (value) {
this.$emit('processNameChange', (this.formInline.standardNumber || '') + '-' + (value || '') + '-' + '企标更改')
}
},
data () {
@@ -365,7 +365,7 @@ export default {
formInline: {},
rules: {
// 企标编号
enStandardNo: [
standardNumber: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.enterpriseStandardNum') + this.$t('cannotEmpty'),
@@ -373,7 +373,7 @@ export default {
}
],
// 标准等级分类
enStandardClassification: [
gradeClassification: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.standardGradeClassification') + this.$t('cannotEmpty'),
@@ -381,7 +381,7 @@ export default {
}
],
// 标准体系
enStandardSystem: [
standardSystem: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.standardSystem') + this.$t('cannotEmpty'),
@@ -397,7 +397,7 @@ export default {
}
],
// 实施日期
materialDate: [
implementationDate: [
{
required: true,
message: this.$t('workCenter.enStandardChange.materialDate') + this.$t('cannotEmpty'),
@@ -405,7 +405,7 @@ export default {
}
],
// 零部件名称
componentName: [
partName: [
{
required: true,
message: this.$t('workCenter.enterpriseInitChangePlan.partName') + this.$t('cannotEmpty'),
@@ -442,9 +442,9 @@ export default {
listChange (value) {
console.log(value)
// 企标名称
this.formInline.enStandardName = value[0].standardName
this.formInline.standardName = value[0].standardName
// 标准等级分类
// this.formInline.enStandardClassification = value[0].
// this.formInline.gradeClassification = value[0].
// 标准体系
// 标准英文名称
// 发布日期