Jelajahi Sumber

Merge branch 'sit'

xiaodai2022 2 tahun lalu
induk
melakukan
266ad7f0f8

File diff ditekan karena terlalu besar
+ 10 - 0
dist/static/js/0.js


File diff ditekan karena terlalu besar
+ 10 - 0
dist/static/js/app.js


File diff ditekan karena terlalu besar
+ 124 - 0
dist/static/js/chunk-libs.js


+ 11 - 0
src/apis/service/reportQuery/productReport/index.js

@@ -0,0 +1,11 @@
+//采购部门报表
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 商品基础信息
+  goodSimpleZhao: (data, params) => http(api + "goodSimpleZhao", data, "post", params),
+  // 商品成本信息
+  goodCostZhao: (data, params) => http(api + "goodCostZhao", data, "post", params),
+  // 商品售价信息
+  goodPriceZhao: (data, params) => http(api + "goodPriceZhao", data, "post", params),
+};

+ 2 - 0
src/apis/service/sellOut/sellOutOrder/index.js

@@ -32,4 +32,6 @@ export default {
   saleoutreceipt: (data, params) => http(api + "saleoutreceipt", data, "post", params),
   // 库管批量发货
   saleoutbatch: (data, params) => http(api + "saleoutbatch", data, "post", params),
+  // 售后订单
+  createSaleAndCgdByAfter: (data, params) => http(api + "createSaleAndCgdByAfter", data, "post", params),
 };

+ 604 - 0
src/views/reportQuery/productReport/components/columns.js

@@ -0,0 +1,604 @@
+//竞价单总数
+const table1 = [
+  // {
+  //   type: "expand",
+  //   _slot_: "expand",
+  //   fixed: "left",
+  //   _noset_: true,
+  // },
+  // {
+  //   type: "selection",
+  //   fixed: "left",
+  //   _noset_: true
+  // },
+  {
+    prop: "addtime",
+    label: "竞价时间",
+    minWidth: "155px",
+  },
+  {
+    prop: "name",
+    label: "业务部门",
+    minWidth: "155px",
+  },
+  {
+    prop: "total",
+    label: "竞价数量",
+    minWidth: "155px",
+  },
+]
+//采购订单总金额
+const table2 = [
+  // {
+  //   type: "expand",
+  //   _slot_: "expand",
+  //   fixed: "left",
+  //   _noset_: true,
+  // },
+  // {
+  //   type: "selection",
+  //   fixed: "left",
+  //   _noset_: true
+  // },
+  {
+    prop: "addtime",
+    label: "竞价时间",
+    minWidth: "155px",
+  },
+  {
+    prop: "name",
+    label: "业务部门",
+    minWidth: "155px",
+  },
+  {
+    prop: "total_fee",
+    label: "采购金额",
+    minWidth: "155px",
+  },
+  {
+    prop: "total_num",
+    label: "数量",
+    minWidth: "155px",
+  },
+  {
+    prop: "wait_total_fee",
+    label: "待处理采购金额",
+    minWidth: "155px",
+  },
+  {
+    prop: "wait_total_num",
+    label: "待处理采购单数",
+    minWidth: "155px",
+  },
+]
+
+//商品修改报表
+const table3 = [
+  // {
+  //   type: "expand",
+  //   _slot_: "expand",
+  //   fixed: "left",
+  //   _noset_: true,
+  // },
+  {
+    type: "selection",
+    fixed: "left",
+    _noset_: true
+  },
+  {
+    prop: "skuCode",
+    label: "商品上线编号",
+    minWidth: "155px",
+  },
+  {
+    prop: "spuCode",
+    label: "商品成本编号",
+    minWidth: "155px",
+  },
+  {
+    prop: "plat_code",
+    label: "平台商品编码",
+    minWidth: "155px",
+  },
+  {
+    prop: "creater",
+    label: "采购维护人",
+    minWidth: "100px",
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    minWidth: "155px",
+  },
+  {
+    prop: "brand_name",
+    label: "品牌",
+    minWidth: "155px",
+  },
+  {
+    prop: "name",
+    label: "分类",
+    minWidth: "155px",
+  },
+  {
+    prop: "",
+    label: "变更",
+    fixed: "right",
+    _noset_: true,
+    width: "50px",
+    _slot_: "operation",
+  },
+]
+
+
+
+
+//商品修改报表,修改具体内容
+const editTable3 = [
+  // {
+  //   prop: "id",
+  //   label: "id",
+  //   minWidth: "155px",
+  // },
+  {
+    prop: "bidNo",
+    label: "返库商品编号",
+    minWidth: "200px",
+  },
+
+
+
+  {
+    prop: "infoNo",
+    label: "阶梯编号",
+    minWidth: "200px",
+  },
+  {
+    prop: "zxNo",
+    label: "竞价编号",
+    minWidth: "200px",
+  },
+  {
+    prop: "spuCode",
+    label: "spu商品code",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    minWidth: "200px",
+  },
+  {
+    prop: "brandid",
+    label: "商品品牌",
+    minWidth: "200px",
+  },
+  {
+    prop: "brand_id",
+    label: "商品品牌",
+    minWidth: "200px",
+  },
+  {
+    prop: "cat_id",
+    label: "商品分类",
+    minWidth: "200px",
+  },
+  {
+    prop: "specinfo",
+    label: "规格集合",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "cost_desc",
+    label: "工艺描述",
+    minWidth: "200px",
+  },
+  {
+    prop: "work_day",
+    label: "工期",
+    minWidth: "200px",
+  },
+  {
+    prop: "delivery_day",
+    label: "物流时间",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_img",
+    label: "商品主图",
+    minWidth: "200px",
+  },
+  {
+    prop: "expire_day",
+    label: "有效时间",
+    minWidth: "200px",
+  },
+  {
+    prop: "origin_place",
+    label: "产地",
+    minWidth: "200px",
+  },
+  {
+    prop: "supplierNo",
+    label: "供应商",
+    minWidth: "200px",
+  },
+  {
+    prop: "pay_way",
+    label: "支付方式",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "send_way",
+    label: "发货方式",
+    minWidth: "200px",
+  },
+  {
+    prop: "metal_id",
+    label: "金属种类",
+    minWidth: "200px",
+  },
+  {
+    prop: "is_gold_price",
+    label: "是否启用实时金价",
+    minWidth: "200px",
+  },
+  {
+    prop: "config",
+    label: "配置要求",
+    minWidth: "200px",
+  },
+  {
+    prop: "weight",
+    label: "商品总重量",
+    minWidth: "200px",
+  },
+  {
+    prop: "is_diff",
+    label: "有无工差",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "demo_fee",
+    label: "打样费",
+    minWidth: "200px",
+  },
+  {
+    prop: "delivery_fee",
+    label: "物流费",
+    minWidth: "200px",
+  },
+  {
+    prop: "open_fee",
+    label: "开模费",
+    minWidth: "200px",
+  },
+  {
+    prop: "pakge_fee",
+    label: "打包费",
+    minWidth: "200px",
+  },
+  {
+    prop: "nake_fee",
+    label: "裸价",
+    minWidth: "200px",
+  },
+  {
+    prop: "mark_fee",
+    label: "加标费",
+    minWidth: "200px",
+  },
+  {
+    prop: "cert_fee",
+    label: "证书费",
+    minWidth: "200px",
+  },
+  {
+    prop: "cost_fee",
+    label: "工艺费",
+    minWidth: "200px",
+  },
+  {
+    prop: "total_fee",
+    label: "成本总计",
+    minWidth: "200px",
+  },
+  {
+    prop: "supply_area",
+    label: "供货区域",
+    minWidth: "200px",
+  },
+  {
+    prop: "remark",
+    label: "备注",
+    minWidth: "200px",
+  },
+  {
+    prop: "sale_price",
+    label: "最终售价",
+    minWidth: "200px",
+  },
+  {
+    prop: "createrid",
+    label: "创建人id",
+    minWidth: "200px",
+  },
+  {
+    prop: "creater",
+    label: "创建人",
+    minWidth: "200px",
+  },
+  {
+    prop: "status",
+    label: "状态",
+    minWidth: "200px",
+  },
+  
+  {
+    prop: "unit",
+    label: "单位",
+    minWidth: "200px",
+  },
+  {
+    prop: "cat_info",
+    label: "分类",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "supplierName",
+    label: "供应商名称",
+    minWidth: "200px",
+  },
+  {
+    prop: "brand_name",
+    label: "品牌名称",
+    minWidth: "200px",
+  },
+  {
+    prop: "metal_name",
+    label: "贵金属名称",
+    minWidth: "200px",
+  },
+  {
+    prop: "delivery_place",
+    label: "发货地",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "good_code",
+    label: "商品code",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_unit",
+    label: "商品单位",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "good_type",
+    label: "是否定制",
+    minWidth: "200px",
+  },
+  {
+    prop: "companyNo",
+    label: "业务企业",
+    minWidth: "200px",
+  },
+  {
+      prop: "company_id",
+      label: "业务公司",
+      minWidth: "200px",
+    },
+  {
+    prop: "moq",
+    label: "定制起订量",
+    minWidth: "200px",
+  },
+  {
+    prop: "customized",
+    label: "定制工期",
+    minWidth: "200px",
+  },
+  {
+    prop: "tax",
+    label: "税点",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "is_auth",
+    label: "销售权限",
+    minWidth: "200px",
+  },
+  {
+    prop: "is_stock",
+    label: "是否库存品",
+    minWidth: "200px",
+  },
+  {
+    prop: "auth_img",
+    label: "销售授权图片",
+    minWidth: "200px",
+  },
+
+
+  {
+    prop: "after_sales",
+    label: "售后说明",
+    minWidth: "200px",
+  },
+  {
+    prop: "craft_desc",
+    label: "工艺说明",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_remark",
+    label: "商品备注",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_size",
+    label: "商品尺寸",
+    minWidth: "200px",
+  },
+  {
+    prop: "packing_way",
+    label: "包装方式",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "packing_size",
+    label: "装箱尺寸",
+    minWidth: "200px",
+  },
+  {
+    prop: "packing_spec",
+    label: "装箱规格",
+    minWidth: "200px",
+  },
+  {
+    prop: "packing_list",
+    label: "包装清单",
+    minWidth: "200px",
+  },
+  {
+    prop: "packing_weight",
+    label: "装箱重量",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_bar",
+    label: "商品条形码",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "lead_time",
+    label: "供货周期",
+    minWidth: "200px",
+  },
+  {
+    prop: "sample_day",
+    label: "调样周期",
+    minWidth: "200px",
+  },
+  {
+    prop: "sample_fee",
+    label: "调样费",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "good_thumb_img",
+    label: "商品缩略图",
+    minWidth: "200px",
+  },
+  {
+    prop: "good_info_img",
+    label: "详情介绍",
+    minWidth: "200px",
+  },
+
+  {
+    prop: "is_del",
+    label: "是否删除",
+    minWidth: "200px",
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+    minWidth: "200px",
+  },
+  {
+    prop: "updatetime",
+    label: "更新时间",
+    minWidth: "200px",
+  },
+  //////////////////////////////
+  {
+    prop: "is_exclusive",
+    label: "专属类型",
+    minWidth: "200px",
+  },
+  {
+      prop: "noble_weight",
+      label: "贵金属重量",
+      minWidth: "200px",
+    },
+    {
+      prop: "noble_metal",
+      label: "贵金属种类",
+      minWidth: "200px",
+    },
+    {
+      prop: "other_config",
+      label: "其他配置要求",
+      minWidth: "200px",
+    },
+    {
+      prop: "spec_value",
+      label: "规格类型",
+      minWidth: "200px",
+    },
+    {
+      prop: "spec_value_value",
+      label: "规格值",
+      minWidth: "200px",
+    },
+    {
+      prop: "market_price",
+      label: "市场价",
+      minWidth: "200px",
+    },
+    {
+      prop: "cgd_gold_price",
+      label: "供应商采购金价",
+      minWidth: "200px",
+    },
+    {
+      prop: "noble_price",
+      label: "当前金价",
+      minWidth: "200px",
+    },
+    {
+      prop: "min_num",
+      label: "起订量(>=)",
+      minWidth: "200px",
+    },
+    {
+      prop: "package_fee",
+      label: "包装费",
+      minWidth: "200px",
+    },
+    {
+      prop: "other_fee",
+      label: "其他费用",
+      minWidth: "200px",
+    },
+    {
+      prop: "nake_total",
+      label: "成本合计",
+      minWidth: "200px",
+    },
+
+
+ 
+
+
+  /////////////////////////////
+
+
+
+
+]
+
+
+export { table1, table2, table3,editTable3}

