Pārlūkot izejas kodu

master 财务结算

jiayufei 3 gadi atpakaļ
vecāks
revīzija
833f87c0fd

+ 16 - 1
src/views/modules/settlement-information/settlement-information.vue

@@ -246,6 +246,7 @@
             v-if="settlementModalStatus"
             title="下载结算单"
             :visible="settlementModalStatus"
+            :confirmLoading="settlementConfirmLoad"
             dialog-class="information-modal-class"
             @ok="handleSettlementModalSure"
             @cancel="handleSettlementModalnCancel"
@@ -325,6 +326,7 @@
             v-if="profitModalStatus"
             title="下载利润单"
             :visible="profitModalStatus"
+            :confirmLoading="profitConfirmLoad"
             dialog-class="information-modal-class"
             @ok="handleProfitModalSure"
             @cancel="handleProfitModalnCancel"
@@ -375,6 +377,8 @@ export default {
         return {
             userOperateList: ['快手运营总监', '运营助理', '运营专员', '头条运营经理', '外部运营经理', '快手运营', '商务运营', '运营总经理', '直播运营', '头条运营总监', '快手运营助理', '快手运营经理', '头条运营', '头条运营助理'],
             userSaleList: ['外部销售', '销售总监', '销售', '销售助理', '销售支持经理', '销售AM'],
+            settlementConfirmLoad: false,
+            profitConfirmLoad: false,
             profitBtnStatus: false,
             settlementBtnStatus: false,
             accountBtnStatus: false,
@@ -528,7 +532,7 @@ export default {
             this.mode2 = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]];
         },
         handleProductIdChange(e) {
-            if (!this.settlementModalForm.uploadYears) {
+            if (this.settlementModalForm.uploadYears) {
                 this.handleGetDownLoadAllNum();
             }
         },
@@ -664,6 +668,7 @@ export default {
         handleProfitModalSure() {
             this.$refs.profitModalForm.validate(valid => {
                 if (valid) {
+                    this.profitConfirmLoad = true;
                     const {mediaId, launchDateRange} = this.profitModalForm;
                     const paramsData = {
                         mediaId,
@@ -685,6 +690,8 @@ export default {
                         }
                     }).catch(error => {
                         console.log(error, 'eeee');
+                    }).finally(() => {
+                        this.profitConfirmLoad = false;
                     });
                 }
                 else {
@@ -729,6 +736,7 @@ export default {
         handleSettlementModalSure() {
             this.$refs.settlementModalForm.validate(valid => {
                 if (valid) {
+                    this.settlementConfirmLoad = true;
                     const {advertiserId, productId, mediaId, uploadYears} = this.settlementModalForm;
                     const paramsData = {
                         advertiserId,
@@ -749,6 +757,8 @@ export default {
                         }
                     }).catch(error => {
                         console.log(error, 'eeee');
+                    }).finally(() => {
+                        this.settlementConfirmLoad = false;
                     });
                 }
                 else {
@@ -763,6 +773,7 @@ export default {
                 mediaId: 1,
                 uploadYears: ''
             };
+            this.allProductListOption = [];
             this.downLoadAccountNum = 0;
             this.downLoadImgNum = 0;
             this.settlementModalStatus = false;
@@ -776,6 +787,10 @@ export default {
             if (this.settlementModalForm.productId) {
                 this.handleGetDownLoadAllNum();
             }
+            if (!dateString) {
+                this.downLoadAccountNum = 0;
+                this.downLoadImgNum = 0;
+            }
         },
         // 查询的按钮
         handleQueryList() {