|
@@ -310,6 +310,25 @@
|
|
|
|
|
|
<el-dialog :title="'修改' + textPrice" v-if="openChangePrice" v-model="openChangePrice" width="500">
|
|
|
<el-form :model="changePrice.data" label-width="120px" ref="price">
|
|
|
+ <el-form-item
|
|
|
+ label="定制加工类型"
|
|
|
+ prop="customProcessingType"
|
|
|
+ :rules="[{ required: true, message: '请选择定制加工类型', trigger: 'change' }]"
|
|
|
+ v-if="labelPrice === 'customProcessingFee'">
|
|
|
+ <el-select
|
|
|
+ v-model="changePrice.data.customProcessingType"
|
|
|
+ placeholder="请选择定制加工类型"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
+ @change="changeProcessingType">
|
|
|
+ <el-option :label="'无'" :value="'-1'" />
|
|
|
+ <el-option
|
|
|
+ v-for="itemDict in useUserStore().allDict['processing_layout']"
|
|
|
+ :key="itemDict.dictKey"
|
|
|
+ :label="itemDict.dictValue"
|
|
|
+ :value="itemDict.dictKey" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item :label="textPrice" :prop="labelPrice" :rules="[{ required: true, message: '请输入' + textPrice, trigger: 'blur' }]">
|
|
|
<el-input-number
|
|
|
onmousewheel="return false;"
|
|
@@ -318,7 +337,8 @@
|
|
|
style="width: 100%"
|
|
|
:controls="false"
|
|
|
:min="0"
|
|
|
- :precision="2" />
|
|
|
+ :precision="2"
|
|
|
+ :disabled="(!changePrice.data.customProcessingType || changePrice.data.customProcessingType === '-1') && labelPrice === 'customProcessingFee'" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
@@ -734,6 +754,7 @@ const clickChangePrice = (item, index, label, text) => {
|
|
|
deliveryMaterialsFee: item.deliveryMaterialsFee,
|
|
|
packingLabor: item.packingLabor,
|
|
|
unitPrice: item.unitPrice,
|
|
|
+ customProcessingType: item.customProcessingType,
|
|
|
};
|
|
|
productIndex.value = index;
|
|
|
productIndexBOM.value = null;
|
|
@@ -746,6 +767,9 @@ const submitChangePrice = () => {
|
|
|
if (valid) {
|
|
|
if (productIndexBOM.value === null) {
|
|
|
formData.data.orderSkuList[productIndex.value][labelPrice.value] = changePrice.data[labelPrice.value];
|
|
|
+ if (labelPrice.value === "customProcessingFee") {
|
|
|
+ formData.data.orderSkuList[productIndex.value].customProcessingType = changePrice.data.customProcessingType;
|
|
|
+ }
|
|
|
Promise.all([calculatedAmount()]).then(() => {
|
|
|
proxy.post("/orderInfo/edit", formData.data).then(() => {
|
|
|
ElMessage({ message: "修改完成", type: "success" });
|
|
@@ -776,6 +800,9 @@ const clickChangeBomPrice = (index, item, indexBOM, label, text) => {
|
|
|
textPrice.value = text;
|
|
|
openChangePrice.value = true;
|
|
|
};
|
|
|
+const changeProcessingType = () => {
|
|
|
+ changePrice.data[labelPrice.value] = 0;
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|