|
|
@@ -76,18 +76,13 @@
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<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 mini-btn" :class="form.hasPay == 0 ? 'blue' : 'default'">待结账</button>
|
|
|
<button @tap="form.hasPay = 1" class="admin-button-com mini-btn" :class="form.hasPay == 1 ? 'blue' : 'default'">已结账</button>
|
|
|
+ <button @tap="form.hasPay = 2" class="admin-button-com mini-btn" :class="form.hasPay == 1 ? 'blue' : 'default'">记欠款</button>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <tui-list-cell class="line-cell" v-if="form.hasPay == 1" :hover="false" :arrow="false">
|
|
|
- <view class="tui-title">结账方式</view>
|
|
|
- <button @click="form.debt = 0" class="admin-button-com mini-btn" :class="form.debt == 0 ? 'blue' : 'default'">已付款</button>
|
|
|
- <button @tap="form.debt = 1" class="admin-button-com mini-btn" :class="form.debt == 1 ? 'blue' : 'default'">记欠款</button>
|
|
|
- </tui-list-cell>
|
|
|
-
|
|
|
- <tui-list-cell class="line-cell" :arrow="true" v-if="form.hasPay == 1 && form.debt == 0">
|
|
|
+ <tui-list-cell class="line-cell" :arrow="true" v-if="form.hasPay == 1">
|
|
|
<div class="tui-title">收款方式</div>
|
|
|
<picker mode="selector" :value="form.payWay" :range="payWayList" range-key="name" @change="payWayChange" class="tui-input" >
|
|
|
<input v-model="form.payWay" name="payWay" type="text" hidden />
|
|
|
@@ -116,7 +111,7 @@
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
- <view v-if="form.debt == 1" class="tui-title">应收金额</view>
|
|
|
+ <view v-if="form.hasPay == 2" class="tui-title">应收金额</view>
|
|
|
<view v-else class="tui-title">实收金额</view>
|
|
|
<input style="border:1upx solid #eee;color:#3385FF;width:150upx;height:70upx;" type="number" @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>
|
|
|
@@ -184,7 +179,6 @@ export default {
|
|
|
payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
|
|
|
payWayindex:0,
|
|
|
form: {
|
|
|
- debt:0, //1欠款 0已收款
|
|
|
shopId: "",
|
|
|
shopName: "",
|
|
|
receiveProvince: "",
|
|
|
@@ -346,18 +340,8 @@ export default {
|
|
|
},
|
|
|
async formSubmit () {
|
|
|
let formData = this.form;
|
|
|
- let price = 0;
|
|
|
const product = this.selectList.map((ele) => {
|
|
|
- price += ele.bigCount * Number(ele.bigPrice);
|
|
|
- price += ele.smallCount * Number(ele.smallPrice);
|
|
|
- return {
|
|
|
- productId: ele.id,
|
|
|
- bigNum: ele.bigCount,
|
|
|
- smallNum: ele.smallCount,
|
|
|
- classId: ele.classId,
|
|
|
- itemId: ele.itemId,
|
|
|
- price: ele.userPrice>0?ele.userPrice:price,
|
|
|
- };
|
|
|
+ return {productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount, classId: ele.classId, itemId: ele.itemId, price: ele.userPrice}
|
|
|
});
|
|
|
formData.product = JSON.stringify(product);
|
|
|
if (!this.getMerchantInfo) {
|
|
|
@@ -375,6 +359,7 @@ export default {
|
|
|
}
|
|
|
Fn(params).then((res) => {
|
|
|
if(res.code == 1){
|
|
|
+ this.removeMemoryDirect(this.option.customId)
|
|
|
const {data: { id, orderSn,actPrice }} = res;
|
|
|
if(this.form.hasPay == 0){
|
|
|
this.$util.pageTo({ url: '/admin/billing/toPay',type:2,query: {orderId:id,orderSn:orderSn,actPrice:actPrice}})
|
|
|
@@ -385,11 +370,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
gobackEvent () {
|
|
|
- uni.navigateBack({
|
|
|
- delta: 1,
|
|
|
- });
|
|
|
- },
|
|
|
- },
|
|
|
+ uni.navigateBack({ delta: 1 })
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|