| | |
| | | <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> |
| | |
| | | cars2: '', |
| | | carNum: '', |
| | | carNumSurplusHuodai: '', |
| | | formNum: 1 |
| | | formNum: 1, |
| | | // 个人转发数据 |
| | | personalForward: {} |
| | | }; |
| | | }, |
| | | onShow() { |
| | |
| | | }, |
| | | methods: { |
| | | init() { |
| | | console.log('roleType', this.roleType); |
| | | switch (this.roleType) { |
| | | case 1: |
| | | this.getAllHuoDaiByCustomerId(); |
| | |
| | | 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 { |
| | |
| | | if (value.length != 0) { |
| | | let tempforwardSurplus = this.forwardSurplus; |
| | | let tempcarNumSurplus1 = this.carNumSurplus1; |
| | | 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.jhOrderPlanForwardList[index].carNum, tempcarNumSurplus1); |
| | | this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.personalForward.carNum, tempcarNumSurplus1); |
| | | } |
| | | tempcarNumSurplus1 = 0; |
| | | // 货代 |
| | | if (this.roleType == 2) { |
| | | this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.jhOrderPlanForwardList[index].carNum, tempforwardSurplus); |
| | | this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.personalForward.carNum, tempforwardSurplus); |
| | | } |
| | | tempforwardSurplus = 0; |
| | | }); |
| | | }; |
| | | jhorderplanforward(); |
| | | // 选择一个后其余禁止复选 |
| | | this.jhOrderPlanForwardList.forEach((v, i) => { |
| | | if (i !== index) { |