lucky 2 jaren geleden
bovenliggende
commit
3a6303372d

+ 54 - 0
src/apis/service/reportQuery/financeReport/index.js

@@ -0,0 +1,54 @@
+// 企业客户/供应商账号相关
+import http from "@/apis/axios";
+import testHttp from "@/apis/testAxios";
+const api = "admin/";
+export default {
+  // 分页查询
+  list: (data, params) => http(api + "receiptlist", data, "post", params),
+  // 分页查询企业客户
+  clist: (data, params) => http(api + "customerlist", data, "post", params),
+  // 发票开票数据导出
+  receiptexport: (data, params) => http(api + "receiptexport", data, "post", params),
+  // 发票数据导入
+  receiptimport: (data, params) => http(api + "receiptimport", data, "post", params),
+  // 新建业务需求表
+  add: (data, params) => http(api + "execsave", data, "post", params),
+  //获取预约导出业务需求表
+  exportList: (data, params) => http(api + "execlist", data, "post", params),
+
+  // 历史数据导出列表
+  hlist: (data, params) => testHttp(api + "execnowlist", data, "post", params),
+  // 准备执行
+  download: (data, params) => testHttp(api + "execnowdown", data, "post", params),
+  //  即时下载列表接口 -新
+  realNewList: (data, params) => http(api + "nowlist", data, "post", params),
+
+
+  // // 分页查询确认单列表
+  // qrdlist: (data, params) => http(api + "qrdlist", data, "post", params),
+  // // 发票新建(金额)
+  // madd: (data, params) => http(api + "receiptadd", data, "post", params),
+  // // 发票编辑(金额)
+  // mupdate: (data, params) => http(api + "receiptedit", data, "post", params),
+  // // 发票新建(确认单)
+  // oadd: (data, params) => http(api + "receiptcreate", data, "post", params),
+  // // 发票编辑(确认单)
+  // oupdate: (data, params) => http(api + "receiptsave", data, "post", params),
+  // // 发票详情
+  // detail: (data, params) => http(api + "receiptinfo", data, "post", params),
+  // // 删除(取消申请)
+  // delete: (data, params) => http(api + 'receiptdel', data, 'post', params),
+  // // 发票状态修改
+  // status: (data, params) => http(api + 'receiptstatus', data, 'post', params),
+  // // 发票物流信息添加
+  // post: (data, params) => http(api + 'receiptpost', data, 'post', params),
+
+  // // 关联其他企业
+  // invoicelist: (data, params) => http(api + 'invoicelist', data, 'post', params),
+
+  // // 认领资金申请开票
+  // receiptbytrade: (data, params) => http(api + 'receiptbytrade', data, 'post', params),
+  // // 认领资金开票编辑
+  // editbytrade: (data, params) => http(api + 'editbytrade', data, 'post', params),
+
+};

+ 98 - 0
src/apis/testAxios.js

@@ -0,0 +1,98 @@
+import urlConfig from '@/apis/url-config'
+import {
+  getToken, removeMenu,
+  removeBtn, removeToken
+} from '@/utils/auth'
+const header = {
+  // "X-Requested-With": "XMLHttpRequest",
+  // "X-Frame-Options": "DENY", // 告诉浏览器不要(DENY)把这个网页放在iFrame内,通常的目的就是要帮助用户对抗点击劫持。
+  // "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
+}
+window.ajaxTimeout = 20000
+export default async (
+  url = '',
+  data = {},
+  type = 'GET',
+  params = {},
+  headers = header,
+  onUploadProgress
+) => {
+  type = type.toLowerCase()
+  const obj = {
+    method: type,
+    baseURL: '',
+    url: urlConfig.testURL + url,
+    data,
+    params,
+    // // `onUploadProgress` 允许为上传处理进度事件
+    // onUploadProgress: function(progressEvent) {
+    //   // 对原生进度事件的处理
+    // },
+    // // `onDownloadProgress` 允许为下载处理进度事件
+    // onDownloadProgress: function(progressEvent) {
+    //   // 对原生进度事件的处理
+    // },
+    // `cancelToken` 指定用于取消请求的 cancel token
+    // (查看后面的 Cancellation 这节了解更多)
+    // cancelToken: new CancelToken(function (cancel) {
+    // }),
+    processData: true, // 告诉axios不要去处理发送的数据(重要参数)
+    timeout: window.ajaxTimeout,
+    headers,
+    onUploadProgress
+  }
+  if (onUploadProgress && typeof onUploadProgress === 'function') {
+    obj.onUploadProgress = onUploadProgress
+  }
+  // return await axios(obj)
+  //   .then(response => {
+  //     return response;
+  //   })
+  //   .catch(res => {
+  //     return res;
+  //   });
+  // 请求拦截器
+  axios.interceptors.request.use(
+    config => {
+      if (!config.data.token) {
+        config.data.token = getToken()
+      }
+      return config
+    },
+    error => {
+      // 错误抛到业务代码
+      return Promise.reject(new Error('服务器异常,请联系管理员!'))
+    }
+  )
+  // 添加响应拦截器
+  axios.interceptors.response.use(
+    async response => {
+      if (response.status === 200) {
+        const code = response.data.code
+        if (code >= 100 && code <= 104) {
+          removeToken()
+          removeMenu()
+          removeBtn()
+        }
+      }
+      return response
+    },
+    error => {
+      return Promise.reject(error.response.data)
+    }
+  )
+  return new Promise((resolve, reject) => {
+    axios(obj)
+      .then(response => {
+        // console.log(response)
+        resolve(response.data)
+      })
+      .catch(res => {
+        if (res.response && res.response.data) {
+          reject(res.response.data);
+        } else {
+          reject(res);
+        }
+      });
+  })
+}

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

