소스 검색

项目日志:7.28

gubai 2 년 전
부모
커밋
10c96b0b84
5개의 변경된 파일727개의 추가작업 그리고 566개의 파일을 삭제
  1. 16 1
      src/api/report.js
  2. 63 36
      src/views/management/index.vue
  3. 25 21
      src/views/shipments/index.vue
  4. 317 263
      src/views/shipments/shipments1.vue
  5. 306 245
      src/views/shipments/shipments2.vue

+ 16 - 1
src/api/report.js

xqd
@@ -6,4 +6,19 @@ export function getReportSearch(params) {
     method: 'get',
     params
   })
-}
+}
+export function getReportDrawerClassification(params) {
+  return request({
+    url:'/api/Report/drawerClassification',
+    method: 'get',
+    params
+  })
+}
+
+export function getReportSupplierReport(params) {
+  return request({
+    url:'/api/Report/supplierReport',
+    method: 'get',
+    params
+  })
+}

+ 63 - 36
src/views/management/index.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -30,20 +30,20 @@
         </el-dropdown>
       </div>
       <div class="grid-content bg-purple">
-        <el-dropdown @command="handlehpCommand()">
+        <el-dropdown @command="handlehpCommand">
           <div class="pulldown">
-            <span v-if="!hpstatus" class="el-dropdown-link">
+            <span v-if="!Auditstatus" class="el-dropdown-link">
               审核状态筛选
             </span>
-            <span v-if="hpstatus" class="el-dropdown-link">
-              {{ hpstatus }}
+            <span v-if="Auditstatus" class="el-dropdown-link">
+              {{ Auditstatus }}
             </span>
             <i class="el-icon-arrow-down el-icon--right" />
           </div>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item command="失败">待审核</el-dropdown-item>
-            <el-dropdown-item command="成功">通过</el-dropdown-item>
-            <el-dropdown-item command="失败">未通过</el-dropdown-item>
+            <el-dropdown-item command="待审核">待审核</el-dropdown-item>
+            <el-dropdown-item command="通过">通过</el-dropdown-item>
+            <el-dropdown-item command="未通过">未通过</el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
       </div>
@@ -139,16 +139,16 @@
         >首页
       </el-button>
       <el-pagination
-          ref="pagination"
-          background
-          layout="total,prev, pager, next"
-          :total="total"
-          :page-size="pagesize"
-          :current-page="currentPage"
-          prev-text="上一页"
-          next-text="下一页"
-          @current-change="handleCurrentChange"
-        />
+        ref="pagination"
+        background
+        layout="total,prev, pager, next"
+        :total="total"
+        :page-size="pagesize"
+        :current-page="currentPage"
+        prev-text="上一页"
+        next-text="下一页"
+        @current-change="handleCurrentChange"
+      />
       <el-button
         type="primary"
         size="small"
@@ -162,7 +162,7 @@
 
 <script>
 import { dataConversionUtil } from "../../utils/Excel.js";
