shish 1 год назад
Родитель
Сommit
d050cf8667
1 измененных файлов с 38 добавлено и 7 удалено
  1. 38 7
      hdApp/src/admin/billing/affirm.vue

+ 38 - 7
hdApp/src/admin/billing/affirm.vue

@@ -115,9 +115,16 @@
 
 
 					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
 					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
 						<view class="tui-title">结账方式</view>
 						<view class="tui-title">结账方式</view>
-            <button @click="form.hasPay = 0" class="admin-button-com middle" :class="form.hasPay == 0 ? 'blue' : 'default'">扫码付</button>
-						<button @tap="form.hasPay = 1" class="admin-button-com middle" :class="form.hasPay == 1 ? 'blue' : 'default'">线下</button>
-						<button @click="form.hasPay = 2" class="admin-button-com middle" :class="form.hasPay == 2 ? 'blue' : 'default'">赊账</button>
+						<view class="payment-buttons">
+							<view class="button-row">
+								<button @click="form.hasPay = 0" class="admin-button-com middle" :class="form.hasPay == 0 ? 'blue' : 'default'">扫码</button>
+								<button @tap="form.hasPay = 1" class="admin-button-com middle" :class="form.hasPay == 1 ? 'blue' : 'default'">线下</button>
+							</view>
+							<view class="button-row">
+								<button @click="form.hasPay = 2" class="admin-button-com middle" :class="form.hasPay == 2 ? 'blue' : 'default'">赊账</button>
+								<button @click="form.hasPay = 3" class="admin-button-com middle" :class="form.hasPay == 3 ? 'blue' : 'default'">余额</button>
+							</view>
+						</view>
 					</tui-list-cell>
 					</tui-list-cell>
 
 
           <tui-list-cell class="line-cell" :arrow="true" v-if="form.hasPay == 1">
           <tui-list-cell class="line-cell" :arrow="true" v-if="form.hasPay == 1">
@@ -130,21 +137,22 @@
 
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
             <view class="tui-title">打印小票</view>
             <view class="tui-title">打印小票</view>
-            <button @tap="form.needPrint = 2" class="admin-button-com middle" :class="form.needPrint == 2? 'blue' : 'default'">不打印</button>
-            <button @click="form.needPrint = 1" class="admin-button-com middle" :class="form.needPrint == 1 ? 'blue' : 'default'">打印</button>
+            <button @tap="form.needPrint = 2" class="admin-button-com middle" style="width:140upx;" :class="form.needPrint == 2? 'blue' : 'default'">不打印</button>
+            <button @click="form.needPrint = 1" class="admin-button-com middle" style="width:140upx;" :class="form.needPrint == 1 ? 'blue' : 'default'">打印</button>
           </tui-list-cell>
           </tui-list-cell>
 
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
           <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
             <view class="tui-title">
             <view class="tui-title">
               <text>合计金额</text>  
               <text>合计金额</text>  
             </view>
             </view>
-            <text style="color: #3385FF">¥{{parseFloat(finalPrice)}}</text>
-            <button @tap="showDiscount()" class="admin-button-com mini-btn default" style="margin-left:50upx;">点击打折</button>
+            <text style="color: #3385FF;width:170upx;">¥{{parseFloat(finalPrice)}}</text>
+            <button @tap="showDiscount()" class="admin-button-com middle default" style="width:140upx;">打折</button>
             <text v-if="discountValue>0 && discountValue<1">{{ Number(discountValue)*10 }}折</text>
             <text v-if="discountValue>0 && discountValue<1">{{ Number(discountValue)*10 }}折</text>
           </tui-list-cell>
           </tui-list-cell>
 
 
           <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
           <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
             <view v-if="form.hasPay == 2" class="tui-title">应收金额</view>
             <view v-if="form.hasPay == 2" class="tui-title">应收金额</view>
+            <view v-else-if="form.hasPay == 3" class="tui-title">余额扣减</view>
             <view v-else class="tui-title">实收金额</view>
             <view v-else class="tui-title">实收金额</view>
             <input style="border:1upx solid #eee;color:#3385FF;width:150upx;height:70upx;" type="digit" @focus="modifyPrice=''" v-model="modifyPrice" placeholder-class="tui-placeholder"/>
             <input style="border:1upx solid #eee;color:#3385FF;width:150upx;height:70upx;" type="digit" @focus="modifyPrice=''" v-model="modifyPrice" placeholder-class="tui-placeholder"/>
             <text v-if="modifyPrice > 0 && modifyPrice > finalPrice" style="font-size:25upx;margin-left:20upx;color:red;">人工包装费 ¥{{parseFloat((modifyPrice-finalPrice).toFixed(2))}}</text>
             <text v-if="modifyPrice > 0 && modifyPrice > finalPrice" style="font-size:25upx;margin-left:20upx;color:red;">人工包装费 ¥{{parseFloat((modifyPrice-finalPrice).toFixed(2))}}</text>
@@ -503,6 +511,8 @@ export default {
           name = '确认已付款?'
           name = '确认已付款?'
         }else if(this.form.hasPay == 2){
         }else if(this.form.hasPay == 2){
           name = '确认赊账?'
           name = '确认赊账?'
+        }else if(this.form.hasPay == 3){
+          name = '确认余额支付?'
         }else{
         }else{
           name = '确认提交'
           name = '确认提交'
         }
         }
@@ -554,6 +564,9 @@ export default {
             const {data: { id, orderSn,actPrice }} = res;
             const {data: { id, orderSn,actPrice }} = res;
             if(this.form.hasPay == 0){
             if(this.form.hasPay == 0){
               this.$util.pageTo({ url: '/admin/billing/toPay',type:2,query: {orderId:id,orderSn:orderSn,actPrice:actPrice}})
               this.$util.pageTo({ url: '/admin/billing/toPay',type:2,query: {orderId:id,orderSn:orderSn,actPrice:actPrice}})
+            }else if(this.form.hasPay == 3){
+              // 余额支付,可能需要特殊处理
+              this.$util.pageTo({ url: '/admin/billing/result?orderId='+id,type:2})
             }else{
             }else{
               this.$util.pageTo({ url: '/admin/billing/result?orderId='+id,type:2})
               this.$util.pageTo({ url: '/admin/billing/result?orderId='+id,type:2})
             }
             }
@@ -583,6 +596,24 @@ export default {
 .admin-button-com {
 .admin-button-com {
   margin-right: 30upx;
   margin-right: 30upx;
 }
 }
+
+.payment-buttons {
+  display: flex;
+  flex-direction: column;
+  gap: 20upx;
+  width: 100%;
+  
+  .button-row {
+    display: flex;
+    justify-content: flex-start;
+    gap: 30upx;
+    
+    .admin-button-com {
+      flex: 0 0 140upx;
+      margin-right: 0;
+    }
+  }
+}
 .affirm-page {
 .affirm-page {
   position: relative;
   position: relative;
   height: 100%;
   height: 100%;