|
@@ -46,31 +46,41 @@
|
|
|
|
|
|
|
|
<view class="input-list">
|
|
<view class="input-list">
|
|
|
<text>商品金额</text>
|
|
<text>商品金额</text>
|
|
|
- <text>¥<text>{{allPrice}}</text></text>
|
|
|
|
|
|
|
+ <text><text>{{allPrice}}</text></text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="input-list" @click.stop="changeCheck(1)">
|
|
<view class="input-list" @click.stop="changeCheck(1)">
|
|
|
<text style="color:green;">运费</text>
|
|
<text style="color:green;">运费</text>
|
|
|
- <text>¥<text :class="{selected:checkType == 1}">{{form.sendCost}}</text></text>
|
|
|
|
|
|
|
+ <text><text :class="{selected:checkType == 1}">{{form.sendCost}}</text></text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="input-list" @click.stop="changeCheck(2)">
|
|
<view class="input-list" @click.stop="changeCheck(2)">
|
|
|
<text style="color:green;">包装资材费</text>
|
|
<text style="color:green;">包装资材费</text>
|
|
|
- <text>¥<text :class="{selected:checkType == 2}">{{form.labourCost}}</text></text>
|
|
|
|
|
|
|
+ <text><text :class="{selected:checkType == 2}">{{form.labourCost}}</text></text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="input-list">
|
|
<view class="input-list">
|
|
|
<text>总金额</text>
|
|
<text>总金额</text>
|
|
|
- <text>¥<text>{{totalPrice}}</text></text>
|
|
|
|
|
|
|
+ <text><text>{{totalPrice}}</text></text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="input-list">
|
|
|
|
|
|
|
+ <view class="input-list" @click.stop="changeCheck(0)">
|
|
|
|
|
+ <text style="color:green;">应付金额</text>
|
|
|
|
|
+ <text style="font-size: 10upx;color:green;" v-if="diffPrice > 0">优惠¥<text>{{diffPrice}}</text></text>
|
|
|
|
|
+ <text><text :class="{selected:checkType == 0}">{{form.modifyPrice}}</text></text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="input-list" @click.stop="changeCheck(3)">
|
|
|
<text style="color:green;">收现金</text>
|
|
<text style="color:green;">收现金</text>
|
|
|
- <text>¥<text>30</text></text>
|
|
|
|
|
|
|
+ <text><text :class="{selected:checkType == 3}">{{form.cash}}</text></text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="input-list input-bottom" @click.stop="changeCheck(0)">
|
|
|
|
|
- <text style="color:green;">应付金额</text>
|
|
|
|
|
- <text style="font-size: 10upx;color:green;" v-if="diffPrice > 0">优惠¥<text>{{diffPrice}}</text></text>
|
|
|
|
|
- <text>¥<text :class="{selected:checkType == 0}">{{form.modifyPrice}}</text></text>
|
|
|
|
|
|
|
+ <view class="input-list" v-if="Number(zl)>0">
|
|
|
|
|
+ <text>找零</text>
|
|
|
|
|
+ <text><text>{{zl}}</text></text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="input-list" v-if="Number(zl)<0">
|
|
|
|
|
+ <text>还差</text>
|
|
|
|
|
+ <text><text>{{-zl}}</text></text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="keyboard-body_box"> <VKeyboard ref="keyboard" :digital="true" :disorderly="false" @typing="typing" @enter="enter" @cancel="cancel"> </VKeyboard> </view>
|
|
<view class="keyboard-body_box"> <VKeyboard ref="keyboard" :digital="true" :disorderly="false" @typing="typing" @enter="enter" @cancel="cancel"> </VKeyboard> </view>
|
|
@@ -102,11 +112,12 @@ export default {
|
|
|
labourCost:0,
|
|
labourCost:0,
|
|
|
modifyPrice:0,
|
|
modifyPrice:0,
|
|
|
getStaffId:0,
|
|
getStaffId:0,
|
|
|
- getStaffName:''
|
|
|
|
|
|
|
+ getStaffName:'',
|
|
|
|
|
+ cash:0
|
|
|
},
|
|
},
|
|
|
proceeds: '0',
|
|
proceeds: '0',
|
|
|
hasPayList:[ { name:'扫码', id:0, }, { name:'其它', id:1, }],
|
|
hasPayList:[ { name:'扫码', id:0, }, { name:'其它', id:1, }],
|
|
|
- payWayList:[ { name:'客服微信', id:0 }, { name:'支付宝', id:1 }, { name:'现金', id:4 }, { name:'银行卡', id:5 },{name:'其它',id:9} ],
|
|
|
|
|
|
|
+ payWayList:[ { name:'客服微信', id:0 }, { name:'支付宝', id:1 },{name:'其它',id:9} ],
|
|
|
currentInputType:'proceeds',
|
|
currentInputType:'proceeds',
|
|
|
totalMoney: 0,
|
|
totalMoney: 0,
|
|
|
needPrintList:[ { name:'不需要', id:2 },{ name:'需要', id:1 } ],
|
|
needPrintList:[ { name:'不需要', id:2 },{ name:'需要', id:1 } ],
|
|
@@ -145,6 +156,14 @@ export default {
|
|
|
let price = Number(this.totalPrice) - Number(this.form.modifyPrice)
|
|
let price = Number(this.totalPrice) - Number(this.form.modifyPrice)
|
|
|
price = parseFloat(price.toFixed(2))
|
|
price = parseFloat(price.toFixed(2))
|
|
|
return price
|
|
return price
|
|
|
|
|
+ },
|
|
|
|
|
+ zl(){
|
|
|
|
|
+ let price = 0
|
|
|
|
|
+ if(Number(this.form.cash) > 0 && Number(this.form.modifyPrice) > 0){
|
|
|
|
|
+ price = Number(this.form.cash) - Number(this.form.modifyPrice)
|
|
|
|
|
+ price = parseFloat(price.toFixed(2))
|
|
|
|
|
+ }
|
|
|
|
|
+ return Number(price)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch:{
|
|
watch:{
|
|
@@ -179,15 +198,19 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
changeNeedPrint(val){
|
|
changeNeedPrint(val){
|
|
|
|
|
+ this.$util.hitVoice()
|
|
|
this.form.needPrint = val
|
|
this.form.needPrint = val
|
|
|
},
|
|
},
|
|
|
changePayWay(val){
|
|
changePayWay(val){
|
|
|
|
|
+ this.$util.hitVoice()
|
|
|
this.form.payWay = val
|
|
this.form.payWay = val
|
|
|
},
|
|
},
|
|
|
changeHasPay(val){
|
|
changeHasPay(val){
|
|
|
|
|
+ this.$util.hitVoice()
|
|
|
this.form.hasPay = val
|
|
this.form.hasPay = val
|
|
|
},
|
|
},
|
|
|
changeCheck(val){
|
|
changeCheck(val){
|
|
|
|
|
+ this.$util.hitVoice()
|
|
|
this.checkType = val
|
|
this.checkType = val
|
|
|
this.fillType = val
|
|
this.fillType = val
|
|
|
},
|
|
},
|
|
@@ -221,6 +244,14 @@ export default {
|
|
|
this.form.labourCost = this.form.labourCost.substring(0, this.form.labourCost.length - 1)
|
|
this.form.labourCost = this.form.labourCost.substring(0, this.form.labourCost.length - 1)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ }else if(this.fillType == 3){
|
|
|
|
|
+ if(this.checkType == 3){
|
|
|
|
|
+ this.form.cash = ''
|
|
|
|
|
+ }else{
|
|
|
|
|
+ if (this.form.cash.length > 0) {
|
|
|
|
|
+ this.form.cash = this.form.cash.substring(0, this.form.cash.length - 1)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}else{
|
|
}else{
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -243,6 +274,12 @@ export default {
|
|
|
}else {
|
|
}else {
|
|
|
this.form.labourCost += e.char
|
|
this.form.labourCost += e.char
|
|
|
}
|
|
}
|
|
|
|
|
+ }else if(this.fillType == 3){
|
|
|
|
|
+ if(this.$util.isEmpty(this.form.cash) || this.checkType == 3) {
|
|
|
|
|
+ this.form.cash = e.char
|
|
|
|
|
+ }else {
|
|
|
|
|
+ this.form.cash += e.char
|
|
|
|
|
+ }
|
|
|
}else{
|
|
}else{
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -254,6 +291,10 @@ export default {
|
|
|
this.$refs.keyboard.activate();
|
|
this.$refs.keyboard.activate();
|
|
|
},
|
|
},
|
|
|
enter() {
|
|
enter() {
|
|
|
|
|
+ if( Number(this.form.modifyPrice)> Number(this.totalPrice)){
|
|
|
|
|
+ this.$msg('应付金额不能大于总金额')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
this.$emit('settleCommit',this.form)
|
|
this.$emit('settleCommit',this.form)
|
|
|
},
|
|
},
|
|
|
cancel(){
|
|
cancel(){
|
|
@@ -303,13 +344,13 @@ export default {
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
padding: 6upx 0;
|
|
padding: 6upx 0;
|
|
|
& > view {
|
|
& > view {
|
|
|
- width: 85upx;
|
|
|
|
|
- height: 30upx;
|
|
|
|
|
|
|
+ width: 80upx;
|
|
|
|
|
+ height: 25upx;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
- line-height: 30upx;
|
|
|
|
|
- font-size: 12upx;
|
|
|
|
|
|
|
+ line-height: 25upx;
|
|
|
|
|
+ font-size: 10upx;
|
|
|
border: 1px solid #eee;
|
|
border: 1px solid #eee;
|
|
|
- margin: 0 5upx 5upx 0;
|
|
|
|
|
|
|
+ margin: 0 3upx 3upx 0;
|
|
|
color: #333333;
|
|
color: #333333;
|
|
|
border-radius: 3upx;
|
|
border-radius: 3upx;
|
|
|
&.active {
|
|
&.active {
|
|
@@ -331,8 +372,8 @@ export default {
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
& .input-list{
|
|
& .input-list{
|
|
|
border-bottom: 1upx solid #ebedf0;
|
|
border-bottom: 1upx solid #ebedf0;
|
|
|
- height:35upx;
|
|
|
|
|
- font-size: 14upx;
|
|
|
|
|
|
|
+ height:30upx;
|
|
|
|
|
+ font-size: 11upx;
|
|
|
display:flex;
|
|
display:flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content:space-between;
|
|
justify-content:space-between;
|