shish před 2 roky
rodič
revize
3b7e422c55

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

@@ -46,6 +46,7 @@ import ptCpClass from '@/service/pt-cp-class/index';
 import ptCpItem from '@/service/pt-cp-item/index';
 import ptCpItem from '@/service/pt-cp-item/index';
 import ptItem from '@/service/pt-item/index';
 import ptItem from '@/service/pt-item/index';
 import ptItemCatRelate from '@/service/pt-item-cat-relate/index';
 import ptItemCatRelate from '@/service/pt-item-cat-relate/index';
+import apply from '@/service/apply/index';
 
 
 export function SET_SERVICE({ store }) {
 export function SET_SERVICE({ store }) {
 	// const files = require.context('@/service/', true, /\.js$/);
 	// const files = require.context('@/service/', true, /\.js$/);
@@ -97,7 +98,8 @@ export function SET_SERVICE({ store }) {
 		ptYeChange,
 		ptYeChange,
 		ptAsset,
 		ptAsset,
 		shopYeChange,
 		shopYeChange,
-		admin
+		admin,
+		apply
 	};
 	};
 	Vue.prototype.$service = modules;
 	Vue.prototype.$service = modules;
 	store.$service = modules;
 	store.$service = modules;

+ 24 - 26
pt/src/saas/shop/apply.vue

@@ -6,34 +6,26 @@
 				<span>{{ scope.row.status | constantfilter('SAAS_APPLY_STATUS') }}</span>
 				<span>{{ scope.row.status | constantfilter('SAAS_APPLY_STATUS') }}</span>
 			</template>
 			</template>
 
 
-			<!-- 审核 -->
-			<template #slot-apply="{scope}">
+			<template #table-column-all="{scope}">
+				<span style="cursor: pointer;" @click="modifyAll(scope.row)">
+					{{ scope.row.all == 1 ? '全品' : '单品'  }}
+					<i class="el-icon-edit" style="font-size:14px;margin-left:3px;" @click="pleaseOpen()"></i>
+				</span>
+			</template>
 
 
+			<template #slot-apply="{scope}">
 				<template v-if="scope.row.status == 1">
 				<template v-if="scope.row.status == 1">
 					<el-button type="text" @click="showModalFn(scope.row)">审核</el-button>
 					<el-button type="text" @click="showModalFn(scope.row)">审核</el-button>
 				</template>
 				</template>
-
 				<template v-if="scope.row.status == 3">
 				<template v-if="scope.row.status == 3">
 					<el-button type="text" @click="showModalFn(scope.row)">重审</el-button>
 					<el-button type="text" @click="showModalFn(scope.row)">重审</el-button>
 				</template>
 				</template>
-
 			</template>
 			</template>
 		</x-crud>
 		</x-crud>
-		<!-- 审核弹窗 -->
-		<el-dialog
-			title="审核"
-			:visible.sync="applyDialog"
-			:close-on-click-modal="false"
-			width="500px"
-		>
+
+		<el-dialog title="审核" :visible.sync="applyDialog" :close-on-click-modal="false" width="500px" >
 			<div class="ad-modal-content">
 			<div class="ad-modal-content">
-				<el-form
-					:model="form"
-					:rules="rule"
-					ref="form"
-					label-width="100px"
-					class="demo-form"
-				>
+				<el-form :model="form" :rules="rule" ref="form" label-width="100px" class="demo-form" >
 					<el-form-item label="状态" prop="status">
 					<el-form-item label="状态" prop="status">
 						<el-radio-group v-model="form.status">
 						<el-radio-group v-model="form.status">
 							<el-radio label="1">通过</el-radio>
 							<el-radio label="1">通过</el-radio>
@@ -57,9 +49,7 @@
 export default {
 export default {
 	data() {
 	data() {
 		return {
 		return {
-			// x-crud
 			app: null,
 			app: null,
-			// 审核
 			applyDialog: false,
 			applyDialog: false,
 			form: {
 			form: {
 				id: '',
 				id: '',
@@ -71,6 +61,12 @@ export default {
 	},
 	},
 	mounted() {},
 	mounted() {},
 	methods: {
 	methods: {
+		modifyAll(info){
+			this.$service.apply.changeAll({ id: info.id }).then(res => {
+				this.$message.success('修改成功')
+				this.app.refresh()
+			})
+		},
 		showModalFn(item) {
 		showModalFn(item) {
 			this.form.id = item.id;
 			this.form.id = item.id;
 			this.applyDialog = true;
 			this.applyDialog = true;
@@ -86,7 +82,6 @@ export default {
 			this.$refs['form'].resetFields();
 			this.$refs['form'].resetFields();
 			this.applyDialog = false;
 			this.applyDialog = false;
 		},
 		},
-		// crud
 		onLoad({ ctx, app }) {
 		onLoad({ ctx, app }) {
 			this.app = app;
 			this.app = app;
 			let applyHost = () => {
 			let applyHost = () => {
@@ -117,6 +112,12 @@ export default {
 							label: '手机号',
 							label: '手机号',
 							align: 'center'
 							align: 'center'
 						},
 						},
+						{
+							prop: 'all',
+							label: '品类',
+							align: 'center',
+							width: 100,
+						},
 						{
 						{
 							prop: 'province',
 							prop: 'province',
 							label: '省份',
 							label: '省份',
@@ -148,17 +149,14 @@ export default {
 							emptyText: '无'
 							emptyText: '无'
 						}
 						}
 					],
 					],
-					// 操作列
 					op: {
 					op: {
-						visible: true, // 是否显示
-						// 同 element-ui Table-column Attributes
+						visible: true,
 						props: {
 						props: {
-							width: 100,
+							width: 150,
 							align: 'center',
 							align: 'center',
 							fixed: 'right',
 							fixed: 'right',
 							label: '操作'
 							label: '操作'
 						},
 						},
-						// 布局,请移步 `layout`
 						layout: ['slot-apply']
 						layout: ['slot-apply']
 					}
 					}
 				})
 				})

+ 14 - 0
pt/src/service/apply/index.js

@@ -0,0 +1,14 @@
+import { BaseService, Service } from '@/cool';
+@Service('apply')
+export class ApplyService extends BaseService {
+
+	changeAll(data) {
+		return this.request({
+			url: '/change-all',
+			params: data
+		});
+	}
+
+}
+
+export default new ApplyService();