shish 3 лет назад
Родитель
Сommit
4f326bd09a

+ 4 - 5
ghsPad/src/pages/home/cash.vue

@@ -66,8 +66,7 @@ export default {
             currentJobType:'bill',
             currentJobId:0,
 			hasChooseCustomer:true,
-			T:null,
-			customerInfo:{hasSelect:0,customId:0,customName:''}
+			T:null
 		}
 	},
 	computed: {
@@ -79,9 +78,9 @@ export default {
 		this.beginRemind()
 	},
 	onShow(){
-		if(this.customerInfo.hasSelect == 1){
-			this.customId = this.customerInfo.customId
-			this.customName = this.customerInfo.customName
+		if(this.option.customId){
+			this.customId = this.option.customId
+			this.customName = this.option.customName
 		}
 	},
 	onUnload(){

+ 18 - 3
ghsPad/src/pages/home/components/cashConsole.vue

@@ -187,14 +187,29 @@ export default {
 				return false
 			}
 			uni.showLoading({mask:true})
-			let product = this.selectList.map(i=>({ productId:i.id, unitType: i.unitType||0, num: i.currentNum, property: i.property, unitPrice: i.unitPrice }))
+
+			let productList = []
+
+			this.selectList.forEach((productItem,productIdx,productArr) => {
+				let unitType = productItem.unitType
+				let bigNum = 0
+				let num = productItem.currentNum
+				let smallNum = 0
+				if(unitType == 0){
+					bigNum = num
+				}else{
+					smallNum = num
+				}
+				productList.push({productId:productItem.id,bigNum:bigNum,smallNum:smallNum,classId:0,itemId:productItem.itemId,price:productItem.unitPrice})
+			})
+
 			//isCashier=1时收银台播放 总金额139元,请扫码付款
-			createOrder({...params,product:JSON.stringify(product),isCashier:1,customId:this.customId}).then(res=>{
+			createOrder({...params,product:JSON.stringify(productList),isCashier:1,customId:this.customId}).then(res=>{
 				uni.hideLoading()
 				if(res.code == 1){
 					if(res.data.status == 1){
 						this.orderId = res.data.id
-						this.price = res.data.mainPay ? Number(res.data.mainPay) : 0
+						this.price = res.data.actPrice ? Number(res.data.actPrice) : 0
 						this.$refs.toPayRef.open('center')
 					}else{
 						this.removeFromSaveDirect()

+ 0 - 4
ghsPad/src/pages/home/components/settlePop.vue

@@ -73,10 +73,6 @@
                 <text style="color:green;">运费</text>
                 <text><text :class="{selected:checkType == 1}">{{form.sendCost}}</text></text>
             </view>
-            <view class="input-list" @click.stop="changeCheck(2)">
-                <text style="color:green;">包装资材费</text>
-                <text><text :class="{selected:checkType == 2}">{{form.labourCost}}</text></text>
-            </view>
             <view class="input-list">
                 <text>总金额</text>
                 <text><text>{{totalPrice}}</text></text>