Explorar o código

Merge branch 'dev' of lianghanqiang/ldt-manger-web into master

July %!s(int64=4) %!d(string=hai) anos
pai
achega
ea72c546a3

+ 5 - 4
package-lock.json

@@ -3626,8 +3626,9 @@
     },
     "crypto-js": {
       "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz",
-      "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw=="
+      "resolved": "https://registry.nlark.com/crypto-js/download/crypto-js-4.1.1.tgz?cache=0&sync_timestamp=1626954954639&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcrypto-js%2Fdownload%2Fcrypto-js-4.1.1.tgz",
+      "integrity": "sha1-nkhbzwNSEEG9hYRHhrg/t2GXNs8=",
+      "dev": true
     },
     "css-color-names": {
       "version": "0.0.4",
@@ -6838,8 +6839,8 @@
     },
     "js-md5": {
       "version": "0.7.3",
-      "resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz",
-      "integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
+      "resolved": "https://registry.npm.taobao.org/js-md5/download/js-md5-0.7.3.tgz",
+      "integrity": "sha1-tPL7sLMnRV9ZjWcn447Ccs0Jw/I="
     },
     "js-message": {
       "version": "1.0.7",

+ 1 - 1
package.json

@@ -16,7 +16,6 @@
     "axios": "^0.18.0",
     "babel-polyfill": "^6.26.0",
     "classlist-polyfill": "^1.2.0",
-    "crypto-js": "^4.0.0",
     "echarts": "^5.2.1",
     "element-ui": "^2.15.1",
     "js-base64": "^2.5.1",
@@ -39,6 +38,7 @@
     "@vue/cli-plugin-eslint": "^3.1.5",
     "@vue/cli-service": "^3.1.4",
     "chai": "^4.1.2",
+    "crypto-js": "^4.1.1",
     "node-sass": "^4.12.0",
     "sass-loader": "^7.0.1",
     "vue-template-compiler": "^2.5.17",

+ 13 - 0
src/api/ldt_bills/balancebills.js

@@ -12,6 +12,19 @@ export const getList = (current, size, params) => {
   })
 }
 
