فهرست منبع

充值与备注

shish 2 سال پیش
والد
کامیت
1dfb156aef

+ 2 - 0
ghs/src/cool/request/index.js

@@ -39,12 +39,14 @@ import ghs from '@/service/ghs/index';
 import cg from '@/service/cg/index';
 import purchaseOrder from '@/service/purchase-order/index';
 import purchaseOrderItem from '@/service/purchase-order-item/index';
+import customBalanceChange from '@/service/custom-balance-change/index';
 
 export function SET_SERVICE({ store }) {
 	// const files = require.context('@/service/', true, /\.js$/);
 	// const ignore = ['./request.js'];
 
 	let modules = {
+		customBalanceChange,
 		purchaseOrderItem,
 		cg,
 		purchaseOrder,

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

@@ -148,6 +148,7 @@ let menu = {
         {id: '101',parentId: 1,name: '今日概况',type: 1,icon: 'icongongzuotai',orderNum: 1,router: '/console/index',viewPath: 'views/home.vue',keepAlive: 1},
 		{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: '3',parentId: null,name: '订单',type: 0,icon: 'icondingdanguanli',orderNum: 3,router: '/order/list',viewPath: 'views/order/list.vue',keepAlive: 1},
         {id: '301',parentId: 3,name: '订单列表',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/list',viewPath: 'views/order/list.vue',keepAlive: 1},
 		{id: '303',parentId: 3,name: '预订汇总',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/book',viewPath: 'views/order/book.vue',keepAlive: 1},

+ 9 - 0
ghs/src/service/custom-balance-change/index.js

@@ -0,0 +1,9 @@
+import { BaseService, Service } from '@/cool';
+
+@Service('custom-balance-change')
+export class CustomBalanceChangeService extends BaseService {
+
+
+
+}
+export default new CustomBalanceChangeService();

+ 194 - 0
ghs/src/views/member/custom-balance-list.vue

@@ -0,0 +1,194 @@
+<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 #slot-cp-term-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="mini">
+    				<el-option v-for="item in customInfoList" :key="item.id" :label="`${item.name}(${item.id})`" :value="item.id"> </el-option>
+  				</el-select>
+			</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
+		};
+	},
+	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.customBalanceChange)
+				.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: 150
+						},
+						{
+							prop: 'event',
+							label: '事项',
+							align: 'center',
+							width: 260
+						},
+						{
+							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: 280
+						}
+					],
+					op: {
+						visible: true,
+						props: {
+							width: 220,
+							align: 'center',
+							fixed: 'right',
+							label: '操作'
+						},
+						layout: ['slot-column-option']
+					}
+				})
+				.set('dict', {
+					search: {
+						keyWord: 'name'
+					}
+				})
+				.set('search', {
+					key: { placeholder: '...' }
+				})
+				.set('layout', [
+					['slot-tabs'],
+					['slot-cp-term-list','slot-billing'],
+					['data-table'],
+					['flex1', 'pagination']
+				])
+				.done();
+				app.refresh({type:0,customId:this.customId })
+		},
+		getCurrentCp(e){
+			this.customId = e
+			this.app.refresh({ customId:this.customId,type:0 })
+		},
+		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 = []
+			}
+		},
+	}
+};
+</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>

+ 8 - 2
ghs/src/views/member/list.vue

@@ -35,7 +35,7 @@
 			</template>
 
 			<template #table-column-balance="{scope}">
-				<span>{{ scope.row.balance }}</span>
+				<span style="cursor: pointer;" @click="goBalanceChange(scope.row)">{{ scope.row.balance }}</span>
 			</template>
 
 			<template #table-header-actDebt>
@@ -211,6 +211,12 @@ export default {
 	},
 	methods: {
 		...mapActions(['getLevel']),
+		goBalanceChange(data){
+			let query = {};
+			query.customId = data.id
+			query.customName = data.name
+			this.$router.push({ path: '/member/custom-balance-list', query });
+		},
 		newCg(){
 			let query = {}
 			this.$router.push({path:'/in/add',query})
@@ -356,7 +362,7 @@ export default {
 						},
 						{
 							prop: 'debtAmount',
-							label: '欠款金额',
+							label: '欠款',
 							align: 'center',
 							width: 100
 						},