From d8974c0d693b51760ba5ab935aa240512a873a93 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期二, 25 四月 2023 08:37:29 +0800 Subject: [PATCH] 修改样式,修复已知bug --- pages/public-page/forward/forward.vue | 37 ++++++++++++++++++++++--------------- 1 files changed, 22 insertions(+), 15 deletions(-) diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue index 57a8e42..76b4d16 100644 --- a/pages/public-page/forward/forward.vue +++ b/pages/public-page/forward/forward.vue @@ -11,7 +11,7 @@ <u-form-item label="杈撳叆鏁伴噺" labelWidth="20%" ref="item1"> <view class="forward-card-amount"> <view class="forward-card-amount-input"><u--input v-model="val.carNum" placeholder="璇疯緭鍏ヨ浆鍙戞暟閲�"></u--input></view> - <u-checkbox-group v-model="val.checkboxValue1" placement="column" @change="v => checkboxChange(v, index)"> + <u-checkbox-group v-model="val.checkboxValue1" placement="column" @change="v => checkboxChange(v, index, val)"> <u-checkbox :customStyle="{ marginBottom: '8px' }" size="30" labelSize="30" label="鍏ㄩ儴杞彂" name="鍏ㄩ儴杞彂" :disabled="val.ischecked"></u-checkbox> </u-checkbox-group> </view> @@ -131,7 +131,9 @@ cars2: '', carNum: '', carNumSurplusHuodai: '', - formNum: 1 + formNum: 1, + // 涓汉杞彂鏁版嵁 + personalForward: {} }; }, onShow() { @@ -154,7 +156,6 @@ }, methods: { init() { - console.log('roleType', this.roleType); switch (this.roleType) { case 1: this.getAllHuoDaiByCustomerId(); @@ -185,7 +186,7 @@ return Number(x); } }, - checkboxChange(value, index) { + checkboxChange(value, index, v) { uni.setStorageSync('allrelay', this.jhOrderPlanForwardList[index].carNum); this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map((v, i) => { return { @@ -196,17 +197,23 @@ if (value.length != 0) { let tempforwardSurplus = this.forwardSurplus; let tempcarNumSurplus1 = this.carNumSurplus1; - // 璁$畻鍏ㄩ儴杞彂鏁� - // 瀹㈡埛 - if (this.roleType == 1) { - this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.jhOrderPlanForwardList[index].carNum, tempcarNumSurplus1); - } - tempcarNumSurplus1 = 0; - // 璐т唬 - if (this.roleType == 2) { - this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.jhOrderPlanForwardList[index].carNum, tempforwardSurplus); - } - tempforwardSurplus = 0; + let jhorderplanforward = () => { + this.$reqGet('jhorderplanforward', { forwardId: v.id }).then(res => { + this.personalForward = res.data; + // 璁$畻鍏ㄩ儴杞彂鏁� + // 瀹㈡埛 + if (this.roleType == 1) { + this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.personalForward.carNum, tempcarNumSurplus1); + } + tempcarNumSurplus1 = 0; + // 璐т唬 + if (this.roleType == 2) { + this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.personalForward.carNum, tempforwardSurplus); + } + tempforwardSurplus = 0; + }); + }; + jhorderplanforward(); // 閫夋嫨涓�涓悗鍏朵綑绂佹澶嶉�� this.jhOrderPlanForwardList.forEach((v, i) => { if (i !== index) { -- Gitblit v1.9.1