Parcourir la source

订单整改, 双面时,加工费为双倍

lxf il y a 1 an
Parent
commit
7a77d8826f

+ 82 - 174
src/views/group/order/management/detail.vue

@@ -95,8 +95,7 @@
                                 style="width: 100%"
                                 :controls="false"
                                 :min="0"
-                                :precision="0"
-                                @change="changeQuantity(index)" />
+                                :precision="0" />
                             </el-form-item>
                           </div>
                           <div style="line-height: 35px">
@@ -173,7 +172,7 @@
                           </div>
                           <div style="line-height: 35px">
                             <span style="color: black; font-weight: 700">小计: </span>
-                            <span>{{ item.subtotal }}</span>
+                            <span>{{ getSubtotal(item) }}</span>
                           </div>
                           <div style="line-height: 35px">
                             <span style="width: 37px; color: black; font-weight: 700">打印: </span>
@@ -213,7 +212,6 @@
                                 v-if="row.productionDocument">
                                 {{ row.productionDocument }}
                               </a>
-                              <!-- <el-button type="primary" style="transform: translateY(-2px)" @click="clickDrawingFile(index)" text>选择文件</el-button> -->
                             </div>
                           </div>
                         </el-form-item>
@@ -251,8 +249,7 @@
                                     placeholder="数量"
                                     style="width: 100%"
                                     :controls="false"
-                                    :min="0"
-                                    @change="calculatedAmount()" />
+                                    :min="0" />
                                 </el-form-item>
                               </template>
                             </el-table-column>
@@ -301,16 +298,20 @@
         <template #totalMonet>
           <div style="width: 100%; margin-left: 30px">
             <div>
