cz 1 year ago
parent
commit
6f7766c1f4

+ 28 - 0
src/components/process/EHSD/PurchaseChange.vue

@@ -1373,6 +1373,21 @@ const querySearch = (queryString, callback) => {
 const handleSubmit = async () => {
 const handleSubmit = async () => {
   let status = await submit.value.handleSubmit(() => {});
   let status = await submit.value.handleSubmit(() => {});
   if (status) {
   if (status) {
+    // 合同交接单不可大于待采购数量
+    if (route.query.type == 1) {
+      for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+        const ele = formData.data.purchaseProductList[i];
+        for (let j = 0; j < ele.purchaseProductMountingsList.length; j++) {
+          const jele = ele.purchaseProductMountingsList[j];
+          if (j == 0) {
+            if (Number(jele.quantity) > Number(jele.oldQuantity)) {
+              ElMessage("采购数量不能大于待采购数量");
+              return false;
+            }
+          }
+        }
+      }
+    }
     if (
     if (
       formData.data.purchaseArrivalList &&
       formData.data.purchaseArrivalList &&
       formData.data.purchaseArrivalList.length > 0
       formData.data.purchaseArrivalList.length > 0
@@ -1661,6 +1676,19 @@ onMounted(() => {
         formData.data.purchaseProductList &&
         formData.data.purchaseProductList &&
         formData.data.purchaseProductList.length > 0
         formData.data.purchaseProductList.length > 0
       ) {
       ) {
+        for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+          const e = formData.data.purchaseProductList[i];
+          e.oldQuantity = parseFloat(e.expendQuantity + e.quantity).toFixed(4);
+          for (let j = 0; j < e.purchaseProductMountingsList.length; j++) {
+            const jele = e.purchaseProductMountingsList[j];
+            if (j == 0) {
+              jele.oldQuantity = parseFloat(
+                e.expendQuantity + e.quantity
+              ).toFixed(4);
+            }
+            break;
+          }
+        }
         let ids = formData.data.purchaseProductList.map((x) => x.productId);
         let ids = formData.data.purchaseProductList.map((x) => x.productId);
         getAuxiliaryData(formData.data.sellCorporationId, ids);
         getAuxiliaryData(formData.data.sellCorporationId, ids);
         proxy
         proxy

+ 7 - 0
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -393,6 +393,12 @@ const getRowClass = ({ row }) => {
 
 
 const handleChange = (row) => {
 const handleChange = (row) => {
   let submitType = row.dataResource > 0 ? "10" : "20";
   let submitType = row.dataResource > 0 ? "10" : "20";
+  let type = "";
+  if (row.dataResource == 1) {
+    type = 1;
+  } else if (row.dataResource == 2) {
+    type = 2;
+  }
   proxy.$router.push({
   proxy.$router.push({
     path: "/platform_manage/process/processApproval",
     path: "/platform_manage/process/processApproval",
     query: {
     query: {
@@ -401,6 +407,7 @@ const handleChange = (row) => {
       random: proxy.random(),
       random: proxy.random(),
       businessId: row.id,
       businessId: row.id,
       submitType,
       submitType,
+      type,
     },
     },
   });
   });
 };
 };

+ 12 - 12
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -690,18 +690,18 @@ const getDtl = (row) => {
   });
   });
 };
 };
 const isdisabled = ["price", "costPrice", "remark", "netWeight"];
 const isdisabled = ["price", "costPrice", "remark", "netWeight"];
-watch(modalType, (val) => {
-  if (val) {
-    for (let i = 0; i < formConfig.value.length; i++) {
-      const element = formConfig.value[i];
-      if (element.type != "title" || element.type != "slot") {
-        if (!isdisabled.includes(element.prop)) {
-          element.disabled = val == "edit" ? true : false;
-        }
-      }
-    }
-  }
-});
+// watch(modalType, (val) => {
+//   if (val) {
+//     for (let i = 0; i < formConfig.value.length; i++) {
+//       const element = formConfig.value[i];
+//       if (element.type != "title" || element.type != "slot") {
+//         if (!isdisabled.includes(element.prop)) {
+//           element.disabled = val == "edit" ? true : false;
+//         }
+//       }
+//     }
+//   }
+// });
 const handleBeforeUpload = async (file) => {
 const handleBeforeUpload = async (file) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   uploadData.value = res.uploadBody;
   uploadData.value = res.uploadBody;

+ 12 - 12
src/views/EHSD/productLibrary/customerProduct/index.vue

@@ -755,18 +755,18 @@ const getDtl = (row) => {
   });
   });
 };
 };
 const isdisabled = ["price", "costPrice", "remark", "netWeight"];
 const isdisabled = ["price", "costPrice", "remark", "netWeight"];
-watch(modalType, (val) => {
-  if (val) {
-    for (let i = 0; i < formConfig.value.length; i++) {
-      const element = formConfig.value[i];
-      if (element.type != "title" || element.type != "slot") {
-        if (!isdisabled.includes(element.prop)) {
-          element.disabled = val == "edit" ? true : false;
-        }
-      }
-    }
-  }
-});
+// watch(modalType, (val) => {
+//   if (val) {
+//     for (let i = 0; i < formConfig.value.length; i++) {
+//       const element = formConfig.value[i];
+//       if (element.type != "title" || element.type != "slot") {
+//         if (!isdisabled.includes(element.prop)) {
+//           element.disabled = val == "edit" ? true : false;
+//         }
+//       }
+//     }
+//   }
+// });
 
 
 const handleBeforeUpload = async (file) => {
 const handleBeforeUpload = async (file) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });

