修改结算方式选择

master
chen 2022-04-06 11:42:02 +08:00
parent 9d5406c1f1
commit e9cc5e269e
1 changed files with 13 additions and 16 deletions

View File

@ -21,7 +21,7 @@
<view class="title">结算方式</view> <view class="title">结算方式</view>
<view class="clearing-form-content"> <view class="clearing-form-content">
<view class="li" @click="clearingFormFun(index)" v-for="(item,index) in clearingForm" :key="index"> <view class="li" @click="clearingFormFun(index)" v-for="(item,index) in clearingForm" :key="index">
<image class="icon" v-if="item.state" src="../../static/iocn/xuanz.png" mode="" lazy-load></image> <image class="icon" v-if="currentWay==index" src="../../static/iocn/xuanz.png" mode="" lazy-load></image>
<image class="icon" v-else src="../../static/iocn/xuan.png" mode="" lazy-load></image> <image class="icon" v-else src="../../static/iocn/xuan.png" mode="" lazy-load></image>
{{item.title}} {{item.title}}
</view> </view>
@ -66,12 +66,12 @@
<view class="is-invoice"> <view class="is-invoice">
<view class="text">是否开票</view> <view class="text">是否开票</view>
<view class="radio" @click="isInvoiceFun(true)"> <view class="radio" @click="isInvoiceFun(true)">
<image v-if="isInvoice" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image> <image v-if="isInvoice && currentWay!=1 && currentWay!=2" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image>
<view v-else class="icon1"></view> <view v-else class="icon1"></view>
<text></text> <text></text>
</view> </view>
<view class="radio" @click="isInvoiceFun(false)"> <view class="radio" @click="isInvoiceFun(false)">
<image v-if="!isInvoice" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image> <image v-if="!isInvoice && currentWay!=1 && currentWay!=2" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image>
<view v-else class="icon1"></view> <view v-else class="icon1"></view>
<text></text> <text></text>
</view> </view>
@ -79,12 +79,12 @@
<view class="is-invoice"> <view class="is-invoice">
<view class="text">是否收款</view> <view class="text">是否收款</view>
<view class="radio" @click="isMoneyFun(true)"> <view class="radio" @click="isMoneyFun(true)">
<image v-if="isMoney" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image> <image v-if="isMoney && currentWay!=1 && currentWay!=2" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image>
<view v-else class="icon1"></view> <view v-else class="icon1"></view>
<text></text> <text></text>
</view> </view>
<view class="radio" @click="isMoneyFun(false)"> <view class="radio" @click="isMoneyFun(false)">
<image v-if="!isMoney" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image> <image v-if="!isMoney && currentWay!=1 && currentWay!=2" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image>
<view v-else class="icon1"></view> <view v-else class="icon1"></view>
<text></text> <text></text>
</view> </view>
@ -160,11 +160,12 @@
data() { data() {
return { return {
clearingForm: [ clearingForm: [
{title: '单次付费',state: true,}, {title: '单次付费'},
{title: '质保免费',state: false,}, {title: '质保免费'},
{title: '验收扫尾',state: false,}, {title: '验收扫尾'},
{title: '包年签单',state: false,}, {title: '包年签单'},
], ],
currentWay:0,//
signatureState:false, signatureState:false,
array: ['微信', '支付宝', '现金', '类型'], array: ['微信', '支付宝', '现金', '类型'],
paymentModeIndex:0, paymentModeIndex:0,
@ -189,7 +190,7 @@
ifCollectionCode:false,// ifCollectionCode:false,//
remarkText:'',// remarkText:'',//
saveTimer:null,// saveTimer:null,//
flag:true// flag:true,//
} }
}, },
computed:{ computed:{
@ -219,9 +220,8 @@
if(this.checkEmpty()) { if(this.checkEmpty()) {
if(this.flag) { if(this.flag) {
this.flag = false; this.flag = false;
let exist = this.clearingForm.findIndex(item=>item.state==true);
let params = { let params = {
a:this.clearingForm[exist].title, a:this.clearingForm[this.currentWay].title,
b:this.serviceTime, b:this.serviceTime,
c:this.detailObj.doorToDoorFee, c:this.detailObj.doorToDoorFee,
d:this.detailObj.taxes, d:this.detailObj.taxes,
@ -257,10 +257,7 @@
this.ifCollectionCode = !this.ifCollectionCode; this.ifCollectionCode = !this.ifCollectionCode;
}, },
clearingFormFun(index) { clearingFormFun(index) {
for (var i = 0; i < this.clearingForm.length; i++) { this.currentWay = index;
this.clearingForm[i].state = false
}
this.clearingForm[index].state = true
}, },
bindPickerChange(data) { bindPickerChange(data) {
this.paymentModeIndex = data.detail.value; this.paymentModeIndex = data.detail.value;