Просмотр исходного кода

对公对账详情查日期范围与主列表一致

shipeng 3 дней назад
Родитель
Сommit
cb1e91ae2f

+ 13 - 4
src/views/finance/reconciliation/dialog/orderInfo.vue

@@ -115,23 +115,26 @@ export default {
   },
   methods: {
     // 打开弹框
-    openDialog(title, obj, type) {
+    openDialog(title, obj, queryForm) {
+      console.log(queryForm,'queryForm');
       this.isShow = true;
       this.subTitle = title;
-      this.queryParams.teamId = obj.teamId
+      this.queryParams.teamId = obj.teamId;
+      this.queryParams.startDate = queryForm.startDate || '';
+      this.queryParams.endDate = queryForm.endDate || '';
       this.getList();
     },
     /** 获取子订单 */
     getList() {
       this.loading = true;
       orderInfoList(this.queryParams).then(res => {
-        console.log(res,'res11');
         this.orderList = res.data.pageList.rows;
         this.total = res.data.pageList.total;
         this.statInfo = res.data.statInfo;
         this.isLoading = false;
       }).catch(()=>{
         this.orderList = [];
+        this.statInfo = {};
         this.isLoading = false;
       })
     },
@@ -144,7 +147,11 @@ export default {
       })
         .then(() => {
           this.handleExportLoading = true;
-          downOrderListXls({ teamId: this.queryParams.teamId })
+          downOrderListXls({ 
+            teamId: this.queryParams.teamId,
+            startDate: this.queryParams.startDate,
+            endDate: this.queryParams.endDate,
+           })
             .then((res) => {
               exportExcel(res, '对公对账', '.xlsx');
               this.handleExportLoading = false;
@@ -161,6 +168,8 @@ export default {
     
     // 关闭弹框
     cancel() {
+      this.queryParams.pageNum = 1;
+      this.queryParams.pageSize = 10;
       this.isShow = false;
     },
     

+ 1 - 1
src/views/finance/reconciliation/index.vue

@@ -174,7 +174,7 @@ export default {
     },
     // 订单详情
     viewOrderInfo(row) {
-      this.$refs["orderInfo"].openDialog("订单详情", row);
+      this.$refs["orderInfo"].openDialog("订单详情", row, this.queryParams);
     },
     /** 搜索按钮操作 */
     handleQuery() {