瀏覽代碼

销售合同bug解决,审批数据回显解决

cz 1 年之前
父節點
當前提交
34dc4c3c3b

File diff suppressed because it is too large
+ 496 - 138
src/components/process/Contract.vue


+ 4 - 3
src/views/WDLY/purchaseManage/purchase/index.vue

@@ -240,6 +240,7 @@ const getList = async (req) => {
     req = {
       ...req,
       neStatus: "99",
+      status: "15,30",
     };
   }
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -341,8 +342,8 @@ const getDeptList = () => {
   proxy
     .post("/subscribe/getDepts", { status: sourceList.value.pagination.status })
     .then((res) => {
-      deptData.value = res.data;
-      selectConfig[2].data = res.data.map((x) => ({
+      deptData.value = res;
+      selectConfig[2].data = res.map((x) => ({
         label: x.deptName,
         value: x.deptId,
       }));
@@ -364,7 +365,7 @@ const getDict = () => {
         value: x.id,
       }));
     });
-  getDeptList();
+  // getDeptList();
 };
 getDict();
 getList();

+ 21 - 16
src/views/salesMange/saleContract/claim/index.vue

@@ -371,7 +371,7 @@ const formConfig = reactive([
   },
   {
     type: "selectInput",
-    prop: "amount",
+    prop: "waitAmount",
     selectProp: "currency",
     label: " ",
     itemWidth: 70,
@@ -449,12 +449,13 @@ const submitForm = () => {
       }
     }
     const total = list.reduce((total, x) => (total += Number(x.money)), 0);
-    if (Number(formData.data.amount) < total) {
+    if (Number(formData.data.waitAmount) < total) {
       return ElMessage({
         message: "认领金额总合不能大于交易金额!",
         type: "info",
       });
     }
+    formData.data.amount = total;
     formData.data.fileList =
       fileListCopy.value.map((x) => ({
         id: x.id,
@@ -475,21 +476,24 @@ const submitForm = () => {
     );
   });
 };
-
+const rowCurrency = ref("");
 const getDtl = (row) => {
-  modalType.value = "edit";
-  dialogVisible.value = true;
-  formData.data = {
-    businessId: row.id,
-    status: row.status + "",
-    currency: row.currency,
-    amount: row.amount,
-    accountManagementId: row.accountManagementId,
-    accountManagementName: row.accountManagementName,
-    claimTime: proxy.parseTime(new Date()),
-    claimContractList: [],
-  };
-  dialogVisible.value = true;
+  rowCurrency.value = row.currency;
+  proxy.get(`/claim/sumClaimMoney?businessId=${row.id}`).then((res) => {
+    modalType.value = "edit";
+    dialogVisible.value = true;
+    formData.data = {
+      businessId: row.id,
+      status: row.status + "",
+      currency: row.currency,
+      waitAmount: Number(row.amount) - Number(res.data),
+      accountManagementId: row.accountManagementId,
+      accountManagementName: row.accountManagementName,
+      claimTime: proxy.parseTime(new Date()),
+      claimContractList: [],
+    };
+    dialogVisible.value = true;
+  });
 };
 
 const warehouseType = ref([]);
@@ -555,6 +559,7 @@ const handleSelectContrct = (row) => {
     contractId: row.id,
     contractCode: row.code,
     money: 0,
+    currency: rowCurrency.value,
   });
   return ElMessage({
     message: "选择成功",

Some files were not shown because too many files changed in this diff