Ver Fonte

2024-1-1

cmy há 1 ano atrás
pai
commit
e4887be0b1

+ 31 - 20
src/pages/marketing/serveItem/create.vue

@@ -16,12 +16,23 @@
 		<Card :bordered="false" dis-hover class="ivu-mt">
 			<Form :model="formData" :label-width="150">
 				<FormItem label="选择对应服务项目:" required>
-					<div class="picBox" @click="changeGoods()">
-						<Button type="primary" v-if="!formData.store_name">选择商品</Button>
+					<div class="picBox">
+						<Button type="primary" @click="changeGoods()" v-if="!formData.store_name">选择商品</Button>
+						<viewer>
+							<div class="avatar" v-if="formData.slider_image">
+								<img v-lazy="formData.slider_image" />
+							</div>
+						</viewer>
 						<div class="" v-if="formData.store_name">
-							{{formData.store_name}}
+							商品名称:{{formData.store_name}}
 						</div>
-						<Button type="primary" v-if="formData.store_name">
+						<div class="" v-if="formData.product_id">
+							商品ID:{{formData.product_id}}
+						</div>
+						<div class="" v-if="formData.price">
+							商品售价:{{formData.price}}
+						</div>
+						<Button type="primary" @click="changeGoods()" v-if="formData.store_name">
 							切换商品
 						</Button>
 					</div>
