Commit aaefbecc by 张晓玮

Merge branch 'feature/584/zxw' into 'SAAS+V5.8.4'

Feature/584/zxw

See merge request !856
2 parents e9fe013b 11961965
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<span>产品编码</span> <span>产品编码</span>
</div> </div>
<div> <div>
<el-input v-model="batchSetType" <el-input v-model.trim="batchSetType"
maxlength="50" maxlength="50"
placeholder="批量设置产品编码" placeholder="批量设置产品编码"
size="small" size="small"
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<span>质保时间/年</span> <span>质保时间/年</span>
</div> </div>
<div> <div>
<el-input v-model="batchSetWarrantyPeriod" <el-input v-model.trim="batchSetWarrantyPeriod"
placeholder="批量设置质保时间" placeholder="批量设置质保时间"
size="small" size="small"
@input="handleBatchSetWarrantyPeriodInput"> @input="handleBatchSetWarrantyPeriodInput">
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<span>采购成本/元</span> <span>采购成本/元</span>
</div> </div>
<div> <div>
<el-input v-model="batchSetPurchaseCost" <el-input v-model.trim="batchSetPurchaseCost"
placeholder="批量设置采购成本" placeholder="批量设置采购成本"
size="small" size="small"
:disabled="(equitySceneType.includes(goodsInfoData.goodsType) || extendedPosiType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)" :disabled="(equitySceneType.includes(goodsInfoData.goodsType) || extendedPosiType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
<span>运营系数</span> <span>运营系数</span>
</div> </div>
<div> <div>
<el-input v-model="batchSetOperationCoefficient" <el-input v-model.trim="batchSetOperationCoefficient"
placeholder="批量设置运营系数" placeholder="批量设置运营系数"
size="small" size="small"
:disabled="(equitySceneType.includes(goodsInfoData.goodsType) || extendedPosiType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)" :disabled="(equitySceneType.includes(goodsInfoData.goodsType) || extendedPosiType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"
...@@ -1040,8 +1040,10 @@ export default { ...@@ -1040,8 +1040,10 @@ export default {
* 批量设置产品编码 * 批量设置产品编码
*/ */
handleBatchSetTypeInput(val) { handleBatchSetTypeInput(val) {
// 过滤空格,只有有值时才批量设置
const trimmedVal = (val || "").trim();
this.goodsInfoData?.goodsSpecificationList?.forEach((item) => { this.goodsInfoData?.goodsSpecificationList?.forEach((item) => {
item.type = val || ""; item.type = trimmedVal;
}); });
}, },
/** /**
...@@ -1056,8 +1058,10 @@ export default { ...@@ -1056,8 +1058,10 @@ export default {
* 批量设置质保时间 * 批量设置质保时间
*/ */
handleBatchSetWarrantyPeriodInput(val) { handleBatchSetWarrantyPeriodInput(val) {
// 过滤空格,只有有值时才批量设置
const trimmedVal = (val || "").trim();
this.goodsInfoData?.goodsSpecificationList?.forEach((item) => { this.goodsInfoData?.goodsSpecificationList?.forEach((item) => {
item.warrantyPeriod = val || ""; item.warrantyPeriod = trimmedVal;
}); });
}, },
/** /**
...@@ -1069,8 +1073,10 @@ export default { ...@@ -1069,8 +1073,10 @@ export default {
if (isDisabled) { if (isDisabled) {
return; return;
} }
// 过滤空格,只有有值时才批量设置
const trimmedVal = (val || "").trim();
this.goodsInfoData?.goodsSpecificationList?.forEach((item, index) => { this.goodsInfoData?.goodsSpecificationList?.forEach((item, index) => {
item.purchaseCost = val || ""; item.purchaseCost = trimmedVal;
this.updateOperationCostFromInputs(index); this.updateOperationCostFromInputs(index);
}); });
}, },
...@@ -1083,8 +1089,10 @@ export default { ...@@ -1083,8 +1089,10 @@ export default {
if (isDisabled) { if (isDisabled) {
return; return;
} }
// 过滤空格,只有有值时才批量设置
const trimmedVal = (val || "").trim();
this.goodsInfoData?.goodsSpecificationList?.forEach((item, index) => { this.goodsInfoData?.goodsSpecificationList?.forEach((item, index) => {
item.operationCoefficient = val || ""; item.operationCoefficient = trimmedVal;
this.updateOperationCostFromInputs(index); this.updateOperationCostFromInputs(index);
}); });
}, },
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<span>产品名称</span> <span>产品名称</span>
</div> </div>
<div> <div>
<el-input v-model="batchSetSpecificationData" <el-input v-model.trim="batchSetSpecificationData"
placeholder="批量设置产品名称" placeholder="批量设置产品名称"
size="small" size="small"
@input="handleBatchSetSpecificationDataInput"> @input="handleBatchSetSpecificationDataInput">
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<span>产品编码</span> <span>产品编码</span>
</div> </div>
<div> <div>
<el-input v-model="batchSetType" <el-input v-model.trim="batchSetType"
maxlength="50" maxlength="50"
placeholder="批量设置产品编码" placeholder="批量设置产品编码"
size="small" size="small"
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<span>质保时间/年</span> <span>质保时间/年</span>
</div> </div>
<div> <div>
<el-input v-model="batchSetWarrantyPeriod" <el-input v-model.trim="batchSetWarrantyPeriod"
placeholder="批量设置质保时间" placeholder="批量设置质保时间"
size="small" size="small"
@input="handleBatchSetWarrantyPeriodInput"> @input="handleBatchSetWarrantyPeriodInput">
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</div> </div>
<div> <div>
<el-input v-model="batchSetPurchaseCost" <el-input v-model.trim="batchSetPurchaseCost"
placeholder="批量设置采购成本" placeholder="批量设置采购成本"
size="small" size="small"
:disabled="(equitySceneType.includes(goodsInfoData.goodsType) || extendedPosiType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)" :disabled="(equitySceneType.includes(goodsInfoData.goodsType) || extendedPosiType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
</div> </div>
<div> <div>
<el-input v-model="batchSetOperationCoefficient" <el-input v-model.trim="batchSetOperationCoefficient"
placeholder="批量设置运营系数" placeholder="批量设置运营系数"
size="small" size="small"
:disabled="(equitySceneType.includes(goodsInfoData.goodsType) || extendedPosiType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)" :disabled="(equitySceneType.includes(goodsInfoData.goodsType) || extendedPosiType.includes(goodsInfoData.goodsType)) && !baseConfig.supplierCode.includes(`${goodsInfoData.supplierCode}`)"
...@@ -860,18 +860,24 @@ export default { ...@@ -860,18 +860,24 @@ export default {
* 批量设置产品名称 * 批量设置产品名称
*/ */
handleBatchSetSpecificationDataInput(val) { handleBatchSetSpecificationDataInput(val) {
// 过滤空格,只有有值时才批量设置
const trimmedVal = (val || "").trim();
this.goodsInfoData?.goodsSpecificationSingleList?.forEach((item) => { this.goodsInfoData?.goodsSpecificationSingleList?.forEach((item) => {
item.specificationData = val || ""; item.specificationData = trimmedVal;
// 批量设置后将产品名称置为输入框形式 // 批量设置后将产品名称置为输入框形式
if (trimmedVal) {
item.editGoodNameInput = true; item.editGoodNameInput = true;
}
}); });
}, },
/** /**
* 批量设置产品编码 * 批量设置产品编码
*/ */
handleBatchSetTypeInput(val) { handleBatchSetTypeInput(val) {
// 过滤空格,只有有值时才批量设置
const trimmedVal = (val || "").trim();
this.goodsInfoData?.goodsSpecificationSingleList?.forEach((item) => { this.goodsInfoData?.goodsSpecificationSingleList?.forEach((item) => {
item.type = val || ""; item.type = trimmedVal;
}); });
}, },
/** /**
...@@ -886,8 +892,10 @@ export default { ...@@ -886,8 +892,10 @@ export default {
* 批量设置质保时间 * 批量设置质保时间
*/ */
handleBatchSetWarrantyPeriodInput(val) { handleBatchSetWarrantyPeriodInput(val) {
// 过滤空格,只有有值时才批量设置
const trimmedVal = (val || "").trim();
this.goodsInfoData?.goodsSpecificationSingleList?.forEach((item) => { this.goodsInfoData?.goodsSpecificationSingleList?.forEach((item) => {
item.warrantyPeriod = val || ""; item.warrantyPeriod = trimmedVal;
}); });
}, },
/** /**
...@@ -899,8 +907,10 @@ export default { ...@@ -899,8 +907,10 @@ export default {
if (isDisabled) { if (isDisabled) {
return; return;
} }
// 过滤空格,只有有值时才批量设置
const trimmedVal = (val || "").trim();
this.goodsInfoData?.goodsSpecificationSingleList?.forEach((item, index) => { this.goodsInfoData?.goodsSpecificationSingleList?.forEach((item, index) => {
item.purchaseCost = val || ""; item.purchaseCost = trimmedVal;
this.updateOperationCostFromInputs(index); this.updateOperationCostFromInputs(index);
}); });
}, },
...@@ -913,8 +923,10 @@ export default { ...@@ -913,8 +923,10 @@ export default {
if (isDisabled) { if (isDisabled) {
return; return;
} }
// 过滤空格,只有有值时才批量设置
const trimmedVal = (val || "").trim();
this.goodsInfoData?.goodsSpecificationSingleList?.forEach((item, index) => { this.goodsInfoData?.goodsSpecificationSingleList?.forEach((item, index) => {
item.operationCoefficient = val || ""; item.operationCoefficient = trimmedVal;
this.updateOperationCostFromInputs(index); this.updateOperationCostFromInputs(index);
}); });
}, },
......
...@@ -127,8 +127,8 @@ export default { ...@@ -127,8 +127,8 @@ export default {
} }
const goodsTypeRes = await getGoodsCategoryConfiguration({}); const goodsTypeRes = await getGoodsCategoryConfiguration({});
const res = await getDistributeRuleApi(params); const res = await getDistributeRuleApi(params);
if (Array.isArray(res.goodsTypeGroupRules) && Array.isArray(goodsTypeRes?.list || []) && goodsTypeRes?.list.length > 0) { if (Array.isArray(res?.goodsTypeGroupRules) && Array.isArray(goodsTypeRes?.list || []) && goodsTypeRes?.list.length > 0) {
fillGoodsTypesCategoryInfo(res.goodsTypeGroupRules, goodsTypeRes?.list); fillGoodsTypesCategoryInfo(res?.goodsTypeGroupRules, goodsTypeRes?.list);
} }
this.checkDetailItem = res; this.checkDetailItem = res;
}, },
...@@ -143,8 +143,8 @@ export default { ...@@ -143,8 +143,8 @@ export default {
} }
const goodsTypeRes = await getGoodsCategoryConfiguration({}); const goodsTypeRes = await getGoodsCategoryConfiguration({});
const res = await getEffectRuleApi(params); const res = await getEffectRuleApi(params);
if (Array.isArray(res.goodsTypeGroupReconciliationRules) && Array.isArray(goodsTypeRes?.list || []) && goodsTypeRes?.list.length > 0) { if (Array.isArray(res?.goodsTypeGroupReconciliationRules) && Array.isArray(goodsTypeRes?.list || []) && goodsTypeRes?.list.length > 0) {
fillGoodsTypesCategoryInfo(res.goodsTypeGroupReconciliationRules, goodsTypeRes?.list, "goodsTypeGroupRelations"); fillGoodsTypesCategoryInfo(res?.goodsTypeGroupReconciliationRules, goodsTypeRes?.list, "goodsTypeGroupRelations");
} }
this.checkRecordList = res; this.checkRecordList = res;
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!