Prechádzať zdrojové kódy

平台 增加提现申请y页面

wangn 5 rokov pred
rodič
commit
966b147648

+ 3 - 1
pt/src/cool/request/index.js

@@ -33,6 +33,7 @@ import item from '@/service/item/index';
 import unit from '@/service/unit/index';
 import merchant from '@/service/merchant/index';
 import shopAdmin from '@/service/shop-admin/index';
+import cash from '@/service/deposit/index';
 
 export function SET_SERVICE({ store }) {
 	// const files = require.context('@/service/', true, /\.js$/);
@@ -71,7 +72,8 @@ export function SET_SERVICE({ store }) {
 		item,
 		unit,
     merchant,
-    shopAdmin
+    shopAdmin,
+    cash
 	};
 
 	Vue.prototype.$service = modules;

+ 11 - 0
pt/src/mock/userInfo.js

@@ -236,6 +236,17 @@ let menu = {
 			router: '/saas/shop/buy',
 			viewPath: 'saas/shop/buy',
 			keepAlive: 1
+    },
+    {
+			id: '17',
+			parentId: '1',
+			name: '提现申请',
+			type: 1,
+			icon: 'icongongzuotai',
+			orderNum: 1,
+			router: '/saas/shop/deposit',
+			viewPath: 'saas/shop/deposit',
+			keepAlive: 1
 		},
 		{
 			id: '2',

+ 165 - 0
pt/src/saas/shop/deposit.vue

@@ -0,0 +1,165 @@
+<template>
+	<div class="app-list-content">
+		<x-crud class="liu-crud-wrap" @load="onLoad">
+			<!-- 审核 -->
+			<template #slot-apply="{scope}">
+
+				<template v-if="scope.row.status == 1">
+					<el-button type="text" @click="showModalFn(scope.row)">待审核</el-button>
+				</template>
+
+				<template v-else-if="scope.row.status == 2">
+					<!-- <el-button type="text">审核通过</el-button> success_color -->
+					<span class="success_color">审核通过</span>
+				</template>
+        <template v-else-if="scope.row.status == 3">
+					<!-- <el-button type="text" style="color: '#ff2842'">审核通过</el-button> -->
+          <span class="error_color">审核通过</span>
+				</template>
+
+			</template>
+		</x-crud>
+		<!-- 审核弹窗 -->
+		<el-dialog
+			title="审核"
+			:visible.sync="applyDialog"
+			:close-on-click-modal="false"
+			width="500px"
+		>
+			<div class="ad-modal-content">
+				<el-form
+					:model="form"
+					:rules="rule"
+					ref="form"
+					label-width="100px"
+					class="demo-form"
+				>
+					<el-form-item label="状态" prop="status">
+						<el-radio-group v-model="form.status">
+							<el-radio label="1">通过</el-radio>
+							<el-radio label="3">拒绝</el-radio>
+						</el-radio-group>
+					</el-form-item>
+					<el-form-item label="备注" prop="remark">
+						<el-input type="textarea" v-model="form.remark"></el-input>
+					</el-form-item>
+				</el-form>
+			</div>
+			<div slot="footer" class="dialog-footer">
+				<el-button size="small" @click="resetForm">取 消</el-button>
+				<el-button type="primary" size="small" @click="applyFn">确认</el-button>
+			</div>
+		</el-dialog>
+	</div>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			// x-crud
+			app: null,
+			// 审核
+			applyDialog: false,
+			form: {
+				id: '',
+				status: '1',
+				remark: ''
+			},
+			rule: {}
+		};
+	},
+	mounted() {},
+	methods: {
+		showModalFn(item) {
+			this.form.id = item.id;
+			this.applyDialog = true;
+		},
+		applyFn() {
+			this.$service.cash.check(this.form).then(res => {
+				this.app.refresh();
+				this.$message.success('审核成功!');
+				this.resetForm();
+			});
+		},
+		resetForm() {
+			this.$refs['form'].resetFields();
+			this.applyDialog = false;
+		},
+		// crud
+		onLoad({ ctx, app }) {
+			this.app = app;
+			ctx.service(this.$service.cash)
+				.set('table', {
+					columns: [
+						{
+							prop: 'id',
+							label: 'ID',
+							align: 'center'
+						},
+						{
+							prop: 'sjId',
+							label: '商家ID',
+							align: 'center'
+						},
+						{
+							prop: 'shopId',
+							label: '门店ID',
+							align: 'center'
+						},
+						{
+							prop: 'amount',
+							label: '提现金额',
+							align: 'center',
+							emptyText: '无'
+						},
+						
+						{
+							prop: 'status',
+							label: '状态',
+							align: 'center',
+							emptyText: '无'
+						},
+            {
+							prop: 'addTime',
+							label: '提交时间',
+							align: 'center',
+							emptyText: '无'
+						}
+					],
+					// 操作列
+					op: {
+						visible: true, // 是否显示
+						// 同 element-ui Table-column Attributes
+						props: {
+							width: 100,
+							align: 'center',
+							fixed: 'right',
+							label: '操作'
+						},
+						// 布局,请移步 `layout`
+						layout: ['slot-apply']
+					}
+				})
+				.set('layout', [
+					['slot-tabs'],
+					['flex1', 'refresh-btn'],
+					['data-table'],
+					['flex1', 'pagination']
+				])
+				.done();
+			app.refresh();
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.success_color{
+  color: #09bb07!important;
+  font-size: 14px;
+}
+.error_color{
+  color: #ff2842!important;
+  font-size: 14px;
+}
+</style>

+ 12 - 0
pt/src/service/deposit/index.js

@@ -0,0 +1,12 @@
+import { BaseService, Service } from '@/cool';
+
+@Service('cash')
+export class depositService extends BaseService {
+  check(data) {
+		return this.request({
+			url: '/check',
+			params: data
+		});
+	}
+}
+export default new depositService();