shish 1 год назад
Родитель
Сommit
f6d42066f6

+ 2 - 1
ghs/src/mock/userInfo.js

@@ -149,7 +149,8 @@ let menu = {
 
 		{id: '2',parentId: null,name: '客户',type: 0,icon: 'iconkehuguanli',orderNum: 2,router: '/member/list',viewPath: 'views/member/list.vue',keepAlive: 1},
         {id: '201',parentId: 2,name: '客户列表',type: 1,icon: 'iconkehuguanli',orderNum: 2,router: '/member/list',viewPath: 'views/member/list.vue',keepAlive: 1},
-		{id: '221',parentId: 2,name: '余额变动',type: 1,icon: 'iconkehuguanli',orderNum: 2,router: '/member/custom-balance-list',viewPath: 'views/member/custom-balance-list.vue',keepAlive: 1},
+		{id: '221',parentId: 2,name: '欠款变动',type: 1,icon: 'iconkehuguanli',orderNum: 2,router: '/member/custom-debt-list',viewPath: 'views/member/custom-debt-list.vue',keepAlive: 1},
+		{id: '225',parentId: 2,name: '余额变动',type: 1,icon: 'iconkehuguanli',orderNum: 2,router: '/member/custom-balance-list',viewPath: 'views/member/custom-balance-list.vue',keepAlive: 1},
 		{id: '228',parentId: 2,name: '客户业绩',type: 1,icon: 'iconkehuguanli',orderNum: 2,router: '/custom/yj',viewPath: 'views/custom/yj.vue',keepAlive: 1},
 		{id: '226',parentId: 2,name: '应收统计',type: 1,icon: 'iconkehuguanli',orderNum: 2,router: '/custom/account',viewPath: 'views/custom/account.vue',keepAlive: 1},
 

+ 299 - 0
ghs/src/views/member/custom-debt-list.vue

@@ -0,0 +1,299 @@
+<template>
+	<div class="app-list-content">
+		<x-crud class="liu-crud-wrap" @load="onLoad">
+
+			<template #slot-tabs>
+				<el-tabs class="liu-tabs" type="border-card" v-model="tabIndex">
+					<el-tab-pane v-for="(item, index) in tabsData" :key="index" :label="`${item.text}`" :name="item.key" ></el-tab-pane>
+				</el-tabs>
+			</template>
+
+			<template #table-column-amount="{scope}">
+				<span> {{ scope.row.io == 1 ? '+' : '-' }} {{ scope.row.amount }} </span>
+			</template>
+
+			<template #table-column-staffName="{scope}">
+				<span>{{ scope.row.staffName != '' ? scope.row.staffName : '-' }}</span>
+			</template>
+
+			<template #table-column-capitalType="{scope}">
+				<span v-if="scope.row.capitalType == 75">售后返充</span>
+				<span v-else-if="scope.row.capitalType == 62">线下充值</span>
+				<span v-else-if="scope.row.capitalType == 66">线上充值</span>
+				<span v-else-if="scope.row.capitalType == 64">结账</span>
+				<span v-else>其它</span>
+			</template>
+
+			<template #table-column-payWay="{scope}">
+				<span v-if="scope.row.capitalType == 62 || scope.row.capitalType == 66">
+					<span v-if="scope.row.payWay == 0">微信</span>
+					<span v-else-if="scope.row.payWay == 1">支付宝</span>
+					<span v-else-if="scope.row.payWay == 2">余额</span>
+					<span v-else-if="scope.row.payWay == 4">现金</span>
+					<span v-else-if="scope.row.payWay == 5">银行卡</span>
+					<span v-else>其它</span>
+				</span>
+				<span v-else>-</span>
+			</template>
+
+			<template #slot-search-list="{scope}">
+
+				<el-select @change="getCurrentCp" v-model="currentCustomName" filterable remote reserve-keyword placeholder="搜索客户" clearable 
+				:remote-method="searchCpInfo" :loading="loading" style="width:200px;margin-right:10px;" size="middle">
+    				<el-option v-for="item in customInfoList" :key="item.id" :label="`${item.name}(${item.id})`" :value="item.id"> </el-option>
+  				</el-select>
+
+				<span style="margin-left:9px;font-size:28px;">时间:</span>
+				<el-date-picker v-model="currentDateList" type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="开始日期" @change="getSearchDate" value-format="yyyy-MM-dd"
+				class="custom-date-picker" end-placeholder="结束日期" :picker-options="pickerOptions" size="middle" style="margin-right:8px;">
+				</el-date-picker>
+
+				<el-button type="primary" size="middle" style="margin-left:10px;" @click="exportData()">导出数据</el-button>
+
+			</template>
+
+		</x-crud>
+	</div>
+</template>
+<script>
+import { mapGetters, mapActions } from 'vuex';
+export default {
+	components: {
+	},
+	data() {
+		return {
+			app: null,
+			tabIndex: '0',
+			tabsData: [
+				{
+					text: '列表',
+					key: '0',
+					val: 0
+				},
+			],
+			customInfoList: [],
+			loading: false,
+			currentCustomName:'',
+			customId:0,
+			pickerOptions: {
+            shortcuts: [{
+                text: '最近一周',
+                onClick(picker) {
+                const end = new Date();
+                const start = new Date();
+                start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+                picker.$emit('pick', [start, end]);
+                }
+            }, {
+                text: '最近一个月',
+                onClick(picker) {
+                const end = new Date();
+                const start = new Date();
+                start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+                picker.$emit('pick', [start, end]);
+                }
+            }, {
+                text: '最近三个月',
+                onClick(picker) {
+                const end = new Date();
+                const start = new Date();
+                start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+                picker.$emit('pick', [start, end]);
+                }
+            }]
+      		},
+			startTime:'',
+			endTime:'',
+			searchTime:'',
+			currentDateList:[],
+		};
+	},
+	methods: {
+		onLoad({ ctx, app }) {
+			this.app = app;
+			if (this.$route.query.customId) {
+				this.customId = this.$route.query.customId;
+				this.currentCustomName = this.$route.query.customName ? this.$route.query.customName : ''
+			}
+			ctx.service(this.$service.customDebtChange)
+				.set('table', {
+					columns: [
+						{
+							prop: 'id',
+							label: 'ID',
+							align: 'center',
+							width: 100
+						},
+						{
+							prop: 'addTime',
+							label: '日期',
+							align: 'center',
+							width: 180
+						},
+						{
+							prop: 'customId',
+							label: '客户ID',
+							align: 'center',
+							width: 100
+						},
+						{
+							prop: 'customName',
+							label: '客户名称',
+							align: 'center',
+							width: 150
+						},
+						{
+							prop: 'capitalType',
+							label: '类型',
+							align: 'center',
+							width: 120
+						},
+						{
+							prop: 'payWay',
+							label: '支付方式',
+							align: 'center',
+							width: 120
+						},
+						{
+							prop: 'event',
+							label: '事项',
+							align: 'center',
+							width: 200
+						},
+						{
+							prop: 'staffName',
+							label: '人员',
+							align: 'center',
+							width: 100
+						},
+						{
+							prop: 'amount',
+							label: '变动',
+							align: 'center',
+							width: 120
+						},
+						{
+							prop: 'balance',
+							label: '余额',
+							align: 'center',
+							width: 120
+						},
+						{
+							prop: 'remark',
+							label: '备注',
+							align: 'center',
+							width: 200
+						}
+					],
+					op: {
+						visible: true,
+						props: {
+							width: 100,
+							align: 'center',
+							fixed: 'right',
+							label: '操作'
+						},
+						layout: ['slot-column-option']
+					}
+				})
+				.set('dict', {
+					search: {
+						keyWord: 'name'
+					}
+				})
+				.set('search', {
+					key: { placeholder: '...' }
+				})
+				.set('layout', [
+					['slot-tabs'],
+					['slot-search-list'],
+					['data-table'],
+					['flex1', 'pagination']
+				])
+				.done();
+				this.refreshData()
+		},
+		getCurrentCp(e){
+			this.customId = e
+			this.refreshData()
+		},
+		refreshData(){
+      		this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,customId:this.customId})
+    	},
+		exportData(){
+			this.$service.customDebtChange.getChangeList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,customId:this.customId,pageSize:9999999,export:1}).then(res => {
+				if(res.file){
+					window.location.href = res.file
+				}
+			})
+		},
+		searchCpInfo(query) {
+			let that = this
+			if (query !== '') {
+				this.loading = true;
+				this.$service.custom.list({name:query,type:0}).then(res=>{
+					that.loading = false
+					that.customInfoList = res.list	
+				})
+			} else {
+				this.customInfoList = []
+			}
+		},
+		getSearchDate(){
+			if (this.$util.isEmpty(this.currentDateList)) {
+				this.searchTime = ''
+				this.startTime = ''
+				this.endTime = ''
+			}else{
+				this.searchTime = 'custom'
+				this.startTime = this.currentDateList[0]
+				this.endTime = this.currentDateList[1]
+			}
+			this.refreshData()
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.user-name-warp {
+	display: flex;
+	align-items: center;
+	span {
+		margin-left: 6px;
+	}
+}
+.recharge-modal-content {
+	@include disFlex(center, space-around);
+	.card-name {
+		width: 200px;
+		height: 100%;
+		border-right: 1px solid $borderColor;
+	}
+}
+
+.store-icon {
+	i {
+		font-size: 18px;
+	}
+
+	.el-icon-check {
+		color: #fee470;
+	}
+
+	.el-icon-close {
+		color: #999;
+	}
+}
+.accounts-list{
+    width: 80%;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    margin: 0 auto;
+    padding-bottom: 20px;
+    .accounts-center{
+      width: 80%;
+    }
+  }
+</style>

+ 4 - 1
hdApp/src/admin/home/workbench.vue

@@ -9,7 +9,9 @@
       </view>
     </view>
     <!-- #ifdef MP-WEIXIN -->
+    <view style="width:100vw;height:30upx;background-color: #ece5e5;"></view>
     <ad-custom unit-id="adunit-22b6fe92acad433e"></ad-custom>
+    <view style="width:100vw;height:30upx;background-color: #ece5e5;"></view>
     <!-- #endif -->
   </block>
   <block v-else>
@@ -114,6 +116,7 @@
 
   <!-- #ifdef MP-WEIXIN -->
   <ad-custom unit-id="adunit-22b6fe92acad433e"></ad-custom>
+  <view style="width:100vw;height:20upx;background-color: #ece5e5;"></view>
   <!-- #endif -->
 
 	<template v-if="lookMoney == 1">
@@ -254,7 +257,7 @@
 
   <!-- #ifdef MP-WEIXIN -->
   <ad-custom unit-id="adunit-22b6fe92acad433e" v-if="showAd == 1"></ad-custom>
-  <view style="width:100vw;height:20upx;background-color: #ece5e5;"></view>
+  <view style="width:100vw;height:40upx;background-color: #ece5e5;"></view>
   <!-- #endif -->
 
   <view style="text-align:center;margin-top:50upx;margin-bottom:182upx;color:#827171;font-size:28upx;">