xiaodai2017 2 年之前
父節點
當前提交
1f07733103

+ 16 - 9
src/apis/purchaseOrder/index.js

@@ -11,23 +11,30 @@ export default {
   // 详情
   detail: (data, params) => http(api + "getOrderInfo", data, "post", params),
   // 批量供应商确认
-  status: (data, params) => http(api + "changeOrderStatus", data, "post", params),
- 
+  status: (data, params) =>
+    http(api + "changeOrderStatus", data, "post", params),
+  // 批量入库
+  addOrderIn: (data, params) => http(api + "addOrderIn", data, "post", params),
   // 异常原因列表
   resultlist: (data, params) => http(api + "resultlist", data, "post", params),
   // 入库单验货
-  orderincheck: (data, params) => http(api + "orderincheck", data, "post", params),
+  orderincheck: (data, params) =>
+    http(api + "orderincheck", data, "post", params),
   // 入库单退货换货
-  orderinreturn: (data, params) => http(api + "orderinreturn", data, "post", params),
+  orderinreturn: (data, params) =>
+    http(api + "orderinreturn", data, "post", params),
   // 发货单状态修改
-  orderinstatus: (data, params) => http(api + "orderinstatus", data, "post", params),
+  orderinstatus: (data, params) =>
+    http(api + "orderinstatus", data, "post", params),
   // 采返商品详情
   re_detail: (data, params) => http(api + "goodzxinfo", data, "post", params),
   //商品成本详情
   cost_detail: (data, params) => http(api + "goodupinfo", data, "post", params),
 
-   // 采返商品详情 订单生成前
-   cove_detail: (data, params) => http(api + "getgoodzxinfobynotzixun", data, "post", params),
-   //导出
-   exportcgdlist: (data, params) => http(api + "exportcgdlist", data, "post", params),
+  // 采返商品详情 订单生成前
+  cove_detail: (data, params) =>
+    http(api + "getgoodzxinfobynotzixun", data, "post", params),
+  //导出
+  exportcgdlist: (data, params) =>
+    http(api + "exportcgdlist", data, "post", params),
 };

+ 24 - 23
src/components/show-goods-data-table/ShowDataTableColumns.js

@@ -205,12 +205,12 @@ const coveColumns = [
     span: 24,
 
   },