@@ -120,14 +131,10 @@
 			if (this.$route.query.id) {
 				let query = this.$route.query
 				this.formData.id = query.id;
+				this.formData.product_id = query.product_id;
 				this.formData.store_name = query.store_name;
-				this.formData.repertory = query.repertory;
 				this.formData.slider_image = query.slider_image;
-				this.formData.performance_value = query.performance_value;
-				this.formData.craft_price = query.craft_price;
-				this.formData.sales_commissions = query.sales_commissions
-				this.formData.superior_commission = query.superior_commission
-				this.formData.is_display = query.is_display * 1
+				this.formData.price = query.price;
 			}
 		},
 		methods: {
@@ -136,19 +143,11 @@
 				console.log(row, '这个触发');
 				this.modal_loading = false;
 				this.modals = false;
-				// setTimeout(() => {
 				this.formData.product_id = row.id
 				this.formData.store_name = row.store_name
-				this.formData.product_id = row.id
-				this.formData.card_price = row.price
-				this.formData.unit_name = row.unit_name
+				this.formData.id = row.id
 				this.formData.slider_image = row.image
 				this.formData.price = row.price
-				// this.formData.slider_image = row.slider_image
-				// this.formData.is_show = 1
-				this.formData.repertory = row.stock
-				// this.formData.image = row.image
-				// }, 500);
 			},
 			// 选择商品
 			changeGoods() {
@@ -156,7 +155,7 @@
 			},
 			// 创建
 			save() {
-				console.log(this.formData,'这');
+				console.log(this.formData, '这');
 				if (!this.formData.product_id) {
 					this.$Message.error("请先选择商品");
 					return
@@ -353,4 +352,16 @@
 	/deep/.vxe-tree-cell {
 		padding-left: 0 !important;
 	}
+
+	.avatar {
+		width: 100px;
+		height: 100px;
+		border-radius: 10px;
+		overflow: hidden;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
 </style>

+ 39 - 26
src/pages/marketing/serveItem/index.vue

@@ -51,8 +51,20 @@
 				<template slot-scope="{ row, index }" slot="price">
 					<span> {{row.product.price }}</span>
 				</template>
-				<template slot-scope="{ row, index }" slot="add_time">
-					<span> {{row.add_time }}</span>
+				<template slot-scope="{ row, index }" slot="store_img">
+					<viewer>
+						<div class="tabBox_img">
+							<img v-lazy="row.product.image">
+						</div>
+					</viewer>
+				</template>
+				<template slot-scope="{ row, index }" slot="store_name">
+						<div>
+							商品名称:{{row.product.store_name}}
+						</div>
+						<div>
+							商品ID:{{row.product.id}}
+						</div>
 				</template>
 				<template slot-scope="{ row, index }" slot="status">
 					<i-switch v-model="row.is_display" :value="row.is_display" :true-value="1" :false-value="0"
@@ -127,30 +139,20 @@
 						width: 80
 					},
 					{
-						title: '服务项目',
-						key: 'store_name',
-						minWidth: 150
+						title: '图片',
+						slot: 'store_img',
+						minWidth: 50
+					},
+					{
+						title: '商品',
+						slot: 'store_name',
+						minWidth: 200
 					},
 					{
 						title: '价格',
 						slot: 'price',
 						minWidth: 80
 					},
-					// {
-					// 	title: '手工费',
-					// 	key: 'craft_price',
-					// 	minWidth: 100
-					// },
-					// {
-					// 	title: '销售提成',
-					// 	key: 'sales_commissions',
-					// 	minWidth: 100
-					// },
-					// {
-					// 	title: '上级提成百分比',
-					// 	key: 'superior_commission',
-					// 	minWidth: 100
-					// },
 					{
 						title: '库存',
 						key: 'repertory',
@@ -232,11 +234,10 @@
 			// 发布
 			couponSend(row) {
 				this.$router.push({
-					path: this.roterPre + "/marketing/serve_item/create?id=" + row.id + '&craft_price=' + row
-						.craft_price + '&performance_value=' + row.performance_value + '&product_id=' + row
-						.product_id + '&repertory=' + row.repertory + '&sales_commissions=' + row
-						.sales_commissions + '&slider_image=' + row.slider_image + '&store_name=' + row
-						.store_name + '&superior_commission=' + row.superior_commission + '&is_display=' + row.is_display
+					path: this.roterPre + "/marketing/serve_item/create?id=" + row.id + '&price=' + row
+						.product.price + '&product_id=' + row
+						.product_id + '&slider_image=' + row.slider_image + '&store_name=' + row
+						.store_name
 				});
 				console.log(row);
 			},
@@ -304,7 +305,7 @@
 	}
 </script>
 
-<style scoped>
+<style scoped lang="less">
 	.ivu-col:nth-of-type(1) .ivu-form-item .ivu-form-item-label {
 		width: 80px !important;
 	}
@@ -312,4 +313,16 @@
 	.ivu-col:nth-of-type(1) .ivu-form-item .ivu-form-item-content {
 		margin-left: 80px !important;
 	}
+
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
 </style>

+ 3 - 3
src/pages/user/level/index.vue

@@ -81,11 +81,11 @@
 <script>
     import { mapState, mapMutations } from 'vuex';
     import { levelListApi, setShowApi, createApi } from '@/api/user';
-    import taskList from './handle/task';
-    import editFrom from '@/components/from/from';
+    // import taskList from './handle/task';
+    // import editFrom from '@/components/from/from';
     export default {
         name: 'user_level',
-        components: { editFrom, taskList },
+        // components: { editFrom, taskList },
         data () {
             return {
                 grid: {

+ 7 - 3
src/pages/user/list/handle/userDetails.vue

@@ -80,7 +80,7 @@
 								</div>
 								<div class="title">
 									<div>
-										{{ item.product.store_name }}
+										{{ item.product.store_name }}(ID:{{item.product.id}})
 									</div>
 									<div>
 										原价:{{ item.product.price }}
@@ -149,6 +149,10 @@
 						val: 'service_card',
 						label: '服务卡'
 					},
+					{
+						val: 'service_list',
+						label: '服务记录'
+					},
 					{
 						val: 'balance_change',
 						label: '余额变动'
@@ -502,12 +506,12 @@
 									{
 										title: '服务卡',
 										slot: 'card_name',
-										minWidth: 150
+										minWidth: 250
 									},
 									{
 										title: '绑定项目',
 										slot: 'item',
-										minWidth: 200
+										minWidth: 250
 									},
 									{
 										title: '购买时间',