+export const generateList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_bills/balancebills/generateList',
+    method: 'post',
+    responseType:"blob",
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
 export const censusPrice = ( params) => {
   return request({
     url: '/api/ldt_bills/balancebills/censusPrice',

+ 13 - 0
src/api/ldt_bills/bills.js

@@ -12,6 +12,19 @@ export const getList = (current, size, params) => {
   })
 }
 
+export const generateList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_bills/bills/generateList',
+    method: 'post',
+    responseType:"blob",
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
 export const censusPrice = ( params) => {
   return request({
     url: '/api/ldt_bills/bills/censusPrice',

+ 63 - 0
src/api/ldt_bills/frozenrec.js

@@ -0,0 +1,63 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_bills/frozenrec/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/ldt_bills/frozenrec/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/ldt_bills/frozenrec/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/ldt_bills/frozenrec/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/ldt_bills/frozenrec/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const generateList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_bills/frozenrec/generateList',
+    method: 'post',
+    responseType:"blob",
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+

+ 13 - 0
src/api/ldt_bills/platformbills.js

@@ -12,6 +12,19 @@ export const getList = (current, size, params) => {
   })
 }
 
+export const generateList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_bills/platformbills/generateList',
+    method: 'post',
+    responseType:"blob",
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
 export const censusPrice = ( params) => {
   return request({
     url: '/api/ldt_bills/platformbills/censusPrice',

+ 13 - 0
src/api/ldt_bills/pointbills.js

@@ -12,6 +12,19 @@ export const getList = (current, size, params) => {
   })
 }
 
+export const generateList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_bills/pointbills/generateList',
+    method: 'post',
+    responseType:"blob",
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
 export const getDetail = (id) => {
   return request({
     url: '/api/ldt_bills/pointbills/detail',

+ 13 - 0
src/api/ldt_bills/transferrec.js

@@ -12,6 +12,19 @@ export const getList = (current, size, params) => {
   })
 }
 
+export const generateList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_bills/transferrec/generateList',
+    method: 'post',
+    responseType:"blob",
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
 export const getDetail = (id) => {
   return request({
     url: '/api/ldt_bills/transferrec/detail',

+ 13 - 0
src/api/ldt_bills/withdrawrec.js

@@ -12,6 +12,19 @@ export const getList = (current, size, params) => {
   })
 }
 
+export const generateList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_bills/withdrawrec/generateList',
+    method: 'post',
+    responseType:"blob",
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
 export const getDetail = (id) => {
   return request({
     url: '/api/ldt_bills/withdrawrec/detail',

+ 10 - 0
src/api/ldt_mall/mall.js

@@ -105,3 +105,13 @@ export const getProductFeeByMall = () => {
     method: 'get',
   })
 }
+
+export const getMallDetail = (id) => {
+  return request({
+    url: '/api/ldt_mall/mall/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}

+ 50 - 0
src/api/ldt_notice/notice.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_notice/noticecontent/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/ldt_notice/noticecontent/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/ldt_notice/noticecontent/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/ldt_notice/noticecontent/submitAndPush',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/ldt_notice/noticecontent/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 50 - 0
src/api/ldt_notice/noticereceiver.js

@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/ldt_notice/notice/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/ldt_notice/notice/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/api/ldt_notice/notice/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/api/ldt_notice/notice/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/api/ldt_notice/notice/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 10 - 0
src/api/ldt_shop/shop.js

@@ -146,3 +146,13 @@ export const getProductFeeByShop = () => {
     method: 'get',
   })
 }
+
+export const getShopDetail = (id) => {
+  return request({
+    url: '/api/ldt_shop/shop/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}

+ 1 - 1
src/config/env.js

@@ -1,5 +1,5 @@
 // 阿里矢量图标库配置
-let iconfontVersion = ['2880418_9kghzf387b'];
+let iconfontVersion = ['2880418_c4r48qm6fvo'];
 let iconfontUrl = `//at.alicdn.com/t/font_$key.css`;
 
 let baseUrl = '';

+ 3 - 2
src/page/login/index.vue

@@ -83,6 +83,7 @@
     props: [],
     methods: {
       initType(){
+        //let domain = "http://ldt-mall.guosen-fumao.cn";
         let domain = getTopUrl();
         switch (domain) {
           case "http://ldt.guosen-fumao.cn":
@@ -92,13 +93,13 @@
             this.type = "shop"
             break;
           case "http://ldt-mall.guosen-fumao.cn":
-            this.type = "shop"
+            this.type = "mall"
             break;
           case "http://ldt-agent.guosen-fumao.cn":
             this.type = "agent"
             break;
           default:
-            this.type = "ldt"
+            this.type = "shop"
             break;
         }
       },

+ 2 - 1
src/page/login/userlogin.vue

@@ -168,6 +168,7 @@
       this.refreshCode();
     },
     mounted() {
+      //let domain = "http://ldt-mall.guosen-fumao.cn";
       let domain = getTopUrl();
       switch (domain) {
         case "http://ldt.guosen-fumao.cn":
@@ -185,7 +186,7 @@
           this.type = "agent"
           break;
         default:
-          this.type = "ldt"
+          this.type = "shop"
           this.loginForm.tenantId = "000000";
           this.loginForm.username = "admin";
           break;

+ 11 - 0
src/router/axios.js

@@ -15,6 +15,8 @@ import website from '@/config/website';
 import {Base64} from 'js-base64';
 import NProgress from 'nprogress';
 import 'nprogress/nprogress.css';
+import crypto from '@/util/crypto.js';
+
 
 //默认超时时间
 axios.defaults.timeout = 10000;
@@ -35,6 +37,7 @@ axios.interceptors.request.use(config => {
   const meta = (config.meta || {});
   const isToken = meta.isToken === false;
   config.headers['Authorization'] = `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`;
+  config.headers['Content-Type'] = 'application/json;charset=UTF-8';
   //让每个请求携带token
   if (getToken() && !isToken) {
     config.headers[website.tokenHeader] = 'bearer ' + getToken()
@@ -47,6 +50,14 @@ axios.interceptors.request.use(config => {
   if (config.method === 'post' && meta.isSerialize === true) {
     config.data = serialize(config.data);
   }
+  //报文加密
+  console.log(config.method === 'post',"/*************");
+  if (config.method === 'post' && config.data) {
+    let encrypt = crypto.encrypt(JSON.stringify(config.data))
+    config.data=encrypt
+  }
+
+
   return config
 }, error => {
   return Promise.reject(error)

+ 32 - 78
src/util/crypto.js

@@ -1,80 +1,34 @@
-import CryptoJS from 'crypto-js'
-
-export default class crypto {
-  // 使用AesUtil.genAesKey()生成,需和后端配置保持一致
-  static aesKey = "O2BEeIv399qHQNhD6aGW8R8DEj4bqHXm";
-
-  // 使用DesUtil.genDesKey()生成,需和后端配置保持一致
-  static desKey = "jMVCBsFGDQr1USHo";
-
-  /**
-   * aes 加密方法
-   * @param data
-   * @returns {*}
-   */
-  static encrypt(data) {
-    return this.encryptAES(data, this.aesKey);
-  }
-
-  /**
-   * aes 解密方法
-   * @param data
-   * @returns {*}
-   */
-  static decrypt(data) {
-    return this.decryptAES(data, this.aesKey);
-  }
-
-  /**
-   * aes 加密方法,同java:AesUtil.encryptToBase64(text, aesKey);
-   */
-  static encryptAES(data, key) {
-    const dataBytes = CryptoJS.enc.Utf8.parse(data);
-    const keyBytes = CryptoJS.enc.Utf8.parse(key);
-    const encrypted = CryptoJS.AES.encrypt(dataBytes, keyBytes, {
-      iv: keyBytes,
-      mode: CryptoJS.mode.CBC,
-      padding: CryptoJS.pad.Pkcs7
-    });
-    return CryptoJS.enc.Base64.stringify(encrypted.ciphertext);
-  }
-
-  /**
-   * aes 解密方法,同java:AesUtil.decryptFormBase64ToString(encrypt, aesKey);
-   */
-  static decryptAES(data, key) {
-    const keyBytes = CryptoJS.enc.Utf8.parse(key);
-    const decrypted = CryptoJS.AES.decrypt(data, keyBytes, {
-      iv: keyBytes,
-      mode: CryptoJS.mode.CBC,
-      padding: CryptoJS.pad.Pkcs7
-    });
-    return CryptoJS.enc.Utf8.stringify(decrypted);
-  }
-
-  /**
-   * des 加密方法,同java:DesUtil.encryptToBase64(text, desKey)
-   */
-  static encryptDES(data, key) {
-    const keyHex = CryptoJS.enc.Utf8.parse(key);
-    const encrypted = CryptoJS.DES.encrypt(data, keyHex, {
-      mode: CryptoJS.mode.ECB,
-      padding: CryptoJS.pad.Pkcs7
-    });
-    return encrypted.toString();
-  }
+var CryptoJS = require("crypto-js");
+console.log(CryptoJS.HmacSHA1("Message", "Key"));
+
+let crypto = {}
+
+//前后端定义的密钥,AES使用16位
+const CRYPTOJS_KEY = "uAY9ugkHQpvozZeA";
+// 加密
+crypto.encrypt = (plaintText) => {
+  var options = {
+    mode: CryptoJS.mode.ECB,
+    padding: CryptoJS.pad.Pkcs7
+  };
+  var key = CryptoJS.enc.Utf8.parse(CRYPTOJS_KEY);
+  var encryptedData = CryptoJS.AES.encrypt(plaintText, key, options);
+  var encryptedBase64Str = encryptedData.toString().replace(/\//g, "_");
+  encryptedBase64Str = encryptedBase64Str.replace(/\+/g, "-");
+  return encryptedBase64Str;
+}
 
-  /**
-   * des 解密方法,同java:DesUtil.decryptFormBase64(encryptBase64, desKey);
-   */
-  static decryptDES(data, key) {
-    const keyHex = CryptoJS.enc.Utf8.parse(key);
-    const decrypted = CryptoJS.DES.decrypt({
-      ciphertext: CryptoJS.enc.Base64.parse(data)
-    }, keyHex, {
-      mode: CryptoJS.mode.ECB,
-      padding: CryptoJS.pad.Pkcs7
-    });
-    return decrypted.toString(CryptoJS.enc.Utf8);
-  }
+//解密
+crypto.decrypt = (encryptedBase64Str) => {
+  var vals = encryptedBase64Str.replace(/\-/g, '+').replace(/_/g, '/');
+  var options = {
+    mode: CryptoJS.mode.ECB,
+    padding: CryptoJS.pad.Pkcs7
+  };
+  var key = CryptoJS.enc.Utf8.parse(CRYPTOJS_KEY);
+  var decryptedData = CryptoJS.AES.decrypt(vals, key, options);
+  var decryptedStr = CryptoJS.enc.Utf8.stringify(decryptedData);
+  return decryptedStr
 }
+
+export default crypto

+ 36 - 0
src/util/fileUtil.js

@@ -0,0 +1,36 @@
+import FileUtil from './fileUtil'
+
+export default {
+  /**
+   * 创建下载
+   * @param data 数据
+   * @param options 选项
+   * @returns {string}
+   */
+  createDownloadUrl(data, options) {
+    let blob = new Blob([data], options);
+    return FileUtil.createObjectURL(blob);
+  },
+  /**
+   * 创建下载链接
+   * @param obj
+   * @returns {string}
+   */
+  createObjectURL(obj){
+    return window.URL.createObjectURL(obj);
+  },
+  /**
+   * 下载文件
+   * @param data
+   * @param options
+   * @param filename
+   */
+  download(data, options, filename){
+    const url = FileUtil.createDownloadUrl(data,options);
+    const a = document.createElement("a");
+    a.target = "_black";
+    a.download = filename;
+    a.href = url;
+    a.click();
+  }
+}

+ 222 - 49
src/views/ldt_bills/balancebills.vue

@@ -18,40 +18,73 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <template slot-scope="{type,size}" slot="createTimeSearch">
+        <el-radio-group v-model="query.createTime" :size="size" style="float: left">
+          <el-radio-button @click="searchStateChange" :label="-1">全部</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="1">今天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="2">昨天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="3">最近七天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="4">最近30天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="5">本月</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="6">本年</el-radio-button>
+        </el-radio-group>
+        <avue-date v-model="query.createTimeRange" type="datetimerange" format="yyyy年MM月dd日 hh:mm:ss"
+                   value-format="yyyy-MM-dd hh:mm:ss" placeholder="请选择日期"
+                   :size="size"
+                   @change="searchStateChange"
+                   style="width: 280px;margin-left:5px;float: left"
+                   range-separator="-"
+                   start-placeholder="开始日期"
+                   end-placeholder="结束日期"></avue-date>
+      </template>
+      <template slot-scope="{type,size}" slot="payStatusSearch">
+        <el-radio-group v-model="query.payStatus" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='payStatus';
+          }).dicData" :key="index">{{ select.label }}</el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="typeSearch">
+        <el-radio-group v-model="query.type" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='type';
+          }).dicData" :key="index">{{ select.label }}</el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="keySearch">
+        <el-input type="text" placeholder="订单ID" v-model="query.key" :size="size"
+                  style="width: 300px;margin: 1px 5px 1px 0;">
+          <el-button type="primary" :size="size" icon="el-icon-search" slot="append"
+                     @click="searchStateChange"></el-button>
+        </el-input>
+        <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownload">生成列表</el-button>
+        <!--        <el-button type="primary" :size="size">导出已生成列表</el-button>-->
+      </template>
       <template slot="menuLeft">
-        <span type="info" style="font-family: '宋体'">
-          用户付款总金额:
-          <span style="background-color: #d50e71;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{parseFloat(parseFloat(censusPrice.PAY_CONSUMER!==undefined?censusPrice.PAY_CONSUMER:0)  + parseFloat(censusPrice.WECHAT_PAY!==undefined?censusPrice.WECHAT_PAY:0)).toFixed(2)}}
-          </span>
-        </span>
-        <span style="font-family: '宋体'">
-          商场交易总金额:
-          <span style="background-color: #8c70b6;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{parseFloat(censusPrice.MALL_SEND!==undefined?censusPrice.MALL_SEND:0).toFixed(2)}}
-          </span>
-        </span>&nbsp;
-        <span type="warning" style="font-family: '宋体'">
-          商户交易总金额:
-          <span style="background-color: #a9c985;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{parseFloat(censusPrice.SHOP_SEND!==undefined?censusPrice.SHOP_SEND:0).toFixed(2)}}
-          </span>
-        </span>&nbsp;
+        <IconFontComp :option="censusOption"></IconFontComp>
       </template>
     </avue-crud>
   </basic-container>
 </template>
 
 <script>
-  import {getList, getDetail, censusPrice, add, update, remove} from "@/api/ldt_bills/balancebills";
+  import {getList, generateList, getDetail, censusPrice, add, update, remove} from "@/api/ldt_bills/balancebills";
+  import IconFontComp from "./comps/iconfont";
   import {mapGetters} from "vuex";
+  import moment from "moment";
+  import FileUtil from "@/util/fileUtil";
 
   export default {
+    components:{IconFontComp},
     data() {
       return {
         form: {},
-        query: {},
-        censusPrice:{},
+        query: {
+          createTime: -1,
+          createTimeRange: [],
+          type: -1,
+          payStatus: -1,
+        },
         loading: true,
         page: {
           pageSize: 10,
@@ -73,6 +106,9 @@
           editBtn: false,
           viewBtn: true,
           selection: true,
+          searchBtn: false,
+          emptyBtn: false,
+          searchSize: "mini",
           dialogClickModal: false,
           column: [
             {
@@ -94,7 +130,7 @@
               }]
             },
             {
-              label: "付款方",
+              label: "付款方ID",
               prop: "payId",
               hide: true,
               rules: [{
@@ -115,7 +151,7 @@
             {
               label: "交易方式",
               prop: "title",
-              search: true,
+              search: false,
               rules: [{
                 required: true,
                 message: "请输入交易方式",
@@ -132,7 +168,7 @@
               }]
             },
             {
-              label: "收款方",
+              label: "收款方ID",
               prop: "receiveId",
               hide: true,
               rules: [{
@@ -152,10 +188,15 @@
             },
             {
               label: "交易状态",
-              search: true,
               prop: "payStatus",
-              type: "select",
+              search: true,
+              searchslot: true,
+              searchSpan: 24,
+              searchOrder: 3,
               dicData:[{
+                label:"全部",
+                value: -1
+              },{
                 label:"待付款",
                 value:"待付款"
               },{
@@ -176,10 +217,15 @@
             },
             {
               label: "交易类型",
-              search: true,
               prop: "type",
-              type: "select",
+              search: true,
+              searchslot: true,
+              searchSpan: 24,
+              searchOrder: 4,
               dicData:[{
+                label:"全部",
+                value: -1
+              },{
                 label:"用户付款",
                 value:"PAY_CONSUMER"
               },{
@@ -205,13 +251,25 @@
               addDisplay: false,
               editDisplay: false,
               search: true,
-              searchSpan:6,
+              searchSpan: 24,
+              searchOrder: 0,
+              searchslot: true,
               rules: [{
                 required: true,
                 message: "请输入通知时间",
                 trigger: "blur"
               }]
             },
+            {
+              label: "关键字",
+              prop: "key",
+              hide: true,
+              search: true,
+              searchslot: true,
+              searchOrder: 5,
+              searchSpan: 24,
+              editDisplay: false,
+            },
             {
               label: "交易说明",
               prop: "billDesc",
@@ -223,7 +281,36 @@
             }
           ]
         },
-        data: []
+        data: [],
+        censusOption: {
+          span: ()=>24/this.censusOption.data.length,
+          data: [
+            {
+              title: '用户付款',
+              prop: ["PAY_CONSUMER","WECHAT_PAY"],
+              count: 0,
+              decimals: 2,
+              icon: 'el-icon-s-custom',
+              color: '0, 167, 208',
+            },
+            {
+              title: '商场交易',
+              prop: "MALL_SEND",
+              count: 0,
+              decimals: 2,
+              icon: 'el-icon-paperclip',
+              color: '27, 201, 142',
+            },
+            {
+              title: '商户交易',
+              prop: "SHOP_SEND",
+              count: 0,
+              decimals: 2,
+              icon: 'el-icon-s-shop',
+              color: '230, 71, 88',
+            }
+          ]
+        }
       };
     },
     computed: {
@@ -244,6 +331,60 @@
         return ids.join(",");
       }
     },
+    watch: {
+      //监听创建时间变化
+      "query.createTime": {
+        handler(value) {
+          //防止重复调用
+          if (value !== undefined) {
+            this.query.createTimeRange = [];
+            switch (value) {
+              case -1:
+                this.query.createTimeStart = undefined;
+                this.query.createTimeEnd = undefined;
+                break;
+              case 1: //今天
+                this.query.createTimeStart = moment().format("yyyy-MM-DD 00:00:00");
+                this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+                break;
+              case 2: //昨天
+                this.query.createTimeStart = moment().subtract(1, 'days').format("yyyy-MM-DD 00:00:00");
+                this.query.createTimeEnd = moment().subtract(1, 'days').format("yyyy-MM-DD 23:59:59");
+                break;
+              case 3: //近7天
+                this.query.createTimeStart = moment().subtract(7, 'days').format("yyyy-MM-DD HH:mm:ss");
+                this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+                break;
+              case 4: //近30天
+                this.query.createTimeStart = moment().subtract(30, 'days').format("yyyy-MM-DD HH:mm:ss");
+                this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+                break;
+              case 5: //本月
+                this.query.createTimeStart = moment().format("yyyy-MM-01 00:00:00");
+                this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+                break;
+              case 6: //本年
+                this.query.createTimeStart = moment().format("yyyy-01-01 00:00:00");
+                this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+                break;
+              default:
+                break;
+            }
+          }
+        }
+      },
+      //监听创建时间变化
+      "query.createTimeRange": {
+        handler(value) {
+          //防止重复调用
+          if (value.length === 2) {
+            this.query.createTimeStart = value[0];
+            this.query.createTimeEnd = value[1];
+            this.query.createTime = undefined;
+          }
+        }
+      },
+    },
     created() {
       this.getCensusPrice();
     },
@@ -348,21 +489,16 @@
         this.onLoad(this.page, this.query);
       },
       onLoad(page, params = {}) {
-        const {createTime} = this.query;
-        let values = {
-          ...params,
-        };
-        if (createTime) {
-          values = {
-            ...params,
-            createTimeStart: createTime[0],
-            createTimeEnd: createTime[1],
-            ...this.query
-          };
-          values.createTime = null;
+        let values = {};
+        for (const item in params) {
+          if (params[item] !== undefined && params[item] !== -1) {
+            values[item] = params[item];
+          }
         }
+        values.createTime = null;
+        values.createTimeRange = null;
         this.loading = true;
-        getList(page.currentPage, page.pageSize, Object.assign(params, values)).then(res => {
+        getList(page.currentPage, page.pageSize, values).then(res => {
           const data = res.data.data;
           this.page.total = data.total;
           this.data = data.records;
@@ -370,13 +506,50 @@
           this.selectionClear();
         });
       },
-      getCensusPrice(){
-        censusPrice().then(res=>{
-          res.data.data.forEach(ele=>{
-            this.censusPrice[ele.type] = ele.price;
-          })
+      getCensusPrice() {
+        censusPrice().then(res => {
+          res.data.data.forEach(ele => {
+            const find = this.censusOption.data.find(ele2=>{
+              return ele2.prop.indexOf(ele.type)!==-1;
+            });
+            if(find && ele.price){
+              find.count = find.count + parseFloat(ele.price);
+            }
+          });
         });
-      }
+      },
+      //搜索状态改变
+      searchStateChange() {
+        setTimeout(() => {
+          this.onLoad(this.page, this.query);
+        }, 100);
+      },
+      //生成列表并到处
+      generateListAndDownload() {
+        const newQuery = {};
+        for (const item in this.query) {
+          if (this.query[item] !== undefined && this.query[item] !== -1) {
+            newQuery[item] = this.query[item];
+          }
+        }
+        newQuery.createTime = null;
+        newQuery.createTimeRange = null;
+        //获取列表键值对
+        newQuery.keyValue = {};
+        this.option.column.forEach(ele=>{
+          newQuery.keyValue[ele.prop] = ele.label;
+        });
+        newQuery.keyValue = JSON.stringify(newQuery.keyValue);
+        this.loading = true;
+        //生成列表
+        generateList(this.page.currentPage, this.page.pageSize, newQuery).then(res => {
+          FileUtil.download(res.data,{
+            type: "application/vnd.ms-excel"
+          },`生成余额账单-${moment().format("yyyy-MM-DD HH:mm:ss")}.xls`);
+        }).finally(()=>{
+          this.loading = false;
+        });
+      },
     }
   };
 </script>

+ 639 - 462
src/views/ldt_bills/bills.vue

@@ -18,499 +18,676 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <template slot-scope="{type,size}" slot="createTimeSearch">
+        <el-radio-group v-model="query.createTime" :size="size" style="float: left">
+          <el-radio-button @click="searchStateChange" :label="-1">全部</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="1">今天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="2">昨天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="3">最近七天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="4">最近30天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="5">本月</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="6">本年</el-radio-button>
+        </el-radio-group>
+        <avue-date v-model="query.createTimeRange" type="datetimerange" format="yyyy年MM月dd日 hh:mm:ss"
+                   value-format="yyyy-MM-dd hh:mm:ss" placeholder="请选择日期"
+                   :size="size"
+                   @change="searchStateChange"
+                   style="width: 280px;margin-left:5px;float: left"
+                   range-separator="-"
+                   start-placeholder="开始日期"
+                   end-placeholder="结束日期"></avue-date>
+      </template>
+      <template slot-scope="{type,size}" slot="typeSearch">
+        <el-radio-group v-model="query.type" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='type';
+          }).dicData" :key="index">{{ select.label }}
+          </el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="payStatusSearch">
+        <el-radio-group v-model="query.payStatus" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='payStatus';
+          }).dicData" :key="index">{{ select.label }}
+          </el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="keySearch">
+        <el-input type="text" placeholder="订单ID" v-model="query.key" :size="size"
+                  style="width: 300px;margin: 1px 5px 1px 0;">
+          <el-button type="primary" :size="size" icon="el-icon-search" slot="append"
+                     @click="searchStateChange"></el-button>
+        </el-input>
+        <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownload">生成列表</el-button>
+        <!--        <el-button type="primary" :size="size">导出已生成列表</el-button>-->
+      </template>
       <template slot="menuLeft">
-        <span style="font-family: '宋体'">
-          用户付款总额:
-          <span style="background-color: #8c70b6;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{parseFloat(parseFloat(censusPrice.USER_PAY!==undefined?censusPrice.USER_PAY:0) + parseFloat(censusPrice.WECHAT_PAY!==undefined?censusPrice.WECHAT_PAY:0)).toFixed(2)}}
-          </span>
-        </span>&nbsp;
-        <span type="warning" style="font-family: '宋体'">
-          代理充值总额:
-          <span style="background-color: #a9c985;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{parseFloat(censusPrice.AGENT_CHARGE!==undefined?censusPrice.AGENT_CHARGE:0).toFixed(2)}}
-          </span>
-        </span>&nbsp;
-        <span type="info" style="font-family: '宋体'">
-          商场充值总额:
-          <span style="background-color: #d50e71;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{parseFloat(censusPrice.MALL_RECHARGE!==undefined?censusPrice.MALL_RECHARGE:0).toFixed(2)}}
-          </span>
-        </span>
+        <IconFontComp :option="censusOption"></IconFontComp>
       </template>
-<!--      <template slot-scope="scope" slot="dataInfo">-->
-<!--        <div v-if="scope.row.payStatus==='付款成功'">-->
-<!--          优惠金额:-->
-<!--          <div-->
-<!--            style="background-color: #0baaee;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">-->
-<!--            {{parseFloat(scope.row.totalPrice-scope.row.price).toFixed(2)}}-->
-<!--          </div>-->
-<!--        </div>-->
-<!--      </template>-->
+      <!--      <template slot-scope="scope" slot="dataInfo">-->
+      <!--        <div v-if="scope.row.payStatus==='付款成功'">-->
+      <!--          优惠金额:-->
+      <!--          <div-->
+      <!--            style="background-color: #0baaee;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">-->
+      <!--            {{parseFloat(scope.row.totalPrice-scope.row.price).toFixed(2)}}-->
+      <!--          </div>-->
+      <!--        </div>-->
+      <!--      </template>-->
     </avue-crud>
   </basic-container>
 </template>
 
 <script>
-  import {getList, censusPrice, getDetail, add, update, remove} from "@/api/ldt_bills/bills";
-  import {mapGetters} from "vuex";
+import {getList, censusPrice, getDetail, add, update, remove, generateList} from "@/api/ldt_bills/bills";
+import IconFontComp from "./comps/iconfont";
+import {mapGetters} from "vuex";
+import moment from "moment";
+import FileUtil from "@/util/fileUtil";
 
-  export default {
-    data() {
+export default {
+  components:{IconFontComp},
+  data() {
+    return {
+      form: {},
+      query: {
+        createTime: -1,
+        createTimeRange: [],
+        payStatus: -1,
+        type: -1,
+      },
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        addBtn: false,
+        delBtn: false,
+        editBtn: false,
+        viewBtn: true,
+        selection: true,
+        searchBtn: false,
+        emptyBtn: false,
+        searchSize: "mini",
+        dialogClickModal: false,
+        column: [
+          {
+            label: "付款方ID",
+            prop: "payId",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入付款方",
+              trigger: "blur"
+            }]
+          },
+          /*{
+            prop: "dataInfo",
+            slot: true,
+            width: 250,
+            display: false,
+            label: "数据统计"
+          },*/
+          {
+            label: "付款方",
+            prop: "payerName",
+            rules: [{
+              required: true,
+              message: "请输入付款方",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "收款方ID",
+            hide: true,
+            prop: "receiveId",
+            rules: [{
+              required: true,
+              message: "请输入收款方",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "收款方",
+            prop: "receiverName",
+            rules: [{
+              required: true,
+              message: "请输入收款方",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "金额原价",
+            prop: "cost",
+            rules: [{
+              required: true,
+              message: "请输入金额原价",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "折扣",
+            prop: "discount",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入折扣",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "实付金额",
+            prop: "price",
+            rules: [{
+              required: true,
+              message: "请输入实付金额",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "总金额",
+            prop: "totalPrice",
+            rules: [{
+              required: true,
+              message: "请输入实付金额",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "交易类型",
+            prop: "type",
+            search: true,
+            searchSpan: 24,
+            searchslot: true,
+            searchOrder: 1,
+            dicData: [{
+              label: "全部",
+              value: -1
+            }, {
+              label: "用户付款",
+              value: "USER_PAY"
+            }, {
+              label: "代理充值",
+              value: "AGENT_CHARGE"
+            }, {
+              label: "微信充值",
+              value: "WECHAT_PAY"
+            }, {
+              label: "商家充值",
+              value: "MALL_RECHARGE"
+            }],
+            rules: [{
+              required: true,
+              message: "请输入交易类型(用户付款,代理充值,商场充值)",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "付款方式",
+            prop: "payway",
+            rules: [{
+              required: true,
+              message: "请输入付款方式",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "付款插件",
+            prop: "payPlugin",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入付款插件",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "渠道积分id",
+            prop: "channelId",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入渠道积分id",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "支付状态",
+            prop: "payStatus",
+            type: "select",
+            search: true,
+            searchSpan: 24,
+            searchslot: true,
+            searchOrder: 2,
+            dicData: [{
+              label: "全部",
+              value: -1
+            }, {
+              label: "待付款",
+              value: "待付款"
+            }, {
+              label: "付款成功",
+              value: "付款成功"
+            }, {
+              label: "已完结",
+              value: "已完结"
+            }, {
+              label: "取消付款",
+              value: "取消付款"
+            }],
+            rules: [{
+              required: true,
+              message: "请输入待付款,付款成功,取消付款",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "订单标题",
+            prop: "title",
+            rules: [{
+              required: true,
+              message: "请输入订单标题",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "订单描述",
+            prop: "billDesc",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入订单描述",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "订单超时时间",
+            prop: "exTime",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入订单超时时间",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "appid",
+            prop: "appid",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入appid",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "openid",
+            prop: "openid",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入openid",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "消耗积分",
+            prop: "pointNum",
+            rules: [{
+              required: true,
+              message: "请输入消耗积分",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "消耗余额",
+            prop: "balanceNum",
+            rules: [{
+              required: true,
+              message: "请输入消耗余额",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "第三方平台订单号",
+            prop: "thirdOrderId",
+            hide: true,
+            rules: [{
+              required: true,
+              message: "请输入第三方平台订单号",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "收取的服务费",
+            prop: "fee",
+            rules: [{
+              required: true,
+              message: "请输入收取的服务费",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "积分交易费",
+            prop: "pointFee",
+            rules: [{
+              required: true,
+              message: "请输入积分交易费",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "创建时间",
+            prop: "createTime",
+            type: "datetime",
+            format: "yyyy-MM-dd hh:mm:ss",
+            valueFormat: "yyyy-MM-dd hh:mm:ss",
+            searchRange: true,
+            addDisplay: false,
+            editDisplay: false,
+            search: true,
+            searchSpan: 24,
+            searchOrder: 0,
+            searchslot: true,
+            rules: [{
+              required: true,
+              message: "请输入通知时间",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "关键字",
+            prop: "key",
+            hide: true,
+            search: true,
+            searchslot: true,
+            searchOrder: 5,
+            searchSpan: 24,
+            editDisplay: false,
+          },
+        ]
+      },
+      data: [],
+      censusOption: {
+        span: ()=>24/this.censusOption.data.length,
+        data: [
+          {
+            title: '用户付款',
+            prop: ["USER_PAY","WECHAT_PAY"],
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-s-custom',
+            color: '0, 167, 208',
+          },
+          {
+            title: '代理充值',
+            prop: "AGENT_CHARGE",
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-paperclip',
+            color: '27, 201, 142',
+          },
+          {
+            title: '商场充值',
+            prop: "MALL_RECHARGE",
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-s-shop',
+            color: '230, 71, 88',
+          }
+        ]
+      }
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
       return {
-        form: {},
-        query: {},
-        loading: true,
-        censusPrice:{},
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        selectionList: [],
-        option: {
-          height:'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          addBtn:false,
-          delBtn:false,
-          editBtn:false,
-          viewBtn: true,
-          selection: true,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "付款方",
-              prop: "payId",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入付款方",
-                trigger: "blur"
-              }]
-            },
-            /*{
-              prop: "dataInfo",
-              slot: true,
-              width: 250,
-              display: false,
-              label: "数据统计"
-            },*/
-            {
-              label: "付款方",
-              prop: "payerName",
-              rules: [{
-                required: true,
-                message: "请输入付款方",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "收款方",
-              hide: true,
-              prop: "receiveId",
-              rules: [{
-                required: true,
-                message: "请输入收款方",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "收款方",
-              prop: "receiverName",
-              rules: [{
-                required: true,
-                message: "请输入收款方",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "金额原价",
-              prop: "cost",
-              rules: [{
-                required: true,
-                message: "请输入金额原价",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "折扣",
-              prop: "discount",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入折扣",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "实付金额",
-              prop: "price",
-              rules: [{
-                required: true,
-                message: "请输入实付金额",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "总金额",
-              prop: "totalPrice",
-              rules: [{
-                required: true,
-                message: "请输入实付金额",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "交易类型",
-              search: true,
-              prop: "type",
-              type: "select",
-              dicData:[{
-                label:"用户付款",
-                value:"USER_PAY"
-              },{
-                label:"代理充值",
-                value:"AGENT_CHARGE"
-              },{
-                label:"微信充值",
-                value:"WECHAT_PAY"
-              },{
-                label:"商家充值",
-                value:"MALL_RECHARGE"
-              }],
-              rules: [{
-                required: true,
-                message: "请输入交易类型(用户付款,代理充值,商场充值)",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "付款方式",
-              prop: "payway",
-              rules: [{
-                required: true,
-                message: "请输入付款方式",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "付款插件",
-              prop: "payPlugin",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入付款插件",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "渠道积分id",
-              prop: "channelId",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入渠道积分id",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "支付状态",
-              search: true,
-              prop: "payStatus",
-              type: "select",
-              dicData:[{
-                label:"待付款",
-                value:"待付款"
-              },{
-                label:"付款成功",
-                value:"付款成功"
-              },{
-                label:"已完结",
-                value:"已完结"
-              },{
-                label:"取消付款",
-                value:"取消付款"
-              }],
-              rules: [{
-                required: true,
-                message: "请输入待付款,付款成功,取消付款",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "订单标题",
-              prop: "title",
-              rules: [{
-                required: true,
-                message: "请输入订单标题",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "订单描述",
-              prop: "billDesc",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入订单描述",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "订单超时时间",
-              prop: "exTime",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入订单超时时间",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "appid",
-              prop: "appid",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入appid",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "openid",
-              prop: "openid",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入openid",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "消耗积分",
-              prop: "pointNum",
-              rules: [{
-                required: true,
-                message: "请输入消耗积分",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "消耗余额",
-              prop: "balanceNum",
-              rules: [{
-                required: true,
-                message: "请输入消耗余额",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "第三方平台订单号",
-              prop: "thirdOrderId",
-              hide: true,
-              rules: [{
-                required: true,
-                message: "请输入第三方平台订单号",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "收取的服务费",
-              prop: "fee",
-              rules: [{
-                required: true,
-                message: "请输入收取的服务费",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "积分交易费",
-              prop: "pointFee",
-              rules: [{
-                required: true,
-                message: "请输入积分交易费",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "创建时间",
-              prop: "createTime",
-              type: "datetime",
-              format: "yyyy-MM-dd hh:mm:ss",
-              valueFormat: "yyyy-MM-dd hh:mm:ss",
-              searchRange:true,
-              addDisplay: false,
-              editDisplay: false,
-              search: true,
-              rules: [{
-                required: true,
-                message: "请输入通知时间",
-                trigger: "blur"
-              }]
-            },
-          ]
-        },
-        data: []
+        addBtn: this.vaildData(this.permission.bills_add, false),
+        viewBtn: this.vaildData(this.permission.bills_view, false),
+        delBtn: this.vaildData(this.permission.bills_delete, false),
+        editBtn: this.vaildData(this.permission.bills_edit, false)
       };
     },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.bills_add, false),
-          viewBtn: this.vaildData(this.permission.bills_view, false),
-          delBtn: this.vaildData(this.permission.bills_delete, false),
-          editBtn: this.vaildData(this.permission.bills_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  watch: {
+    //监听创建时间变化
+    "query.createTime": {
+      handler(value) {
+        //防止重复调用
+        if (value !== undefined) {
+          this.query.createTimeRange = [];
+          switch (value) {
+            case -1:
+              this.query.createTimeStart = undefined;
+              this.query.createTimeEnd = undefined;
+              break;
+            case 1: //今天
+              this.query.createTimeStart = moment().format("yyyy-MM-DD 00:00:00");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 2: //昨天
+              this.query.createTimeStart = moment().subtract(1, 'days').format("yyyy-MM-DD 00:00:00");
+              this.query.createTimeEnd = moment().subtract(1, 'days').format("yyyy-MM-DD 23:59:59");
+              break;
+            case 3: //近7天
+              this.query.createTimeStart = moment().subtract(7, 'days').format("yyyy-MM-DD HH:mm:ss");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 4: //近30天
+              this.query.createTimeStart = moment().subtract(30, 'days').format("yyyy-MM-DD HH:mm:ss");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 5: //本月
+              this.query.createTimeStart = moment().format("yyyy-MM-01 00:00:00");
+              this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+              break;
+            case 6: //本年
+              this.query.createTimeStart = moment().format("yyyy-01-01 00:00:00");
+              this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+              break;
+            default:
+              break;
+          }
+        }
+      }
+    },
+    //监听创建时间变化
+    "query.createTimeRange": {
+      handler(value) {
+        //防止重复调用
+        if (value.length === 2) {
+          this.query.createTimeStart = value[0];
+          this.query.createTimeEnd = value[1];
+          this.query.createTime = undefined;
+        }
       }
     },
-    created() {
-      this.getCensusPrice();
+  },
+  created() {
+    this.getCensusPrice();
+  },
+  methods: {
+    rowSave(row, done, loading) {
+      add(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      update(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
     },
-    methods: {
-      rowSave(row, done, loading) {
-        add(row).then(() => {
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          done();
-        }, error => {
-          loading();
-          window.console.log(error);
         });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(this.ids);
+        })
+        .then(() => {
           this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          done();
-        }, error => {
-          loading();
-          console.log(error);
+          this.$refs.crud.toggleSelection();
         });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      let values = {};
+      for (const item in params) {
+        if (params[item] !== undefined && params[item] !== -1) {
+          values[item] = params[item];
         }
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(this.ids);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
-            this.form = res.data.data;
+      }
+      values.createTime = null;
+      values.createTimeRange = null;
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, values).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+        this.selectionClear();
+      });
+    },
+    getCensusPrice() {
+      censusPrice().then(res => {
+        res.data.data.forEach(ele => {
+          const find = this.censusOption.data.find(ele2=>{
+            return ele2.prop.indexOf(ele.type)!==-1;
           });
-        }
-        done();
-      },
-      searchReset() {
-        this.query = {};
-        this.onLoad(this.page);
-      },
-      searchChange(params, done) {
-        this.query = params;
-        this.page.currentPage = 1;
-        this.onLoad(this.page, params);
-        done();
-      },
-      selectionChange(list) {
-        this.selectionList = list;
-      },
-      selectionClear() {
-        this.selectionList = [];
-        this.$refs.crud.toggleSelection();
-      },
-      currentChange(currentPage){
-        this.page.currentPage = currentPage;
-      },
-      sizeChange(pageSize){
-        this.page.pageSize = pageSize;
-      },
-      refreshChange() {
+          if(find && ele.price){
+            find.count = find.count + parseFloat(ele.price);
+          }
+        });
+      });
+    },
+    //搜索状态改变
+    searchStateChange() {
+      setTimeout(() => {
         this.onLoad(this.page, this.query);
-      },
-      onLoad(page, params = {}) {
-        const {createTime} = this.query;
-        let values = {
-          ...params,
-        };
-        if (createTime) {
-          values = {
-            ...params,
-            createTimeStart: createTime[0],
-            createTimeEnd: createTime[1],
-            ...this.query
-          };
-          values.createTime = null;
+      }, 100);
+    },
+    //生成列表并到处
+    generateListAndDownload() {
+      const newQuery = {};
+      for (const item in this.query) {
+        if (this.query[item] !== undefined && this.query[item] !== -1) {
+          newQuery[item] = this.query[item];
         }
-        this.loading = true;
-        getList(page.currentPage, page.pageSize, values).then(res => {
-          const data = res.data.data;
-          this.page.total = data.total;
-          this.data = data.records;
-          this.loading = false;
-          this.selectionClear();
-        });
-      },
-      getCensusPrice(){
-        censusPrice().then(res=>{
-          res.data.data.forEach(ele=>{
-            this.censusPrice[ele.type] = ele.price;
-          })
-        });
       }
-    }
-  };
+      newQuery.createTime = null;
+      newQuery.createTimeRange = null;
+      //获取列表键值对
+      newQuery.keyValue = {};
+      this.option.column.forEach(ele => {
+        newQuery.keyValue[ele.prop] = ele.label;
+      });
+      newQuery.keyValue = JSON.stringify(newQuery.keyValue);
+      this.loading = true;
+      //生成列表
+      generateList(this.page.currentPage, this.page.pageSize, newQuery).then(res => {
+        FileUtil.download(res.data, {
+          type: "application/vnd.ms-excel"
+        }, `生成付款账单-${moment().format("yyyy-MM-DD HH:mm:ss")}.xls`);
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+  }
+};
 </script>
 
 <style>

+ 73 - 0
src/views/ldt_bills/comps/iconfont.vue

@@ -0,0 +1,73 @@
+<template>
+  <el-row style="width: 100%">
+    <el-col :span="option.span" v-for="(data,index) in option.data" :key="index">
+      <div :style="{height: `${height}px`,
+            minWidth:'200px',
+            backgroundColor: 'rgb(245, 247, 249)',
+            borderRadius: '5px',
+            margin: '4px 5px',
+            // boxShadow: '2px 2px 2px 2px rgba(0, 0, 0,0.3)'
+        }">
+        <!-- 图标内容 -->
+        <div :style="{
+            height: '100%',
+            width:'50%',
+            display: 'inline-block',
+            float: 'left'
+         }">
+          <div :style="{
+            width: `${height/3}px`,
+            height: `${height/3}px`,
+            margin: `${height/2 - height/3/2 - height/2/5}px`,
+            lineHeight: `${height/3+height/2/5}px`,
+            boxShadow: `0px 0px 5px 5px rgba(${data.color?data.color:'0,0,0'},0.3)`,
+            textAlign: 'center',
+            border:`${height/2/5}px solid rgb(${data.color?data.color:'0,0,0'})`,
+            borderRadius: '50%',
+            backgroundColor: `rgb(${data.color?data.color:'0,0,0'})`
+          }">
+            <i :class="data.icon" :style="{
+              fontSize: `${height/3}px`,
+              color: 'white',
+            }"></i>
+          </div>
+        </div>
+        <!-- 描述内容 -->
+        <div :style="{
+            height: '100%',
+            width:'50%',
+            display: 'inline-block',
+         }">
+          <h4 :style="{
+            marginTop: `${(height/2-10)/2}px`,
+            marginBottom: '10px',
+          }">{{data.title}}</h4>
+          <p :style="{
+            color:'gary',
+            margin: '10px 0',
+          }">{{data.decimals?parseFloat(data.count).toFixed(2):data.count}}</p>
+        </div>
+      </div>
+    </el-col>
+  </el-row>
+</template>
+
+<script>
+export default {
+  name: "iconfont",
+  props:{
+    option:{
+      type: "Object",
+      default: {}
+    },
+    height:{
+      type:"Number",
+      default: 80
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 460 - 0
src/views/ldt_bills/frozenrec.vue

@@ -0,0 +1,460 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot-scope="{type,size}" slot="createTimeSearch">
+        <el-radio-group v-model="query.createTime" :size="size" style="float: left">
+          <el-radio-button @click="searchStateChange" :label="-1">全部</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="1">今天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="2">昨天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="3">最近七天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="4">最近30天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="5">本月</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="6">本年</el-radio-button>
+        </el-radio-group>
+        <avue-date v-model="query.createTimeRange" type="datetimerange" format="yyyy年MM月dd日 hh:mm:ss"
+                   value-format="yyyy-MM-dd hh:mm:ss" placeholder="请选择日期"
+                   :size="size"
+                   @change="searchStateChange"
+                   style="width: 280px;margin-left:5px;float: left"
+                   range-separator="-"
+                   start-placeholder="开始日期"
+                   end-placeholder="结束日期"></avue-date>
+      </template>
+      <template slot-scope="{type,size}" slot="frozenTypeSearch">
+        <el-radio-group v-model="query.frozenType" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='frozenType';
+          }).dicData" :key="index">{{ select.label }}
+          </el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="frozenSatusSearch">
+        <el-radio-group v-model="query.frozenSatus" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='frozenSatus';
+          }).dicData" :key="index">{{ select.label }}
+          </el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="keySearch">
+        <el-input type="text" placeholder="订单ID" v-model="query.key" :size="size"
+                  style="width: 300px;margin: 1px 5px 1px 0;">
+          <el-button type="primary" :size="size" icon="el-icon-search" slot="append"
+                     @click="searchStateChange"></el-button>
+        </el-input>
+        <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownload">生成列表</el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+import {add, generateList, getDetail, getList, remove, update} from "@/api/ldt_bills/frozenrec";
+import {mapGetters} from "vuex";
+import moment from "moment";
+import FileUtil from "@/util/fileUtil";
+
+export default {
+  data() {
+    return {
+      form: {},
+      query: {
+        createTime: -1,
+        createTimeRange: [],
+        frozenType: -1,
+        frozenSatus: -1,
+      },
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        span: 8,
+        border: true,
+        index: true,
+        viewBtn: true,
+        addBtn: false,
+        editBtn: false,
+        delBtn: false,
+        selection: true,
+        searchBtn: false,
+        emptyBtn: false,
+        dialogClickModal: false,
+        column: [
+          {
+            label: "冻结记录号",
+            prop: "id",
+            rules: [{
+              required: true,
+              message: "请输入订单号",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "冻结用户",
+            prop: "userName",
+            rules: [{
+              required: true,
+              message: "请输入冻结用户",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "账户类型",
+            prop: "frozenType",
+            labelWidth: 100,
+            search: true,
+            type: "select",
+            searchSpan: 24,
+            searchOrder: 1,
+            dicData: [
+              {
+                label: "全部",
+                value: -1
+              },
+              {
+                label: "渠道积分",
+                value: "POINT"
+              },
+              {
+                label: "普通积分",
+                value: "BALANCE"
+              }
+            ],
+            rules: [{
+              required: true,
+              message: "请输入冻结账户类型",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "冻结金额",
+            prop: "frozenNum",
+            rules: [{
+              required: true,
+              message: "请输入冻结金额",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "冻结前金额",
+            prop: "beforeNum",
+            rules: [{
+              required: true,
+              message: "请输入冻结前金额",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "冻结状态",
+            prop: "frozenSatus",
+            search: true,
+            type: "select",
+            searchSpan: 24,
+            searchOrder: 2,
+            dicData: [
+              {
+                label: "全部",
+                value: -1
+              },
+              {
+                label: "已完成",
+                value: "SUCCEED_FROZEN"
+              },
+              {
+                label: "已退回",
+                value: "RETURNED_FROZEN"
+              }
+            ],
+            rules: [{
+              required: true,
+              message: "请输入冻结状态",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "交易时间",
+            prop: "createTime",
+            type: "datetime",
+            format: "yyyy-MM-dd hh:mm:ss",
+            valueFormat: "yyyy-MM-dd hh:mm:ss",
+            searchRange: true,
+            addDisplay: false,
+            editDisplay: false,
+            search: true,
+            searchSpan: 24,
+            searchOrder: 0,
+            searchslot: true,
+          },
+          {
+            label: "关键字",
+            prop: "key",
+            hide: true,
+            search: true,
+            searchslot: true,
+            searchOrder: 3,
+            searchSpan: 24,
+            editDisplay: false,
+          },
+        ]
+      },
+      data: []
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.frozenrec_add, false),
+        viewBtn: this.vaildData(this.permission.frozenrec_view, false),
+        delBtn: this.vaildData(this.permission.frozenrec_delete, false),
+        editBtn: this.vaildData(this.permission.frozenrec_edit, false)
+      };
+    },
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  watch: {
+    //监听创建时间变化
+    "query.createTime": {
+      handler(value) {
+        //防止重复调用
+        if (value !== undefined) {
+          this.query.createTimeRange = [];
+          switch (value) {
+            case -1:
+              this.query.createTimeStart = undefined;
+              this.query.createTimeEnd = undefined;
+              break;
+            case 1: //今天
+              this.query.createTimeStart = moment().format("yyyy-MM-DD 00:00:00");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 2: //昨天
+              this.query.createTimeStart = moment().subtract(1, 'days').format("yyyy-MM-DD 00:00:00");
+              this.query.createTimeEnd = moment().subtract(1, 'days').format("yyyy-MM-DD 23:59:59");
+              break;
+            case 3: //近7天
+              this.query.createTimeStart = moment().subtract(7, 'days').format("yyyy-MM-DD HH:mm:ss");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 4: //近30天
+              this.query.createTimeStart = moment().subtract(30, 'days').format("yyyy-MM-DD HH:mm:ss");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 5: //本月
+              this.query.createTimeStart = moment().format("yyyy-MM-01 00:00:00");
+              this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+              break;
+            case 6: //本年
+              this.query.createTimeStart = moment().format("yyyy-01-01 00:00:00");
+              this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+              break;
+            default:
+              break;
+          }
+        }
+      }
+    },
+    //监听创建时间变化
+    "query.createTimeRange": {
+      handler(value) {
+        //防止重复调用
+        if (value != null && value.length === 2) {
+          this.query.createTimeStart = value[0];
+          this.query.createTimeEnd = value[1];
+          this.query.createTime = undefined;
+        }
+      }
+    },
+  },
+  methods: {
+    rowSave(row, done, loading) {
+      add(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      update(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        });
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(this.ids);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.$refs.crud.toggleSelection();
+        });
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      let values = {
+        ...params,
+      };
+      values.createTime = null;
+      values.createTimeRange = null;
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, values).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+        this.selectionClear();
+      });
+    },
+    //搜索状态改变
+    searchStateChange() {
+      setTimeout(() => {
+        const newQuery = {};
+        this.page.currentPage = 1;
+        for (const item in this.query) {
+          if (this.query[item] !== undefined && this.query[item] !== -1) {
+            newQuery[item] = this.query[item];
+          }
+        }
+        this.onLoad(this.page, newQuery);
+      }, 100);
+    },
+    //生成列表并到处
+    generateListAndDownload() {
+      const newQuery = {};
+      for (const item in this.query) {
+        if (this.query[item] !== undefined && this.query[item] !== -1) {
+          newQuery[item] = this.query[item];
+        }
+      }
+      newQuery.createTime = null;
+      newQuery.createTimeRange = null;
+      //获取列表键值对
+      newQuery.keyValue = {};
+      this.option.column.forEach(ele => {
+        newQuery.keyValue[ele.prop] = ele.label;
+      });
+      newQuery.keyValue = JSON.stringify(newQuery.keyValue);
+      this.loading = true;
+      //生成列表
+      generateList(this.page.currentPage, this.page.pageSize, newQuery).then(res => {
+        FileUtil.download(res.data, {
+          type: "application/vnd.ms-excel"
+        }, `生成冻结记录-${moment().format("yyyy-MM-DD HH:mm:ss")}.xls`);
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+  }
+};
+</script>
+
+<style>
+</style>

+ 205 - 44
src/views/ldt_bills/platformbills.vue

@@ -6,7 +6,6 @@
                :page.sync="page"
                :permission="permissionList"
                :before-open="beforeOpen"
-               :search.sync="query"
                v-model="form"
                ref="crud"
                @row-update="rowUpdate"
@@ -19,39 +18,65 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <template slot-scope="{type,size}" slot="createTimeSearch">
+        <el-radio-group v-model="query.createTime" :size="size" style="float: left">
+          <el-radio-button @click="searchStateChange" :label="-1">全部</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="1">今天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="2">昨天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="3">最近七天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="4">最近30天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="5">本月</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="6">本年</el-radio-button>
+        </el-radio-group>
+        <avue-date v-model="query.createTimeRange" type="datetimerange" format="yyyy年MM月dd日 hh:mm:ss"
+                   value-format="yyyy-MM-dd hh:mm:ss" placeholder="请选择日期"
+                   :size="size"
+                   @change="searchStateChange"
+                   style="width: 280px;margin-left:5px;float: left"
+                   range-separator="-"
+                   start-placeholder="开始日期"
+                   end-placeholder="结束日期"></avue-date>
+      </template>
+      <template slot-scope="{type,size}" slot="typeSearch">
+        <el-radio-group v-model="query.type" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='type';
+          }).dicData" :key="index">{{ select.label }}</el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="keySearch">
+        <el-input type="text" placeholder="订单ID" v-model="query.key" :size="size"
+                  style="width: 300px;margin: 1px 5px 1px 0;">
+          <el-button type="primary" :size="size" icon="el-icon-search" slot="append"
+                     @click="searchStateChange"></el-button>
+        </el-input>
+        <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownload">生成列表</el-button>
+        <!--        <el-button type="primary" :size="size">导出已生成列表</el-button>-->
+      </template>
       <template slot="menuLeft">
-        <span style="font-family: '宋体'">
-          用户付款费用总额:
-          <span style="background-color: #8c70b6;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{parseFloat(parseFloat(censusPrice.USER_PAY!==undefined?censusPrice.USER_PAY:0) + parseFloat(censusPrice.WECHAT_PAY!==undefined?censusPrice.WECHAT_PAY:0)).toFixed(2)}}
-          </span>
-        </span>&nbsp;
-        <span type="warning" style="font-family: '宋体'">
-          代理充值费用总额:
-          <span style="background-color: #a9c985;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{parseFloat(censusPrice.AGENT_CHARGE!==undefined?censusPrice.AGENT_CHARGE:0).toFixed(2)}}
-          </span>
-        </span>&nbsp;
-        <span type="info" style="font-family: '宋体'">
-          商场充值费用总额:
-          <span style="background-color: #d50e71;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{parseFloat(censusPrice.MALL_RECHARGE!==undefined?censusPrice.MALL_RECHARGE:0).toFixed(2)}}
-          </span>
-        </span>
+        <IconFontComp :option="censusOption"></IconFontComp>
       </template>
     </avue-crud>
   </basic-container>
 </template>
 
 <script>
-  import {getList, censusPrice, getDetail, add, update, remove} from "@/api/ldt_bills/platformbills";
+  import {getList, generateList, censusPrice, getDetail, add, update, remove} from "@/api/ldt_bills/platformbills";
+  import IconFontComp from "./comps/iconfont";
   import {mapGetters} from "vuex";
+  import moment from "moment";
+  import FileUtil from "@/util/fileUtil";
 
   export default {
+    components:{IconFontComp},
     data() {
       return {
         form: {},
-        query: {},
+        query: {
+          createTime: -1,
+          createTimeRange: [],
+          type: -1,
+        },
         censusPrice:{},
         loading: true,
         page: {
@@ -73,6 +98,9 @@
           delBtn: false,
           viewBtn: true,
           selection: true,
+          searchBtn: false,
+          emptyBtn: false,
+          searchSize: "mini",
           dialogClickModal: false,
           column: [
             {
@@ -85,7 +113,7 @@
               }]
             },
             {
-              label: "支付方",
+              label: "支付方ID",
               prop: "payer",
               hide: true,
               rules: [{
@@ -104,7 +132,7 @@
               }]
             },
             {
-              label: "收款方",
+              label: "收款方ID",
               hide: true,
               prop: "receiver",
               rules: [{
@@ -124,10 +152,15 @@
             },
             {
               label: "交易类型",
-              search: true,
               prop: "type",
-              type: "select",
+              search: true,
+              searchslot: true,
+              searchSpan: 24,
+              searchOrder: 1,
               dicData:[{
+                label: "全部",
+                value: -1
+              },{
                 label:"用户付款",
                 value:"USER_PAY"
               },{
@@ -174,15 +207,57 @@
               addDisplay: false,
               editDisplay: false,
               search: true,
+              searchSpan: 24,
+              searchOrder: 0,
+              searchslot: true,
               rules: [{
                 required: true,
                 message: "请输入通知时间",
                 trigger: "blur"
               }]
             },
+            {
+              label: "关键字",
+              prop: "key",
+              hide: true,
+              search: true,
+              searchslot: true,
+              searchOrder: 5,
+              searchSpan: 24,
+              editDisplay: false,
+            },
           ]
         },
-        data: []
+        data: [],
+        censusOption: {
+          span: ()=>24/this.censusOption.data.length,
+          data: [
+            {
+              title: '用户付款',
+              prop: ["USER_PAY","WECHAT_PAY"],
+              count: 0,
+              decimals: 2,
+              icon: 'el-icon-s-custom',
+              color: '0, 167, 208',
+            },
+            {
+              title: '代理充值',
+              prop: "AGENT_CHARGE",
+              count: 0,
+              decimals: 2,
+              icon: 'el-icon-paperclip',
+              color: '27, 201, 142',
+            },
+            {
+              title: '商场充值',
+              prop: "MALL_RECHARGE",
+              count: 0,
+              decimals: 2,
+              icon: 'el-icon-s-shop',
+              color: '230, 71, 88',
+            }
+          ]
+        }
       };
     },
     computed: {
@@ -203,6 +278,60 @@
         return ids.join(",");
       }
     },
+    watch: {
+      //监听创建时间变化
+      "query.createTime": {
+        handler(value) {
+          //防止重复调用
+          if (value !== undefined) {
+            this.query.createTimeRange = [];
+            switch (value) {
+              case -1:
+                this.query.createTimeStart = undefined;
+                this.query.createTimeEnd = undefined;
+                break;
+              case 1: //今天
+                this.query.createTimeStart = moment().format("yyyy-MM-DD 00:00:00");
+                this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+                break;
+              case 2: //昨天
+                this.query.createTimeStart = moment().subtract(1, 'days').format("yyyy-MM-DD 00:00:00");
+                this.query.createTimeEnd = moment().subtract(1, 'days').format("yyyy-MM-DD 23:59:59");
+                break;
+              case 3: //近7天
+                this.query.createTimeStart = moment().subtract(7, 'days').format("yyyy-MM-DD HH:mm:ss");
+                this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+                break;
+              case 4: //近30天
+                this.query.createTimeStart = moment().subtract(30, 'days').format("yyyy-MM-DD HH:mm:ss");
+                this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+                break;
+              case 5: //本月
+                this.query.createTimeStart = moment().format("yyyy-MM-01 00:00:00");
+                this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+                break;
+              case 6: //本年
+                this.query.createTimeStart = moment().format("yyyy-01-01 00:00:00");
+                this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+                break;
+              default:
+                break;
+            }
+          }
+        }
+      },
+      //监听创建时间变化
+      "query.createTimeRange": {
+        handler(value) {
+          //防止重复调用
+          if (value.length === 2) {
+            this.query.createTimeStart = value[0];
+            this.query.createTimeEnd = value[1];
+            this.query.createTime = undefined;
+          }
+        }
+      },
+    },
     created() {
       this.getCensusPrice();
     },
@@ -307,19 +436,14 @@
         this.onLoad(this.page, this.query);
       },
       onLoad(page, params = {}) {
-        const {createTime} = this.query;
-        let values = {
-          ...params,
-        };
-        if (createTime) {
-          values = {
-            ...params,
-            createTimeStart: createTime[0],
-            createTimeEnd: createTime[1],
-            ...this.query
-          };
-          values.createTime = null;
+        let values = {};
+        for (const item in params) {
+          if (params[item] !== undefined && params[item] !== -1) {
+            values[item] = params[item];
+          }
         }
+        values.createTime = null;
+        values.createTimeRange = null;
         this.loading = true;
         getList(page.currentPage, page.pageSize, values).then(res => {
           const data = res.data.data;
@@ -329,13 +453,50 @@
           this.selectionClear();
         });
       },
-      getCensusPrice(){
-        censusPrice().then(res=>{
-          res.data.data.forEach(ele=>{
-            this.censusPrice[ele.type] = parseFloat(ele.price);
-          })
+      getCensusPrice() {
+        censusPrice().then(res => {
+          res.data.data.forEach(ele => {
+            const find = this.censusOption.data.find(ele2=>{
+              return ele2.prop.indexOf(ele.type)!==-1;
+            });
+            if(find && ele.price){
+              find.count = find.count + parseFloat(ele.price);
+            }
+          });
         });
-      }
+      },
+      //搜索状态改变
+      searchStateChange() {
+        setTimeout(() => {
+          this.onLoad(this.page, this.query);
+        }, 100);
+      },
+      //生成列表并到处
+      generateListAndDownload() {
+        const newQuery = {};
+        for (const item in this.query) {
+          if (this.query[item] !== undefined && this.query[item] !== -1) {
+            newQuery[item] = this.query[item];
+          }
+        }
+        newQuery.createTime = null;
+        newQuery.createTimeRange = null;
+        //获取列表键值对
+        newQuery.keyValue = {};
+        this.option.column.forEach(ele=>{
+          newQuery.keyValue[ele.prop] = ele.label;
+        });
+        newQuery.keyValue = JSON.stringify(newQuery.keyValue);
+        this.loading = true;
+        //生成列表
+        generateList(this.page.currentPage, this.page.pageSize, newQuery).then(res => {
+          FileUtil.download(res.data,{
+            type: "application/vnd.ms-excel"
+          },`生成平台账单-${moment().format("yyyy-MM-DD HH:mm:ss")}.xls`);
+        }).finally(()=>{
+          this.loading = false;
+        });
+      },
     }
   };
 </script>

+ 243 - 59
src/views/ldt_bills/pointbills.vue

@@ -18,42 +18,67 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <template slot-scope="{type,size}" slot="createTimeSearch">
+        <el-radio-group v-model="query.createTime" :size="size" style="float: left">
+          <el-radio-button @click="searchStateChange" :label="-1">全部</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="1">今天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="2">昨天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="3">最近七天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="4">最近30天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="5">本月</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="6">本年</el-radio-button>
+        </el-radio-group>
+        <avue-date v-model="query.createTimeRange" type="datetimerange" format="yyyy年MM月dd日 hh:mm:ss"
+                   value-format="yyyy-MM-dd hh:mm:ss" placeholder="请选择日期"
+                   :size="size"
+                   @change="searchStateChange"
+                   style="width: 280px;margin-left:5px;float: left"
+                   range-separator="-"
+                   start-placeholder="开始日期"
+                   end-placeholder="结束日期"></avue-date>
+      </template>
+      <template slot-scope="{type,size}" slot="isCheakSearch">
+        <el-radio-group v-model="query.isCheak" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='isCheak';
+          }).dicData" :key="index">{{ select.label }}</el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="payStatusSearch">
+        <el-radio-group v-model="query.payStatus" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='payStatus';
+          }).dicData" :key="index">{{ select.label }}</el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="typeSearch">
+        <el-radio-group v-model="query.type" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='type';
+          }).dicData" :key="index">{{ select.label }}</el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="isCheakSearch">
+        <el-radio-group v-model="query.isCheak" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='isCheak';
+          }).dicData" :key="index">{{ select.label }}</el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="keySearch">
+        <el-input type="text" placeholder="订单ID" v-model="query.key" :size="size"
+                  style="width: 300px;margin: 1px 5px 1px 0;">
+          <el-button type="primary" :size="size" icon="el-icon-search" slot="append"
+                     @click="searchStateChange"></el-button>
+        </el-input>
+        <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownload">生成列表</el-button>
+        <!--        <el-button type="primary" :size="size">导出已生成列表</el-button>-->
+      </template>
       <template slot="menuLeft">
-        <span style="font-family: '宋体',serif" v-if="this.userInfo.role_name !== 'administrator'">
-          余额(易宝):
-          <span
-            style="background-color: #494141;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{ censusPrice.accountsPayable }}
-<!--            {{ parseFloat(censusPrice.yeePayBalance | 0).toFixed(2) }}-->
-          </span>
-        </span>&nbsp;
-        <span type="warning" style="font-family: '宋体',serif" v-if="this.userInfo.role_name !== 'administrator'">
-          总金额:
-          <span
-            style="background-color: #967f1e;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{ censusPrice.accountsPayable }}
-<!--            {{ parseFloat(censusPrice.accountsPayable | 0).toFixed(2) }}-->
-          </span>
-        </span>&nbsp;
-        <span type="info" style="font-family: '宋体',serif">
-          已核销金额:
-          <span
-            style="background-color: #096e38;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{ censusPrice.handledAmount }}
-<!--            {{ parseFloat(censusPrice.handledAmount | 0).toFixed(2) }}-->
-          </span>
-        </span>
-        <span type="info" style="font-family: '宋体',serif">
-          未核销金额:
-          <span
-            style="background-color: #f60824;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{ censusPrice.untreatedAmount }}
-<!--            {{ parseFloat(censusPrice.untreatedAmount | 0).toFixed(2) }}-->
-          </span>
-        </span>
+        <IconFontComp :option="censusOption"></IconFontComp>
       </template>
 
-      <template slot="menuLeft" v-if="this.userInfo.role_name !== 'administrator'">
+      <template slot="menuRight" v-if="this.userInfo.role_name !== 'administrator'">
         <el-button type="danger"
                    size="small"
                    icon="el-icon-money"
@@ -66,16 +91,25 @@
 </template>
 
 <script>
-import {add, censusPrice, getDetail, getList, handlePointBills, remove, update} from "@/api/ldt_bills/pointbills";
+import {add, censusPrice, getDetail, getList, handlePointBills, remove, update, generateList} from "@/api/ldt_bills/pointbills";
+import IconFontComp from "./comps/iconfont";
 import {mapGetters} from "vuex";
+import moment from "moment";
+import FileUtil from "@/util/fileUtil";
 
 export default {
+  components:{IconFontComp},
   data() {
     return {
       form: {},
-      query: {},
+      query: {
+        createTime: -1,
+        createTimeRange: [],
+        payStatus: -1,
+        isCheak: -1,
+        type: -1
+      },
       loading: true,
-      censusPrice: {},
       page: {
         pageSize: 10,
         currentPage: 1,
@@ -96,6 +130,9 @@ export default {
         editBtn: false,
         viewBtn: true,
         selection: true,
+        searchBtn: false,
+        searchSize: "mini",
+        emptyBtn: false,
         dialogClickModal: false,
         column: [
           {
@@ -139,7 +176,7 @@ export default {
           {
             label: "交易标题",
             prop: "title",
-            search: true,
+            search: false,
             rules: [{
               required: true,
               message: "请输入交易标题",
@@ -150,8 +187,13 @@ export default {
             label: "交易状态",
             prop: "payStatus",
             search: true,
-            type: "select",
+            searchslot: true,
+            searchOrder: 1,
+            searchSpan: 24,
             dicData: [{
+              label: "全部",
+              value: -1
+            },{
               label: "待付款",
               value: "待付款"
             }, {
@@ -192,8 +234,13 @@ export default {
             label: "交易类型",
             prop: "type",
             search: true,
-            type: "select",
+            searchslot: true,
+            searchOrder: 2,
+            searchSpan: 24,
             dicData: [{
+              label: "全部",
+              value: -1
+            },{
               label: "用户付款",
               value: "PAY_CONSUMER"
             }, {
@@ -251,12 +298,17 @@ export default {
             }]
           },
           {
-            label: "是否已经核销",
+            label: "是否核销",
             prop: "isCheak",
-            labelWidth: "120",
-            type: "switch",
+            search: true,
+            searchslot: true,
+            searchOrder: 3,
+            searchSpan: 24,
             dicData: [
               {
+                label: "全部",
+                value: -1
+              },{
                 label: "否",
                 value: 0
               },
@@ -277,17 +329,29 @@ export default {
             type: "datetime",
             format: "yyyy-MM-dd hh:mm:ss",
             valueFormat: "yyyy-MM-dd hh:mm:ss",
-            searchRange: true,
+            searchRange:true,
             addDisplay: false,
             editDisplay: false,
             search: true,
-            searchSpan: 6,
+            searchSpan: 24,
+            searchOrder: 0,
+            searchslot: true,
             rules: [{
               required: true,
               message: "请输入通知时间",
               trigger: "blur"
             }]
           },
+          {
+            label: "关键字",
+            prop: "key",
+            hide: true,
+            search: true,
+            searchslot: true,
+            searchOrder: 5,
+            searchSpan: 24,
+            editDisplay: false,
+          },
           {
             label: "交易说明",
             prop: "billsDesc",
@@ -300,7 +364,44 @@ export default {
           },
         ]
       },
-      data: []
+      data: [],
+      censusOption: {
+        span: ()=>24/this.censusOption.data.length,
+        data: [
+          {
+            title: '易宝余额',
+            prop: "accountsPayable",
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-s-custom',
+            color: '0, 167, 208',
+          },
+          {
+            title: '应付总额',
+            prop: "accountsPayable",
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-paperclip',
+            color: '27, 201, 142',
+          },
+          {
+            title: '已核销',
+            prop: "handleAmount",
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-s-shop',
+            color: '230, 71, 88',
+          },
+          {
+            title: '未核销',
+            prop: "untreatedAmount",
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-s-shop',
+            color: '230, 71, 88',
+          }
+        ]
+      }
     };
   },
   computed: {
@@ -321,6 +422,60 @@ export default {
       return ids.join(",");
     }
   },
+  watch: {
+    //监听创建时间变化
+    "query.createTime": {
+      handler(value) {
+        //防止重复调用
+        if (value !== undefined) {
+          this.query.createTimeRange = [];
+          switch (value) {
+            case -1:
+              this.query.createTimeStart = undefined;
+              this.query.createTimeEnd = undefined;
+              break;
+            case 1: //今天
+              this.query.createTimeStart = moment().format("yyyy-MM-DD 00:00:00");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 2: //昨天
+              this.query.createTimeStart = moment().subtract(1, 'days').format("yyyy-MM-DD 00:00:00");
+              this.query.createTimeEnd = moment().subtract(1, 'days').format("yyyy-MM-DD 23:59:59");
+              break;
+            case 3: //近7天
+              this.query.createTimeStart = moment().subtract(7, 'days').format("yyyy-MM-DD HH:mm:ss");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 4: //近30天
+              this.query.createTimeStart = moment().subtract(30, 'days').format("yyyy-MM-DD HH:mm:ss");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 5: //本月
+              this.query.createTimeStart = moment().format("yyyy-MM-01 00:00:00");
+              this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+              break;
+            case 6: //本年
+              this.query.createTimeStart = moment().format("yyyy-01-01 00:00:00");
+              this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+              break;
+            default:
+              break;
+          }
+        }
+      }
+    },
+    //监听创建时间变化
+    "query.createTimeRange": {
+      handler(value) {
+        //防止重复调用
+        if (value.length === 2) {
+          this.query.createTimeStart = value[0];
+          this.query.createTimeEnd = value[1];
+          this.query.createTime = undefined;
+        }
+      }
+    },
+  },
   created() {
     this.getCensusPrice();
   },
@@ -447,19 +602,14 @@ export default {
       this.onLoad(this.page, this.query);
     },
     onLoad(page, params = {}) {
-      const {createTime} = this.query;
-      let values = {
-        ...params,
-      };
-      if (createTime) {
-        values = {
-          ...params,
-          createTimeStart: createTime[0],
-          createTimeEnd: createTime[1],
-          ...this.query
-        };
-        values.createTime = null;
+      let values = {};
+      for (const item in params) {
+        if (params[item] !== undefined && params[item] !== -1) {
+          values[item] = params[item];
+        }
       }
+      values.createTime = null;
+      values.createTimeRange = null;
       this.loading = true;
       getList(page.currentPage, page.pageSize, values).then(res => {
         const data = res.data.data;
@@ -471,9 +621,43 @@ export default {
     },
     getCensusPrice() {
       censusPrice().then(res => {
-        this.censusPrice = res.data.data;
+        this.censusOption.data.forEach(ele=>{
+          ele.count = res.data.data[ele.prop]?res.data.data[ele.prop]:0;
+        });
       });
-    }
+    },
+    //搜索状态改变
+    searchStateChange() {
+      setTimeout(() => {
+        this.onLoad(this.page, this.query);
+      }, 100);
+    },
+    //生成列表并到处
+    generateListAndDownload() {
+      const newQuery = {};
+      for (const item in this.query) {
+        if (this.query[item] !== undefined && this.query[item] !== -1) {
+          newQuery[item] = this.query[item];
+        }
+      }
+      newQuery.createTime = null;
+      newQuery.createTimeRange = null;
+      //获取列表键值对
+      newQuery.keyValue = {};
+      this.option.column.forEach(ele=>{
+        newQuery.keyValue[ele.prop] = ele.label;
+      });
+      newQuery.keyValue = JSON.stringify(newQuery.keyValue);
+      this.loading = true;
+      //生成列表
+      generateList(this.page.currentPage, this.page.pageSize, newQuery).then(res => {
+        FileUtil.download(res.data,{
+          type: "application/vnd.ms-excel"
+        },`生成积分账单-${moment().format("yyyy-MM-DD HH:mm:ss")}.xls`);
+      }).finally(()=>{
+        this.loading = false;
+      });
+    },
   }
 };
 </script>

+ 202 - 14
src/views/ldt_bills/transferrec.vue

@@ -18,28 +18,62 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
-      <template slot="menuLeft">
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   plain
-                   v-if="permission.transferrec_delete"
-                   @click="handleDelete">删 除
-        </el-button>
+      <template slot-scope="{type,size}" slot="createTimeSearch">
+        <el-radio-group v-model="query.createTime" :size="size" style="float: left">
+          <el-radio-button @click="searchStateChange" :label="-1">全部</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="1">今天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="2">昨天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="3">最近七天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="4">最近30天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="5">本月</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="6">本年</el-radio-button>
+        </el-radio-group>
+        <avue-date v-model="query.createTimeRange" type="datetimerange" format="yyyy年MM月dd日 hh:mm:ss"
+                   value-format="yyyy-MM-dd hh:mm:ss" placeholder="请选择日期"
+                   :size="size"
+                   @change="searchStateChange"
+                   style="width: 280px;margin-left:5px;float: left"
+                   range-separator="-"
+                   start-placeholder="开始日期"
+                   end-placeholder="结束日期"></avue-date>
+      </template>
+      <template slot-scope="{type,size}" slot="transferStatusSearch">
+        <el-radio-group v-model="query.transferStatus" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='transferStatus';
+          }).dicData" :key="index">{{ select.label }}</el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="keySearch">
+        <el-input type="text" placeholder="订单ID" v-model="query.key" :size="size"
+                  style="width: 300px;margin: 1px 5px 1px 0;">
+          <el-button type="primary" :size="size" icon="el-icon-search" slot="append"
+                     @click="searchStateChange"></el-button>
+        </el-input>
+        <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownload">生成列表</el-button>
+        <!--        <el-button type="primary" :size="size">导出已生成列表</el-button>-->
+      </template>
+      <template slot-scope="{type,size}" slot="menuLeft">
       </template>
     </avue-crud>
   </basic-container>
 </template>
 
 <script>
-  import {getList, getDetail, add, update, remove} from "@/api/ldt_bills/transferrec";
+  import {getList, getDetail, add, update, remove,generateList} from "@/api/ldt_bills/transferrec";
   import {mapGetters} from "vuex";
+  import moment from "moment";
+  import FileUtil from "@/util/fileUtil";
 
   export default {
     data() {
       return {
         form: {},
-        query: {},
+        query: {
+          createTime: -1,
+          createTimeRange: [],
+          transferStatus: -1
+        },
         loading: true,
         page: {
           pageSize: 10,
@@ -57,6 +91,12 @@
           index: true,
           viewBtn: true,
           selection: true,
+          searchBtn: false,
+          emptyBtn: false,
+          addBtn: false,
+          delBtn: false,
+          editBtn: false,
+          searchSize: "mini",
           dialogClickModal: false,
           column: [
             {
@@ -114,8 +154,26 @@
               }]
             },
             {
-              label: "转账状态: 转账申请中,转账成功,转账失败",
+              label: "转账状态",
               prop: "transferStatus",
+              dicData:[
+                {
+                  label: "全部",
+                  value: -1
+                },
+                {
+                  label:"转账申请中",
+                  value: "REQUEST_RECEIVE"
+                },
+                {
+                  label: "转账已完成",
+                  value: "DONE",
+                },
+                {
+                  label: "转账失败",
+                  value: "FAIL",
+                }
+              ],
               rules: [{
                 required: true,
                 message: "请输入转账状态: 转账申请中,转账成功,转账失败",
@@ -123,8 +181,11 @@
               }]
             },
             {
-              label: "转账渠道:yeePay(易宝支付)",
+              label: "转账渠道",
               prop: "channel",
+              dicData: [
+
+              ],
               rules: [{
                 required: true,
                 message: "请输入转账渠道:yeePay(易宝支付)",
@@ -185,6 +246,35 @@
                 trigger: "blur"
               }]
             },
+            {
+              label: "创建时间",
+              prop: "createTime",
+              type: "datetime",
+              format: "yyyy-MM-dd hh:mm:ss",
+              valueFormat: "yyyy-MM-dd hh:mm:ss",
+              searchRange:true,
+              addDisplay: false,
+              editDisplay: false,
+              search: true,
+              searchSpan: 24,
+              searchOrder: 0,
+              searchslot: true,
+              rules: [{
+                required: true,
+                message: "请输入通知时间",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "关键字",
+              prop: "key",
+              hide: true,
+              search: true,
+              searchslot: true,
+              searchOrder: 1,
+              searchSpan: 24,
+              editDisplay: false,
+            },
           ]
         },
         data: []
@@ -208,6 +298,60 @@
         return ids.join(",");
       }
     },
+    watch: {
+      //监听创建时间变化
+      "query.createTime": {
+        handler(value) {
+          //防止重复调用
+          if (value !== undefined) {
+            this.query.createTimeRange = [];
+            switch (value) {
+              case -1:
+                this.query.createTimeStart = undefined;
+                this.query.createTimeEnd = undefined;
+                break;
+              case 1: //今天
+                this.query.createTimeStart = moment().format("yyyy-MM-DD 00:00:00");
+                this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+                break;
+              case 2: //昨天
+                this.query.createTimeStart = moment().subtract(1, 'days').format("yyyy-MM-DD 00:00:00");
+                this.query.createTimeEnd = moment().subtract(1, 'days').format("yyyy-MM-DD 23:59:59");
+                break;
+              case 3: //近7天
+                this.query.createTimeStart = moment().subtract(7, 'days').format("yyyy-MM-DD HH:mm:ss");
+                this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+                break;
+              case 4: //近30天
+                this.query.createTimeStart = moment().subtract(30, 'days').format("yyyy-MM-DD HH:mm:ss");
+                this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+                break;
+              case 5: //本月
+                this.query.createTimeStart = moment().format("yyyy-MM-01 00:00:00");
+                this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+                break;
+              case 6: //本年
+                this.query.createTimeStart = moment().format("yyyy-01-01 00:00:00");
+                this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+                break;
+              default:
+                break;
+            }
+          }
+        }
+      },
+      //监听创建时间变化
+      "query.createTimeRange": {
+        handler(value) {
+          //防止重复调用
+          if (value.length === 2) {
+            this.query.createTimeStart = value[0];
+            this.query.createTimeEnd = value[1];
+            this.query.createTime = undefined;
+          }
+        }
+      },
+    },
     methods: {
       rowSave(row, done, loading) {
         add(row).then(() => {
@@ -309,15 +453,59 @@
         this.onLoad(this.page, this.query);
       },
       onLoad(page, params = {}) {
+        let values = {
+          ...params,
+        };
+        values.createTime = null;
+        values.createTimeRange = null;
         this.loading = true;
-        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        getList(page.currentPage, page.pageSize, values).then(res => {
           const data = res.data.data;
           this.page.total = data.total;
           this.data = data.records;
           this.loading = false;
           this.selectionClear();
         });
-      }
+      },
+      //搜索状态改变
+      searchStateChange() {
+        setTimeout(() => {
+          const newQuery = {};
+          this.page.currentPage = 1;
+          for (const item in this.query) {
+            if (this.query[item] !== undefined && this.query[item] !== -1) {
+              newQuery[item] = this.query[item];
+            }
+          }
+          this.onLoad(this.page, newQuery);
+        }, 100);
+      },
+      //生成列表并到处
+      generateListAndDownload() {
+        const newQuery = {};
+        for (const item in this.query) {
+          if (this.query[item] !== undefined && this.query[item] !== -1) {
+            newQuery[item] = this.query[item];
+          }
+        }
+        newQuery.createTime = null;
+        newQuery.createTimeRange = null;
+        //获取列表键值对
+        newQuery.keyValue = {};
+        this.option.column.forEach(ele=>{
+          newQuery.keyValue[ele.prop] = ele.label;
+        });
+        newQuery.keyValue = JSON.stringify(newQuery.keyValue);
+        this.loading = true;
+        //生成列表
+        generateList(this.page.currentPage, this.page.pageSize, newQuery).then(res => {
+          FileUtil.download(res.data,{
+            type: "application/vnd.ms-excel"
+          },`生成转账记录-${moment().format("yyyy-MM-DD HH:mm:ss")}.xls`);
+        }).finally(()=>{
+          this.loading = false;
+        });
+      },
     }
   };
 </script>

+ 280 - 103
src/views/ldt_bills/withdrawrec.vue

@@ -27,35 +27,75 @@
       <!--                   @click="handleDelete">删 除-->
       <!--        </el-button>-->
       <!--      </template>-->
+      <template slot-scope="{type,size}" slot="createTimeSearch">
+        <el-radio-group v-model="query.createTime" :size="size" style="float: left">
+          <el-radio-button @click="searchStateChange" :label="-1">全部</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="1">今天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="2">昨天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="3">最近七天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="4">最近30天</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="5">本月</el-radio-button>
+          <el-radio-button @click="searchStateChange" :label="6">本年</el-radio-button>
+        </el-radio-group>
+        <avue-date v-model="query.createTimeRange" type="datetimerange" format="yyyy年MM月dd日 hh:mm:ss"
+                   value-format="yyyy-MM-dd hh:mm:ss" placeholder="请选择日期"
+                   :size="size"
+                   @change="searchStateChange"
+                   style="width: 280px;margin-left:5px;float: left"
+                   range-separator="-"
+                   start-placeholder="开始日期"
+                   end-placeholder="结束日期"></avue-date>
+      </template>
+      <template slot-scope="{type,size}" slot="withdrawStatusSearch">
+        <el-radio-group v-model="query.withdrawStatus" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='withdrawStatus';
+          }).dicData" :key="index">{{ select.label }}</el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="channelSearch">
+        <el-radio-group v-model="query.channel" :size="size" @change="searchStateChange">
+          <el-radio-button :label="select.value" v-for="(select,index) in option.column.find(ele=>{
+            return ele.prop==='channel';
+          }).dicData" :key="index">{{ select.label }}</el-radio-button>
+        </el-radio-group>
+      </template>
+      <template slot-scope="{type,size}" slot="keySearch">
+        <el-input type="text" placeholder="真实姓名/银行卡号/提现订单号" v-model="query.key" :size="size"
+                  style="width: 300px;margin: 1px 5px 1px 0;">
+          <el-button type="primary" :size="size" icon="el-icon-search" slot="append"
+                     @click="searchStateChange"></el-button>
+        </el-input>
+        <el-button type="primary" :size="size" icon="el-icon-top" @click="generateListAndDownload">生成列表</el-button>
+        <!--        <el-button type="primary" :size="size">导出已生成列表</el-button>-->
+      </template>
+
       <template slot="menuLeft">
-        <span style="font-family: '宋体'">
-          代理提现总金额:
-          <span style="background-color: #8c70b6;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{ censusPrice.channelAgentSum }}
-          </span>
-        </span>&nbsp;
-        <span type="warning" style="font-family: '宋体'">
-          商户提现总金额:
-          <span style="background-color: #a9c985;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ;">
-            {{ censusPrice.merchantsSum }}
-          </span>
-        </span>&nbsp;
+        <IconFontComp :option="censusOption"></IconFontComp>
       </template>
     </avue-crud>
   </basic-container>
 </template>
 
 <script>
-import {add, censusPrice, getDetail, getList, remove, update} from "@/api/ldt_bills/withdrawrec";
+import moment from "moment";
+import IconFontComp from "./comps/iconfont";
+import {add, censusPrice, generateList, getDetail, getList, remove, update} from "@/api/ldt_bills/withdrawrec";
 import {mapGetters} from "vuex";
+import FileUtil from "@/util/fileUtil";
 
 export default {
+  components:{IconFontComp},
   data() {
     return {
       form: {},
-      query: {},
+      query: {
+        withdrawStatus: -1,
+        createTime: -1,
+        createTimeRange: [],
+        channel: -1
+      },
       loading: true,
-      censusPrice: {},
       page: {
         pageSize: 10,
         currentPage: 1,
@@ -68,8 +108,8 @@ export default {
         tip: false,
         searchShow: true,
         searchMenuSpan: 6,
-        searchLabelWidth: 120,
-        searchSpan:4,
+        searchLabelWidth: 80,
+        searchSpan: 4,
         border: true,
         index: true,
         addBtn: false,
@@ -77,35 +117,37 @@ export default {
         delBtn: false,
         viewBtn: true,
         selection: true,
+        searchBtn: false,
+        emptyBtn: false,
+        searchSize: "mini",
         dialogClickModal: false,
         column: [
+          // {
+          //   label: "提现用户类型",
+          //   prop: "ownerType",
+          //   type: "select",
+          //   dicData: [{
+          //     label: "商家",
+          //     value: "1"
+          //   }],
+          //   rules: [{
+          //     required: true,
+          //     message: "请输入提现用户类型: 1-商家",
+          //     trigger: "blur"
+          //   }]
+          // },
           {
-            label: "提现用户类型",
-            prop: "ownerType",
-            search: true,
-            type: "select",
-            dicData: [{
-              label: "商家",
-              value: "1"
-            }],
-            rules: [{
-              required: true,
-              message: "请输入提现用户类型: 1-商家",
-              trigger: "blur"
-            }]
-          },
-          /*{
-            label: "提现用户id",
-            prop: "ownerId",
+            label: "用户信息",
+            prop: "ownerName",
             rules: [{
               required: true,
               message: "请输入提现用户id: 若owner_type = 1则为商家id",
               trigger: "blur"
             }]
-          },*/
+          },
           {
-            label: "提现用户名",
-            prop: "ownerName",
+            label: "用户UID",
+            prop: "ownerId",
             rules: [{
               required: true,
               message: "请输入提现用户id: 若owner_type = 1则为商家id",
@@ -121,15 +163,15 @@ export default {
               trigger: "blur"
             }]
           },
-          {
-            label: "需扣积分价值",
-            prop: "pointValue",
-            rules: [{
-              required: true,
-              message: "请输入需扣积分价值",
-              trigger: "blur"
-            }]
-          },
+          // {
+          //   label: "需扣积分价值",
+          //   prop: "pointValue",
+          //   rules: [{
+          //     required: true,
+          //     message: "请输入需扣积分价值",
+          //     trigger: "blur"
+          //   }]
+          // },
           {
             label: "实际提现金额",
             prop: "actualPrice",
@@ -139,20 +181,26 @@ export default {
               trigger: "blur"
             }]
           },
-          {
-            label: "提现手续费",
-            prop: "fee",
-            rules: [{
-              required: true,
-              message: "请输入提现手续费",
-              trigger: "blur"
-            }]
-          },
+          // {
+          //   label: "提现手续费",
+          //   prop: "fee",
+          //   rules: [{
+          //     required: true,
+          //     message: "请输入提现手续费",
+          //     trigger: "blur"
+          //   }]
+          // },
           {
             label: "提现状态",
             search: true,
             type: "select",
+            searchslot: true,
+            searchSpan: 24,
+            searchOrder: 1,
             dicData: [{
+              label: "全部",
+              value: -1,
+            },{
               label: "待确定",
               value: "1"
             }, {
@@ -179,8 +227,22 @@ export default {
             }]
           },
           {
-            label: "提现渠道",
+            label: "提现方式",
             prop: "channel",
+            searchslot: true,
+            search: true,
+            searchSpan: 24,
+            searchOrder: 2,
+            dicData: [
+              {
+                label: "全部",
+                value: -1,
+              },
+              {
+                label: "易宝",
+                value: "yeePay"
+              }
+            ],
             rules: [{
               required: true,
               message: "请输入提现渠道:yeePay(易宝支付)",
@@ -199,42 +261,41 @@ export default {
           {
             label: "接收人真实姓名",
             prop: "receiverAccountName",
-            search: true,
             rules: [{
               required: true,
               message: "请输入接收人真实姓名",
               trigger: "blur"
             }]
           },
+          // {
+          //   label: "接收人的银行账号",
+          //   prop: "receiverAccountNo",
+          //   rules: [{
+          //     required: true,
+          //     message: "请输入接收人的银行账号",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "到账类型",
+          //   prop: "receiveType",
+          //   rules: [{
+          //     required: true,
+          //     message: "请输入到账类型,默认实时到账",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "提现到账的金额",
+          //   prop: "receiveAmount",
+          //   rules: [{
+          //     required: true,
+          //     message: "请输入提现到账的金额",
+          //     trigger: "blur"
+          //   }]
+          // },
           {
-            label: "接收人的银行账号",
-            prop: "receiverAccountNo",
-            rules: [{
-              required: true,
-              message: "请输入接收人的银行账号",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "到账类型",
-            prop: "receiveType",
-            rules: [{
-              required: true,
-              message: "请输入到账类型,默认实时到账",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "提现到账的金额",
-            prop: "receiveAmount",
-            rules: [{
-              required: true,
-              message: "请输入提现到账的金额",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "失败原因",
+            label: "拒绝原因",
             prop: "failReason",
             rules: [{
               required: true,
@@ -243,25 +304,58 @@ export default {
             }]
           },
           {
-            label: "创建时间",
+            label: "添加时间",
             prop: "createTime",
             type: "datetime",
             format: "yyyy-MM-dd hh:mm:ss",
             valueFormat: "yyyy-MM-dd hh:mm:ss",
-            searchRange:true,
+            searchRange: true,
             addDisplay: false,
             editDisplay: false,
             search: true,
-            searchSpan:6,
+            searchSpan: 24,
+            searchslot: true,
+            searchOrder: 0,
             rules: [{
               required: true,
               message: "请输入通知时间",
               trigger: "blur"
             }]
           },
+          {
+            label: "关键字",
+            prop: "key",
+            hide: true,
+            search: true,
+            searchslot: true,
+            searchOrder: 3,
+            searchSpan: 24,
+            editDisplay: false,
+          },
         ]
       },
-      data: []
+      data: [],
+      censusOption: {
+        span: ()=>24/this.censusOption.data.length,
+        data: [
+          {
+            title: '代理提现',
+            prop: "channelAgentSum",
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-s-custom',
+            color: '0, 167, 208',
+          },
+          {
+            title: '商户提现',
+            prop: "merchantsSum",
+            count: 0,
+            decimals: 2,
+            icon: 'el-icon-paperclip',
+            color: '27, 201, 142',
+          },
+        ]
+      }
     };
   },
   computed: {
@@ -282,6 +376,60 @@ export default {
       return ids.join(",");
     }
   },
+  watch: {
+    //监听创建时间变化
+    "query.createTime": {
+      handler(value) {
+        //防止重复调用
+        if (value !== undefined) {
+          this.query.createTimeRange = [];
+          switch (value) {
+            case -1:
+              this.query.createTimeStart = undefined;
+              this.query.createTimeEnd = undefined;
+              break;
+            case 1: //今天
+              this.query.createTimeStart = moment().format("yyyy-MM-DD 00:00:00");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 2: //昨天
+              this.query.createTimeStart = moment().subtract(1, 'days').format("yyyy-MM-DD 00:00:00");
+              this.query.createTimeEnd = moment().subtract(1, 'days').format("yyyy-MM-DD 23:59:59");
+              break;
+            case 3: //近7天
+              this.query.createTimeStart = moment().subtract(7, 'days').format("yyyy-MM-DD HH:mm:ss");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 4: //近30天
+              this.query.createTimeStart = moment().subtract(30, 'days').format("yyyy-MM-DD HH:mm:ss");
+              this.query.createTimeEnd = moment().format("yyyy-MM-DD HH:mm:ss");
+              break;
+            case 5: //本月
+              this.query.createTimeStart = moment().format("yyyy-MM-01 00:00:00");
+              this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+              break;
+            case 6: //本年
+              this.query.createTimeStart = moment().format("yyyy-01-01 00:00:00");
+              this.query.createTimeEnd = moment().format(`yyyy-MM-DD HH:mm:ss`);
+              break;
+            default:
+              break;
+          }
+        }
+      }
+    },
+    //监听创建时间变化
+    "query.createTimeRange": {
+      handler(value) {
+        //防止重复调用
+        if (value.length === 2) {
+          this.query.createTimeStart = value[0];
+          this.query.createTimeEnd = value[1];
+          this.query.createTime = undefined;
+        }
+      }
+    },
+  },
   created() {
     this.getCensusPrice();
   },
@@ -386,19 +534,14 @@ export default {
       this.onLoad(this.page, this.query);
     },
     onLoad(page, params = {}) {
-      const {createTime} = this.query;
-      let values = {
-        ...params,
-      };
-      if (createTime) {
-        values = {
-          ...params,
-          createTimeStart: createTime[0],
-          createTimeEnd: createTime[1],
-          ...this.query
-        };
-        values.createTime = null;
+      let values = {};
+      for (const item in params) {
+        if (params[item] !== undefined && params[item] !== -1) {
+          values[item] = params[item];
+        }
       }
+      values.createTime = null;
+      values.createTimeRange = null;
       this.loading = true;
       getList(page.currentPage, page.pageSize, values).then(res => {
         const data = res.data.data;
@@ -410,9 +553,43 @@ export default {
     },
     getCensusPrice() {
       censusPrice().then(res => {
-        this.censusPrice = res.data.data;
+        this.censusOption.data.forEach(ele=>{
+          ele.count = res.data.data[ele.prop]?res.data.data[ele.prop]:0;
+        });
       });
-    }
+    },
+    //搜索状态改变
+    searchStateChange() {
+      setTimeout(() => {
+        this.onLoad(this.page, this.query);
+      }, 100);
+    },
+    //生成列表并到处
+    generateListAndDownload() {
+      const newQuery = {};
+      for (const item in this.query) {
+        if (this.query[item] !== undefined && this.query[item] !== -1) {
+          newQuery[item] = this.query[item];
+        }
+      }
+      newQuery.createTime = null;
+      newQuery.createTimeRange = null;
+      //获取列表键值对
+      newQuery.keyValue = {};
+      this.option.column.forEach(ele=>{
+        newQuery.keyValue[ele.prop] = ele.label;
+      });
+      newQuery.keyValue = JSON.stringify(newQuery.keyValue);
+      this.loading = true;
+      //生成列表
+      generateList(this.page.currentPage, this.page.pageSize, newQuery).then(res => {
+        FileUtil.download(res.data,{
+          type: "application/vnd.ms-excel"
+        },`生成提现记录-${moment().format("yyyy-MM-DD HH:mm:ss")}.xls`);
+      }).finally(()=>{
+        this.loading = false;
+      });
+    },
   }
 };
 </script>

+ 162 - 0
src/views/ldt_notice/notice-receiver.vue

@@ -0,0 +1,162 @@
+<template>
+  <div>
+    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" v-model="form"
+               ref="crud" @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
+               @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
+
+    </avue-crud>
+  </div>
+</template>
+
+<script>
+import {getList} from "@/api/ldt_notice/noticereceiver";
+import {mapGetters} from "vuex";
+
+export default {
+  props: {
+    operateId: String
+  },
+  data() {
+    return {
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        selection: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        refreshBtn: true,
+        columnBtn: false,
+        dialogClickModal: false,
+        menu: false,
+        column: [
+          {
+            label: "接收人",
+            prop: "receiver",
+            addDisplay: false,
+            rules: [{
+              required: true,
+              message: "请输入接收人",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "身份",
+            labelWidth: 100,
+            prop: "receiverType",
+            type: "checkbox",
+            search: true,
+            searchLabelWidth: 90,
+            span: 24,
+            dicData: [],
+            rules: [{
+              required: true,
+              message: "接受者类型",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "是否已读",
+            prop: "isRead",
+            type: "switch",
+            search: true,
+            addDisplay: false,
+            dicData: [
+              {
+                label: "未读",
+                value: false
+              },
+              {
+                label: "已读",
+                value: true
+              }
+            ],
+            value: false,
+            rules: [{
+              required: true,
+              message: "请输入是否已读",
+              trigger: "blur"
+            }],
+          }
+        ]
+      }
+    }
+  },
+  computed: {
+    ...mapGetters(["userInfo"]),
+  },
+  created() {
+    const receiverType = this.option.column.find(ele => {
+      return ele.prop === "receiverType";
+    });
+    receiverType.dicData = this.receiverTypeDicDataFun();
+  },
+  methods: {
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    receiverTypeDicDataFun() {
+      const data =
+        [
+          {label: "商家", value: "SHOP"}
+        ];
+      if (this.userInfo.tenant_id === '000000') {
+        data.push({label: "商场", value: "MALL"});
+        data.push({label: "用户", value: "CONSUMER"});
+      } else {
+        data.push({label: "会员", value: "MEMBER"});
+      }
+      return data;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    onLoad(page, params = {}) {
+      this.query.contentId = this.operateId;
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+        this.selectionClear();
+      });
+    }
+  }
+};
+</script>
+
+<style>
+</style>

+ 354 - 0
src/views/ldt_notice/notice.vue

@@ -0,0 +1,354 @@
+<template>
+  <basic-container>
+    <el-dialog @close="dialogShow=false" append-to-body :close-on-click-modal="false" :visible.sync="dialogShow"
+               :destroy-on-close="true"
+               :title="dialogTitle" width="60%">
+      <notice-receiver v-if="dialogTitle==='接收列表'&& dialogShow" ref="refName" :operateId="operateId"
+                       :isResubmit="isResubmit" @finish="dialogShow=false"></notice-receiver>
+    </el-dialog>
+
+    <avue-crud :option="option"
+               :table-loading="loading"
+               :data="data"
+               :page.sync="page"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               v-model="form"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+
+      <template slot-scope="scope" slot="menu">
+        <el-button class="el-button el-button--text el-button--small" icon="el-icon-edit"
+                   v-if="(userInfo.tenant_id === '000000' && scope.row.senderType === 'PLATFORM')||(userInfo.tenant_id !== '000000' && scope.row.senderType === 'MALL')"
+                   @click="rowEdit(scope.row,scope.index)">编辑
+        </el-button>
+        <el-button class="el-button el-button--text el-button--small" icon="el-icon-delete"
+                   v-if="(userInfo.tenant_id === '000000' && scope.row.senderType === 'PLATFORM')||(userInfo.tenant_id !== '000000' && scope.row.senderType === 'MALL')"
+                   @click="rowDel(scope.row)">删除
+        </el-button>
+        <el-button type="text" size="small" icon="icon-navicon-xxjsr" plain class="none-border"
+                   @click.stop="openDialog(scope.row.id,'接收列表')">接收列表
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+import {add, getDetail, getList, remove, update} from "@/api/ldt_notice/notice";
+import {mapGetters} from "vuex";
+import NoticeReceiver from "./notice-receiver";
+
+export default {
+  components: {NoticeReceiver},
+  data() {
+    return {
+      dialogShow: false,
+      operateId: '',
+      dialogTitle: '',
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: true,
+        selection: true,
+        delBtn: false,
+        editBtn: false,
+        dialogClickModal: false,
+        column: [
+          {
+            label: "标题",
+            prop: "title",
+            rules: [{
+              required: true,
+              message: "请输入标题",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "发送人",
+            prop: "sender",
+            display: false,
+            rules: [{
+              required: true,
+              message: "请输入发送人",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "发送者类型",
+            labelWidth: 100,
+            prop: "senderType",
+            type: "select",
+            search: true,
+            searchLabelWidth: 90,
+            display: false,
+            dicData: [],
+            rules: [{
+              required: true,
+              message: "请输入发送者类型",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "接收者类型",
+            labelWidth: 100,
+            prop: "receiverTypes",
+            type: "checkbox",
+            searchLabelWidth: 90,
+            hide: true,
+            editDisplay: false,
+            viewDisplay: false,
+            span: 24,
+            dicData: [],
+            rules: [{
+              required: true,
+              message: "接收者类型",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "内容",
+            prop: "content",
+            component: 'AvueUeditor',
+            options: {
+              action: '/api/blade-resource/oss/endpoint/put-file',
+              props: {
+                res: "data",
+                url: "link",
+              }
+            },
+            hide: true,
+            minRows: 6,
+            span: 24,
+            rules: [{
+              required: true,
+              message: "请输入内容",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "创建时间",
+            prop: "createTime",
+            addDisplay: false,
+            editDisplay: false,
+          },
+        ]
+      },
+      data: []
+    };
+  },
+  computed: {
+    ...mapGetters(["permission", "userInfo"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.notice_add, false),
+        viewBtn: this.vaildData(this.permission.notice_view, false),
+        delBtn: this.vaildData(this.permission.notice_delete, false),
+        editBtn: this.vaildData(this.permission.notice_edit, false)
+      };
+    },
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  created() {
+    const senderType = this.option.column.find(ele => {
+      return ele.prop === "senderType";
+    });
+    senderType.dicData = this.senderTypeDicDataFun();
+
+    const receiverTypes = this.option.column.find(ele => {
+      return ele.prop === "receiverTypes";
+    });
+    receiverTypes.dicData = this.receiverTypesDicDataFun();
+  },
+  methods: {
+    rowEdit(row, index) {
+      this.$refs.crud.rowEdit(row, index);
+    },
+    rowSave(row, done, loading) {
+      const content = encodeURIComponent(row.content);
+      row.content = content;
+      add(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      const content = encodeURIComponent(row.content);
+      row.content = content;
+      update(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        });
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(this.ids);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.$refs.crud.toggleSelection();
+        });
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getDetail(this.form.id).then(res => {
+          const content = res.data.data.content;
+          res.data.data.content = decodeURIComponent(content);
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    senderTypeDicDataFun() {
+      const data =
+        [
+          {label: "商场", value: "MALL"},
+          {label: "商家", value: "SHOP"}
+        ];
+      if (this.userInfo.tenant_id === '000000') {
+        data.push({label: "平台", value: "PLATFORM"});
+      }
+      return data;
+    },
+    receiverTypesDicDataFun() {
+      const data =
+        [
+          {label: "商家", value: "SHOP"}
+        ];
+      if (this.userInfo.tenant_id === '000000') {
+        data.push({label: "商场", value: "MALL"});
+        data.push({label: "用户", value: "CONSUMER"});
+      } else {
+        data.push({label: "会员", value: "MEMBER"});
+      }
+      return data;
+    },
+    openDialog(id, name) {
+      this.dialogTitle = name
+      this.operateId = id
+      this.dialogShow = true
+      this.canReset = true
+    },
+    handleSenderType() {
+      if (this.userInfo.tenant_id === '000000') {
+        this.form.senderType = 'PLATFORM';
+      } else {
+        this.form.senderType = 'MALL';
+      }
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records;
+        this.loading = false;
+        this.selectionClear();
+        this.handleSenderType();
+      });
+    }
+  }
+};
+</script>
+
+<style>
+</style>

+ 80 - 57
src/views/ldt_shop/handleMiniCROShopAudit.vue

@@ -9,8 +9,11 @@
         </el-row>
         <el-row type="flex" class="row-bg" justify="end">
           <el-form-item>
-            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="primary" @click="handleAgree" :loading="loading">同意</el-button>
-            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="danger" @click="handleDisagree" :loading="loading">驳回
+            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="primary" @click="handleAgree"
+                       :loading="loading">同意
+            </el-button>
+            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="danger" @click="handleDisagree"
+                       :loading="loading">驳回
             </el-button>
             <el-button @click="handleCancel">关闭</el-button>
           </el-form-item>
@@ -21,7 +24,7 @@
           <el-collapse-item title="易宝信息" name="yeepay">
             <el-card shadow="hover" style="margin-top: 20px;">
               <div v-for="(fee,index) in yeePayData.data" :key="index">
-                <h4 style="padding-left: 50px">{{fee.productName}}</h4>
+                <h4 style="padding-left: 50px">{{ fee.productName }}</h4>
                 <avue-form :option="yeePayData.option[index]" v-model="yeePayData.data[index]"></avue-form>
                 <el-divider/>
               </div>
@@ -56,7 +59,7 @@
 
 <script>
 import {getDetail} from "@/api/ldt_shop/audit"
-import {getProductFeeByShop} from "@/api/ldt_shop/shop"
+import {getProductFeeByShop, getShopDetail} from "@/api/ldt_shop/shop"
 import {historyFlowList} from "@/api/work/process";
 import {completeTask, todoList} from "@/api/work/work";
 
@@ -69,26 +72,34 @@ export default {
       businessId: null,
       form: {},
       task: {},
-      yeePayData:{
-        option:[],
-        data:[]
+      yeePayData: {
+        option: [],
+        data: []
       },
       loading: false,
       option: {
         emptyBtn: false,
         submitBtn: false,
-        labelPosition:"left",
+        labelPosition: "left",
         column: [
           {
             label: "商户名称",
             prop: "shopName",
-            span: 24,
+            span: 8,
             disabled: true,
           },
+          {
+            label: "商户联系人姓名",
+            prop: "contactName",
+            disabled: true,
+            labelWidth: 120,
+            span: 8
+          },
           {
             label: "身份证号",
             prop: "idCard",
             disabled: true,
+            span: 8,
             rules: [{
               required: true,
               message: "请输入身份证号",
@@ -99,6 +110,7 @@ export default {
             label: "具体地址",
             prop: "address",
             disabled: true,
+            span: 8,
             rules: [{
               required: true,
               message: "请输入具体地址",
@@ -108,43 +120,37 @@ export default {
           {
             label: "住址",
             prop: "addr",
-            disabled: true
-          },
-          {
-            label: "商户实际经营地所在省",
-            prop: "province",
-            disabled: true,
-            labelWidth: 160,
-            span: 8
-          },
-          {
-            label: "商户实际经营地所在市",
-            prop: "district",
-            disabled: true,
-            labelWidth: 160,
-            span: 8
-          },
-          {
-            label: "商户实际经营地所在区",
-            prop: "contactMobile",
-            disabled: true,
-            labelWidth: 160,
-            span: 8
-          },
-          {
-            label: "商户联系人姓名",
-            prop: "contactName",
             disabled: true,
-            labelWidth: 120,
-            span: 8
-          },
-          {
-            label: "商户联系人证件号码",
-            prop: "contactLicenceNo",
-            disabled: true,
-            labelWidth: 160,
-            span: 8
+            span: 8,
           },
+          // {
+          //   label: "商户实际经营地所在省",
+          //   prop: "province",
+          //   disabled: true,
+          //   labelWidth: 160,
+          //   span: 8
+          // },
+          // {
+          //   label: "商户实际经营地所在市",
+          //   prop: "city",
+          //   disabled: true,
+          //   labelWidth: 160,
+          //   span: 8
+          // },
+          // {
+          //   label: "商户实际经营地所在区",
+          //   prop: "district",
+          //   disabled: true,
+          //   labelWidth: 160,
+          //   span: 8
+          // },
+          // {
+          //   label: "商户联系人证件号码",
+          //   prop: "contactLicenceNo",
+          //   disabled: true,
+          //   labelWidth: 160,
+          //   span: 8
+          // },
           {
             label: "商户联系人手机号",
             prop: "contactMobile",
@@ -180,13 +186,25 @@ export default {
             labelWidth: 120,
             span: 8
           },
+          {
+            label: "位置编码",
+            prop: "locationCode",
+            disabled: true,
+            span: 12
+          },
+          {
+            label: "位置",
+            prop: "location",
+            disabled: true,
+            span: 12
+          },
           {
             label: "商户logo",
             prop: "shopLogo",
             type: 'upload',
             disabled: true,
             listType: 'picture-img',
-            span: 12,
+            span: 8,
             labelWidth: 120,
             propsHttp: {
               res: 'data',
@@ -210,7 +228,7 @@ export default {
             type: 'upload',
             disabled: true,
             listType: 'picture-img',
-            span: 12,
+            span: 8,
             labelWidth: 120,
             propsHttp: {
               res: 'data',
@@ -234,7 +252,7 @@ export default {
             disabled: true,
             type: 'upload',
             listType: 'picture-img',
-            span: 12,
+            span: 8,
             labelWidth: 120,
             propsHttp: {
               res: 'data',
@@ -246,17 +264,18 @@ export default {
             },
             tip: '只能上传jpg/png文件,且不超过500kb',
             action: '/api/blade-resource/oss/endpoint/put-file',
-           /* rules: [{
-              required: true,
-              message: "请输入身份证-反面",
-              trigger: "blur"
-            }]*/
+            /* rules: [{
+               required: true,
+               message: "请输入身份证-反面",
+               trigger: "blur"
+             }]*/
           },
           {
             label: "经营范围",
             prop: "businessScope",
             disabled: true,
-            type: "textarea"
+            type: "textarea",
+            span: 24,
           },
         ]
       },
@@ -293,7 +312,7 @@ export default {
         } else {
           this.$message.error(data.msg || '提交失败');
         }
-      }).finally(()=>{
+      }).finally(() => {
         this.loading = false;
       });
     },
@@ -321,7 +340,7 @@ export default {
         } else {
           this.$message.error(data.msg || '提交失败');
         }
-      }).finally(()=>{
+      }).finally(() => {
         this.loading = false;
       });
     },
@@ -332,6 +351,10 @@ export default {
       this.businessId = this.$route.params.businessId;
       this.processInstanceId = this.$route.params.processInstanceId;
       getDetail(this.businessId).then(res => {
+        getShopDetail(res.data.data.entityId).then(res => {
+          this.form.locationCode = res.data.data.locationCode;
+          this.form.location = res.data.data.location;
+        });
         this.form = res.data.data;
       });
       todoList(1, 10, {
@@ -345,14 +368,14 @@ export default {
         this.flowList = res.data.data;
         console.log(this.flowList)
       })
-      getProductFeeByShop().then(res=>{
+      getProductFeeByShop().then(res => {
         this.updateProductFee(res.data.data);
       });
     },
     updateProductFee(data) {
       this.yeePayData.data = data;
       this.yeePayData.option = [];
-      for(let i=0;i<this.yeePayData.data.length;i++){
+      for (let i = 0; i < this.yeePayData.data.length; i++) {
         const productFeeOption = {
           labelWidth: 150,
           emptyBtn: false,

+ 65 - 43
src/views/ldt_shop/handleShopAudit.vue

@@ -9,8 +9,11 @@
         </el-row>
         <el-row type="flex" class="row-bg" justify="end">
           <el-form-item>
-            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'"  type="primary" @click="handleAgree" :loading="loading">同意</el-button>
-            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'"  type="danger" @click="handleDisagree" :loading="loading">驳回
+            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="primary" @click="handleAgree"
+                       :loading="loading">同意
+            </el-button>
+            <el-button v-if="form.auditStatus == 'WAITING_PLATFORM'" type="danger" @click="handleDisagree"
+                       :loading="loading">驳回
             </el-button>
             <el-button @click="handleCancel">关闭</el-button>
           </el-form-item>
@@ -21,7 +24,7 @@
           <el-collapse-item title="易宝信息" name="yeepay">
             <el-card shadow="hover" style="margin-top: 20px;">
               <div v-for="(fee,index) in yeePayData.data" :key="index">
-                <h4 style="padding-left: 50px">{{fee.productName}}</h4>
+                <h4 style="padding-left: 50px">{{ fee.productName }}</h4>
                 <avue-form :option="yeePayData.option[index]" v-model="yeePayData.data[index]"></avue-form>
                 <el-divider/>
               </div>
@@ -56,7 +59,7 @@
 
 <script>
 import {getDetail} from "@/api/ldt_shop/audit"
-import {getProductFeeByMall} from "@/api/ldt_mall/mall"
+import {getMallDetail, getProductFeeByMall} from "@/api/ldt_mall/mall"
 import {historyFlowList} from "@/api/work/process";
 import {completeTask, todoList} from "@/api/work/work";
 
@@ -69,32 +72,34 @@ export default {
       businessId: null,
       form: {},
       loading: false,
-      yeePayData:{
-        option:[],
-        data:[]
+      yeePayData: {
+        option: [],
+        data: []
       },
       task: {},
       option: {
         emptyBtn: false,
         submitBtn: false,
-        labelPosition:"left",
+        labelPosition: "left",
         column: [
           {
             label: "商户名称",
             prop: "shopName",
-            span: 24,
+            span: 8,
             disabled: true,
           },
           {
             label: "企业名称【商户全称】",
             prop: "enterpriseName",
             disabled: true,
-            labelWidth: 160
+            labelWidth: 160,
+            span: 8,
           },
           {
             label: "主体信息",
             disabled: true,
             prop: "entity",
+            span: 8,
             rules: [{
               required: true,
               message: "请输入主体信息",
@@ -105,6 +110,7 @@ export default {
             label: "法人姓名",
             prop: "legalPerson",
             disabled: true,
+            span: 8,
             rules: [{
               required: true,
               message: "请输入法人姓名",
@@ -116,6 +122,7 @@ export default {
             prop: "legalLicenceType",
             disabled: true,
             labelWidth: 120,
+            span: 8,
             rules: [{
               required: true,
               message: "请输入法人证件类型",
@@ -127,22 +134,23 @@ export default {
             prop: "legalLicenceNo",
             disabled: true,
             labelWidth: 120,
+            span: 8,
             rules: [{
               required: true,
               message: "请输入法人证件号码",
               trigger: "blur"
             }]
           },
-          {
-            label: "身份证号",
-            prop: "idCard",
-            disabled: true,
-            rules: [{
-              required: true,
-              message: "请输入身份证号",
-              trigger: "blur"
-            }]
-          },
+          // {
+          //   label: "身份证号",
+          //   prop: "idCard",
+          //   disabled: true,
+          //   rules: [{
+          //     required: true,
+          //     message: "请输入身份证号",
+          //     trigger: "blur"
+          //   }]
+          // },
           {
             label: "具体地址",
             prop: "address",
@@ -158,7 +166,7 @@ export default {
             prop: "addr",
             disabled: true
           },
-          {
+          /*{
             label: "商户实际经营地所在省",
             prop: "province",
             disabled: true,
@@ -167,18 +175,18 @@ export default {
           },
           {
             label: "商户实际经营地所在市",
-            prop: "district",
+            prop: "city",
             disabled: true,
             labelWidth: 160,
             span: 8
           },
           {
             label: "商户实际经营地所在区",
-            prop: "contactMobile",
+            prop: "district",
             disabled: true,
             labelWidth: 160,
             span: 8
-          },
+          },*/
           {
             label: "成立时间",
             prop: "registeredDate",
@@ -204,13 +212,13 @@ export default {
             labelWidth: 120,
             span: 8
           },
-          {
-            label: "商户联系人证件号码",
-            prop: "contactLicenceNo",
-            disabled: true,
-            labelWidth: 160,
-            span: 8
-          },
+          // {
+          //   label: "商户联系人证件号码",
+          //   prop: "contactLicenceNo",
+          //   disabled: true,
+          //   labelWidth: 160,
+          //   span: 8
+          // },
           {
             label: "商户联系人手机号",
             prop: "contactMobile",
@@ -223,7 +231,7 @@ export default {
             prop: "openAccountLicenceNo",
             disabled: true,
             labelWidth: 120,
-            span:24
+            span: 8,
           },
           {
             label: "银行账户类型",
@@ -246,6 +254,18 @@ export default {
             labelWidth: 120,
             span: 8
           },
+          {
+            label: "位置编码",
+            prop: "locationCode",
+            disabled: true,
+            span: 8
+          },
+          {
+            label: "位置",
+            prop: "location",
+            disabled: true,
+            span: 8
+          },
           {
             label: "开户许可证照片",
             prop: "openAccountLicenceUrl",
@@ -334,11 +354,11 @@ export default {
             },
             tip: '只能上传jpg/png文件,且不超过500kb',
             action: '/api/blade-resource/oss/endpoint/put-file',
-           /* rules: [{
-              required: true,
-              message: "请输入身份证-反面",
-              trigger: "blur"
-            }]*/
+            /* rules: [{
+               required: true,
+               message: "请输入身份证-反面",
+               trigger: "blur"
+             }]*/
           },
           {
             label: "营业执照",
@@ -404,7 +424,7 @@ export default {
         } else {
           this.$message.error(data.msg || '提交失败');
         }
-      }).finally(()=>{
+      }).finally(() => {
         this.loading = false;
       });
     },
@@ -432,7 +452,7 @@ export default {
         } else {
           this.$message.error(data.msg || '提交失败');
         }
-      }).finally(()=>{
+      }).finally(() => {
         this.loading = false;
       })
     },
@@ -443,6 +463,10 @@ export default {
       this.businessId = this.$route.params.businessId;
       this.processInstanceId = this.$route.params.processInstanceId;
       getDetail(this.businessId).then(res => {
+        getMallDetail(res.data.data.entityId).then(res => {
+          this.form.locationCode = res.data.data.locationCode;
+          this.form.location = res.data.data.location;
+        });
         this.form = res.data.data;
       });
       todoList(1, 10, {
@@ -450,20 +474,18 @@ export default {
         processInstanceId: this.processInstanceId
       }).then(res => {
         this.task = res.data.data.records[0];
-        console.log(this.task);
       })
       historyFlowList(this.processInstanceId).then(res => {
         this.flowList = res.data.data;
-        console.log(this.flowList)
       })
-      getProductFeeByMall().then(res=>{
+      getProductFeeByMall().then(res => {
         this.updateProductFee(res.data.data);
       });
     },
     updateProductFee(data) {
       this.yeePayData.data = data;
       this.yeePayData.option = [];
-      for(let i=0;i<this.yeePayData.data.length;i++){
+      for (let i = 0; i < this.yeePayData.data.length; i++) {
         const productFeeOption = {
           labelWidth: 150,
           emptyBtn: false,

+ 87 - 86
src/views/wel/agentIndex.vue

@@ -1,74 +1,75 @@
 <template>
-  <div>
-    <el-row>
-      <el-col :span="24">
-        <third-register></third-register>
-      </el-col>
-    </el-row>
-    <el-row>
+  <el-row>
+    <el-col :span="24">
       <basic-container>
-        <el-col :span="24">
-          <avue-form :option="agentInfo.accountInfo.option" v-model="agentInfo.accountInfo.agentData">
-            <template slot-scope="scope" slot="avatar">
-              <avue-avatar :size="50" shape="circle" icon="el-icon-circle-plus-outline"
-                           :src="agentInfo.accountInfo.agentData.avatar"
-                           style="border: 1px solid #eee"/>
-              <span class="mallName">{{ agentInfo.accountInfo.agentData.accountName }}</span>
-            </template>
-            <template slot-scope="scope" slot="totalBalance">
-              <span>{{ agentInfo.accountInfo.agentData.totalBalance }} 元</span>
-            </template>
-            <template slot-scope="scope" slot="availableValance">
-              <span>{{ agentInfo.accountInfo.agentData.availableValance }} 元</span>
-            </template>
-          </avue-form>
-        </el-col>
+        <avue-form :option="agentInfo.accountInfo.option" v-model="agentInfo.accountInfo.agentData">
+          <template slot-scope="scope" slot="avatar">
+            <avue-avatar :size="50" shape="circle" icon="el-icon-circle-plus-outline"
+                         :src="agentInfo.accountInfo.agentData.avatar"
+                         style="border: 1px solid #eee"/>
+            <span class="mallName">{{ agentInfo.accountInfo.agentData.accountName }}</span>
+          </template>
+          <template slot-scope="scope" slot="totalBalance">
+            <span>{{ agentInfo.accountInfo.agentData.totalBalance }} 元</span>
+          </template>
+          <template slot-scope="scope" slot="availableValance">
+            <span>{{ agentInfo.accountInfo.agentData.availableValance }} 元</span>
+          </template>
+        </avue-form>
       </basic-container>
-    </el-row>
-    <el-row>
-      <el-col :span="24">
-        <basic-container>
-          <el-card class="box-card">
-            <avue-data-panel :option="optionTotal"></avue-data-panel>
-          </el-card>
-          <div style="margin-top: 30px;">
-            <h3>今日新增</h3>
-            <avue-data-display :option="optionToday"></avue-data-display>
-          </div>
-          <div style="margin-top: 30px;">
-            <h3>新增趋势
-              <el-date-picker
-                size="mini"
-                :picker-options="tenantAddTrend.pickerOptions"
-                v-model="tenantAddTrend.time"
-                type="month"
-                @change="getTenantAddTrend"
-                value-format="yyyy-MM"
-                placeholder="选择月"
-                style="float: right">
-              </el-date-picker>
-            </h3>
-            <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
-          </div>
-          <div style="margin-top: 30px;">
-            <h3>代理账单
-              <el-date-picker
-                size="mini"
-                :picker-options="tenantPlatformBills.pickerOptions"
-                v-model="tenantPlatformBills.time"
-                type="month"
-                @change="getTenantPlatformBills"
-                value-format="yyyy-MM"
-                placeholder="选择月"
-                style="float: right">
-              </el-date-picker>
-            </h3>
-            <div ref="tenantPlatformBills" style="height: 500px;width: 100%"></div>
-          </div>
-        </basic-container>
-      </el-col>
-    </el-row>
-  </div>
+    </el-col>
+    <el-col :span="24">
+      <basic-container>
+        <avue-data-panel :option="optionTotal"></avue-data-panel>
+      </basic-container>
+    </el-col>
+    <el-col :span="24">
+      <basic-container>
+        <div>
+          <h3>今日新增</h3>
+          <avue-data-display :option="optionToday"></avue-data-display>
+        </div>
+      </basic-container>
+    </el-col>
+    <el-col :span="24">
+      <basic-container>
+        <div>
+          <h3>新增趋势
+            <el-date-picker
+              size="mini"
+              :picker-options="tenantAddTrend.pickerOptions"
+              v-model="tenantAddTrend.time"
+              type="month"
+              @change="getTenantAddTrend"
+              value-format="yyyy-MM"
+              placeholder="选择月"
+              style="float: right">
+            </el-date-picker>
+          </h3>
+          <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
+        </div>
+      </basic-container>
+    </el-col>
+    <el-col :span="24">
+      <basic-container>
+        <div>
+          <h3>代理账单
+            <el-date-picker
+              size="mini"
+              :picker-options="tenantPlatformBills.pickerOptions"
+              v-model="tenantPlatformBills.time"
+              type="month"
+              @change="getTenantPlatformBills"
+              value-format="yyyy-MM"
+              placeholder="选择月"
+              style="float: right">
+            </el-date-picker>
+          </h3>
+          <div ref="tenantPlatformBills" style="height: 500px;width: 100%"></div>
+        </div>
+      </basic-container>
+    </el-col>
+  </el-row>
 </template>
 <script>
 import moment from "moment";
@@ -190,7 +191,7 @@ export default {
               ['trend'],
               ['商户新增'],
             ],
-            path: [ "/ldt_agent/agentrecord"]
+            path: ["/ldt_agent/agentrecord"]
           },
           xAxis: {type: 'category'},
           yAxis: {gridIndex: 0, splitNumber: 2},
@@ -271,12 +272,12 @@ export default {
       this.getTenantPlatformBills();
     },
     //删除数组的某个元素
-    deleteArrayByObj(arr,attrName,...value){
-      value.forEach(ele=>{
-        for (let i = 0;i < arr.length; i++){
+    deleteArrayByObj(arr, attrName, ...value) {
+      value.forEach(ele => {
+        for (let i = 0; i < arr.length; i++) {
           const column = arr[i];
-          if (ele === column[attrName]){
-            arr.splice(i,1);
+          if (ele === column[attrName]) {
+            arr.splice(i, 1);
           }
         }
       });
@@ -285,22 +286,22 @@ export default {
     getTenantCensusCount() {
       //获取租户数量
       getAgentTenantCensusCount().then(res => {
-        this.setArrayObjAttrByObj(this.optionTotal.data,"title","商店总数","count",res.data.data.shopCount);
-        this.setArrayObjAttrByObj(this.optionTotal.data,"title","收入总额","count",res.data.data.incomeTotal);
+        this.setArrayObjAttrByObj(this.optionTotal.data, "title", "商店总数", "count", res.data.data.shopCount);
+        this.setArrayObjAttrByObj(this.optionTotal.data, "title", "收入总额", "count", res.data.data.incomeTotal);
       });
     },
     //获取租户当日数据统计
     getTenantTodayCensusCount() {
       //获取租户数量
       getAgentTenantTodayCensusCount().then(res => {
-        this.setArrayObjAttrByObj(this.optionToday.data,"title","新增商户","count",res.data.data.shopCount);
-        this.setArrayObjAttrByObj(this.optionToday.data,"title","今日收入","count",res.data.data.incomeTotal);
+        this.setArrayObjAttrByObj(this.optionToday.data, "title", "新增商户", "count", res.data.data.shopCount);
+        this.setArrayObjAttrByObj(this.optionToday.data, "title", "今日收入", "count", res.data.data.incomeTotal);
       });
     },
     //设置数组对象属性值
-    setArrayObjAttrByObj(arr,attrName,attrValue,key,value){
-      arr.forEach(ele=>{
-        if(ele[attrName]===attrValue){
+    setArrayObjAttrByObj(arr, attrName, attrValue, key, value) {
+      arr.forEach(ele => {
+        if (ele[attrName] === attrValue) {
           ele[key] = value;
           return;
         }
@@ -314,7 +315,7 @@ export default {
         time: time.format("yyyy-MM-DD HH:mm:ss")
       }).then(res => {
         //清空内容
-        for(let i=0;i<this.tenantAddTrend.option.dataset.source.length;i++){
+        for (let i = 0; i < this.tenantAddTrend.option.dataset.source.length; i++) {
           this.tenantAddTrend.option.dataset.source[i].splice(1);
         }
 
@@ -329,7 +330,7 @@ export default {
 
           //添加Y坐标
           //添加商户新增
-          this.setAddTrend(res.data.data.shopAddCount,date,"商户新增");
+          this.setAddTrend(res.data.data.shopAddCount, date, "商户新增");
 
           //加上一天
           time.add(1, 'days');
@@ -376,7 +377,7 @@ export default {
       });
     },
     //设置趋势
-    setAddTrend(arr,date,attrName){
+    setAddTrend(arr, date, attrName) {
       //添加Y坐标
       let count = 0;
       //添加用户新增
@@ -385,8 +386,8 @@ export default {
           count = ele.count;
         }
       });
-      this.tenantAddTrend.option.dataset.source.forEach(ele=>{
-        if(ele[0]===attrName){
+      this.tenantAddTrend.option.dataset.source.forEach(ele => {
+        if (ele[0] === attrName) {
           ele.push(count);
         }
       });

+ 62 - 63
src/views/wel/index.vue

@@ -1,69 +1,68 @@
 <template>
-  <div>
-    <el-row>
-      <el-col :span="24">
-        <third-register></third-register>
-      </el-col>
-    </el-row>
-    <el-row>
-      <el-col :span="24">
-        <basic-container>
-          <el-card class="box-card">
-            <avue-data-panel :option="optionTotal"></avue-data-panel>
-          </el-card>
-          <div style="margin-top: 30px;" v-if="userInfo.role_name==='salesman'">
-            <h3>推广二维码</h3>
-            <el-col :span="24">
-              <div class="block" v-for="(qrcode,index) in qrcode" :key="index" style="float: left">
-                <el-popover placement="right" trigger="hover">
-                  <el-image :src="qrcode.imgLink"/>
-                  <div slot="reference">
-                    <el-image class="img-hover"
-                              :src="qrcode.imgLink" fit="cover" @click="downloadImg(qrcode.imgLink)"></el-image>
-                    <p style="text-align: center;margin-bottom: 40px;color: #999;">{{ qrcode.imgName }}</p>
-                  </div>
-                </el-popover>
+  <el-row>
+    <el-col :span="24">
+      <basic-container>
+        <avue-data-panel :option="optionTotal"></avue-data-panel>
+      </basic-container>
+    </el-col>
+    <el-col :span="24" v-if="userInfo.role_name==='salesman'">
+      <basic-container>
+        <h3>推广二维码</h3>
+        <el-col :span="24">
+          <div class="block" v-for="(qrcode,index) in qrcode" :key="index" style="float: left">
+            <el-popover placement="right" trigger="hover">
+              <el-image :src="qrcode.imgLink"/>
+              <div slot="reference">
+                <el-image class="img-hover"
+                          :src="qrcode.imgLink" fit="cover" @click="downloadImg(qrcode.imgLink)"></el-image>
+                <p style="text-align: center;margin-bottom: 40px;color: #999;">{{ qrcode.imgName }}</p>
               </div>
-            </el-col>
+            </el-popover>
           </div>
-          <div style="margin-top: 30px;">
-            <h3>今日新增</h3>
-            <avue-data-display :option="optionToday"></avue-data-display>
-          </div>
-          <div style="margin-top: 30px;">
-            <h3>新增趋势
-              <el-date-picker
-                size="mini"
-                :picker-options="tenantAddTrend.pickerOptions"
-                v-model="tenantAddTrend.time"
-                type="month"
-                @change="getTenantAddTrend"
-                value-format="yyyy-MM"
-                placeholder="选择月"
-                style="float: right">
-              </el-date-picker>
-            </h3>
-            <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
-          </div>
-          <div style="margin-top: 30px;">
-            <h3>平台账单
-              <el-date-picker
-                size="mini"
-                :picker-options="tenantPlatformBills.pickerOptions"
-                v-model="tenantPlatformBills.time"
-                type="month"
-                @change="getTenantPlatformBills"
-                value-format="yyyy-MM"
-                placeholder="选择月"
-                style="float: right">
-              </el-date-picker>
-            </h3>
-            <div ref="tenantPlatformBills" style="height: 500px;width: 100%"></div>
-          </div>
-        </basic-container>
-      </el-col>
-    </el-row>
-  </div>
+        </el-col>
+      </basic-container>
+    </el-col>
+    <el-col :span="24">
+      <basic-container>
+        <h3>今日新增</h3>
+        <avue-data-display :option="optionToday"></avue-data-display>
+      </basic-container>
+    </el-col>
+    <el-col :span="12">
+      <basic-container>
+        <h3>新增趋势
+          <el-date-picker
+            size="mini"
+            :picker-options="tenantAddTrend.pickerOptions"
+            v-model="tenantAddTrend.time"
+            type="month"
+            @change="getTenantAddTrend"
+            value-format="yyyy-MM"
+            placeholder="选择月"
+            style="float: right">
+          </el-date-picker>
+        </h3>
+        <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
+      </basic-container>
+    </el-col>
+    <el-col :span="12">
+      <basic-container>
+        <h3>平台账单
+          <el-date-picker
+            size="mini"
+            :picker-options="tenantPlatformBills.pickerOptions"
+            v-model="tenantPlatformBills.time"
+            type="month"
+            @change="getTenantPlatformBills"
+            value-format="yyyy-MM"
+            placeholder="选择月"
+            style="float: right">
+          </el-date-picker>
+        </h3>
+        <div ref="tenantPlatformBills" style="height: 500px;width: 100%"></div>
+      </basic-container>
+    </el-col>
+  </el-row>
 </template>
 <script>
 import moment from "moment";

+ 103 - 108
src/views/wel/mallIndex.vue

@@ -1,11 +1,6 @@
 <template>
-  <div>
-    <el-row>
-      <el-col :span="24">
-        <third-register></third-register>
-      </el-col>
-    </el-row>
-    <el-row v-if="showAccountInfo">
+  <el-row>
+    <el-col :span="24" v-if="showAccountInfo">
       <basic-container>
         <el-col :span="12">
           <avue-form :option="merchant.accountInfo.option" v-model="merchant.accountInfo.mallData">
@@ -40,19 +35,19 @@
           <avue-form ref="form" :option="rechargeForm.option"
                      @submit="rechargeSubmit">
           </avue-form>
-<!--          <table border="1" cellpadding="5" bordercolor="#898989" v-if="rechargeTable.status"-->
-<!--                 :style="rechargeTable.style">-->
-<!--            <tr v-for="(item,index) in rechargeTable.option" :key="`${index}`">-->
-<!--              <th v-if="item2.type==='th'" v-for="(item2,index2) in item" :key="`${index+index2}`"-->
-<!--                  :colspan="item2.colspan?item2.colspan:1" :style="item2.style">-->
-<!--                <span v-html="item2.name"></span>{{ (typeof item2.value) === "function" ? item2.value() : item2.value }}-->
-<!--              </th>-->
-<!--              <th v-if="item2.type==='td'" v-for="(item2,index2) in item" :key="`${index+index2}`"-->
-<!--                  :colspan="item2.colspan?item2.colspan:1" :style="item2.style">-->
-<!--                <span v-html="item2.name"></span>{{ (typeof item2.value) === "function" ? item2.value() : item2.value }}-->
-<!--              </th>-->
-<!--            </tr>-->
-<!--          </table>-->
+          <!--          <table border="1" cellpadding="5" bordercolor="#898989" v-if="rechargeTable.status"-->
+          <!--                 :style="rechargeTable.style">-->
+          <!--            <tr v-for="(item,index) in rechargeTable.option" :key="`${index}`">-->
+          <!--              <th v-if="item2.type==='th'" v-for="(item2,index2) in item" :key="`${index+index2}`"-->
+          <!--                  :colspan="item2.colspan?item2.colspan:1" :style="item2.style">-->
+          <!--                <span v-html="item2.name"></span>{{ (typeof item2.value) === "function" ? item2.value() : item2.value }}-->
+          <!--              </th>-->
+          <!--              <th v-if="item2.type==='td'" v-for="(item2,index2) in item" :key="`${index+index2}`"-->
+          <!--                  :colspan="item2.colspan?item2.colspan:1" :style="item2.style">-->
+          <!--                <span v-html="item2.name"></span>{{ (typeof item2.value) === "function" ? item2.value() : item2.value }}-->
+          <!--              </th>-->
+          <!--            </tr>-->
+          <!--          </table>-->
         </el-drawer>
         <el-col :span="12">
           <div role="tab" aria-expanded="true" aria-controls="el-collapse-content-8236"
@@ -82,36 +77,36 @@
           </el-table>
         </el-col>
       </basic-container>
-    </el-row>
-    <el-row>
-      <el-col :span="24">
-        <basic-container>
-          <el-card class="box-card">
-            <avue-data-panel :option="optionTotal"></avue-data-panel>
-          </el-card>
-          <div style="margin-top: 30px;">
-            <h3>今日新增</h3>
-            <avue-data-display :option="optionToday"></avue-data-display>
-          </div>
-          <div style="margin-top: 30px;">
-            <h3>新增趋势
-              <el-date-picker
-                size="mini"
-                :picker-options="tenantAddTrend.pickerOptions"
-                v-model="tenantAddTrend.time"
-                type="month"
-                @change="getTenantAddTrend"
-                value-format="yyyy-MM"
-                placeholder="选择月"
-                style="float: right">
-              </el-date-picker>
-            </h3>
-            <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
-          </div>
-        </basic-container>
-      </el-col>
-    </el-row>
-  </div>
+    </el-col>
+    <el-col :span="24">
+      <basic-container>
+        <avue-data-panel :option="optionTotal"></avue-data-panel>
+      </basic-container>
+    </el-col>
+    <el-col :span="24">
+      <basic-container>
+        <h3>今日新增</h3>
+        <avue-data-display :option="optionToday"></avue-data-display>
+      </basic-container>
+    </el-col>
+    <el-col :span="24">
+      <basic-container>
+        <h3>新增趋势
+          <el-date-picker
+            size="mini"
+            :picker-options="tenantAddTrend.pickerOptions"
+            v-model="tenantAddTrend.time"
+            type="month"
+            @change="getTenantAddTrend"
+            value-format="yyyy-MM"
+            placeholder="选择月"
+            style="float: right">
+          </el-date-picker>
+        </h3>
+        <div ref="tenantAddTrend" style="height: 500px;width: 100%"></div>
+      </basic-container>
+    </el-col>
+  </el-row>
 </template>
 <script>
 import moment from "moment";
@@ -359,62 +354,62 @@ export default {
                   span: 24,
                   prop: 'bankCode',
                   type: 'select',
-                  dicData:[{
-                    label:"青岛银行",
-                    value:"QDYH",
-                    desc:"QDYH"
-                  },{
-                    label:"建设银行",
-                    value:"CCB",
-                    desc:"CCB"
-                  },{
-                    label:"农业银行",
-                    value:"ABC",
-                    desc:"ABC"
-                  },{
-                    label:"光大银行",
-                    value:"CEB",
-                    desc:"CEB"
-                  },{
-                    label:"中信银行",
-                    value:"ECITIC",
-                    desc:"ECITIC"
-                  },{
-                    label:"兴业银行",
-                    value:"CIB",
-                    desc:"CIB"
-                  },{
-                    label:"华夏银行",
-                    value:"HXB",
-                    desc:"HXB"
-                  },{
-                    label:"工商银行",
-                    value:"ICBC",
-                    desc:"ICBC"
-                  },{
-                    label:"中国银行",
-                    value:"BOC",
-                    desc:"BOC"
-                  },{
-                    label:"招商银行",
-                    value:"CMBCHINA",
-                    desc:"CMBCHINA"
-                  },{
-                    label:"民生银行",
-                    value:"CMBC",
-                    desc:"CMBC"
-                  },{
-                    label:"浦发银行",
-                    value:"SPDB",
-                    desc:"SPDB"
-                  },{
-                    label:"平安银行",
-                    value:"SZPA",
-                    desc:"SZPA"
-                  },{
-                    label:"交通银行",
-                    value:"BOCO",
-                    desc:"BOCO"
+                  dicData: [{
+                    label: "青岛银行",
+                    value: "QDYH",
+                    desc: "QDYH"
+                  }, {
+                    label: "建设银行",
+                    value: "CCB",
+                    desc: "CCB"
+                  }, {
+                    label: "农业银行",
+                    value: "ABC",
+                    desc: "ABC"
+                  }, {
+                    label: "光大银行",
+                    value: "CEB",
+                    desc: "CEB"
+                  }, {
+                    label: "中信银行",
+                    value: "ECITIC",
+                    desc: "ECITIC"
+                  }, {
+                    label: "兴业银行",
+                    value: "CIB",
+                    desc: "CIB"
+                  }, {
+                    label: "华夏银行",
+                    value: "HXB",
+                    desc: "HXB"
+                  }, {
+                    label: "工商银行",
+                    value: "ICBC",
+                    desc: "ICBC"
+                  }, {
+                    label: "中国银行",
+                    value: "BOC",
+                    desc: "BOC"
+                  }, {
+                    label: "招商银行",
+                    value: "CMBCHINA",
+                    desc: "CMBCHINA"
+                  }, {
+                    label: "民生银行",
+                    value: "CMBC",
+                    desc: "CMBC"
+                  }, {
+                    label: "浦发银行",
+                    value: "SPDB",
+                    desc: "SPDB"
+                  }, {
+                    label: "平安银行",
+                    value: "SZPA",
+                    desc: "SZPA"
+                  }, {
+                    label: "交通银行",
+                    value: "BOCO",
+                    desc: "BOCO"
                   }],
                   labelWidth: 90,
                   precision: 2,
@@ -756,13 +751,13 @@ export default {
         // this.rechargeTable.status = true;
 
         //跳转支付
-        window.open(res.data.data.payUrl,"支付窗口","top=200,left=200,toolbar=no,status=no,location=no,resizable=no,menubar=no,scrollbars=no,resizable=no,width=1000,height=700");
+        window.open(res.data.data.payUrl, "支付窗口", "top=200,left=200,toolbar=no,status=no,location=no,resizable=no,menubar=no,scrollbars=no,resizable=no,width=1000,height=700");
 
         this.$message({
           type: "warning",
           message: "提交成功,请在页面进行充值!"
         });
-      }).finally(()=>{
+      }).finally(() => {
         done();
       });
     },

+ 2 - 2
vue.config.js

@@ -26,9 +26,9 @@ module.exports = {
     proxy: {
       '/api': {
         //本地服务接口地址
-        target: 'http://localhost:2366',
+        // target: 'http://localhost:2366',
+        target: 'http://139.159.240.119:2366/',
         // target: 'https://ldt.guosen-fumao.cn/api',
-
         //远程演示服务地址,可用于直接启动项目
         //target: 'https://saber.bladex.vip/api',
         ws: true,