Browse Source

0.5需求

cz 1 year ago
parent
commit
761d097ea1

+ 2 - 2
src/components/PDF/contractPDF.vue

@@ -380,14 +380,14 @@ const statisticsTwo = (label, index) => {
   return num;
 };
 
-if (props.rowData && props.rowData.id && props.rowData.type === "10") {
+if (props.rowData && props.rowData.id) {
   getPdfData(props.rowData);
 }
 
 watch(
   () => props.rowData.id,
   (val) => {
-    if (props.rowData && props.rowData.id && props.rowData.type === "10") {
+    if (props.rowData && props.rowData.id) {
       getPdfData(props.rowData);
     }
   }

+ 2 - 2
src/components/PDF/purchasePDF.vue

@@ -231,14 +231,14 @@ const handlePrintPdf = (row) => {
   });
 };
 
-if (props.rowData && props.rowData.id && props.rowData.type === "20") {
+if (props.rowData && props.rowData.id) {
   handlePrintPdf(props.rowData);
 }
 
 watch(
   () => props.rowData.id,
   (val) => {
-    if (props.rowData && props.rowData.id && props.rowData.type === "20") {
+    if (props.rowData && props.rowData.id) {
       handlePrintPdf(props.rowData);
     }
   }

+ 18 - 6
src/components/contractCom/contractDetails.vue

@@ -20,7 +20,10 @@
           :style="{ color: currentItem.id === i.id ? '#409eff' : '' }"
           @click="handleItemClick(i)"
         >
-          v {{ i.version }}
+          <div v-show="activeName === 'first'">v {{ i.version }}</div>
+          <div v-show="activeName === 'second'">
+            {{ i.code }}
+          </div>
         </div>
       </div>
       <div class="right">
@@ -34,7 +37,7 @@
             <ContractPDF :rowData="rowData"></ContractPDF>
           </div>
           <div v-show="activeName === 'second'">
-            <PurchasePDF :rowData="rowData"></PurchasePDF>
+            <PurchasePDF :rowData="rowDataOne"></PurchasePDF>
           </div>
         </div>
         <div v-else style="padding-left: 300px">暂无数据</div>
@@ -75,6 +78,7 @@ const props = defineProps({
 const activeName = ref("first");
 const currentItem = ref({});
 const rowData = ref({});
+const rowDataOne = ref({});
 const leftList = ref([]);
 const contractDataList = ref([]);
 const purchaseDataList = ref([]);
@@ -142,10 +146,15 @@ const handleClick = () => {};
 
 const handleItemClick = (item) => {
   currentItem.value = item;
-  rowData.value = {
-    type: activeName.value === "first" ? "10" : "20",
-    id: item.id,
-  };
+  if (activeName.value === "first") {
+    rowData.value = {
+      id: item.id,
+    };
+  } else if (activeName.value === "second") {
+    rowDataOne.value = {
+      id: item.id,
+    };
+  }
 };
 
 const pushProcessApproval = (row) => {
@@ -168,6 +177,9 @@ const handleChange = (val) => {
   if (val === "second") {
     leftList.value = purchaseDataList.value;
   }
+  if (leftList.value && leftList.value.length > 0) {
+    handleItemClick(leftList.value[0]);
+  }
 };
 const getDetailsData = () => {
   proxy

+ 0 - 1
src/views/purchaseManage/purchaseManage/alreadyPurchase/index.vue

@@ -749,7 +749,6 @@ const handlePrintPdf = (row) => {
   rowData.value = {
     id: row.id,
     code: row.code,
-    type: "20", //type 20 采购合同
   };
   openPdf.value = true;
   // proxy.post("/purchase/detail", { id: row.id }).then((res) => {

+ 0 - 1
src/views/salesMange/saleContract/contract/index.vue

@@ -492,7 +492,6 @@ const clickPrint = (row) => {
 
   rowData.value = {
     id: row.id,
-    type: "10", //type 10 销售合同
   };
   openPrint.value = true;
 };

+ 13 - 13
src/views/salesMange/salesMange/profitSettlement/index.vue

@@ -552,10 +552,10 @@ const submitChangeForm = () => {
     let data = {};
     data.id = formChangeData.data.id;
     data.currencyRateJson = JSON.stringify(formChangeData.data.list);
-    proxy.post("/commission/add", data).then(
+    proxy.post("/saleStatement/update", data).then(
       () => {
         ElMessage({
-          message: "保存成功",
+          message: "操作成功",
           type: "success",
         });
         openChange.value = false;
@@ -569,16 +569,13 @@ const submitChangeForm = () => {
   });
 };
 const clickSettlement = (row) => {
-  let data = proxy.deepClone(row);
-  data.afterSalesAmount = 0;
-  data.publicAmount = 0;
-  data.haveOverallAmount = 0;
-  data.departmentalCommission = 0;
-  data.personalCommission = 0;
-  data.settlementStatus = 1;
-  proxy.post("/commission/add", data).then(() => {
+  const data = {
+    id: row.contractId,
+    settlementStatus: 1,
+  };
+  proxy.post("/saleStatement/update", data).then(() => {
     ElMessage({
-      message: "保存成功",
+      message: "操作成功",
       type: "success",
     });
     getList();
@@ -586,10 +583,13 @@ const clickSettlement = (row) => {
 };
 const clickCancelSettlement = (row) => {
   proxy
-    .post("/commission/add", { id: row.contractId, settlementStatus: 0 })
+    .post("/saleStatement/update", {
+      id: row.contractId,
+      settlementStatus: 0,
+    })
     .then(() => {
       ElMessage({
-        message: "保存成功",
+        message: "操作成功",
         type: "success",
       });
       getList();

+ 29 - 16
src/views/salesMange/shipmentMange/packing/index.vue

@@ -50,35 +50,42 @@
         <template #netWeight="{ item }">
           <div>
             <div v-for="(i, index) in item.dataJsonListCopy" :key="index">
-              {{ i.netWeight + "kg" }}
+              {{ i.netWeight + " kg" }}
             </div>
           </div>
         </template>
         <template #roughWeight="{ item }">
           <div>
             <div v-for="(i, index) in item.dataJsonListCopy" :key="index">
-              {{ i.roughWeight + "kg" }}
+              {{ i.roughWeight + " kg" }}
             </div>
           </div>
         </template>
         <template #boxLong="{ item }">
           <div>
             <div v-for="(i, index) in item.dataJsonListCopy" :key="index">
-              {{ i.boxLong + "cm" }}
+              {{ i.boxLong + " cm" }}
             </div>
           </div>
         </template>
         <template #boxWide="{ item }">
           <div>
             <div v-for="(i, index) in item.dataJsonListCopy" :key="index">
-              {{ i.boxWide + "cm" }}
+              {{ i.boxWide + " cm" }}
             </div>
           </div>
         </template>
         <template #boxHigh="{ item }">
           <div>
             <div v-for="(i, index) in item.dataJsonListCopy" :key="index">
-              {{ i.boxHigh + "cm" }}
+              {{ i.boxHigh + " cm" }}
+            </div>
+          </div>
+        </template>
+        <template #bomVolume="{ item }">
+          <div>
+            <div v-for="(i, index) in item.dataJsonListCopy" :key="index">
+              {{ i.bomVolume + " m³" }}
             </div>
           </div>
         </template>
@@ -570,22 +577,29 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "体积",
+        slot: "bomVolume",
+        width: 90,
+      },
+    },
+    {
+      attrs: {
         label: "总净重",
-        prop: "bomVolume",
+        prop: "netWeight",
         width: 120,
       },
-      render(bomVolume) {
-        return bomVolume + "m³";
+      render(netWeight) {
+        return netWeight + " kg";
       },
     },
     {
       attrs: {
         label: "总毛重",
-        prop: "bomVolume",
+        prop: "roughWeight",
         width: 120,
       },
-      render(bomVolume) {
-        return bomVolume + "m³";
+      render(roughWeight) {
+        return roughWeight + " kg";
       },
     },
     {
@@ -595,7 +609,7 @@ const config = computed(() => {
         width: 120,
       },
       render(bomVolume) {
-        return bomVolume + "m³";
+        return bomVolume + " m³";
       },
     },
     {
@@ -726,15 +740,14 @@ const getList = async (req) => {
           roughWeight: jarr[4],
           netWeight: jarr[5],
         };
-        newArr = [...newArr, new Array(Number(jarr[6]) - 1).fill(obj)];
+        let createArr = new Array(Number(jarr[6])).fill(obj);
+        newArr = [...newArr, ...createArr];
       }
       e.dataJsonListCopy = newArr;
     }
     sourceList.value.data = res.rows;
     sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
+    loading.value = false;
   });
 };