yumeng 2 jaren geleden
bovenliggende
commit
c7260eb3f1
1 gewijzigde bestanden met toevoegingen van 68 en 17 verwijderingen
  1. 68 17
      src/views/modules/policy-management/appRecharge.vue

+ 68 - 17
src/views/modules/policy-management/appRecharge.vue

@@ -130,6 +130,8 @@
                         </a-button
                         >
                         <a-button type="primary" @click="handleQueryList">搜索</a-button>
+                        <a-button @click="exportData" :loading="exportLoading">导出</a-button>
+
                     </a-form-item>
                 </a-row>
             </a-form>
@@ -530,9 +532,11 @@
                     >
                         <div v-for="(item, index) in queryByIdList.accountList" :key="index">
                             <a-form-model-item label="序号" prop="index" style="color: red">
-                                {{
-                                index + 1
-                                }}
+                                {{index + 1}}
+                            </a-form-model-item>
+
+                            <a-form-model-item label="端口" prop="agentName" v-if="item.agentName != '' && item.agentName != null">
+                                {{item.agentName}}
                             </a-form-model-item>
 
                             <a-form-model-item label="账户" prop="accountName">
@@ -593,27 +597,21 @@
                 title="查看图片"
                 :visible="lookImageVisible"
                 :footer="null"
-                @cancel="lookImageVisible = false"
-            >
+                @cancel="lookImageVisible = false">
                 <a-carousel
                     arrows
-                    v-if="lookImageData && lookImageData != '-'"
-
-                >
+                    v-if="lookImageData && lookImageData != '-'">
                     <div
                         v-for="(item, index) in JSON.parse(lookImageData)"
                         :key="index"
-                        class="content"
-                    >
+                        class="content">
                         <div style="display: flex !important; justify-content: space-around">
                             <div
                                 style="
                   display: flex;
                   flex-direction: column;
                   align-items: center;
-                  width: 400px;
-                "
-                            >
+                  width: 400px;">
                                 <img :src="item" style="width: 100%; max-height: 720px"/>
                             </div>
                         </div>
@@ -622,14 +620,12 @@
                         type="left-circle"
                         slot="prevArrow"
                         slot-scope
-                        style="left: 10px; z-index: 100; font-size: 30px; color: black"
-                    />
+                        style="left: 10px; z-index: 100; font-size: 30px; color: black"/>
                     <a-icon
                         type="right-circle"
                         slot="nextArrow"
                         slot-scope
-                        style="right: 10px; z-index: 100; font-size: 30px; color: black"
-                    />
+                        style="right: 10px; z-index: 100; font-size: 30px; color: black"/>
                 </a-carousel>
             </a-modal>
 
@@ -861,6 +857,23 @@
                         dataIndex: "advertiserName",
                         width: 250,
                     },
+                    {
+                        title: "媒体",
+                        dataIndex: "paymentMedia",
+                        align: "center",
+                        width: 100,
+                        customRender(t) {
+                            if (t == "1") {
+                                return "头条";
+                            } else if (t == "2") {
+                                return "快手";
+                            }else if (t == "7") {
+                                return "磁力金牛";
+                            }else if (t == "9") {
+                                return "广点通";
+                            }
+                        },
+                    },
 
                     {
                         title: "是否后补",
@@ -1030,6 +1043,44 @@
             // this.handleAddGetArea();
         },
         methods: {
+
+            exportData() {
+                this.exportLoading = true;
+                const paramsData = {
+                    userId: this.userInfo().id,
+                    advertiserName: this.configForm.advertiserName,
+                    productName: this.configForm.productName,
+                    paymentMedia: this.configForm.paymentMedia,
+                    rebateType: this.configForm.rebateType,
+                    auditStatus: this.configForm.auditStatus,
+                    startDate:
+                        this.configForm.time && this.configForm.time.length == 2
+                            ? moment(this.configForm.time[0]).format("YYYY-MM-DD")
+                            : null,
+                    endDate:
+                        this.configForm.time && this.configForm.time.length == 2
+                            ? moment(this.configForm.time[1]).format("YYYY-MM-DD")
+                            : null,
+                };
+                downFile(urlAcount + '/jeecg-boot/financePayment/rechargeApplication/excelInfo', paramsData).then(res => {
+                    // console.log(res)
+                    this.exportLoading = false;
+                    let blob = new Blob([res], {
+                        type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+                    })
+                    // console.log(blob)
+                    let downloadElement = document.createElement('a')
+                    let href = window.URL.createObjectURL(blob) //创建下载的链接
+                    downloadElement.href = href
+                    downloadElement.download = '充值列表' + '.xlsx'    //下载后文件名
+                    document.body.appendChild(downloadElement)
+                    downloadElement.click() //点击下载
+                    document.body.removeChild(downloadElement) //下载完成移除元素
+                    window.URL.revokeObjectURL(href) //释放掉blob对象
+                })
+            },
+
+
             lookImageClick(item) {
                 this.lookImageVisible = true;
                 this.lookImageData = item;