-import { getAccountSearch } from '@/api/account';
+import { getAccountSearch } from "@/api/account";
 export default {
   filters: {
     statusFilter(status) {
@@ -180,9 +180,9 @@ export default {
       formData: {
         startTime: "",
         endTime: "",
-		    name:'',
-        id: "",
-        approveStatus: "", //通过1,不通过2
+        name: "",
+        status: "", //审核状态
+        isDeleted: "", //删除状态
       },
       /* 当前页数 */
       currentPage: 1,
@@ -190,12 +190,12 @@ export default {
       pagesize: 10,
       /* 总条数 */
       total: 20,
-	  temporaryList: [],
+      temporaryList: [],
       srcList: [],
       list: [],
       listLoading: false,
       status: "",
-      hpstatus: "",
+      Auditstatus: "",
       checked: false,
       pickerOptions: {
         shortcuts: [
@@ -232,12 +232,12 @@ export default {
       value2: "",
     };
   },
-  
+
   mounted() {
     this.getAllList();
   },
   methods: {
-	 /* 获取列表数据 */
+    /* 获取列表数据 */
     getAllList(searchForm = {}) {
       const params = {
         pageIndex: this.currentPage,
@@ -245,12 +245,12 @@ export default {
       };
       getAccountSearch({ ...params, ...searchForm }).then((res) => {
         const { data } = res;
-		console.log(data);
+        console.log(data);
         this.temporaryList = data.result;
         this.srcList = data.result;
         this.total = res.data.total;
-      })
-	},
+      });
+    },
     handleSelectionChange(data) {
       this.multipleSelection = data;
       console.log(this.multipleSelection);
@@ -259,12 +259,6 @@ export default {
       this.multipleSelection = data;
       console.log(this.multipleSelection);
     },
-    handleCommand(command) {
-      this.status = command;
-    },
-    handlehpCommand(command) {
-      this.hpstatus = command;
-    },
 
     success() {
       const ids = Array.from(this.multipleSelection, ({ id }) => id);
@@ -415,12 +409,45 @@ export default {
       });
     },
 
-	    /* 输入出票人名称查询 */
+    /* 输入出票人名称查询 */
     Search() {
       this.currentPage = 1;
       this.searchForm = { ...this.formData };
       this.getAllList(this.searchForm);
     },
+    /* 业务员状态筛选 */
+    handleCommand(command) {
+      this.status = command;
+      if (command === "全部") {
+        this.formData.isDeleted = "";
+      }
+      if (command === "正常") {
+        this.formData.isDeleted = 0;
+      }
+      if (command === "删除") {
+        this.formData.isDeleted = 1;
+      }
+      this.currentPage = 1;
+      this.searchForm = { ...this.formData };
+      this.getAllList(this.searchForm);
+    },
+
+    /* 审核状态筛选 */
+    handlehpCommand(command) {
+      this.Auditstatus = command;
+      if (command === "待审核") {
+        this.formData.status = 1;
+      }
+      if (command === "通过") {
+        this.formData.status = 2;
+      }
+      if (command === "未通过") {
+        this.formData.status = 3;
+      }
+      this.currentPage = 1;
+      this.searchForm = { ...this.formData };
+      this.getAllList(this.searchForm);
+    },
 
     /* 分页功能,改变当前页 */
     handleCurrentChange(val) {
@@ -440,7 +467,7 @@ export default {
       font.handleCurrentChange(cpage);
     },
 
-	/* 导出 */
+    /* 导出 */
     Exports() {
       if (this.multipleSelection == "") {
         this.$message({

+ 25 - 21
src/views/shipments/index.vue

xqd xqd xqd xqd xqd xqd
@@ -12,10 +12,8 @@
             <el-dropdown-item command="月度">月度</el-dropdown-item>
             <el-dropdown-item command="季度">季度</el-dropdown-item>
             <el-dropdown-item command="年度">年度</el-dropdown-item>
-        
           </el-dropdown-menu>
         </el-dropdown>
-
       </div>
       <div class="grid-content bg-purple">
         <div class="block">
@@ -27,7 +25,9 @@
             range-separator="至"
             start-placeholder="开始日期"
             end-placeholder="结束日期"
+            value-format="yyyy-MM-dd"
             :picker-options="pickerOptions"
+            @change="startEndTime"
           >
           </el-date-picker>
         </div>
@@ -133,12 +133,12 @@ export default {
       total: 20,
       /* 列表数据 */
       srcList: [],
+      number:'',//区分是月季年度
       list: [],
       listLoading: false,
       status: "",
       hpstatus: "",
       multipleSelection: [],
-
       input4: "",
       checked: false,
       pickerOptions: {
@@ -181,9 +181,11 @@ export default {
   },
   methods: {
     /* 获取承兑人分类报表 */
-    getReportList(number) {
+    getReportList(number,startDate,endDate) {
       let params = {
-        frequency: number||1,
+        frequency: number || 1,
+        startDate,
+        endDate
       };
       getReportSearch({ ...params }).then((res) => {
         const { data } = res;
@@ -200,27 +202,30 @@ export default {
       console.log(this.multipleSelection);
     },
 
-	/*  报表频率查询*/
+    /*  报表频率查询*/
     handleCommand(command) {
       this.status = command;
-		if(command === "月度"){
-			this.formData.frequency =1
-		}
-		if(command === "季度"){
-			this.formData.frequency =2
-		}
-		if(command === "年度"){
-			this.formData.frequency =3
-		}
-		 this.getReportList(this.formData.frequency);
-
+      if (command === "月度") {
+        this.formData.frequency = 1;
+      }
+      if (command === "季度") {
+        this.formData.frequency = 2;
+      }
+      if (command === "年度") {
+        this.formData.frequency = 3;
+      }
+      this.number = this.formData.frequency
+      this.getReportList(this.formData.frequency);
     },
 
+     // 日期审核状态查询
+    startEndTime() {
+      this.formData.startTime = this.value2[0]
+      this.formData.endTime = this.value2[1]
+       this.getReportList(this.number,this.formData.startTime,this.formData.endTime);
+    },
 
 
-    handlehpCommand(command) {
-      this.hpstatus = command;
-    },
     shipments1() {
       this.$router.push({
         path: "/shipments1",
@@ -238,7 +243,6 @@ export default {
     },
     /* 导出 */
     Export() {
-      // window.open('https://ht.9026.com/api/Report/export/acceptorClassification?frequency=1&startDate=&endDate=')
       if (this.multipleSelection == "") {
         this.$message({
           type: "warning",

+ 317 - 263
src/views/shipments/shipments1.vue

xqd
@@ -1,275 +1,329 @@
 <template>
-	<div class="app-container">
-		<el-row type="flex" justify="space-between" style="margin-bottom:20px">
-				<div class="grid-content bg-purple">
-					<el-dropdown @command="handleCommand">
-						<div class="pulldown">
-							<span class="el-dropdown-link" v-if="!status">
-								月份
-							</span>
-							<span class="el-dropdown-link" v-if="status">
-								{{status}}月
-							</span>
-							<i class="el-icon-arrow-down el-icon--right"></i>
-						</div>
-						<el-dropdown-menu slot="dropdown">
-							<el-dropdown-item command="1">1月</el-dropdown-item>
-							<el-dropdown-item command="2">2月</el-dropdown-item>
-							<el-dropdown-item command="3">3月</el-dropdown-item>
-							<el-dropdown-item command="4">4月</el-dropdown-item>
-							<el-dropdown-item command="5">5月</el-dropdown-item>
-							<el-dropdown-item command="6">6月</el-dropdown-item>
-							<el-dropdown-item command="7">7月</el-dropdown-item>
-							<el-dropdown-item command="8">8月</el-dropdown-item>
-							<el-dropdown-item command="9">9月</el-dropdown-item>
-							<el-dropdown-item command="10">10月</el-dropdown-item>
-							<el-dropdown-item command="11">11月</el-dropdown-item>
-							<el-dropdown-item command="12">12月</el-dropdown-item>
-						</el-dropdown-menu>
-					</el-dropdown>
-				</div>
-
-
-				<div class="grid-content bg-purple">
-					<div class="block">
-						<el-date-picker v-model="value2" type="daterange" align="right" unlink-panels
-							range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
-							:picker-options="pickerOptions">
-						</el-date-picker>
-					</div>
-
-				</div>
-			<!-- <el-col :xs="24" :sm="10" :md="8" :lg="5" :xl="5">
-     <div class="grid-content bg-purple">
-       <div class="grid-content bg-purple" style="margin-left: 30px;">
-         <el-input
-             placeholder="请输入查询内容"
-             v-model="input4" style="width: 80%;">
-             <i slot="prefix" class="el-input__icon el-icon-search"></i>
-           </el-input>
-       </div>
-     </div>
-     </el-col> -->
-			<!-- <el-col :span="1">
-       <div class="grid-content bg-purple"></div>
-     </el-col> -->
-				<div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
-					<el-button type="primary" @click="index">承兑人分类报表</el-button>
-					<el-button type="primary" disabled>出票人分类报表</el-button>
-					<el-button type="primary" @click="shipments2">合同统计列表</el-button>
-					<el-button type="primary" @click="shipments3">供应商统计列表</el-button>
-					<el-button type="primary" @click="Export">导出</el-button>
-
-				</div>
-
-		</el-row>
-		<el-table v-loading="listLoading" :data="srcList" element-loading-text="Loading" border fit
-			highlight-current-row id="download" @select="handleSelectionChange" @select-all="handleAll">
-			<el-table-column align="center" label="" width="55" type="selection">
-				
-			</el-table-column>
-			<el-table-column label="出票人" align="center" prop="drawerName">
-
-			</el-table-column>
-			<el-table-column label="统计周期(按照出票日)" align="center" prop="period" width="180">
-
-			</el-table-column>
-			<el-table-column label="汇票笔数"  align="center" prop="count">
-
-			</el-table-column>
-			<el-table-column label="汇票金额"  align="center" prop="money">
-			</el-table-column>
-			<el-table-column label="服务费"  align="center" prop="serviceMoney">
-			</el-table-column>
-			<el-table-column label="利息"  align="center" prop="interest">
-			</el-table-column>
-		</el-table>
-		<div class="pagesip">
-			<el-button type="primary" size="small"
-				style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页
-			</el-button>
-			<el-pagination background @current-change="handleCurrentChange" layout="prev, pager, next"
-				:total="list.length" :page-size="10" prev-text="上一页" next-text="下一页" :hide-on-single-page="false"
-				ref="pagination">
-			</el-pagination>
-			<el-button type="primary" size="small"
-				style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页
-			</el-button>
-		</div>
-	</div>
+  <div class="app-container">
+    <el-row type="flex" justify="space-between" style="margin-bottom: 20px">
+      <div class="grid-content bg-purple">
+        <el-dropdown @command="handleCommand">
+          <div class="pulldown">
+            <span class="el-dropdown-link" v-if="!status"> 报表频率 </span>
+            <span class="el-dropdown-link" v-if="status"> {{ status }} </span>
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </div>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="月度">月度</el-dropdown-item>
+            <el-dropdown-item command="季度">季度</el-dropdown-item>
+            <el-dropdown-item command="年度">年度</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </div>
+      <div class="grid-content bg-purple">
+        <div class="block">
+          <el-date-picker
+            v-model="value2"
+            type="daterange"
+            align="right"
+            unlink-panels
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            value-format="yyyy-MM-dd"
+            :picker-options="pickerOptions"
+            @change="startEndTime"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <div
+        class="grid-content bg-purple"
+        style="display: flex; justify-content: flex-end"
+      >
+        <el-button type="primary" @click="index">承兑人分类报表</el-button>
+        <el-button type="primary" disabled>出票人分类报表</el-button>
+        <el-button type="primary" @click="shipments2">合同统计列表</el-button>
+        <el-button type="primary" @click="shipments3">供应商统计列表</el-button>
+        <el-button type="primary" @click="Export">导出</el-button>
+      </div>
+    </el-row>
+    <el-table
+      v-loading="listLoading"
+      :data="srcList"
+      element-loading-text="Loading"
+      border
+      fit
+      highlight-current-row
+      id="download"
+      @select="handleSelectionChange"
+      @select-all="handleAll"
+    >
+      <el-table-column align="center" label="" width="55" type="selection">
+      </el-table-column>
+      <el-table-column label="出票人" align="center" prop="drawerName">
+      </el-table-column>
+      <el-table-column
+        label="统计周期(按照出票日)"
+        align="center"
+        prop="period"
+        width="180"
+      >
+      </el-table-column>
+      <el-table-column label="汇票笔数" align="center" prop="count">
+      </el-table-column>
+      <el-table-column label="汇票金额" align="center" prop="money">
+      </el-table-column>
+      <el-table-column label="服务费" align="center" prop="serviceMoney">
+      </el-table-column>
+      <el-table-column label="利息" align="center" prop="interest">
+      </el-table-column>
+    </el-table>
+    <div class="pagesip">
+      <el-button
+        type="primary"
+        size="small"
+        style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
+        @click="jumpFirstPage"
+        >首页
+      </el-button>
+      <el-pagination
+        ref="pagination"
+        background
+        layout="total,prev, pager, next"
+        :total="srcList.length"
+        :page-size="pagesize"
+        :current-page="currentPage"
+        prev-text="上一页"
+        next-text="下一页"
+        @current-change="handleCurrentChange"
+      />
+      <el-button
+        type="primary"
+        size="small"
+        style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
+        @click="jumpLastPage"
+        >尾页
+      </el-button>
+    </div>
+  </div>
 </template>
 
 <script>
-		import {
-	dataConversionUtil
-	} from '../../utils/Excel.js'
-	export default {
-		filters: {
-			statusFilter(status) {
-				const statusMap = {
-					published: 'success',
-					draft: 'gray',
-					deleted: 'danger'
-				}
-				return statusMap[status]
-			}
-		},
-		data() {
-			return {
-				list: [],
-				listLoading: false,
-				status: '',
-				hpstatus: '',
-				input4: '',
-				srcList: [],
-				currentPage: 1,
-				pagesize: 11,
-				
-				pickerOptions: {
-					shortcuts: [{
-						text: '最近一周',
-						onClick(picker) {
-							const end = new Date();
-							const start = new Date();
-							start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-							picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近一个月',
-						onClick(picker) {
-							const end = new Date();
-							const start = new Date();
-							start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-							picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近三个月',
-						onClick(picker) {
-							const end = new Date();
-							const start = new Date();
-							start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-							picker.$emit('pick', [start, end]);
-						}
-					}]
-				},
-				value1: '',
-				value2: ''
-			}
-		},
-		created() {
-		},
-		mounted() {
-			this.$request({
-				url: '/api/Report/drawerClassification?frequency=1&startDate=2020-10-12&endDate=2023-12-23',
-				method: 'get',
-			}).then((res) => {
-				this.list = res.data
-				this.getPageData()
-			})
-		},
-		methods: {
-			handleCommand(command) {
-				this.status = command
+import { dataConversionUtil } from "../../utils/Excel.js";
+import { getReportDrawerClassification } from "@/api/report";
+export default {
+  filters: {
+    statusFilter(status) {
+      const statusMap = {
+        published: "success",
+        draft: "gray",
+        deleted: "danger",
+      };
+      return statusMap[status];
+    },
+  },
+  data() {
+    return {
+      // 表单数据
+      formData: {
+        startTime: "",
+        endTime: "",
+        frequency: "",
+      },
+      /* 当前页数 */
+      currentPage: 1,
+      /* 每页显示个数 */
+      pagesize: 10,
+      /* 总条数 */
+      total: 20,
+      /* 列表数据 */
+      srcList: [],
+      number: "", //区分是月季年度
+      list: [],
+      listLoading: false,
+      status: "",
+      hpstatus: "",
+      input4: "",
+      currentPage: 1,
+      pagesize: 11,
 
-			},
-			handlehpCommand(command) {
-				this.hpstatus = command
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
+      },
+      value1: "",
+      value2: "",
+    };
+  },
+  created() {},
+  mounted() {
+    this.getReportList();
+  },
+  methods: {
+    /* 获取承兑人分类报表 */
+    getReportList(number, startDate, endDate) {
+      let params = {
+        frequency: number || 1,
+        startDate,
+        endDate,
+      };
+      getReportDrawerClassification({ ...params }).then((res) => {
+        const { data } = res;
+        this.srcList = data;
+      });
+    },
 
-			},
-			handleSelectionChange(data) {
-			  this.multipleSelection = data;
-			  console.log(this.multipleSelection);
-			},
-			handleAll(data) {
-				this.multipleSelection = data
-				console.log(this.multipleSelection)
-			},
-			index() {
-				this.$router.push({
-					path: '/shipments/index'
-				})
-			},
-			shipments2() {
-				this.$router.push({
-					path: "/shipments2"
-				})
-			},
-			shipments3() {
-				this.$router.push({
-					path: "/shipments3"
-				})
-			},
-			Export() {
-				// window.open(
-				// 	'http://123.207.180.167:8700/api/Report/export/drawerClassification?frequency=1&startDate=&endDate='
-				// 	)
-				if(this.multipleSelection==""){
-						this.$message({
-							type:'warning',
-							message:'请选择数据!'
-						})
-					}else{
-						var tableHeader = [
-							['序号', '出票人', '统计周期(按照出票日)', '汇票笔数', '汇票金额', '服务费','利息'],
-						]
-						var dataList = []
-						this.multipleSelection.forEach((item, index) => {
-							dataList.push([index + 1, item.drawerName, item.period, item.count, item.money, item
-								.serviceMoney,item.interest
-							]);
-						})
-						dataConversionUtil.dataToExcel('出票人分类报表', tableHeader, dataList)
-						this.$message.success('导出成功!');
-				}
-			},
-			jumpFirstPage() {
-				this.$refs.pagination.handleCurrentChange(1);
-				this.$emit('handleCurrentChange', 1);
-			},
-			jumpLastPage() {
-				let font = this.$refs.pagination
-				let cpage = Math.ceil(font.total / font.pageSize);
-				font.handleCurrentChange(cpage);
-			},
-			handleCurrentChange(val) {
-				this.currentPage = val;
-				this.getPageData();
-			},
-			getPageData() {
-				let start = (this.currentPage - 1) * this.pagesize;
-				let end = start + this.pagesize;
-				this.srcList = this.list.slice(start, end);
-			},
-		}
-	}
+    handleSelectionChange(data) {
+      this.multipleSelection = data;
+      console.log(this.multipleSelection);
+    },
+    handleAll(data) {
+      this.multipleSelection = data;
+      console.log(this.multipleSelection);
+    },
+    index() {
+      this.$router.push({
+        path: "/shipments/index",
+      });
+    },
+    shipments2() {
+      this.$router.push({
+        path: "/shipments2",
+      });
+    },
+    shipments3() {
+      this.$router.push({
+        path: "/shipments3",
+      });
+    },
+    // *  报表频率查询*/
+    handleCommand(command) {
+       this.status = command;
+      if (command === "月度") {
+        this.formData.frequency = 1;
+      }
+      if (command === "季度") {
+        this.formData.frequency = 2;
+      }
+      if (command === "年度") {
+        this.formData.frequency = 3;
+      }
+      this.number = this.formData.frequency
+      this.getReportList(this.formData.frequency);
+    },
+	// 日期审核状态查询
+    startEndTime() {
+      this.formData.startTime = this.value2[0]
+      this.formData.endTime = this.value2[1]
+       this.getReportList(this.number,this.formData.startTime,this.formData.endTime);
+    },
+ 
+    /* 导出 */
+    Export() {
+      if (this.multipleSelection == "") {
+        this.$message({
+          type: "warning",
+          message: "请选择数据!",
+        });
+      } else {
+        var tableHeader = [
+          [
+            "序号",
+            "出票人",
+            "统计周期(按照出票日)",
+            "汇票笔数",
+            "汇票金额",
+            "服务费",
+            "利息",
+          ],
+        ];
+        var dataList = [];
+        this.multipleSelection.forEach((item, index) => {
+          dataList.push([
+            index + 1,
+            item.drawerName,
+            item.period,
+            item.count,
+            item.money,
+            item.serviceMoney,
+            item.interest,
+          ]);
+        });
+        dataConversionUtil.dataToExcel("出票人分类报表", tableHeader, dataList);
+        this.$message.success("导出成功!");
+      }
+    },
+    jumpFirstPage() {
+      this.$refs.pagination.handleCurrentChange(1);
+      this.$emit("handleCurrentChange", 1);
+    },
+    jumpLastPage() {
+      let font = this.$refs.pagination;
+      let cpage = Math.ceil(font.total / font.pageSize);
+      font.handleCurrentChange(cpage);
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getPageData();
+    },
+    getPageData() {
+      let start = (this.currentPage - 1) * this.pagesize;
+      let end = start + this.pagesize;
+      this.srcList = this.list.slice(start, end);
+    },
+  },
+};
 </script>
 <style lang="scss">
-	.pulldown {
-		width: 185px;
-		height: 40px;
-		border: 1px solid #E8E8E8;
-		border-radius: 10px;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		justify-content: space-between;
-		padding: 0 20px;
-		color: #999999;
-	}
+.pulldown {
+  width: 185px;
+  height: 40px;
+  border: 1px solid #e8e8e8;
+  border-radius: 10px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 20px;
+  color: #999999;
+}
 
-	.pagesip {
-		width: 100%;
-		margin: 20px auto;
-		display: flex;
-		// align-items: center;
-		justify-content: flex-end;
-	}
+.pagesip {
+  width: 100%;
+  margin: 20px auto;
+  display: flex;
+  // align-items: center;
+  justify-content: flex-end;
+}
 
-	.el-pagination.is-background .el-pager li:not(.disabled).active {
-		background-color: #D8AB5A;
-	}
+.el-pagination.is-background .el-pager li:not(.disabled).active {
+  background-color: #d8ab5a;
+}
 
-	.el-col {
-		margin-bottom: 20px;
-	}
+.el-col {
+  margin-bottom: 20px;
+}
 </style>

+ 306 - 245
src/views/shipments/shipments2.vue

xqd
@@ -1,260 +1,321 @@
 <template>
-	<div class="app-container">
-		<el-row type="flex" justify="space-between" style="margin-bottom:20px">
+  <div class="app-container">
+    <el-row type="flex" justify="space-between" style="margin-bottom: 20px">
+      <div class="grid-content bg-purple">
+        <el-input
+          placeholder="请输入查询内容"
+          v-model="string"
+          @change="Search"
+          style="width: 100%"
+        >
+          <i slot="prefix" class="el-input__icon el-icon-search"></i>
+        </el-input>
+      </div>
 
-			<div class="grid-content bg-purple" >
-			  <el-input
-			      placeholder="请输入查询内容"
-			      v-model="search" style="width: 100%;">
-			      <i slot="prefix" class="el-input__icon el-icon-search"></i>
-			    </el-input>
-			</div>
-
-			<div class="grid-content bg-purple">
-				<div class="block">
-					<el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
-						start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
-					</el-date-picker>
-				</div>
-
-			</div>
-			<!-- <el-col :xs="24" :sm="10" :md="8" :lg="5" :xl="5">
-     <div class="grid-content bg-purple">
-       
-     </div>
-     </el-col> -->
-			<!-- <el-col :span="1">
-       <div class="grid-content bg-purple"></div>
-     </el-col> -->
-			<div class="grid-content bg-purple" style="display: flex;justify-content: flex-end;">
-				<el-button type="primary" @click="index">承兑人分类报表</el-button>
-				<el-button type="primary" @click="shipments1">出票人分类报表</el-button>
-				<el-button type="primary" disabled>合同统计列表</el-button>
-				<el-button type="primary" @click="shipments3">供应商统计列表</el-button>
-				<el-button type="primary" @click="Export">导出</el-button>
-
-			</div>
-
-		</el-row>
-		<el-table v-loading="listLoading" :data="srcList" element-loading-text="Loading" border fit
-			highlight-current-row @select="handleSelectionChange" @select-all="handleAll">
-			<el-table-column align="center" label="" width="55" type="selection">
-				
-			</el-table-column>
-			<el-table-column label="合同名称" align="center" prop="contractName">
-
-			</el-table-column>
-			<el-table-column label="汇票承兑日" align="center" prop="acceptDate">
-
-			</el-table-column>
-			<el-table-column label="汇票贴现日" align="center" prop="expectDiscountDate">
-
-			</el-table-column>
-			<el-table-column label="汇票笔数" align="center" prop="count">
-
-			</el-table-column>
-			<el-table-column label="汇票金额" align="center" prop="money">
+      <div class="grid-content bg-purple">
+        <div class="block">
+          <el-date-picker
+            v-model="value2"
+            type="daterange"
+            align="right"
+            unlink-panels
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            :picker-options="pickerOptions"
+          >
+          </el-date-picker>
+        </div>
+      </div>
+      <div
+        class="grid-content bg-purple"
+        style="display: flex; justify-content: flex-end"
+      >
+        <el-button type="primary" @click="index">承兑人分类报表</el-button>
+        <el-button type="primary" @click="shipments1">出票人分类报表</el-button>
+        <el-button type="primary" disabled>合同统计列表</el-button>
+        <el-button type="primary" @click="shipments3">供应商统计列表</el-button>
+        <el-button type="primary" @click="Export">导出</el-button>
+      </div>
+    </el-row>
+    <el-table
+      v-loading="listLoading"
+      :data="srcList"
+      element-loading-text="Loading"
+      border
+      fit
+      highlight-current-row
+      @select="handleSelectionChange"
+      @select-all="handleAll"
+    >
+      <el-table-column align="center" label="" width="55" type="selection">
+      </el-table-column>
+      <el-table-column label="合同名称" align="center" prop="supplierName">
+      </el-table-column>
+      <el-table-column label="汇票承兑日" align="center" prop="acceptDate">
+      </el-table-column>
+      <el-table-column
+        label="汇票贴现日"
+        align="center"
+        prop="expectDiscountDate"
+      >
+      </el-table-column>
+      <el-table-column label="汇票笔数" align="center" prop="count">
+      </el-table-column>
+      <el-table-column label="汇票金额" align="center" prop="money">
+      </el-table-column>
+      <el-table-column label="服务费" align="center" prop="serviceMoney">
+      </el-table-column>
+      <el-table-column label="利息" align="center" prop="interest">
+      </el-table-column>
+    </el-table>
+    <div class="pagesip">
+      <el-button
+        type="primary"
+        size="small"
+        style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
+        @click="jumpFirstPage"
+        >首页
+      </el-button>
+      <el-pagination
+        ref="pagination"
+        background
+        layout="total,prev, pager, next"
+        :total="srcList.length"
+        :page-size="pagesize"
+        :current-page="currentPage"
+        prev-text="上一页"
+        next-text="下一页"
+        @current-change="handleCurrentChange"
+      />
+      <el-button
+        type="primary"
+        size="small"
+        style="background-color: #d8ab5a; border-color: #d8ab5a; margin: 0 20px"
+        @click="jumpLastPage"
+        >尾页
+      </el-button>
+    </div>
+  </div>
+</template>
 
-			</el-table-column>
-			<el-table-column label="服务费" align="center" prop="serviceMoney">
+<script>
+import { dataConversionUtil } from "../../utils/Excel.js";
+import { getReportSupplierReport } from "@/api/report";
+export default {
+  filters: {
+    statusFilter(status) {
+      const statusMap = {
+        published: "success",
+        draft: "gray",
+        deleted: "danger",
+      };
+      return statusMap[status];
+    },
+  },
+  data() {
+    return {
+      // 表单数据
+      formData: {
+        startTime: "",
+        endTime: "",
+        contractName: "",
+      },
+      /* 当前页数 */
+      currentPage: 1,
+      /* 每页显示个数 */
+      pagesize: 10,
+      /* 总条数 */
+      total: 20,
+      /* 列表数据 */
+      srcList: [],
+      string: "", //区分是合同名称
+      listLoading: false,
 
-			</el-table-column>
-			<el-table-column label="利息" align="center" prop="interest">
-				
-			</el-table-column>
+      list: [],
+      status: "",
+      hpstatus: "",
+      search: "",
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: "最近一周",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近一个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+          {
+            text: "最近三个月",
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+              picker.$emit("pick", [start, end]);
+            },
+          },
+        ],
+      },
+      value1: "",
+      value2: "",
+    };
+  },
 
-			<!-- <el-table-column align="center" prop="created_at" label="操作" width="250">
-        <template slot-scope="scope">
-          <el-tag type="success" style="cursor: pointer;margin-right: 15px;">恢复</el-tag>
-         <el-tag type="warning" style="margin-right: 15px;cursor: pointer;">下载</el-tag>
-          <el-tag type="danger" style="cursor: pointer;">删除</el-tag>
-        </template>
-      </el-table-column> -->
-		</el-table>
-		<div class="pagesip">
-			<el-button type="primary" size="small"
-				style="background-color:#D8AB5A ;border-color:#D8AB5A ; margin: 0 20px;" @click="jumpFirstPage">首页
-			</el-button>
-			<el-pagination background @current-change="handleCurrentChange" layout="prev, pager, next"
-				:total="list.length" :page-size="1" prev-text="上一页" next-text="下一页" :hide-on-single-page="false"
-				ref="pagination">
-			</el-pagination>
-			<el-button type="primary" size="small"
-				style="background-color:#D8AB5A ;border-color:#D8AB5A ;margin: 0 20px;" @click="jumpLastPage">尾页
-			</el-button>
-		</div>
-	</div>
-</template>
+  mounted() {
+    this.getReportList();
+  },
+  methods: {
+    /* 获取承兑人分类报表 */
+    getReportList(string, startDate, endDate) {
+      let params = {
+        contractName: string || "",
+        startDate,
+        endDate,
+      };
+      getReportSupplierReport({ ...params }).then((res) => {
+        const { data } = res;
+        this.srcList = data;
+      });
+    },
 
-<script>
-	import {
-		getList
-	} from '@/api/table'
-		import {
-	dataConversionUtil
-	} from '../../utils/Excel.js'
-	export default {
-		filters: {
-			statusFilter(status) {
-				const statusMap = {
-					published: 'success',
-					draft: 'gray',
-					deleted: 'danger'
-				}
-				return statusMap[status]
-			}
-		},
-		data() {
-			return {
-				srcList: [],
-				currentPage: 1,
-				pagesize: 11,
-				list: [],
-				status: '',
-				hpstatus: '',
-				search: '',
-				pickerOptions: {
-					shortcuts: [{
-						text: '最近一周',
-						onClick(picker) {
-							const end = new Date();
-							const start = new Date();
-							start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-							picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近一个月',
-						onClick(picker) {
-							const end = new Date();
-							const start = new Date();
-							start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-							picker.$emit('pick', [start, end]);
-						}
-					}, {
-						text: '最近三个月',
-						onClick(picker) {
-							const end = new Date();
-							const start = new Date();
-							start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-							picker.$emit('pick', [start, end]);
-						}
-					}]
-				},
-				value1: '',
-				value2: ''
-			}
-		},
+    handleSelectionChange(data) {
+      this.multipleSelection = data;
+      console.log(this.multipleSelection);
+    },
+    handleAll(data) {
+      this.multipleSelection = data;
+      console.log(this.multipleSelection);
+    },
+    index() {
+      this.$router.push({
+        path: "/shipments/index",
+      });
+    },
+    shipments1() {
+      this.$router.push({
+        path: "/shipments1",
+      });
+    },
+    shipments3() {
+      this.$router.push({
+        path: "/shipments3",
+      });
+    },
 
-		mounted() {
-			this.$request({
-				url: '/api/Report/contractReport?contractName=&startDate=&endDate=',
-				method: 'get',
-			}).then((res) => {
-				this.list = res.data
-				this.getPageData()
-			})
-		},
-		methods: {
-			handleCommand(command) {
-				this.status = command
+    /* 合同名称  */
+    // 合同名称/编号/承兑人名称/出票查询
+    Search() {
+      console.log(this.string);
+      this.getReportList(this.string,'2022-10-25','2023-01-05');
+    },
 
-			},
-			handlehpCommand(command) {
-				this.hpstatus = command
+    // 日期审核状态查询
+    startEndTime() {
+      this.formData.startTime = this.value2[0];
+      this.formData.endTime = this.value2[1];
+      this.getReportList(
+        this.number,
+        this.formData.startTime,
+        this.formData.endTime
+      );
+    },
 
-			},
-			handleSelectionChange(data) {
-			  this.multipleSelection = data;
-			  console.log(this.multipleSelection);
-			},
-			handleAll(data) {
-				this.multipleSelection = data
-				console.log(this.multipleSelection)
-			},
-			index() {
-				this.$router.push({
-					path: '/shipments/index'
-				})
-			},
-			shipments1() {
-				this.$router.push({
-					path: "/shipments1"
-				})
-			},
-			shipments3() {
-				this.$router.push({
-					path: "/shipments3"
-				})
-			},
-			Export() {
-				// window.open('http://123.207.180.167:8700/api/Report/export/contractReport?contractName=&startDate=&endDate=')
-				if(this.multipleSelection==""){
-						this.$message({
-							type:'warning',
-							message:'请选择数据!'
-						})
-					}else{
-						var tableHeader = [
-							['序号', '合同名称', '汇票承兑日', '汇票贴现日','汇票笔数', '汇票金额', '服务费','利息'],
-						]
-						var dataList = []
-						this.multipleSelection.forEach((item, index) => {
-							dataList.push([index + 1, item.contractName, item.acceptDate,item.expectDiscountDate, item.count, item.money, item
-								.serviceMoney,item.interest
-							]);
-						})
-						dataConversionUtil.dataToExcel('合同统计列表', tableHeader, dataList)
-						this.$message.success('导出成功!');
-				}
-			},
-			jumpFirstPage() {
-				this.$refs.pagination.handleCurrentChange(1);
-				this.$emit('handleCurrentChange', 1);
-			},
-			jumpLastPage() {
-				let font = this.$refs.pagination
-				let cpage = Math.ceil(font.total / font.pageSize);
-				font.handleCurrentChange(cpage);
-			},
-			handleCurrentChange(val) {
-				this.currentPage = val;
-				this.getPageData();
-			},
-			getPageData() {
-				let start = (this.currentPage - 1) * this.pagesize;
-				let end = start + this.pagesize;
-				this.srcList = this.list.slice(start, end);
-			},
-		}
-	}
+    Export() {
+      // window.open('http://123.207.180.167:8700/api/Report/export/contractReport?contractName=&startDate=&endDate=')
+      if (this.multipleSelection == "") {
+        this.$message({
+          type: "warning",
+          message: "请选择数据!",
+        });
+      } else {
+        var tableHeader = [
+          [
+            "序号",
+            "合同名称",
+            "汇票承兑日",
+            "汇票贴现日",
+            "汇票笔数",
+            "汇票金额",
+            "服务费",
+            "利息",
+          ],
+        ];
+        var dataList = [];
+        this.multipleSelection.forEach((item, index) => {
+          dataList.push([
+            index + 1,
+            item.contractName,
+            item.acceptDate,
+            item.expectDiscountDate,
+            item.count,
+            item.money,
+            item.serviceMoney,
+            item.interest,
+          ]);
+        });
+        dataConversionUtil.dataToExcel("合同统计列表", tableHeader, dataList);
+        this.$message.success("导出成功!");
+      }
+    },
+    jumpFirstPage() {
+      this.$refs.pagination.handleCurrentChange(1);
+      this.$emit("handleCurrentChange", 1);
+    },
+    jumpLastPage() {
+      let font = this.$refs.pagination;
+      let cpage = Math.ceil(font.total / font.pageSize);
+      font.handleCurrentChange(cpage);
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getPageData();
+    },
+    getPageData() {
+      let start = (this.currentPage - 1) * this.pagesize;
+      let end = start + this.pagesize;
+      this.srcList = this.list.slice(start, end);
+    },
+  },
+};
 </script>
 <style lang="scss">
-	.pulldown {
-		width: 185px;
-		height: 40px;
-		border: 1px solid #E8E8E8;
-		border-radius: 10px;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		justify-content: space-between;
-		padding: 0 20px;
-		color: #999999;
-	}
+.pulldown {
+  width: 185px;
+  height: 40px;
+  border: 1px solid #e8e8e8;
+  border-radius: 10px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 20px;
+  color: #999999;
+}
 
-	.pagesip {
-		width: 100%;
-		margin: 20px auto;
-		display: flex;
-		// align-items: center;
-		justify-content: flex-end;
-	}
+.pagesip {
+  width: 100%;
+  margin: 20px auto;
+  display: flex;
+  // align-items: center;
+  justify-content: flex-end;
+}
 
-	.el-pagination.is-background .el-pager li:not(.disabled).active {
-		background-color: #D8AB5A;
-	}
+.el-pagination.is-background .el-pager li:not(.disabled).active {
+  background-color: #d8ab5a;
+}
 
-	.el-col {
-		margin-bottom: 20px;
-	}
+.el-col {
+  margin-bottom: 20px;
+}
 </style>