Browse Source

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/views/statistics/withdrawalRecord/index.vue
梁展鹏 3 years ago
parent
commit
8fc11ef740

+ 3 - 0
src/api/system/account.js

@@ -17,3 +17,6 @@ export const saveItem = params => {
 };
 export const delItem = ({ id, ...params }) =>
   api.del(`/yxl-back-end/framework/uiac/role/del/${id}`, params);
+
+export const getSelectList = params =>
+  api.get(`/yxl-back-end/framework/uiac/account/search-select`, params);

+ 6 - 0
src/containers/ToolbarContainer.vue

@@ -102,6 +102,12 @@
               :params="field.params"
               :clearable="true"
             />
+            <AccountSelect
+              v-if="field.type === 'AccountSelect'"
+              v-model="form[field.name]"
+              :params="field.params"
+              :clearable="true"
+            />
           </el-form-item>
         </el-col>
       </el-row>

+ 100 - 0
src/containers/accountSelect/AccountSelect.vue

@@ -0,0 +1,100 @@
+<template>
+  <el-select
+    v-model="vModel"
+    placeholder="请选择"
+    filterable
+    remote
+    :remote-method="remoteMethod"
+    clearable
+    v-bind="$attrs"
+    @change="onChange"
+  >
+    <el-option
+      v-for="item in options"
+      :key="item.id"
+      :label="item.nickname"
+      :value="item.id"
+    >
+      <span style="float: left">{{ item.nickname }}</span>
+      <span style="float: right; color: #8492a6; font-size: 13px">{{
+        item.mobileNumber | phoneFormat
+      }}</span>
+    </el-option>
+  </el-select>
+</template>
+
+<script>
+import { getSelectList } from '@/api/system/account';
+
+export default {
+  name: 'AccountSelect',
+
+  filters: {
+    phoneFormat: function(str) {
+      if (!str) {
+        return '-';
+      }
+      let pattern = /^(\d{3})(\d{4})(\d{4})$/;
+      return str.replace(pattern, `$1-$2-$3`);
+    }
+  },
+
+  props: {
+    value: {
+      type: String,
+      default: ''
+    },
+    firstLoad: {
+      type: Boolean,
+      default: true
+    }
+  },
+
+  data() {
+    return {
+      vModel: this.value,
+      options: []
+    };
+  },
+
+  watch: {
+    value: {
+      handler(val) {
+        this.vModel = val;
+      },
+      immediate: true
+    }
+  },
+
+  mounted() {
+    this.firstLoad && this.loadData();
+  },
+
+  methods: {
+    onChange(value) {
+      this.$emit('input', value || null);
+    },
+
+    remoteMethod(query) {
+      if (query === '') {
+        this.loadData();
+      } else {
+        this.loadData(query);
+      }
+    },
+
+    async loadData(keyword = '') {
+      const params = {};
+      if (keyword) {
+        params.keyword = keyword;
+      }
+      const { success, data, msg } = await getSelectList(params);
+      if (success) {
+        this.options = data;
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 2 - 0
src/containers/index.js

@@ -1,9 +1,11 @@
 import Vue from 'vue';
+import AccountSelect from './accountSelect/AccountSelect.vue';
 import ActivitySelect from './ActivitySelect/ActivitySelect.vue';
 import IssueTypeSelect from './issueType/IssueTypeSelect.vue';
 import SceneSelect from './sceneSelect/SceneSelect.vue';
 import ToolbarContainer from './ToolbarContainer.vue';
 
+Vue.component('AccountSelect', AccountSelect);
 Vue.component('ActivitySelect', ActivitySelect);
 Vue.component('IssueTypeSelect', IssueTypeSelect);
 Vue.component('SceneSelect', SceneSelect);

+ 3 - 6
src/mixins/filterList.js

@@ -36,14 +36,11 @@ const filterList = (params = {}) => ({
       const inParams = {
         ...this.filter,
         ...this.internalFilterObj,
-        page: this.pagination.page,
-        size: this.pagination.pageSize
+        start: this.pagination.page,
+        limit: this.pagination.pageSize
       };
 
-      const { data, msg } = await this.apiList(inParams, {
-        limit: this.pagination.pageSize,
-        start: this.pagination.page
-      });
+      const { data, msg } = await this.apiList(inParams);
       if ('data' in data) {
         const items = data.data;
         if (items.length === 0 && this.pagination.page > 1) {

+ 2 - 2
src/utils/request.js

@@ -315,8 +315,8 @@ const post = (url, data = {}, config) => {
         data,
         seq: config.seq,
         token: config.token,
-        limit: data.size,
-        start: data.page
+        limit: data.limit,
+        start: data.start
       },
       config
     )

+ 1 - 1
src/views/baseManagement/problemFeedbackManagement/toolbar.vue

@@ -10,7 +10,7 @@ export default {
     return {
       fields: [
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         },

+ 1 - 1
src/views/financialManagement/cashDetail/toolbar.vue

@@ -19,7 +19,7 @@ export default {
           valueKay: 'label'
         },
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         }

+ 5 - 2
src/views/financialManagement/orderManagement/toolbar.vue

@@ -17,7 +17,7 @@ export default {
           label: '订单编号'
         },
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         },
@@ -25,7 +25,10 @@ export default {
           type: 'select',
           name: 'payChannels',
           label: '支付渠道',
-          options: setStatus(['积分', '微信', '支付宝'], ['积分', '微信', '支付宝'])
+          options: setStatus(
+            ['积分', '微信', '支付宝'],
+            ['积分', '微信', '支付宝']
+          )
         },
         {
           type: 'dateArray',

+ 1 - 1
src/views/photoManagement/imageGoodsManagement/toolbar.vue

@@ -23,7 +23,7 @@ export default {
           label: '活动'
         },
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         },

+ 1 - 1
src/views/photoManagement/photoVerifyManagement/toolbar.vue

@@ -22,7 +22,7 @@ export default {
           label: '活动'
         },
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         },

+ 6 - 12
src/views/photographerManagement/photoVerify/index.vue

@@ -26,10 +26,7 @@
     <toolbar @on-filter="filterData" @on-reset="filterData" />
 
     <div class="m-10 bg-w p-20 br-10">
-      <el-button
-        type="primary"
-        icon="el-icon-plus"
-        @click="$AliOssMultiModal()"
+      <el-button type="primary" icon="el-icon-plus" @click="$AliOssMultiModal()"
         >批量上传照片</el-button
       >
 
@@ -207,17 +204,14 @@ export default {
       const inParams = {
         ...this.filter,
         ...this.internalFilterObj,
-        page: this.pagination.page,
-        size: this.pagination.pageSize
+        start: this.pagination.page,
+        limit: this.pagination.pageSize
       };
 
-      const { data, msg } = await this.apiList(inParams, {
-        limit: this.pagination.pageSize,
-        start: this.pagination.page
-      });
+      const { data, msg } = await this.apiList(inParams);
 
-      const res2 = await getCount(inParams)
-      this.statistics = res2.data
+      const res2 = await getCount(inParams);
+      this.statistics = res2.data;
       if ('data' in data) {
         const items = data.data;
         if (items.length === 0 && this.pagination.page > 1) {

+ 1 - 1
src/views/photographerManagement/photoVerify/toolbar.vue

@@ -22,7 +22,7 @@ export default {
           label: '活动'
         },
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         },

+ 5 - 8
src/views/photographerManagement/photographerVerify/index.vue

@@ -187,17 +187,14 @@ export default {
       const inParams = {
         ...this.filter,
         ...this.internalFilterObj,
-        page: this.pagination.page,
-        size: this.pagination.pageSize
+        start: this.pagination.page,
+        limit: this.pagination.pageSize
       };
 
-      const { data, msg } = await this.apiList(inParams, {
-        limit: this.pagination.pageSize,
-        start: this.pagination.page
-      });
+      const { data, msg } = await this.apiList(inParams);
 
-      const res2 = await getCount(inParams)
-      this.statistics = res2.data
+      const res2 = await getCount(inParams);
+      this.statistics = res2.data;
       if ('data' in data) {
         const items = data.data;
         if (items.length === 0 && this.pagination.page > 1) {

+ 1 - 1
src/views/photographerManagement/photographerVerify/toolbar.vue

@@ -12,7 +12,7 @@ export default {
     return {
       fields: [
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         },

+ 1 - 1
src/views/pointsManagement/pointsDetail/toolbar.vue

@@ -19,7 +19,7 @@ export default {
           valueKay: 'label'
         },
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         }

+ 8 - 9
src/views/sceneManagement/sceneList/index.vue

@@ -26,7 +26,9 @@
     <toolbar @on-filter="filterData" @on-reset="filterData" />
 
     <div class="m-10 bg-w p-20 br-10">
-      <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
+      <el-button type="primary" icon="el-icon-plus" @click="handleAdd"
+        >新增</el-button
+      >
       <base-table
         :columns="columns"
         :items="items"
@@ -222,17 +224,14 @@ export default {
       const inParams = {
         ...this.filter,
         ...this.internalFilterObj,
-        page: this.pagination.page,
-        size: this.pagination.pageSize
-      };
-
-      const { data, msg } = await this.apiList(inParams, {
         limit: this.pagination.pageSize,
         start: this.pagination.page
-      });
+      };
+
+      const { data, msg } = await this.apiList(inParams);
 
-      const res2 = await getCount(inParams)
-      this.statistics = res2.data
+      const res2 = await getCount(inParams);
+      this.statistics = res2.data;
       if ('data' in data) {
         const items = data.data;
         if (items.length === 0 && this.pagination.page > 1) {

+ 1 - 1
src/views/sceneManagement/sceneVerify/toolbar.vue

@@ -31,7 +31,7 @@ export default {
           options: SCENETYPE
         },
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         },

+ 7 - 10
src/views/statistics/downloadImage/index.vue

@@ -134,7 +134,7 @@ export default {
           key: 'payablePrice',
           name: '花费金额/积分(还没折算)',
           width: this.$col.b,
-          render: (h,{row}) => h('span',`¥${row.payablePrice}`)
+          render: (h, { row }) => h('span', `¥${row.payablePrice}`)
         },
         {
           key: 'photoTime',
@@ -151,23 +151,20 @@ export default {
     };
   },
 
-  methods:{
+  methods: {
     async pageChange(page) {
       this.pagination.page = page;
       const inParams = {
         ...this.filter,
         ...this.internalFilterObj,
-        page: this.pagination.page,
-        size: this.pagination.pageSize
-      };
-
-      const { data, msg } = await this.apiList(inParams, {
         limit: this.pagination.pageSize,
         start: this.pagination.page
-      });
+      };
+
+      const { data, msg } = await this.apiList(inParams);
 
-      const res2 = await getDownloadCount(inParams)
-      this.statistics = res2.data
+      const res2 = await getDownloadCount(inParams);
+      this.statistics = res2.data;
       if ('data' in data) {
         const items = data.data;
         if (items.length === 0 && this.pagination.page > 1) {

+ 4 - 4
src/views/statistics/downloadImage/toolbar.vue

@@ -17,17 +17,17 @@ export default {
         {
           type: 'SceneSelect',
           name: 'kindergartenId',
-          label: '场景',
+          label: '场景'
         },
         {
           type: 'ActivitySelect',
           name: 'activityId',
-          label: '活动',
+          label: '活动'
         },
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
-          label: '账号',
+          label: '账号'
         },
         {
           type: 'dateArray',

+ 19 - 17
src/views/statistics/uploadImage/index.vue

@@ -1,18 +1,23 @@
 <template>
   <div class="">
-    <div
-      class="m-10 bg-w p-20 br-10 f-sa-s">
+    <div class="m-10 bg-w p-20 br-10 f-sa-s">
       <div class="f-fs-c f-col">
         <div style="font-size: 16px;">总量</div>
-        <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.all}}</div>
+        <div class="mt-4" style="font-weight: bold; font-size: 18px;">
+          {{ statistics.all }}
+        </div>
       </div>
       <div class="f-fs-c f-col">
         <div style="font-size: 16px;">月新增</div>
-        <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.month}}</div>
+        <div class="mt-4" style="font-weight: bold; font-size: 18px;">
+          {{ statistics.month }}
+        </div>
       </div>
       <div class="f-fs-c f-col">
         <div style="font-size: 16px;">周新增</div>
-        <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.week}}</div>
+        <div class="mt-4" style="font-weight: bold; font-size: 18px;">
+          {{ statistics.week }}
+        </div>
       </div>
     </div>
 
@@ -33,7 +38,6 @@ import toolbar from './toolbar';
 import mxFilterList from '@/mixins/filterList';
 import { getUploadPage, getUploadCount } from '@/api/statistics';
 
-
 export default {
   name: 'UploadImage',
 
@@ -83,33 +87,31 @@ export default {
           key: 'isTake',
           name: '总上传数',
           width: '140',
-          render:(h, {row}) => h('span', `${row.isTakeTrue+row.isTakeFalse}`)
+          render: (h, { row }) =>
+            h('span', `${row.isTakeTrue + row.isTakeFalse}`)
         },
         {
           key: 'createAt',
           name: '上传时间',
           minWidth: this.$col.b
-        },
+        }
       ]
     };
   },
-  methods:{
+  methods: {
     async pageChange(page) {
       this.pagination.page = page;
       const inParams = {
         ...this.filter,
         ...this.internalFilterObj,
-        page: this.pagination.page,
-        size: this.pagination.pageSize
+        start: this.pagination.page,
+        limit: this.pagination.pageSize
       };
 
-      const { data, msg } = await this.apiList(inParams, {
-        limit: this.pagination.pageSize,
-        start: this.pagination.page
-      });
+      const { data, msg } = await this.apiList(inParams);
 
-      const res2 = await getUploadCount(inParams)
-      this.statistics = res2.data
+      const res2 = await getUploadCount(inParams);
+      this.statistics = res2.data;
       if ('data' in data) {
         const items = data.data;
         if (items.length === 0 && this.pagination.page > 1) {

+ 3 - 3
src/views/statistics/uploadImage/toolbar.vue

@@ -17,15 +17,15 @@ export default {
         {
           type: 'SceneSelect',
           name: 'kindergartenId',
-          label: '场景',
+          label: '场景'
         },
         {
           type: 'ActivitySelect',
           name: 'activityId',
-          label: '活动',
+          label: '活动'
         },
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         },

+ 24 - 22
src/views/statistics/withdrawalRecord/index.vue

@@ -1,20 +1,25 @@
 <template>
   <div class="">
-    <div
-      class="m-10 bg-w p-20 br-10 f-sa-s">
-        <div class="f-fs-c f-col">
-          <div style="font-size: 16px;">总收入金额</div>
-          <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.sumPaidPrice}}</div>
+    <div class="m-10 bg-w p-20 br-10 f-sa-s">
+      <div class="f-fs-c f-col">
+        <div style="font-size: 16px;">总收入金额</div>
+        <div class="mt-4" style="font-weight: bold; font-size: 18px;">
+          {{ statistics.sumPaidPrice }}
         </div>
-        <div class="f-fs-c f-col">
-          <div style="font-size: 16px;">成功提现金额</div>
-          <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.withdrawalAmount}}</div>
+      </div>
+      <div class="f-fs-c f-col">
+        <div style="font-size: 16px;">成功提现金额</div>
+        <div class="mt-4" style="font-weight: bold; font-size: 18px;">
+          {{ statistics.withdrawalAmount }}
         </div>
-        <div class="f-fs-c f-col">
-          <div style="font-size: 16px;">未提现金额</div>
-          <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.undrawnAmount}}</div>
+      </div>
+      <div class="f-fs-c f-col">
+        <div style="font-size: 16px;">未提现金额</div>
+        <div class="mt-4" style="font-weight: bold; font-size: 18px;">
+          {{ statistics.undrawnAmount }}
         </div>
       </div>
+    </div>
 
     <toolbar @on-filter="filterData" @on-reset="filterData" />
 
@@ -31,7 +36,7 @@
 <script>
 import toolbar from './toolbar';
 import mxFilterList from '@/mixins/filterList';
-import { getPage,getCount } from '@/api/statistics/withdrawalRecord';
+import { getPage, getCount } from '@/api/statistics/withdrawalRecord';
 
 export default {
   name: 'WithdrawalRecord',
@@ -159,22 +164,19 @@ export default {
     this.$g_off('withdrawal_record_reload', this.reload);
   },
 
-  methods:{
+  methods: {
     async pageChange(page) {
       this.pagination.page = page;
       const inParams = {
         ...this.filter,
         ...this.internalFilterObj,
-        page: this.pagination.page,
-        size: this.pagination.pageSize
+        start: this.pagination.page,
+        limit: this.pagination.pageSize
       };
 
-      const { data, msg } = await this.apiList(inParams, {
-        limit: this.pagination.pageSize,
-        start: this.pagination.page
-      });
-      const res2 = await getCount(inParams)
-      this.statistics = res2.data
+      const { data, msg } = await this.apiList(inParams);
+      const res2 = await getCount(inParams);
+      this.statistics = res2.data;
       if ('data' in data) {
         const items = data.data;
         if (items.length === 0 && this.pagination.page > 1) {
@@ -185,7 +187,7 @@ export default {
         }
         this.loadCallBack(data);
       }
-    },
+    }
   }
 };
 </script>

+ 1 - 1
src/views/statistics/withdrawalRecord/toolbar.vue

@@ -12,7 +12,7 @@ export default {
     return {
       fields: [
         {
-          type: 'text',
+          type: 'AccountSelect',
           name: 'accountId',
           label: '账号'
         },

+ 16 - 14
src/views/systemManagement/accountManagement/index.vue

@@ -1,18 +1,23 @@
 <template>
   <div class="">
-    <div
-      class="m-10 bg-w p-20 br-10 f-sa-s">
+    <div class="m-10 bg-w p-20 br-10 f-sa-s">
       <div class="f-fs-c f-col">
         <div style="font-size: 16px;">总量</div>
-        <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.all}}</div>
+        <div class="mt-4" style="font-weight: bold; font-size: 18px;">
+          {{ statistics.all }}
+        </div>
       </div>
       <div class="f-fs-c f-col">
         <div style="font-size: 16px;">月新增</div>
-        <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.month}}</div>
+        <div class="mt-4" style="font-weight: bold; font-size: 18px;">
+          {{ statistics.month }}
+        </div>
       </div>
       <div class="f-fs-c f-col">
         <div style="font-size: 16px;">周新增</div>
-        <div class="mt-4" style="font-weight: bold; font-size: 18px;">{{statistics.week}}</div>
+        <div class="mt-4" style="font-weight: bold; font-size: 18px;">
+          {{ statistics.week }}
+        </div>
       </div>
     </div>
 
@@ -125,23 +130,20 @@ export default {
       ]
     };
   },
-  methods:{
+  methods: {
     async pageChange(page) {
       this.pagination.page = page;
       const inParams = {
         ...this.filter,
         ...this.internalFilterObj,
-        page: this.pagination.page,
-        size: this.pagination.pageSize
+        start: this.pagination.page,
+        limit: this.pagination.pageSize
       };
 
-      const { data, msg } = await this.apiList(inParams, {
-        limit: this.pagination.pageSize,
-        start: this.pagination.page
-      });
+      const { data, msg } = await this.apiList(inParams);
 
-      const res2 = await getCount(inParams)
-      this.statistics = res2.data
+      const res2 = await getCount(inParams);
+      this.statistics = res2.data;
       if ('data' in data) {
         const items = data.data;
         if (items.length === 0 && this.pagination.page > 1) {