Просмотр исходного кода

Merge branch 'master' into zhongqi-intraCityExpress

shish 11 месяцев назад
Родитель
Сommit
bb9fe53663

+ 0 - 4
ghsApp/src/admin/home/me.vue

@@ -140,10 +140,6 @@
               <view class="tui-title">云音箱</view>
             </tui-list-cell>
 
-            <tui-list-cell @click="pageTo({ url: '/pagesStore/me/expressSet' })" class="line-cell" :hover="false" :arrow="true">
-              <view class="tui-title">快递设置</view>
-            </tui-list-cell>
-
             <tui-list-cell @click="pageTo({ url: '/admin/shop/sk' })" class="line-cell" :hover="false" :arrow="true">
               <view class="tui-title">快捷开单</view>
             </tui-list-cell>

+ 1 - 1
ghsPad/src/pages/home/components/settlePop.vue

@@ -112,7 +112,7 @@
         <uni-popup ref="diffRef" background-color="#fff" type="center" :animation="false">
             <view style="padding:10upx ;width:80vw;height:100vh;font-size:22upx;overflow-y:scroll;padding-bottom:86upx;">
                 <view v-for="(diff, diffIndex) in diffData" :key="diffIndex">
-                    <view>{{diff.name}} 售价:¥{{diff.price?parseFloat(diff.price):0}} 开单价:¥{{diff.kdPrice?parseFloat(diff.kdPrice):0}}</view>
+                    <view>{{diff.name}} <text style="margin-left:20upx;">售价:¥{{diff.price?parseFloat(diff.price):0}}</text> <text style="margin-left:30upx;">开单价:¥{{diff.kdPrice?parseFloat(diff.kdPrice):0}}</text></view>
                 </view>
                 <view style="margin-top:20upx;">以上开单价和售价不一样,请确认是否提交?</view>
                 <view style="text-align:center;margin-top:20upx;position:fixed;bottom:0upx;background-color:white;width:78vw;">

+ 1 - 1
hdApp/src/admin/billing/affirm.vue

