diff --git a/src/components/Template/BaseInfoFormPackage.vue b/src/components/Template/BaseInfoFormPackage.vue
index b02a9df..4b3dc69 100644
--- a/src/components/Template/BaseInfoFormPackage.vue
+++ b/src/components/Template/BaseInfoFormPackage.vue
@@ -39,7 +39,10 @@
:field-key="prefixKey + '_' + sItem.otherCode" @blur="onBlur(key, $event)"
:item="getOtherItem(sItem)" v-model="formFields[sItem.otherCode]"
@copy="onCopy(sItem, key)" :error="errors[sItem.otherCode]"
- @update:error="errors[sItem.otherCode] = false" />
+ @update:error="errors[sItem.otherCode] = false"
+ :orange-bg="orangeBgFields[sItem.otherCode]"
+ />
+
diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue
index e2eb665..8c19bed 100644
--- a/src/components/Template/HandleFormItem.vue
+++ b/src/components/Template/HandleFormItem.vue
@@ -193,14 +193,8 @@
{{ modificationRecords.length - 1 == index ? "提交" : "修改" }}
-
-
+
原值:{{ record.oldValue }}
+
修改值:{{ record.value }}
备注:{{ record.reason }}
@@ -1293,12 +1287,10 @@ export default {
}else if(this.type === "attachment"){
const attList = JSON.parse(recordValue);
const oldAttList = JSON.parse(recordOldVlaue || "[]");
- const urlList = attList.map(item => {
- return `${item.name}`
- });
- recordValue = urlList.join("、");
- recordOldVlaue = oldAttList.map(item => `${item.name}`).join("、");
+ recordValue = attList.map(item => item.name).join(";");
+ recordOldVlaue = oldAttList.map(item => item.name).join(";");
}
+
const record = {
...baseInfo,
oldValue: recordOldVlaue,
diff --git a/src/components/Template/mixins/formPackageMixins.js b/src/components/Template/mixins/formPackageMixins.js
index b49a519..68a592b 100644
--- a/src/components/Template/mixins/formPackageMixins.js
+++ b/src/components/Template/mixins/formPackageMixins.js
@@ -260,7 +260,7 @@ export default {
}
config[subKey] = { label: currentConfig.label, subKey, type: currentConfig.subType, fillType: currentConfig.subFillType || currentConfig.fillType, selectTo: currentConfig.selectTo }
}
- if(currentConfig.thirdKey){
+ if (currentConfig.thirdKey) {
const { thirdKey } = currentConfig;
if (update) {
result[thirdKey] = formFields[thirdKey] || formData[thirdKey] || '';
@@ -269,7 +269,7 @@ export default {
}
config[thirdKey] = { label: currentConfig.label, thirdKey, type: currentConfig.thirdType, fillType: currentConfig.thirdFillType, selectTo: currentConfig.selectTo }
}
- if(currentConfig.fourthKey){
+ if (currentConfig.fourthKey) {
const { fourthKey } = currentConfig;
if (update) {
result[fourthKey] = formFields[fourthKey] || formData[fourthKey] || '';
@@ -293,6 +293,12 @@ export default {
this.compareFieldsIsEqual(currentValue, compareToValue, currentConfig.subKey)
}
+ if (currentConfig.otherCodeCompareTo && formData[currentConfig.otherCodeCompareTo] && result[currentConfig.otherCode]) {
+ const compareToValue = formData[currentConfig.otherCodeCompareTo];
+ const currentValue = result[currentConfig.otherCode];
+ this.compareFieldsIsEqual(currentValue, compareToValue, currentConfig.otherCode)
+
+ }
});
// 处理可能存在的直接otherCode字段
@@ -350,24 +356,24 @@ export default {
const o = allFieldsConfig[key];
if (o.otherCode) {//
if (o.type === "select") {
- const isSelectedOther = this.isShowOther(formFields[key],o);
+ const isSelectedOther = this.isShowOther(formFields[key], o);
if (!isSelectedOther) {//如果其他选项没有被选择,清空其他字段
formFields[o.otherCode] = "";
}
} else if (o.subType === "select") {
- const isSelectedOther = this.isShowOther(formFields[o.subKey],o);
+ const isSelectedOther = this.isShowOther(formFields[o.subKey], o);
if (!isSelectedOther) {//如果其他选项没有被选择,清空其他字段
formFields[o.otherCode] = "";
}
} else if (o.type === "radioAndOther") {
- const isSelectedOther = this.isShowOtherByRadioAndOther(formFields[key],o);
+ const isSelectedOther = this.isShowOtherByRadioAndOther(formFields[key], o);
if (!isSelectedOther) {//如果其他选项没有被选择,清空其他字段
formFields[o.otherCode] = "";
}
}
}
- if (o.type === "attachment"&&o.fillType === this.templateFillType) {
+ if (o.type === "attachment" && o.fillType === this.templateFillType) {
const attValue = formFields[key];
if (!attValue || attValue == "[]") {
errors.push({
@@ -377,9 +383,9 @@ export default {
});
this.$set(this.errors, key, true);
}
- } else if (o.type === "fqyq" &&o.fillType === this.templateFillType) {
+ } else if (o.type === "fqyq" && o.fillType === this.templateFillType) {
const fqyqValue = formFields[key] || {};
- const {mainRadio, subRadio,inputValue} = fqyqValue;
+ const { mainRadio, subRadio, inputValue } = fqyqValue;
if (!mainRadio) {
errors.push({
field: key,
@@ -388,7 +394,7 @@ export default {
});
this.$set(this.errors, key, true);
} else {
- if (mainRadio==="是") {
+ if (mainRadio === "是") {
if (!subRadio) {
errors.push({
field: key,
@@ -396,7 +402,7 @@ export default {
error: "请选择是否在规定时间完成"
});
this.$set(this.errors, key, true);
- }else if(!inputValue){
+ } else if (!inputValue) {
errors.push({
field: key,
label: o.label,
@@ -408,10 +414,10 @@ export default {
}
continue
- }else if(o.type === "checkboxTree"&&o.fillType === this.templateFillType){
+ } else if (o.type === "checkboxTree" && o.fillType === this.templateFillType) {
const checkboxTreeValue = formFields[key] || {};
- const {checkedValues=[],otherValues = {}} = checkboxTreeValue;;
- const {options = []} = o;
+ const { checkedValues = [], otherValues = {} } = checkboxTreeValue;;
+ const { options = [] } = o;
//需要校验第一层是否有选中项
const parentOptions = options.map(item => item.label);
const isChecked = checkedValues.some(option => {
@@ -420,9 +426,9 @@ export default {
//获取所有选中的选项
const allCheckedOptions = checkedValues.filter(item => item.checked).map(item => item.label);
//再筛选出需要显示其他输入框的选项
- const otherOptions = allCheckedOptions.filter((label)=>isShowOtherByCheckboxTree(label))
+ const otherOptions = allCheckedOptions.filter((label) => isShowOtherByCheckboxTree(label))
const isHasOtherInfo = otherOptions.every(item => otherValues[item]);
- console.log(isChecked,isHasOtherInfo,"isChecked")
+ console.log(isChecked, isHasOtherInfo, "isChecked")
if (!isChecked || !isHasOtherInfo) {
errors.push({
field: key,
@@ -432,12 +438,12 @@ export default {
this.$set(this.errors, key, true);
}
continue
- }else if(o.type === "radioAndOther"&&o.fillType === this.templateFillType){
+ } else if (o.type === "radioAndOther" && o.fillType === this.templateFillType) {
const radioValue = formFields[key] || {};
- const {otherCode} = o;
+ const { otherCode } = o;
const otherValue = formFields[otherCode] || "";
- const isShow = this.isShowOtherByRadioAndOther(radioValue,o)
- if(isShow&&!otherValue){
+ const isShow = this.isShowOtherByRadioAndOther(radioValue, o)
+ if (isShow && !otherValue) {
errors.push({
field: key,
label: o.label,
@@ -460,7 +466,7 @@ export default {
if (o.label === "template.common.other" && !this.isShowOther(formFields[o.parentKey])) {
continue
}
-
+
//span的字段不校验
if (o.type === "span" || o.type === "text" || o.type === "button") {
continue
@@ -532,10 +538,23 @@ export default {
onValueChangeCompareTo(key, val, compKey) {
// compareTo 功能:当fillType==="actFill"时,判断当前值是否与compareTo字段的值一样,如果不一样则将当前input框的背景色标记成橙色
const currentFieldConfig = this.allFieldsConfig[key];
- if (currentFieldConfig && currentFieldConfig.fillType === "actFill" && (currentFieldConfig.compareTo || compKey)) {
- const compareToKey = compKey || currentFieldConfig.compareTo;
- const compareToValue = this.formFields[compareToKey];
- this.compareFieldsIsEqual(val, compareToValue, key);
+ if (currentFieldConfig && currentFieldConfig.fillType === "actFill") {
+ if ((currentFieldConfig.compareTo || compKey)) {
+ const compareToKey = compKey || currentFieldConfig.compareTo;
+ const compareToValue = this.formFields[compareToKey];
+ this.compareFieldsIsEqual(val, compareToValue, key);
+ }
+ if (currentFieldConfig.otherCodeCompareTo && this.formFields[currentFieldConfig.otherCodeCompareTo] && this.formFields[currentFieldConfig.otherCode]) {
+ const compareToValue = this.formFields[currentFieldConfig.otherCodeCompareTo];
+ const currentValue = this.formFields[currentFieldConfig.otherCode];
+ this.compareFieldsIsEqual(currentValue, compareToValue, currentFieldConfig.otherCode)
+ }
+ if(currentFieldConfig.subCompareTo && this.formFields[currentFieldConfig.subCompareTo] && this.formFields[currentFieldConfig.subKey]){
+ const compareToValue = this.formFields[currentFieldConfig.subCompareTo];
+ const currentValue = this.formFields[currentFieldConfig.subKey];
+ this.compareFieldsIsEqual(currentValue, compareToValue, currentFieldConfig.subKey)
+ }
+
}
},
onAttachmentChange(key, val) {
diff --git a/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue b/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue
index b107012..b41874d 100644
--- a/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue
+++ b/src/views/business/comps/template/comps/gsp/DMYPPZJLB.vue
@@ -157,7 +157,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/gsp/GSP001.vue b/src/views/business/comps/template/comps/gsp/GSP001.vue
index 09b5d01..12b7dbb 100644
--- a/src/views/business/comps/template/comps/gsp/GSP001.vue
+++ b/src/views/business/comps/template/comps/gsp/GSP001.vue
@@ -156,7 +156,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/gsp/GSP003.vue b/src/views/business/comps/template/comps/gsp/GSP003.vue
index b8f4e8e..5d526ae 100644
--- a/src/views/business/comps/template/comps/gsp/GSP003.vue
+++ b/src/views/business/comps/template/comps/gsp/GSP003.vue
@@ -179,7 +179,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/gsp/GSP005.vue b/src/views/business/comps/template/comps/gsp/GSP005.vue
index 17c9d55..da5ed1c 100644
--- a/src/views/business/comps/template/comps/gsp/GSP005.vue
+++ b/src/views/business/comps/template/comps/gsp/GSP005.vue
@@ -181,7 +181,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/gsp/GSP009.vue b/src/views/business/comps/template/comps/gsp/GSP009.vue
index 1e9573d..2600afd 100644
--- a/src/views/business/comps/template/comps/gsp/GSP009.vue
+++ b/src/views/business/comps/template/comps/gsp/GSP009.vue
@@ -128,7 +128,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/gsp/GSP010.vue b/src/views/business/comps/template/comps/gsp/GSP010.vue
index 2b87e66..dc83c71 100644
--- a/src/views/business/comps/template/comps/gsp/GSP010.vue
+++ b/src/views/business/comps/template/comps/gsp/GSP010.vue
@@ -135,7 +135,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/lba/LBA002.vue b/src/views/business/comps/template/comps/lba/LBA002.vue
index 1fb262b..8ddc1b2 100644
--- a/src/views/business/comps/template/comps/lba/LBA002.vue
+++ b/src/views/business/comps/template/comps/lba/LBA002.vue
@@ -128,7 +128,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/lba/LBA003.vue b/src/views/business/comps/template/comps/lba/LBA003.vue
index cf7c06d..de1fced 100644
--- a/src/views/business/comps/template/comps/lba/LBA003.vue
+++ b/src/views/business/comps/template/comps/lba/LBA003.vue
@@ -112,7 +112,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/lba/LBA004.vue b/src/views/business/comps/template/comps/lba/LBA004.vue
index c63af97..12e74c0 100644
--- a/src/views/business/comps/template/comps/lba/LBA004.vue
+++ b/src/views/business/comps/template/comps/lba/LBA004.vue
@@ -188,7 +188,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/lba/LBA006.vue b/src/views/business/comps/template/comps/lba/LBA006.vue
index 3fea786..f83cd2c 100644
--- a/src/views/business/comps/template/comps/lba/LBA006.vue
+++ b/src/views/business/comps/template/comps/lba/LBA006.vue
@@ -125,7 +125,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
options: this.getDictOptions('business_pztj')
}
diff --git a/src/views/business/comps/template/comps/lba/LBA008.vue b/src/views/business/comps/template/comps/lba/LBA008.vue
index 8eee88d..1ba72d0 100644
--- a/src/views/business/comps/template/comps/lba/LBA008.vue
+++ b/src/views/business/comps/template/comps/lba/LBA008.vue
@@ -162,7 +162,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/pcr/PCR005.vue b/src/views/business/comps/template/comps/pcr/PCR005.vue
index ff2de9c..33d5f3e 100644
--- a/src/views/business/comps/template/comps/pcr/PCR005.vue
+++ b/src/views/business/comps/template/comps/pcr/PCR005.vue
@@ -166,7 +166,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/pcr/PCR008.vue b/src/views/business/comps/template/comps/pcr/PCR008.vue
index 6c62908..a19777d 100644
--- a/src/views/business/comps/template/comps/pcr/PCR008.vue
+++ b/src/views/business/comps/template/comps/pcr/PCR008.vue
@@ -145,7 +145,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/pcr/PCR009.vue b/src/views/business/comps/template/comps/pcr/PCR009.vue
index d491959..3a15a65 100644
--- a/src/views/business/comps/template/comps/pcr/PCR009.vue
+++ b/src/views/business/comps/template/comps/pcr/PCR009.vue
@@ -162,7 +162,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/pcr/PCR010.vue b/src/views/business/comps/template/comps/pcr/PCR010.vue
index 8ac872a..519da6d 100644
--- a/src/views/business/comps/template/comps/pcr/PCR010.vue
+++ b/src/views/business/comps/template/comps/pcr/PCR010.vue
@@ -147,7 +147,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/pcr/PCR011.vue b/src/views/business/comps/template/comps/pcr/PCR011.vue
index ef9f80b..bf61259 100644
--- a/src/views/business/comps/template/comps/pcr/PCR011.vue
+++ b/src/views/business/comps/template/comps/pcr/PCR011.vue
@@ -147,7 +147,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/pcr/PCR012.vue b/src/views/business/comps/template/comps/pcr/PCR012.vue
index ccefd9e..72c40e4 100644
--- a/src/views/business/comps/template/comps/pcr/PCR012.vue
+++ b/src/views/business/comps/template/comps/pcr/PCR012.vue
@@ -148,7 +148,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/sp/SP001.vue b/src/views/business/comps/template/comps/sp/SP001.vue
index a4def6b..648673f 100644
--- a/src/views/business/comps/template/comps/sp/SP001.vue
+++ b/src/views/business/comps/template/comps/sp/SP001.vue
@@ -157,7 +157,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/sp/SP003.vue b/src/views/business/comps/template/comps/sp/SP003.vue
index 454bd90..0740fdf 100644
--- a/src/views/business/comps/template/comps/sp/SP003.vue
+++ b/src/views/business/comps/template/comps/sp/SP003.vue
@@ -158,7 +158,8 @@ export default {
otherCode: "actOther",
multiple: true,
options: this.getDictOptions('business_pztj'),
- compareTo: "pre"
+ compareTo: "pre",
+ otherCodeCompareTo: "preOther",
}
}
},
diff --git a/src/views/business/comps/template/comps/sp/SP008.vue b/src/views/business/comps/template/comps/sp/SP008.vue
index 296d5ac..647d779 100644
--- a/src/views/business/comps/template/comps/sp/SP008.vue
+++ b/src/views/business/comps/template/comps/sp/SP008.vue
@@ -171,7 +171,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
compareTo: "pre",
multiple: true,
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/sp/SP009.vue b/src/views/business/comps/template/comps/sp/SP009.vue
index 786cd05..76cf980 100644
--- a/src/views/business/comps/template/comps/sp/SP009.vue
+++ b/src/views/business/comps/template/comps/sp/SP009.vue
@@ -175,7 +175,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
compareTo: "pre",
multiple: true,
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/sp/comps/LadderConfig.vue b/src/views/business/comps/template/comps/sp/comps/LadderConfig.vue
index add303a..4788a23 100644
--- a/src/views/business/comps/template/comps/sp/comps/LadderConfig.vue
+++ b/src/views/business/comps/template/comps/sp/comps/LadderConfig.vue
@@ -268,7 +268,9 @@ export default {
}
},
bodySelectChange(data) {
- this.paralleUpdateTargetStartSolutionVolume(data.item, data.headerSelectFields, data.dataSource);
+ if(this.configType === "paralle"){//只有平行配置才需要更新体积
+ this.paralleUpdateTargetStartSolutionVolume(data.item, data.headerSelectFields, data.dataSource);
+ }
},
//平行配置更新体积
paralleUpdateTargetStartSolutionVolume(item, headerSelectFields, dataSource) {
@@ -277,8 +279,8 @@ export default {
const params = {
headerSelectFields,
subTargetStartSolution,
- dataSource,
}
+
if (volumne) {
this.updateTargetStartSolutionVolume(item, volumne, params);
}
@@ -303,7 +305,7 @@ export default {
const { targetStartSolution, subTargetStartSolution } = this.$refs.formPackageRef?.getFilledFormData();
const params = {
subTargetStartSolution,
- headerSelectFields
+ headerSelectFields,
}
this.batchUpdateTargetStartSolutionVolume(dataSource, targetStartSolution, params)
} else {
diff --git a/src/views/business/comps/template/comps/yp/YP003.vue b/src/views/business/comps/template/comps/yp/YP003.vue
index 6a762c8..3bc7b79 100644
--- a/src/views/business/comps/template/comps/yp/YP003.vue
+++ b/src/views/business/comps/template/comps/yp/YP003.vue
@@ -10,25 +10,18 @@
ref="baseInfoRef" :formConfig="baseInfoFormConfig" :formData="formData" />
-
+
-
+
-
+
-
+
-
+
@@ -58,7 +52,7 @@ import ImportExcelDialog from '../../dialog/ImportExcelDialog'
export default {
name: "YP003",
- components: { ImportExcelDialog,BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable,TableOpertaionDelete },
+ components: { ImportExcelDialog, BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaionDelete },
mixins: [templateMixin],
props: {
fillType: {
@@ -136,10 +130,10 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther", otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
- options: this.getDictOptions('business_pztj')
+ options: this.getDictOptions('business_pztj'),
}
}
},
@@ -181,18 +175,18 @@ export default {
bodyFillType: 'actFill',
width: 100,
bodyMaxlength: 50,
- },{
+ }, {
label: 'template.yp.yp003.dwbh',
prop: 'dwbh',
bodyType: 'checkboxTag',
bodyFillType: 'actFill',
- bodySubType:"button",
- bodySubFillType:"preFill",
- bodySubButtonName:"template.common.importTemplate",
- bodySubKey:"exportBtn",
- showBodySub:this.fillType === "preFill",
+ bodySubType: "button",
+ bodySubFillType: "preFill",
+ bodySubButtonName: "template.common.importTemplate",
+ bodySubKey: "exportBtn",
+ showBodySub: this.fillType === "preFill",
width: 280,
- },{
+ }, {
label: 'template.yp.yp003.ypsl',
prop: 'ypsl',
bodyType: 'input',
@@ -212,19 +206,19 @@ export default {
},
methods: {
// 点击按钮
- handleClickButton(key,rowIndex,colIndex,e,data){
- if(key === "exportBtn"){
+ handleClickButton(key, rowIndex, colIndex, e, data) {
+ if (key === "exportBtn") {
this.currentRowIndex = rowIndex;
this.$refs.ImportExcelDialog.show()
}
},
//获取已填写的表单数据
getFilledFormData() {
- return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "fqyqRef","remarkRef"])
+ return this.getFilledFormDataByRefs(["baseInfoRef", "tableRef", "stepRef", "fqyqRef", "remarkRef"])
},
//获取填写完成的表单数据
async getFormData() {
- let content = await this.validFormFields(["baseInfoRef", "tableRef", "stepRef", "fqyqRef","remarkRef"]);
+ let content = await this.validFormFields(["baseInfoRef", "tableRef", "stepRef", "fqyqRef", "remarkRef"]);
return content;
},
getResource() {
@@ -253,28 +247,27 @@ export default {
},
onLoadExcelData(excelData) {
const data = excelData.splice(1);
- const tagData = data.map((item)=>{
+ const tagData = data.map((item) => {
return {
- checked:undefined,
- tagValue:item[0],
+ checked: undefined,
+ tagValue: item[0],
}
})
- this.$refs.tableRef.updateDataSourceByRowIndex(this.currentRowIndex,{dwbh:tagData});
+ this.$refs.tableRef.updateDataSourceByRowIndex(this.currentRowIndex, { dwbh: tagData });
this.$refs.tableRef.onErrorUpdate(this.currentRowIndex, 1, 'dwbh', false)
this.$refs.ImportExcelDialog.cancel()
setTimeout(() => {
this.justUpdateFilledFormData();
}, 100);
},
- downloadExcelTemplate(arr){
+ downloadExcelTemplate(arr) {
this.exportExcel(arr)
},
- onCheckboxTagChange(rowIndex,colIndex,data){
- const num = data.filter((item)=>item.checked).length;
- this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex, {'ypsl':num})
+ onCheckboxTagChange(rowIndex, colIndex, data) {
+ const num = data.filter((item) => item.checked).length;
+ this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex, { 'ypsl': num })
}
}
};
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/views/business/comps/template/comps/yp/YP004.vue b/src/views/business/comps/template/comps/yp/YP004.vue
index 5335fa9..49e14b7 100644
--- a/src/views/business/comps/template/comps/yp/YP004.vue
+++ b/src/views/business/comps/template/comps/yp/YP004.vue
@@ -114,7 +114,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/comps/yp/YP005.vue b/src/views/business/comps/template/comps/yp/YP005.vue
index f336e57..7a2bc42 100644
--- a/src/views/business/comps/template/comps/yp/YP005.vue
+++ b/src/views/business/comps/template/comps/yp/YP005.vue
@@ -119,7 +119,7 @@ export default {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
- otherCode: "actOther",
+ otherCode: "actOther",otherCodeCompareTo: "preOther",
multiple: true,
compareTo: "pre",
options: this.getDictOptions('business_pztj')
diff --git a/src/views/business/comps/template/mixins/templateMixin.js b/src/views/business/comps/template/mixins/templateMixin.js
index 16a59e2..f9c0162 100644
--- a/src/views/business/comps/template/mixins/templateMixin.js
+++ b/src/views/business/comps/template/mixins/templateMixin.js
@@ -655,7 +655,8 @@ export default {
const { targetSolutionConcentrationUnit, targetSolutionVolumeUnit, targetStartSolutionVolumeUnit, targetDiluentVolumeUnit } = headerSelectFields
let initNd = volume,unit = subTargetStartSolution;
- if (rowIndex > 0) {
+ //平行配置不会传dataSource;
+ if (rowIndex > 0 && dataSource.length > 0) {
initNd = dataSource[rowIndex - 1].targetSolutionConcentration;
unit = targetSolutionConcentrationUnit;
}