lichao 3 lat temu
rodzic
commit
05a868bc40

+ 2 - 2
src/views/businessManagement/deliveryNotice/configuration/customerContact.json

@@ -167,7 +167,7 @@
       "overHidden": true
     },
     {
-      "label": "出库数量",
+      "label": "订单数量",
       "prop": "actualQuantity",
       "index": 10,
       "width":100,
@@ -177,7 +177,7 @@
       "rules": [
         {
           "required": false,
-          "message": "请输入出库数量",
+          "message": "请输入订单数量",
           "trigger": "blur"
         }
       ]

+ 1 - 1
src/views/businessManagement/deliveryNotice/index.vue

@@ -75,7 +75,7 @@
             type="text"
             icon="el-icon-delete"
             size="small"
-            :disabled="scope.row.deliveryStatus === '已发货'"
+            :disabled="scope.row.deliveryStatus === '已发货' || scope.row.deliveryStatus === '已到货'"
             @click.stop="rowDel(scope.row,scope.index)"
           >删除
           </el-button>

+ 1 - 1
src/views/businessManagement/salesOrder/configuration/mainList.json

@@ -15,7 +15,7 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 130,
+  "menuWidth": 210,
   "dialogClickModal": false,
   "searchLabelWidth": 100,
   "searchIcon": true,

+ 50 - 1
src/views/businessManagement/salesOrder/index.vue

@@ -100,6 +100,12 @@
           >生成采购</el-button>
           <el-button
             type="text"
+            size="small"
+            @click="customerReceipt(scope.row)"
+            :disabled="!scope.row.status || scope.row.status < 3 || scope.row.createFreight == 1"
+          >客户收货</el-button>
+          <el-button
+            type="text"
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row,scope.index)"
@@ -121,7 +127,9 @@
 
 <script>
 import option from "./configuration/mainList.json";
-import {customerList, typeSave, deleteDetails, saveSell,detail} from "@/api/basicData/configuration"
+import {customerList,
+  typeSave, deleteDetails,
+  saveSell,detail, generateShipment} from "@/api/basicData/configuration"
 import detailPage from "./detailsPageEdit";
 import search from "../../../page/index/search";
 import { defaultDate } from "@/util/date";
@@ -588,6 +596,47 @@ export default {
         })
       })
     },
+    customerReceipt(row) {
+      if (this.$store.getters.inStatus) {
+        this.$alert("客户收货存在,请保存客户收货再进行操作", "温馨提示", {
+          confirmButtonText: "确定",
+          type: "warning",
+          callback: action => {
+          }
+        });
+      } else {
+        let arr = []
+        this.openFullScreen(false, '正在生成客户收货...');
+        detail(row.id).then(res => {
+          arr = res.data.data.orderItemsList? res.data.data.orderItemsList: [];
+          if (arr.length === 0) return this.$message.error('该单子明细为空,不能生成客户收货')
+          let ids = [];
+          arr.forEach(item => ids.push(item.id));
+          generateShipment({id: row.id, orderItemIds: ids}).then(res => {
+            this.$router.$avueRouter.closeTag("/businessManagement/deliveryNotice/index");
+            this.$router.push({
+              path: "/businessManagement/deliveryNotice/index",
+              query: {
+                form: JSON.stringify(res.data.data),
+                pageType: "Generate",
+              },
+            });
+          }).finally(() => {
+            this.openFullScreen(true);
+          })
+        })
+      }
+    },
+    //遮罩层
+    openFullScreen(res, text) {
+      const loading = this.$loading({
+        lock: true,
+        text: text,
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      if (res === true) loading.close();
+    },
   }
 }
 </script>