戴艳蓉 3 years ago
parent
commit
f8759073d4

+ 13 - 7
src/components/globalComponents/show-data-table/main.vue

@@ -1,21 +1,20 @@
 <template>
   <div class="show-data-table">
     <el-row class="purchaseOrderDetail-addForm">
+      <template v-for="(colu, index) in columns">
       <el-col
         :span="colu.span || 12"
         class="purchaseOrderDetail-addForm-el-col"
-        v-for="(colu, index) in columns"
+        v-if="colu._slot_||colu.showProp&&sitem[colu.prop]||!colu.showProp"
         :key="colu + index"
       >
         <div class="label">{{ colu.label }}:</div>
         <div class="name" v-if="colu._slot_">
-          <slot
-            :name="colu._slot_"
-            :slotName="colu._slot_"
-          ></slot>
+          <slot :name="colu._slot_" :slotName="colu._slot_"></slot>
         </div>
         <div class="name" v-else>{{ sitem[colu.prop] }}</div>
       </el-col>
+      </template>
     </el-row>
   </div>
 </template>
@@ -53,7 +52,7 @@ export default {
     };
   },
   watch: {
-     newTime: function (val) {
+    newTime: function (val) {
       if (val) {
         // this.initForm();
       }
@@ -69,13 +68,19 @@ export default {
 
 <style lang="scss" scoped>
 .show-data-table {
-  padding:0 0 20px 0;
+  padding: 0 0 20px 0;
+  width: 100%;
+  box-sizing: border-box;
   .purchaseOrderDetail-addForm {
     border-top: 1px solid #ebeef5 !important;
     border-left: 1px solid #ebeef5 !important;
+    width: 100%;
+    box-sizing: border-box;
     .purchaseOrderDetail-addForm-el-col {
       display: flex;
       align-items: stretch;
+      //  width: 100%;
+      box-sizing: border-box;
       //
       border-right: 1px solid #ebeef5 !important;
       .label {
@@ -96,6 +101,7 @@ export default {
         font-size: 12px !important;
         border-bottom: 1px solid #ebeef5 !important;
         padding: 0 0 0 12px !important;
+        word-break: break-all!important;
         color: #606266 !important;
       }
     }

+ 1 - 1
src/components/globalComponents/status-bar/main.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="statusBar" style="padding: 0 0 12px 0">
-    <el-steps :active="sIndex" align-center>
+    <el-steps :active="sIndex" align-center :process-status="(sIndex+1)===options.length?'finish':'process'">
       <!-- : index === sIndex
             ? 'el-icon-s-check' -->
 

+ 9 - 44
src/settings.js

@@ -1,70 +1,35 @@
-// module.exports = {
-//   title: '采销平台订单系统',
-//   /**
-//    * @type {boolean} true | false
-//    * @description Whether show the settings right-panel
-//    */
-//   showSettings: true,
-
-//   /**
-//    * @type {boolean} true | false
-//    * @description Whether need tagsView
-//    */
-//   tagsView: true,
-
-//   /**
-//    * @type {boolean} true | false
-//    * @description Whether fix the header
-//    */
-//   fixedHeader: true,
-
-//   /**
-//    * @type {boolean} true | false
-//    * @description Whether show the logo in sidebar
-//    */
-//   sidebarLogo: true,
-
-//   /**
-//    * @type {string | array} 'production' | ['production', 'development']
-//    * @description Need show err logs component.
-//    * The default is only used in the production env
-//    * If you want to also use it in dev, you can pass ['production', 'development']
-//    */
-//   errorLog: 'production'
-// }
-
 module.exports = {
   title: '采销平台订单系统',
-
   /**
    * @type {boolean} true | false
-   * @description 是否在右侧面板中显示设置
+   * @description Whether show the settings right-panel
    */
   showSettings: false,
 
   /**
    * @type {boolean} true | false
-   * @description 是否使用 标签视图
+   * @description Whether need tagsView
    */
   tagsView: false,
 
   /**
    * @type {boolean} true | false
-   * @description 是否修复标题
+   * @description Whether fix the header
    */
-  fixedHeader: false,
+  fixedHeader: true,
 
   /**
    * @type {boolean} true | false
-   * @description 是否在侧边栏中显示logo
+   * @description Whether show the logo in sidebar
    */
   sidebarLogo: true,
 
   /**
    * @type {string | array} 'production' | ['production', 'development']
-   * @description 需要显示错误日志组件.
-   * 默认值仅在生产环境中使用
-   * 如果您还想在环境中使用它,可以设置 ['production', 'development']
+   * @description Need show err logs component.
+   * The default is only used in the production env
+   * If you want to also use it in dev, you can pass ['production', 'development']
    */
   errorLog: 'production'
 }
+

+ 80 - 0
src/views/purchaseIn/purchaseDiffOrder/ShowDataTableColumns.js

@@ -0,0 +1,80 @@
+export default [
+  {
+    prop: "cgdNo",
+    label: "采购单编号",
+  },
+  {
+    prop: "apply_name",
+    label: "申请人"
+  },
+  
+  {
+    prop: "good_code",
+    label: "商品编码",
+  },
+
+  {
+    prop: "good_name",
+    label: "商品名称",
+  },
+ 
+  {
+    prop: "wsm_supplier",
+    label: "供应商"
+  },
+  {
+    prop: "wsm_supplierNo",
+    label: "供应商编码"
+  },
+  {
+    prop: "class_cat",
+    label: "商品分类",
+  },
+  {
+    prop: "good_weight",
+    label: "商品重量",
+  },
+  {
+    prop: "good_num",
+    label: "总采购数量",
+  },
+ {
+    prop: "sale_price",
+    label: "采购单价",
+  },
+
+  {
+    prop: "diff_weight",
+    label: "重量工差",
+  },
+  {
+    prop: "diff_price",
+    label: "金额差价",
+  },
+  {
+    prop: "gold_price",
+    label: "实时金价",
+  },
+
+  // {
+  //   prop: "good_price",
+  //   label: "商品单价",
+  // },
+
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+  },
+  {
+    prop: "updatetime",
+    label: "更新时间",
+  },
+  {
+    prop: "addtime",
+    label: "物创建时间",
+  },
+
+
+]
+

+ 48 - 20
src/views/purchaseIn/purchaseDiffOrder/detail.vue

@@ -13,14 +13,33 @@
       />
       <el-collapse v-model="activeNames">
         <el-collapse-item title="采购工差单详情" name="0">
-          <purchase-order-addEdit
+          <show-data-table
+            :newTime="newTime"
+            v-if="newTime !== ''"
+            :sitem="sitem"
+            :columns="ShowDataTableColumns"
+          >
+            <template slot="status">
+              <el-tag
+                :size="'mini'"
+                :type="sitem.status == '0' ? 'warning' : ''"
+                v-text="
+                  (
+                    statusOptions.find((item) => item.value == sitem.status) ||
+                    {}
+                  ).label || '--'
+                "
+              ></el-tag>
+            </template>
+          </show-data-table>
+          <!-- <purchase-order-addEdit
             style="padding: 0 0 20px 0"
             :newTime="newTime"
             v-if="newTime !== ''"
             :sitem="sitem"
             :id="queryId"
             @refresh="initData()"
-          />
+          /> -->
         </el-collapse-item>
         <!-- && status === '3' -->
         <el-collapse-item
@@ -28,9 +47,9 @@
           name="1"
           v-if="status === '2' && powers.some((item) => item == '038')"
         >
-          <div style="height: 50px; padding:  0 0px 20px 0">
+          <div style="height: 50px; padding: 0 0px 20px 0">
             <el-button
-             type="primary"
+              type="primary"
               class="fr"
               size="mini"
               @click="statusConfirm('3', '确定我已知晓并同意')"
@@ -41,11 +60,9 @@
         <el-collapse-item
           title="通知财务部门"
           name="2"
-          v-if="status === '3' &&powers.some((item) => item == '039')"
+          v-if="status === '3' && powers.some((item) => item == '039')"
         >
-          <div
-            style="height: 50px; padding:  0 0px 20px 0"
-          >
+          <div style="height: 50px; padding: 0 0px 20px 0">
             <el-button
               type="primary"
               class="fr"
@@ -75,16 +92,17 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/purchaseIn/purchaseDiffOrder";
 import addEdit from "./addEdit";
-import PurchaseInTable from "./purchaseIn-table.vue";
-import purchaseOrderAddEdit from "./purchaseIn-table";
+// import PurchaseInTable from "./purchaseIn-table.vue";
+// import purchaseOrderAddEdit from "./purchaseIn-table";
+import ShowDataTableColumns from "./ShowDataTableColumns";
 
 export default {
   name: "purchaseDiffOrderDetail",
   mixins: [mixinPage, resToken],
   components: {
     addEdit,
-    PurchaseInTable,
-    purchaseOrderAddEdit,
+    // PurchaseInTable,
+    // purchaseOrderAddEdit,
   },
   computed: {
     powers() {
@@ -101,6 +119,7 @@ export default {
   },
   data() {
     return {
+      ShowDataTableColumns: ShowDataTableColumns,
       statusOptions: [
         { value: "2", label: "通知采购部门" },
         { value: "3", label: "通知财务部门" },
@@ -175,15 +194,24 @@ export default {
       const res = await asyncRequest.detail({ id: this.queryId });
       if (res && res.code === 0 && res.data) {
         this.sitem = res.data;
-        this.status = this.sitem.status;
-        this.orderCode = res.data.cgdNo;
-        this.getNewTime();
-        if (this.order_type === "2") {
-          this.order_type = res.data.cgdNo;
-          this.statusOptions.unshift({ value: "0", label: "咨询单" });
+
+        const { can, status, cgdNo } = this.sitem;
+        this.status = status;
+        this.orderCode = cgdNo;
+        if (can && can.length > 0) {
+          this.sitem.class_cat = "";
+          can.forEach((x, i) => {
+            this.sitem.class_cat += i === 0 ? x.name : "/" + x.name;
+          });
         }
-        this.order_type === "1" ? "CGGCD" : "ZXGCD";
-        this.order_type = res.data.order_type;
+
+        this.getNewTime();
+        // if (this.order_type === "2") {
+        //   this.order_type = res.data.cgdNo;
+        //   this.statusOptions.unshift({ value: "0", label: "咨询单" });
+        // }
+        // this.order_type === "1" ? "CGGCD" : "ZXGCD";
+        // this.order_type = res.data.order_type;
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {

+ 0 - 99
src/views/purchaseIn/purchaseDiffOrder/purchaseIn-table.vue

@@ -1,99 +0,0 @@
-<template>
-  <div>
-    <el-row class="purchaseOrderDetail-addForm">
-      <el-col
-        :span="12"
-        class="purchaseOrderDetail-addForm-el-col"
-        v-for="(colu, index) in columns"
-        :key="colu + index"
-      >
-        <div class="label">{{ colu.label }}:</div>
-        <div class="name">{{ sitem[colu.prop] }}</div>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-   <script>
-import resToken from "@/mixins/resToken";
-import columns from "./columns";
-export default {
-  name: "purchaseDiffOrderDetail",
-  props: ["id", "sitem", "newTime"],
-  mixins: [resToken],
-  computed: {
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "purchaseDiffOrderDetail"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  data() {
-    return {
-      columns: columns,
-      status: "",
-      loading: false,
-
-      isDisabled: false,
-      detailSitem: null,
-      loading: false,
-      modelId: "",
-      sitem: null,
-      showModel: false,
-      isDetail: false,
-      modelId: 0,
-    };
-  },
-  methods: {
-    
-    addForm() {
-      this.detailSitem = this.sitem;
-      this.modelId = this.id;
-      this.showModel = true;
-    },
-    refresh() {
-      this.showModelThis = false;
-      this.$emit("refresh");
-    },
-  },
-};
-</script>
-
-   <style lang="scss" scoped>
-.purchaseOrderDetail-addForm {
-  border-top: 1px solid #ebeef5 !important;
-  border-left: 1px solid #ebeef5 !important;
-  .purchaseOrderDetail-addForm-el-col {
-    display: flex;
-    align-items: stretch;
-    //
-    border-right: 1px solid #ebeef5 !important;
-    .label {
-      width: 145px;
-      line-height: 40px;
-      text-align: right;
-      background: #fafafa !important;
-      font-weight: 400 !important;
-      color: #909399 !important;
-      font-size: 12px !important;
-      border-bottom: 1px solid #ebeef5 !important;
-      border-right: 1px solid #ebeef5 !important;
-    }
-    .name {
-      width: calc(100% - 145px);
-      text-align: left;
-      line-height: 40px;
-      font-size: 12px !important;
-      border-bottom: 1px solid #ebeef5 !important;
-      padding: 0 0 0 12px !important;
-      color: #606266 !important;
-    }
-  }
-}
-</style>
-   

+ 3 - 3
src/views/purchaseIn/purchaseOrder/detail.vue

@@ -248,11 +248,11 @@ export default {
       const res = await asyncRequest.detail({ cgdNo: this.queryId });
       if (res && res.code === 0 && res.data) {
         this.sitem = res.data;
-        const { status, can } = this.sitem;
+        const { status, can, cgdNo } = this.sitem;
         this.status = status;
-        this.orderCode = res.data.cgdNo;
+        this.orderCode = cgdNo;
         if (can && can.length > 0) {
-           this.sitem.class_cat =""
+          this.sitem.class_cat = "";
           can.forEach((x, i) => {
             this.sitem.class_cat += i === 0 ? x.name : "/" + x.name;
           });

+ 36 - 18
src/views/purchaseIn/purchaseReturn/ShowDataTableColumns.js

@@ -1,4 +1,4 @@
-export default  [
+export default [
   {
     prop: "returnCode",
     label: "采购退货单编号",
@@ -11,27 +11,46 @@ export default  [
     prop: "apply_name",
     label: "申请人"
   },
-  {
-    prop: "good_code",
-    label: "商品编码",
-  },
   {
     prop: "class_cat",
     label: "商品分类",
   },
+  {
+    prop: "good_code",
+    label: "商品编码",
+  },
+
   {
     prop: "good_name",
     label: "商品名称",
   },
   {
-    prop: "goo_num",
-    label: "商品数量",
+    prop: "wsm_supplier",
+    label: "供应商"
+  },
+  {
+    prop: "wsm_supplierNo",
+    label: "供应商编码"
+  },
+  {
+    prop: "remark",
+    label: "备注",
+    span:"24",
+    showProp:true
   },
 
+  {
+    prop: "goo_num",
+    label: "总采购数量",
+  },
+ {
+    prop: "good_price",
+    label: "采购单价",
+  },
 
   {
     prop: "return_num",
-    label: "退货数量",
+    label: "退货退货数量",
   },
 
   // {
@@ -45,14 +64,17 @@ export default  [
   {
     prop: "post_company",
     label: "物流公司",
+    showProp:true
   },
   {
     prop: "post_code",
     label: "物流编号",
+    showProp:true
   },
   {
     prop: "post_fee",
     label: "物流费",
+    showProp:true
   },
   {
     prop: "status",
@@ -60,16 +82,12 @@ export default  [
     _slot_: "status",
   },
   {
-    prop: "remark",
-    label: "备注"
+    prop: "updatetime",
+    label: "更新时间",
   },
   {
-    prop: "wsm_supplier",
-    label: "供应商"
+    prop: "addtime",
+    label: "创建时间",
   },
-  {
-    prop: "wsm_supplierNo",
-    label: "供应商编码"
-  },
-  ]
-  
+]
+

+ 29 - 26
src/views/purchaseIn/purchaseReturn/columns.js

@@ -15,6 +15,19 @@ export default [
   //   prop: "apply_name",
   //   label: "申请人"
   // },
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    width: "120px",
+  },
+  {
+    prop: "order_type",
+    label: "退货来源",
+    // 1备库 2咨询
+    _slot_: "order_type",
+    width: "80px"
+  },
   {
     prop: "good_type_code",
     label: "商品属性编码",
@@ -39,25 +52,20 @@ export default [
     label: "退货总金额",
     width: "100"
   },
-  {
-    prop: "post_company",
-    label: "物流公司",
-  },
-  {
-    prop: "post_code",
-    label: "物流编号",
-  },
-  {
-    prop: "post_fee",
-    label: "物流费",
-    width: "120"
-  },
-  {
-    prop: "status",
-    label: "状态",
-    _slot_: "status",
-    width: "120px",
-  },
+  // {
+  //   prop: "post_company",
+  //   label: "物流公司",
+  // },
+  // {
+  //   prop: "post_code",
+  //   label: "物流编号",
+  // },
+  // {
+  //   prop: "post_fee",
+  //   label: "物流费",
+  //   width: "120"
+  // },
+
   // {
   //   prop: "remark",
   //   label: "备注"
@@ -70,17 +78,12 @@ export default [
   //   prop: "wsm_supplierNo",
   //   label: "供应商编码"
   // },
-  {
-    prop: "order_type",
-    label: "退货来源",
-    // 1备库 2咨询
-    _slot_: "order_type",
-    width: "120px"
-  },
+
   {
     prop: "",
     label: "操作",
     fixed: "right",
+    width: "50px",
     _noset_: true,
     _slot_: "operation",
   },

+ 14 - 17
src/views/sellOut/salesOrder/columns.js

@@ -1,23 +1,28 @@
 export default [
-  {
-    prop: "supplierNo",
-    label: "供应商编号",
-    width: "155px",
-  },
   {
     prop: "orderCode",
     label: "销售订单编号",
-    width: "155px",
+    width: "150px",
   },
   {
     prop: "apply_name",
     label: "申请人",
     width: "60px",
   },
+  {
+    prop: "customer_code",
+    label: "客户公司编码",
+    width: "125px",
+  },
+  {
+    prop: "customerName",
+    label: "企业客户名称",
+    width: "125px",
+  },
   {
     prop: "good_code",
     label: "商品编码",
-    width:"140"
+    width:"128"
   },
   {
     prop: "good_name",
@@ -43,16 +48,8 @@ export default [
     prop: "total_price",
     label: "总价",
   },
-  {
-    prop: "post_fee",
-    label: "总物流费",
-  },
-  {
-    prop: "customer_code",
-    label: "客户公司编码",
-
-    width: "215px",
-  },
+ 
+ 
 
 
   {

+ 44 - 22
src/views/sellOut/salesOrder/index.vue

@@ -26,7 +26,7 @@
         <template #table-header="{}">
           <div style="width: 100%">
             <el-row style="padding: 0 0 0 80px">
-              <el-col :span="6" style="width: 303px; padding: 0 0 0 0px">
+              <el-col :span="6" style="width: 293px; padding: 0 0 0 0px">
                 <period-date-picker
                   :type="1"
                   :width="'135px'"
@@ -36,13 +36,34 @@
                   @timeReturned="handleTime"
                 />
               </el-col>
+              <!-- 客户公司 -->
+              <el-col :span="4" style="width: 320px; padding: 0px 0 0 10px">
+                <search-customer
+                  :value="customerCode"
+                  :size="searchSize"
+                  :placeholder="'客户公司名称'"
+                  @searchChange="customerChange"
+                />
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+            </el-row>
+            <el-row style="padding: 10px 0 0 0">
               <el-col :span="4" style="width: 150px; padding: 0 0 0 0px">
                 <el-select
                   :size="searchSize"
                   v-model="parmValue.status"
                   filterable
                   clearable
-                  placeholder="采购单状态"
+                  placeholder="销售订单状态"
                   style="width: 100%"
                   @change="
                     pageInfo.curr = 1;
@@ -58,19 +79,7 @@
                   />
                 </el-select>
               </el-col>
-              <el-col :span="3" style="width: 66px; float: right">
-                <el-button
-                  :size="searchSize"
-                  type="primary"
-                  style="float: right; margin-left: 5px"
-                  @click="searchList"
-                >
-                  刷新
-                </el-button>
-              </el-col>
-            </el-row>
-            <el-row style="padding: 10px 0 0 0">
-              <el-col :span="6" style="width: 500px">
+              <el-col :span="6" style="width: 500px; padding: 0 0 0 10px">
                 <el-input
                   clearable
                   placeholder="关键字"
@@ -92,14 +101,14 @@
                       label="商品属性编号"
                       value="good_code"
                     ></el-option>
-                    <el-option
+                    <!-- <el-option
                       label="供应商编号"
                       value="supplierNo"
-                    ></el-option>
-                    <el-option
+                    ></el-option> -->
+                    <!-- <el-option
                       label="客户编号"
                       value="customer_code"
-                    ></el-option>
+                    ></el-option> -->
                     <el-option label="产品名称" value="good_name"></el-option>
                     <el-option label="申请人" value="apply_name"></el-option>
                   </el-select>
@@ -206,6 +215,7 @@ export default {
       sitem: null,
       select: "orderCode",
       input: "",
+      customerCode: [],
       options: ["创建时间", "最晚入库时间"],
       // 状态
       statusOptions: [
@@ -260,7 +270,7 @@ export default {
     restSearch() {
       this.select = "orderCode";
       this.input = "";
-
+      this.customerCode = [];
       this.parmValue = {
         order_type: "1", //订单类型1为销售 2为咨询
         orderCode: "", //销售订单code
@@ -302,6 +312,20 @@ export default {
       this.pageInfo.curr = 1;
       await this.searchList();
     },
+
+    // 客户选择
+    async customerChange(e) {
+      if (e && e.id) {
+        this.customerCode = [e.code];
+        this.parmValue.customer_code = e.code;
+      } else {
+        this.customerCode = [];
+        this.parmValue.customer_code = "";
+      }
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
     async stockChange(e) {
       if (e && e.id) {
         this.parmValue.stockNo = [e.code];
@@ -319,8 +343,6 @@ export default {
       this.parmValue.good_code = this.select === "good_code" ? this.input : ""; // 入库单号
       this.parmValue.supplierNo =
         this.select === "supplierNo" ? this.input : ""; // 产品属性编号
-      this.parmValue.customer_code =
-        this.select === "customer_code" ? this.input : ""; // 产品名称
       this.parmValue.good_name = this.select === "good_name" ? this.input : ""; // 申请人
       this.parmValue.apply_name =
         this.select === "apply_name" ? this.input : ""; // 采购供应商编号

+ 80 - 0
src/views/sellOut/sellAfterApply/ShowDataTableColumns.js

@@ -0,0 +1,80 @@
+export default [
+  {
+    prop: "returnCode",
+    label: "售后申请单号",
+  },
+  {
+    prop: "status",
+    label: "售后申请单状态",
+    _slot_: "status",
+  },
+  {
+    prop: "outCode",
+    label: "出库单编号"
+  },
+
+  // {
+  //   prop: "order_type",
+  //   label: "订单类别",
+  //   _slot_: "order_type",
+  // },
+
+  {
+    prop: "orderCode",
+    label: "销售订单编号",
+  },
+  {
+    prop: "apply_name",
+    label: "申请人"
+  },
+  {
+    prop: "class_cat",
+    label: "商品分类",
+  },
+
+  {
+    prop: "good_code",
+    label: "商品编码",
+  },
+
+  {
+    prop: "good_name",
+    label: "商品名称",
+  },
+
+ 
+  {
+    prop: "total_num",
+    label: "总发货数量",
+  },
+
+  {
+    prop: "sale_price",
+    label: "销售单价",
+  },
+  // {
+  //   prop: "origin_price",
+  //   label: "采购单价",
+  // },
+
+  // {
+  //   prop: "sale_price",
+  //   label: "商品单价",
+  // },
+  {
+    prop: "total_price",
+    label: "出库单总价",
+  },
+
+  {
+    prop: "updatetime",
+    label: "更新时间",
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+  },
+
+
+]
+

+ 9 - 9
src/views/sellOut/sellAfterApply/columns.js

@@ -10,7 +10,7 @@ export default [
         },
         {
           prop: "orderCode",
-          label: "确认单编号",
+          label: "销售订单编号",
           width:"160"
         },
         {
@@ -32,14 +32,14 @@ export default [
             label:"商品名称",
             width:"150"
         },
-        {
-            prop:"error_num",
-            label:"异常数量",
-        },
-        {
-            prop:"error_msg",
-            label:"异常原因",
-        },
+        // {
+        //     prop:"error_num",
+        //     label:"异常数量",
+        // },
+        // {
+        //     prop:"error_msg",
+        //     label:"异常原因",
+        // },
         {
             prop:"except_code",
             label:"期望意愿",

+ 47 - 27
src/views/sellOut/sellAfterApply/components/addEditForm.vue

@@ -10,7 +10,7 @@
     class="demo-ruleForm"
   >
     <el-row>
-      <el-col :span="8">
+      <!-- <el-col :span="8">
         <el-form-item label="发货总量" prop="send_num">
           <el-input
             disabled
@@ -18,18 +18,19 @@
             placeholder="发货总量"
           ></el-input>
         </el-form-item>
-      </el-col>
-      <el-col :span="8">
+      </el-col> -->
+      <el-col :span="12">
         <el-form-item label="异常数量" prop="error_num">
           <el-input
             :disabled="id !== 'add'"
             v-model="ruleForm.error_num"
             placeholder="异常数量"
-          ></el-input>
+          >
+            <template slot="append"
+              >总发货数量:{{ ruleForm.send_num }}</template
+            >
+          </el-input>
         </el-form-item>
-      </el-col>
-
-      <el-col :span="8">
         <el-form-item label="期望意愿" prop="except_code">
           <el-select
             style="width: 100%"
@@ -46,8 +47,6 @@
             </el-option>
           </el-select>
         </el-form-item>
-      </el-col>
-      <el-col :span="8">
         <el-form-item label="异常原因" prop="error_code">
           <el-select
             style="width: 100%"
@@ -66,10 +65,11 @@
           </el-select>
         </el-form-item>
       </el-col>
-      <el-col :span="16">
+      <el-col :span="12">
         <el-form-item label="异常备注" prop="error_remark">
           <el-input
             type="textarea"
+            :rows="7"
             placeholder="请输入异常原因备注"
             v-model="ruleForm.error_remark"
             :disabled="id !== 'add'"
@@ -81,26 +81,28 @@
 
       <el-col :span="24">
         <el-form-item label="异常图片" prop="error_img">
-          <div class="el-form-item-error-img">
+          <div class="el-form-item-error-img clear">
             <ul>
               <li
                 class="images_li"
                 :style="getMargin_li()"
                 v-for="(item, index) in ruleForm.error_img"
                 :key="item"
+                v-viewer
+                style="margin: 0"
               >
-                <img :src="item" alt="" style="width: 254px; height: 164px" />
+                <img :src="item" alt="" style="width: 129px; height: 94px" />
                 <i
                   class="el-icon-close"
                   @click="imgClose(index)"
-                  v-if="ruleForm.error_img.length < 5&&id === 'add'"
+                  v-if="ruleForm.error_img.length < 5 && id === 'add'"
                 ></i>
               </li>
             </ul>
             <div
               class="btnupload"
               :style="getMargin()"
-              v-if="ruleForm.error_img.length < 5&&id === 'add'"
+              v-if="ruleForm.error_img.length < 5 && id === 'add'"
               style="position: relative"
               @click="open"
             >
@@ -286,6 +288,7 @@ export default {
             error_code,
             outCode,
             send_num,
+            total_num,
           } = this.sitem;
           this.ruleForm = {
             outCode: outCode || "", //出库单编号
@@ -294,7 +297,7 @@ export default {
             except_code: except_code || "", //期望意愿
             error_img: error_img ? error_img.split(",") : [],
             error_remark: error_remark || "", //异常备注
-            send_num: send_num || "",
+            send_num: send_num || total_num || "",
           };
         }
       });
@@ -488,16 +491,28 @@ export default {
 <style lang="scss" scoped>
 .el-form-item-error-img {
   width: 100%;
+  position: relative;
+  padding: 0;
+  margin: 0;
+  vertical-align: top;
+
+  //  float: left;
   ul {
+    vertical-align: top;
     width: 100%;
+    float: left;
+    padding: 0;
+    margin: 0;
+    margin: -40px 0 0 -10px;
     li {
       float: left;
       border: 1px solid rgb(220, 223, 230);
       // border-left: 0;
+      display: block;
       box-sizing: border-box;
-      width: 254px;
-      height: 164px;
-      line-height: 164px;
+      width: 129px;
+      height: 94px;
+      line-height: 94px;
       position: relative;
       img {
         display: inline-block;
@@ -522,31 +537,36 @@ export default {
   }
 }
 .images_li {
-  // width: 254px;
-  // height: 164px;
+  // width: 129px;
+  // height: 94px;
   float: left;
+  img {
+    &:hover {
+      cursor: pointer;
+    }
+  }
 }
 .btnupload {
   float: left;
   border: 1px solid rgb(220, 223, 230);
   // border-left: 0;
   box-sizing: border-box;
-  width: 254px;
-  height: 164px;
-  line-height: 164px;
+  width: 129px;
+  height: 94px;
+  line-height: 94px;
   text-align: center;
 }
 .Upload {
-  width: 254px;
-  height: 164px;
-  line-height: 164px;
+  width: 129px;
+  height: 94px;
+  line-height: 94px;
   text-align: center;
   position: absolute;
   line-height: 0px;
   top: 0;
   left: 0;
   z-index: 2;
-  line-height: 164px;
+  line-height: 94px;
 }
 .avatar-uploader-icon {
   font-size: 33px;

+ 45 - 4
src/views/sellOut/sellAfterApply/detail.vue

@@ -11,13 +11,14 @@
         style="margin: 10px 0 20px 0"
         type="primary"
         plain
+        class="fr"
         :size="'mini'"
         @click="statusConfirm('1', '发起审核流程', '')"
         v-if="status === '0' && powers.some((item) => item == '012')"
         >发起审核流程
       </el-button>
       <status-bar
-        style="margin: 20px 0 0 0"
+        style="margin:  0 0 20px 0"
         v-if="newTime !== ''"
         :newTime="newTime"
         :options="statusOptions"
@@ -25,6 +26,35 @@
       />
       <el-collapse v-model="activeNames">
         <el-collapse-item title="售后申请详情" name="1">
+          <show-data-table
+            :newTime="newTime"
+            v-if="newTime !== ''"
+            :sitem="sitem"
+            :columns="ShowDataTableColumns"
+          >
+            <template slot="status">
+              <el-tag
+                :size="'mini'"
+                :type="sitem.status == '0' ? 'warning' : ''"
+                v-text="
+                  (
+                    statusOptions.find((item) => item.value == sitem.status) ||
+                    {}
+                  ).label || '--'
+                "
+              ></el-tag>
+            </template>
+            <template slot="order_type">
+              <el-tag :size="'mini'" :type="''">{{
+                sitem.status === "1" ? "销售出库单" : sitem.status === "2" ?"咨询出库单":"--"
+              }}</el-tag>
+            </template>
+              <template slot="except_code">
+              <el-tag :size="'mini'" :type="''">{{
+                sitem.except_code === "1" ? "退货" : sitem.except_code === "2" ?"换货":sitem.except_code === "2" ?'改变售价':"--"
+              }}</el-tag>
+            </template>
+          </show-data-table>
           <add-edit-form
             :sitem="sitem"
             :newTime="newTime"
@@ -64,7 +94,7 @@
         <el-collapse-item
           title="退货物流"
           name="4"
-          v-if="status == '3' ||status == '4'"
+          v-if="status == '3' || status == '4'"
         >
           <return-express
             @refresh="initData(true)"
@@ -96,6 +126,7 @@ import addEditForm from "./components/addEditForm";
 import ExpressFeedback from "./components/express_feedback";
 import PurchaseCheck from "./components/purchase_check";
 import ReturnExpress from "./components/returnExpress";
+import ShowDataTableColumns from "./ShowDataTableColumns";
 export default {
   name: "sellAfterApplyDetail",
   mixins: [mixinPage, resToken],
@@ -123,6 +154,7 @@ export default {
       activeNames: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"],
       status: "", //存储详情接口状态
       statusList: [],
+      ShowDataTableColumns: ShowDataTableColumns,
       sitem: null,
       newTime: "",
       loading: false,
@@ -201,9 +233,18 @@ export default {
       };
       const res = await asyncRequest.detail(model);
       if (res && res.code === 0 && res.data) {
-        this.status = res.data.status;
         this.sitem = res.data;
-        this.orderCode = res.data.returnCode;
+        const { status, can, returnCode } = this.sitem;
+        this.status = status;
+        this.orderCode = returnCode;
+
+        if (can && can.length > 0) {
+          this.sitem.class_cat = "";
+          can.forEach((x, i) => {
+            this.sitem.class_cat += i === 0 ? x.name : "/" + x.name;
+          });
+        }
+
         this.getNewTime();
         if (type) {
           this.$confirm("是否要跳转到销售售后退货单界面?", {

+ 36 - 24
src/views/sellOut/sellAfterApply/index.vue

@@ -44,7 +44,11 @@
                     v-model="parmValue.status"
                     clearable
                     placeholder="处理状态"
-                    @change="searchList()"
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
                   >
                     <el-option
                       v-for="item in serviceOptions"
@@ -84,7 +88,11 @@
                   v-model="parmValue.except_code"
                   clearable
                   placeholder="期望意愿"
-                  @change="searchList()"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
                 >
                   <el-option
                     v-for="item in expectOptions"
@@ -99,7 +107,7 @@
                 <el-input
                   clearable
                   :size="searchSize"
-                  placeholder="请输入内容"
+                  placeholder="关键字"
                   v-model="s_input"
                   class="input-with-select"
                 >
@@ -109,23 +117,24 @@
                     slot="prepend"
                     placeholder="请选择"
                   >
-                    <el-option label="申请人" value="applyer"></el-option>
-
-                    <el-option label="商品名称" value="goodsName"></el-option>
-                    <el-option label="商品编号" value="goodsNum"></el-option>
                     <el-option
                       label="售后申请编号"
                       value="serviceNum"
                     ></el-option>
-
-                    <el-option
-                      label="销售确认单编号"
-                      value="sellOrderNum"
-                    ></el-option>
                     <el-option
                       label="销售出库单编号"
                       value="sellOutNum"
                     ></el-option>
+
+                    <el-option
+                      label="销售订单编号"
+                      value="sellOrderNum"
+                    ></el-option>
+
+                    <el-option label="商品编号" value="goodsNum"></el-option>
+                    <el-option label="商品名称" value="goodsName"></el-option>
+
+                    <el-option label="申请人" value="applyer"></el-option>
                   </el-select>
                   <el-button
                     slot="append"
@@ -193,7 +202,9 @@
           >
             <i
               class="el-icon-view tb-icon"
-              @click="routeGoto('sellAfterApplyDetail', { id: scope.row.returnCode })"
+              @click="
+                routeGoto('sellAfterApplyDetail', { id: scope.row.returnCode })
+              "
             ></i>
           </el-tooltip>
         </template>
@@ -243,7 +254,7 @@ export default {
   },
   data() {
     return {
-      select: "applyer",
+      select: "serviceNum",
       s_input: "",
       customerCode: [], //客户公司code
       except_codeOptions: [
@@ -345,6 +356,8 @@ export default {
   methods: {
     restSearch() {
       this.customerCode = [];
+       this.select = "serviceNum";
+       this.s_input=""
       this.parmValue = {
         order_type: "1", //订单类型1为销售 2为咨询
         customer_code: "", //客户公司code
@@ -406,6 +419,15 @@ export default {
     // 列表搜索
     async searchList() {
       this.loading = true;
+      this.parmValue.apply_name = this.select === "applyer" ? this.s_input : ""; // 产品属性编号
+      this.parmValue.good_name =
+        this.select === "goodsName" ? this.s_input : ""; // 采购单编码
+      this.parmValue.good_code = this.select === "goodsNum" ? this.s_input : ""; // 入库单号
+      this.parmValue.returnCode =
+        this.select === "serviceNum" ? this.s_input : ""; // 产品名称
+      this.parmValue.orderCode =
+        this.select === "sellOrderNum" ? this.s_input : ""; // 备库编码
+      this.parmValue.outCode = this.select === "sellOutNum" ? this.s_input : ""; // 申请人
       let model = JSON.parse(JSON.stringify(this.parmValue));
       const res = await asyncRequest.list(model);
       if (res && res.code === 0 && res.data) {
@@ -481,16 +503,6 @@ export default {
       await this.searchList();
     },
     async handleValue() {
-      this.loading = true;
-      this.parmValue.apply_name = this.select === "applyer" ? this.s_input : ""; // 产品属性编号
-      this.parmValue.good_name =
-        this.select === "goodsName" ? this.s_input : ""; // 采购单编码
-      this.parmValue.good_code = this.select === "goodsNum" ? this.s_input : ""; // 入库单号
-      this.parmValue.returnCode =
-        this.select === "serviceNum" ? this.s_input : ""; // 产品名称
-      this.parmValue.orderCode =
-        this.select === "sellOrderNum" ? this.s_input : ""; // 备库编码
-      this.parmValue.outCode = this.select === "sellOutNum" ? this.s_input : ""; // 申请人
       await this.searchList();
     },
   },

+ 107 - 0
src/views/sellOut/sellOutOrder/ShowDataTableColumns.js

@@ -0,0 +1,107 @@
+export default [
+  {
+    prop: "outCode",
+    label: "出库单号",
+  },
+  {
+    prop: "status",
+    label: "出库单状态",
+    _slot_: "status",
+  },
+  {
+    prop: "orderCode",
+    label: "销售订单编号",
+  },
+  {
+    prop: "order_type",
+    label: "订单类别",
+    _slot_: "order_type",
+  },
+  {
+    prop: "apply_name",
+    label: "申请人"
+  },
+  {
+    prop: "class_cat",
+    label: "商品分类",
+  },
+
+  {
+    prop: "good_code",
+    label: "商品编码",
+  },
+
+  {
+    prop: "good_name",
+    label: "商品名称",
+  },
+
+  {
+    prop: "post_name",
+    label: "快递公司",
+  },
+  {
+    prop: "post_code",
+    label: "物流编号",
+  },
+  {
+    prop: "post_fee",
+    label: "物流费用",
+  },
+  {
+    prop: "sendtime",
+    label: "发货时间",
+  },
+
+  {
+    prop: "send_num",
+    label: "发货数量",
+  },
+ {
+    prop: "check_num",
+    label: "验收数量",
+  },
+
+  {
+    prop: "error_num",
+    label: "异常数量",
+  },
+  {
+    prop: "sale_price",
+    label: "商品单价",
+  },
+  {
+    prop: "total_price",
+    label: "出库单总价",
+  },
+  {
+    prop: "contactor",
+    label: "收货联系人",
+  },
+  {
+    prop: "mobile",
+    label: "收货联系人电话",
+  },
+  {
+    prop: "addr",
+    label: "收货地址",
+  },
+
+  // {
+  //   prop: "good_price",
+  //   label: "商品单价",
+  // },
+
+ 
+  {
+    prop: "updatetime",
+    label: "更新时间",
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+  },
+
+
+]
+

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

@@ -28,11 +28,36 @@
       />
       <el-collapse v-model="activeNames">
         <el-collapse-item title="销售出库单详情" name="1">
-          <add-edit-form
+          <show-data-table
+            :newTime="newTime"
+            v-if="newTime !== ''"
+            :sitem="sitem"
+            :columns="ShowDataTableColumns"
+          >
+            <template slot="status">
+              <el-tag
+                :size="'mini'"
+                :type="sitem.status == '0' ? 'warning' : ''"
+                v-text="
+                  (
+                    statusOptions.find((item) => item.value == sitem.status) ||
+                    {}
+                  ).label || '--'
+                "
+              ></el-tag>
+            </template>
+                <template slot="order_type">
+              <el-tag
+                :size="'mini'"
+                :type="''" >{{sitem.status==='1'?'销售出库单':"咨询出库单"}}</el-tag>
+            </template>
+          </show-data-table>
+
+          <!-- <add-edit-form
             :sitem="sitem"
             :newTime="newTime"
             v-if="newTime != ''"
-          ></add-edit-form>
+          ></add-edit-form> -->
         </el-collapse-item>
         <el-collapse-item
           title="客户验收"
@@ -84,6 +109,7 @@ import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/sellOutOrder";
 import addEditForm from "./components/addEditForm.vue"; //出库单详情
 import addEditA from "./components/addEditA";
+import ShowDataTableColumns from "./ShowDataTableColumns";
 import SellReturnApply from "./components/sellReturnApply.vue";
 
 export default {
@@ -112,6 +138,7 @@ export default {
       activeNames: ["0", "1", "2", "3", "4", "10"],
       status: "", //存储详情接口状态
       statusList: [],
+      ShowDataTableColumns: ShowDataTableColumns,
       sitem: null,
       newTime: "",
       showModel: false,
@@ -160,9 +187,16 @@ export default {
       const res = await asyncRequest.detail(model);
       if (res && res.code === 0 && res.data) {
         this.sitem = res.data;
-        const { status, id } = res.data;
+        const { status, can, id } = this.sitem;
         this.status = status;
         this.did = id;
+        if (can && can.length > 0) {
+          this.sitem.class_cat = "";
+          can.forEach((x, i) => {
+            this.sitem.class_cat += i === 0 ? x.name : "/" + x.name;
+          });
+        }
+
         this.getNewTime();
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();

+ 31 - 40
src/views/sellOut/sellOutOrder/index.vue

@@ -36,28 +36,29 @@
                   @timeReturned="handleTime"
                 />
               </el-col>
-              <!-- <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
-                <el-select
+    
+                 <el-col :span="4" style="width: 320px; padding: 0px 0 0 10px">
+                <search-customer
+                  :value="customerCode"
                   :size="searchSize"
-                  v-model="parmValue.status"
-                  clearable
-                  placeholder="出库单状态"
-                  @change="
-                    pageInfo.curr = 1;
-                    parmValue.page = 1;
-                    searchList();
-                  "
+                  :placeholder="'客户公司名称'"
+                  @searchChange="customerChange"
+                />
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  style="float: right; margin-left: 5px"
+                  @click="searchList"
                 >
-                  <el-option
-                    v-for="item in statusOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select>
-              </el-col> -->
-              <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
+                  刷新
+                </el-button>
+              </el-col>
+            </el-row>
+            <el-row style="padding-top: 10px">
+              
+              <el-col :span="4" style="width: 150px;">
                 <el-select
                   :size="searchSize"
                   v-model="parmValue.status"
@@ -79,19 +80,7 @@
                   />
                 </el-select>
               </el-col>
-              <el-col :span="3" style="width: 66px; float: right">
-                <el-button
-                  :size="searchSize"
-                  type="primary"
-                  style="float: right; margin-left: 5px"
-                  @click="searchList"
-                >
-                  刷新
-                </el-button>
-              </el-col>
-            </el-row>
-            <el-row style="padding-top: 10px">
-              <el-col :span="4" style="width: 500px;">
+              <el-col :span="4" style="width: 500px; padding: 0 0 0 10px">
                 <el-input
                   clearable
                   :size="searchSize"
@@ -107,7 +96,7 @@
                   >
                     <el-option label="销售订单编号" value="orderCode" />
                     <el-option label="销售出库单编号" value="outCode" />
-                    <el-option label="供应商编号" value="supplierNo" />
+                    <!-- <el-option label="供应商编号" value="supplierNo" /> -->
                     <el-option label="商品编号" value="good_code" />
                     <el-option label="商品名称" value="good_name" />
                     <el-option label="申请人" value="apply_name" />
@@ -265,7 +254,8 @@ export default {
         apply_name: "", //申请人名称
         start: "",
         end: "",
-        supplierNo: "",
+        // supplierNo: "",
+        companyNo:"",
         good_code: "",
         good_name: "",
         outCode: "",
@@ -306,7 +296,8 @@ export default {
         apply_name: "", //申请人名称
         start: "",
         end: "",
-        supplierNo: "",
+        // supplierNo: "",
+        companyNo:"",
         good_code: "",
         good_name: "",
         outCode: "",
@@ -435,10 +426,10 @@ export default {
     async customerChange(e) {
       if (e && e.id) {
         this.customerCode = [e.code];
-        this.parmValue.customer_code = e.code;
+        this.parmValue.companyNo = e.code;
       } else {
         this.customerCode = [];
-        this.parmValue.customer_code = "";
+        this.parmValue.companyNo = "";
       }
       this.pageInfo.curr = 1;
       this.parmValue.page = 1;
@@ -448,8 +439,8 @@ export default {
       this.parmValue.orderCode =
         this.select === "orderCode" ? this.s_input : "";
       this.parmValue.outCode = this.select === "outCode" ? this.s_input : "";
-      this.parmValue.supplierNo =
-        this.select === "supplierNo" ? this.s_input : "";
+      // this.parmValue.supplierNo =
+      //   this.select === "supplierNo" ? this.s_input : "";
       this.parmValue.good_code =
         this.select === "good_code" ? this.s_input : "";
       this.parmValue.good_name =