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

导出记录、充值记录完成,订单中心和充值中心导出已优化

hzj18279462576@163.com 1 год назад
Родитель
Сommit
bd2d33bea0

BIN
src/assets/img/success.png


Разница между файлами не показана из-за своего большого размера
+ 1 - 1
src/icons/svg/icon-xiazai.svg


Разница между файлами не показана из-за своего большого размера
+ 0 - 1
src/icons/svg/icon-xiazai2.svg


+ 4 - 0
src/main.js

@@ -29,6 +29,10 @@ Vue.use(Viewer, {
 })
 Vue.prototype.Tupiantou ='https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload'//线上
 // Vue.prototype.Tupiantou ='https://www.daweilinli.com/sqx_fast/alioss/upload'//线下
+Vue.prototype.Tupian =function(img){
+    return 'https://moxuanyunshang.oss-cn-beijing.aliyuncs.com'+img
+  }//全局图片请求头
+
 
 Viewer.setDefaults({
   // 工具栏按钮的控制

+ 1 - 0
src/views/common/login.vue

@@ -84,6 +84,7 @@ import {
               })
             }).then(({data}) => {
               if (data && data.code === 0) {
+                this.$cookie.set('username', this.dataForm.userName)
                 this.$cookie.set('token', data.token)
                 this.$router.replace({ name: 'home' })
               } else {

+ 93 - 74
src/views/downLoad/downList.vue

@@ -3,9 +3,10 @@
     <div style="display: inline-block;">
       <span>状态:</span>
       <el-select
-        v-model="successFlag"
+        v-model="state"
         style="width:150px;margin-left: 10px;"
         @change="select()"
+        :clearable="true"
       >
         <el-option
           v-for="item in statesnum2"
@@ -18,12 +19,12 @@
       <div style="margin:5px;display: inline-block;">
         <span>开始时间:</span>
         <el-date-picker
-          style="width: 160px;margin-left: 10px;"
+          style="width: 220px;margin-left: 10px;"
           v-model="startTime"
           align="right"
           type="datetime"
-          format="yyyy-MM-dd"
-          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
           placeholder="选择开始时间"
         >
         </el-date-picker
@@ -32,12 +33,12 @@
       <div style="margin:5px;display: inline-block;">
         <span>截止时间:</span>
         <el-date-picker
-          style="width: 160px;margin-left: 10px;"
+          style="width: 220px;margin-left: 10px;"
           v-model="endTime"
           align="right"
           type="datetime"
-          format="yyyy-MM-dd"
-          value-format="yyyy-MM-dd"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
           placeholder="选择截止时间"
         >
         </el-date-picker>
@@ -58,6 +59,14 @@
         @click="cleans"
         >重置
       </el-button>
+      <el-button
+        style="margin-left:15px;"
+        size="mini"
+        type="primary"
+        icon="document"
+        @click="refresh"
+        >刷新
+      </el-button>
     </div>
     <el-table v-loading="tableDataLoading" :data="duanxinData.list">
       <el-table-column fixed prop="complaintId" label="编号" width="100">
@@ -65,34 +74,47 @@
           <span>{{ scope.$index + 1 }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="orderId" label="任务名称" align="center">
+      <el-table-column prop="fileName" label="任务名称" align="center">
       </el-table-column>
-      <el-table-column prop="successFlag" label="导出时间" align="center">
+      <el-table-column prop="updateTime" label="导出时间" align="center">
       </el-table-column>
       <el-table-column
-        prop="sendContent"
+        prop="exportId"
         label="导出id"
         align="center"
       ></el-table-column>
       <el-table-column
-        prop="sendResult"
+        prop="conditionDetail"
         label="导出条件"
         align="center"
       >
       </el-table-column>
       <el-table-column
-        prop="sendTo"
-        label="文件大小"
+        prop="fileSize"
+        label="文件大小/kb"
         align="center"
       ></el-table-column>
       <el-table-column
         prop="sendFromShopName"
         label="状态"
         align="center"
-      ></el-table-column>
-      <el-table-column label="操作" width="150" align="center">
+      >
         <template slot-scope="scope">
-          <span>下载</span>
+          <span v-if="scope.row.flag==0">待导出</span>
+          <span v-if="scope.row.flag==1">导出完成</span>
+          <span v-if="scope.row.flag==2">导出失败</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" width="150" align="center">
+        <template slot-scope="scope" v-if="scope.row.flag==1">
+          <el-button
+            size="mini"
+            type="primary"
+            @click="downFile(scope.row)"
+            style="margin: 5px;"
+          >
+            下载
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -120,48 +142,19 @@ export default {
       activeName: "first",
       tableDataLoading: false,
       dialogFormVisible: false,
-      tableData: [],
       checkBoxData: [], //多选框选择的值
-      helpTakeId: "",
-      info: {
-        stockDate: this.getNowTime() //日期
-      },
-      info1: {
-        stockDate1: this.getNowTime1() //日期
-      },
-      info2: {
-        stockDate2: this.getNowTime2() //日期
-      },
+
       startTime: "",
       endTime: "",
-      orderId: "",
-      sendTo: "",
-      fromTo: "",
-      statesnum2: [
-        {
-          label: "全部",
-          value: ""
-        },
-        {
-          label: "发送成功",
-          value: 1
-        },
-        {
-          label: "发送失败",
-          value: 0
-        }
+      filename: "",
+      state: "",
+
+      statesnum2:[
+        {label:"待导出",value:0},
+        {label:"导出完成",value:1},
+        {label:"导出失败",value:2},
       ],
-      successFlag: "",
       duanxinData: []
-      // info: {
-      // 	stockDate: this.getNowTime(), //日期
-      // },
-      // info1: {
-      // 	stockDate1: this.getNowTime1(), //日期
-      // },
-      // info2: {
-      // 	stockDate2: this.getNowTime2(), //日期
-      // },
     };
   },
   methods: {
@@ -220,18 +213,19 @@ export default {
     select() {
       this.page = 1;
       this.limit = 10;
-      // this.dataSelect();
+      this.dataSelect();
     },
     // 重置
     cleans() {
-      this.orderId = "";
-      this.successFlag = "";
-      this.sendTo = "";
-      this.fromTo = "";
+      // this.filename = "";
+      this.state = "";
       this.startTime = "";
       this.endTime = "";
       this.page = 1;
-      // this.dataSelect();
+      this.dataSelect();
+    },
+    refresh() {
+      this.dataSelect();
     },
     // 获取派单数据列表
     dataSelect() {
@@ -242,37 +236,62 @@ export default {
       // 	  this.startTime = this.info.stockDate
       //   }
       this.tableDataLoading = true;
+      var userId = this.$cookie.get('userId')
       this.$http({
-        url: this.$http.adornUrl("admin/tb-indent-sms/log"),
+        url: this.$http.adornUrl("admin/export/listByUser"),
         method: "get",
         params: this.$http.adornParams({
-          page: this.page,
-          limit: this.limit,
-          orderId: this.orderId, //订单id
-          successFlag: this.successFlag, //是否发送成功
-          sendTo: this.sendTo, //接受人
-          fromTo: this.fromTo, //发送骑手
+          curretPage: this.page,
+          pageSize: this.limit,
+          filename:'',// 文件名称
+          userId:userId,
+          state: this.state, //订单id
           startTime: this.startTime, //开始时间
           endTime: this.endTime, //结束时间
-          sourceType: 2 //1骑手、2商家,默认为1
         })
       }).then(({ data }) => {
         if (data && data.code === 0) {
           this.tableDataLoading = false;
-          for (var i in data.data.list) {
-            if (data.data.list[i].imgs) {
-              data.data.list[i].imgs = data.data.list[i].imgs.split(",");
-            }
-          }
           let returnData = data.data;
           this.duanxinData = returnData;
-          console.log(data.data,'商家短信列表');
+          console.log(data.data,'导出文件列表');
+        }
+      });
+    },
+    // 下载文件
+    downFile(row){
+      var userId = this.$cookie.get('userId')
+      this.$http({
+        url: this.$http.adornUrl("admin/export/readBuffer"),
+        method: "get",
+        responseType: "blob",
+        params: this.$http.adornParams({
+          filename:row.fileName,// 文件名称
+          userId:userId,
+        })
+      }).then(({ data }) => {
+        console.log(data, "导出");
+        let blob = new Blob([data], {
+          type:
+            "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+        });
+        if (window.navigator.msSaveOrOpenBlob) {
+          navigator.msSaveBlob(blob);
+        } else {
+          let url = window.URL.createObjectURL(blob);
+          let elink = document.createElement("a");
+          elink.download = row.fileName;
+          elink.style.display = "none";
+          elink.href = url;
+          document.body.appendChild(elink);
+          elink.click();
+          document.body.removeChild(elink);
         }
       });
     }
   },
   mounted() {
-    // this.dataSelect();
+    this.dataSelect();
   },
 };
 </script>

+ 175 - 44
src/views/mission/mission.vue

@@ -192,7 +192,7 @@
           size="mini"
           type="warning"
           icon="document"
-          @click="exportBtn"
+          @click="exportList"
         >
           导出Excel
         </el-button>
@@ -572,6 +572,48 @@
         </el-pagination>
       </div>
     </el-tab-pane>
+     <!-- 导出限制 -->
+     <el-dialog
+      custom-class="export"
+      :visible.sync="exportVisible"
+      center
+      :title="exportTitle"
+      :close-on-click-modal="false"
+    >
+      <div class="con" v-show="exportFlag == 1">
+        <img src="../../assets/img/error.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >当前导出条数超过50000条,暂不支持导出</span
+        >
+        <span style="font-size:14px;color: #808080;"
+          >(注:数据中的图片、附件只能以链接的形式导出)</span
+        >
+      </div>
+      <div class="con" v-show="exportFlag == 2">
+        <img src="../../assets/img/loading.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >导出中...</span
+        >
+        <span style="font-size:14px;color: #808080;"
+          >(注:请到个人导出记录查看并下载)</span
+        >
+      </div>
+      <div class="con" v-show="exportFlag == 3">
+        <img src="../../assets/img/success.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >导出成功</span
+        >
+        <span style="font-size:14px;color: #808080;"
+          >(注:请到个人导出记录查看并下载)</span
+        >
+      </div>
+      <div class="btn">
+        <el-button type="primary" @click="exportAffirm">确定</el-button>
+      </div>
+    </el-dialog>
     <!-- 任务拒绝弹框 -->
     <el-dialog title="任务拒绝" :visible.sync="dialogFormVisible7" center>
       <div style="margin-bottom: 10px;">
@@ -1100,7 +1142,12 @@ export default {
       startTime: "",
       endTime: "",
       payStartTime: "", //支付开始时间
-      payEndTime: ""
+      payEndTime: "",
+
+      // 导出限制
+      exportTitle: "导出错误",
+      exportVisible: false,
+      exportFlag: 1 //1 超出限制  2导出中
     };
   },
   methods: {
@@ -1819,48 +1866,113 @@ export default {
       this.dataSelectUser();
     },
     // 导出
-    exportBtn() {
-      this.$http({
-        url: this.$http.adornUrl("admin/order/excelOrder"),
-        method: "get",
-        responseType: "blob",
-        params: this.$http.adornParams({
-          // 'page': page,
-          // 'size': this.size,
-          phone: this.phone,
-          userName: this.userName,
-          orderNumber: this.orderNumber,
-          status: this.status,
-          shopName: this.shopName,
-          orderSequence: this.orderSequence,
-          orderType: this.orderType,
-          reservationFlag: this.reservationFlag,
-          indentStatus: this.indentStatus,
-          riderPhone: this.riderPhone,
-          startTime: this.startTime,
-          endTime: this.endTime,
-          payStartTime: this.payStartTime,
-          payEndTime: this.payEndTime
-        })
-      }).then(({ data }) => {
-        console.log(data, "导出");
-        let blob = new Blob([data], {
-          type:
-            "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+    // exportBtn() {
+    //   var userId = this.$cookie.get('userId')
+    //   this.$http({
+    //     url: this.$http.adornUrl("admin/export/excelOrder"),
+    //     method: "get",
+    //     // responseType: "blob",
+    //     params: this.$http.adornParams({
+    //       // 'page': page,
+    //       // 'size': this.size,
+    //       userId:userId,
+    //       phone: this.phone,
+    //       userName: this.userName,
+    //       orderNumber: this.orderNumber,
+    //       status: this.status,
+    //       shopName: this.shopName,
+    //       orderSequence: this.orderSequence,
+    //       orderType: this.orderType,
+    //       reservationFlag: this.reservationFlag,
+    //       indentStatus: this.indentStatus,
+    //       riderPhone: this.riderPhone,
+    //       startTime: this.startTime,
+    //       endTime: this.endTime,
+    //       payStartTime: this.payStartTime,
+    //       payEndTime: this.payEndTime
+    //     })
+    //   }).then(({ data }) => {
+    //     console.log(data, "导出");
+    //     // let blob = new Blob([data], {
+    //     //   type:
+    //     //     "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+    //     // });
+    //     // if (window.navigator.msSaveOrOpenBlob) {
+    //     //   navigator.msSaveBlob(blob);
+    //     // } else {
+    //     //   let url = window.URL.createObjectURL(blob);
+    //     //   let elink = document.createElement("a");
+    //     //   elink.download = "订单列表.xlsx";
+    //     //   elink.style.display = "none";
+    //     //   elink.href = url;
+    //     //   document.body.appendChild(elink);
+    //     //   elink.click();
+    //     //   document.body.removeChild(elink);
+    //     // }
+    //   });
+    // },
+    exportList() {
+      this.exportVisible = true;
+      console.log(this.tableData2.totalCount,'导出条数');
+
+      if (this.tableData2.totalCount >= 50000) {
+        this.exportTitle = "导出错误";
+        this.exportFlag = 1;
+      } else {
+        this.exportTitle = "导出";
+        this.exportFlag = 2;
+        this.exportVisible = true;
+        var userId = this.$cookie.get('userId')
+        this.$http({
+          url: this.$http.adornUrl("admin/export/excelOrder"),
+          method: "get",
+          // responseType: "blob",
+          params: this.$http.adornParams({
+            // 'page': page,
+            // 'size': this.size,
+            userId:userId,
+            phone: this.phone,
+            userName: this.userName,
+            orderNumber: this.orderNumber,
+            status: this.status,
+            shopName: this.shopName,
+            orderSequence: this.orderSequence,
+            orderType: this.orderType,
+            reservationFlag: this.reservationFlag,
+            indentStatus: this.indentStatus,
+            riderPhone: this.riderPhone,
+            startTime: this.startTime,
+            endTime: this.endTime,
+            payStartTime: this.payStartTime,
+            payEndTime: this.payEndTime
+          })
+        }).then(({ data }) => {
+          console.log(data, "导出");
+          if(data.code==0){
+            this.exportTitle = "导出成功";
+            this.exportFlag = 3;
+          }
+          // let blob = new Blob([data], {
+          //   type:
+          //     "application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
+          // });
+          // if (window.navigator.msSaveOrOpenBlob) {
+          //   navigator.msSaveBlob(blob);
+          // } else {
+          //   let url = window.URL.createObjectURL(blob);
+          //   let elink = document.createElement("a");
+          //   elink.download = "订单列表.xlsx";
+          //   elink.style.display = "none";
+          //   elink.href = url;
+          //   document.body.appendChild(elink);
+          //   elink.click();
+          //   document.body.removeChild(elink);
+          // }
         });
-        if (window.navigator.msSaveOrOpenBlob) {
-          navigator.msSaveBlob(blob);
-        } else {
-          let url = window.URL.createObjectURL(blob);
-          let elink = document.createElement("a");
-          elink.download = "订单列表.xlsx";
-          elink.style.display = "none";
-          elink.href = url;
-          document.body.appendChild(elink);
-          elink.click();
-          document.body.removeChild(elink);
-        }
-      });
+      }
+    },
+    exportAffirm() {
+      this.exportVisible = false;
     }
   },
 
@@ -1871,4 +1983,23 @@ export default {
 };
 </script>
 
-<style></style>
+<style scoped>
+  /* 导出限制 */
+  .el-tabs  >>> .export {
+  width: 500px;
+}
+.el-tabs  >>> .export .con {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  margin-bottom: 20px;
+}
+.el-tabs >>> .export img {
+  width: 70px;
+}
+.el-tabs >>> .export .btn {
+  display: flex;
+  flex-direction: row-reverse;
+}
+</style>

+ 49 - 11
src/views/recharge/recharge.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div class="downloadList">
     <div style="display: inline-block;">
       <span>充值订单号:</span>
       <el-input
@@ -134,12 +134,13 @@
       :visible.sync="exportVisible"
       center
       :title="exportTitle"
+      :close-on-click-modal="false"
     >
       <div class="con" v-show="exportFlag == 1">
         <img src="../../assets/img/error.png" alt="" />
         <span
           style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
-          >当前导出条数超过10000条,暂不支持导出</span
+          >当前导出条数超过50000条,暂不支持导出</span
         >
         <span style="font-size:14px;color: #808080;"
           >(注:数据中的图片、附件只能以链接的形式导出)</span
@@ -155,6 +156,16 @@
           >(注:请到个人导出记录查看并下载)</span
         >
       </div>
+      <div class="con" v-show="exportFlag == 3">
+        <img src="../../assets/img/success.png" alt="" />
+        <span
+          style="font-size:20px;color: #000;font-weight: 800;margin: 18px 0 5px;"
+          >导出成功</span
+        >
+        <span style="font-size:14px;color: #808080;"
+          >(注:请到个人导出记录查看并下载)</span
+        >
+      </div>
       <div class="btn">
         <el-button type="primary" @click="exportAffirm">确定</el-button>
       </div>
@@ -253,6 +264,14 @@ export default {
       }).then(({ data }) => {
         console.log(data, "修改备注");
         if (data && data.code === 0) {
+          this.$message({
+          message: "修改成功",
+          type: "success",
+          duration: 1500,
+          onClose: () => {
+            this.dataSelect();
+          }
+            });
           this.dialogFormVisible = false;
           this.dataSelect();
         }
@@ -261,13 +280,32 @@ export default {
 
     exportList() {
       this.exportVisible = true;
-      if (this.duanxinData.totalCount.length >= 10) {
+      console.log(this.duanxinData.totalCount,'导出条数');
+
+      if (this.duanxinData.totalCount >= 50000) {
         this.exportTitle = "导出错误";
         this.exportFlag = 1;
       } else {
-        this.exportTitle = "导出";
+        this.exportTitle = "导出";
         this.exportFlag = 2;
         this.exportVisible = true;
+        var userId = this.$cookie.get('userId')
+        // rechargeOrder, String acount,String userId
+        this.$http({
+          url: this.$http.adornUrl("admin/export/excelRecharge"),
+          method: "get",
+          params: this.$http.adornParams({
+            userId:userId,
+            rechargeOrder: this.orderNo,
+            acount: this.phone,
+          })
+        }).then(({ data }) => {
+          console.log(data, "导出");
+          if(data.code==0){
+            this.exportTitle = "导出成功";
+            this.exportFlag = 3;
+          }
+        });
       }
     },
     exportAffirm() {
@@ -281,33 +319,33 @@ export default {
 </script>
 
 <style scoped>
->>> .remark {
+.downloadList >>> .remark {
   width: 400px;
 }
->>> .remark .con {
+.downloadList  >>> .remark .con {
   display: flex;
   margin-bottom: 20px;
 }
->>> .remark .btn {
+.downloadList  >>> .remark .btn {
   display: flex;
   flex-direction: row-reverse;
 }
 
 /* 导出限制 */
->>> .export {
+.downloadList  >>> .export {
   width: 500px;
 }
->>> .export .con {
+.downloadList  >>> .export .con {
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
   margin-bottom: 20px;
 }
->>> .export img {
+.downloadList >>> .export img {
   width: 70px;
 }
->>> .export .btn {
+.downloadList >>> .export .btn {
   display: flex;
   flex-direction: row-reverse;
 }

+ 1 - 1
src/views/selfShop/shopPublish.vue

@@ -894,7 +894,7 @@
           return
         }
 				if (this.goodsParticularsPicture.length == 0) {
-        this.goodsParticularsPicture=['https://moxuanyunshang.oss-cn-beijing.aliyuncs.com/xiangqing/12ecc56005731327e02f42f0d851848.png']
+        this.goodsParticularsPicture=[this.Tupian('/xiangqing/12ecc56005731327e02f42f0d851848.png')]
 				  // this.$notify({
 				  //   title: '提示',
 				  //   duration: 1800,

+ 27 - 5
src/views/user/userDetail.vue

@@ -1362,6 +1362,20 @@
           <el-input style="width:50%;" v-model="money"
             placeholder="请输入金额" @change="moneyChange"></el-input>
         </div>
+        <div style="margin-bottom: 10px;" v-if="this.classIndex==1">
+          <span style="width: 200px;display: inline-block;text-align: right;">备注:</span>
+          <!-- type="number"  :min="0" :max="100" :controls="false" -->
+          <el-input
+            style="width: 300px;"
+            placeholder="请输入备注"
+            v-model="remark"
+            type="textarea"
+            show-word-limit
+            :rows="4"
+          >
+          </el-input>
+        </div>
+
         <div slot="footer" class="dialog-footer">
           <el-button @click="dialogFormVisible1 = false">取 消</el-button>
           <el-button type="primary" @click="StairNoticeTo1()">确 定</el-button>
@@ -1521,6 +1535,7 @@
         page1: 1,
         userId: '',
         money: '',
+        remark:'',
         title: '',
         content: '',
         phone: '',
@@ -1643,6 +1658,7 @@
       }
     },
     methods: {
+      // 判断修改金额中的金额是否输入正确
       moneyChange(val){
         console.log(val);
         let reg=/^(([1-9]\d*)|\d)(\.\d{1,2})?$/
@@ -2089,6 +2105,7 @@
       rechargenone(userId,index) {
         this.type = ''
         this.money = ''
+        this.remark = ''
         this.classIndex = index
         this.dialogFormVisible1 = true
       },
@@ -2113,6 +2130,11 @@
           })
           return
         }
+        let argument={
+          'userId': userId,
+          'money':this.money,
+          'type':this.type
+        }
         if(this.classIndex==1){
           if (this.type == 2) {
             if (this.money > this.tablemoney.money) {
@@ -2125,6 +2147,8 @@
               return
             }
           }
+          argument.account=this.$cookie.get('username')
+          argument.remark=this.remark;
           var urls = 'admin/dataCentre/addUserMoney'
         }
         if(this.classIndex==2){
@@ -2138,11 +2162,7 @@
         this.$http({
           url: this.$http.adornUrl(urls),
           method: 'get',
-          params: this.$http.adornParams({
-            'userId': userId,
-            'money':this.money,
-            'type':this.type
-          })
+          params: this.$http.adornParams(argument)
         }).then(({
           data
         }) => {
@@ -3273,4 +3293,6 @@
   .text_color span {
     margin-right: 5px;
   }
+
+  
 </style>