shish 1 year ago
parent
commit
298e326e00

+ 1 - 10
ghs/src/views/staff/list.vue

@@ -23,16 +23,7 @@
 			</template>
 
 			<template #table-column-status="{scope}">
-				<el-switch
-					v-model="scope.row.status"
-					active-value='1'
-					inactive-value='0'
-					@change="
-						v => {
-							changeStatus(scope.row.id, v);
-						}
-					"
-				></el-switch>
+				<el-switch v-model="scope.row.status" active-value='1' inactive-value='0' @change=" v => { changeStatus(scope.row.id, v); } " ></el-switch>
 			</template>
 
 			<template #slot-modify="{scope}">

+ 5 - 1
ghsApp/src/mixins/product2.js

@@ -22,7 +22,7 @@ export default {
 			globalCheckStock:true,// 考虑库存,盘点不需要考虑库存
 			isAddModel:false,
 			isAddInputFocus:false,
-			customData: { bigCount: 0, smallCount: 0, userPrice: 0,aboutPrice:0,totalPrice:0,remark:'' },
+			customData: { bigCount: 0, smallCount: 0, userPrice: 0,aboutPrice:0,totalPrice:0,remark:'',assignSeat:1},
 			globalItemList:[],
 			globalUnitType:0,
 			globalAllProduct:[],
@@ -217,6 +217,7 @@ export default {
 					that.globalItemData[i].totalPrice = selectProduct.totalPrice || 0
 					that.globalItemData[i].aboutPrice = selectProduct.aboutPrice || 0
 					that.globalItemData[i].remark = selectProduct.remark || ''
+					that.globalItemData[i].assignSeat = selectProduct.assignSeat
 				}else{
 					that.globalItemData[i].bigCount = 0
 					that.globalItemData[i].userPrice = 0
@@ -224,6 +225,7 @@ export default {
 					that.globalItemData[i].totalPrice = 0
 					that.globalItemData[i].aboutPrice = 0
 					that.globalItemData[i].remark = ''
+					that.globalItemData[i].assignSeat = 1
 				}
 				let cName = ''
 				if(hasExists[currentClassId]){
@@ -278,6 +280,7 @@ export default {
 					arr[index].smallCount = 0;
 					arr[index].userPrice = 0;
 					arr[index].remark = '';
+					arr[index].assignSeat = 1
 				})
 				this.$forceUpdate()
 			}
@@ -384,6 +387,7 @@ export default {
 					list[index].aboutPrice = item.aboutPrice||0
 					list[index].totalPrice = item.totalPrice||0
 					list[index].remark = item.remark||''
+					list[index].assignSeat = item.assignSeat
 				}
 			}
 			//点击要响声

+ 6 - 0
ghsApp/src/pagesPurchase/add.vue

@@ -58,6 +58,9 @@
 						</view>
 						<view v-if="customData.aboutPrice == 1" style="margin-top:16upx;text-align:center;color:blue;font-size:26upx;">单价为近似值</view>
 						<view v-else style="margin-top:16upx;text-align:center;font-size:26upx;">----</view>
+						<view style="text-align: center;">
+							<switch :checked="customData.assignSeat == 1 ? true : false" @change="changeAssignSeat" style="transform: scale(0.7,0.7);" />{{customData.assignSeat == 0?'无':''}}货位
+						</view>
 					</view>
 					<image @click="switchUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" mode="widthFix" 
 					style="width:60upx;height:60upx;position:absolute;top:32upx;left:30upx;" ></image>
@@ -163,6 +166,9 @@ export default {
 		})
 	},
 	methods: {
+		changeAssignSeat(e){
+			this.customData.assignSeat = e.detail.value == true ? 1 : 0
+		},
 		switchUnitType(){
 			if(this.cgUnitType == 0){
 				this.cgUnitType = 1

+ 7 - 3
ghsApp/src/pagesPurchase/components/CommodityPurchase.vue

@@ -65,7 +65,7 @@ export default {
       required: true,
       type: Object,
       default () {
-        return {bigCount:0,smallCount:0,userPrice:0,totalPrice:0,aboutPrice:0};
+        return {bigCount:0,smallCount:0,userPrice:0,totalPrice:0,aboutPrice:0,assignSeat:1};
       }
     },
     type: {
@@ -79,7 +79,8 @@ export default {
 			smallCount:0,
 			userPrice:0,
       totalPrice:0,
-      aboutPrice:0
+      aboutPrice:0,
+      assignSeat:1
     };
   },
 	watch:{
@@ -90,6 +91,7 @@ export default {
         this.userPrice = this.info.userPrice
         this.totalPrice = this.info.totalPrice,
         this.aboutPrice = this.info.aboutPrice
+        this.assignSeat = this.info.assignSeat
       },
       deep:true
     }
@@ -101,6 +103,7 @@ export default {
 		this.userPrice = this.info.userPrice
     this.totalPrice = this.info.totalPrice,
     this.aboutPrice = this.info.aboutPrice
+    this.assignSeat = this.info.assignSeat
   },
   methods: {
     delProduct(info){
@@ -124,7 +127,8 @@ export default {
       this.$emit("replaceItemFn", this.info,1)
     },
     showAddModelFn () {
-        this.$emit("showAddModelFn", { ...this.info, bigCount: this.bigCount, smallCount: this.smallCount, userPrice: this.userPrice,totalPrice:this.totalPrice,aboutPrice:this.aboutPrice })
+        this.$emit("showAddModelFn", 
+        { ...this.info, bigCount: this.bigCount, smallCount: this.smallCount, userPrice: this.userPrice,totalPrice:this.totalPrice,aboutPrice:this.aboutPrice,assignSeat:this.assignSeat })
     }
   }
 };

+ 1 - 2
ghsApp/src/pagesPurchase/details.vue

@@ -12,9 +12,7 @@
 									<view class="info-line">
 										<text class="item-name">{{ item.name||'' }}</text>
 										<text class="item-price">
-											
 											<text class="price">¥{{item.totalPrice ? item.totalPrice : 0}}</text>
-
 										</text>
 									</view>
 									<view class="info-line">
@@ -518,6 +516,7 @@ export default {
 					ratioType:ele.ratioType,
 					aboutPrice:ele.aboutPrice||0,
 					totalPrice:ele.totalPrice||0,
+					assignSeat:ele.assignSeat
 				}
 			})
 			formData.itemInfo = JSON.stringify(itemInfo)