@@ -164,7 +164,9 @@ export default {
     /**
      * el-table 属性集合
      * 自定义属性:
+     * 
      * @param {Array} _defaultHeader_  : 默认的表格头部,支持['setcol', 'screen'] setcol-列设置 screen-筛选
+     * 
      * 可使用插槽扩展表格头部:
      * table-header - 具名插槽
      * slotProps:selection - 表格选中的数据  alldata - 表格当前全部数据

+ 221 - 0
src/views/reportQuery/financeReport/addEdit.vue

@@ -0,0 +1,221 @@
+<template>
+  <el-dialog
+    v-loading="loading"
+    :title="'修改表格需求'"
+    :center="true"
+    align="left"
+    top="25vh"
+    width="600px"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+    @close="closeModel"
+  >
+    <el-card style="margin: -20px 0 0 0">
+      <el-row :gutter="10">
+        <el-col :span="24">
+          <el-form
+            ref="ruleForm"
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            label-width="90px"
+            class="demo-ruleForm"
+          >
+            <el-form-item label="业务表" prop="id">
+              <el-select
+                v-model="ruleForm.id"
+                style="width: 100%"
+                disabled
+                placeholder="请选择业务表"
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="数据时间" prop="start">
+              <period-date-picker
+                :start="ruleForm.start"
+                :end="ruleForm.end"
+                :type="type"
+                :width="'199px'"
+                :size="searchSize"
+                @timeReturned="timeReturned($event)"
+              />
+            </el-form-item>
+          </el-form>
+        </el-col>
+        <el-col :span="12" style="text-align: right">
+          <el-alert
+            style="width: 230px"
+            :closable="false"
+            :title="type==='2'?'报表会在提交后开始执行!':'报表会在明天01:00开始生成'"
+            type="warning"
+          >
+          </el-alert>
+        </el-col>
+        <el-col :span="12" style="text-align: right">
+          <el-button v-if="!isDetail" type="primary" @click="submitForm"
+            >保 存
+          </el-button>
+          <el-button @click="showModelThis = false">{{
+            isDetail ? "关 闭" : "取 消"
+          }}</el-button>
+        </el-col>
+      </el-row>
+    </el-card>
+  </el-dialog>
+</template>
+<script>
+import asyncRequest from "@/apis/service/reportQuery/financeReport/index.js";
+import resToken from "@/mixins/resToken";
+import PeriodDatePicker from "./components/PeriodDatePicker";
+export default {
+  name: "financeReport",
+  props: ["showModel", "sitem",'type'],
+  mixins: [resToken],
+  components: {
+    PeriodDatePicker,
+  },
+
+  data() {
+    const validateTime = (rule, value, callback) => {
+      if (value === "") {
+        callback(new Error("数据开始时间不能为空!"));
+      } else {
+        if (this.ruleForm.end === "") {
+          callback(new Error("数据结束时间不能为空!"));
+        } else {
+          callback();
+        }
+      }
+    };
+    return {
+      options: [],
+      loading: false,
+      title: "添加账号",
+      showModelThis: this.showModel,
+      ruleForm: {
+        start: "",
+        end: "",
+        id: "",
+      },
+      rulesThis: this.rules,
+      rules: {
+        start: [
+          {
+            required: true,
+            validator: validateTime,
+            trigger: "change",
+          },
+        ],
+        id: [
+          {
+            required: true,
+            message: "请选择业务表!",
+            trigger: "change",
+          },
+        ],
+      },
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+  methods: {
+    closeModel() {
+      console.log("closeModel!!");
+    },
+    async initForm() {
+      this.loading = true;
+      this.options = [];
+      this.rulesThis = this.rules;
+      await this.resetForm();
+      this.loading = false;
+    },
+    async timeReturned(e) {
+      if (e.startTime !== "") {
+        this.ruleForm.start = e.startTime;
+      } else {
+        this.ruleForm.start = "";
+      }
+      if (e.endTime !== "") {
+        this.ruleForm.end = e.endTime;
+      } else {
+        this.ruleForm.end = "";
+      }
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          const { start, end, id, name } = this.sitem;
+          // console.log(this.sitem);
+          this.options = [
+            {
+              value: id,
+              label: name,
+            },
+          ];
+          this.ruleForm = {
+            start: "",
+            end: "",
+            id: id || "",
+          };
+          console.log(this.ruleForm);
+        }
+      });
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          this.loading = true;
+          const model = JSON.parse(JSON.stringify(this.ruleForm));
+          let res = await asyncRequest.add(model);
+          this.loading = false;
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "需求创建成功!",
+              message: "",
+            });
+            this.showModelThis = false;
+            // 刷新
+            this.$emit("refresh");
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+  },
+};
+</script>
+
+   <style lang="scss" scoped>
+.account {
+}
+</style>

+ 463 - 0
src/views/reportQuery/financeReport/components/ExTableNew.vue

@@ -0,0 +1,463 @@
+<template>
+  <div>
+    <div class="table-header">
+      <template v-for="(item, index) in table._defaultHeader_">
+        <el-dropdown
+          v-if="item == 'setcol'"
+          placement="bottom-end"
+          trigger="click"
+          class="setcol-table-lie"
+          :hide-on-click="false"
+          :key="index"
+        >
+          <el-button size="small">列设置</el-button>
+          <el-dropdown-menu slot="dropdown" :class="'ex-table-setcol-dropdown'">
+            <template v-for="(column, index) in setColumns">
+              <el-dropdown-item
+                v-if="!column._noset_"
+                :key="'setColumns' + index"
+              >
+                <el-switch
+                  v-model="column._hidden_"
+                  :active-text="column.label"
+                  :active-value="false"
+                  :inactive-value="true"
+                ></el-switch>
+              </el-dropdown-item>
+            </template>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </template>
+      <slot
+        name="table-header"
+        :selection="tableSelection"
+        :alldata="data"
+      ></slot>
+    </div>
+    <el-table
+      ref="elTable"
+      :data="data"
+      v-bind="table"
+      :size="size"
+      v-on="$listeners"
+      @selection-change="tableSelection = $event"
+      :span-method="arraySpanMethod"
+      style="width: 100%"
+    >
+      <template v-for="(column, index) in columns">
+        <el-table-column
+          align="center"
+          v-if="!column._hidden_ && column.type && !column._slot_"
+          v-bind="column"
+          :key="index"
+          width="45px"
+        ></el-table-column>
+        <el-table-column
+        show-overflow-tooltip
+          v-else-if="!column._hidden_"
+          v-bind="column"
+          :key="index"
+        >
+          <template slot="header" slot-scope="scope">
+            <span>{{ column.label }}</span>
+            <span
+              v-if="column._screen_"
+              @click.stop="addConditionItemByCol(column, scope)"
+            >
+              <i
+                v-if="column._screen_tip_ === false"
+                :style="isHasScreenColumn(column) ? 'color:#3888e5;' : ''"
+                class="el-icon-connection"
+              />
+              <el-tooltip
+                v-else
+                 
+                :effect="column._screen_tip_effect_ || 'dark'"
+                :content="column._screen_tip_ || '筛选'"
+                :placement="column._screen_tip_placement_ || 'top'"
+              >
+                <i
+                  :style="isHasScreenColumn(column) ? 'color:#3888e5;' : ''"
+                  class="el-icon-connection"
+                />
+              </el-tooltip>
+            </span>
+          </template>
+          <slot
+            v-if="column._slot_"
+            slot-scope="scope"
+            :name="column._slot_"
+            :scope="scope"
+          ></slot>
+          <template v-else-if="column._render_" slot-scope="scope">
+            <ex-slot
+              :column="column"
+              :render="column._render_"
+              :scope="scope"
+            ></ex-slot>
+          </template>
+          <template v-else slot-scope="scope">
+            <span>{{
+              column._format_
+                ? column._format_(scope.row)
+                : getObjPrototype(scope.row, column.prop)
+            }}</span>
+          </template>
+        </el-table-column>
+      </template>
+    </el-table>
+    <!-- <el-pagination
+      v-if="page !== false && data && data.length > 0"
+      :current-page="page.curr"
+      :page-sizes="[10, 20, 50, 100]"
+      :total="page.total"
+      layout="total, sizes, prev, pager, next, jumper"
+      style="text-align: right"
+      class="fu-page"
+      @current-change="$emit('page-curr-change', $event)"
+      @size-change="$emit('page-size-change', $event)"
+    />
+  -->
+    <div
+      v-if="page !== false && data && data.length > 0"
+      class="Pagination"
+      style="text-align: right; margin-top: 10px"
+    >
+      <el-pagination
+        :current-page="page.curr"
+        :page-sizes="[15, 50, 100]"
+        :page-size="page.size"
+        :size="searchSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"
+        @size-change="$emit('page-size-change', $event)"
+        @current-change="$emit('page-curr-change', $event)"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+import Sortable from "sortablejs";
+export default {
+  name: "ex-table",
+  components: {
+    "ex-slot": {
+      functional: true,
+      props: {
+        render: Function,
+        scope: {
+          type: Object,
+          default: null,
+        },
+        column: {
+          type: Object,
+          default: null,
+        },
+      },
+      render: (h, data) => {
+        if (data.props.column) data.props.scope.column = data.props.column;
+        return data.props.render(h, data.props.scope);
+      },
+    },
+  },
+  props: {
+    /**
+     * el-table 属性集合
+     * 自定义属性:
+     * @param {Array} _defaultHeader_  : 默认的表格头部,支持['setcol', 'screen'] setcol-列设置 screen-筛选
+     * 可使用插槽扩展表格头部:
+     * table-header - 具名插槽
+     * slotProps:selection - 表格选中的数据  alldata - 表格当前全部数据
+     * <template #table-header="slotProps">
+     *   <el-button size="small" @click="click(slotProps)">扩展1</el-button>
+     * </template>
+     */
+    table: {
+      type: Object,
+      default: () => {},
+    },
+    // el-table 表格数据 对应data字段
+    data: {
+      type: Array,
+      default: () => [],
+    },
+    /**
+     * el-table-column 表格列属性集合
+     * 自定义属性:
+     * @param {String}       _filter_       : 是否不允许设置列
+     * @param {Boolean}       _noset_        : 是否不允许设置列
+     * @param {Boolean}        _screen_      : 是否允许筛选
+     * @param {Boolean}        _hidden_      : 是否隐藏列
+     * @param {String/Boolean} _screen_tip_  : 筛选按钮提示信息,为false不提示
+     * @param {String} _screen_tip_effect_   : 筛选按钮提示信息主题,dark/light
+     * @param {String} _screen_tip_placement_: 筛选按钮提示信息位置,top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end
+     * @param {Array}          _keys_        : 支持的筛选key
+     * @param {Array}      _select_options_  : 若需支持包含select的key,value的备选数据,示例:{_select_options_: [{id:'', label:''},...]}
+     * @param {Array}  _select_options_end_  : 若需支持包含select的key,value_end的备选数据,默认使用_select_options_,示例:{_select_options_: [{id:'', label:''},...]}
+     * @param {Array}          _keys_        : 支持的筛选key
+     * @param {String}         _slot_        : 使用具名插槽时的名称
+     * @param {Function}       _format_      : 数据格式化函数,支持返回html
+     * @param {Function}       _render_      : 自定义列,采用vue中的render函数,示例: { _render_:(h, scope) => { return h(...) } }
+     */
+    columns: {
+      type: Array,
+      default: () => [],
+    },
+    /**
+     * el-pagination
+     * @param {Boolean} page 是否开启表格分页,若不传或传false则不开启
+     * @param {Object} page {
+     *   size: '10'
+     *   total: '100'
+     *   curr: '1'
+     * }
+     * Event:
+     * page-curr-change  分页当前页改变
+     * page-size-change  分页大小改变
+     */
+    page: {
+      type: [Boolean, Object],
+      default: false,
+    },
+    /**
+     * 筛选条件集合
+     */
+    conditions: {
+      type: Array,
+      default: () => [],
+    },
+    /**
+     * 是否允许拖拽行
+     */
+    isRowDrop: {
+      type: Boolean,
+      default: false,
+    },
+    /**
+     * 是否允许拖拽列
+     */
+    isColDrop: {
+      type: Boolean,
+      default: false,
+    },
+    /**
+     * 表格大小
+     */
+    size: {
+      type: String,
+      default: "mini",
+    },
+  },
+  computed: {
+    // 允许筛选的列
+    screenColumns() {
+      return this.columns.filter((item) => item._screen_ === true);
+    },
+    // 允许设置的列
+    setColumns() {
+      return this.columns.filter((item) => !item._noset_);
+    },
+    // 筛选条件是否包含当前列
+    isHasScreenColumn() {
+      return function (col) {
+        return this.conditions.some((item) => item.prop === col.prop);
+      };
+    },
+  },
+  data() {
+    return {
+      // 表格选中项
+      tableSelection: [],
+    };
+  },
+   computed: {
+    page_curr() {
+      return this.page.curr;
+    },
+    page_size() {
+      return this.page.size;
+    },
+    page_total() {
+      return this.page.total;
+    },
+  },
+  watch: {
+    page_curr: function (val) {
+      this.page.curr = val;
+    },
+    page_size: function (val) {
+      this.page.size = val;
+    },
+    page_total: function (val) {
+      this.page.total = val;
+    },
+  },
+  mounted() {
+    // 拖拽绑定
+    this.rowDrop();
+    this.columnDrop();
+  },
+  directives: {
+    // v-drap  可拖拽指令
+    drap: {
+      inserted: function (element, binding) {
+        element.onmousedown = function (e) {
+          let el = binding.modifiers.parent ? element.parentNode : element,
+            bodyWidth = document.body.offsetWidth,
+            bodyHeight = document.body.offsetHeight,
+            elWidth = el.offsetWidth,
+            elHeight = el.offsetHeight;
+          // 开始拖动,记录左上角坐标点
+          let disX = e.clientX - el.offsetLeft;
+          let disY = e.clientY - el.offsetTop;
+          document.onmousemove = function (e) {
+            // 拖动中,修改dom的左上角坐标点
+            let l = e.clientX - disX;
+            let t = e.clientY - disY;
+            if (binding.modifiers.limit) {
+              l = l < 0 ? 0 : l;
+              t = t < 0 ? 0 : t;
+              l = l > bodyWidth - elWidth ? bodyWidth - elWidth : l;
+              t = t > bodyHeight - elHeight ? bodyHeight - elHeight : t;
+            }
+            el.style.left = l + "px";
+            el.style.top = t + "px";
+          };
+          document.onmouseup = function () {
+            // 结束拖动
+            document.onmousemove = null;
+          };
+        };
+      },
+    },
+  },
+  methods: {
+    //
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+      // if (rowIndex % 2 === 0) {
+      //   if (columnIndex === 0) {
+      //     return [1, 2];
+      //   } else if (columnIndex === 1) {
+      //     return [0, 0];
+      //   }
+      // }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+        if (rowIndex % 2 === 0) {
+          return {
+            rowspan: 2,
+            colspan: 1,
+          };
+        } else {
+          return {
+            rowspan: 0,
+            colspan: 0,
+          };
+        }
+      }
+    },
+
+    //行拖拽
+    rowDrop() {
+      const tbody = document.querySelector(
+        ".el-table__body-wrapper > table > tbody"
+      );
+      Sortable.create(tbody, {
+        disabled: !this.isRowDrop,
+        ghostClass: "sortable-ghost",
+        animation: 180,
+        delay: 0,
+        onEndevt: (evt) => {
+          const currItem = this.data.splice(evt.oldIndex, 1)[0];
+          this.data.splice(evt.newIndex, 0, currItem);
+        },
+      });
+    },
+    //列拖拽
+    columnDrop() {
+      const wrapperTr = document.querySelector(".el-table__header-wrapper tr");
+      Sortable.create(wrapperTr, {
+        disabled: !this.isColDrop,
+        ghostClass: "sortable-ghost",
+        animation: 180,
+        delay: 0,
+        onEnd: (evt) => {
+          const currItem = this.columns.splice(evt.oldIndex, 1)[0];
+          this.columns.splice(evt.newIndex, 0, currItem);
+        },
+      });
+    },
+    // 获取对象的属性
+    getObjPrototype(o, a) {
+      let fn = Function;
+      return new fn("obj", `return obj.${a}`)(o);
+    },
+    /** 表格方法 传递给el-table,后续有需要可继续增加 **/
+    // 对 Table 进行重新布局。当 Table 或其祖先元素由隐藏切换为显示时,可能需要调用此方法
+    doLayout(...arg) {
+      this.$refs.elTable.doLayout(...arg);
+    },
+    // 用于多选表格,清空用户的选择
+    clearSelection(...arg) {
+      this.$refs.elTable.clearSelection(...arg);
+    },
+    // 用于多选表格,切换某一行的选中状态
+    toggleRowSelection(...arg) {
+      this.$refs.elTable.toggleRowSelection(...arg);
+    },
+    // 用于多选表格,切换所有行的选中状态
+    toggleAllSelection(...arg) {
+      this.$refs.elTable.toggleAllSelection(...arg);
+    },
+    // 用于单选表格,设定某一行为选中行
+    setCurrentRow(...arg) {
+      this.$refs.elTable.setCurrentRow(...arg);
+    },
+    // 用于可展开表格与树形表格,切换某一行的展开状态,如果使用了第二个参数,则是设置这一行展开与否(expanded 为 true 则展开)
+    toggleRowExpansion(...arg) {
+      this.$refs.elTable.toggleRowExpansion(...arg);
+    },
+  },
+};
+</script>
+
+<style lang="css">
+.el-switch__core {
+  flex-shrink: 0;
+}
+.el-switch,
+.el-switch__label {
+  height: auto;
+}
+
+.ex-table-setcol-dropdown {
+  max-width: 180px;
+  max-height: 280px;
+  overflow-y: auto;
+}
+</style>
+
+<style lang="scss" scoped>
+.table-header {
+  display: flex;
+  position: relative;
+  display: -webkit-flex;
+  // background-color: #f5f5f5;
+  padding: 0 0;
+  .setcol-table-lie{
+    position: absolute;
+    top:0;
+    left:0;
+    z-index: 7;
+  }
+}
+.table-header > * {
+  margin-top: 10px;
+  margin-bottom: 12px;
+}
+// .table-header :nth-child(n + 2) {
+//   margin-left: 10px;
+// }
+</style>