+ 329 - 0
src/views/reportQuery/productReport/components/table1.vue

@@ -0,0 +1,329 @@
+<template>
+  <div v-loading="loading">
+    <div style="width: 100%" >
+      <el-row style="padding: 10px 0 0 0px">
+        <el-col :span="6" style="width: 363px">
+          <periodDatePickerActive
+            :start="parmValue.start_date"
+            :end="parmValue.end_date"
+            :placeholder="'竞价'"
+            :width="'165px'"
+            :size="searchSize"
+            @timeReturned="time"
+          />
+        </el-col>
+        <!-- <el-col :span="4" style="width: 66px; float: right">
+          <el-button
+            type="primary"
+            style="margin-left: 30px"
+            @click="download"
+            :size="searchSize"
+            class="fr"
+          >
+            导出
+          </el-button>
+        </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-col :span="4" style="width: 66px; float: right">
+          <el-button
+            type="warning"
+            class="fr"
+            :size="searchSize"
+            @click="restSearch"
+          >
+            重置
+          </el-button>
+        </el-col>
+      </el-row>
+    </div>
+    <el-table
+      :data="tableData"
+      :size="searchSize"
+      :span-method="objectSpanMethod"
+      border
+      style="width: 100%; margin-top: 20px"
+    >
+      <el-table-column :prop="item.prop" :label="item.label" v-for="(item,index) in table1" :key="index"/>
+      
+    </el-table>
+    <el-pagination
+        :current-page.sync="pageInfo.curr"
+        :page-sizes="[15, 50, 100]"
+        :page-size="pageInfo.size"
+        :size="searchSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="pageInfo.total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import urlConfig from "@/apis/url-config";
+import asyncRequest from "@/apis/service/reportQuery/purchaseReport";
+import periodDatePickerActive from "../period-date-picker/main.vue";
+import { table1 } from "./columns";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "purchaseOrder",
+  mixins: [mixinPage, resToken],
+  components: {
+    periodDatePickerActive,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+  },
+  data() {
+    return {
+      //选中数组
+      changeList: [],
+      //全局url
+      fileUrl: urlConfig.baseURL,
+      //loading
+      loading: false,
+      //请求参数集合
+      parmValue: {
+        start_date: "", //起始时间
+        end_date: "", // 结束时间
+
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      // 表格 - 数据集合
+      tableData: [
+      ],
+      // 表格 - 参数
+      // table: {
+      //   stripe: true,
+      //   border: true,
+      //   _defaultHeader_: ["setcol"],
+      // },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格表头 - 列参数
+      table1: table1,
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+     //分页集合
+    handleSizeChange(val){
+      this.parmValue.size = val;
+      // this.pageInfo.total = val;
+      this.parmValue.page = 1;
+      this.searchList() 
+    },
+    handleCurrentChange(val){
+      this.parmValue.page = val;
+      // this.pageInfo.total = val;
+
+      this.searchList()
+    },
+     //合并方法
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex == 0) {
+        //合并相同的名字
+        let nameSpan = this.getSpanNumber(this.tableData, "addtime");
+        return {
+          rowspan: nameSpan[rowIndex],
+          colspan: 1,
+        };
+      }
+    },
+    //获取要合并的行数
+    getSpanNumber(data, prop) {
+      //data要处理的数组,prop要合并的属性,比如name
+
+      //数组的长度,有时候后台可能返回个null而不是[]
+      let length = Array.isArray(data) ? data.length : 0;
+      if (length > 0) {
+        //用于标识位置
+        let position = 0;
+        //用于对比的数据
+        let temp = data[0][prop];
+        //要返回的结果
+        let result = [1];
+        //假设数据是AABCC,我们的目标就是返回20120
+        for (let i = 1; i < length; i++) {
+          if (data[i][prop] == temp) {
+            //标识位置的数据加一
+            result[position] += 1;
+            //当前位置添0
+            result[i] = 0;
+          } else {
+            //不相同时,修改标识位置,该位置设为1,修改对比值
+            position = i;
+            result[i] = 1;
+            temp = data[i][prop];
+          }
+        }
+        //返回结果
+        return result;
+      } else {
+        return [0];
+      }
+    },
+    //初始化http请求
+    async searchList() {
+      if (
+        (this.parmValue.start_date !== "" && this.parmValue.end_date === "") ||
+        (this.parmValue.start_date === "" && this.parmValue.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      // return;
+      this.loading = true;
+
+      const res = await asyncRequest.reportzixuntotal(this.parmValue);
+      console.log(res)
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message)
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+
+    //重置
+    restSearch() {
+      this.parmValue = {
+        start_date: "", //新建起始时间
+        end_date: "", // 新建结束时间
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.searchList();
+    },
+
+    // 时间函数
+    async time(e) {
+      this.parmValue.start_date = e.startTime || "";
+      this.parmValue.end_date = e.endTime || "";
+      if (
+        (this.parmValue.start_date !== "" && this.parmValue.end_date === "") ||
+        (this.parmValue.start_date === "" && this.parmValue.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+
+    //选中触发函数
+    selection_change(e) {
+      const { list } = e;
+      //选中的数组集合
+      this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
+    },
+    //导出文件
+    // async download() {
+    //   if (this.changeList.length <= 0) {
+    //     this.$message.warning("请选择有效数据");
+    //     return;
+    //   }
+    //   let model = {
+    //     cgdNos: [],
+    //   };
+    //   this.changeList.forEach((item) => {
+    //     model.cgdNos.push(item.cgdNo);
+    //   });
+
+    //   // const res = await asyncRequest.exportcgdlist(model)
+
+    //   if (!this.loading) {
+    //     this.loading = true;
+    //     let httpType = `aplication/zip`;
+    //     axios({
+    //       method: "post",
+    //       url: this.fileUrl + "admin/exportcgdlist",
+    //       responseType: "blob",
+    //       data: model,
+    //       headers: {
+    //         // 'Content-Type': 'multipart/form-data',
+    //         // Accept: "application/vnd.ms-excel"
+    //         Accept: httpType,
+    //       },
+    //     })
+    //       .then((res) => {
+    //         // console.log(res)
+    //         // console.log(this.fileUrl)
+    //         // return;
+    //         if (res && res.status == 200 && res.data) {
+    //           let url = window.URL.createObjectURL(
+    //             new Blob([res.data], {
+    //               // type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
+    //               type: httpType,
+    //             })
+    //           );
+    //           let link = document.createElement("a");
+    //           link.style.display = "none";
+    //           link.href = url;
+    //           let excelName = "采购单.zip";
+    //           link.setAttribute("download", excelName);
+    //           document.body.appendChild(link);
+    //           link.click();
+    //           link.remove();
+    //           window.URL.revokeObjectURL(url); //释放掉blob对象
+    //           this.$message.success(`导出成功!`);
+    //           setTimeout(() => {
+    //             this.loading = false;
+    //           }, 500);
+    //         } else {
+    //           this.$message.error(res.data.message);
+    //           setTimeout(() => {
+    //             this.loading = false;
+    //           }, 500);
+    //         }
+    //       })
+    //       .catch((error) => {
+    //         console.log(error);
+    //         this.loading = false;
+    //       });
+    //   }
+    // },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.purchaseOrder {
+  // text-align: right;
+}
+/deep/ .el-pagination{
+  float: right;
+    margin-top: 10px;
+}
+</style>
+   

+ 328 - 0
src/views/reportQuery/productReport/components/table2.vue

@@ -0,0 +1,328 @@
+<template>
+  <div v-loading="loading">
+    <div style="width: 100%">
+      <el-row style="padding: 10px 0 0 0px">
+        <el-col :span="6" style="width: 363px">
+          <periodDatePickerActive
+            :start="parmValue.start_date"
+            :end="parmValue.end_date"
+            :placeholder="'竞价'"
+            :width="'165px'"
+            :size="searchSize"
+            @timeReturned="time"
+          />
+        </el-col>
+        <!-- <el-col :span="4" style="width: 66px; float: right">
+          <el-button
+            type="primary"
+            style="margin-left: 30px"
+            @click="download"
+            :size="searchSize"
+            class="fr"
+          >
+            导出
+          </el-button>
+        </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-col :span="4" style="width: 66px; float: right">
+          <el-button
+            type="warning"
+            class="fr"
+            :size="searchSize"
+            @click="restSearch"
+          >
+            重置
+          </el-button>
+        </el-col>
+      </el-row>
+    </div>
+    <el-table
+      :data="tableData"
+      :size="searchSize"
+      :span-method="objectSpanMethod"
+      border
+      style="width: 100%; margin-top: 20px"
+    >
+      <el-table-column :prop="item.prop" :label="item.label" v-for="(item,index) in table2" :key="index"/>
+      
+    </el-table>
+    <el-pagination
+        :current-page.sync="pageInfo.curr"
+        :page-sizes="[15, 50, 100]"
+        :page-size="pageInfo.size"
+        :size="searchSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="pageInfo.total"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import urlConfig from "@/apis/url-config";
+import asyncRequest from "@/apis/service/reportQuery/purchaseReport";
+import periodDatePickerActive from "../period-date-picker/main.vue";
+import { table2 } from "./columns";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "purchaseOrder",
+  mixins: [mixinPage, resToken],
+  components: {
+    periodDatePickerActive,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+  },
+  data() {
+    return {
+      //选中数组
+      changeList: [],
+      //全局url
+      fileUrl: urlConfig.baseURL,
+      //loading
+      loading: false,
+      //请求参数集合
+      parmValue: {
+        start_date: "", //起始时间
+        end_date: "", // 结束时间
+
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      // 表格 - 数据集合
+      tableData: [
+      ],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格表头 - 列参数
+      table2: table2,
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+     //分页集合
+    handleSizeChange(val){
+      this.parmValue.size = val;
+      this.parmValue.page = 1;
+      // this.pageInfo.total = val;
+
+      this.searchList() 
+    },
+    handleCurrentChange(val){
+      // this.pageInfo.total = val;
+      this.parmValue.page = val;
+      this.searchList()
+    },
+     //合并方法
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex == 0) {
+        //合并相同的名字
+        let nameSpan = this.getSpanNumber(this.tableData, "addtime");
+        return {
+          rowspan: nameSpan[rowIndex],
+          colspan: 1,
+        };
+      }
+    },
+    //获取要合并的行数
+    getSpanNumber(data, prop) {
+      //data要处理的数组,prop要合并的属性,比如name
+
+      //数组的长度,有时候后台可能返回个null而不是[]
+      let length = Array.isArray(data) ? data.length : 0;
+      if (length > 0) {
+        //用于标识位置
+        let position = 0;
+        //用于对比的数据
+        let temp = data[0][prop];
+        //要返回的结果
+        let result = [1];
+        //假设数据是AABCC,我们的目标就是返回20120
+        for (let i = 1; i < length; i++) {
+          if (data[i][prop] == temp) {
+            //标识位置的数据加一
+            result[position] += 1;
+            //当前位置添0
+            result[i] = 0;
+          } else {
+            //不相同时,修改标识位置,该位置设为1,修改对比值
+            position = i;
+            result[i] = 1;
+            temp = data[i][prop];
+          }
+        }
+        //返回结果
+        return result;
+      } else {
+        return [0];
+      }
+    },
+    //初始化http请求
+    async searchList() {
+      if (
+        (this.parmValue.start_date !== "" && this.parmValue.end_date === "") ||
+        (this.parmValue.start_date === "" && this.parmValue.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      // return;
+      this.loading = true;
+
+      const res = await asyncRequest.reportpurcheaseordersum(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+        this.$message.warning(res.message)
+      }
+      this.loading = false;
+    },
+
+    //重置
+    restSearch() {
+      this.parmValue = {
+        start_date: "", //新建起始时间
+        end_date: "", // 新建结束时间
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.searchList();
+    },
+
+    // 时间函数
+    async time(e) {
+      this.parmValue.start_date = e.startTime || "";
+      this.parmValue.end_date = e.endTime || "";
+      if (
+        (this.parmValue.start_date !== "" && this.parmValue.end_date === "") ||
+        (this.parmValue.start_date === "" && this.parmValue.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+
+    //选中触发函数
+    selection_change(e) {
+      const { list } = e;
+      //选中的数组集合
+      this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
+    },
+    //导出文件
+    // async download() {
+    //   if (this.changeList.length <= 0) {
+    //     this.$message.warning("请选择有效数据");
+    //     return;
+    //   }
+    //   let model = {
+    //     cgdNos: [],
+    //   };
+    //   this.changeList.forEach((item) => {
+    //     model.cgdNos.push(item.cgdNo);
+    //   });
+
+    //   // const res = await asyncRequest.exportcgdlist(model)
+
+    //   if (!this.loading) {
+    //     this.loading = true;
+    //     let httpType = `aplication/zip`;
+    //     axios({
+    //       method: "post",
+    //       url: this.fileUrl + "admin/exportcgdlist",
+    //       responseType: "blob",
+    //       data: model,
+    //       headers: {
+    //         // 'Content-Type': 'multipart/form-data',
+    //         // Accept: "application/vnd.ms-excel"
+    //         Accept: httpType,
+    //       },
+    //     })
+    //       .then((res) => {
+    //         // console.log(res)
+    //         // console.log(this.fileUrl)
+    //         // return;
+    //         if (res && res.status == 200 && res.data) {
+    //           let url = window.URL.createObjectURL(
+    //             new Blob([res.data], {
+    //               // type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
+    //               type: httpType,
+    //             })
+    //           );
+    //           let link = document.createElement("a");
+    //           link.style.display = "none";
+    //           link.href = url;
+    //           let excelName = "采购单.zip";
+    //           link.setAttribute("download", excelName);
+    //           document.body.appendChild(link);
+    //           link.click();
+    //           link.remove();
+    //           window.URL.revokeObjectURL(url); //释放掉blob对象
+    //           this.$message.success(`导出成功!`);
+    //           setTimeout(() => {
+    //             this.loading = false;
+    //           }, 500);
+    //         } else {
+    //           this.$message.error(res.data.message);
+    //           setTimeout(() => {
+    //             this.loading = false;
+    //           }, 500);
+    //         }
+    //       })
+    //       .catch((error) => {
+    //         console.log(error);
+    //         this.loading = false;
+    //       });
+    //   }
+    // },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.purchaseOrder {
+  // text-align: right;
+}
+/deep/ .el-pagination{
+  float: right;
+    margin-top: 10px;
+}
+</style>
+   

+ 478 - 0
src/views/reportQuery/productReport/components/table3.vue

@@ -0,0 +1,478 @@
+<template>
+  <div>
+    <ex-table
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="table3"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @screen-submit="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @selection="selection_change"
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 0 80px">
+            <el-col :span="6" style="width: 463px">
+              <periodDatePickerActive
+                :start="parmValue.start_date"
+                :end="parmValue.end_date"
+                :placeholder="'产品操作'"
+                :width="'205px'"
+                :size="searchSize"
+                @timeReturned="time"
+              />
+            </el-col>
+            <el-col :span="4" style="width: 66px; float: right">
+              <el-button
+                type="primary"
+                style="margin-left: 30px"
+                @click="download"
+                :size="searchSize"
+                class="fr"
+              >
+                导出
+              </el-button>
+            </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" gutter="10">
+            <el-col :span="6" style="width: 240px">
+              <el-input
+                clearable
+                placeholder="采购维护人"
+                v-model="parmValue.creater"
+                maxlength="40"
+                :size="searchSize"
+                @blur="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+              </el-input>
+            </el-col>
+            <el-col :span="6" style="width: 240px">
+              <el-input
+                clearable
+                placeholder="供应商名称"
+                v-model="parmValue.supplier_name"
+                maxlength="40"
+                :size="searchSize"
+                @blur="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+              </el-input>
+            </el-col>
+            <el-col :span="4" style="width: 66px; float: right">
+              <el-button
+                type="warning"
+                class="fr"
+                :size="searchSize"
+                @click="restSearch"
+              >
+                重置
+              </el-button>
+            </el-col>
+          </el-row>
+        </div>
+      </template>
+
+      <template #operation="{ scope }">
+        <el-tooltip effect="dark" content="修改内容对比" placement="top">
+          <i class="el-icon-view tb-icon" @click="dlgTable(scope.row)"></i>
+        </el-tooltip>
+      </template>
+    </ex-table>
+
+    <el-dialog
+      title="产品修改差异对比"
+      :visible.sync="dialogTableVisible"
+      :center="true"
+      align="left"
+      top="3vh"
+      width="1040px"
+      :close-on-click-modal="false"
+      element-loading-text="拼命加载中"
+      element-loading-spinner="el-icon-loading"
+      element-loading-background="rgba(0, 0, 0, 0.8)"
+      @close="dialogTableVisible = false"
+    >
+      <el-table
+        :data="showData"
+        :size="searchSize"
+        border
+        stripe
+        max-height="750px"
+        style="width: 100%; margin: -20px 0 0"
+      >
+        <el-table-column
+          prop="key_name"
+          label="修改字段名称"
+          width="130px"
+          show-overflow-tooltip
+        />
+        <el-table-column
+          prop="key"
+          label="修改字段"
+          width="130px"
+          show-overflow-tooltip
+        />
+        <el-table-column prop="before" label="修改前" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div v-if="scope.row.key === 'good_img'">
+              <img
+                v-for="(si, sii) in scope.row.before"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                class="fl"
+                v-viewer
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else-if="scope.row.key === 'good_info_img'">
+              <img
+                v-for="(si, sii) in scope.row.after"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                v-viewer
+                 class="fl"
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else-if="scope.row.key === 'good_thumb_img'">
+              <img
+                v-for="(si, sii) in scope.row.after"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                v-viewer
+                 class="fl"
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else>{{ scope.row.before }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="after" label="修改后" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <div v-if="scope.row.key === 'good_img'">
+              <img
+                v-for="(si, sii) in scope.row.after"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                v-viewer
+                 class="fl"
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else-if="scope.row.key === 'good_info_img'">
+              <img
+                v-for="(si, sii) in scope.row.after"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                v-viewer
+                 class="fl"
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else-if="scope.row.key === 'good_thumb_img'">
+              <img
+                v-for="(si, sii) in scope.row.after"
+                :key="si + sii"
+                :src="si"
+                alt=""
+                v-viewer
+                 class="fl"
+                style="width: 30px; height: 30px"
+              />
+            </div>
+            <div v-else>{{ scope.row.after }}</div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import urlConfig from "@/apis/url-config";
+import asyncRequest from "@/apis/service/reportQuery/productReport";
+import periodDatePickerActive from "../period-date-picker/main.vue";
+import { table3, editTable3 } from "./columns";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "purchaseOrder",
+  mixins: [mixinPage, resToken],
+  components: {
+    periodDatePickerActive,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+  },
+  data() {
+    return {
+      editOld: {},
+      editNew: {},
+      dialogTableVisible: false,
+      //选中数组
+      changeList: [],
+      showData: [],
+      //全局url
+      fileUrl: urlConfig.baseURL,
+      //loading
+      loading: false,
+      //请求参数集合
+      parmValue: {
+        creater: "", //采购维护人
+        supplier_name: "", // 供应商名称
+        start_date: "", //起始时间
+        end_date: "", // 结束时间
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      // 表格 - 数据集合
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+
+      table3: table3,
+      editTable3,
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    dlgTable(row) {
+      this.showData = [];
+      const { before_info, after_info } = row;
+
+      let keyList = [];
+      for (let key in after_info) {
+        keyList.push(key);
+      }
+
+      for (let i = 0; i < keyList.length; i++) {
+        
+        let model = {
+          key: keyList[i],
+          key_name:
+            (editTable3.find((s) => s.prop === keyList[i]) || {}).label ||
+            "--",
+          before: this.get_key_value(keyList[i], before_info),
+          after: this.get_key_value(keyList[i], after_info),
+        };
+        // console.log(model.key_name)
+        this.showData.push(model);
+      }
+      this.dialogTableVisible = true;
+    },
+    get_key_value(key, info) {
+      if (key === "good_img") {
+        return info[key] ? (info[key] || "").split(",") : [];
+      }
+      else if(key === "good_info_img") {
+        return info[key] ? (info[key] || "").split(",") : [];
+      }
+      else if(key === "good_thumb_img") {
+        return info[key] ? (info[key] || "").split(",") : [];
+      }
+      // else if(key === "cat_id") {
+      //   return info[key] ? (info[key] || "").split(",") : [];
+      // }
+      return info[key];
+    },
+    //初始化http请求
+    async searchList() {
+      if (
+        (this.parmValue.start_date !== "" && this.parmValue.end_date === "") ||
+        (this.parmValue.start_date === "" && this.parmValue.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      // return;
+      this.loading = true;
+      const res = await asyncRequest.goodSimpleZhao(this.parmValue);
+      console.log(res);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+        this.$message.warning(res.message);
+      }
+      this.loading = false;
+    },
+
+    //重置
+    restSearch() {
+      this.parmValue = {
+        creater: "", //采购维护人
+        supplier_name: "", // 供应商名称
+        start_date: "", //新建起始时间
+        end_date: "", // 新建结束时间
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.searchList();
+    },
+
+    // 时间函数
+    async time(e) {
+      this.parmValue.start_date = e.startTime || "";
+      this.parmValue.end_date = e.endTime || "";
+      if (
+        (this.parmValue.start_date !== "" && this.parmValue.end_date === "") ||
+        (this.parmValue.start_date === "" && this.parmValue.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+
+    //选中触发函数
+    selection_change(e) {
+      const { list } = e;
+      //选中的数组集合
+      this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
+    },
+    //导出文件
+    async download() {
+      // if(this.changeList.length<=0){
+      //   this.$message.warning("请选择有效数据")
+      //   return;
+      // }
+      let start_date = new Date(this.parmValue.start_date).valueOf();
+      let end_date = new Date(this.parmValue.end_date).valueOf();
+      let flag = end_date - start_date > 30 * 24 * 60 * 60 * 1000;
+      if (this.parmValue.start_date != "" && this.parmValue.end_date != "") {
+        if (flag) {
+          this.$message.warning("导出文件的时间区间不能超过30天");
+          return;
+        }
+      } else {
+        this.$message.warning("请选择导出文件的时间区间");
+        return;
+      }
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      // model.is_export = 1;
+      if (!this.loading) {
+        this.loading = true;
+        let httpType = `aplication/zip`;
+        axios({
+          method: "post",
+          url: this.fileUrl + "admin/reportchangelogeexport",
+          responseType: "blob",
+          data: model,
+          headers: {
+            // 'Content-Type': 'multipart/form-data',
+            // Accept: "application/vnd.ms-excel"
+            Accept: httpType,
+          },
+        })
+          .then((res) => {
+            // console.log(res)
+            // console.log(this.fileUrl)
+            // return;
+            if (res && res.status == 200 && res.data) {
+              let url = window.URL.createObjectURL(
+                new Blob([res.data], {
+                  // type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
+                  type: httpType,
+                })
+              );
+              let link = document.createElement("a");
+              link.style.display = "none";
+              link.href = url;
+              let excelName = "产品修改报表.zip";
+              link.setAttribute("download", excelName);
+              document.body.appendChild(link);
+              link.click();
+              link.remove();
+              window.URL.revokeObjectURL(url); //释放掉blob对象
+              this.$message.success(`导出成功!`);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            } else {
+              this.$message.error(res.data.message);
+              setTimeout(() => {
+                this.loading = false;
+              }, 500);
+            }
+          })
+          .catch((error) => {
+            console.log(error);
+            this.loading = false;
+          });
+      }
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.purchaseOrder {
+  // text-align: right;
+}
+/deep/ .el-dialog {
+  width: 80%;
+  // height: 50vh;
+  min-width: 800px;
+  min-height: 500px;
+}
+</style>
+   

+ 66 - 0
src/views/reportQuery/productReport/index.vue

@@ -0,0 +1,66 @@
+<template>
+  <div class="pagePadding">
+    <div v-if="powers && powers.length > 0 && powers.some((item) => item == '001')">
+      <el-tabs v-model="activeName">
+        <el-tab-pane label="商品基本信息报表" name="table3">
+          <table3 v-if="activeName == 'table3'"></table3>
+        </el-tab-pane>
+        <el-tab-pane label="商品成本信息报表" name="table1">
+          <table1 v-if="activeName == 'table1'"></table1>
+        </el-tab-pane>
+        <el-tab-pane label="商品售价信息报表" name="table2">
+          <table2 v-if="activeName == 'table2'"></table2>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import { mapGetters } from "vuex";
+//标签页组件引入
+const table1 = () => import("./components/table1")
+const table2 = () => import("./components/table2")
+const table3 = () => import("./components/table3")
+export default {
+  mixins: [mixinPage, resToken],
+  components: {
+    table1,
+    table2,
+    table3,
+  },
+
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "purchaseReport"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      activeName: 'table3'
+    }
+  },
+  methods: {
+    //   handleClick(tab, event) {
+    //     console.log(tab, event);
+    //   }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 2 - 0
src/views/reportQuery/productReport/period-date-picker/index.js

@@ -0,0 +1,2 @@
+import Main from './main.vue'
+export default Main

+ 147 - 0
src/views/reportQuery/productReport/period-date-picker/main.vue

@@ -0,0 +1,147 @@
+<template>
+  <div class="fl time">
+    <el-date-picker
+      v-model="startTime"
+      style="margin: 0"
+      class="date-picker"
+      type="date"
+      :size="size"
+      :style="{ width: width }"
+      :placeholder="(placeholder||'') + '开始日期'"
+      value-format="yyyy-MM-dd"
+      :picker-options="pickerOptions1"
+      :editable="false"
+      :clearable="true"
+      :disabled="isEdit"
+      @change="timeChange"
+    />
+    <samp style="padding: 0 3px; margin: 0">至</samp>
+    <el-date-picker
+      style="margin: 0"
+      :size="size"
+      v-model="endTime"
+      class="date-picker"
+      :style="{ width: width }"
+      type="date"
+      :placeholder="(placeholder||'') + '结束日期'"
+      :disabled="isEdit"
+      :picker-options="pickerOptions2"
+      :editable="false"
+      value-format="yyyy-MM-dd"
+      :clearable="true"
+      @change="timeChange"
+    />
+  </div>
+</template>
+
+<script>
+// 选择时间段(只有日期)组件
+// timeReturned 返回值{startTime: Number,endTime: Number}
+export default {
+  name: "PeriodDatePicker",
+  props: ["start", "end", "disabled", "size", "width", "type", "placeholder"],
+  data() {
+    return {
+      startTime: this.start,
+      endTime: this.end,
+      isEdit: this.disabled,
+      pickerOptions1: {
+        disabledDate: (time) => {
+          if (this.endTime != null && this.endTime != "" && time) {
+            return time.getTime() > new Date(this.endTime).valueOf();
+          }
+        },
+      },
+      pickerOptions2: {
+        disabledDate: (time) => {
+          if (this.startTime != null && this.startTime != "" && time) {
+            return time.getTime() < new Date(this.startTime).valueOf();
+          }
+        },
+      },
+    };
+  },
+  watch: {
+    disabled: function (val) {
+      this.isEdit = val;
+    },
+    start(val) {
+      this.startTime = val;
+    },
+    end(val) {
+      this.endTime = val;
+    },
+  },
+  mounted() {},
+  methods: {
+    timeChange() {
+      if (
+        this.startTime !== "" &&
+        this.startTime !== null &&
+        this.endTime !== "" &&
+        this.endTime !== null
+      ) {
+        if (this.type + "" === "1" && !this.setType(365)) {
+          this.showMessage("时间跨度不能超过一年!");
+          return;
+        } else if (this.type + "" === "2" && !this.setType(90)) {
+          this.showMessage("时间跨度不能超过90天!");
+          return;
+        }else if (this.type + "" === "3" && !this.setType(30)) {
+          this.showMessage("时间跨度不能超过30天!");
+          return;
+        } else if (
+          new Date(this.endTime).valueOf() < new Date(this.startTime).valueOf()
+        ) {
+          this.showMessage("结束时间不大于开始时间!");
+          return;
+        } else {
+          this.timeReturned();
+        }
+      } else {
+        this.timeReturned();
+      }
+    },
+    timeReturned() {
+      let s = this.startTime == null ? "" : this.startTime;
+      let e = this.endTime == null ? "" : this.endTime;
+      let model = {
+        startTime: s == "" ? "" : this.transformTime(s),
+        endTime: e == "" ? "" : this.transformTime(e),
+      };
+
+      this.$emit("timeReturned", model);
+    },
+
+    transformTime(tTime) {
+      let time = new Date(tTime);
+      let y = time.getFullYear();
+      let M = time.getMonth() + 1;
+      let d = time.getDate();
+      return y + "-" + (M < 10 ? "0" + M : M) + "-" + (d < 10 ? "0" + d : d);
+    },
+    showMessage(message) {
+      this.$message.error(message);
+      this.startTime = "";
+      this.endTime = "";
+      this.timeReturned();
+    },
+    setType(days) {
+      let step = 24 * 3600 * 1000;
+      let sDay = new Date(this.startTime).valueOf();
+      let eDay = new Date(this.endTime).valueOf();
+      let isok = true;
+      if (eDay - sDay > step * days) {
+        isok = false;
+      }
+
+      return isok;
+    },
+  },
+};
+</script>
+<style lang="scss">
+.date-picker.el-input {
+  // width: 150px !important;
+}
+</style>

+ 0 - 0
src/views/reportQuery/productReport/period-date-picker/日期选择区间


+ 0 - 0
src/views/reportQuery/productReport/商品报表


+ 480 - 570
src/views/sellOut/sellOutOrder/detail.vue

@@ -1,34 +1,15 @@
 <template>
   <div class="sellOutOrderDetail pagePadding">
-    <div
-      style="width: 100%"
-      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
-    >
+    <div style="width: 100%" v-if="powers && powers.length > 0 && powers.some((item) => item == '001')">
       <div class="detail-page-title">
-        <span>发货申请单编号:</span
-        ><span v-if="sitem">{{ sitem.outCode }}</span>
-        <el-button
-          class="fr"
-          v-if="
-            (status === '2' || status === '3') &&
-            powers.some((item) => item == '049')
-          "
-          type="primary"
-          plain
-          :size="'mini'"
-          style="margin: 0 0 0 10px"
-          @click="wellReturnCode"
-          >新建售后申请单
+        <span>发货申请单编号:</span><span v-if="sitem">{{ sitem.outCode }}</span>
+        <el-button class="fr" v-if="
+          (status === '2' || status === '3') &&
+          powers.some((item) => item == '049')
+        " type="primary" plain :size="'mini'" style="margin: 0 0 0 10px" @click="wellReturnCode">新建售后申请单
         </el-button>
-        <el-button
-          class="fr"
-          v-if="status === '2' && powers.some((item) => item == '088')"
-          type="primary"
-          plain
-          :size="'mini'"
-          style="margin: 0 0 0 10px"
-          @click="wentReceive"
-          >确认收货
+        <el-button class="fr" v-if="status === '2' && powers.some((item) => item == '088')" type="primary" plain
+          :size="'mini'" style="margin: 0 0 0 10px" @click="wentReceive">确认收货
         </el-button>
       </div>
       <!-- 
@@ -42,271 +23,172 @@
         <el-tab-pane label="业务详情" name="1">
           <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
             <el-collapse-item title="发货申请单详情" name="1">
-              <show-data-table
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :sitem="sitem"
-                :columns="showColumns"
-              >
+              <show-data-table :newTime="newTime" v-if="newTime !== ''" :sitem="sitem" :columns="showColumns">
                 <template slot="status">
-                  <el-tag
-                    :size="'mini'"
-                    :type="sitem.status == '0' ? 'warning' : ''"
-                    v-text="
-                      (
-                        statusOptions.find(
-                          (item) => item.value == sitem.status
-                        ) || {}
-                      ).label || '--'
-                    "
-                  ></el-tag>
+                  <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'"
-                    v-text="
-                      (
-                        xs_order_type_options.find(
-                          (item) => item.id == sitem.order_type
-                        ) || {}
-                      ).label || '--'
-                    "
-                  ></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>{{
-                    private_field &&
-                    private_field.length > 0 &&
-                    private_field.some((item) => item == "2")
-                      ? sitem.sale_price
-                      : "***"
+                      private_field &&
+                        private_field.length > 0 &&
+                        private_field.some((item) => item == "2")
+                        ? sitem.sale_price
+                        : "***"
                   }}</span>
                 </template>
                 <template slot="total_price">
                   <span>{{
-                    private_field &&
-                    private_field.length > 0 &&
-                    private_field.some((item) => item == "2")
-                      ? sitem.total_price
-                      : "***"
+                      private_field &&
+                        private_field.length > 0 &&
+                        private_field.some((item) => item == "2")
+                        ? sitem.total_price
+                        : "***"
                   }}</span>
                 </template>
               </show-data-table>
             </el-collapse-item>
             <el-collapse-item title="商品信息" name="2">
-              <show-goods-data-table
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :type="sitem.order_type"
-                :skucode="sitem.skuCode"
-                :spucode="sitem.good_code"
-              />
+              <show-goods-data-table :newTime="newTime" v-if="newTime !== ''" :type="sitem.order_type"
+                :skucode="sitem.skuCode" :spucode="sitem.good_code" />
             </el-collapse-item>
-            <el-collapse-item
-              title="库管发货"
-              name="3"
-              v-if="status === '1' && powers.some((item) => item == '080')"
-            >
-              <want-deliver
-                :newTime="newTime"
-                v-if="newTime !== ''"
-                :sitem="sitem"
-                @refresh="initData"
-              />
+            <el-collapse-item title="库管发货" name="3" v-if="status === '1' && powers.some((item) => item == '080')">
+              <want-deliver :newTime="newTime" v-if="newTime !== ''" :sitem="sitem" @refresh="initData" />
             </el-collapse-item>
 
-            <el-collapse-item
-              title="售后申请单结果"
-              name="4"
-              v-if="
-                returnCode &&
-                returnCode_type &&
-                sitem &&
-                sitem.order_return &&
-                resitem
-              "
-            >
-              <show-data-table
-                :newTime="newTime"
-                v-if="newTime !== '' && resitem"
-                :sitem="resitem"
-                :border="
-                  !(
-                    (resitem.is_receive === '1' && returnCode_type === '4') ||
-                    (resitem.is_receive === '1' && returnCode_type === '5')
-                  )
-                "
-                :columns="rshowColumns"
-              >
+            <el-collapse-item title="售后申请单结果" name="4" v-if="
+              returnCode &&
+              returnCode_type &&
+              sitem &&
+              sitem.order_return &&
+              resitem
+            ">
+              <show-data-table :newTime="newTime" v-if="newTime !== '' && resitem" :sitem="resitem" :border="
+                !(
+                  (resitem.is_receive === '1' && returnCode_type === '4') ||
+                  (resitem.is_receive === '1' && returnCode_type === '5')
+                )
+              " :columns="rshowColumns">
                 <template slot="status">
-                  <el-tag
-                    :size="'mini'"
-                    :type="resitem.status == '0' ? 'warning' : ''"
-                    v-text="
-                      (
-                        (resitem.is_receive === '0'
-                          ? status2Options
-                          : status1Options
-                        ).find((item) => item.id === resitem.status) || {}
-                      ).label || '--'
-                    "
-                  ></el-tag>
-                  <el-tooltip
-                    v-if="resitem.status === '3' && resitem.is_receive === '0'"
-                    class="fr"
-                    effect="dark"
-                    content="同意退货"
-                    style="padding: 3px 0 0 0"
-                    placement="top"
-                  >
-                    <i
-                      class="el-icon-video-play tb-icon"
-                      @click="agree_return"
-                    ></i>
+                  <el-tag :size="'mini'" :type="resitem.status == '0' ? 'warning' : ''" v-text="
+                    (
+                      (resitem.is_receive === '0'
+                        ? status2Options
+                        : status1Options
+                      ).find((item) => item.id === resitem.status) || {}
+                    ).label || '--'
+                  "></el-tag>
+                  <el-tooltip v-if="resitem.status === '3' && resitem.is_receive === '0'" class="fr" effect="dark"
+                    content="同意退货" style="padding: 3px 0 0 0" placement="top">
+                    <i class="el-icon-video-play tb-icon" @click="agree_return"></i>
                   </el-tooltip>
 
-                  <el-tooltip
-                    class="fr"
-                    effect="dark"
-                    content="取消申请"
-                    style="padding: 3px 0 0 0"
-                    v-if="
-                      resitem.status === '1' ||
-                      resitem.status === '2' ||
-                      resitem.status === '3' ||
-                      resitem.status === '4'
-                    "
-                    placement="top"
-                  >
-                    <i
-                      class="el-icon-circle-close tb-icon"
-                      @click="close_return"
-                    ></i>
+                  <el-tooltip class="fr" effect="dark" content="取消申请" style="padding: 3px 0 0 0" v-if="
+                    resitem.status === '1' ||
+                    resitem.status === '2' ||
+                    resitem.status === '3' ||
+                    resitem.status === '4'
+                  " placement="top">
+                    <i class="el-icon-circle-close tb-icon" @click="close_return"></i>
+                  </el-tooltip>
+                  <el-tooltip class="fr" effect="dark" :content="resitem.is_receive === '1'
+                ? '换货'
+                : resitem.is_receive === '0'
+                  ? '补发'
+                  : '--'" style="padding: 3px 0 0 0" v-if="resitem.status === '5' && resitem.is_reissue + '' === '0' && resitem.except_code === '2'
+    " placement="top">
+                    <i class="el-icon-shopping-cart-2 tb-icon" @click="reissue"></i>
                   </el-tooltip>
                 </template>
                 <template slot="order_type">
-                  <el-tag
-                    :size="'mini'"
-                    v-text="
-                      (
-                        orderOptions.find(
-                          (item) => item.id == resitem.order_type
-                        ) || {}
-                      ).label || '--'
-                    "
-                  ></el-tag>
+                  <el-tag :size="'mini'" v-text="
+                    (
+                      orderOptions.find(
+                        (item) => item.id == resitem.order_type
+                      ) || {}
+                    ).label || '--'
+                  "></el-tag>
                 </template>
                 <template slot="is_receive">
                   <el-tag :size="'mini'" :type="''">{{
-                    resitem.is_receive === "1"
-                      ? "已收到货"
-                      : resitem.is_receive === "0"
-                      ? "未收到"
-                      : "--"
+                      resitem.is_receive === "1"
+                        ? "已收到货"
+                        : resitem.is_receive === "0"
+                          ? "未收到"
+                          : "--"
                   }}</el-tag>
                 </template>
                 <template slot="except_code">
-                  <el-tag
-                    :size="'mini'"
-                    v-text="
-                      (
-                        expect_options.find(
-                          (item) => item.value == resitem.except_code
-                        ) || {}
-                      ).label || '--'
-                    "
-                  ></el-tag>
+                  <el-tag :size="'mini'" v-text="
+                    (
+                      expect_options.find(
+                        (item) => item.value == resitem.except_code
+                      ) || {}
+                    ).label || '--'
+                  "></el-tag>
                 </template>
 
                 <template slot="error_img">
-                  <img
-                    class="fl hover"
-                    style="width: 23px; height: 23px; margin: 0 5px 0 0"
-                    v-viewer
-                    v-for="(si, i) in resitem.error_img"
-                    :src="si"
-                    :key="si + i"
-                  />
+                  <img class="fl hover" style="width: 23px; height: 23px; margin: 0 5px 0 0" v-viewer
+                    v-for="(si, i) in resitem.error_img" :src="si" :key="si + i" />
                 </template>
               </show-data-table>
-              <show-data-table
-                :newTime="newTime"
-                v-if="
-                  resitem &&
-                  resitem.is_receive === '1' &&
-                  (returnCode_type === '4' || returnCode_type === '5')
-                "
-                :sitem="resitem"
-                border
-                :columns="returnShowColumns"
-              >
+              <show-data-table :newTime="newTime" v-if="
+                resitem &&
+                resitem.is_receive === '1' &&
+                (returnCode_type === '4' || returnCode_type === '5')
+              " :sitem="resitem" border :columns="returnShowColumns">
                 <template slot="is_th">
-                  <el-tag
-                    :size="'mini'"
-                    v-text="
-                      (
-                        is_th_options.find(
-                          (item) => item.value == resitem.is_th
-                        ) || {}
-                      ).label || '--'
-                    "
-                  ></el-tag>
+                  <el-tag :size="'mini'" v-text="
+                    (
+                      is_th_options.find(
+                        (item) => item.value == resitem.is_th
+                      ) || {}
+                    ).label || '--'
+                  "></el-tag>
                 </template>
                 <template slot="addr">
-                  <span
-                    >{{ resitem.contactor }}---{{ resitem.mobile }}---{{
+                  <span>{{ resitem.contactor }}---{{ resitem.mobile }}---{{
                       resitem.addr_cn
-                    }}{{ resitem.addr }}</span
-                  >
+                  }}{{ resitem.addr }}</span>
                 </template>
               </show-data-table>
-              <show-data-table
-                :newTime="newTime"
-                v-if="
-                  newTime !== '' &&
-                  resitem &&
-                  resitem.is_receive === '1' &&
-                  returnCode_type === '5'
-                "
-                :sitem="resitem"
-                border
-                :columns="returnShowResColumns"
-              >
+              <show-data-table :newTime="newTime" v-if="
+                newTime !== '' &&
+                resitem &&
+                resitem.is_receive === '1' &&
+                returnCode_type === '5'
+              " :sitem="resitem" border :columns="returnShowResColumns">
               </show-data-table>
-              <return-express
-                :sitem="resitem"
-                :newTime="newTime"
-                v-if="newTime !== '' && returnCode_type === '4'"
-                @refresh="initData"
-              />
+              <return-express :sitem="resitem" :newTime="newTime" v-if="newTime !== '' && returnCode_type === '4'"
+                @refresh="initData" />
             </el-collapse-item>
           </el-collapse>
         </el-tab-pane>
         <el-tab-pane label="审批记录" name="2">
-          <process-time-line
-            v-if="newTime !== ''"
-            :newTime="newTime"
-            :type="'CKD'"
-            :orderCode="queryId"
-          />
+          <process-time-line v-if="newTime !== ''" :newTime="newTime" :type="'CKD'" :orderCode="queryId" />
         </el-tab-pane>
-        <el-tab-pane
-          label="物流进度"
-          name="3"
-          v-if="newTime !== '' && (status === '2' || status === '3')"
-        >
+        <el-tab-pane label="物流进度" name="3" v-if="newTime !== '' && (status === '2' || status === '3')">
           <logis-time-line v-if="newTime !== ''" :orderCode="sitem.post_code" />
         </el-tab-pane>
       </el-tabs>
       <div>
-        <add-Edit-A
-          :id="'add'"
-          :sitem="sitem"
-          :show-model="showModel"
-          :is-detail="false"
-          @refresh="initData"
-          @cancel="showModel = false"
-        />
+        <add-Edit-A :id="'add'" :sitem="sitem" :show-model="showModel" :is-detail="false" @refresh="initData"
+          @cancel="showModel = false" />
       </div>
     </div>
     <div v-else>
@@ -315,334 +197,362 @@
   </div>
 </template>
    <script>
-import mixinPage from "@/mixins/elPaginationHandle";
-import resToken from "@/mixins/resToken";
-import asyncRequest from "@/apis/service/sellOut/sellOutOrder";
-import addEditForm from "./components/addEditForm.vue"; //发货申请单详情
-import addEditA from "./components/addEditA";
-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",
-  mixins: [mixinPage, resToken],
-  components: {
-    addEditForm,
-    addEditA,
-    wantDeliver,
-    returnExpress,
-  },
-  computed: {
-    ...mapGetters(["private_field"]),
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "sellOutOrderDetail"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  data() {
-    return {
-      xs_order_type_options,
-      returnCode: "",
-      returnCode_type: "",
-      activeTabs: "1",
-      activeNames: ["0", "1", "2", "3", "4"],
-      status: "", //存储详情接口状态
-      statusList: [],
-      showColumns: showColumns,
-      rshowColumns: sellshowColumns,
-      returnShowColumns: [
-        {
-          prop: "is_th",
-          label: "物流承担方",
-          _slot_: "is_th",
-          span: 6,
-        },
-        {
-          prop: "addr",
-          label: "收货地址",
-          _slot_: "addr",
-          span: 18,
-        },
-      ],
-      returnShowResColumns: [
-        {
-          prop: "post_fee",
-          label: "退货物流费用",
-          span: 6,
-        },
-        {
-          prop: "post_company",
-          label: "退货物流公司",
-          span: 6,
-        },
-        {
-          prop: "post_code",
-          label: "退货物流单号",
-          span: 12,
-        },
-      ],
-      sitem: null,
-      resitem: null,
-      newTime: "",
-      showModel: false,
-      loading: false,
-      orderOptions: [
-        { id: "1", label: "线上商品销售" },
-        { id: "2", label: "项目线上商品销售" },
-        { id: "3", label: "竞价单销售" },
-        { id: "4", label: "项目竞价单销售" },
-        { id: "5", label: "平台部订单销售" },
-      ],
-      statusOptions: [
-        { value: "0", label: "待采购备货" },
-        { value: "1", label: "待库管发货" },
-        { value: "2", label: "已发货待收货" },
-        { value: "3", label: "已收货" },
-        { value: "4", label: "已全部退货" },
-      ],
-      // 收到货状态
-      status1Options: [
-        { id: "1", label: "待业务审核" },
-        { id: "2", label: "待采购审核" },
-        { id: "3", label: "待设置仓库" },
-        { id: "4", label: "待客户退货" },
-        { id: "5", label: "售后已完成" },
-        { id: "6", label: "业务已驳回" },
-        { id: "7", label: "采购已驳回" },
-        { id: "8", label: "申请已取消" },
-      ],
-      // 未收到货状态
-      status2Options: [
-        { id: "1", label: "待业务审核" },
-        { id: "2", label: "待采购审核" },
-        { id: "3", label: "待同意退货" },
-        { id: "5", label: "售后已完成" },
-        { id: "6", label: "业务已驳回" },
-        { id: "7", label: "采购已驳回" },
-        { id: "8", label: "申请已取消" },
-      ],
-      expect_options: [],
-      expect_options1: [
-        {
-          value: "1",
-          label: "退货",
-        },
-        {
-          value: "2",
-          label: "换货",
-        },
-      ],
-      expect_options0: [
-        {
-          value: "1",
-          label: "退货",
-        },
-        {
-          value: "2",
-          label: "补发",
-        },
-      ],
-      is_th_options: [
-        {
-          value: "1",
-          label: "收货人承担",
-        },
-        {
-          value: "2",
-          label: "业务公司承担",
-        },
-        {
-          value: "3",
-          label: "供应商承担",
-        },
-      ],
-      queryId: "",
-      did: "", //详情页上的id
-    };
-  },
-  mounted() {
-    this.queryId = this.$route.query.id;
-    this.initData();
-  },
-  methods: {
-    async updateStatus(e) {
-      await this.setstatus(e.status);
-    },
-    getNewTime() {
-      this.newTime = new Date().valueOf();
-    },
-    async setstatus(status) {
-      const model = {
-        id: this.did,
-        status: status,
-      };
-      let res = await asyncRequest.status(model);
-      if (res && res.code === 0) {
-        this.$notify.success({
-          title: "修改成功!",
-          message: "",
-        });
-        await this.initData();
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-    async wentReceive() {
-      await this.$confirm("确定要确认收货?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          const model = {
-            outCode: this.sitem.outCode,
-          };
-          const res = await asyncRequest.saleoutreceipt(model);
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "确认收货",
-              message: "",
-            });
-            await this.initData();
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-    async initData(e) {
-      this.returnCode = "";
-      this.returnCode_type = "";
-      let model = {
-        outCode: this.queryId,
-      };
-      const res = await asyncRequest.detail(model);
-      if (res && res.code === 0 && res.data) {
-        this.sitem = res.data;
-        const { status, can, id, order_return } = this.sitem;
-        this.status = status;
-        this.did = id;
-        if (order_return) {
-          this.returnCode = order_return.returnCode;
-          this.returnCode_type = order_return.status;
-          await this.receive_initData(this.returnCode);
-        }
-        this.getNewTime();
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-
-    wellReturnCode() {
-      console.log(this.returnCode_type);
-      if (
-        this.returnCode_type === "1" ||
-        this.returnCode_type === "2" ||
-        this.returnCode_type === "3"
-      ) {
-        this.$message.warning("当前售后申请单未完成审批!");
-        return;
-      }
-      this.showModel = true;
-    },
-    async receive_initData(code) {
-      let model = {
-        returnCode: code,
-      };
-      const res = await asyncRequest.afterinfo(model);
-      if (res && res.code === 0 && res.data) {
-        this.resitem = res.data;
-        this.resitem.error_img = this.resitem.error_img.split(",");
-        this.expect_options = JSON.parse(
-          JSON.stringify(
-            this.resitem.is_receive === "1"
-              ? this.expect_options1
-              : this.expect_options0
-          )
-        );
-      } else if (res && res.code >= 100 && res.code <= 104) {
-        await this.logout();
-      } else {
-        this.$message.warning(res.message);
-      }
-    },
-    async agree_return() {
-      await this.$confirm("确定要同意退货?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          const model = {
-            returnCode: this.returnCode,
-            status: "5",
-            remark: "",
-            is_post: "",
-          };
-          const res = await asyncRequest.afterstatus(model);
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "退货成功",
-              message: "",
-            });
-            await this.initData();
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-    async close_return() {
-      await this.$confirm("确定要取消申请?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(async () => {
-          const model = {
-            returnCode: this.returnCode,
-          };
-          const res = await asyncRequest.aftercancel(model);
-          if (res && res.code === 0) {
-            this.$notify.success({
-              title: "取消成功",
-              message: "",
-            });
-            await this.initData();
-          } else if (res && res.code >= 100 && res.code <= 104) {
-            await this.logout();
-          } else {
-            this.$message.warning(res.message);
-          }
-        })
-        .catch(() => {
-          console.log("取消");
-        });
-    },
-  },
-};
-</script>
+   import mixinPage from "@/mixins/elPaginationHandle";
+   import resToken from "@/mixins/resToken";
+   import asyncRequest from "@/apis/service/sellOut/sellOutOrder";
+   import addEditForm from "./components/addEditForm.vue"; //发货申请单详情
+   import addEditA from "./components/addEditA";
+   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",
+     mixins: [mixinPage, resToken],
+     components: {
+       addEditForm,
+       addEditA,
+       wantDeliver,
+       returnExpress,
+     },
+     computed: {
+       ...mapGetters(["private_field"]),
+       powers() {
+         let tran =
+           this.$store.getters.btnList.find(
+             (item) => item.menu_route == "sellOutOrderDetail"
+           ) || {};
+         if (tran && tran.action && tran.action.length > 0) {
+           return tran.action;
+         } else {
+           return [];
+         }
+       },
+     },
+     data() {
+       return {
+         xs_order_type_options,
+         returnCode: "",
+         returnCode_type: "",
+         activeTabs: "1",
+         activeNames: ["0", "1", "2", "3", "4"],
+         status: "", //存储详情接口状态
+         statusList: [],
+         showColumns: showColumns,
+         rshowColumns: sellshowColumns,
+         returnShowColumns: [
+           {
+             prop: "is_th",
+             label: "物流承担方",
+             _slot_: "is_th",
+             span: 6,
+           },
+           {
+             prop: "addr",
+             label: "收货地址",
+             _slot_: "addr",
+             span: 18,
+           },
+         ],
+         returnShowResColumns: [
+           {
+             prop: "post_fee",
+             label: "退货物流费用",
+             span: 6,
+           },
+           {
+             prop: "post_company",
+             label: "退货物流公司",
+             span: 6,
+           },
+           {
+             prop: "post_code",
+             label: "退货物流单号",
+             span: 12,
+           },
+         ],
+         sitem: null,
+         resitem: null,
+         newTime: "",
+         showModel: false,
+         loading: false,
+         orderOptions: [
+           { id: "1", label: "线上商品销售" },
+           { id: "2", label: "项目线上商品销售" },
+           { id: "3", label: "竞价单销售" },
+           { id: "4", label: "项目竞价单销售" },
+           { id: "5", label: "平台部订单销售" },
+         ],
+         statusOptions: [
+           { value: "0", label: "待采购备货" },
+           { value: "1", label: "待库管发货" },
+           { value: "2", label: "已发货待收货" },
+           { value: "3", label: "已收货" },
+           { value: "4", label: "已全部退货" },
+         ],
+         // 收到货状态
+         status1Options: [
+           { id: "1", label: "待业务审核" },
+           { id: "2", label: "待采购审核" },
+           { id: "3", label: "待设置仓库" },
+           { id: "4", label: "待客户退货" },
+           { id: "5", label: "售后已完成" },
+           { id: "6", label: "业务已驳回" },
+           { id: "7", label: "采购已驳回" },
+           { id: "8", label: "申请已取消" },
+         ],
+         // 未收到货状态
+         status2Options: [
+           { id: "1", label: "待业务审核" },
+           { id: "2", label: "待采购审核" },
+           { id: "3", label: "待同意退货" },
+           { id: "5", label: "售后已完成" },
+           { id: "6", label: "业务已驳回" },
+           { id: "7", label: "采购已驳回" },
+           { id: "8", label: "申请已取消" },
+         ],
+         expect_options: [],
+         expect_options1: [
+           {
+             value: "1",
+             label: "退货",
+           },
+           {
+             value: "2",
+             label: "换货",
+           },
+         ],
+         expect_options0: [
+           {
+             value: "1",
+             label: "退货",
+           },
+           {
+             value: "2",
+             label: "补发",
+           },
+         ],
+         is_th_options: [
+           {
+             value: "1",
+             label: "收货人承担",
+           },
+           {
+             value: "2",
+             label: "业务公司承担",
+           },
+           {
+             value: "3",
+             label: "供应商承担",
+           },
+         ],
+         queryId: "",
+         did: "", //详情页上的id
+       };
+     },
+     mounted() {
+       this.queryId = this.$route.query.id;
+       this.initData();
+     },
+     methods: {
+       async updateStatus(e) {
+         await this.setstatus(e.status);
+       },
+       getNewTime() {
+         this.newTime = new Date().valueOf();
+       },
+       async setstatus(status) {
+         const model = {
+           id: this.did,
+           status: status,
+         };
+         let res = await asyncRequest.status(model);
+         if (res && res.code === 0) {
+           this.$notify.success({
+             title: "修改成功!",
+             message: "",
+           });
+           await this.initData();
+         } else if (res && res.code >= 100 && res.code <= 104) {
+           await this.logout();
+         } else {
+           this.$message.warning(res.message);
+         }
+       },
+       async reissue() {
+         const { is_receive } = this.resitem
+         await this.$confirm(`确定要${is_receive === '1' ? '换货' : '补发'}?`, {
+           confirmButtonText: "确定",
+           cancelButtonText: "取消",
+           type: "warning",
+         })
+           .then(async () => {
+             const model = {
+               returnCode: this.returnCode,
+             };
+             const res = await asyncRequest.createSaleAndCgdByAfter(model);
+             if (res && res.code === 0) {
+               this.$notify.success({
+                 title: `${is_receive === '1' ? '换货' : '补发'}成功!`,
+                 message: "",
+               });
+               await this.initData();
+             } else if (res && res.code >= 100 && res.code <= 104) {
+               await this.logout();
+             } else {
+               this.$message.warning(res.message);
+             }
+           })
+           .catch(() => {
+             console.log("取消");
+           });
+       },
+       async wentReceive() {
+         await this.$confirm("确定要确认收货?", {
+           confirmButtonText: "确定",
+           cancelButtonText: "取消",
+           type: "warning",
+         })
+           .then(async () => {
+             const model = {
+               outCode: this.sitem.outCode,
+             };
+             const res = await asyncRequest.saleoutreceipt(model);
+             if (res && res.code === 0) {
+               this.$notify.success({
+                 title: "确认收货",
+                 message: "",
+               });
+               await this.initData();
+             } else if (res && res.code >= 100 && res.code <= 104) {
+               await this.logout();
+             } else {
+               this.$message.warning(res.message);
+             }
+           })
+           .catch(() => {
+             console.log("取消");
+           });
+       },
+       async initData(e) {
+         this.returnCode = "";
+         this.returnCode_type = "";
+         let model = {
+           outCode: this.queryId,
+         };
+         const res = await asyncRequest.detail(model);
+         if (res && res.code === 0 && res.data) {
+           this.sitem = res.data;
+           const { status, can, id, order_return } = this.sitem;
+           this.status = status;
+           this.did = id;
+           if (order_return) {
+             this.returnCode = order_return.returnCode;
+             this.returnCode_type = order_return.status;
+             await this.receive_initData(this.returnCode);
+           }
+           this.getNewTime();
+         } else if (res && res.code >= 100 && res.code <= 104) {
+           await this.logout();
+         } else {
+           this.$message.warning(res.message);
+         }
+       },
+   
+       wellReturnCode() {
+         console.log(this.returnCode_type);
+         if (
+           this.returnCode_type === "1" ||
+           this.returnCode_type === "2" ||
+           this.returnCode_type === "3"
+         ) {
+           this.$message.warning("当前售后申请单未完成审批!");
+           return;
+         }
+         this.showModel = true;
+       },
+       async receive_initData(code) {
+         let model = {
+           returnCode: code,
+         };
+         const res = await asyncRequest.afterinfo(model);
+         if (res && res.code === 0 && res.data) {
+           this.resitem = res.data;
+           this.resitem.error_img = this.resitem.error_img.split(",");
+           this.expect_options = JSON.parse(
+             JSON.stringify(
+               this.resitem.is_receive === "1"
+                 ? this.expect_options1
+                 : this.expect_options0
+             )
+           );
+         } else if (res && res.code >= 100 && res.code <= 104) {
+           await this.logout();
+         } else {
+           this.$message.warning(res.message);
+         }
+       },
+       async agree_return() {
+         await this.$confirm("确定要同意退货?", {
+           confirmButtonText: "确定",
+           cancelButtonText: "取消",
+           type: "warning",
+         })
+           .then(async () => {
+             const model = {
+               returnCode: this.returnCode,
+               status: "5",
+               remark: "",
+               is_post: "",
+             };
+             const res = await asyncRequest.afterstatus(model);
+             if (res && res.code === 0) {
+               this.$notify.success({
+                 title: "退货成功",
+                 message: "",
+               });
+               await this.initData();
+             } else if (res && res.code >= 100 && res.code <= 104) {
+               await this.logout();
+             } else {
+               this.$message.warning(res.message);
+             }
+           })
+           .catch(() => {
+             console.log("取消");
+           });
+       },
+       async close_return() {
+         await this.$confirm("确定要取消申请?", {
+           confirmButtonText: "确定",
+           cancelButtonText: "取消",
+           type: "warning",
+         })
+           .then(async () => {
+             const model = {
+               returnCode: this.returnCode,
+             };
+             const res = await asyncRequest.aftercancel(model);
+             if (res && res.code === 0) {
+               this.$notify.success({
+                 title: "取消成功",
+                 message: "",
+               });
+               await this.initData();
+             } else if (res && res.code >= 100 && res.code <= 104) {
+               await this.logout();
+             } else {
+               this.$message.warning(res.message);
+             }
+           })
+           .catch(() => {
+             console.log("取消");
+           });
+       },
+     },
+   };
+   </script>
    
    

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini