Parcourir la source

wdly新功能完善

cz il y a 1 an
Parent
commit
1cd87866ff

+ 48 - 17
src/views/WDLY/outInBound/manyGoods/index.vue

@@ -15,7 +15,7 @@
         {
             text: '申购',
             disabled: selectData.length === 0,
-            action: () => openModal(),
+            action: () => openModal(false),
           },
           
          
@@ -131,6 +131,7 @@ const config = computed(() => {
         label: "物流/快递信息",
         prop: "logisticsCompanyName",
         slot: "logistics",
+        width: 200,
       },
     },
     {
@@ -144,7 +145,7 @@ const config = computed(() => {
       attrs: {
         label: "物品名称",
         prop: "productName",
-        width: 150,
+        width: 140,
       },
     },
     {
@@ -174,7 +175,7 @@ const config = computed(() => {
       attrs: {
         label: "退货单号",
         prop: "backLogisticsCode",
-        width: 160,
+        width: 150,
       },
     },
     {
@@ -202,8 +203,8 @@ const config = computed(() => {
                 },
                 el: "button",
                 click() {
-                  selectData.value = row;
-                  openModal();
+                  selectDataOne.value = [row];
+                  openModal(true);
                 },
               }
             : {},
@@ -415,23 +416,53 @@ getList();
 getDict();
 onMounted(() => {});
 const selectData = ref([]);
+const selectDataOne = ref([]);
 const selectionChange = (data) => {
   selectData.value = data;
 };
-onActivated(() => {
-  selectData.value = [];
+watch(selectData, (newVal, oldVal) => {
+  if (newVal.length == 0) {
+    sourceList.value.data.forEach((x) => {
+      if (x.processingMethod > 0) {
+        x.isCheck = false;
+      } else {
+        x.isCheck = true;
+      }
+    });
+  } else if (newVal.length == 1) {
+    const current = newVal[0];
+    sourceList.value.data.forEach((x) => {
+      if (x.stockWaitId != current.stockWaitId) {
+        x.isCheck = false;
+      } else {
+        x.isCheck = x.processingMethod > 0 ? false : true;
+      }
+    });
+  }
 });
 
-const openModal = () => {
-  proxy.$router.push({
-    path: "/platform_manage/process/processApproval",
-    query: {
-      flowKey: "wdly_apply_purchase",
-      flowName: "申购发起",
-      random: proxy.random(),
-      arr: JSON.stringify(selectData.value),
-    },
-  });
+const openModal = (flag = false) => {
+  if (flag) {
+    proxy.$router.push({
+      path: "/platform_manage/process/processApproval",
+      query: {
+        flowKey: "wdly_apply_purchase",
+        flowName: "申购发起",
+        random: proxy.random(),
+        arr: JSON.stringify(selectDataOne.value),
+      },
+    });
+  } else {
+    proxy.$router.push({
+      path: "/platform_manage/process/processApproval",
+      query: {
+        flowKey: "wdly_apply_purchase",
+        flowName: "申购发起",
+        random: proxy.random(),
+        arr: JSON.stringify(selectData.value),
+      },
+    });
+  }
 };
 
 const openModalOne = (flag, arr = []) => {

+ 22 - 6
src/views/WDLY/outInBound/waitInBound/index.vue

@@ -19,9 +19,8 @@
           </div>
         </template>
         <template #logistics="{ item }">
-          {{ item.logisticsCompanyName }} (
-          <span style="cursor: pointer; color: #409eff"> {{ item.code }} </span>
-          )
+          {{ item.logisticsCompanyName }}
+          <span style="cursor: pointer; color: #409eff"> ({{ item.code }}) </span>
         </template>
       </byTable>
     </div>
@@ -146,6 +145,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "物流副单号",
+        prop: "subCode",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
         label: "仓库名称",
         prop: "receiptWarehouseName",
         width: 120,
@@ -261,7 +267,7 @@ const formConfig = reactive([
     type: "select",
     prop: "warehouseId",
     label: "仓库名称",
-    itemWidth: 33,
+    itemWidth: 33.33,
     isLoad: {
       url: "/warehouse/page",
       req: {
@@ -278,8 +284,17 @@ const formConfig = reactive([
     type: "input",
     prop: "code",
     label: "物流信息",
+    placeholder: " ",
+    disabled: true,
+    itemWidth: 33.33,
+  },
+  {
+    type: "input",
+    prop: "subCode",
+    label: "物流副单号",
+    placeholder: " ",
     disabled: true,
-    itemWidth: 33,
+    itemWidth: 33.33,
   },
   {
     type: "input",
@@ -365,7 +380,8 @@ const getDtl = (row) => {
       type: "1",
       businessType: res.businessType + "",
       warehouseId: "",
-      code: json.code ? json.code : "",
+      code: json.code ? json.logisticsCompanyName + `(${json.code})` : "",
+      subCode: json.subCode ? json.subCode : "",
       stockWaitDetailsList: res.stockWaitDetailsList.map((x) => ({
         ...x,
         arrivalQuantity: x.quantity,

+ 2 - 2
src/views/WDLY/purchaseManage/alreadyPurchase/index.vue

@@ -115,8 +115,8 @@
                       <el-table-column label="物品编码" prop="productCustomCode" />
                       <el-table-column label="物品名称" prop="productName" />
                       <el-table-column label="规格" prop="productSpec" />
-                      <el-table-column label="单位" prop="productUnit" />
-                      <el-table-column label="发货数量" prop="deliverGoodsQuantity" />
+                      <el-table-column label="单位" prop="productUnit" width="130" />
+                      <el-table-column label="发货数量" prop="deliverGoodsQuantity" width="130" />
                     </el-table>
                   </div>
                 </template>