+ 149 - 0
src/views/reportQuery/financeReport/components/PeriodDatePicker.vue

@@ -0,0 +1,149 @@
+<template>
+  <div class="fl time">
+    <el-date-picker
+      v-model="startTime"
+      style="margin: 0"
+      class="date-picker"
+      :type="timeType || 'date'"
+      :size="size"
+      :style="{ width: width }"
+      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="timeType || 'date'"
+      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", "timeType"],
+  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>

+ 278 - 0
src/views/reportQuery/financeReport/history-data.vue

@@ -0,0 +1,278 @@
+<template>
+  <div class="pre-export">
+    <ex-table
+      style="margin-top: -10px"
+      v-loading="loading"
+      :table="table"
+      :data="tableData"
+      :columns="columns"
+      :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();
+      "
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 0 80px">
+            <el-col :span="24">
+              <el-col :span="12" style="width: 355px">
+                <el-alert
+                  :closable="false"
+                  title="申请导出后,文件会在几分钟后生成!"
+                  type="warning"
+                >
+                </el-alert>
+              </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>
+          </el-row>
+        </div>
+      </template>
+      <template #status="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="
+            (statusOptions.find((item) => item.id == scope.row.status) || {})
+              .type || ''
+          "
+          v-text="
+            (statusOptions.find((item) => item.id == scope.row.status) || {})
+              .label || '--'
+          "
+        ></el-tag>
+      </template>
+      <template #operation="{ scope }">
+        <el-tooltip
+          effect="dark"
+          content="申请导出"
+          placement="top"
+          v-if="
+            scope.row.status !== '1'
+          "
+        >
+          <i class="el-icon-thumb tb-icon" @click="setStatus(scope.row.id)"></i>
+        </el-tooltip>
+        <el-tooltip
+          v-if="scope.row.status == '2'"
+          effect="dark"
+          content="导出"
+          placement="top"
+        >
+          <i
+            class="el-icon-download tb-icon"
+            @click="batchExport(scope.row.down_url)"
+          ></i>
+        </el-tooltip>
+      </template>
+    </ex-table>
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import asyncRequest from "@/apis/service/reportQuery/financeReport/index.js";
+import ExTable from "./components/ExTableNew.vue";
+import { mapGetters } from "vuex";
+import urlConfig from "@/apis/url-config";
+import resToken from "@/mixins/resToken";
+export default {
+  name: "Account",
+  components: {
+    ExTable,
+  },
+  mixins: [mixinPage, resToken],
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "financeReport"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      fileUrl: urlConfig.testURL,
+      // 状态
+      statusOptions: [
+        { id: "0", label: "待申请", type: "info" },
+        { id: "1", label: "系统处理中", type: "warning" },
+        { id: "2", label: "已完成", type: "success" },
+        { id: "3", label: "导出失败", type: "danger" },
+      ],
+      loading: true,
+      showModel: false,
+      sitem: null,
+      parmValue: {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: [
+        {
+          prop: "name",
+          label: "业务表名称",
+          "min-width":"145px"
+        },
+        //    {
+        //   prop: "apply_name",
+        //   label: "申请人",
+        //   width:"80px"
+        // },
+        {
+          prop: "status",
+          label: "状态",
+          _slot_: "status",
+          "min-width":"100px"
+        },
+        
+        {
+          prop: "remark",
+          label: "下载反馈备注",
+          "min-width":"145px"
+        },
+
+        {
+          prop: "expiretime",
+          label: "文件过期时间",
+          "width":"145px"
+        },
+        {
+          prop: "updatetime",
+          label: "更新时间",
+          "width":"145px"
+        },
+        {
+          prop: "addtime",
+          label: "创建时间",
+          "width":"145px"
+        },
+        {
+          prop: "",
+          label: "操作",
+          fixed: "right",
+          width: "80px",
+          _slot_: "operation",
+        },
+      ],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+  methods: {
+    restSearch() {
+      this.parmValue = {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      this.searchList();
+    },
+    openModal(sitem) {
+      this.showModel = true;
+      this.sitem = sitem;
+    },
+
+    batchExport(content) {
+      if (!this.loading) {
+        this.loading = true;
+        let aEle = document.createElement("a"); // 创建a标签
+        // aEle.download = fileName; // 设置下载文件的文件名
+        aEle.href = this.fileUrl + content; // content为后台返回的下载地址
+        aEle.click(); // 设置点击事件
+        // document.body.removeChild(aEle); //下载完成移除元素
+        this.$message.success(`导出成功!`);
+        setTimeout(() => {
+          this.loading = false;
+        }, 500);
+      }
+    },
+    async setStatus(id) {
+      if (!this.loading) {
+        this.loading = true;
+        const model = {
+          id: id,
+        };
+        const res = await asyncRequest.download(model);
+      
+        if (res && res.code === 0) {
+          this.$notify.success({
+            title: "申请成功,请等待系统执行完成!",
+            message: "",
+          });
+          await this.searchList();
+        } else if (res && res.code >= 100 && res.code <= 104) {
+          await this.logout();
+        } else {
+          this.$message.warning(res.message);
+        }
+          this.loading = false;
+      }
+    },
+    async searchList() {
+      this.loading = true;
+      const res = await asyncRequest.hlist(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.tableData.forEach((v) => {
+          if (v.status !== "3") {
+            v.remark = "";
+          }
+        });
+        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.loading = false;
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.account {
+}
+</style>

+ 69 - 7
src/views/reportQuery/financeReport/index.vue

@@ -1,15 +1,77 @@
 <template>
-    <div>
-        333财务
+  <div class="financeReport pagePadding">
+    <div
+      v-loading="loading"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <el-tabs type="border-card" v-model="activeName">
+        <!-- <el-tab-pane label="实时导出" name="1">
+          <real-time-export />
+        </el-tab-pane> -->
+         <el-tab-pane label="实时导出-新" name="1">
+          <real-time-export-new />
+        </el-tab-pane>
+        <!-- <el-tab-pane label="预约导出" name="3">
+          <pre-export />
+        </el-tab-pane> -->
+
+
+        <!-- <el-tab-pane label="往年数据导出" name="4">
+          <history-data />
+        </el-tab-pane> -->
+      </el-tabs>
     </div>
+    <no-auth v-else></no-auth>
+  </div>
 </template>
-
 <script>
+import resToken from "@/mixins/resToken";
+import urlConfig from "@/apis/url-config";
+import realTimeExport from "./real-time-export";
+import preExport from "./pre-export";
+import historyData from "./history-data";
+import realTimeExportNew from "./real-time-export-new";
+import { mapGetters } from "vuex";
 export default {
-
-}
+  name: "financeReport",
+  mixins: [resToken],
+  components: {
+    realTimeExport,
+    preExport,
+    historyData,
+    realTimeExportNew
+  },
+  computed: {
+    //组件SIZE设置
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    //组件SIZE设置
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "financeReport"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      activeName: "1",
+      loading: false,
+      fileUrl: urlConfig.baseURL,
+    };
+  },
+  mounted() {
+    this.activeName = "1";
+  },
+  methods: {},
+};
 </script>
 
 <style lang="scss" scoped>
-
-</style>
+.financeReport {
+}
+</style>

+ 180 - 0
src/views/reportQuery/financeReport/pre-export.vue

@@ -0,0 +1,180 @@
+<template>
+  <div class="pre-export">
+    <el-row style="padding: 0 0 14px 0">
+      <el-col :span="12" style="width: 355px">
+        <el-alert
+          :closable="false"
+          title="新建的需求业务报表,会在隔天01:00开始生成文件!"
+          type="warning"
+        >
+        </el-alert>
+      </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-table
+      :data="tableData"
+      border
+      v-loading="loading"
+      :size="size"
+      style="width: 100%"
+    >
+      <el-table-column  prop="name" label="业务表名称" min-width="140"/>
+      <el-table-column prop="start" label="数据开始时间" min-width="140"/>
+      <el-table-column prop="end" label="数据结束时间" min-width="140"/>
+      <el-table-column prop="apply_name" label="申请人" min-width="70"/>
+      <el-table-column prop="status" label="状态" min-width="70">
+          <template slot-scope="scope">
+               <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.status == '2' ? 'success' : scope.row.status == '1'?'warning':'info'"
+          v-text="
+            (statusOptions.find((item) => item.id == scope.row.status) || {})
+              .label || '--'
+          "
+        ></el-tag>
+          </template>
+      </el-table-column>
+      <el-table-column prop="expiretime" label="文件过期时间" min-width="140"/>
+      <el-table-column prop="updatetime" label="创建时间" min-width="140"/>
+      <el-table-column fixed="right" label="操作" width="82">
+        <template slot-scope="scope">
+          <el-tooltip
+            effect="dark"
+            content="编辑"
+            placement="top"
+          >
+            <i class="el-icon-edit tb-icon" @click="openModal(scope.row)"></i>
+          </el-tooltip>
+          <el-tooltip
+            effect="dark"
+            content="导出"
+            placement="top"
+            v-if="
+              scope.row.status == '2'
+            "
+          >
+            <i
+              class="el-icon-download tb-icon"
+              @click="batchExport(scope.row.down_url)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <add-edit
+      :sitem="sitem"
+      :show-model="showModel"
+      @refresh="searchList"
+      :type="'1'"
+      @cancel="showModel = false"
+    />
+  </div>
+</template>
+<script>
+import asyncRequest from "@/apis/service/reportQuery/financeReport/index.js";
+import addEdit from "./addEdit";
+import { mapGetters } from "vuex";
+import urlConfig from "@/apis/url-config";
+import resToken from "@/mixins/resToken";
+export default {
+  name: "Account",
+  components: {
+    addEdit,
+  },
+  mixins: [ resToken],
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "financeReport"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      fileUrl: urlConfig.baseURL,
+      // 状态
+      statusOptions: [
+        { id: "0", label: "待创建" },
+        { id: "1", label: "待执行" },
+        { id: "2", label: "已完成" },
+      ],
+      loading: true,
+      showModel: false,
+      sitem: null,
+      parmValue: {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      // 表格 - 数据
+      tableData: [],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+  methods: {
+    restSearch() {
+      this.parmValue = {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      this.searchList();
+    },
+    openModal(sitem) {
+      this.showModel = true;
+      this.sitem = sitem;
+    },
+
+    batchExport(content) {
+      if (!this.loading) {
+        this.loading = true;
+        let aEle = document.createElement("a"); // 创建a标签
+        aEle.href = this.fileUrl + content; // content为后台返回的下载地址
+        aEle.click(); // 设置点击事件
+        this.$message.success(`导出成功!`);
+        setTimeout(() => {
+          this.loading = false;
+        }, 500);
+      }
+    },
+    async searchList() {
+      this.loading = true;
+      const res = await asyncRequest.exportList(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.account {
+}
+</style>

+ 181 - 0
src/views/reportQuery/financeReport/real-time-export-new.vue

@@ -0,0 +1,181 @@
+<template>
+  <div class="pre-export">
+    <el-row style="padding: 0 0 14px 0">
+      <el-col :span="12" style="width: 355px">
+        <el-alert
+          :closable="false"
+          title="申请导出后,文件会在几分钟后生成!"
+          type="warning"
+        >
+        </el-alert>
+      </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-table
+      :data="tableData"
+      border
+      v-loading="loading"
+      :size="size"
+      style="width: 100%"
+    >
+      <el-table-column  prop="name" label="业务表名称" min-width="140"/>
+      <el-table-column prop="start" label="数据开始时间" min-width="140"/>
+      <el-table-column prop="end" label="数据结束时间" min-width="140"/>
+      <el-table-column prop="apply_name" label="申请人" min-width="70"/>
+      <el-table-column prop="status" label="状态" min-width="70">
+          <template slot-scope="scope">
+               <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.status == '2' ? 'success' : scope.row.status == '1'?'warning':'info'"
+          v-text="
+            (statusOptions.find((item) => item.id == scope.row.status) || {})
+              .label || '--'
+          "
+        ></el-tag>
+          </template>
+      </el-table-column>
+      <el-table-column prop="updatetime" label="状态更新时间" min-width="140"/>
+      <el-table-column prop="addtime" label="创建时间" min-width="140"/>
+      <el-table-column fixed="right" label="操作" width="82">
+        <template slot-scope="scope">
+          <el-tooltip
+            effect="dark"
+            content="编辑"
+            placement="top"
+          >
+            <i class="el-icon-edit tb-icon" @click="openModal(scope.row)"></i>
+          </el-tooltip>
+          <el-tooltip
+            effect="dark"
+            content="导出"
+            placement="top"
+            v-if="
+ scope.row.status == '2'
+            "
+          >
+            <i
+              class="el-icon-download tb-icon"
+              @click="batchExport(scope.row.down_url)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <add-edit
+      :sitem="sitem"
+      :show-model="showModel"
+      :type="'2'"
+      @refresh="searchList"
+      @cancel="showModel = false"
+    />
+  </div>
+</template>
+<script>
+import asyncRequest from "@/apis/service/reportQuery/financeReport/index.js";
+import addEdit from "./addEdit";
+import { mapGetters } from "vuex";
+import urlConfig from "@/apis/url-config";
+import resToken from "@/mixins/resToken";
+export default {
+  name: "Account",
+  components: {
+    addEdit,
+  },
+  mixins: [ resToken],
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "financeReport"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      fileUrl: urlConfig.baseURL,
+      // 状态
+      statusOptions: [
+        { id: "0", label: "待创建" },
+        { id: "1", label: "执行中" },
+        { id: "2", label: "已完成" },
+      ],
+      loading: true,
+      showModel: false,
+      sitem: null,
+      parmValue: {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      },
+      // 表格 - 数据
+      tableData: [],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+  methods: {
+    restSearch() {
+      this.parmValue = {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+      };
+      this.searchList();
+    },
+    openModal(sitem) {
+      this.showModel = true;
+      this.sitem = sitem;
+    },
+
+    batchExport(content) {
+      if (!this.loading) {
+        this.loading = true;
+        let aEle = document.createElement("a"); // 创建a标签
+        aEle.href = this.fileUrl + content; // content为后台返回的下载地址
+        aEle.click(); // 设置点击事件
+        this.$message.success(`导出成功!`);
+        setTimeout(() => {
+          this.loading = false;
+        }, 500);
+      }
+    },
+    async searchList() {
+      this.loading = true;
+      const res = await asyncRequest.realNewList(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+           this.tableData = res.data.list;
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.account {
+}
+</style>

+ 334 - 0
src/views/reportQuery/financeReport/real-time-export.vue

@@ -0,0 +1,334 @@
+<template>
+  <div class="real-time-export" v-loading="loading">
+    <div class="financeReport-ul-box">
+      <ul class="financeReport-ul clearfix">
+        <li v-for="item in options" :key="item.value">
+          <div class="label">{{ item.label }}:</div>
+          <div class="time">
+            <period-date-picker
+              :start="item.start"
+              :end="item.end"
+              :type="3"
+              :width="'135px'"
+              :size="searchSize"
+              @timeReturned="timeReturned($event, item.value)"
+            />
+          </div>
+          <div class="operation">
+            <el-button
+              type="primary"
+              class="fr"
+              icon="el-icon-download"
+              style="margin-left: 15px"
+              :size="searchSize"
+
+              @click="batchExport(item.value)"
+              >导出</el-button
+            >
+            <el-button
+              type="warning"
+              class="fr"
+              :size="searchSize"
+              @click="restSearch(item.value)"
+            >
+              重置
+            </el-button>
+          </div>
+        </li>
+      </ul>
+    </div>
+  </div>
+</template>
+<script>
+import resToken from "@/mixins/resToken";
+import urlConfig from "@/apis/url-config";
+import PeriodDatePicker from "./components/PeriodDatePicker";
+import { mapGetters } from "vuex";
+export default {
+  name: "financeReport",
+  mixins: [resToken],
+  components: {
+    PeriodDatePicker,
+  },
+  computed: {
+    //组件SIZE设置
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    //组件SIZE设置
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "financeReport"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      options: [
+        // {
+        //   value: "13",
+        //   label: "出入库明细表",
+        //   start: "",
+        //   end: "",
+        //   url: "outinreport",
+        // },
+        // {
+        //   value: "14",
+        //   label: "收入明细表",
+        //   start: "",
+        //   end: "",
+        //   url: "inforeport",
+        // },
+        // {
+        //   value: "15",
+        //   label: "回票公司明细表",
+        //   start: "",
+        //   end: "",
+        //   url: "invcomreport",
+        // },
+        // {
+        //   value: "16",
+        //   label: "回票明细表",
+        //   start: "",
+        //   end: "",
+        //   url: "invreport",
+        // },
+        // {
+        //   value: "11",
+        //   label: "应收账款账龄表",
+        //   start: "",
+        //   end: "",
+        //   url: "downqrdpay",
+        // },
+        // {
+        //   value: "12",
+        //   label: "应收账款开票汇总表",
+        //   start: "",
+        //   end: "",
+        //   url: "downqrdinv",
+        // },
+
+        // {
+        //   value: "6",
+        //   label: "应收台账",
+        //   start: "",
+        //   end: "",
+        //   url: "Admin/downreportcwtz",
+        // },
+        // {
+        //   value: "1",
+        //   label: "确认单台账",
+        //   start: "",
+        //   end: "",
+        //   url: "Admin/downreportqrdtz",
+        // },
+        // {
+        //   value: "2",
+        //   label: "确认单明细",
+        //   start: "",
+        //   end: "",
+        //   url: "Admin/downreportqrd",
+        // },
+        {
+          value: "16",
+          label: "经营分析报表",
+          start: "",
+          end: "",
+          url: "Admin/getjingfen",
+        },
+        // {
+        //   value: "3",
+        //   label: "采购单台账",
+        //   start: "",
+        //   end: "",
+        //   url: "Admin/downreportcgdtz",
+        // },
+        // {
+        //   value: "4",
+        //   label: "采购单明细",
+        //   start: "",
+        //   end: "",
+        //   url: "Admin/downreportcgd",
+        // },
+
+        // {
+        //   value: "5",
+        //   label: "退货台账",
+        //   start: "",
+        //   end: "",
+        //   url: "Admin/downreportthtz",
+        // },
+        // {
+        //   value: "7",
+        //   label: "核算确认单",
+        //   start: "",
+        //   end: "",
+        //   url: "downqrd",
+        // },
+        // {
+        //   value: "8",
+        //   label: "核算采购单",
+        //   start: "",
+        //   end: "",
+        //   url: "downcgd",
+        // },
+        // {
+        //   value: "9",
+        //   label: "业绩确认采购单",
+        //   start: "",
+        //   end: "",
+        //   url: "downqrdtz",
+        // },
+        // {
+        //   value: "10",
+        //   label: "业绩退货单",
+        //   start: "",
+        //   end: "",
+        //   url: "downth",
+        // },
+      ],
+      loading: false,
+      fileUrl: urlConfig.baseURL,
+    };
+  },
+  methods: {
+    restSearch(type) {
+      let index = this.resType(type);
+      if (index !== -1) {
+        this.options[index].start = "";
+        this.options[index].end = "";
+      }
+    },
+
+    async timeReturned(e, type) {
+      let index = this.resType(type);
+      if (index !== -1) {
+        if (e.startTime !== "") {
+          this.options[index].start = e.startTime;
+        } else {
+          this.options[index].start = "";
+        }
+        if (e.endTime !== "") {
+          this.options[index].end = e.endTime;
+        } else {
+          this.options[index].end = "";
+        }
+      }
+    },
+
+    resType(value) {
+      return this.options.findIndex((v1) => v1.value === value);
+    },
+    /**
+     * 批量导出开票信息
+     * * @param {Array} selection //选中的对账编码
+     */
+    async batchExport(type) {
+      let index = this.resType(type);
+      if (index !== -1) {
+        let url = this.options[index].url;
+        let title = this.options[index].label;
+        let model = {
+          start: this.options[index].start,
+          end: this.options[index].end,
+        };
+        if (!this.loading) {
+          if (model.start === "" || model.end === "") {
+            this.$message.warning("请选择时间区间!");
+            return;
+          }
+          this.loading = true;
+          let httpType = `aplication/zip`;
+          axios({
+            method: "post",
+            url: this.fileUrl + url,
+            responseType: "blob",
+            data: model,
+            headers: {
+              Accept: httpType,
+            },
+          })
+            .then((res) => {
+              if (res && res.status == 200 && res.data) {
+                let blob = new Blob([res.data], {
+                  type: httpType,
+                });
+                let url = window.URL.createObjectURL(blob);
+                let aLink = document.createElement("a");
+                aLink.style.display = "none";
+                aLink.href = url;
+                aLink.setAttribute(
+                  "download",
+                  `${model.start}至${model.end}${title}.zip`
+                );
+                document.body.appendChild(aLink);
+                aLink.click();
+                document.body.removeChild(aLink); //下载完成移除元素
+                window.URL.revokeObjectURL(url); //释放掉blob对象
+
+                this.$message.success(title + `信息导出成功!`);
+                setTimeout(() => {
+                  this.loading = false;
+                }, 500);
+              } else {
+                this.$message.error("时间区间过长,请修改后再试!");
+                setTimeout(() => {
+                  this.loading = false;
+                }, 500);
+              }
+            })
+            .catch((error) => {
+               this.$message.error("时间区间过长,请修改后再试!");
+              this.loading = false;
+            });
+        }
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.real-time-export {
+  .financeReport-ul-box {
+    width: 100%;
+    padding: 0 10% 0 4%;
+    text-align: center;
+
+    .financeReport-ul {
+      width: 680px;
+      display: block;
+      box-sizing: border-box;
+      text-align: left;
+      margin: 0 auto;
+      li {
+        float: left;
+        width: 100%;
+        display: block;
+        box-sizing: border-box;
+        padding: 10px 0;
+        .label {
+          width: 180px;
+          float: left;
+          height: 32px;
+          text-align: right;
+          line-height: 32px;
+          padding: 0 15px 0 0;
+        }
+        .time {
+          float: left;
+          width: 300px;
+        }
+        .operation {
+          float: left;
+          width: 160px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 3 - 3
src/views/reportQuery/purchaseReport/components/table1.vue

@@ -56,7 +56,7 @@
       
     </el-table>
     <el-pagination
-        :current-page="pageInfo.curr"
+        :current-page.sync="pageInfo.curr"
         :page-sizes="[15, 50, 100]"
         :page-size="pageInfo.size"
         :size="searchSize"
@@ -128,13 +128,13 @@ export default {
      //分页集合
     handleSizeChange(val){
       this.parmValue.size = val;
-      this.pageInfo.total = val;
+      // this.pageInfo.total = val;
       this.parmValue.page = 1;
       this.searchList() 
     },
     handleCurrentChange(val){
       this.parmValue.page = val;
-      this.pageInfo.total = val;
+      // this.pageInfo.total = val;
 
       this.searchList()
     },

+ 0 - 341
src/views/reportQuery/purchaseReport/components/table15.vue

@@ -1,341 +0,0 @@
-<template>
-    <div>
-      <ex-table
-        v-loading="loading"
-        :table="table"
-        :data="tableData"
-        :columns="table15"
-        :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: 383px;">
-                <periodDatePickerActive
-                      :start="parmValue.start_date"
-                      :end="parmValue.end_date"
-                      :placeholder="'出入库'"
-                      :width="'175px'"
-                      :size="searchSize"
-                      @timeReturned="time"
-                    />
-              </el-col>  
-              <el-col :span="6" style="width: 150px">
-                <el-select
-                  :size="searchSize"
-                  v-model="parmValue.select"
-                  filterable
-                  clearable
-                  placeholder="出入库类型"
-                  style="width: 100%"
-                  @change="
-                    pageInfo.curr = 1;
-                    parmValue.page = 1;
-                    searchList();
-                  "
-                >
-                  <el-option label="假的" value="1"></el-option>
-                    <el-option label="假的" value="2"></el-option>
-                    <el-option label="假的" value="3"></el-option>
-                    <el-option label="假的" value="4"></el-option>
-                    <el-option label="假的" value="5"></el-option>
-                    <el-option label="假的" value="6"></el-option>
-                    <el-option label="假的" value="7"></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="padding: 10px 0 0 0" gutter="10">
-              <el-col :span="6" style="width: 240px">
-                <el-input
-                  clearable
-                  placeholder="产品名称"
-                  v-model="parmValue.xiugai1"
-                  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.xiugai2"
-                  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-edit tb-icon"></i>
-            </el-tooltip>
-
-            <el-tooltip effect="dark" content="下载" placement="top">
-                <i class="el-icon-download tb-icon"></i>
-            </el-tooltip>
-        </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/purchaseReport";
-import periodDatePickerActive from "../period-date-picker/main.vue";
-import { table15} 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: {
-          select:"",
-        xiugai1:"", //咨询订单号
-        xiugai2:"",
-        start_date: "", //起始时间
-        end_date: "", // 结束时间
-        page: 1, // 页码
-        size: 15, // 每页显示条数
-       
-      },
-      // 表格 - 数据集合
-      tableData: [],
-      // 表格 - 参数
-      table: {
-        stripe: true,
-        border: true,
-        _defaultHeader_: ["setcol"],
-      },
-      // 表格 - 分页
-      pageInfo: {
-        size: 15,
-        curr: 1,
-        total: 0,
-      },
-      // 表格表头 - 列参数
-      table15: table15,
-    };
-  },
-  mounted() {
-    this.searchList();
-  },
-
-  methods: {
-    //初始化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.list(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.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 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/reportreturnexport",
-          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;
-}
-</style>
-   

+ 3 - 3
src/views/reportQuery/purchaseReport/components/table2.vue

@@ -56,7 +56,7 @@
       
     </el-table>
     <el-pagination
-        :current-page="pageInfo.curr"
+        :current-page.sync="pageInfo.curr"
         :page-sizes="[15, 50, 100]"
         :page-size="pageInfo.size"
         :size="searchSize"
@@ -129,12 +129,12 @@ export default {
     handleSizeChange(val){
       this.parmValue.size = val;
       this.parmValue.page = 1;
-      this.pageInfo.total = val;
+      // this.pageInfo.total = val;
 
       this.searchList() 
     },
     handleCurrentChange(val){
-      this.pageInfo.total = val;
+      // this.pageInfo.total = val;
       this.parmValue.page = val;
       this.searchList()
     },

+ 8 - 4
src/views/reportQuery/purchaseReport/components/table3.vue

@@ -56,7 +56,7 @@
       
     </el-table>
     <el-pagination
-        :current-page="pageInfo.curr"
+        :current-page.sync="pageInfo.curr"
         :page-sizes="[15, 50, 100]"
         :page-size="pageInfo.size"
         :size="searchSize"
@@ -129,13 +129,17 @@ export default {
     handleSizeChange(val){
       this.parmValue.size = val;
       this.parmValue.page = 1;
-      this.pageInfo.total = val;
-
+      // this.pageInfo.total = val;
+      // console.log(val,"多少条")
       this.searchList() 
     },
     handleCurrentChange(val){
-      this.pageInfo.total = val;
       this.parmValue.page = val;
+      // console.log(val,"当前页")
+
+      // this.pageInfo.page = 1;
+      // this.pageInfo.total = 1;
+
       this.searchList()
     },
      //合并方法

+ 3 - 3
src/views/reportQuery/purchaseReport/components/table4.vue

@@ -56,7 +56,7 @@
       
     </el-table>
     <el-pagination
-        :current-page="pageInfo.curr"
+        :current-page.sync="pageInfo.curr"
         :page-sizes="[15, 50, 100]"
         :page-size="pageInfo.size"
         :size="searchSize"
@@ -127,13 +127,13 @@ export default {
   methods: {
     //分页集合
     handleSizeChange(val){
-      this.pageInfo.total = val;
+      // this.pageInfo.total = val;
       this.parmValue.size = val;
       this.parmValue.page = 1;
       this.searchList() 
     },
     handleCurrentChange(val){
-      this.pageInfo.total = val;
+      // this.pageInfo.total = val;
       this.parmValue.page = val;
       this.searchList()
     },

+ 2 - 4
src/views/reportQuery/purchaseReport/index.vue

@@ -20,8 +20,7 @@
             <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-tabs>
       
@@ -51,7 +50,7 @@ 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")
+
 export default {
 mixins: [mixinPage, resToken],
 components:{
@@ -69,7 +68,6 @@ components:{
     table12,
     table13,
     table14,
-    table15,
 },
 
   computed: {