+ 25 - 14
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -37,20 +37,19 @@
             <span>{{ item.advanceRatio }}%</span>
             <span>{{ item.advanceRatio }}%</span>
           </div>
           </div>
         </template>
         </template>
-
         <template #tags="{ item }">
         <template #tags="{ item }">
-          <div style="width: 100%" v-if="item.tag">
+          <div style="width: 100%">
             <el-tag
             <el-tag
               style="margin-right: 8px"
               style="margin-right: 8px"
               type="success"
               type="success"
-              v-for="(tag, index) in item.tag"
+              v-for="(tag, index) in item.tags"
               closable
               closable
               :key="index"
               :key="index"
               @close="tagClose(tag, item)"
               @close="tagClose(tag, item)"
             >
             >
               {{ dictValueLabel(tag, customerTag) }}
               {{ dictValueLabel(tag, customerTag) }}
             </el-tag>
             </el-tag>
-            <template v-if="item.tag.length !== customerTag.length">
+            <template v-if="item.tags.length !== customerTag.length">
               <el-select
               <el-select
                 v-if="item.addTagShow"
                 v-if="item.addTagShow"
                 v-model="addTag"
                 v-model="addTag"
@@ -66,7 +65,7 @@
                   :key="tag.value"
                   :key="tag.value"
                   :label="tag.label"
                   :label="tag.label"
                   :value="tag.value"
                   :value="tag.value"
-                  :disabled="judgeTagSelect(item.tag, tag.value)"
+                  :disabled="judgeTagSelect(item.tags, tag.value)"
                 />
                 />
               </el-select>
               </el-select>
               <el-tag
               <el-tag
@@ -419,6 +418,7 @@
 import { computed, ref } from "vue";
 import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import byTable from "@/components/byTable/index";
 import moment from "moment";
 import moment from "moment";
+import { ElMessage, ElMessageBox } from "element-plus";
 
 
 const { proxy } = getCurrentInstance();
 const { proxy } = getCurrentInstance();
 const accountList = ref([]);
 const accountList = ref([]);
@@ -511,13 +511,13 @@ const config = computed(() => {
         "min-width": 220,
         "min-width": 220,
       },
       },
     },
     },
-    // {
-    //   attrs: {
-    //     label: "客户标签",
-    //     slot: "tags",
-    //     width: 180,
-    //   },
-    // },
+    {
+      attrs: {
+        label: "客户标签",
+        slot: "tags",
+        width: 180,
+      },
+    },
     {
     {
       attrs: {
       attrs: {
         label: "报价金额",
         label: "报价金额",
@@ -631,6 +631,14 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   loading.value = true;
   proxy.post("/saleQuotation/page", sourceList.value.pagination).then((res) => {
   proxy.post("/saleQuotation/page", sourceList.value.pagination).then((res) => {
+    res.rows.forEach((x) => {
+      x.addTagShow = false;
+      if (x.tag) {
+        x.tags = x.tag.split(",");
+      } else {
+        x.tags = [];
+      }
+    });
     sourceList.value.data = res.rows;
     sourceList.value.data = res.rows;
     sourceList.value.pagination.total = res.total;
     sourceList.value.pagination.total = res.total;
     setTimeout(() => {
     setTimeout(() => {
@@ -759,6 +767,9 @@ const getAllMoney = (num) => {
   return money;
   return money;
 };
 };
 const addTag = ref("");
 const addTag = ref("");
+const showSelect = (item) => {
+  item.addTagShow = true;
+};
 const judgeTagSelect = (data, val) => {
 const judgeTagSelect = (data, val) => {
   if (data && data.length > 0) {
   if (data && data.length > 0) {
     if (data.includes(val)) {
     if (data.includes(val)) {
@@ -771,7 +782,7 @@ const judgeTagSelect = (data, val) => {
 const changeTag = (val, item) => {
 const changeTag = (val, item) => {
   let data = {
   let data = {
     id: item.buyCorporationId,
     id: item.buyCorporationId,
-    tag: JSON.parse(JSON.stringify(item.tag)),
+    tag: proxy.deepClone(item.tags),
   };
   };
   data.tag.push(val);
   data.tag.push(val);
   data.tag = data.tag.join(",");
   data.tag = data.tag.join(",");
@@ -789,7 +800,7 @@ const changeTag = (val, item) => {
 const tagClose = (val, item) => {
 const tagClose = (val, item) => {
   let data = {
   let data = {
     id: item.buyCorporationId,
     id: item.buyCorporationId,
-    tag: JSON.parse(JSON.stringify(item.tag)),
+    tag: proxy.deepClone(item.tags),
   };
   };
   data.tag = data.tag.filter((row) => row !== val);
   data.tag = data.tag.filter((row) => row !== val);
   if (data.tag && data.tag.length > 0) {
   if (data.tag && data.tag.length > 0) {

+ 0 - 1
src/views/salesMange/shipmentMange/document/index.vue

@@ -2042,7 +2042,6 @@ const sourceList = ref({
     keyword: "",
     keyword: "",
     warehouseId: "",
     warehouseId: "",
     toWarehouseId: "",
     toWarehouseId: "",
-    type: "3",
   },
   },
 });
 });
 const loading = ref(false);
 const loading = ref(false);