xiaodai2022 2 years ago
parent
commit
a32c025700

+ 25 - 22
src/views/sellOut/filing/columns.js

@@ -57,10 +57,15 @@ const options12 = [
   { id: "0", name: "一地" },
   { id: "1", name: "多地" },
 ];
+const options13 = [
+  { id: "0", name: "现结" },
+  { id: "1", name: "月清" },
+  { id: "2", name: "双月清" },
+];
 const statusList = [
   { id: "0", label: "待审核", type: "warning" },
   { id: "1", label: "审核失败", type: "danger" },
-  { id: "2", label: "转单中", type: "" },
+  { id: "2", label: "转单", type: "" },
   { id: "3", label: "转单成功", type: "success" },
   { id: "4", label: "转单失败", type: "danger" },
   { id: "5", label: "取消转单", type: "info" },
@@ -139,7 +144,7 @@ const editColumns = [
     span: 6,
   },
   {
-    prop: "service_proportion",
+    prop: "expect_service_proportion",
     label: "期望服务费比例",
     span: 6,
   },
@@ -185,9 +190,6 @@ const coveColumns = [
     label: "品牌",
     span: 8,
   },
-
-
-
   {
     prop: "send_way",
     label: "发货方式",
@@ -195,21 +197,21 @@ const coveColumns = [
     span: 8,
   },
   {
-    prop: "unit",
+    prop: "unit_name",
     label: "单位",
-    span: 4,
+    span: 6,
   },
   {
     prop: "tax",
     label: "税点",
     append: '%',
-    span: 4,
+    span: 6,
   },
   {
     prop: "pay_way",
     label: "付款方式",
     _slot_: "pay_way",
-    span: 4,
+    span: 6,
   },
 
 
@@ -221,18 +223,18 @@ const coveColumns = [
   },
 
 
-  {
-    prop: "addtime",
-    label: "反馈时间",
-    span: 6,
-  },
+  // {
+  //   prop: "addtime",
+  //   label: "反馈时间",
+  //   span: 6,
+  // },
 
 
 
 
 
   {
-    prop: "expire_day",
+    prop: "preservation_day",
     label: "有效期",
     append: '天',
     span: 6
@@ -245,7 +247,7 @@ const coveColumns = [
     span: 6
   },
   {
-    prop: "work_day",
+    prop: "make_day",
     label: "生产工期",
     append: '天',
     span: 6
@@ -268,12 +270,12 @@ const coveColumns = [
     span: 24,
 
   },
-  {
-    prop: "noble",
-    _slot_: "noble",
-    label: "贵金属信息",
-    span: 24,
-  },
+  // {
+  //   prop: "noble",
+  //   _slot_: "noble",
+  //   label: "贵金属信息",
+  //   span: 24,
+  // },
   {
     prop: "cost_desc",
     label: "工艺说明",
@@ -456,6 +458,7 @@ export {
   options10,
   options11,
   options12,
+  options13,
   editColumns,
   bargainingArr,
   costArr,

+ 42 - 15
src/views/sellOut/filing/detail.vue

@@ -54,11 +54,11 @@
                     placement="top"
                     width="300"
                     trigger="hover"
-                    v-if="sitem.companyNo"
+                    v-if="sitem.companyCode"
                   >
                     <ul>
                       <li>
-                        <span>企业客户编号:</span><span>{{ sitem.companyNo }}</span>
+                        <span>企业客户编号:</span><span>{{ sitem.companyCode }}</span>
                       </li>
                     </ul>
                     <i class="el-icon-warning-outline fr" slot="reference"></i>
@@ -93,7 +93,12 @@
                     <span v-else>_</span>
                     <span>{{ si.spec_name }}[{{ si.spec_value_name }}]</span>
                   </span>
-                  <el-popover placement="top" width="300" trigger="hover">
+                  <el-popover
+                    v-if="sitem.spuCode"
+                    placement="top"
+                    width="300"
+                    trigger="hover"
+                  >
                     <ul>
                       <li>
                         <span>商品编号:</span><span>{{ sitem.spuCode }}</span>
@@ -133,7 +138,7 @@
                   <el-tag
                     :size="'mini'"
                     v-text="
-                      (options9.find((item) => item.id == sitem.pay_way) || {}).name ||
+                      (options13.find((item) => item.id == sitem.pay_way) || {}).name ||
                       '--'
                     "
                   />
@@ -166,16 +171,26 @@
             <el-collapse-item
               title="审批"
               name="2"
-              v-if="status == '0' && ppowers.some((i) => i == '0')"
+              v-if="(status == '0' || status == '2') && powers.some((i) => i == '043')"
             >
               <exam-forms
                 :newTime="newTime"
                 v-if="newTime !== ''"
-                :disabled="!(status == '0' && ppowers.some((i) => i == '0'))"
                 :sitem="this.sitem"
                 @searchChange="examFormSubmit($event, '')"
               />
             </el-collapse-item>
+            <el-collapse-item
+              title="收货地址"
+              name="3"
+              v-if="this.status === '3' || this.status === '4'"
+            >
+              <order-out-table
+                :newTime="newTime"
+                v-if="newTime !== ''"
+                :id="sitem.orderCode"
+              />
+            </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
         <el-tab-pane label="审批记录" name="3">
@@ -202,7 +217,7 @@ import examForms from "./exam-form.vue";
 import asyncRequest from "@/apis/service/sellOut/filing";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
-
+import orderOutTable from "./order-out-table";
 import {
   editColumns,
   costArr,
@@ -219,6 +234,7 @@ import {
   options10,
   options11,
   options12,
+  options13,
   statusList,
   rate_status_options,
   coveColumns,
@@ -227,6 +243,7 @@ import {
 export default {
   components: {
     examForms,
+    orderOutTable,
   },
   name: "filingDetail",
   mixins: [resToken],
@@ -239,12 +256,12 @@ export default {
       const { action } = tran ?? {};
       return action ?? [];
     },
-    ppowers() {
-      const tran =
-        this.$store.getters.roleProcess.find((i) => i.process_type === "YJD") || {};
-      const { action } = tran ?? {};
-      return action ?? [];
-    },
+    // ppowers() {
+    //   const tran =
+    //     this.$store.getters.roleProcess.find((i) => i.process_type === "YJD") || {};
+    //   const { action } = tran ?? {};
+    //   return action ?? [];
+    // },
   },
 
   data() {
@@ -266,6 +283,7 @@ export default {
       options10,
       options11,
       options12,
+      options13,
       statusList,
       rate_status_options,
       is_determine_price_options,
@@ -315,7 +333,15 @@ export default {
       this.loading = false;
       if (code === 0) {
         this.sitem = JSON.parse(JSON.stringify(data));
-        this.sitem.good_img = this.sitem.good_img.split(",");
+        const { cat_info } = this.sitem;
+        let cat = "";
+        if (cat_info && cat_info.length > 0) {
+          cat_info.forEach((e, i) => {
+            cat += i === 0 ? e.name : "_" + e.name;
+          });
+        }
+        this.sitem.cat = cat;
+        // this.sitem.good_img = this.sitem.good_img.split(",");
 
         const { status } = this.sitem;
         this.status = status;
@@ -350,7 +376,8 @@ export default {
           });
       }
     },
-    async statusSubmit(model, title) {
+    async statusSubmit(e, title) {
+      let model = JSON.parse(JSON.stringify(e));
       model.companyCode = model.companyCode[0];
       const { code, data, message } = await asyncRequest.status(model);
       this.loading = false;

+ 8 - 4
src/views/sellOut/filing/exam-form.vue

@@ -158,6 +158,7 @@ export default {
           console.log(this.sitem);
           const {
             id,
+            status,
             companyCode,
             companyName,
             service_charge,
@@ -166,19 +167,22 @@ export default {
             cgd_charge,
             price,
             is_determine_price,
+            expect_service,
+            expect_service_proportion,
           } = this.sitem;
           this.cgd_charge = cgd_charge;
           this.price = price;
-          console.log(this.sitem);
-          console.log(this.price);
+          const service = status + "" === "0" ? expect_service : service_charge;
+          const proportion =
+            status + "" === "0" ? expect_service_proportion : service_proportion;
           this.is_determine_price = is_determine_price;
           this.ruleForm = {
             id: id,
             status: "2",
             companyCode: companyCode ? [companyCode] : [],
             companyName,
-            service_charge: service_charge ? service_charge : "0",
-            service_proportion: service_proportion ? service_proportion : "0",
+            service_charge: service ? service : "0",
+            service_proportion: proportion ? proportion : "0",
             plat_code,
           };
         }

+ 1 - 1
src/views/sellOut/filing/index.vue

@@ -76,7 +76,7 @@
                     placeholder="关键字类型"
                   >
                     <el-option label="报备单编码" value="1" />
-                    <el-option label="供应商编码" value="2" />
+                    <!-- <el-option label="供应商编码" value="2" /> -->
                     <el-option label="商品名称" value="3" />
                     <el-option label="客户名称" value="4" />
                     <el-option label="客户编码" value="5" />

+ 243 - 0
src/views/sellOut/filing/order-out-table.vue

@@ -0,0 +1,243 @@
+<template>
+  <div class="outOrderTable">
+    <el-table
+      ref="addrForm"
+      :data="tableData"
+      border
+      :size="'mini'"
+      style="width: 100%"
+      row-key="key"
+      @selection-change="handleSelectionChange"
+    >
+      <!-- <el-table-column type="selection" width="42"> </el-table-column> -->
+      <el-table-column
+        show-overflow-tooltip
+        prop="outCode"
+        label="发货申请单号"
+        width="160"
+      />
+
+      <el-table-column show-overflow-tooltip prop="send_status" label="状态" width="105">
+        <template slot-scope="scope">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {}).label ||
+              '--'
+            "
+          ></el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        show-overflow-tooltip
+        prop="send_num"
+        label="发货数量"
+        width="80"
+      />
+      <el-table-column show-overflow-tooltip prop="contactor" label="联系人" width="80" />
+      <el-table-column show-overflow-tooltip prop="mobile" label="联系电话" width="110" />
+      <el-table-column show-overflow-tooltip prop="addr" label="收货地址" min-width="170">
+        <template slot-scope="scope">
+          {{ scope.row.addr_info }}{{ scope.row.addr }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        show-overflow-tooltip
+        prop="post_name"
+        label="物流公司"
+        width="160"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="post_code"
+        label="物流单号"
+        width="160"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        prop="sendtime"
+        label="发货时间"
+        width="145"
+      />
+    </el-table>
+    <div
+      v-if="tableData && tableData.length > 0"
+      class="Pagination"
+      style="text-align: right; margin-top: 10px"
+    >
+      <el-pagination
+        :current-page="parmValue.page"
+        :page-size="parmValue.size"
+        :size="'mini'"
+        layout="total,  prev, pager, next, jumper"
+        :total="pageInfo.total"
+        @size-change="page_size_change"
+        @current-change="page_curr_change"
+      />
+    </div>
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/sellOut/salesOrder/detail";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "salesOrderDetail",
+  mixins: [mixinPage, resToken],
+  props: ["newTime", "id"],
+  watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+
+    powers() {
+      const tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "salesOrderDetail"
+        ) || {};
+      const { action } = tran ?? {};
+      return action ?? [];
+    },
+  },
+
+  data() {
+    return {
+      orderCode: "",
+      outCode: "",
+      addr_res: 0,
+      batch_num: 0,
+      addrmodel: false,
+      // 状态
+      statusOptions: [
+        { id: "0", label: "待公司采购" },
+        { id: "1", label: "待库管发货" },
+        { id: "2", label: "已发货待收货" },
+        { id: "3", label: "已收货" },
+        { id: "4", label: "已全部退货" },
+      ],
+      showGoodsModel: false,
+      stock_code: "",
+      tableData: [],
+      loading: false,
+      queryId: "",
+      status: "",
+      showModel: null,
+      modelId: "",
+      modelItem: null,
+      s_sitem: null,
+      returnId: "",
+      returnItem: null,
+      returnModel: false,
+      wsend_num: "",
+      orderCode: "",
+      returnAllId: "",
+      returnAllSitem: null,
+      returnAllShowModel: false,
+      parmValue: {
+        order_type: "",
+        orderCode: "",
+        apply_name: "", //申请人名称
+        cgdNo: "",
+        start: "",
+        end: "",
+        // supplierNo: "",
+        companyNo: "",
+        good_code: "",
+        good_name: "",
+        outCode: "",
+        status: "",
+        company_name: "", //申请人部门
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      multipleSelection: [],
+      resModel: null,
+    };
+  },
+  mounted() {
+    this.initForm();
+  },
+  methods: {
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    closeModel() {
+      this.modelId = "";
+      this.modelShowModel = false;
+    },
+    refresh() {
+      this.$emit("refresh");
+      this.modelId = "";
+      this.modelShowModel = false;
+    },
+    async initForm() {
+      this.status = "";
+      this.queryId = this.$route.query.id;
+      // this.rulesThis = this.rules;
+      this.resetForm();
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(async () => {
+        await this.searchList();
+      });
+    },
+    // 列表搜索
+    async searchList() {
+      this.parmValue.orderCode = this.id;
+      const { code, data, message } = await asyncRequest.orderOut(this.parmValue);
+      if (code === 0) {
+        const { list, count } = data;
+        this.tableData = list;
+        this.pageInfo.total = Number(count);
+        this.batch_num = 0;
+        this.tableData.forEach((v) => {
+          v.good_class = "";
+          if (v.can && v.can.length > 0) {
+            v.can.forEach((x, i) => {
+              v.good_class += i === 0 ? x.name : "/" + x.name;
+            });
+          }
+          if (v.status + "" === "0" || v.status + "" === "1") {
+            this.batch_num += parseInt(v.send_num + "");
+          }
+        });
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+
+    async page_size_change(e) {
+      this.parmValue.size = e;
+      this.pageInfo.size = e;
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    async page_curr_change(e) {
+      this.parmValue.page = e;
+      this.pageInfo.curr = e;
+      await this.searchList();
+    },
+  },
+};
+</script>
+<style lang="scss" scoped></style>