@@ -659,7 +659,7 @@ export default {
       let orderId = this.option.orderId  ? this.option.orderId : 0
 			let book = this.option.book ? this.option.book : 0
 			let reduceStock = this.option.reduceStock?this.option.reduceStock:0
-      params = {...params,orderId:orderId,book:book,reduceStock:reduceStock}
+      params = {...params,orderId:orderId,book:book,reduceStock:reduceStock,version:2}
 
       uni.showLoading({mask:true})
       createOrder(params).then((res) => {

+ 1 - 1
hdApp/src/admin/cg/code.vue

@@ -8,7 +8,7 @@
     </view>
 
     <view style="text-align: center;font-size:32upx;">
-      收款码是否算收入:<switch style="transform:scale(0.7,0.7)" :checked="gatherRepeat == 0 ? true : false" @change="gatherRepeatChangeFn" />{{ gatherRepeat==0?'是(没有重复收款)':'否(属于重复收款)' }}
+      收款码算收入:<switch style="transform:scale(0.7,0.7)" :checked="gatherRepeat == 0 ? true : false" @change="gatherRepeatChangeFn" />{{ gatherRepeat==0?'是':'否' }}
     </view>
 
   </view>

+ 1 - 3
hdApp/src/admin/home/order.vue

@@ -177,9 +177,7 @@ export default {
       this.getOrderList()
     },
     reduceOrderStock(item){
-      this.$util.confirmModal({content:'只有一次扣除机会,扣除后不能再改'},() => {
-        this.$util.pageTo({url:'/admin/billing/index2?customId='+item.customId+'&orderId='+item.id+'&reduceStock=1'})
-      })
+      this.$util.pageTo({url:'/admin/billing/index2?customId='+item.customId+'&orderId='+item.id+'&reduceStock=1'})
     },
     sendOrderFn(item){
       let that = this

+ 4 - 0
hdApp/src/api/shop/ext.js

@@ -10,4 +10,8 @@ export const updateMtAlone = data => {
 
 export const modifyGatherRepeat = data => {
 	return https.get('/shop-ext/modify-gather-repeat', data)
+}
+
+export const getExtInfo = data => {
+	return https.get('/shop-ext/info', data)
 }

+ 7 - 2
hdPad/src/pages/home/cash.vue

@@ -24,7 +24,7 @@
 			<!-- 按钮操作 -->
 			<view class="open-box">
 				<consoleButton :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId" @showCustomPop="showCustomPop" @fastCreate="fastCreate" 
-				:customId.sync="customId" :customName.sync="customName" @changeProperty="changeProperty" @updateRightItem="updateRightItem"></consoleButton>
+				:customId.sync="customId" :reduceOrderId.sync="reduceOrderId" :reduceStock.sync="reduceStock" :customName.sync="customName" @changeProperty="changeProperty" @updateRightItem="updateRightItem"></consoleButton>
 			</view>
 		</view>
 
@@ -80,7 +80,9 @@ export default {
 			T:null,
 			customerInfo:{hasSelect:0,customId:0,customName:''},
 			myCustomList:[],
-			mustUpdate:false
+			mustUpdate:false,
+			reduceOrderId:0,
+			reduceStock:0
 		}
 	},
 	computed: {
@@ -94,6 +96,9 @@ export default {
 		//这个页面有二个这方法,不能去掉,不然会造成:全部缓存清了,点选客没有客户可选
 		this.getCustomData()
 
+		this.reduceOrderId = this.option.orderId ? this.option.orderId:0
+		this.reduceStock = this.option.reduceStock ? this.option.reduceStock:0
+
 	},
 	onUnload(){
 		clearInterval(this.T)

+ 18 - 2
hdPad/src/pages/home/components/console.vue

@@ -107,7 +107,15 @@ export default {
         changeCurrentJobId:{
             type:Number,
             default:0
-        }
+        },
+		reduceOrderId: {
+			type: Number,
+			default: 0
+		},
+		reduceStock: {
+			type: Number,
+			default: 0
+		},
     },
     data(){
         return {
@@ -280,12 +288,20 @@ export default {
 				this.$msg('请选择商品')
 				return false
 			}
+
+			//扣库存
+			params = {...params,reduceStock:this.reduceStock,orderId:this.reduceOrderId}
+
 			uni.showLoading({mask:false})
 			let product = this.selectList.map(i=>({ productId:i.id, unitType: i.unitType||0, num: i.currentNum, property: i.property, unitPrice: i.unitPrice }))
 			//isCashier=1时收银台播放 总金额139元,请扫码付款
-			createOrder({...params,product:JSON.stringify(product),isCashier:1,customId:this.customId}).then(res=>{
+			createOrder({...params,product:JSON.stringify(product),isCashier:1,customId:this.customId,version:2}).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.mainPay ? Number(res.data.mainPay) : 0

+ 6 - 19
hdPad/src/pages/home/components/orderInfo.vue

@@ -74,7 +74,7 @@
 
     <view class="button-area">
       <view :class="[orderInfo.status==1 || orderInfo.status==5 ? '' : 'active']" @click="printFn(orderInfo)">打印</view>
-      <view :class="[orderInfo.status==1 ? 'active' : '']" @click="selectFn(orderInfo,0)">查微信</view>
+      <view :class="[orderInfo.repeat==1 && orderInfo.payStatus == 1 ? 'active' : '']" @click="reduceStock(orderInfo)">扣库存</view>
       <view :class="[orderInfo.status==1 ? 'active' : '']" @click="cancelShow()">取消</view>
       <view class="active" @click="openPf()">批发</view>
     </view>
@@ -179,9 +179,9 @@ export default {
 						title: '提示',
 						content: '没有安装,请先下载安装',
 						success: function (res){
-						if (res.confirm){ 
-							plus.runtime.openURL('http://www.wixhb.com/main/app')
-						}
+              if (res.confirm){
+                plus.runtime.openURL('http://www.wixhb.com/main/app')
+              }
 						}
 					})
 				}
@@ -258,21 +258,8 @@ export default {
         }
       })
     },
-    selectFn(order,payWay){
-      let that = this
-      uni.showLoading({mask:true})
-      codePayCheck({id:order.id,payWay:payWay,recheck:1}).then(res=>{
-          if(res.code == 1){
-              if(res.data.returnStatus == 'SUCCESS'){
-                  that.$msg('订单已付款')
-                  setTimeout(function(){
-                      that.getOrderDetail(order.id)
-                  },1500)
-              }else{
-                that.$msg('订单未付款!!')
-              }
-          }
-      })
+    reduceStock(order){
+      this.$util.pageTo({ url: "/pages/home/cash?customId="+order.customId+'&customName='+order.customName+'&orderId='+order.id+'&reduceStock=1',type:2})
     }
   }
 }

+ 1 - 1
hdPad/src/pages/home/components/orderList.vue

@@ -11,7 +11,7 @@
                 <view :class="[selectOrderId==item.id ? 'active' : 'not-active', 'item-body_box']">
                     <view class="flower-name_box">
                         <view class="current-item-title">
-                            <text>{{item.actPrice}}</text>                           
+                            <text>{{item.actPrice}}</text> <text v-if="item.repeat == 1" style="margin-left:10upx;">扫码收款</text>                      
                         </view>
                         <image class="flower-image" :src="item.cover"></image>
                         <text v-if="item.fromType!=4" style="position:absolute;top:2upx;left:90upx;font-size:11upx;">{{item.sn}}</text>

+ 32 - 1
hdPad/src/pages/home/components/settlePop.vue

@@ -105,6 +105,20 @@
 
         </view>
 
+        <uni-popup ref="diffRef" background-color="#fff" type="center" :animation="false">
+            <view style="padding:10upx ;width:80vw;height:100vh;font-size:22upx;overflow-y:scroll;padding-bottom:86upx;">
+                <view v-for="(diff, diffIndex) in diffData" :key="diffIndex">
+                    <view>{{diff.name}} <text style="margin-left:20upx;">售价:¥{{diff.price?parseFloat(diff.price):0}}</text><text style="margin-left:30upx;">开单价:¥{{diff.kdPrice?parseFloat(diff.kdPrice):0}}</text></view>
+                </view>
+                <view style="margin-top:20upx;">以上开单价和售价不一样,请确认是否提交?</view>
+                <view style="text-align:center;margin-top:20upx;position:fixed;bottom:0upx;background-color:white;width:78vw;">
+                <button class="admin-button-com middle" @click="cancelDiff" style="margin-right:20upx;">取消</button>
+                <button class="admin-button-com middle blue" @click="confirmDiff">确认</button>
+                </view>
+            </view>
+        </uni-popup>
+
+
     </view>
 </template>
 <script>
@@ -134,7 +148,8 @@ export default {
                 getStaffName:'',
                 shopAdminId:0,
                 shopAdminName:'',
-                cash:0
+                cash:0,
+                dealPrice:0
             },
             proceeds: '0',
             hasPayList:[ { name:'扫码', id:0, },{ name:'赊账', id:2, },{ name:'线下', id:1, }],
@@ -144,6 +159,7 @@ export default {
             needPrintList:[ { name:'不需要', id:2 },{ name:'需要', id:1 } ],
             getStaffList:[],
             shopAdminIdList:[],
+            diffData:[],
             discountList:[{name:'1折',value:0.1},{name:'2折',value:0.2},{name:'3折',value:0.3},{name:'4折',value:0.4},{name:'5折',value:0.5},{name:'6折',value:0.6},{name:'7折',value:0.7},{name:'8折',value:0.8},{name:'9折',value:0.9},{name:'不打折',value:1}],
             discountValue:0,
             showDiscount:false
@@ -203,6 +219,7 @@ export default {
                     this.form.remark = ''
                     this.form.sendCost = 0
                     this.form.labourCost = 0
+                    this.form.dealPrice = 0
                 }
             },
             immediate:true
@@ -237,6 +254,19 @@ export default {
         })
     },
     methods: {
+        confirmDiff(){
+            this.form.dealPrice = 1
+            this.$refs.diffRef.close()
+            this.enter()
+        },
+        cancelDiff(){
+            this.form.dealPrice = 0
+            this.$refs.diffRef.close()
+        },
+        diffConfirm(data){
+            this.diffData = data
+            this.$refs.diffRef.open('center')
+        },
         viewDiscount(){
             this.showDiscount = true
         },
@@ -447,6 +477,7 @@ export default {
         padding: 5upx 10upx 10upx 10upx;
         display: flex;
         flex-direction: column;
+        z-index:29;
         & .input-list{
             border-bottom: 1upx solid #ebedf0;
             height:30upx;

+ 1 - 0
hdPad/src/pages/home/components/toPay.vue

@@ -143,6 +143,7 @@ export default {
                     that.$msg('已取消')
                 }
             })
+            this.$refs.cancelPaymentRef.close()
             //有可能订单已经是取消的状态了,再点取消就直接关闭页面,所以可以不用考虑取消动作是否成功才关闭页面
             that.$emit('cancelPay')
         }