shish 1 год назад
Родитель
Сommit
64a544fabf
2 измененных файлов с 219 добавлено и 0 удалено
  1. 1 0
      ghs/src/mock/userInfo.js
  2. 218 0
      ghs/src/views/order/refund-list.vue

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

@@ -159,6 +159,7 @@ let menu = {
         {id: '301',parentId: 3,name: '订单列表',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/list',viewPath: 'views/order/list.vue',keepAlive: 1},
         {id: '302',parentId: 3,name: '开单',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/add',viewPath: 'views/order/add.vue',keepAlive: 1},
 		{id: '306',parentId: 3,name: '确认订单',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/confirm',viewPath: 'views/order/confirm.vue',keepAlive: 1},
+		{id: '308',parentId: 3,name: '售后记录',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/order/refund-list',viewPath: 'views/order/refund-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},
 		{id: '303',parentId: 3,name: '预订客户',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/book/custom',viewPath: 'views/book/custom.vue',keepAlive: 1},
 		{id: '306',parentId: 3,name: '预订明细',type: 1,icon: 'icondingdanguanli',orderNum: 3,router: '/book/itemCustom',viewPath: 'views/book/itemCustom.vue',keepAlive: 1},

+ 218 - 0
ghs/src/views/order/refund-list.vue

@@ -0,0 +1,218 @@
+<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" @tab-click="handleClick">
+					<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-avatar="{scope}">
+				<cl-avatar :size="22" :src="scope.row.avatar" :style="{ margin: 'auto' }"></cl-avatar>
+			</template>
+
+			<template #table-column-mobile="{scope}">
+				<span v-if="scope.row.mobile != ''">{{ scope.row.mobile }}</span>
+				<span v-else>-</span>
+			</template>
+
+			<template #table-column-debtAmount="{scope}">
+				{{ scope.row.debtAmount?parseFloat(scope.row.debtAmount):0 }}
+			</template>
+
+			<template #table-column-balance="{scope}">
+				<span style="cursor: pointer;" @click="goBalanceChange(scope.row)">{{ scope.row.balance }}</span>
+			</template>
+
+			<template #table-column-buyAmount="{scope}">
+				<span>{{ scope.row.buyAmount ? parseFloat(scope.row.buyAmount) : 0 }}</span>
+			</template>
+
+			<template #slot-column-option="{scope}">
+				<el-button size="small" type="primary" @click="">明细</el-button>
+			</template>
+
+			<template #table-column-recentExpend="{scope}">
+				<span v-if="scope.row.recentExpend == '0000-00-00 00:00:00'">没有下过单</span>
+				<span v-else>{{ scope.row.recentExpend ? scope.row.recentExpend.substr(0,11) : 0 }}</span>
+			</template>
+
+			<template #table-column-visitTime="{scope}">
+				<span>{{ scope.row.visitTime ? scope.row.visitTime.substr(0,11) : 0 }}</span>
+			</template>
+
+			<template #slot-export-order>
+				<el-button type="primary" size="mini" style="margin-left:60px;" @click="exportOrder()">导出记录</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
+				},
+				{
+					text: '通过',
+					key: '1',
+					val: 0
+				},
+				{
+					text: '驳回',
+					key: '2',
+					val: 0
+				}
+			],
+			modalData: {},
+			drapShow: false,
+			name1:'',
+			mobile1:'',
+			confirmMobile1:'',
+			fileUrl:'',
+		};
+	},
+	computed: {
+		...mapGetters(['token'])
+	},
+	created() {
+	},
+	mounted() {
+	},
+	methods: {
+		exportOrder(){
+			this.$service.custom.shopListAll({ type: this.tabIndex,export:1}).then(res => {
+				if(res.file){
+					window.location.href = res.file
+				}
+			})
+		},
+		handleClick(tab, e) {
+			this.app.refresh({ type: this.tabIndex });
+		},
+		onLoad({ ctx, app }) {
+			this.app = app;
+			//传入参数 shish 2020.5.9
+			if (this.$route.query.type) {
+				this.tabIndex = this.$route.query.type;
+			}
+			ctx.service(this.$service.custom)
+				.set('table', {
+					columns: [
+						{
+							prop: 'id',
+							label: 'ID',
+							align: 'center',
+							width: 90
+						},
+						{
+							prop: 'avatar',
+							label: '头像',
+							align: 'center',
+							width: 80
+						},
+						{
+							prop: 'name',
+							label: '名称',
+							align: 'center',
+							width: 160
+						},
+						{
+							prop: 'mobile',
+							label: '手机号',
+							align: 'center',
+							width: 110
+						},
+						{
+							prop: 'debtAmount',
+							label: '欠款',
+							align: 'center',
+							width: 100
+						},
+						{
+							prop: 'balance',
+							label: '余额',
+							align: 'center',
+							width: 90
+						},
+						{
+							prop: 'actDebt',
+							label: '待结欠款',
+							align: 'center',
+							width: 100
+						},
+						{
+							prop: 'buyNum',
+							label: '消费次数',
+							align: 'center',
+							width: 90
+						},
+						{
+							prop: 'buyAmount',
+							label: '累计消费',
+							align: 'center',
+							width: 110
+						},
+						{
+							prop: 'recentExpend',
+							label: '最近下单',
+							align: 'center',
+							width: 130
+						},
+						{
+							prop: 'visitTime',
+							label: '最近访问',
+							align: 'center',
+							width: 130
+						}
+					],
+					op: {
+						visible: true,
+						props: {
+							width: 280,
+							align: 'center',
+							fixed: 'right',
+							label: '操作'
+						},
+						layout: ['slot-column-option']
+					}
+				})
+				.set('dict', {
+					search: {
+						keyWord: 'name'
+					}
+				})
+				.set('search', {
+					key: { placeholder: '这里搜索' }
+				})
+				.set('layout', [
+					['slot-tabs'],
+					['search-key','flex1','slot-export-order'],
+					['data-table'],
+					['flex1', 'pagination']
+				])
+				.on('refresh', async (params, { next }) => {
+					let result = await next(params)
+				})
+				.done();
+                app.refresh({ type: this.tabIndex })
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+
+</style>