Browse Source

fix:[模板管理]GSP005

ouqian
15881625488@163.com 1 month ago
parent
commit
a0ea62038b
1 changed files with 67 additions and 9 deletions
  1. +67
    -9
      src/views/business/comps/template/comps/gsp/GSP005.vue

+ 67
- 9
src/views/business/comps/template/comps/gsp/GSP005.vue View File

@ -40,6 +40,8 @@
</div>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps"
:ref="`formZlConfigFormPackageRef_${zlIndex}`" :formConfig="formZlConfig"
@beforeReagentSubmit="(data) => onTableBeforeReagentZlSubmit(data, zlIndex, formZlConfig)"
@onRegentSubmit="(data) => onTableRegentZlSubmit(zlIndex, data)"
:formData="formzlConfig" />
<Step class="mt-0 s-container" :ref="`formZlStepRef_${zlIndex}`"
:formData="formzlConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')"
@ -66,6 +68,8 @@
</div>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps"
:ref="`formRyConfigFormPackageRef_${ryIndex}`" :formConfig="formRyConfig"
@beforeReagentSubmit="(data) => onTableBeforeReagentRySubmit(data, ryIndex, formRyConfig)"
@onRegentSubmit="(data) => onTableRegentRySubmit(ryIndex, data)"
:formData="formryConfig" />
<Step class="mt-0 s-container" :ref="`formRyStepRef_${ryIndex}`"
:formData="formryConfig.stepData" :fieldItemLabel="$t('template.common.jtpz')"
@ -95,6 +99,7 @@ import { EventBus } from "@/utils/eventBus";
import { uniqeResource } from "@/utils/calUnitTools";
import { debounce } from 'lodash-es'
import { duplicateResource, getExpireDate } from "@/utils/index.js";
import { isCommonUnit } from "@/utils/conTools";
export default {
name: "GSP005",
@ -277,14 +282,14 @@ export default {
pzkssj: {
label: 'template.gsp.GSP005.pzkssj',
type: "input",
bodyDisabled: true,
disabled: true,
fillType: "actFill",
maxlength: 20
},
pzjssj: {
label: 'template.gsp.GSP005.pzjssj',
type: "input",
bodyDisabled: true,
disabled: true,
fillType: "actFill",
maxlength: 20
},
@ -298,7 +303,7 @@ export default {
sywzbhph: {
label: 'template.gsp.GSP005.sywzbhph',
type: "input",
subType: "input",
subType: 'mix',
subKey: "sywzbhphSub",
fillType: "preFill",
subFillType: "actFill",
@ -326,7 +331,8 @@ export default {
subKey: "sywzyjclzUnit",
fillType: "preFill",
subOptions: this.getDictOptions('business_zldw'),
maxlength: 10
maxlength: 10,
selectTo: "sywzsjclzUnit",//
},
sywzsjclz: {
label: 'template.gsp.GSP005.sywzsjclz',
@ -342,7 +348,7 @@ export default {
label: 'template.gsp.GSP005.rjbhph',
type: "input",
fillType: "preFill",
subType: 'mix',
subType: 'sj',
subKey: 'rjbhphSub',
subFillType: 'actFill',
maxlength: 20,
@ -361,6 +367,7 @@ export default {
fillType: "preFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
selectTo: "rjsjtjUnit",//
maxlength: 10
},
rjsjtj: {
@ -457,14 +464,14 @@ export default {
pzkssj: {
label: 'template.gsp.GSP005.pzkssj',
type: "input",
bodyDisabled: true,
disabled: true,
fillType: "actFill",
maxlength: 20
},
pzjssj: {
label: 'template.gsp.GSP005.pzjssj',
type: "input",
bodyDisabled: true,
disabled: true,
fillType: "actFill",
maxlength: 20
},
@ -478,7 +485,7 @@ export default {
yrybhph: {
label: 'template.gsp.GSP005.yrybhph',
type: "input",
subType: "input",
subType: 'mix',
subKey: "yrybhphSub",
fillType: "preFill",
subFillType: "actFill",
@ -501,6 +508,7 @@ export default {
fillType: "preFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
selectTo: "yrysjtjUnit",//
maxlength: 10
},
yrysjtj: {
@ -521,6 +529,7 @@ export default {
fillType: "preFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
selectTo: "yrysjndUnit",//
maxlength: 10
},
yrysjnd: {
@ -543,7 +552,7 @@ export default {
label: 'template.gsp.GSP005.rjbhph',
type: "input",
fillType: "preFill",
subType: 'mix',
subType: 'sj',
subKey: 'rjbhphSub',
subFillType: 'actFill',
maxlength: 20,
@ -562,6 +571,7 @@ export default {
fillType: "preFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
selectTo: "rjsjtjUnit",//
maxlength: 10
},
rjsjtj: {
@ -604,6 +614,54 @@ export default {
}
},
methods: {
//
onTableBeforeReagentRySubmit(data, zlIndex, formZlConfig) {
const { selectData, callback, key, formFields } = data;
///
if (key === "yrybhphSub" && !isCommonUnit(selectData.row.kcdw, [formFields.yrysjtjUnit])) {
callback.prevent('库存单位与预制不符,请重新选择或申请废止并重新预制。');
}
///
if (key === "rjbhphSub" && !isCommonUnit(selectData.row.kcdw, [formFields.rjsjtjUnit])) {
callback.prevent('库存单位与预制不符,请重新选择或申请废止并重新预制。');
}
},
onTableRegentRySubmit(zlIndex, data) {
if (data.key === 'yrybhphSub') {
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubType', data.selectInfo.selectType)
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrybhphSubKcdw', data.selectInfo.row.kcdw)
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('yrymc', data.selectInfo.row.mc)
}
if (data.key === 'rjbhphSub') {
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubType', data.selectInfo.selectType)
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubKcdw', data.selectInfo.row.kcdw)
this.$refs[`formRyConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc)
}
},
//
onTableBeforeReagentZlSubmit(data, zlIndex, formZlConfig) {
const { selectData, callback, key, formFields } = data;
///
if (key === "rjbhphSub" && !isCommonUnit(selectData.row.kcdw, [formFields.rjsjtjUnit])) {
callback.prevent('库存单位与预制不符,请重新选择或申请废止并重新预制。');
}
///
if (key === "sywzbhphSub" && !isCommonUnit(selectData.row.kcdw, [formFields.sywzsjclzUnit])) {
callback.prevent('库存单位与预制不符,请重新选择或申请废止并重新预制。');
}
},
onTableRegentZlSubmit(zlIndex, data) {
if (data.key === 'sywzbhphSub') {
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubType', data.selectInfo.selectType)
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzbhphSubKcdw', data.selectInfo.row.kcdw)
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('sywzmcSub', data.selectInfo.row.mc)
}
if (data.key === 'rjbhphSub') {
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubType', data.selectInfo.selectType)
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjbhphSubKcdw', data.selectInfo.row.kcdw)
this.$refs[`formZlConfigFormPackageRef_${zlIndex}`][0].updateFormData('rjmc', data.selectInfo.row.mc)
}
},
//
handleAddFormZlConfig() {
if (!this.formData.formZlConfigs) {

Loading…
Cancel
Save