shish 3 سال پیش
والد
کامیت
1330d3bd0e

+ 7 - 29
ghsPad/src/pages/home/components/cashConsole.vue

@@ -3,7 +3,7 @@
 	<view class="active" @click="openBox">开箱</view>
 	 <view class="active" 
  style="background-color:orange;color:white;border-color:orange;position:fixed;left:135upx;bottom:13upx;width:84upx;height:50upx;line-height:30upx;font-size:16upx;" 
- @click="goSettleCommit">结算</view>
+ @click="beginSettle">结算</view>
     <view class="active" @click="clearItemFn">清空</view>
 	<view class="active" @click="cancelKdFn">返回</view>
 
@@ -36,7 +36,7 @@
 	<!-- 开单选花材输入数量和金额 -->
 	<uni-popup ref="selectNumPriceRef" background-color="#fff" type="center" :animation="false">
 		<selectNumPrice @confirmAddItemModel="confirmAddItemModel" :customData.sync="customData"
-		@addToClear="addToClear" @cancelKdSelectNumPrice="addItemModelHidden"></selectNumPrice>
+		@cancelKdSelectNumPrice="addItemModelHidden"></selectNumPrice>
 	</uni-popup>
 
 </view>
@@ -114,32 +114,6 @@ export default {
 			this.$util.hitVoice()
 			this.$emit('cancelKdFn')
 		},
-        addToClear(){
-			let params = {
-                hasPay: 0,
-                payWay:0,
-                needPrint:2,
-                freight: '',
-                groupName:'',
-                remark:'',
-                sendCost:0,
-                modifyPrice:0,
-                getStaffName:''
-            }
-			if(this.$util.isEmpty(this.selectList)){
-				this.$msg('请选择商品')
-				return false
-			}
-			let price = 0
-			for (const ele of this.selectList) {
-				let currentPrice = Number(ele.currentNum) * Number(ele.unitPrice)
-				currentPrice = currentPrice.toFixed(2)
-				price = Number(currentPrice) + Number(price)
-				price = price.toFixed(2)
-			}
-			params.modifyPrice = price
-            this.settleCommit(params)
-        },
 		cancelSelectPrice(){
 			this.$refs.gatheringRef.close()
 		},
@@ -207,6 +181,10 @@ export default {
 			createOrder({...params,product:JSON.stringify(productList),isCashier:1,customId:this.customId}).then(res=>{
 				uni.hideLoading()
 				if(res.code == 1){
+					if(res.data.diff && !this.$util.isEmpty(res.data.diff)){
+						this.$refs.settlePop.diffConfirm(res.data.diff)
+						return false
+					}
 					if(res.data.status == 1){
 						this.orderId = res.data.id
 						this.price = res.data.actPrice ? Number(res.data.actPrice) : 0
@@ -291,7 +269,7 @@ export default {
 				})
 			}
 		},
-		goSettleCommit(){
+		beginSettle(){
 			this.$util.hitVoice()
 			if(this.$util.isEmpty(this.selectList)) {
 				this.$msg('请选择结算花材')

+ 0 - 16
ghsPad/src/pages/home/components/selectNumPrice.vue

@@ -31,10 +31,6 @@
                 <image @tap="changeUnitType" class="change-unit" :src="`${constant.imgUrl}/icon/switch/switch128.png`"></image>
             </view>
 
-            <view style="text-align:center;" v-if="customData.property==0">
-                <button class="admin-button-com mini-btn blue" style="font-size:20upx;" @click="clear()">扫码付</button>
-            </view>
-
         </view>
         <view class="keyboard-body_box">
          <VKeyboard ref="keyboard" :pointIsShow="true" :digital="true" :disorderly="false" @typing="typing" @enter="enter" @cancel="cancel"> </VKeyboard>
@@ -106,18 +102,6 @@ export default {
 		}
 	},
     methods: {
-        clear(){
-            if(Number(this.currentNum)  <= 0) {
-                this.$msg('请填写数量')
-                return
-            }
-            if(Number(this.unitPrice)  <= 0) {
-                this.$msg('请填写价格')
-                return
-            }
-            this.enter()
-            this.$emit('addToClear')
-        },
         checkCurrent(n){
             this.checkType = n
             this.fillType = n

+ 30 - 2
ghsPad/src/pages/home/components/settlePop.vue

@@ -88,6 +88,19 @@
 
         </view>
 
+        <uni-popup ref="diffRef" background-color="#fff" type="center" :animation="false">
+            <view style="padding:10upx;width:80vw;height:70vh;font-size:22upx;">
+                <view v-for="(diff, diffIndex) in diffData">
+                    <view>{{diff.name}} 售价:{{diff.price}} 开单价:{{diff.kdPrice}}</view>
+                </view>
+                <view style="margin-top:20upx;">以上开单价和售价不一样,请确认是否提交?</view>
+                <view style="text-align:center;margin-top:20upx;">
+                <button class="admin-button-com middle" @click="cancelDiff">取消</button>
+                <button class="admin-button-com middle blue" @click="confirmDiff">确认</button>
+                </view>
+            </view>
+        </uni-popup>
+
     </view>
 </template>
 <script>
@@ -116,7 +129,8 @@ export default {
                 getStaffName:'',
                 shopAdminId:0,
                 shopAdminName:'',
-                cash:0
+                cash:0,
+                dealPrice:0
             },
             proceeds: '0',
             hasPayList:[{ name:'欠款', id:2, },{ name:'扫码', id:0, },{ name:'线下', id:1, }],
@@ -125,7 +139,8 @@ export default {
             totalMoney: 0,
             needPrintList:[ { name:'需要', id:1 },{ name:'不需要', id:2 } ],
             getStaffList:[],
-            shopAdminIdList:[]
+            shopAdminIdList:[],
+            diffData:[]
         };
     },
     props:{
@@ -206,6 +221,18 @@ export default {
 
     },
     methods: {
+        confirmDiff(){
+            this.form.dealPrice = 1
+            this.$refs.diffRef.close()
+            this.enter()
+        },
+        cancelDiff(){
+            this.$refs.diffRef.close()
+        },
+        diffConfirm(data){
+            this.diffData = data
+            this.$refs.diffRef.open('center')
+        },
         changeShopAdminId(item){
             this.form.shopAdminId = item.id
             this.form.shopAdminName = item.name
@@ -432,6 +459,7 @@ export default {
     & .keyboard-body_box {
         flex: 1;
         overflow: auto;
+        z-index:99;
     }
 }
 </style>