-  {
-    prop: "noble",
-    _slot_: "noble",
-    label: "贵金属信息",
-    span: 24,
-  },
+  // {
+  //   prop: "noble",
+  //   _slot_: "noble",
+  //   label: "贵金属信息",
+  //   span: 24,
+  // },
   {
     prop: "craft_desc",
     label: "工艺说明",
@@ -365,11 +365,11 @@ const onlineColumns = [
     append: 'g',
     span: 6,
   },
-  {
-    prop: "noble",
-    _slot_: "noble",
-    label: "贵金属信息",
-  },
+  // {
+  //   prop: "noble",
+  //   _slot_: "noble",
+  //   label: "贵金属信息",
+  // },
 
   // {
   //   prop: "packing_list",
@@ -565,12 +565,12 @@ const costColumns = [
   {
     prop: "cat",
     label: "分类",
-    span: 8,
+    span: 12,
   },
   {
     prop: "unit",
     label: "单位",
-    span: 4,
+    span: 6,
   },
   {
     prop: "brand_name",
@@ -602,17 +602,12 @@ const costColumns = [
     _slot_: "supply_area",
     span: 6,
   },
-  {
-    prop: "good_type",
-    label: "是否定制",
-    _slot_: "good_type",
-    span: 8,
-  },
+
   {
     prop: "tax",
     label: "税点",
     append: '%',
-    span: 4,
+    span: 6,
   },
   // {
   //   prop: "delivery_day",
@@ -645,10 +640,16 @@ const costColumns = [
     span: 6,
   },
   {
-    prop: "noble",
-    _slot_: "noble",
-    label: "贵金属信息",
+    prop: "good_type",
+    label: "是否定制",
+    _slot_: "good_type",
+    span: 12,
   },
+  // {
+  //   prop: "noble",
+  //   _slot_: "noble",
+  //   label: "贵金属信息",
+  // },
   {
     prop: "after_sales",
     label: "售后说明",

+ 12 - 0
src/mixins/resToken.js

@@ -27,8 +27,20 @@ export default {
         if (rescode === 0) {
           resolve(res);
         } else if (rescode >= 100 && rescode <= 104) {
+          this.loading=false
           await this.logout();
+        } else if (rescode === 1004) {
+          this.loading=false
+          this.$notify({
+            title: message,
+            dangerouslyUseHTMLString: true,
+            message: "5秒后,请您重新登录!",
+          });
+          await  setTimeout(async () => {
+            await this.logout();
+          }, 5000);
         } else {
+          this.loading=false
           if (type) {
             resolve(res);
           } else {

+ 23 - 23
src/views/purchaseOrder/columns.js

@@ -121,56 +121,56 @@ const showColumns= [
     _slot_: "company",
   },
 
-  {
-    prop: "wsm",
-    label: "仓库信息",
-    _slot_: "wsm",
-  },
+  // {
+  //   prop: "wsm",
+  //   label: "仓库信息",
+  //   _slot_: "wsm",
+  // },
  
  
  
   {
     prop: "total_fee",
     label: "采购总成本",
-    span: 6
+    span: 8
   },
   {
     prop: "good_price",
     label: "销售订单价",
-    span: 6
+    span: 8
   },
   {
     prop: "good_num",
     label: "采购总数量",
-    span: 6
+    span: 8
   },
   {
     prop: "send_num",
     label: "已发货数量",
-    span: 6
+    span: 8
   },
   {
     prop: "wsend_num",
     label: "未发货数量",
-    span: 6
+    span: 8
   },
   {
     prop: "addtime",
     label: "创建时间",
-    span: 6
-  },
-  {
-    prop: "gold_price",
-    label: "当前实时金价",
-    _slot_: "gold_price",
-    span: 12
-  },
-  {
-    prop: "customer",
-    label: "订单客户名称",
-    _slot_: "customer",
-    span: 12
+    span: 8
   },
+  // {
+  //   prop: "gold_price",
+  //   label: "当前实时金价",
+  //   _slot_: "gold_price",
+  //   span: 12
+  // },
+  // {
+  //   prop: "customer",
+  //   label: "订单客户名称",
+  //   _slot_: "customer",
+  //   span: 12
+  // },
   {
     prop: "addr_info",
     label: "收货信息",

+ 2 - 2
src/views/purchaseOrder/detail.vue

@@ -90,7 +90,7 @@
                 </el-popover>
               </template>
 
-              <template slot="wsm">
+              <!-- <template slot="wsm">
                 <span>{{ sitem.wsm_supplier }}/{{ sitem.wsm_name }}</span>
                 <el-popover placement="top" width="300" trigger="hover">
                   <ul>
@@ -103,7 +103,7 @@
                   </ul>
                   <i class="el-icon-warning-outline fr" slot="reference"></i>
                 </el-popover>
-              </template>
+              </template> -->
 
               <template slot="gold_price">
                 <div

+ 43 - 1
src/views/purchaseOrder/index.vue

@@ -133,7 +133,7 @@
             <el-col :span="4" style="width: 90px; float: right">
               <el-button
                 type="primary"
-                @click="statusConfirm"
+                @click="statusConfirmIn"
                 :size="searchSize"
                 class="fr"
               >
@@ -397,6 +397,48 @@ export default {
           console.log("取消");
         });
     },
+    async statusConfirmIn() {
+      if (this.changeList.length <= 0) {
+        this.$message.warning("至少选择一条销售订单数据!");
+        return;
+      }
+      let isok = true,
+        list = [];
+      this.changeList.forEach((e) => {
+        if (!(e.status === "1" || e.status === "2")) {
+          isok = false;
+        }
+        list.push(e.cgdNo);
+      });
+      if (!isok) {
+        this.$message.warning("只能选择未入库的销售订单!");
+        return;
+      }
+      await this.$confirm(`确定批量入库?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          let model = {
+            cgdNo: list,
+            // status: "3",
+          };
+          const res = await asyncRequest.addOrderIn(model);
+          const { code } = await this.useResHandle(res);
+          this.loading = false;
+          if (code === 0) {
+            this.$notify.success({
+              title: "提交成功!",
+              message: "",
+            });
+            await this.searchList();
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
     restSearch() {
       this.sselect = "创建时间";
       this.select = "1";