Browse Source

build:前端报表

snow 2 years ago
parent
commit
4160962703

File diff suppressed because it is too large
+ 0 - 0
dist/static/js/0.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-elementUI.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-libs.js


+ 6 - 0
src/apis/service/reportQuery/saleReport/index.js

@@ -105,6 +105,12 @@ export default {
   seooae: (data, params) => http(api + "seooae", data, "post", params),
   //无地址销售订单统计
   sna: (data, params) => http(api + "sna", data, "post", params),
+  //本地销售订单情况统计
+  sm: (data, params) => http(api + "sm", data, "post", params),
+  //本月采购订单和库存品发货情况
+  oom: (data, params) => http(api + "oom", data, "post", params),
+  pom: (data, params) => http(api + "pom", data, "post", params),
+  popm: (data, params) => http(api + "popm", data, "post", params),
 
   //开票明细表
   reportchangeloglist: (data, params) =>

+ 6 - 2
src/components/globalComponents/ex-table/main.vue

@@ -108,7 +108,7 @@
     />
   -->
     <div
-      v-if="data && data.length > 0"
+      v-if="(data && data.length > 0) && !noPagination"
       class="Pagination"
       style="text-align: right; margin-top: 10px"
     >
@@ -147,7 +147,7 @@ export default {
       render: (h, data) => {
         if (data.props.column) data.props.scope.column = data.props.column;
         return data.props.render(h, data.props.scope);
-      },
+      }
     },
   },
   props: {
@@ -243,6 +243,10 @@ export default {
       type: String,
       default: "mini",
     },
+    noPagination:{
+      type:Boolean,
+      default:false
+    }
   },
   computed: {
     // 允许筛选的列

+ 0 - 1
src/views/reportQuery/purchaseReport/components/table2.vue

@@ -87,7 +87,6 @@ export default {
       parmValue: {
         start_date: dayjs(this.getStartDate()).format('YYYY-MM-DD'), //起始时间
         end_date:dayjs(new Date()).format('YYYY-MM-DD'), // 结束时间
-
         page: 1, // 页码
         size: 15, // 每页显示条数
       },

+ 132 - 2
src/views/reportQuery/saleReport/components/columns.js

@@ -1961,7 +1961,7 @@ const table20 = [
     width: "110px",
     _slot_: "status",
   },
- 
+
   {
     prop: "good_code",
     label: "商品成本编号",
@@ -1997,7 +1997,7 @@ const table20 = [
     label: "无地址数量",
     width: "110px",
   },
- 
+
   {
     prop: "nickname",
     label: "申请人",
@@ -2010,6 +2010,132 @@ const table20 = [
   },
 ]
 
+const table21 = [
+  {
+    prop: "name",
+    label: "部门名称",
+    _slot_: 'name'
+  },
+  {
+    prop: "tag_1",
+    label: "库存",
+  },
+  {
+    prop: "tag_2",
+    label: "非库存",
+  }, {
+    prop: "tag_3",
+    label: "咨询采反",
+  }, {
+    prop: "tag_total",
+    label: "总计",
+  }
+]
+
+const table22 = [
+  {
+    prop: "cat_1",
+    label: "一级分类",
+  },
+  {
+    prop: "cat_2",
+    label: "二级分类",
+  },
+  {
+    prop: "cat_3",
+    label: "三级分类",
+  },
+  {
+    prop: "tag_1",
+    label: "库存品",
+  }, 
+  {
+    prop: "tag_2",
+    label: "非库存品",
+  }, 
+  {
+    prop: "tag_3",
+    label: "咨询采反",
+  }, 
+  {
+    prop: "tag_supplier",
+    label: "供应商发货",
+  }, 
+  {
+    prop: "tag_person",
+    label: "负责人发货",
+  }, 
+  {
+    prop: "tag_logistics",
+    label: "物流岗发货",
+  }
+]
+
+
+const table23 = [
+  {
+    prop: "supplier_name",
+    label: "采购方",
+    _slot_: 'name'
+  },
+  {
+    prop: "total_cgd",
+    label: "订单总量",
+  },
+  {
+    prop: "tag_1",
+    label: "库存品",
+  },
+  {
+    prop: "tag_2",
+    label: "非库存品",
+  },
+  {
+    prop: "tag_c",
+    label: "toC",
+  }, 
+  {
+    prop: "tag_b",
+    label: "toB",
+  }, 
+  {
+    prop: "tag_zx",
+    label: "采反单数合计",
+  }
+]
+
+const table24 = [
+  {
+    prop: "person",
+    label: "采购方",
+    _slot_: 'name'
+  },
+  {
+    prop: "total_cgd",
+    label: "订单总量",
+  },
+  {
+    prop: "tag_1",
+    label: "库存品",
+  },
+  {
+    prop: "tag_2",
+    label: "非库存品",
+  },
+  {
+    prop: "tag_c",
+    label: "toC",
+  }, 
+  {
+    prop: "tag_b",
+    label: "toB",
+  }, 
+  {
+    prop: "tag_zx",
+    label: "采反单数合计",
+  }
+]
+
 
 
 
@@ -2034,4 +2160,8 @@ export {
   table18,
   table19,
   table20,
+  table21,
+  table22,
+  table23,
+  table24
 }

+ 248 - 0
src/views/reportQuery/saleReport/components/table21.vue

@@ -0,0 +1,248 @@
+<template>
+  <div>
+    <ex-table
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="table21"
+      :size="size"
+      no-pagination
+      @screen-reset="searchList"
+      @screen-submit="searchList"
+      @selection="selection_change"
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="width: 100%; padding: 0 0 0 80px">
+            <el-col :span="6" style="width: 443px;">
+              <periodDatePickerActive
+                :start="parmValue.start_day"
+                :end="parmValue.end_day"
+                :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-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 #name="{ scope }">
+        <span>{{Array.isArray(scope.row.name) ? scope.row.name.join(",") : scope.row.name}}</span>
+      </template>
+    </ex-table>
+  </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/saleReport";
+import periodDatePickerActive from "../period-date-picker/main.vue";
+import { table21 } from "./columns";
+import { mapGetters } from "vuex";
+import { xs_order_type_options } from "@/assets/js/statusList";
+import * as dayjs from "dayjs";
+
+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_day: dayjs(this.getStartDate()).format('YYYY-MM-DD'), //起始时间
+        end_day: dayjs(new Date()).format('YYYY-MM-DD'), // 结束时间
+      },
+      // 表格 - 数据集合
+      tableData: [],
+      xs_order_type_options,
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"]
+      },
+      // 表格表头 - 列参数
+      table21
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    //初始化http请求
+    async searchList() {
+      if(!this.parmValue.start_day || !this.parmValue.end_day){
+        this.$message.warning("请选择时间区间")
+        this.tableData = [];
+        return;
+      }
+
+      this.loading = true;
+      const { code, data, message } = await asyncRequest.sm(this.parmValue);
+      if (code === 0) {
+        this.tableData = data;
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+      }
+      this.loading = false;
+    },
+
+    //重置
+    restSearch() {
+      this.parmValue = {
+        start_day: dayjs(this.getStartDate()).format('YYYY-MM-DD'), //起始时间
+        end_day: dayjs(new Date()).format('YYYY-MM-DD'), // 结束时间
+      };
+      // 表格 - 分页
+      this.searchList();
+    },
+    getStartDate(){
+      const myDate = new Date();
+      myDate.setDate(myDate.getDate() - 29);
+      return myDate
+    },
+    diffDays(days) {
+      let step = 24 * 3600 * 1000;
+      let sDay = new Date(this.parmValue.start_day).valueOf();
+      let eDay = new Date(this.parmValue.end_day).valueOf();
+      let isok = true;
+
+      if (eDay - sDay > step * days) {
+        isok = false;
+      }
+
+      return isok;
+    },
+    //选中触发函数
+    selection_change(e) {
+      const { list } = e;
+      //选中的数组集合
+      this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
+    },
+    // 时间函数
+    async time(e) {
+      this.parmValue.start_day = e.startTime || "";
+      this.parmValue.end_day = e.endTime || "";
+      if (
+        (this.parmValue.start_day !== "" && this.parmValue.end_day === "") ||
+        (this.parmValue.start_day === "" && this.parmValue.end_day !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+
+      if(!this.diffDays(30)){
+        this.$message.warning("时间区间不能超过30天");
+        return;
+      }
+
+      await this.searchList();
+    },
+    //导出文件
+    async download() {
+      if (
+        (this.parmValue.start_day !== "" && this.parmValue.end_day === "") ||
+        (this.parmValue.start_day === "" && this.parmValue.end_day !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+
+      if(!this.diffDays(30)){
+        this.$message.warning("时间区间不能超过30天");
+        return;
+      }
+
+      let model = JSON.parse(
+        JSON.stringify(this.parmValue)
+      );
+      if (!this.loading) {
+        this.loading = true;
+        let httpType = `aplication/zip`;
+        axios({
+          method: "post",
+          url: this.fileUrl + "admin/sme",
+          responseType: "blob",
+          data: model,
+          headers: {
+            Accept: httpType
+          }
+        })
+          .then(res => {
+            if (res && res.status == 200 && res.data) {
+              let url = window.URL.createObjectURL(
+                new Blob([res.data], {
+                  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;
+}
+</style>

+ 270 - 0
src/views/reportQuery/saleReport/components/table22.vue

@@ -0,0 +1,270 @@
+<template>
+  <div>
+    <ex-table
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="table22"
+      :size="size"
+      no-pagination
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        searchList();
+      "
+      @screen-submit="
+        searchList();
+      "
+      @selection="selection_change"
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="width: 100%; padding: 0 0 0 80px">
+            <el-col :span="6" style="width: 443px;">
+              <periodDatePickerActive
+                :start="parmValue.start_day"
+                :end="parmValue.end_day"
+                :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-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>
+    </ex-table>
+  </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/saleReport";
+import periodDatePickerActive from "../period-date-picker/main.vue";
+import { table22 } from "./columns";
+import { mapGetters } from "vuex";
+import { xs_order_type_options } from "@/assets/js/statusList";
+import * as dayjs from "dayjs";
+
+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_day: dayjs(this.getStartDate()).format('YYYY-MM-DD'), //起始时间
+        end_day: dayjs(new Date()).format('YYYY-MM-DD'), // 结束时间
+      },
+      // 表格 - 数据集合
+      tableData: [],
+      xs_order_type_options,
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"]
+      },
+      // 表格表头 - 列参数
+      table22
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    //初始化http请求
+    async searchList() {
+      if(!this.parmValue.start_day || !this.parmValue.end_day){
+        this.$message.warning("请选择时间区间")
+        this.tableData = [];
+        return;
+      }
+      
+      this.loading = true;
+      const { code, data, message } = await asyncRequest.oom(this.parmValue);
+      if (code === 0) {
+        this.tableData = data;
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+      }
+      this.loading = false;
+    },
+    getStartDate(){
+      const myDate = new Date();
+      myDate.setDate(myDate.getDate() - 29);
+      return myDate
+    },
+    // getTimeParam() {
+    //   const { start_day: start, end_day: end } = this.parmValue;
+
+    //   if (!start || !end) {
+    //     return {};
+    //   }
+
+    //   const start_date_chunks = start.split("-");
+    //   const end_date_chunks = end.split("-");
+
+    //   start_date_chunks[2] = "01";
+
+    //   const [year, month] = end_date_chunks;
+    //   const end_last_day = new Date(year, month, 0).getDate();
+    //   end_date_chunks[2] = end_last_day;
+
+    //   return {
+    //     start_day: start_date_chunks.join("-"),
+    //     end_day: end_date_chunks.join("-")
+    //   };
+    // },
+    diffDays(days) {
+      let step = 24 * 3600 * 1000;
+      let sDay = new Date(this.parmValue.start_day).valueOf();
+      let eDay = new Date(this.parmValue.end_day).valueOf();
+      let isok = true;
+
+      if (eDay - sDay > step * days) {
+        isok = false;
+      }
+
+      return isok;
+    },
+    // 时间函数
+    async time(e) {
+      this.parmValue.start_day = e.startTime || "";
+      this.parmValue.end_day = e.endTime || "";
+      if (
+        (this.parmValue.start_day !== "" && this.parmValue.end_day === "") ||
+        (this.parmValue.start_day === "" && this.parmValue.end_day !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+
+      if(!this.diffDays(30)){
+        this.$message.warning("时间区间不能超过30天");
+        return;
+      }
+
+      await this.searchList();
+    },
+
+    //重置
+    restSearch() {
+      this.parmValue = {
+        start_day: dayjs(this.getStartDate()).format('YYYY-MM-DD'), //起始时间
+        end_day: dayjs(new Date()).format('YYYY-MM-DD'), // 结束时间
+      };
+      this.searchList();
+    },
+    //选中触发函数
+    selection_change(e) {
+      const { list } = e;
+      //选中的数组集合
+      this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
+    },
+    //导出文件
+    async download() {
+      if (
+        (this.parmValue.start_day !== "" && this.parmValue.end_day === "") ||
+        (this.parmValue.start_day === "" && this.parmValue.end_day !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+
+      if(!this.diffDays(30)){
+        this.$message.warning("时间区间不能超过30天");
+        return;
+      }
+
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+
+      if (!this.loading) {
+        this.loading = true;
+        let httpType = `aplication/zip`;
+        axios({
+          method: "post",
+          url: this.fileUrl + "admin/oome",
+          responseType: "blob",
+          data: model,
+          headers: {
+            Accept: httpType
+          }
+        })
+          .then(res => {
+            if (res && res.status == 200 && res.data) {
+              let url = window.URL.createObjectURL(
+                new Blob([res.data], {
+                  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;
+}
+</style>

+ 304 - 0
src/views/reportQuery/saleReport/components/table23.vue

@@ -0,0 +1,304 @@
+<template>
+  <div>
+    <ex-table
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="table23"
+      :size="size"
+      no-pagination
+      @screen-reset="
+        searchList();
+      "
+      @screen-submit="
+        searchList();
+      "
+      @selection="selection_change"
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="width: 100%; padding: 0 0 0 80px">
+            <el-col :span="6" style="width: 443px;">
+              <periodDatePickerActive
+                :start="parmValue.start_day"
+                :end="parmValue.end_day"
+                picker-type="month"
+                :width="'205px'"
+                :size="searchSize"
+                @timeReturned="time"
+              />
+            </el-col>
+
+            <el-col :span="4" style="margin-right:10px">
+              <el-input
+                :size="searchSize"
+                v-model="parmValue.supplierNo"
+                placeholder="供应商编码"
+                @blur="searchList"
+              />
+            </el-col>
+
+            <el-col :span="4">
+              <el-input
+                :size="searchSize"
+                v-model="parmValue.supplier_name"
+                placeholder="供应商名称"
+                @blur="searchList"
+              />
+            </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>
+      </template>
+      <template #name="{ scope }">
+        <span>{{Array.isArray(scope.row.supplier_name) ? scope.row.supplier_name.join(",") : scope.row.supplier_name}}</span>
+      </template>
+    </ex-table>
+  </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/saleReport";
+import periodDatePickerActive from "../period-date-picker/main.vue";
+import { table23 } from "./columns";
+import { mapGetters } from "vuex";
+import { xs_order_type_options } from "@/assets/js/statusList";
+import * as dayjs from "dayjs";
+
+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: {
+        supplier_name: "",
+        supplierNo: "",
+        start_day: dayjs(this.getStartDate()).format('YYYY-MM-DD'), //起始时间
+        end_day: dayjs(new Date()).format('YYYY-MM-DD'), // 结束时间
+      },
+      // 表格 - 数据集合
+      tableData: [],
+      xs_order_type_options,
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"]
+      },
+      // 表格表头 - 列参数
+      table23
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    //初始化http请求
+    async searchList() {
+      if(!this.parmValue.start_day || !this.parmValue.end_day){
+        this.$message.warning("请选择时间区间")
+        this.tableData = [];
+        return;
+      }
+
+      this.loading = true;
+      const { code, data, message } = await asyncRequest.pom(this.parmValue);
+      if (code === 0) {
+        // const { list, count } = data;
+        this.tableData = data;
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+      }
+      this.loading = false;
+    },
+    getStartDate(){
+      const myDate = new Date();
+      myDate.setDate(myDate.getDate() - 29);
+      return myDate
+    },
+    diffDays(days) {
+      let step = 24 * 3600 * 1000;
+      let sDay = new Date(this.parmValue.start_day).valueOf();
+      let eDay = new Date(this.parmValue.end_day).valueOf();
+      let isok = true;
+
+      if (eDay - sDay > step * days) {
+        isok = false;
+      }
+
+      return isok;
+    },
+
+    //重置
+    restSearch() {
+      this.parmValue = {
+        supplier_name: "",
+        supplierNo: "",
+        start_day: dayjs(this.getStartDate()).format('YYYY-MM-DD'), //起始时间
+        end_day: dayjs(new Date()).format('YYYY-MM-DD'), // 结束时间
+        page: 1, // 页码
+        size: 15 // 每页显示条数
+      };
+      this.searchList();
+    },
+    //选中触发函数
+    selection_change(e) {
+      const { list } = e;
+      //选中的数组集合
+      this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
+    },
+    // 时间函数
+    async time(e) {
+      this.parmValue.start_day = e.startTime || "";
+      this.parmValue.end_day = e.endTime || "";
+      if (
+        (this.parmValue.start_day !== "" && this.parmValue.end_day === "") ||
+        (this.parmValue.start_day === "" && this.parmValue.end_day !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+
+            
+      if(!this.diffDays(30)){
+        this.$message.warning("时间区间不能超过30天");
+        return;
+      }
+
+      await this.searchList();
+    },
+    // getTimeParam() {
+    //   const { start_day: start, end_day: end } = this.parmValue;
+
+    //   if (!start || !end) {
+    //     return {
+    //       start_day: "",
+    //       end_day: ""
+    //     };
+    //   }
+
+    //   const start_date_chunks = start.split("-");
+    //   const end_date_chunks = end.split("-");
+
+    //   start_date_chunks[2] = "01";
+
+    //   const [year, month] = end_date_chunks;
+    //   const end_last_day = new Date(year, month, 0).getDate();
+    //   end_date_chunks[2] = end_last_day;
+
+    //   return {
+    //     start_day: start_date_chunks.join("-"),
+    //     end_day: end_date_chunks.join("-")
+    //   };
+    // },
+    //导出文件
+    async download() {
+      if (
+        (this.parmValue.start_day !== "" && this.parmValue.end_day === "") ||
+        (this.parmValue.start_day === "" && this.parmValue.end_day !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+
+      
+      if(!this.diffDays(30)){
+        this.$message.warning("时间区间不能超过30天");
+        return;
+      }
+
+      let model = JSON.parse(
+        JSON.stringify(this.parmValue)
+      );
+
+      if (!this.loading) {
+        this.loading = true;
+        let httpType = `aplication/zip`;
+        axios({
+          method: "post",
+          url: this.fileUrl + "admin/pome",
+          responseType: "blob",
+          data: model,
+          headers: {
+            Accept: httpType
+          }
+        })
+          .then(res => {
+            if (res && res.status == 200 && res.data) {
+              let url = window.URL.createObjectURL(
+                new Blob([res.data], {
+                  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;
+}
+</style>

+ 315 - 0
src/views/reportQuery/saleReport/components/table24.vue

@@ -0,0 +1,315 @@
+<template>
+  <div>
+    <ex-table
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="table23"
+      :size="size"
+      no-pagination
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        searchList
+      "
+      @screen-submit="
+        searchList
+      "
+      @selection="selection_change"
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="width: 100%; padding: 0 0 0 80px">
+            <el-col :span="6" style="width: 443px">
+              <periodDatePickerActive
+                :start="parmValue.start_day"
+                :end="parmValue.end_day"
+                :width="'205px'"
+                picker-type="month"
+                :size="searchSize"
+                @timeReturned="time"
+              />
+            </el-col>
+
+            <el-col :span="4" style="margin-right:10px">
+              <el-select
+                style="width:100%"
+                v-model="parmValue.flag"
+                :size="searchSize"
+                @change="searchList"
+              >
+                <el-option value label="全部"></el-option>
+                <el-option value="1" label="开通账号的供应商"></el-option>
+                <el-option value="2" label="未开通账号的供应商"></el-option>
+              </el-select>
+            </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="margin-top:10px">
+            <el-col :span="4" style="margin-right:10px">
+              <el-input
+                :size="searchSize"
+                v-model="parmValue.supplierNo"
+                placeholder="供应商编码"
+                @blur=" searchList()"
+              />
+            </el-col>
+
+            <el-col :span="4" style="margin-right:10px">
+              <el-input
+                :size="searchSize"
+                v-model="parmValue.supplier_name"
+                placeholder="供应商名称"
+                @blur="searchList()"
+              />
+            </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 #name="{ scope }">
+        <span>{{ Array.isArray(scope.row.person) ? scope.row.person.join(",") : scope.row.person }}</span>
+      </template>
+    </ex-table>
+  </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/saleReport";
+import periodDatePickerActive from "../period-date-picker/main.vue";
+import { table23 } from "./columns";
+import { mapGetters } from "vuex";
+import { xs_order_type_options } from "@/assets/js/statusList";
+import * as dayjs from "dayjs";
+
+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: {
+        supplier_name: "",
+        supplierNo: "",
+        start_day: dayjs(this.getStartDate()).format('YYYY-MM-DD'), //起始时间
+        end_day: dayjs(new Date()).format('YYYY-MM-DD'), // 结束时间
+        flag: "",
+      },
+      // 表格 - 数据集合
+      tableData: [],
+      xs_order_type_options,
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"]
+      },
+      // 表格表头 - 列参数
+      table23
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    //初始化http请求
+    async searchList() {
+      if(!this.parmValue.start_day || !this.parmValue.end_day){
+        this.$message.warning("请选择时间区间")
+        this.tableData = [];
+        return;
+      }
+      
+      this.loading = true;
+      const { code, data, message } = await asyncRequest.popm(this.parmValue);
+      if (code === 0) {
+        // const { list, count } = data;
+        this.tableData = data;
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+      }
+      this.loading = false;
+    },
+    //重置
+    restSearch() {
+      this.parmValue = {
+        start_day: dayjs(this.getStartDate()).format('YYYY-MM-DD'), //起始时间
+        end_day: dayjs(new Date()).format('YYYY-MM-DD'), // 结束时间
+        supplier_name: "",
+        supplierNo: "",
+        flag: "",
+        page: 1, // 页码
+        size: 15 // 每页显示条数
+      };
+      this.searchList();
+    },
+    // 时间函数
+    async time(e) {
+      this.parmValue.start_day = e.startTime || "";
+      this.parmValue.end_day = e.endTime || "";
+      if (
+        (this.parmValue.start_day !== "" && this.parmValue.end_day === "") ||
+        (this.parmValue.start_day === "" && this.parmValue.end_day !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+
+      if(!this.diffDays(30)){
+        this.$message.warning("时间区间不能超过30天");
+        return;
+      }
+
+      await this.searchList();
+    },
+    //选中触发函数
+    selection_change(e) {
+      const { list } = e;
+      //选中的数组集合
+      this.changeList = list.length > 0 ? JSON.parse(JSON.stringify(list)) : [];
+    },
+    // getTimeParam() {
+    //   const { start_day: start, end_day: end } = this.parmValue;
+
+    //   if (!start || !end) {
+    //     return {};
+    //   }
+
+    //   const start_date_chunks = start.split("-");
+    //   const end_date_chunks = end.split("-");
+
+    //   start_date_chunks[2] = "01";
+
+    //   const [year, month] = end_date_chunks;
+    //   const end_last_day = new Date(year, month, 0).getDate();
+    //   end_date_chunks[2] = end_last_day;
+
+    //   return {
+    //     start_day: start_date_chunks.join("-"),
+    //     end_day: end_date_chunks.join("-")
+    //   };
+    // },
+    getStartDate(){
+      const myDate = new Date();
+      myDate.setDate(myDate.getDate() - 29);
+      return myDate
+    },
+    diffDays(days) {
+      let step = 24 * 3600 * 1000;
+      let sDay = new Date(this.parmValue.start_day).valueOf();
+      let eDay = new Date(this.parmValue.end_day).valueOf();
+      let isok = true;
+
+      if (eDay - sDay > step * days) {
+        isok = false;
+      }
+
+      return isok;
+    },
+    //导出文件
+    async download() {
+      if (
+        (this.parmValue.start_day !== "" && this.parmValue.end_day === "") ||
+        (this.parmValue.start_day === "" && this.parmValue.end_day !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+
+      if(!this.diffDays(30)){
+        this.$message.warning("时间区间不能超过30天");
+        return;
+      }
+
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      if (!this.loading) {
+        this.loading = true;
+        let httpType = `aplication/zip`;
+        axios({
+          method: "post",
+          url: this.fileUrl + "admin/popme",
+          responseType: "blob",
+          data: model,
+          headers: {
+            Accept: httpType
+          }
+        })
+          .then(res => {
+            if (res && res.status == 200 && res.data) {
+              let url = window.URL.createObjectURL(
+                new Blob([res.data], {
+                  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;
+}
+</style>

+ 116 - 69
src/views/reportQuery/saleReport/index.vue

@@ -3,57 +3,70 @@
     <div v-if="powers.some((i) => i == '001')">
       <!-- <el-tabs v-model="activeName" @tab-click="handleClick"> -->
       <el-tabs v-model="activeName">
-        <el-tab-pane label="日报" name="table1"
-          ><table1 v-if="activeName == 'table1'"></table1
-        ></el-tab-pane>
+        <el-tab-pane label="日报" name="table1"></el-tab-pane>
+          <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-tab-pane label="订单报表" name="table3"
-          ><table3 v-if="activeName == 'table3'"></table3
-        ></el-tab-pane>
-        <el-tab-pane label="未发货报表" name="table4"
-          ><table4 v-if="activeName == 'table4'"></table4
-        ></el-tab-pane>
-        <el-tab-pane label="未签收报表" name="table5"
-          ><table5 v-if="activeName == 'table5'"></table5
-        ></el-tab-pane>
-        <el-tab-pane label="售后报表" name="table6"
-          ><table6 v-if="activeName == 'table6'"></table6
-        ></el-tab-pane>
-        <el-tab-pane label="产品热销排行" name="table7"
-          ><table7 v-if="activeName == 'table7'"></table7
-        ></el-tab-pane>
+        <el-tab-pane label="竞价单报表" name="table2">
+          <table2 v-if="activeName == 'table2'"></table2>
+        </el-tab-pane>
+        <el-tab-pane label="订单报表" name="table3">
+          <table3 v-if="activeName == 'table3'"></table3>
+        </el-tab-pane>
+        <el-tab-pane label="未发货报表" name="table4">
+          <table4 v-if="activeName == 'table4'"></table4>
+        </el-tab-pane>
+        <el-tab-pane label="未签收报表" name="table5">
+          <table5 v-if="activeName == 'table5'"></table5>
+        </el-tab-pane>
+        <el-tab-pane label="售后报表" name="table6">
+          <table6 v-if="activeName == 'table6'"></table6>
+        </el-tab-pane>
+        <el-tab-pane label="产品热销排行" name="table7">
+          <table7 v-if="activeName == 'table7'"></table7>
+        </el-tab-pane>
         <!-- <el-tab-pane label="未开票报表" name="table8"><table8 v-if="activeName == 'table8'"></table8></el-tab-pane> -->
         <!-- <el-tab-pane label="订单导出表" name="table9"><table9 v-if="activeName == 'table9'"></table9></el-tab-pane> -->
-        <el-tab-pane label="竞价单导出明细" name="table10"
-          ><table10 v-if="activeName == 'table10'"></table10
-        ></el-tab-pane>
-        <el-tab-pane label="工差明细表" name="table11"
-          ><table11 v-if="activeName == 'table11'"></table11
-        ></el-tab-pane>
-        <el-tab-pane label="退货明细表" name="table12"
-          ><table12 v-if="activeName == 'table12'"></table12
-        ></el-tab-pane>
-        <el-tab-pane label="售后明细表" name="table13"
-          ><table13 v-if="activeName == 'table13'"></table13
-        ></el-tab-pane>
-        <el-tab-pane label="议价明细表" name="table14"
-          ><table14 v-if="activeName == 'table14'"></table14
-        ></el-tab-pane>
-        <el-tab-pane label="延时发货申请单" name="table15"
-          ><table15 v-if="activeName == 'table15'"></table15
-        ></el-tab-pane>
-        <el-tab-pane label="直接发货申请单" name="table16"
-          ><table16 v-if="activeName == 'table16'"></table16
-        ></el-tab-pane>
+        <el-tab-pane label="竞价单导出明细" name="table10">
+          <table10 v-if="activeName == 'table10'"></table10>
+        </el-tab-pane>
+        <el-tab-pane label="工差明细表" name="table11">
+          <table11 v-if="activeName == 'table11'"></table11>
+        </el-tab-pane>
+        <el-tab-pane label="退货明细表" name="table12">
+          <table12 v-if="activeName == 'table12'"></table12>
+        </el-tab-pane>
+        <el-tab-pane label="售后明细表" name="table13">
+          <table13 v-if="activeName == 'table13'"></table13>
+        </el-tab-pane>
+        <el-tab-pane label="议价明细表" name="table14">
+          <table14 v-if="activeName == 'table14'"></table14>
+        </el-tab-pane>
+        <el-tab-pane label="延时发货申请单" name="table15">
+          <table15 v-if="activeName == 'table15'"></table15>
+        </el-tab-pane>
+        <el-tab-pane label="直接发货申请单" name="table16">
+          <table16 v-if="activeName == 'table16'"></table16>
+        </el-tab-pane>
         <!-- <el-tab-pane label="开票明细表" name="table17"><table17 v-if="activeName == 'table17'"></table17></el-tab-pane> -->
         <!-- <el-tab-pane label="待开票列表" name="table18"><table18 v-if="activeName == 'table18'"></table18></el-tab-pane> -->
         <!-- <el-tab-pane label="待回款列表" name="table19"><table19 v-if="activeName == 'table19'"></table19></el-tab-pane> -->
-        <el-tab-pane label="无地址销售订单" name="table20"
-          ><table20 v-if="activeName == 'table20'"></table20
-        ></el-tab-pane>
+        <el-tab-pane label="无地址销售订单" name="table20">
+          <table20 v-if="activeName == 'table20'"></table20>
+        </el-tab-pane>
+
+        <el-tab-pane label="销售订单商品类型" name="table21">
+          <table21 v-if="activeName == 'table21'" />
+        </el-tab-pane>
+        <el-tab-pane label="采购订单发货维度表" name="table22">
+          <table22 v-if="activeName == 'table22'" />
+        </el-tab-pane>
+        <el-tab-pane label="供应商采购订单情况" name="table23">
+          <table23 v-if="activeName == 'table23'" />
+        </el-tab-pane>
+        <el-tab-pane label="供应商负责人采购订单情况" name="table24">
+          <table24 v-if="activeName == 'table24'" />
+        </el-tab-pane>
       </el-tabs>
     </div>
     <div v-else>
@@ -67,27 +80,55 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import { mapGetters } from "vuex";
 //标签页组件引入
-const table1 = () => import(/* webpackChunkName:'mycomp' */ "./components/table1");
-const table2 = () => import(/* webpackChunkName:'mycomp' */ "./components/table2");
-const table3 = () => import(/* webpackChunkName:'mycomp' */ "./components/table3");
-const table4 = () => import(/* webpackChunkName:'mycomp' */ "./components/table4");
-const table5 = () => import(/* webpackChunkName:'mycomp' */ "./components/table5");
-const table6 = () => import(/* webpackChunkName:'mycomp' */ "./components/table6");
-const table7 = () => import(/* webpackChunkName:'mycomp' */ "./components/table7");
-const table8 = () => import(/* webpackChunkName:'mycomp' */ "./components/table8");
-const table9 = () => import(/* webpackChunkName:'mycomp' */ "./components/table9");
-const table10 = () => import(/* webpackChunkName:'mycomp' */ "./components/table10");
-const table11 = () => import(/* webpackChunkName:'mycomp' */ "./components/table11");
-const table12 = () => import(/* webpackChunkName:'mycomp' */ "./components/table12");
-const table13 = () => import(/* webpackChunkName:'mycomp' */ "./components/table13");
-const table14 = () => import(/* webpackChunkName:'mycomp' */ "./components/table14");
+const table1 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table1");
+const table2 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table2");
+const table3 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table3");
+const table4 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table4");
+const table5 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table5");
+const table6 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table6");
+const table7 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table7");
+const table8 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table8");
+const table9 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table9");
+const table10 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table10");
+const table11 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table11");
+const table12 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table12");
+const table13 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table13");
+const table14 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table14");
 
-const table15 = () => import(/* webpackChunkName:'mycomp' */ "./components/table15");
-const table16 = () => import(/* webpackChunkName:'mycomp' */ "./components/table16");
-const table17 = () => import(/* webpackChunkName:'mycomp' */ "./components/table17");
-const table18 = () => import(/* webpackChunkName:'mycomp' */ "./components/table18");
-const table19 = () => import(/* webpackChunkName:'mycomp' */ "./components/table19");
-const table20 = () => import(/* webpackChunkName:'mycomp' */ "./components/table20");
+const table15 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table15");
+const table16 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table16");
+const table17 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table17");
+const table18 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table18");
+const table19 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table19");
+const table20 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table20");
+const table21 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table21");
+const table22 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table22");
+const table23 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table23");
+const table24 = () =>
+  import(/* webpackChunkName:'mycomp' */ "./components/table24");
 
 export default {
   mixins: [mixinPage, resToken],
@@ -112,27 +153,33 @@ export default {
     table18,
     table19,
     table20,
+    table21,
+    table22,
+    table23,
+    table24
   },
 
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       const tran =
-        this.$store.getters.btnList.find((item) => item.menu_route == "saleReport") || {};
+        this.$store.getters.btnList.find(
+          item => item.menu_route == "saleReport"
+        ) || {};
       const { action } = tran ?? {};
       return action ?? [];
-    },
+    }
   },
   data() {
     return {
-      activeName: "table1",
+      activeName: "table1"
     };
   },
   methods: {
     //   handleClick(tab, event) {
     //     console.log(tab, event);
     //   }
-  },
+  }
 };
 </script>
 

+ 21 - 14
src/views/reportQuery/saleReport/period-date-picker/main.vue

@@ -4,7 +4,6 @@
       v-model="startTime"
       style="margin: 0"
       class="date-picker"
-      type="date"
       :size="size"
       :style="{ width: width }"
       :placeholder="(placeholder||'') + '开始日期'"
@@ -22,7 +21,6 @@
       v-model="endTime"
       class="date-picker"
       :style="{ width: width }"
-      type="date"
       :placeholder="(placeholder||'') + '结束日期'"
       :disabled="isEdit"
       :picker-options="pickerOptions2"
@@ -39,30 +37,39 @@
 // timeReturned 返回值{startTime: Number,endTime: Number}
 export default {
   name: "PeriodDatePicker",
-  props: ["start", "end", "disabled", "size", "width", "type", "placeholder"],
+  props: [
+    "start",
+    "end",
+    "disabled",
+    "size",
+    "width",
+    "type",
+    "placeholder",
+    "pickerType"
+  ],
   data() {
     return {
       startTime: this.start,
       endTime: this.end,
       isEdit: this.disabled,
       pickerOptions1: {
-        disabledDate: (time) => {
+        disabledDate: time => {
           if (this.endTime != null && this.endTime != "" && time) {
             return time.getTime() > new Date(this.endTime).valueOf();
           }
-        },
+        }
       },
       pickerOptions2: {
-        disabledDate: (time) => {
+        disabledDate: time => {
           if (this.startTime != null && this.startTime != "" && time) {
             return time.getTime() < new Date(this.startTime).valueOf();
           }
-        },
-      },
+        }
+      }
     };
   },
   watch: {
-    disabled: function (val) {
+    disabled: function(val) {
       this.isEdit = val;
     },
     start(val) {
@@ -70,7 +77,7 @@ export default {
     },
     end(val) {
       this.endTime = val;
-    },
+    }
   },
   mounted() {},
   methods: {
@@ -87,7 +94,7 @@ export default {
         } else if (this.type + "" === "2" && !this.setType(90)) {
           this.showMessage("时间跨度不能超过90天!");
           return;
-        }else if (this.type + "" === "3" && !this.setType(30)) {
+        } else if (this.type + "" === "3" && !this.setType(30)) {
           this.showMessage("时间跨度不能超过30天!");
           return;
         } else if (
@@ -107,7 +114,7 @@ export default {
       let e = this.endTime == null ? "" : this.endTime;
       let model = {
         startTime: s == "" ? "" : this.transformTime(s),
-        endTime: e == "" ? "" : this.transformTime(e),
+        endTime: e == "" ? "" : this.transformTime(e)
       };
 
       this.$emit("timeReturned", model);
@@ -136,8 +143,8 @@ export default {
       }
 
       return isok;
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss">

Some files were not shown because too many files changed in this diff