-              <span style="font-weight: 700; color: #6c88f1">产品总金额: ¥{{ moneyFormat(formData.data.productTotalAmount, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">定制加工费: ¥{{ moneyFormat(formData.data.customProcessingFee, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">代发费: ¥{{ moneyFormat(formData.data.lssueFee, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">快递包材费: ¥{{ moneyFormat(formData.data.deliveryMaterialsFee, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包装人工费: ¥{{ moneyFormat(formData.data.packingLabor, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包材费: ¥{{ moneyFormat(formData.data.packagingMaterialCost, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">管理费: ¥{{ moneyFormat(formData.data.managementFee, 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1">产品总金额: ¥{{ moneyFormat(calculatedAmount("unitPrice"), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">
+                定制加工费: ¥{{ moneyFormat(calculatedAmount("customProcessingFee"), 2) }}
+              </span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">代发费: ¥{{ moneyFormat(calculatedAmount("lssueFee"), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">
+                快递包材费: ¥{{ moneyFormat(calculatedAmount("deliveryMaterialsFee"), 2) }}
+              </span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包装人工费: ¥{{ moneyFormat(calculatedAmount("packingLabor"), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包材费: ¥{{ moneyFormat(calculatedPackagingMaterialCost(), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">管理费: ¥{{ moneyFormat(calculatedAmount("managementFee"), 2) }}</span>
             </div>
             <div style="padding: 8px 0 0 0">
-              <span style="font-weight: 700; color: red">订单总金额(含税): ¥{{ moneyFormat(formData.data.totalAmount, 2) }}</span>
+              <span style="font-weight: 700; color: red">订单总金额(含税): ¥{{ moneyFormat(calculatedTotalAmount(), 2) }}</span>
             </div>
           </div>
         </template>
@@ -470,16 +471,6 @@ const formConfig = computed(() => {
       prop: "totalMonet",
       slotName: "totalMonet",
     },
-    // {
-    //   type: "title",
-    //   title: "附件",
-    //   label: "",
-    // },
-    // {
-    //   type: "slot",
-    //   slotName: "attachments",
-    //   label: "附件",
-    // },
     {
       type: "title",
       title: "订单备注",
@@ -562,45 +553,6 @@ const getOrderDetail = (parameter) => {
       activeNames.value = allIndex;
       formOption.disabled = true;
     }
-    if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
-      for (let i = 0; i < formData.data.orderSkuList.length; i++) {
-        let subtotal = 0;
-        let packagingMaterialCost = 0;
-        if (formData.data.orderSkuList[i].quantity) {
-          subtotal = Number(
-            Math.round(
-              (formData.data.orderSkuList[i].customProcessingFee +
-                formData.data.orderSkuList[i].deliveryMaterialsFee +
-                formData.data.orderSkuList[i].lssueFee +
-                formData.data.orderSkuList[i].packingLabor +
-                formData.data.orderSkuList[i].managementFee +
-                formData.data.orderSkuList[i].unitPrice) *
-                formData.data.orderSkuList[i].quantity *
-                100
-            ) / 100
-          );
-          if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
-            for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
-              if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
-                packagingMaterialCost = Number(
-                  Math.round(
-                    (packagingMaterialCost +
-                      formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) *
-                      100
-                  ) / 100
-                );
-              }
-            }
-          }
-        }
-        formData.data.orderSkuList[i].subtotal = subtotal;
-        formData.data.orderSkuList[i].packagingMaterialCost = packagingMaterialCost;
-      }
-    }
-    let list = [res.id];
-    if (res.orderSkuList && res.orderSkuList.length > 0) {
-      list = list.concat(res.orderSkuList.map((item) => item.id));
-    }
   });
 };
 const getStyle = (text) => {
@@ -620,104 +572,6 @@ const printType = ref([
     dictValue: "双面",
   },
 ]);
-const changeQuantity = (index) => {
-  if (formData.data.orderSkuList[index].quantity) {
-    proxy
-      .post("/orderInfo/getSkuSpecPrice", { skuSpecId: formData.data.orderSkuList[index].skuSpecId, quantity: formData.data.orderSkuList[index].quantity })
-      .then((res) => {
-        formData.data.orderSkuList[index].customProcessingFee = res.customProcessingFee;
-        formData.data.orderSkuList[index].customProcessingType = res.customProcessingType;
-        formData.data.orderSkuList[index].deliveryMaterialsFee = res.deliveryMaterialsFee;
-        formData.data.orderSkuList[index].lssueFee = res.lssueFee;
-        formData.data.orderSkuList[index].packingLabor = res.packingLabor;
-        formData.data.orderSkuList[index].managementFee = res.managementFee;
-        formData.data.orderSkuList[index].unitPrice = res.unitPrice;
-        formData.data.orderSkuList[index].subtotal = Number(
-          Math.round(
-            (res.customProcessingFee + res.deliveryMaterialsFee + res.lssueFee + res.packingLabor + res.managementFee + res.unitPrice) *
-              formData.data.orderSkuList[index].quantity *
-              100
-          ) / 100
-        );
-        calculatedAmount();
-      });
-  }
-};
-const calculatedAmount = () => {
-  let productTotalAmount = 0;
-  let customProcessingFee = 0;
-  let lssueFee = 0;
-  let deliveryMaterialsFee = 0;
-  let packingLabor = 0;
-  let managementFee = 0;
-  let packagingMaterialCost = 0;
-  let totalAmount = 0;
-  if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
-    for (let i = 0; i < formData.data.orderSkuList.length; i++) {
-      if (formData.data.orderSkuList[i].quantity) {
-        if (formData.data.orderSkuList[i].customProcessingFee) {
-          customProcessingFee = Number(
-            Math.round((customProcessingFee + formData.data.orderSkuList[i].customProcessingFee * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        if (formData.data.orderSkuList[i].lssueFee) {
-          lssueFee = Number(Math.round((lssueFee + formData.data.orderSkuList[i].lssueFee * formData.data.orderSkuList[i].quantity) * 100) / 100);
-        }
-        if (formData.data.orderSkuList[i].deliveryMaterialsFee) {
-          deliveryMaterialsFee = Number(
-            Math.round((deliveryMaterialsFee + formData.data.orderSkuList[i].deliveryMaterialsFee * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        if (formData.data.orderSkuList[i].packingLabor) {
-          packingLabor = Number(Math.round((packingLabor + formData.data.orderSkuList[i].packingLabor * formData.data.orderSkuList[i].quantity) * 100) / 100);
-        }
-        if (formData.data.orderSkuList[i].managementFee) {
-          managementFee = Number(
-            Math.round((managementFee + formData.data.orderSkuList[i].managementFee * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        if (formData.data.orderSkuList[i].unitPrice) {
-          productTotalAmount = Number(
-            Math.round((productTotalAmount + formData.data.orderSkuList[i].unitPrice * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        let money = 0;
-        if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
-          for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
-            if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
-              packagingMaterialCost = Number(
-                Math.round(
-                  (packagingMaterialCost +
-                    formData.data.orderSkuList[i].orderSkuBomList[j].quantity *
-                      formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice *
-                      formData.data.orderSkuList[i].quantity) *
-                    100
-                ) / 100
-              );
-              money = Number(
-                Math.round(
-                  (money + formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) * 100
-                ) / 100
-              );
-            }
-          }
-        }
-        formData.data.orderSkuList[i].packagingMaterialCost = money;
-      }
-    }
-  }
-  formData.data.productTotalAmount = productTotalAmount;
-  formData.data.customProcessingFee = customProcessingFee;
-  formData.data.lssueFee = lssueFee;
-  formData.data.deliveryMaterialsFee = deliveryMaterialsFee;
-  formData.data.packingLabor = packingLabor;
-  formData.data.managementFee = managementFee;
-  formData.data.packagingMaterialCost = packagingMaterialCost;
-  totalAmount = Number(
-    Math.round((productTotalAmount + customProcessingFee + lssueFee + deliveryMaterialsFee + packingLabor + managementFee + packagingMaterialCost) * 100) / 100
-  );
-  formData.data.totalAmount = totalAmount;
-};
 const changePrice = reactive({
   data: {},
 });
@@ -743,28 +597,82 @@ const clickChangePrice = (item, index, label, text) => {
   openChangePrice.value = true;
 };
 const submitChangePrice = () => {
-  proxy.$refs.price.validate((valid) => {
+  proxy.$refs.price.validate(async (valid) => {
     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" });
-            openChangePrice.value = false;
-            getOrderDetail({ id: route.query.id || route.query.detailId });
-          });
+        if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
+          for (let i = 0; i < formData.data.orderSkuList.length; i++) {
+            let packagingMaterialCost = 0;
+            if (formData.data.orderSkuList[i].quantity) {
+              if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
+                for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
+                  if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
+                    packagingMaterialCost = Number(
+                      Math.round(
+                        (packagingMaterialCost +
+                          formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) *
+                          100
+                      ) / 100
+                    );
+                  }
+                }
+              }
+            }
+            formData.data.orderSkuList[i].packagingMaterialCost = packagingMaterialCost;
+          }
+        }
+        formData.data.productTotalAmount = calculatedAmount("unitPrice");
+        formData.data.customProcessingFee = calculatedAmount("customProcessingFee");
+        formData.data.lssueFee = calculatedAmount("lssueFee");
+        formData.data.deliveryMaterialsFee = calculatedAmount("deliveryMaterialsFee");
+        formData.data.packingLabor = calculatedAmount("packingLabor");
+        formData.data.managementFee = calculatedAmount("managementFee");
+        formData.data.packagingMaterialCost = calculatedPackagingMaterialCost();
+        formData.data.totalAmount = await calculatedTotalAmount();
+        proxy.post("/orderInfo/edit", formData.data).then(() => {
+          ElMessage({ message: "修改完成", type: "success" });
+          openChangePrice.value = false;
+          getOrderDetail({ id: route.query.id || route.query.detailId });
         });
       } else {
         formData.data.orderSkuList[productIndex.value].orderSkuBomList[productIndexBOM.value][labelPrice.value] = changePrice.data[labelPrice.value];
-        Promise.all([calculatedAmount()]).then(() => {
-          proxy.post("/orderInfo/edit", formData.data).then(() => {
-            ElMessage({ message: "修改完成", type: "success" });
-            openChangePrice.value = false;
-            getOrderDetail({ id: route.query.id || route.query.detailId });
-          });
+        if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
+          for (let i = 0; i < formData.data.orderSkuList.length; i++) {
+            let packagingMaterialCost = 0;
+            if (formData.data.orderSkuList[i].quantity) {
+              if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
+                for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
+                  if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
+                    packagingMaterialCost = Number(
+                      Math.round(
+                        (packagingMaterialCost +
+                          formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) *
+                          100
+                      ) / 100
+                    );
+                  }
+                }
+              }
+            }
+            formData.data.orderSkuList[i].packagingMaterialCost = packagingMaterialCost;
+          }
+        }
+        formData.data.productTotalAmount = calculatedAmount("unitPrice");
+        formData.data.customProcessingFee = calculatedAmount("customProcessingFee");
+        formData.data.lssueFee = calculatedAmount("lssueFee");
+        formData.data.deliveryMaterialsFee = calculatedAmount("deliveryMaterialsFee");
+        formData.data.packingLabor = calculatedAmount("packingLabor");
+        formData.data.managementFee = calculatedAmount("managementFee");
+        formData.data.packagingMaterialCost = calculatedPackagingMaterialCost();
+        formData.data.totalAmount = await calculatedTotalAmount();
+        proxy.post("/orderInfo/edit", formData.data).then(() => {
+          ElMessage({ message: "修改完成", type: "success" });
+          openChangePrice.value = false;
+          getOrderDetail({ id: route.query.id || route.query.detailId });
         });
       }
     }

+ 108 - 150
src/views/subsidiary/order/management/add.vue

@@ -128,7 +128,7 @@
                           </div>
                           <div style="line-height: 35px">
                             <span style="color: black; font-weight: 700">小计: </span>
-                            <span>{{ item.subtotal }}</span>
+                            <span>{{ getSubtotal(item) }}</span>
                           </div>
                           <div style="line-height: 35px">
                             <span style="width: 37px; color: black; font-weight: 700">打印: </span>
@@ -137,7 +137,7 @@
                               :rules="rules.printType"
                               :inline-message="true"
                               style="width: calc(100% - 37px)">
-                              <el-radio-group v-model="item.printType">
+                              <el-radio-group v-model="item.printType" @change="changeQuantity(index)">
                                 <el-radio v-for="(itemType, index) in printType" :key="index" :label="itemType.dictKey">{{ itemType.dictValue }}</el-radio>
                               </el-radio-group>
                             </el-form-item>
@@ -233,8 +233,7 @@
                                     placeholder="数量"
                                     style="width: 100%"
                                     :controls="false"
-                                    :min="0"
-                                    @change="calculatedAmount()" />
+                                    :min="0" />
                                 </el-form-item>
                               </template>
                             </el-table-column>
@@ -304,16 +303,20 @@
         <template #totalMonet>
           <div style="width: 100%; margin-left: 30px">
             <div>
-              <span style="font-weight: 700; color: #6c88f1">产品总金额: ¥{{ moneyFormat(formData.data.productTotalAmount, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">定制加工费: ¥{{ moneyFormat(formData.data.customProcessingFee, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">代发费: ¥{{ moneyFormat(formData.data.lssueFee, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">快递包材费: ¥{{ moneyFormat(formData.data.deliveryMaterialsFee, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包装人工费: ¥{{ moneyFormat(formData.data.packingLabor, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包材费: ¥{{ moneyFormat(formData.data.packagingMaterialCost, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">管理费: ¥{{ moneyFormat(formData.data.managementFee, 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1">产品总金额: ¥{{ moneyFormat(calculatedAmount("unitPrice"), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">
+                定制加工费: ¥{{ moneyFormat(calculatedAmount("customProcessingFee"), 2) }}
+              </span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">代发费: ¥{{ moneyFormat(calculatedAmount("lssueFee"), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">
+                快递包材费: ¥{{ moneyFormat(calculatedAmount("deliveryMaterialsFee"), 2) }}
+              </span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包装人工费: ¥{{ moneyFormat(calculatedAmount("packingLabor"), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包材费: ¥{{ moneyFormat(calculatedPackagingMaterialCost(), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">管理费: ¥{{ moneyFormat(calculatedAmount("managementFee"), 2) }}</span>
             </div>
             <div style="padding: 8px 0 0 0">
-              <span style="font-weight: 700; color: red">订单总金额(含税): ¥{{ moneyFormat(formData.data.totalAmount, 2) }}</span>
+              <span style="font-weight: 700; color: red">订单总金额(含税): ¥{{ moneyFormat(calculatedTotalAmount(), 2) }}</span>
             </div>
           </div>
         </template>
@@ -465,16 +468,6 @@ const formConfig = computed(() => {
       prop: "totalMonet",
       slotName: "totalMonet",
     },
-    // {
-    //   type: "title",
-    //   title: "附件",
-    //   label: "",
-    // },
-    // {
-    //   type: "slot",
-    //   slotName: "attachments",
-    //   label: "附件",
-    // },
     {
       type: "title",
       title: "订单备注",
@@ -530,7 +523,6 @@ const updatePackageRemark = (val, index) => {
 };
 const clickDelete = (index) => {
   formData.data.orderSkuList.splice(index, 1);
-  calculatedAmount();
 };
 const updateValue = (val) => {
   formData.data.remark = val;
@@ -545,7 +537,32 @@ const submitForm = (status) => {
         if (!formData.data.orderSkuList[i].productionDocument) {
           return ElMessage("请选择生产文件");
         }
+        let packagingMaterialCost = 0;
+        if (formData.data.orderSkuList[i].quantity) {
+          if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
+            for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
+              if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
+                packagingMaterialCost = Number(
+                  Math.round(
+                    (packagingMaterialCost +
+                      formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) *
+                      100
+                  ) / 100
+                );
+              }
+            }
+          }
+        }
+        formData.data.orderSkuList[i].packagingMaterialCost = packagingMaterialCost;
       }
+      formData.data.productTotalAmount = calculatedAmount("unitPrice");
+      formData.data.customProcessingFee = calculatedAmount("customProcessingFee");
+      formData.data.lssueFee = calculatedAmount("lssueFee");
+      formData.data.deliveryMaterialsFee = calculatedAmount("deliveryMaterialsFee");
+      formData.data.packingLabor = calculatedAmount("packingLabor");
+      formData.data.managementFee = calculatedAmount("managementFee");
+      formData.data.packagingMaterialCost = calculatedPackagingMaterialCost();
+      formData.data.totalAmount = calculatedTotalAmount();
       formData.data.status = status;
       let type = "add";
       if (formData.data.id) {
@@ -608,45 +625,6 @@ const getOrderDetail = (parameter) => {
       activeNames.value = allIndex;
       formOption.disabled = true;
     }
-    if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
-      for (let i = 0; i < formData.data.orderSkuList.length; i++) {
-        let subtotal = 0;
-        let packagingMaterialCost = 0;
-        if (formData.data.orderSkuList[i].quantity) {
-          subtotal = Number(
-            Math.round(
-              (formData.data.orderSkuList[i].customProcessingFee +
-                formData.data.orderSkuList[i].deliveryMaterialsFee +
-                formData.data.orderSkuList[i].lssueFee +
-                formData.data.orderSkuList[i].packingLabor +
-                formData.data.orderSkuList[i].managementFee +
-                formData.data.orderSkuList[i].unitPrice) *
-                formData.data.orderSkuList[i].quantity *
-                100
-            ) / 100
-          );
-          if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
-            for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
-              if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
-                packagingMaterialCost = Number(
-                  Math.round(
-                    (packagingMaterialCost +
-                      formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) *
-                      100
-                  ) / 100
-                );
-              }
-            }
-          }
-        }
-        formData.data.orderSkuList[i].subtotal = subtotal;
-        formData.data.orderSkuList[i].packagingMaterialCost = packagingMaterialCost;
-      }
-    }
-    let list = [res.id];
-    if (res.orderSkuList && res.orderSkuList.length > 0) {
-      list = list.concat(res.orderSkuList.map((item) => item.id));
-    }
   });
 };
 const getStyle = (text) => {
@@ -709,9 +687,8 @@ const selectProduct = (row, SKU) => {
         packingLabor: "",
         managementFee: "",
         unitPrice: "",
-        printType: "1",
+        printType: 1,
         packageRemark: "",
-        subtotal: "",
         orderSkuBomList: orderSkuBomList,
         blueprint: row.designImgUrl,
         productionDocument: row.sharedFolder,
@@ -730,7 +707,6 @@ const clickPackingFittings = (index) => {
 };
 const clickDeletePackingFittings = (index, indexTwo) => {
   formData.data.orderSkuList[index].orderSkuBomList.splice(indexTwo, 1);
-  calculatedAmount();
 };
 const selectPackingFittings = (data) => {
   if (formData.data.orderSkuList[rowIndex.value].orderSkuBomList && formData.data.orderSkuList[rowIndex.value].orderSkuBomList.length > 0) {
@@ -761,100 +737,21 @@ const changeQuantity = (index) => {
     proxy
       .post("/orderInfo/getSkuSpecPrice", { skuSpecId: formData.data.orderSkuList[index].skuSpecId, quantity: formData.data.orderSkuList[index].quantity })
       .then((res) => {
-        formData.data.orderSkuList[index].customProcessingFee = res.customProcessingFee;
+        if (formData.data.orderSkuList[index].printType == 2 && res.customProcessingFee) {
+          formData.data.orderSkuList[index].customProcessingFee = Number(Math.round(res.customProcessingFee * 2 * 100) / 100);
+        } else {
+          formData.data.orderSkuList[index].customProcessingFee = res.customProcessingFee;
+        }
         formData.data.orderSkuList[index].customProcessingType = res.customProcessingType;
         formData.data.orderSkuList[index].deliveryMaterialsFee = res.deliveryMaterialsFee;
         formData.data.orderSkuList[index].lssueFee = res.lssueFee;
         formData.data.orderSkuList[index].packingLabor = res.packingLabor;
         formData.data.orderSkuList[index].managementFee = res.managementFee;
         formData.data.orderSkuList[index].unitPrice = res.unitPrice;
-        formData.data.orderSkuList[index].subtotal = Number(
-          Math.round(
-            (res.customProcessingFee + res.deliveryMaterialsFee + res.lssueFee + res.packingLabor + res.managementFee + res.unitPrice) *
-              formData.data.orderSkuList[index].quantity *
-              100
-          ) / 100
-        );
-        calculatedAmount();
       });
   }
 };
-const calculatedAmount = () => {
-  let productTotalAmount = 0;
-  let customProcessingFee = 0;
-  let lssueFee = 0;
-  let deliveryMaterialsFee = 0;
-  let packingLabor = 0;
-  let managementFee = 0;
-  let packagingMaterialCost = 0;
-  let totalAmount = 0;
-  if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
-    for (let i = 0; i < formData.data.orderSkuList.length; i++) {
-      if (formData.data.orderSkuList[i].quantity) {
-        if (formData.data.orderSkuList[i].customProcessingFee) {
-          customProcessingFee = Number(
-            Math.round((customProcessingFee + formData.data.orderSkuList[i].customProcessingFee * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        if (formData.data.orderSkuList[i].lssueFee) {
-          lssueFee = Number(Math.round((lssueFee + formData.data.orderSkuList[i].lssueFee * formData.data.orderSkuList[i].quantity) * 100) / 100);
-        }
-        if (formData.data.orderSkuList[i].deliveryMaterialsFee) {
-          deliveryMaterialsFee = Number(
-            Math.round((deliveryMaterialsFee + formData.data.orderSkuList[i].deliveryMaterialsFee * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        if (formData.data.orderSkuList[i].packingLabor) {
-          packingLabor = Number(Math.round((packingLabor + formData.data.orderSkuList[i].packingLabor * formData.data.orderSkuList[i].quantity) * 100) / 100);
-        }
-        if (formData.data.orderSkuList[i].managementFee) {
-          managementFee = Number(
-            Math.round((managementFee + formData.data.orderSkuList[i].managementFee * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        if (formData.data.orderSkuList[i].unitPrice) {
-          productTotalAmount = Number(
-            Math.round((productTotalAmount + formData.data.orderSkuList[i].unitPrice * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        let money = 0;
-        if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
-          for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
-            if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
-              packagingMaterialCost = Number(
-                Math.round(
-                  (packagingMaterialCost +
-                    formData.data.orderSkuList[i].orderSkuBomList[j].quantity *
-                      formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice *
-                      formData.data.orderSkuList[i].quantity) *
-                    100
-                ) / 100
-              );
-              money = Number(
-                Math.round(
-                  (money + formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) * 100
-                ) / 100
-              );
-            }
-          }
-        }
-        formData.data.orderSkuList[i].packagingMaterialCost = money;
-      }
-    }
-  }
-  formData.data.productTotalAmount = productTotalAmount;
-  formData.data.customProcessingFee = customProcessingFee;
-  formData.data.lssueFee = lssueFee;
-  formData.data.deliveryMaterialsFee = deliveryMaterialsFee;
-  formData.data.packingLabor = packingLabor;
-  formData.data.managementFee = managementFee;
-  formData.data.packagingMaterialCost = packagingMaterialCost;
-  totalAmount = Number(
-    Math.round((productTotalAmount + customProcessingFee + lssueFee + deliveryMaterialsFee + packingLabor + managementFee + packagingMaterialCost) * 100) / 100
-  );
-  formData.data.totalAmount = totalAmount;
-};
-const cellStyleName = ({ row, column, rowIndex, columnIndex }) => {
+const cellStyleName = ({ column, columnIndex }) => {
   if (column.label === "操作" && columnIndex === 3) {
     return "vertical-align";
   }
@@ -910,6 +807,67 @@ const computeMoney = (index, indexSKU) => {
   }
   return money;
 };
+const getSubtotal = (item) => {
+  let money = 0;
+  if (item.quantity) {
+    money = Number(
+      Math.round(
+        (item.customProcessingFee + item.deliveryMaterialsFee + item.lssueFee + item.packingLabor + item.managementFee + item.unitPrice) * item.quantity * 100
+      ) / 100
+    );
+  }
+  return money;
+};
+const calculatedAmount = (label) => {
+  let money = 0;
+  if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
+    for (let i = 0; i < formData.data.orderSkuList.length; i++) {
+      if (formData.data.orderSkuList[i].quantity && formData.data.orderSkuList[i][label]) {
+        money = Number(Math.round((money + formData.data.orderSkuList[i][label] * formData.data.orderSkuList[i].quantity) * 100) / 100);
+      }
+    }
+  }
+  return money;
+};
+const calculatedPackagingMaterialCost = () => {
+  let money = 0;
+  if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
+    for (let i = 0; i < formData.data.orderSkuList.length; i++) {
+      if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
+        for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
+          if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
+            money = Number(
+              Math.round(
+                (money +
+                  formData.data.orderSkuList[i].orderSkuBomList[j].quantity *
+                    formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice *
+                    formData.data.orderSkuList[i].quantity) *
+                  100
+              ) / 100
+            );
+          }
+        }
+      }
+    }
+  }
+  return money;
+};
+const calculatedTotalAmount = () => {
+  let money = 0;
+  money = Number(
+    Math.round(
+      (calculatedAmount("unitPrice") +
+        calculatedAmount("customProcessingFee") +
+        calculatedAmount("lssueFee") +
+        calculatedAmount("deliveryMaterialsFee") +
+        calculatedAmount("packingLabor") +
+        calculatedAmount("managementFee") +
+        calculatedPackagingMaterialCost()) *
+        100
+    ) / 100
+  );
+  return money;
+};
 </script>
 
 <style lang="scss" scoped>

+ 100 - 126
src/views/subsidiary/order/management/design.vue

@@ -59,7 +59,7 @@
                           </div>
                           <div style="line-height: 35px">
                             <span style="color: black; font-weight: 700">小计: </span>
-                            <span>{{ item.subtotal }}</span>
+                            <span>{{ getSubtotal(item) }}</span>
                           </div>
                           <div style="line-height: 35px">
                             <span style="width: 37px; color: black; font-weight: 700">打印: </span>
@@ -162,8 +162,7 @@
                                     placeholder="数量"
                                     style="width: 100%"
                                     :controls="false"
-                                    :min="0"
-                                    @change="calculatedAmount()" />
+                                    :min="0" />
                                 </el-form-item>
                               </template>
                             </el-table-column>
@@ -225,16 +224,20 @@
         <template #totalMonet>
           <div style="width: 100%; margin-left: 30px">
             <div>
-              <span style="font-weight: 700; color: #6c88f1">产品总金额: ¥{{ moneyFormat(formData.data.productTotalAmount, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">定制加工费: ¥{{ moneyFormat(formData.data.customProcessingFee, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">代发费: ¥{{ moneyFormat(formData.data.lssueFee, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">快递包材费: ¥{{ moneyFormat(formData.data.deliveryMaterialsFee, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包装人工费: ¥{{ moneyFormat(formData.data.packingLabor, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包材费: ¥{{ moneyFormat(formData.data.packagingMaterialCost, 2) }}</span>
-              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">管理费: ¥{{ moneyFormat(formData.data.managementFee, 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1">产品总金额: ¥{{ moneyFormat(calculatedAmount("unitPrice"), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">
+                定制加工费: ¥{{ moneyFormat(calculatedAmount("customProcessingFee"), 2) }}
+              </span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">代发费: ¥{{ moneyFormat(calculatedAmount("lssueFee"), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">
+                快递包材费: ¥{{ moneyFormat(calculatedAmount("deliveryMaterialsFee"), 2) }}
+              </span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包装人工费: ¥{{ moneyFormat(calculatedAmount("packingLabor"), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">包材费: ¥{{ moneyFormat(calculatedPackagingMaterialCost(), 2) }}</span>
+              <span style="font-weight: 700; color: #6c88f1; margin-left: 40px">管理费: ¥{{ moneyFormat(calculatedAmount("managementFee"), 2) }}</span>
             </div>
             <div style="padding: 8px 0 0 0">
-              <span style="font-weight: 700; color: red">订单总金额(含税): ¥{{ moneyFormat(formData.data.totalAmount, 2) }}</span>
+              <span style="font-weight: 700; color: red">订单总金额(含税): ¥{{ moneyFormat(calculatedTotalAmount(), 2) }}</span>
             </div>
           </div>
         </template>
@@ -404,7 +407,32 @@ const submitForm = (status) => {
         if (!formData.data.orderSkuList[i].productionDocument) {
           return ElMessage("请选择生产文件");
         }
+        let packagingMaterialCost = 0;
+        if (formData.data.orderSkuList[i].quantity) {
+          if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
+            for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
+              if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
+                packagingMaterialCost = Number(
+                  Math.round(
+                    (packagingMaterialCost +
+                      formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) *
+                      100
+                  ) / 100
+                );
+              }
+            }
+          }
+        }
+        formData.data.orderSkuList[i].packagingMaterialCost = packagingMaterialCost;
       }
+      formData.data.productTotalAmount = calculatedAmount("unitPrice");
+      formData.data.customProcessingFee = calculatedAmount("customProcessingFee");
+      formData.data.lssueFee = calculatedAmount("lssueFee");
+      formData.data.deliveryMaterialsFee = calculatedAmount("deliveryMaterialsFee");
+      formData.data.packingLabor = calculatedAmount("packingLabor");
+      formData.data.managementFee = calculatedAmount("managementFee");
+      formData.data.packagingMaterialCost = calculatedPackagingMaterialCost();
+      formData.data.totalAmount = calculatedTotalAmount();
       formData.data.status = status;
       let type = "add";
       if (formData.data.id) {
@@ -445,45 +473,6 @@ const getOrderDetail = (parameter) => {
       activeNames.value = allIndex;
       formOption.disabled = true;
     }
-    if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
-      for (let i = 0; i < formData.data.orderSkuList.length; i++) {
-        let subtotal = 0;
-        let packagingMaterialCost = 0;
-        if (formData.data.orderSkuList[i].quantity) {
-          subtotal = Number(
-            Math.round(
-              (formData.data.orderSkuList[i].customProcessingFee +
-                formData.data.orderSkuList[i].deliveryMaterialsFee +
-                formData.data.orderSkuList[i].lssueFee +
-                formData.data.orderSkuList[i].packingLabor +
-                formData.data.orderSkuList[i].managementFee +
-                formData.data.orderSkuList[i].unitPrice) *
-                formData.data.orderSkuList[i].quantity *
-                100
-            ) / 100
-          );
-          if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
-            for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
-              if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
-                packagingMaterialCost = Number(
-                  Math.round(
-                    (packagingMaterialCost +
-                      formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) *
-                      100
-                  ) / 100
-                );
-              }
-            }
-          }
-        }
-        formData.data.orderSkuList[i].subtotal = subtotal;
-        formData.data.orderSkuList[i].packagingMaterialCost = packagingMaterialCost;
-      }
-    }
-    let list = [res.id];
-    if (res.orderSkuList && res.orderSkuList.length > 0) {
-      list = list.concat(res.orderSkuList.map((item) => item.id));
-    }
   });
 };
 const getStyle = (text) => {
@@ -556,82 +545,6 @@ const computeMoney = (index, indexSKU) => {
 };
 const clickDeletePackingFittings = (index, indexTwo) => {
   formData.data.orderSkuList[index].orderSkuBomList.splice(indexTwo, 1);
-  calculatedAmount();
-};
-const calculatedAmount = () => {
-  let productTotalAmount = 0;
-  let customProcessingFee = 0;
-  let lssueFee = 0;
-  let deliveryMaterialsFee = 0;
-  let packingLabor = 0;
-  let managementFee = 0;
-  let packagingMaterialCost = 0;
-  let totalAmount = 0;
-  if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
-    for (let i = 0; i < formData.data.orderSkuList.length; i++) {
-      if (formData.data.orderSkuList[i].quantity) {
-        if (formData.data.orderSkuList[i].customProcessingFee) {
-          customProcessingFee = Number(
-            Math.round((customProcessingFee + formData.data.orderSkuList[i].customProcessingFee * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        if (formData.data.orderSkuList[i].lssueFee) {
-          lssueFee = Number(Math.round((lssueFee + formData.data.orderSkuList[i].lssueFee * formData.data.orderSkuList[i].quantity) * 100) / 100);
-        }
-        if (formData.data.orderSkuList[i].deliveryMaterialsFee) {
-          deliveryMaterialsFee = Number(
-            Math.round((deliveryMaterialsFee + formData.data.orderSkuList[i].deliveryMaterialsFee * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        if (formData.data.orderSkuList[i].packingLabor) {
-          packingLabor = Number(Math.round((packingLabor + formData.data.orderSkuList[i].packingLabor * formData.data.orderSkuList[i].quantity) * 100) / 100);
-        }
-        if (formData.data.orderSkuList[i].managementFee) {
-          managementFee = Number(
-            Math.round((managementFee + formData.data.orderSkuList[i].managementFee * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        if (formData.data.orderSkuList[i].unitPrice) {
-          productTotalAmount = Number(
-            Math.round((productTotalAmount + formData.data.orderSkuList[i].unitPrice * formData.data.orderSkuList[i].quantity) * 100) / 100
-          );
-        }
-        let money = 0;
-        if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
-          for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
-            if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
-              packagingMaterialCost = Number(
-                Math.round(
-                  (packagingMaterialCost +
-                    formData.data.orderSkuList[i].orderSkuBomList[j].quantity *
-                      formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice *
-                      formData.data.orderSkuList[i].quantity) *
-                    100
-                ) / 100
-              );
-              money = Number(
-                Math.round(
-                  (money + formData.data.orderSkuList[i].orderSkuBomList[j].quantity * formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) * 100
-                ) / 100
-              );
-            }
-          }
-        }
-        formData.data.orderSkuList[i].packagingMaterialCost = money;
-      }
-    }
-  }
-  formData.data.productTotalAmount = productTotalAmount;
-  formData.data.customProcessingFee = customProcessingFee;
-  formData.data.lssueFee = lssueFee;
-  formData.data.deliveryMaterialsFee = deliveryMaterialsFee;
-  formData.data.packingLabor = packingLabor;
-  formData.data.managementFee = managementFee;
-  formData.data.packagingMaterialCost = packagingMaterialCost;
-  totalAmount = Number(
-    Math.round((productTotalAmount + customProcessingFee + lssueFee + deliveryMaterialsFee + packingLabor + managementFee + packagingMaterialCost) * 100) / 100
-  );
-  formData.data.totalAmount = totalAmount;
 };
 const rowIndex = ref(null);
 const openPackingFittings = ref(false);
@@ -663,6 +576,67 @@ const selectPackingFittings = (data) => {
   }
   ElMessage({ message: "添加成功", type: "success" });
 };
+const getSubtotal = (item) => {
+  let money = 0;
+  if (item.quantity) {
+    money = Number(
+      Math.round(
+        (item.customProcessingFee + item.deliveryMaterialsFee + item.lssueFee + item.packingLabor + item.managementFee + item.unitPrice) * item.quantity * 100
+      ) / 100
+    );
+  }
+  return money;
+};
+const calculatedAmount = (label) => {
+  let money = 0;
+  if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
+    for (let i = 0; i < formData.data.orderSkuList.length; i++) {
+      if (formData.data.orderSkuList[i].quantity && formData.data.orderSkuList[i][label]) {
+        money = Number(Math.round((money + formData.data.orderSkuList[i][label] * formData.data.orderSkuList[i].quantity) * 100) / 100);
+      }
+    }
+  }
+  return money;
+};
+const calculatedPackagingMaterialCost = () => {
+  let money = 0;
+  if (formData.data.orderSkuList && formData.data.orderSkuList.length > 0) {
+    for (let i = 0; i < formData.data.orderSkuList.length; i++) {
+      if (formData.data.orderSkuList[i].orderSkuBomList && formData.data.orderSkuList[i].orderSkuBomList.length > 0) {
+        for (let j = 0; j < formData.data.orderSkuList[i].orderSkuBomList.length; j++) {
+          if (formData.data.orderSkuList[i].orderSkuBomList[j].quantity && formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice) {
+            money = Number(
+              Math.round(
+                (money +
+                  formData.data.orderSkuList[i].orderSkuBomList[j].quantity *
+                    formData.data.orderSkuList[i].orderSkuBomList[j].unitPrice *
+                    formData.data.orderSkuList[i].quantity) *
+                  100
+              ) / 100
+            );
+          }
+        }
+      }
+    }
+  }
+  return money;
+};
+const calculatedTotalAmount = () => {
+  let money = 0;
+  money = Number(
+    Math.round(
+      (calculatedAmount("unitPrice") +
+        calculatedAmount("customProcessingFee") +
+        calculatedAmount("lssueFee") +
+        calculatedAmount("deliveryMaterialsFee") +
+        calculatedAmount("packingLabor") +
+        calculatedAmount("managementFee") +
+        calculatedPackagingMaterialCost()) *
+        100
+    ) / 100
+  );
+  return money;
+};
 </script>
 
 <style lang="scss" scoped>