From d9c789da8f638b67609b98e45b3d58e8767f8491 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Wed, 20 Nov 2024 15:55:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E5=AE=A2=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E4=BC=98=E6=83=A0=E5=88=B8=EF=BC=8C=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E6=8A=B5=E6=89=A3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tool/Instead/components/pay-type.vue | 9 +++ src/views/tool/Instead/components/quans.vue | 79 ++++++++++++------ src/views/tool/Instead/index.vue | 80 +++++++++++++------ src/views/tool/Instead/quan_util.js | 41 ++++++++-- 4 files changed, 153 insertions(+), 56 deletions(-) diff --git a/src/views/tool/Instead/components/pay-type.vue b/src/views/tool/Instead/components/pay-type.vue index f5f672d..884fd53 100644 --- a/src/views/tool/Instead/components/pay-type.vue +++ b/src/views/tool/Instead/components/pay-type.vue @@ -10,6 +10,7 @@ v-for="(item, index) in list" :key="index" :type="sel === item.payType ? 'primary' : ''" + :disabled="disabledPayType.includes(item.payType)" > {{ item.payName }} @@ -30,6 +31,10 @@ export default { type: [String, Number], default: '', }, + disabledPayType:{ + type:Array, + default:()=>[] + } }, data() { return { @@ -38,6 +43,10 @@ export default { }; }, watch: { + disabledPayType(){ + const item = this.list.find(v=>!this.disabledPayType.includes(v.payType)) + this.sel=item.payType + }, sel(newval) { console.log(newval); this.$emit("input", newval); diff --git a/src/views/tool/Instead/components/quans.vue b/src/views/tool/Instead/components/quans.vue index 2de1167..7540356 100644 --- a/src/views/tool/Instead/components/quans.vue +++ b/src/views/tool/Instead/components/quans.vue @@ -16,11 +16,7 @@ :data="quans.fullReductionCoupon" @cell-click="fullReductionCouponClick" > - +