|
|
@@ -133,21 +133,16 @@
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <view style="border:1upx solid green;" v-if="form.hasPay == 1">
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="form.hasPay == 1">
|
|
|
- <view class="tui-title special-title">线下渠道</view>
|
|
|
- <view class="payment-buttons">
|
|
|
- <view class="button-row">
|
|
|
- <button @click="setPayWay(0)" class="admin-button-com middle" :class="form.payWay == 0 ? 'blue' : 'default'">微信</button>
|
|
|
- <button @click="setPayWay(1)" class="admin-button-com middle" :class="form.payWay == 1 ? 'blue' : 'default'">支付宝</button>
|
|
|
- </view>
|
|
|
- <view class="button-row">
|
|
|
- <button @click="setPayWay(4)" class="admin-button-com middle" :class="form.payWay == 4 ? 'blue' : 'default'">现金</button>
|
|
|
- <button @click="setPayWay(5)" class="admin-button-com middle" :class="form.payWay == 5 ? 'blue' : 'default'">银行卡</button>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="form.hasPay == 1">
|
|
|
+ <view class="tui-title">线下渠道</view>
|
|
|
+ <picker mode="selector" :value="payWayindex" :range="payWayList" range-key="name" @change="payWayChange" class="tui-input">
|
|
|
+ <view class="uni-input" v-if="form.payWay == 0">线下微信</view>
|
|
|
+ <view class="uni-input" v-else-if="form.payWay == 1">线下支付宝</view>
|
|
|
+ <view class="uni-input" v-else-if="form.payWay == 4">现金</view>
|
|
|
+ <view class="uni-input" v-else-if="form.payWay == 5">银行卡</view>
|
|
|
+ <view class="uni-input" v-else style="color:#CCCCCC;">请选择</view>
|
|
|
+ </picker>
|
|
|
</tui-list-cell>
|
|
|
- </view>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">打印小票</view>
|
|
|
@@ -167,7 +162,7 @@
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
<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">{{form.forward==0?'实收':'实付'}}金额</view>
|
|
|
<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:green;">优惠 ¥{{parseFloat((finalPrice-modifyPrice).toFixed(2))}}</text>
|
|
|
@@ -203,14 +198,14 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">订单类型</view>
|
|
|
- <button @tap="form.forward = 0;form.hasPay = 4" class="admin-button-com middle" style="width:170upx;" :class="form.forward == 0? 'blue' : 'default'">常规订单</button>
|
|
|
- <button @click="form.forward = 1;form.hasPay = 1" class="admin-button-com middle" style="width:170upx;" :class="form.forward == 1 ? 'blue' : 'default'">负数订单</button>
|
|
|
+ <button @tap="form.forward = 0;form.hasPay = 4" class="admin-button-com middle" style="width:170upx;" :class="form.forward == 0? 'blue' : 'default'">收入订单</button>
|
|
|
+ <button @click="form.forward = 1;form.hasPay = 1" class="admin-button-com middle" style="width:170upx;" :class="form.forward == 1 ? 'blue' : 'default'">付款订单</button>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="form.forward == 1">
|
|
|
<view class="tui-title">退款方式</view>
|
|
|
- <button @tap="form.forwardStock = 0" class="admin-button-com middle" style="width:190upx;" :class="form.forwardStock == 0? 'blue' : 'default'">退货并退款</button>
|
|
|
- <button @click="form.forwardStock = 1" class="admin-button-com middle" style="width:160upx;" :class="form.forwardStock == 1 ? 'blue' : 'default'">只退款</button>
|
|
|
+ <button @tap="form.forwardStock = 0" class="admin-button-com middle" style="width:190upx;" :class="form.forwardStock == 0? 'blue' : 'default'">退货付款</button>
|
|
|
+ <button @click="form.forwardStock = 1" class="admin-button-com middle" style="width:160upx;" :class="form.forwardStock == 1 ? 'blue' : 'default'">只付款</button>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
</view>
|
|
|
@@ -223,7 +218,7 @@
|
|
|
<text class="price-title">
|
|
|
<text></text>
|
|
|
</text>
|
|
|
- <text class="price-number"><text class="large">¥{{ modifyPrice }}</text></text>
|
|
|
+ <text class="price-number"><text class="large">{{form.forward==0?'':'-'}}¥{{ modifyPrice }}</text></text>
|
|
|
</view>
|
|
|
<!-- <text style="font-size:30upx;right:100upx;">当前在<text style="font-weight:bold;color:red;margin-left:5upx;font-size:32upx;">{{currentShop.shopName}}</text></text> -->
|
|
|
<button class="admin-button-com blue big" @click="confirmSubmit">提交</button>
|
|
|
@@ -382,6 +377,8 @@ export default {
|
|
|
|
|
|
//默认欠款是首选项
|
|
|
this.form.hasPay = 4
|
|
|
+ // 初始化支付方式索引
|
|
|
+ this.payWayindex = 0
|
|
|
// #ifdef APP-PLUS
|
|
|
if(this.$util.isScanEnv()){
|
|
|
this.isScanEnv = true
|
|
|
@@ -511,8 +508,14 @@ export default {
|
|
|
this.payWayindex = index
|
|
|
this.form.payWay = this.payWayList[index].id
|
|
|
},
|
|
|
+ // 根据支付方式ID更新索引
|
|
|
+ updatePayWayIndex(){
|
|
|
+ const index = this.payWayList.findIndex(item => item.id === this.form.payWay)
|
|
|
+ this.payWayindex = index >= 0 ? index : 0
|
|
|
+ },
|
|
|
setPayWay(payWay){
|
|
|
this.form.payWay = payWay
|
|
|
+ this.updatePayWayIndex()
|
|
|
},
|
|
|
diffPriceConfirm(){
|
|
|
this.form.dealPrice = 1
|
|
|
@@ -538,7 +541,7 @@ export default {
|
|
|
}else if(this.form.hasPay == 1){
|
|
|
name = '确认线下付款?'
|
|
|
if(this.form.forward == 1){
|
|
|
- name = '确认开负数订单?'
|
|
|
+ name = '确认开付款单?'
|
|
|
}
|
|
|
}else if(this.form.hasPay == 2){
|
|
|
name = '确认赊账?'
|