Explorar o código

修改货位名称

shish hai 1 ano
pai
achega
37daf8cccb
Modificáronse 2 ficheiros con 60 adicións e 4 borrados
  1. 7 0
      ghs/src/service/custom/index.js
  2. 53 4
      ghs/src/views/member/list.vue

+ 7 - 0
ghs/src/service/custom/index.js

@@ -32,6 +32,13 @@ export class CustomService extends BaseService {
 		});
 	}
 
+	updateSeatSnName(data) {
+		return this.request({
+			url: '/update-seat-sn-name',
+			params: data
+		});
+	}
+
 	changeDebt(data) {
 		return this.request({
 			url: '/debt',

+ 53 - 4
ghs/src/views/member/list.vue

@@ -24,6 +24,25 @@
 				<span v-else>-</span>
 			</template>
 
+			<template #table-column-seatSn="{scope}">
+				<span v-if="scope.row.seatSn == 0"></span>
+				<span v-else>{{ scope.row.seatSn }}</span>
+			</template>
+
+			<template #table-column-seatSnName="{scope}">
+				<span v-if="scope.row.seatSnName == ''">
+					<i class="el-icon-edit" style="font-size:15px;cursor: pointer;" @click="modifySeatSnName(scope.row)"></i>
+				</span>
+				<span v-else>{{ scope.row.seatSnName }}</span>
+			</template>
+
+			<template #table-column-printSeatSn="{scope}">
+				<span v-if="scope.row.printSeatSn == 0"></span>
+				<span v-else>
+					<i class="el-icon-success" style="color:green;font-size:18px;"></i>
+				</span>
+			</template>
+
 			<template #table-column-debtAmount="{scope}">
 				{{ scope.row.debtAmount?parseFloat(scope.row.debtAmount):0 }}
 			</template>
@@ -79,6 +98,7 @@
 				<el-button size="small" type="primary" @click="beginRecharge(scope.row)">充值销账</el-button>
 				<el-button size="small" type="primary" @click="kd(scope.row,0)">开单</el-button>
 				<el-button size="small" type="primary" @click="kd(scope.row,1)">开预订单</el-button>
+				<el-button size="small" type="primary" @click="printMySeat(scope.row)">打货位</el-button>
 			</template>
 
 			<template #table-column-recentExpend="{scope}">
@@ -301,6 +321,9 @@ export default {
 			let query = {}
 			this.$router.push({path:'/order/add',query})
 		},
+		printMySeat(info){
+			info.printSeatSn = 1
+		},
 		kd(info,book){
 			let query = {}
 			query.customId = info.id
@@ -345,6 +368,14 @@ export default {
 				})
 			})
 		},
+		modifySeatSnName(info){
+			this.$prompt('请输入名称','提示',{confirmButtonText:'确定',cancelButtonText:'取消',inputErrorMessage:'请填写'}).then(({value}) => {
+				this.$service.custom.updateSeatSnName({ seatSnName:value,id:info.id}).then(data => {
+					this.$notify({ title: '成功', message: '操作成功', type: 'success'})
+					this.app.refresh({ type: this.tabIndex })
+				})
+			})
+		},
 		changeDebtAmount(info){
 			this.$prompt('请输入金额','提示',{confirmButtonText:'确定',cancelButtonText:'取消',inputPattern:/^\d+(\.\d{1,2})?$/,inputErrorMessage:'金额错误'}).then(({value}) => {
 				this.$service.custom.updateDebtLimit({ debtLimit: value,id:info.id}).then(data => {
@@ -396,7 +427,7 @@ export default {
 							prop: 'avatar',
 							label: '头像',
 							align: 'center',
-							width: 80
+							width: 70
 						},
 						{
 							prop: 'name',
@@ -414,7 +445,7 @@ export default {
 							prop: 'debtAmount',
 							label: '欠款',
 							align: 'center',
-							width: 100
+							width: 90
 						},
 						{
 							prop: 'balance',
@@ -432,7 +463,7 @@ export default {
 							prop: 'debt',
 							label: '线上赊账',
 							align: 'center',
-							width: 90
+							width: 80
 						},
 						{
 							prop: 'debtLimit',
@@ -440,6 +471,24 @@ export default {
 							align: 'center',
 							width: 90
 						},
+						{
+							prop: 'seatSn',
+							label: '货位',
+							align: 'center',
+							width: 80
+						},
+						{
+							prop: 'printSeatSn',
+							label: '打货位',
+							align: 'center',
+							width: 80
+						},
+						{
+							prop: 'seatSnName',
+							label: '货位名',
+							align: 'center',
+							width: 100
+						},
 						{
 							prop: 'buyNum',
 							label: '消费次数',
@@ -468,7 +517,7 @@ export default {
 					op: {
 						visible: true,
 						props: {
-							width: 300,
+							width: 360,
 							align: 'center',
 							fixed: 'right',
 							label: '操作'