shish 1 год назад
Родитель
Сommit
2edb8977ea
2 измененных файлов с 12 добавлено и 6 удалено
  1. 3 1
      ghs/src/mixins/product2.js
  2. 9 5
      ghs/src/views/in/confirm.vue

+ 3 - 1
ghs/src/mixins/product2.js

@@ -18,7 +18,7 @@ export default {
 			globalCheckStock:true,// 考虑库存,盘点不需要考虑库存
 			isAddModel:false,
 			isAddInputFocus:false,
-			customData: { bigCount: 0, smallCount: 0, userPrice: 0, totalPrice:0, aboutPrice:0, remark:''},//aboutPrice 0 单价是确定值 1 单价是约等于值
+			customData: { bigCount: 0, smallCount: 0, userPrice: 0, totalPrice:0, aboutPrice:0, remark:'',assignSeat:'1'},//aboutPrice 0 单价是确定值 1 单价是约等于值
 			globalItemList:[],
 			globalUnitType:0,
 			globalAllProduct:[],
@@ -220,6 +220,7 @@ export default {
 					arr[index].smallCount = 0;
 					arr[index].userPrice = 0;
 					arr[index].remark = '';
+					arr[index].assignSeat = '1'
 				})
 				this.$forceUpdate()
 			}
@@ -313,6 +314,7 @@ export default {
 					list[index].aboutPrice = item.aboutPrice
 					list[index].totalPrice = item.totalPrice
 					list[index].remark = item.remark||''
+					list[index].assignSeat = item.assignSeat == '0' ? '0' : '1'
 				}
 			}
 			this.hitPlay()

+ 9 - 5
ghs/src/views/in/confirm.vue

@@ -137,9 +137,12 @@
         <span style="padding:0 0 0 4px;">元</span>
       </div>
       <div style="text-align:center;margin:20px 0 5px 0;font-weight:bold;font-size:18px;">剩 {{ currentItem.stock ? parseFloat(currentItem.stock) : 0 }} {{ currentItem.bigUnit}}</div>
+      <div style="text-align: center;margin-top:15px;">
+				<el-switch v-model="customData.assignSeat" active-value='1' inactive-value='0'></el-switch> {{customData.assignSeat=='0'?'无':''}}货位
+      </div>
       <div class="remark">
         <el-button @click="backToSearchItem()">取消</el-button>
-        <el-button type="primary" @click="confirmNumPrice()">确认</el-button>
+        <el-button type="primary" @click="confirmNumPrice()" style="margin-left:50px;">确认</el-button>
       </div>
       <div class="remark">Esc 取消,Enter 确认</div>
     </el-dialog>
@@ -417,7 +420,6 @@ export default {
 
   },
   mounted() {
-
     if (this.$route.query.ghsId && this.$route.query.ghsName) {
       let id = this.$route.query.ghsId
       let name = this.$route.query.ghsName
@@ -675,7 +677,8 @@ export default {
 					ratio:ele.ratio,
 					ratioType:ele.ratioType,
           aboutPrice:ele.aboutPrice,
-          totalPrice:ele.totalPrice
+          totalPrice:ele.totalPrice,
+          assignSeat:ele.assignSeat
 				}
 			})
 			formData.itemInfo = JSON.stringify(itemInfo)
@@ -783,10 +786,12 @@ export default {
     },
     pickModifyItem(e){
       this.changeType = 'update'
+      this.customData.assignSeat = e.assignSeat && e.assignSeat == '0' ? '0' : '1'
       this.selectCurrentItem(e)
     },
     pickAddItem(e){
       this.changeType = 'add'
+      this.customData.assignSeat = '1'
       this.selectCurrentItem(e)
     },
     pickAddCurrentItem(){
@@ -834,7 +839,6 @@ export default {
           total = parseFloat(total.toFixed(2))
           this.customData.totalPrice = total
         }
-
         this.desk = 'confirmPriceNum';
         this.showGetItemList = false
         this.showConfirmNum = true;
@@ -919,7 +923,7 @@ export default {
         return;
       }
       currentItem = {...currentItem,bigCount:this.customData.bigCount,userPrice:this.customData.userPrice,smallCount:this.customData.smallCount,
-        totalPrice:this.customData.totalPrice,aboutPrice:this.customData.aboutPrice}    
+        totalPrice:this.customData.totalPrice,aboutPrice:this.customData.aboutPrice,assignSeat:this.customData.assignSeat}
       this.replaceItemFn(currentItem,1,'add')
       this.backToSearchItem();
     },