cz 1 tahun lalu
induk
melakukan
0596c1030a

+ 6 - 0
src/components/process/EHSD/Contract.vue

@@ -1714,6 +1714,9 @@ const handleSubmit = async () => {
           return false;
         }
       }
+      formData.data.isDeliveryFile = "1";
+    } else {
+      formData.data.isDeliveryFile = "0";
     }
     if (
       formData.data.packageFileList &&
@@ -1725,6 +1728,9 @@ const handleSubmit = async () => {
           return false;
         }
       }
+      formData.data.isPackFile = "1";
+    } else {
+      formData.data.isPackFile = "0";
     }
     if (
       formData.data.contractShipmentList &&

+ 6 - 0
src/components/process/EHSD/ContractChange.vue

@@ -1674,6 +1674,9 @@ const handleSubmit = async () => {
           return false;
         }
       }
+      formData.data.isDeliveryFile = "1";
+    } else {
+      formData.data.isDeliveryFile = "0";
     }
     if (
       formData.data.packageFileList &&
@@ -1685,6 +1688,9 @@ const handleSubmit = async () => {
           return false;
         }
       }
+      formData.data.isPackFile = "1";
+    } else {
+      formData.data.isPackFile = "0";
     }
     if (
       formData.data.contractShipmentList &&

+ 7 - 0
src/components/process/SendSubscribe.vue

@@ -255,6 +255,13 @@ onMounted(() => {
     formData.data.subcribeName = userInfo.nickName;
   } else {
   }
+  if (route.query.id) {
+    proxy
+      .post("/flowProcess/getStartData", { flowId: route.query.id })
+      .then((res) => {
+        formData.data = res;
+      });
+  }
 });
 
 const judgeStatus = () => {

+ 5 - 2
src/utils/request.js

@@ -47,6 +47,10 @@ function generateRandomString(length) {
 
 // request拦截器
 service.interceptors.request.use(config => {
+  let skipSetData = false
+  if (config && config.data) {
+    skipSetData = config.data.skipSetData
+  }
   // 是否需要设置 token
   const isToken = (config.headers || {}).isToken === false
   // 是否需要防止数据重复提交
@@ -76,7 +80,6 @@ service.interceptors.request.use(config => {
     config.url = url;
   }
   if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
-
     const requestObj = {
       url: config.url,
       data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data,
@@ -95,7 +98,7 @@ service.interceptors.request.use(config => {
         // console.warn(`[${s_url}]: ` + message)
         console.log(s_url, '重复提交的url');
         return Promise.reject(new Error(message))
-      } else {
+      } else if (!skipSetData) {
         cache.session.setJSON('sessionObj', requestObj)
       }
     }

+ 15 - 15
src/views/EHSD/procurement/handoverSlipEHSD/index.vue

@@ -130,13 +130,13 @@ const config = computed(() => {
         width: 140,
       },
     },
-    {
-      attrs: {
-        label: "版本号",
-        prop: "contractVersion",
-        width: 100,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "版本号",
+    //     prop: "contractVersion",
+    //     width: 100,
+    //   },
+    // },
     {
       attrs: {
         label: "产品编码",
@@ -151,13 +151,13 @@ const config = computed(() => {
         "min-width": 220,
       },
     },
-    {
-      attrs: {
-        label: "单位",
-        prop: "productUnit",
-        width: 140,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "单位",
+    //     prop: "productUnit",
+    //     width: 140,
+    //   },
+    // },
     {
       attrs: {
         label: "待采购数量",
@@ -169,7 +169,7 @@ const config = computed(() => {
       attrs: {
         label: "已耗时",
         slot: "timeSpent",
-        width: 120,
+        width: 140,
       },
     },
     {

+ 59 - 0
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -7,6 +7,7 @@
         :config="config"
         :loading="loading"
         :selectConfig="selectConfig"
+        :statConfig="statConfig"
         highlight-current-row
         :action-list="[
           {
@@ -351,6 +352,52 @@ const selectConfig = computed(() => {
     },
   ];
 });
+const headerData = ref({});
+const statConfig = computed(() => [
+  {
+    label: "统计",
+    data: [
+      //一个卡牌多数据配置
+      {
+        label: "订单统计(CNY)",
+        type: 2,
+        data: [
+          {
+            label: "订单数",
+            num: headerData.value.count,
+            color: "#C280FF",
+          },
+          {
+            label: "客户数",
+            num: headerData.value.customerCount,
+            color: "#C280FF",
+          },
+          {
+            label: "订单金额",
+            num: proxy.moneyFormat(headerData.value.sumAmount, 2),
+            color: "#C280FF",
+          },
+        ],
+      },
+      {
+        label: "款项统计(CNY)",
+        type: 3,
+        data: [
+          {
+            label: "已收款",
+            num: proxy.moneyFormat(headerData.value.sumClaimMoney, 2),
+            color: "#FF9315",
+          },
+          {
+            label: "待收款",
+            num: proxy.moneyFormat(headerData.value.sumClaimMoneyOne, 2),
+            color: "#FF9315",
+          },
+        ],
+      },
+    ],
+  },
+]);
 const config = computed(() => {
   return [
     {
@@ -639,6 +686,18 @@ const getList = async (req) => {
       loading.value = false;
     }, 200);
   });
+
+  proxy
+    .post("/contract/getHeadStatistic", sourceList.value.pagination)
+    .then((res) => {
+      headerData.value = res;
+      if (headerData.value) {
+        headerData.value.sumClaimMoneyOne = parseFloat(
+          Number(headerData.value.sumAmount) -
+            Number(headerData.value.sumClaimMoney)
+        ).toFixed(2);
+      }
+    });
 };
 getDict();
 if (route.query.code) {

+ 2 - 0
src/views/process/processApproval/index.vue

@@ -546,6 +546,7 @@ const handleSubmit = async (_type) => {
                 handleType: _type,
                 version: route.query.version,
                 flowId: route.query.id,
+                skipSetData: true,
               })
               .then(
                 (res) => {
@@ -561,6 +562,7 @@ const handleSubmit = async (_type) => {
               .post("/flowProcess/initiate", {
                 ...flowForm,
                 data,
+                skipSetData: true,
               })
               .then(
                 (res) => {

+ 52 - 1
src/views/salesMange/saleContract/claim/index.vue

@@ -36,7 +36,7 @@
       title="认领"
       v-if="dialogVisible"
       v-model="dialogVisible"
-      width="600"
+      width="50%"
       v-loading="loading"
     >
       <byForm
@@ -79,6 +79,45 @@
                 </template>
               </el-table-column>
               <el-table-column
+                prop="claimType"
+                label="到账类型"
+                min-width="150"
+              >
+                <template #default="{ row, $index }">
+                  <el-form-item
+                    :prop="'claimContractList.' + $index + '.claimType'"
+                    :rules="rules.claimType"
+                    :inline-message="true"
+                  >
+                    <el-select v-model="row.claimType" style="width: 100%">
+                      <el-option
+                        v-for="item in claimTypeList"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                      />
+                    </el-select>
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column prop="moneyCny" label="换算 CNY" min-width="150">
+                <template #default="{ row, $index }">
+                  <el-form-item
+                    :prop="'claimContractList.' + $index + '.moneyCny'"
+                    :rules="rules.moneyCny"
+                    :inline-message="true"
+                  >
+                    <el-input-number
+                      v-model="row.moneyCny"
+                      :precision="2"
+                      :controls="false"
+                      :min="0"
+                      onmousewheel="return false;"
+                    />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column
                 prop="zip"
                 label="操作"
                 width="60"
@@ -222,6 +261,8 @@ let dialogVisibleOne = ref(false);
 let modalType = ref("add");
 let rules = ref({
   money: [{ required: true, message: "请输入关联金额", trigger: "blur" }],
+  claimType: [{ required: true, message: "请选择到账类型", trigger: "change" }],
+  moneyCny: [{ required: true, message: "请输入换算 CNY", trigger: "blur" }],
 });
 const claim = ref([
   {
@@ -237,6 +278,7 @@ const claim = ref([
     value: "2",
   },
 ]);
+const claimTypeList = ref([]);
 const accountList = ref([]);
 const selectConfig = computed(() => [
   {
@@ -545,6 +587,13 @@ const getDict = () => {
         });
       }
     });
+
+  proxy.getDictOne(["claim_type"]).then((res) => {
+    claimTypeList.value = res["claim_type"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
 };
 const handleBeforeUpload = async (file) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
@@ -590,6 +639,8 @@ const handleSelectContrct = (row) => {
     money: 0,
     currency: rowCurrency.value,
     rate: rowRate.value,
+    claimType: "",
+    moneyCny: 0,
   });
   return ElMessage({
     message: "选择成功",