|
@@ -0,0 +1,93 @@
|
|
|
+<script setup lang="ts">
|
|
|
+import getColumns from "./config/detail";
|
|
|
+import { reactive, ref, onMounted, unref } from "vue";
|
|
|
+
|
|
|
+import { useUserStoreHook } from "/@/store/modules/user";
|
|
|
+import { httpRequsetExport } from "/@/utils/export";
|
|
|
+import { ElMessage } from "element-plus";
|
|
|
+import { getRelaComNo } from "/@/utils/auth";
|
|
|
+defineOptions({
|
|
|
+ name: "commission"
|
|
|
+});
|
|
|
+
|
|
|
+const dataList = ref<Array<Record<string, string>>>(getColumns);
|
|
|
+const powers = ref<Array<string>>([]);
|
|
|
+//导出模板
|
|
|
+async function onDownloadOpenInv(row) {
|
|
|
+ const relaComNo = getRelaComNo() ?? "";
|
|
|
+ if (relaComNo == "") {
|
|
|
+ ElMessage.warning("请选择公司!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (row.time.length === 2) {
|
|
|
+ await httpRequsetExport({
|
|
|
+ url: row.url,
|
|
|
+ name: row.label,
|
|
|
+ params: {
|
|
|
+ start: row.time[0],
|
|
|
+ company: relaComNo,
|
|
|
+ end: row.time[1]
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElMessage.warning("请选择时间区间!");
|
|
|
+ }
|
|
|
+}
|
|
|
+onMounted(() => {
|
|
|
+ const p = useUserStoreHook().getMenuActions("commission");
|
|
|
+ powers.value = p;
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<template>
|
|
|
+ <div class="main">
|
|
|
+ <PagePower :is-show="powers.some(i => i === '001')">
|
|
|
+ <div style="width: 100%; text-align: center">
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ width: 700px;
|
|
|
+ text-align: left;
|
|
|
+ display: inline-block;
|
|
|
+ margin: 14vh 2vh 0 0;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ v-for="(si, sii) in dataList"
|
|
|
+ :key="si.value + sii"
|
|
|
+ style="padding: 10px 20px"
|
|
|
+ >
|
|
|
+ <el-row style="width: 100%">
|
|
|
+ <el-col
|
|
|
+ :span="7"
|
|
|
+ class="tr"
|
|
|
+ style="padding: 0 30px 0 0; line-height: 32px"
|
|
|
+ >{{ si.label }}</el-col
|
|
|
+ >
|
|
|
+ <el-col :span="14">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="si.time"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3"
|
|
|
+ ><el-button type="primary" @click="onDownloadOpenInv(si)">
|
|
|
+ 导出
|
|
|
+ </el-button></el-col
|
|
|
+ >
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </PagePower>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+:deep(.el-dropdown-menu__item i) {
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+</style>
|