xiaodai2022 2 år sedan
förälder
incheckning
3c9781c70c

+ 13 - 5
src/assets/js/statusList.js

@@ -10,14 +10,22 @@ const cg_order_type_options = [
 const xs_order_type_options = [
   { id: "1", label: "库存品" },
   { id: "2", label: "非库存品" },
-  { id: "3", label: "采反" },
+  { id: "3", label: "采购反馈" },
+]
+const cg_order_source_options = [
+  { id: "0", label: "备库单" },
+  // { id: "1", label: "直接下单" },
+  { id: "2", label: "咨询转单" },
+  { id: "3", label: "项目转单" },
+  { id: "4", label: "平台导入" },
+  // { id: "5", label: "有赞平台" },
 ]
-
-const yw_order_source = [
+const xs_order_source_options = [
+  // { id: "0", label: "备库单" },
   { id: "1", label: "直接下单" },
   { id: "2", label: "咨询转单" },
   { id: "3", label: "项目转单" },
   { id: "4", label: "平台导入" },
-  { id: "5", label: "有赞平台" },
+  // { id: "5", label: "有赞平台" },
 ]
-export { statusList, cg_order_type_options, xs_order_type_options,yw_order_source };
+export { statusList, cg_order_type_options, xs_order_type_options, cg_order_source_options, xs_order_source_options };

+ 9 - 2
src/views/sellOut/salesOrder/columns.js

@@ -47,11 +47,18 @@ export default [
     _slot_: "status",
     width: "120px",
   },
+  
+  {
+    prop: "order_source",
+    label: "订单来源",
+    _slot_: "order_source",
+    width: "90px",
+  },
   {
     prop: "order_type",
-    label: "订单类型",
+    label: "商品来源",
     _slot_: "order_type",
-    width: "130px",
+    width: "90px",
   },
   {
     prop: "useage",

+ 9 - 3
src/views/sellOut/salesOrder/components/ShowDataTableColumns.js

@@ -92,15 +92,21 @@ const showColumns = [
     _slot_: "status",
     span: 6,
   },
+  {
+    prop: "order_source",
+    label: "订单来源",
+    _slot_: "order_source",
+    span: 4,
+  },
   {
     prop: "order_type",
-    label: "订单类型",
+    label: "商品来源",
     _slot_: "order_type",
-    span: 6,
+    span: 4,
   }, {
     prop: "apply_name",
     label: "创建人",
-    span: 6,
+    span: 4,
   },
 
   {

+ 16 - 1
src/views/sellOut/salesOrder/detail.vue

@@ -59,6 +59,20 @@
                     "
                   ></el-tag>
                 </template>
+                <template slot="order_source">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (
+                        xs_order_source_options.find(
+                          (item) => item.id == sitem.order_source
+                        ) || {}
+                      ).label || '--'
+                    "
+                  ></el-tag>
+                </template>
+
+                
 
                 <template slot="supplierName">
                   <span>{{ sitem.supplierName }}</span>
@@ -206,7 +220,7 @@ import orderOutTable from "./components/order-out-table";
 
 import { showColumns } from "./components/ShowDataTableColumns";
 import setPartial from "./setPartial";
-import { xs_order_type_options } from "@/assets/js/statusList";
+import {  xs_order_source_options,xs_order_type_options } from "@/assets/js/statusList";
 export default {
   name: "salesOrderDetail",
   mixins: [mixinPage, resToken],
@@ -250,6 +264,7 @@ export default {
         },
       ],
       xs_order_type_options,
+       xs_order_source_options,
       statusOptions: [
         { value: "0", label: "待发货" },
         { value: "1", label: "待发货完成" },

+ 54 - 35
src/views/sellOut/salesOrder/index.vue

@@ -98,7 +98,7 @@
                   :value="customerCode"
                   :size="searchSize"
                   :names="parmValue.supplierName"
-                    :is-detail="true"
+                  :is-detail="true"
                   :placeholder="'客户公司名称'"
                   @searchChange="customerChange"
                 />
@@ -110,7 +110,7 @@
                   v-model="parmValue.order_type"
                   filterable
                   clearable
-                  placeholder="订单类型"
+                  placeholder="商品来源"
                   style="width: 100%"
                   @change="
                     pageInfo.curr = 1;
@@ -158,7 +158,10 @@
                     ></el-option> -->
                     <el-option label="商品名称" value="good_name"></el-option>
                     <el-option label="创建人" value="apply_name"></el-option>
-                    <el-option label="创建人部门" value="company_name"></el-option>
+                    <el-option
+                      label="创建人部门"
+                      value="company_name"
+                    ></el-option>
                   </el-select>
                 </el-input>
               </el-col>
@@ -217,18 +220,31 @@
             :size="tablebtnSize"
             v-text="
               (
-                xs_order_type_options.find((item) => item.id == scope.row.order_type) ||
-                {}
+                xs_order_type_options.find(
+                  (item) => item.id == scope.row.order_type
+                ) || {}
               ).label || '--'
             "
           ></el-tag>
         </template>
+        <template #order_source="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            v-text="
+              (
+                xs_order_source_options.find(
+                  (item) => item.id == scope.row.order_source
+                ) || {}
+              ).label || '--'
+            "
+          ></el-tag>
+        </template>
+
         <template #operation="{ scope }">
           <el-tooltip effect="dark" content="详情" placement="top">
             <i
               class="el-icon-view tb-icon"
-              
-               @click="getRouter('salesOrderDetail', scope.row.id )"
+              @click="getRouter('salesOrderDetail', scope.row.id)"
             ></i>
           </el-tooltip>
         </template>
@@ -263,7 +279,10 @@ import columns from "./columns"; //表格列参数
 import addEdit from "./components/addEdit";
 import userAddEdit from "./userAddEdit";
 import { mapGetters } from "vuex";
-import { xs_order_type_options } from "@/assets/js/statusList";
+import {
+  xs_order_type_options,
+  xs_order_source_options,
+} from "@/assets/js/statusList";
 export default {
   name: "salesOrder",
   mixins: [mixinPage, resToken],
@@ -272,7 +291,7 @@ export default {
     userAddEdit,
   },
   computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size",]),
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       let tran =
         this.$store.getters.btnList.find(
@@ -300,6 +319,7 @@ export default {
         { id: "3", label: "订单已取消" },
       ],
       xs_order_type_options,
+      xs_order_source_options,
       loading: false,
       showModel: false,
       isDetail: false,
@@ -317,8 +337,7 @@ export default {
         customer_code: "", //客户编号
         start: "", //新建起始时间
         end: "", // 新建结束时间
-        company_name:"", //创建人部门
-
+        company_name: "", //创建人部门
       },
       // 表格 - 数据
       tableData: [],
@@ -341,53 +360,52 @@ export default {
     };
   },
   mounted() {
-     const { back } = this.$route.query;
+    const { back } = this.$route.query;
     if (back) {
       this.parmValue = JSON.parse(back);
-      console.log(this.parmValue)
-      const {page,size}=this.parmValue;
+      console.log(this.parmValue);
+      const { page, size } = this.parmValue;
       // this.parmValue.start = start || last_start;
       // this.parmValue.end = end || last_end;
-      if(this.parmValue.customer_code.length>0){
-          this.customerCode = [this.parmValue.customer_code] ;
+      if (this.parmValue.customer_code.length > 0) {
+        this.customerCode = [this.parmValue.customer_code];
       }
-      
-       this.pageInfo= {
+
+      this.pageInfo = {
         size: size,
         curr: page,
         total: 0,
-      }
+      };
       //多选条件
-    this.select = this.parmValue.select;
-    // this.sselect = this.parmValue.sselect;
-    this.input = this.parmValue.input
-
-    }else{
-       this.select = "orderCode";
+      this.select = this.parmValue.select;
+      // this.sselect = this.parmValue.sselect;
+      this.input = this.parmValue.input;
+    } else {
+      this.select = "orderCode";
       //  this.sselect = "创建时间"
     }
     this.searchList();
   },
 
   methods: {
-    getRouter(toRouter, queryId){
+    getRouter(toRouter, queryId) {
       if (toRouter && queryId) {
         let model = {
           id: queryId,
-          type: 'view',
+          type: "view",
         };
 
         //有多选框的条件
-        this.parmValue.select = this.select ;
+        this.parmValue.select = this.select;
         // this.parmValue.sselect = this.sselect ;
-        this.parmValue.input= this.input;
+        this.parmValue.input = this.input;
         //
-         let routerModel = {
+        let routerModel = {
           options: JSON.parse(JSON.stringify(this.parmValue)),
           router: this.$route.path,
         };
         model.preModel = JSON.stringify(routerModel);
-        
+
         this.routeGoto(toRouter, model);
       } else {
         this.$message.warning("暂未找到相关流程!");
@@ -398,7 +416,7 @@ export default {
       this.input = "";
       this.customerCode = [];
       this.parmValue = {
-        order_type: "", 
+        order_type: "",
         orderCode: "", //销售订单code
         apply_name: "", // 申请人
         good_name: "", // 产品名称
@@ -410,7 +428,7 @@ export default {
         customer_code: "", //客户编号
         start: "", //新建起始时间
         end: "", // 新建结束时间
-        company_name:"", //部门
+        company_name: "", //部门
       };
       // 表格 - 分页
       this.pageInfo = {
@@ -461,7 +479,7 @@ export default {
         this.parmValue.customer_code = e.code;
       } else {
         this.customerCode = [];
-        this.parmValue.supplierName = '';
+        this.parmValue.supplierName = "";
         this.parmValue.customer_code = "";
       }
       this.parmValue.page = 1;
@@ -493,7 +511,8 @@ export default {
       this.parmValue.apply_name =
         this.select === "apply_name" ? this.input : "";
 
-      this.parmValue.company_name = this.select === "company_name" ? this.input : "";
+      this.parmValue.company_name =
+        this.select === "company_name" ? this.input : "";
 
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {

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

@@ -143,7 +143,7 @@ const showColumns = [
   },
   {
     prop: "order_type",
-    label: "订单类别",
+    label: "商品来源",
     _slot_: "order_type",
     span: 6
   },

+ 12 - 3
src/views/sellOut/sellOutOrder/detail.vue

@@ -62,9 +62,16 @@
                   ></el-tag>
                 </template>
                 <template slot="order_type">
-                  <el-tag :size="'mini'" :type="''">{{
-                    sitem.status === "1" ? "发货申请单" : "竞价发货申请单"
-                  }}</el-tag>
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (
+                        xs_order_type_options.find(
+                          (item) => item.id == sitem.order_type
+                        ) || {}
+                      ).label || '--'
+                    "
+                  ></el-tag>
                 </template>
                 <template slot="sale_price">
                   <span>{{
@@ -317,6 +324,7 @@ import { showColumns } from "./columns";
 import { sellshowColumns } from "@/views/sellOut/sellAfterApply/columns";
 import returnExpress from "./components/returnExpress";
 import wantDeliver from "./components/want-deliver.vue";
+import { xs_order_type_options } from "@/assets/js/statusList";
 import { mapGetters } from "vuex";
 export default {
   name: "sellOutOrderDetail",
@@ -343,6 +351,7 @@ export default {
   },
   data() {
     return {
+      xs_order_type_options,
       returnCode: "",
       returnCode_type: "",
       activeTabs: "1",

+ 3 - 14
src/views/sellOut/sellOutOrder/index.vue

@@ -179,18 +179,7 @@
             "
           ></el-tag>
         </template>
-        <template #order_type="{ scope }">
-          <el-tag
-            :size="'mini'"
-            v-text="
-              (
-                xs_order_type_options.find(
-                  (item) => item.id == scope.row.order_type
-                ) || {}
-              ).label || '--'
-            "
-          ></el-tag>
-        </template>
+      
         <template #operation="{ scope }">
           <el-tooltip
             v-if="powers.some((item) => item == '007')"
@@ -227,7 +216,7 @@ import urlConfig from "@/apis/url-config";
 import asyncRequest from "@/apis/service/sellOut/sellOutOrder";
 import addEdit from "./components/addEdit.vue";
 import { columns } from "./columns";
-import { xs_order_type_options } from "@/assets/js/statusList";
+
 export default {
   name: "sellOutOrder",
   mixins: [mixinPage, resToken],
@@ -255,7 +244,7 @@ export default {
       customerCode: [], //客户公司code
       fileUrl: urlConfig.baseURL,
       changeList: [],
-      xs_order_type_options,
+     
       // post_ownOptions: [
       //   { id: "1", label: "客户承担" },
       //   { id: "2", label: "公司承担" },