浏览代码

feat:发货工单、发货单详情添加平台订单号。

snow 1 年之前
父节点
当前提交
fc844f7e91

+ 13 - 8
src/views/purchaseIn/deliveryWorkOrder/components/ShowDataTableColumns.js

@@ -11,17 +11,17 @@ const showColumns = [
     _slot_: 'status',
     span: 5
   },
+  {
+    prop:'platform_order',
+    label:'平台订单号',
+    span:6
+  },
   {
     prop: 'order_type',
     label: '订单来源',
     _slot_: 'order_type',
     span: 6
-  }, {
-    prop: 'apply_name',
-    label: '创建人',
-    span: 6
   },
-
   {
     prop: 'supplierName',
     label: '供应商公司',
@@ -62,8 +62,8 @@ const showColumns = [
     span: 6
   },
   {
-    prop: 'post_name',
-    label: '物流公司',
+    prop: 'apply_name',
+    label: '创建人',
     span: 6
   },
   {
@@ -71,10 +71,15 @@ const showColumns = [
     label: '物流编号',
     span: 12
   },
+  {
+    prop: 'post_name',
+    label: '物流公司',
+    span: 6
+  },
   {
     prop: 'post_fee',
     label: '物流费用',
-    span: 12
+    span: 6
   },
   {
     prop: 'addr_contactor',

+ 1 - 1
src/views/purchaseIn/deliveryWorkOrder/index.vue

@@ -31,7 +31,7 @@
                   :active-value="usetypeOtions[1].value"
                   :inactive-value="usetypeOtions[0].value"
                   :active-text="usetypeOtions[1].label"
-                  :inactive-text="usetypeOtions[0].label"
+                  :inactive-text="usetypeOptions[0].label"
                   @change="
                     pageInfo.curr = 1;
                     parmValue.page = 1;

+ 7 - 7
src/views/sellOut/deliveryWorkOrder/components/ShowDataTableColumns.js

@@ -3,7 +3,7 @@ const showColumns = [
   {
     prop: 'outChildCode',
     label: '发货工单号',
-    span: 7
+    span: 6
   },
   {
     prop: 'status',
@@ -11,17 +11,17 @@ const showColumns = [
     _slot_: 'status',
     span: 5
   },
+  {
+    prop:'platform_order',
+    label:'平台订单号',
+    span:6
+  },
   {
     prop: 'order_type',
     label: '订单来源',
     _slot_: 'order_type',
     span: 6
-  }, {
-    prop: 'apply_name',
-    label: '创建人',
-    span: 6
-  },
-
+  }, 
   {
     prop: 'supplierName',
     label: '供应商公司',

+ 44 - 35
src/views/sellOut/deliveryWorkOrder/detail.vue

@@ -1,6 +1,6 @@
 <template>
-  <div class="sellReturnDetail pagePadding" > 
-    <div style="width: 100%"  v-if="powers.some((i) => i == '007')">
+  <div class="sellReturnDetail pagePadding">
+    <div style="width: 100%" v-if="powers.some((i) => i == '007')">
       <el-tabs v-model="activeTabs">
         <el-tab-pane label="业务详情" name="1">
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
@@ -38,7 +38,8 @@
                   <el-popover placement="top" width="300" trigger="hover">
                     <ul>
                       <li>
-                        <span>供应商编号:</span><span>{{ sitem.supplierNo }}</span>
+                        <span>供应商编号:</span>
+                        <span>{{ sitem.supplierNo }}</span>
                       </li>
                     </ul>
                     <i class="el-icon-warning-outline fr" slot="reference"></i>
@@ -49,8 +50,8 @@
                   <el-popover placement="top" width="300" trigger="hover">
                     <ul>
                       <li>
-                        <span>业务公司编号:</span
-                        ><span>{{ sitem.companyNo }}</span>
+                        <span>业务公司编号:</span>
+                        <span>{{ sitem.companyNo }}</span>
                       </li>
                     </ul>
                     <i class="el-icon-warning-outline fr" slot="reference"></i>
@@ -62,8 +63,8 @@
                   <el-popover placement="top" width="300" trigger="hover">
                     <ul>
                       <li>
-                        <span>客户公司编号:</span
-                        ><span>{{ sitem.customer_code }}</span>
+                        <span>客户公司编号:</span>
+                        <span>{{ sitem.customer_code }}</span>
                       </li>
                     </ul>
                     <i class="el-icon-warning-outline fr" slot="reference"></i>
@@ -75,12 +76,12 @@
                   <el-popover placement="top" width="300" trigger="hover">
                     <ul>
                       <li>
-                        <span>仓库编号:</span
-                        ><span>{{ sitem.wsm_code }}</span>
+                        <span>仓库编号:</span>
+                        <span>{{ sitem.wsm_code }}</span>
                       </li>
                       <li>
-                        <span>仓库负责人:</span
-                        ><span>{{ sitem.contactor_name }}</span>
+                        <span>仓库负责人:</span>
+                        <span>{{ sitem.contactor_name }}</span>
                       </li>
                     </ul>
                     <i class="el-icon-warning-outline fr" slot="reference"></i>
@@ -100,7 +101,11 @@
             </el-collapse-item>
 
             <!-- canSend -->
-            <el-collapse-item title="待库管发货" name="2"  v-if="canSend && sitem.status === '1' && !isSupertube && ppowers.includes('1')">
+            <el-collapse-item
+              title="待库管发货"
+              name="2"
+              v-if="canSend && sitem.status === '1' && !isSupertube && ppowers.includes('1')"
+            >
               <express-node @refresh="() => initData()" :sitem="sitem" />
             </el-collapse-item>
           </el-collapse>
@@ -127,7 +132,7 @@ import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/deliveryWorkOrder";
 import { showColumns } from "./components/ShowDataTableColumns";
 import { xs_order_type_options } from "@/assets/js/statusList";
-import ExpressNode from "./components/express.vue"
+import ExpressNode from "./components/express.vue";
 import { mapGetters } from "vuex";
 export default {
   name: "deliveryWorkOrderDetail",
@@ -137,13 +142,13 @@ export default {
     return {
       showColumns,
       activeTabs: "1",
-      goodDetail:null,
+      goodDetail: null,
       statusOptions: [
         { value: "1", label: "待发货" },
         { value: "2", label: "发货完成" },
         // { value: "3", label: "已收货" },
         // { value: "4", label: "已全部收货" },
-        { value: "5", label: "已取消"}
+        { value: "5", label: "已取消" }
       ],
       xs_order_type_options,
       sitem: null, //传给组件
@@ -152,53 +157,57 @@ export default {
       statusList: [
         {
           value: "1",
-          label: "待验货",
+          label: "待验货"
         },
         {
           value: "2",
-          label: "待验货审核",
+          label: "待验货审核"
         },
         {
           value: "3",
-          label: "待业务审核",
-        },
+          label: "待业务审核"
+        }
       ],
       newTime: "",
       loading: false,
       is_stock: "",
-      queryId: "",
+      queryId: ""
     };
   },
   mounted() {
     this.queryId = this.$route.query.id;
     this.initData();
   },
-  computed:{
+  computed: {
     ...mapGetters(["isSupertube"]),
-    canSend(){
-      const { id:userId } = this.userInfo || {};
-      const { contactor:manangerUserId ,order_type ,has_account } = this.sitem || {};
-      const isStock = String(order_type) === '1'
+    canSend() {
+      const { id: userId } = this.userInfo || {};
+      const { contactor: manangerUserId, order_type, has_account } =
+        this.sitem || {};
+      const isStock = String(order_type) === "1";
 
       /* 不是库存品&&没有供应商端账号 **/
-      if(!isStock && String(has_account) !== '1'){
-        return true
+      if (!isStock && String(has_account) !== "1") {
+        return true;
       }
 
       /* 库存品&&用户id和库管id一致 **/
-      if(!userId || !manangerUserId) return false
-      return userId === manangerUserId
+      if (!userId || !manangerUserId) return false;
+      return userId === manangerUserId;
     },
-    ...mapGetters(['isSupertube','userInfo']),
+    ...mapGetters(["isSupertube", "userInfo"]),
     powers() {
       const { btnList } = this.$store.getters;
-      const tran = btnList.find((item) => item.menu_route == "deliveryWorkOrderDetail" ) || {};
+      const tran =
+        btnList.find(item => item.menu_route == "deliveryWorkOrderDetail") ||
+        {};
       const { action } = tran ?? {};
       return action ?? [];
     },
     ppowers() {
       const tran =
-        this.$store.getters.roleProcess.find((i) => i.process_type === "FHGD") || {};
+        this.$store.getters.roleProcess.find(i => i.process_type === "FHGD") ||
+        {};
       const { action } = tran ?? {};
       return action ?? [];
     }
@@ -206,7 +215,7 @@ export default {
   methods: {
     async initData() {
       const { code, data, message } = await asyncRequest.detail({
-        outChildCode: this.queryId,
+        outChildCode: this.queryId
       });
       if (code === 0) {
         const { is_stock, status } = data;
@@ -223,8 +232,8 @@ export default {
     },
     getNewTime() {
       this.newTime = new Date().valueOf();
-    },
-  },
+    }
+  }
 };
 </script>
 

+ 1 - 1
src/views/sellOut/sellOutOrder/columns.js

@@ -270,7 +270,7 @@ const showColumns = [
     span: 6
   },
   {
-    prop: 'poCode',
+    prop: 'platform_order',
     label: '平台订单编号',
     span: 6
   },

+ 74 - 70
src/views/sellOut/sellOutOrder/index.vue

@@ -28,14 +28,12 @@
               <el-col :span="4" style="width: 405px; display: flex; align-items: center">
                 <el-dropdown>
                   <el-button size="mini" style="margin-right: 10px">
-                    {{ timerMaps[timerKey].label
-                    }}<i class="el-icon-arrow-down el-icon--right"></i>
+                    {{ timerMaps[timerKey].label}}
+                    <i class="el-icon-arrow-down el-icon--right"></i>
                   </el-button>
                   <el-dropdown-menu slot="dropdown">
                     <el-dropdown-item v-for="key in Object.keys(timerMaps)" :key="key">
-                      <p @click="setTimerKey(key)">
-                        {{ timerMaps[key].label }}
-                      </p>
+                      <p @click="setTimerKey(key)">{{ timerMaps[key].label }}</p>
                     </el-dropdown-item>
                   </el-dropdown-menu>
                 </el-dropdown>
@@ -67,9 +65,7 @@
                   type="primary"
                   style="float: right; margin-left: 5px"
                   @click="searchList"
-                >
-                  刷新
-                </el-button>
+                >刷新</el-button>
               </el-col>
               <el-col
                 :span="4"
@@ -82,14 +78,12 @@
                   @click="download"
                   :size="searchSize"
                   class="fr"
-                >
-                  导出
-                </el-button>
+                >导出</el-button>
               </el-col>
             </el-row>
             <el-row style="padding-top: 10px">
               <el-col :span="4" style="width: 177px">
-                <el-switch 
+                <el-switch
                   v-model="parmValue.use_type"
                   :active-value="usetypeOtions[1].value"
                   :inactive-value="usetypeOtions[0].value"
@@ -163,14 +157,7 @@
               </el-col>
 
               <el-col :span="4" style="width: 66px" class="fr">
-                <el-button
-                  type="warning"
-                  class="fr"
-                  :size="searchSize"
-                  @click="restSearch"
-                >
-                  重置
-                </el-button>
+                <el-button type="warning" class="fr" :size="searchSize" @click="restSearch">重置</el-button>
               </el-col>
             </el-row>
 
@@ -264,8 +251,8 @@
         <template #use_type="{ scope }">
           <el-tag size="mini">
             {{
-              (usetypeOtions.find(({ value }) => value === scope.row.use_type) || {})
-                .label || "---"
+            (usetypeOtions.find(({ value }) => value === scope.row.use_type) || {})
+            .label || "---"
             }}
           </el-tag>
         </template>
@@ -330,32 +317,33 @@ import { shareWebUrl } from "@/config";
 import {
   xs_order_source_options,
   xs_order_type_options,
-  usetypeOtions,
+  usetypeOtions
 } from "@/assets/js/statusList";
 import companyHelper from "@/mixins/companyHelper";
 export default {
   name: "sellOutOrder",
   mixins: [mixinPage, resToken, companyHelper],
   components: {
-    addEdit,
+    addEdit
   },
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size", "isSupertube"]),
     powers() {
       const tran =
-        this.$store.getters.btnList.find((item) => item.menu_route == "sellOutOrder") ||
-        {};
+        this.$store.getters.btnList.find(
+          item => item.menu_route == "sellOutOrder"
+        ) || {};
       const { action } = tran ?? {};
       return action ?? [];
     },
     dpowers() {
       const tran =
         this.$store.getters.btnList.find(
-          (item) => item.menu_route == "sellOutOrderDetail"
+          item => item.menu_route == "sellOutOrderDetail"
         ) || {};
       const { action } = tran ?? {};
       return action ?? [];
-    },
+    }
   },
   data() {
     return {
@@ -370,13 +358,13 @@ export default {
         add: {
           start: "start",
           end: "end",
-          label: "添加时间",
+          label: "添加时间"
         },
         send: {
           start: "start_sendtime",
           end: "end_sendtime",
-          label: "发货时间",
-        },
+          label: "发货时间"
+        }
       },
       sitem: null,
       // 状态
@@ -412,7 +400,7 @@ export default {
         company_name: "", //申请人部门
         page: 1, // 页码
         size: 15, // 每页显示条数
-        use_type: "1",
+        use_type: "1"
       },
       // 表格 - 数据
       tableData: [],
@@ -420,18 +408,18 @@ export default {
       table: {
         stripe: true,
         border: true,
-        _defaultHeader_: ["setcol"],
+        _defaultHeader_: ["setcol"]
       },
       // 表格 - 分页
       pageInfo: {
         size: 15,
         curr: 1,
-        total: 0,
+        total: 0
       },
       // 表格 - 列参数
       columns,
       xs_order_source_options,
-      xs_order_type_options,
+      xs_order_type_options
     };
   },
   mounted() {
@@ -439,7 +427,7 @@ export default {
     const { back } = this.$route.query;
     if (back) {
       this.parmValue = JSON.parse(back);
-      console.log( this.parmValue);
+      console.log(this.parmValue);
       const { page, size } = this.parmValue;
 
       // if (this.parmValue.customerCode.length > 0) {
@@ -449,7 +437,7 @@ export default {
       this.pageInfo = {
         size: size,
         curr: page,
-        total: 0,
+        total: 0
       };
       //多选条件
       this.select = this.parmValue.select;
@@ -466,8 +454,8 @@ export default {
     async supplierChange(e) {
       const { code, label } = e;
       // this.supplierNo = code ? [code] : [];
-      this.parmValue.supplierNo = code ? [code] : []
-      this.parmValue.supplierName = label
+      this.parmValue.supplierNo = code ? [code] : [];
+      this.parmValue.supplierName = label;
       this.pageInfo.curr = 1;
       this.parmValue.page = 1;
       this.searchList();
@@ -491,7 +479,7 @@ export default {
     getRouter(toRouter, queryId) {
       if (toRouter && queryId) {
         let model = {
-          id: queryId,
+          id: queryId
           // type: 'view',
         };
 
@@ -502,7 +490,7 @@ export default {
         //
         let routerModel = {
           options: JSON.parse(JSON.stringify(this.parmValue)),
-          router: this.$route.path,
+          router: this.$route.path
         };
         model.preModel = JSON.stringify(routerModel);
 
@@ -525,9 +513,9 @@ export default {
       }
 
       let model = {
-        outCodes: [],
+        outCodes: []
       };
-      this.changeList.forEach((item) => {
+      this.changeList.forEach(item => {
         model.outCodes.push(item.outCode);
       });
 
@@ -544,10 +532,10 @@ export default {
           headers: {
             // 'Content-Type': 'multipart/form-data',
             // Accept: "application/vnd.ms-excel"
-            Accept: httpType,
-          },
+            Accept: httpType
+          }
         })
-          .then((res) => {
+          .then(res => {
             // console.log(res)
             // console.log(this.fileUrl)
             // return;
@@ -555,7 +543,7 @@ export default {
               let url = window.URL.createObjectURL(
                 new Blob([res.data], {
                   // type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
-                  type: httpType,
+                  type: httpType
                 })
               );
               let link = document.createElement("a");
@@ -578,7 +566,7 @@ export default {
               }, 500);
             }
           })
-          .catch((error) => {
+          .catch(error => {
             console.log(error);
             this.loading = false;
           });
@@ -604,13 +592,13 @@ export default {
         company_name: "", //申请人部门
         page: 1, // 页码
         size: 15, // 每页显示条数
-        use_type: "1",
+        use_type: "1"
       };
       // 表格 - 分页
       this.pageInfo = {
         size: 15,
         curr: 1,
-        total: 0,
+        total: 0
       };
       this.searchList();
     },
@@ -625,18 +613,18 @@ export default {
       await this.$confirm("确定要删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(async () => {
           const model = {
             id: id,
-            status: status + "" === "1" ? "0" : "1",
+            status: status + "" === "1" ? "0" : "1"
           };
           const res = await asyncRequest.status(model);
           if (res && res.code === 0) {
             this.$notify.success({
               title: "删除成功",
-              message: "",
+              message: ""
             });
             this.searchList();
           } else if (res && res.code >= 100 && res.code <= 104) {
@@ -661,21 +649,31 @@ export default {
         return;
       }
       this.loading = true;
-      let { start, end,supplierNo, customerCode ,supplierName,customerName ,...rest } = JSON.parse(JSON.stringify(this.parmValue));
+      let {
+        start,
+        end,
+        supplierNo,
+        customerCode,
+        supplierName,
+        customerName,
+        ...rest
+      } = JSON.parse(JSON.stringify(this.parmValue));
 
       const res = await asyncRequest.list({
         ...rest,
         supplierNo: Array.isArray(supplierNo) ? supplierNo[0] : supplierNo,
-        customerCode: Array.isArray(customerCode) ? customerCode[0] : customerCode,
+        customerCode: Array.isArray(customerCode)
+          ? customerCode[0]
+          : customerCode,
         [startProp]: start,
         [endProp]: end,
-        needRela: true,
+        needRela: true
       });
 
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);
-        this.tableData.forEach((v) => {
+        this.tableData.forEach(v => {
           v.good_class = "";
           if (v.can && v.can.length > 0) {
             v.can.forEach((x, i) => {
@@ -697,20 +695,20 @@ export default {
       await this.$confirm("确定要改为" + str + "?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning",
+        type: "warning"
       })
         .then(async () => {
           this.loading = true;
           const model = {
             id: id,
-            status: status + "" === "1" ? "0" : "1",
+            status: status + "" === "1" ? "0" : "1"
           };
           const res = await asyncRequest.status(model);
           if (res && res.code === 0) {
             this.loading = false;
             this.$notify.success({
               title: "状态修改成功!",
-              message: "",
+              message: ""
             });
             await this.searchList();
           } else if (res && res.code >= 100 && res.code <= 104) {
@@ -742,11 +740,11 @@ export default {
       }
     },
     async customerChange(e) {
-      console.log(e)
+      console.log(e);
 
       if (e && e.id) {
         this.parmValue.customerName = e.label;
-        this.parmValue.customerCode = e.code ? [e.code] : ""
+        this.parmValue.customerCode = e.code ? [e.code] : "";
       } else {
         this.parmValue.customerCode = [];
         this.parmValue.customerName = "";
@@ -756,21 +754,27 @@ export default {
       await this.searchList();
     },
     async handleValue() {
-      this.parmValue.orderCode = this.select === "orderCode" ? this.s_input : "";
+      this.parmValue.orderCode =
+        this.select === "orderCode" ? this.s_input : "";
       this.parmValue.outCode = this.select === "outCode" ? this.s_input : "";
-      this.parmValue.supplier_name = this.select === "supplier_name" ? this.s_input : "";
+      this.parmValue.supplier_name =
+        this.select === "supplier_name" ? this.s_input : "";
 
       // this.parmValue.supplierName =
       //   this.select === "supplierNo" ? this.s_input : "";
-      this.parmValue.good_code = this.select === "good_code" ? this.s_input : "";
-      this.parmValue.good_name = this.select === "good_name" ? this.s_input : "";
-      this.parmValue.apply_name = this.select === "apply_name" ? this.s_input : "";
+      this.parmValue.good_code =
+        this.select === "good_code" ? this.s_input : "";
+      this.parmValue.good_name =
+        this.select === "good_name" ? this.s_input : "";
+      this.parmValue.apply_name =
+        this.select === "apply_name" ? this.s_input : "";
       this.parmValue.cgdNo = this.select === "cgdNo" ? this.s_input : "";
-      this.parmValue.company_name = this.select === "company_name" ? this.s_input : "";
+      this.parmValue.company_name =
+        this.select === "company_name" ? this.s_input : "";
 
       await this.searchList();
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 20 - 10
src/views/supplierPurchaseIn/supplierDeliveryWorkOrder/components/ShowDataTableColumns.js

@@ -12,16 +12,16 @@ const showColumns = [
     span: 5
   },
   {
-    prop: 'order_type',
-    label: '订单来源',
+    prop:'platform_order',
+    label:'平台订单号',
+    span:6
+  },
+  {
+    prop: 'ordeer_type',
     _slot_: 'order_type',
-    span: 6
-  }, {
-    prop: 'apply_name',
-    label: '创建人',
+    label: '订单来源',
     span: 6
   },
-
   {
     prop: 'supplierName',
     label: '供应商公司',
@@ -62,8 +62,8 @@ const showColumns = [
     span: 6
   },
   {
-    prop: 'post_name',
-    label: '物流公司',
+    prop: 'apply_name',
+    label: '创建人',
     span: 6
   },
   {
@@ -71,10 +71,15 @@ const showColumns = [
     label: '物流编号',
     span: 12
   },
+  {
+    prop: 'post_name',
+    label: '物流公司',
+    span: 6
+  },
   {
     prop: 'post_fee',
     label: '物流费用',
-    span: 12
+    span: 6
   },
   {
     prop: 'addr_contactor',
@@ -90,6 +95,11 @@ const showColumns = [
     prop: 'addr',
     label: '收货地址',
     span: 8
+  },
+  {
+    prop: 'remark',
+    label: '备注',
+    span: 24
   }
 ]
 

+ 1 - 1
src/views/supplierSellOut/supplierFiling/index.vue

@@ -70,7 +70,7 @@
               >刷新</el-button>
             </el-col>
             <el-col :span="4" style="width: 66px; float: right">
-              <el-button type="warning" class="fr" :size="searchSize" @click="restSearch">重置</el-button>
+              <el-button class="fr" type="warning" :size="searchSize" @click="restSearch">重置</el-button>
             </el-col>
           </el-row>
 

+ 1 - 12
src/views/supplierSellOut/supplierSellOutOrder/columns.js

@@ -275,7 +275,7 @@ const showColumns = [
     span: 6
   },
   {
-    prop: 'poCode',
+    prop: 'platform_order',
     label: '平台订单编号',
     span: 6
   },
@@ -371,17 +371,6 @@ const showColumns = [
     label: '收货地址',
     span: 8
   }
-  // {
-  //   prop: 'remark',
-  //   label: '发货备注',
-  //   span: 24
-  // },
-  // {
-  //   prop: 'saleinfo',
-  //   label: 'bn仓库',
-  //   _slot_: 'saleinfo',
-  //   span: 24
-  // }
 ]
 
 const rshowColumns = [