| | |
| | | index: '', |
| | | checkboxValue1: '', |
| | | selectPopupShow: false, |
| | | list1: [ |
| | | { |
| | | name: '车队' |
| | | }, |
| | | { |
| | | name: '货代' |
| | | } |
| | | ], |
| | | list1: [{ name: '车队' }, { name: '货代' }], |
| | | tabHuoDai: false, |
| | | carNumSurplus1: '', |
| | | cars2: '', |
| | |
| | | return uni.getStorageSync('roleType'); |
| | | }, |
| | | text() { |
| | | return `已领取${this.cars2}张日计划单,剩余${this.carNumSurplus1}张日计划单`; |
| | | return `已领取${this.cars2}张提煤单,剩余${this.carNumSurplus1}张提煤单`; |
| | | }, |
| | | text1() { |
| | | return `已拥有${this.carNum}张日计划单,剩余${this.carNumSurplusHuodai}张日计划单`; |
| | | return `已拥有${this.carNum}张提煤单,剩余${this.carNumSurplusHuodai}张提煤单`; |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | allrelay(x, y) { |
| | | let a = 0; |
| | | if (y != 0) { |
| | | a = x + y; |
| | | a = Number(x) + Number(y); |
| | | return a; |
| | | } else { |
| | | return x; |
| | | return Number(x); |
| | | } |
| | | }, |
| | | allrelayto(x, y) { |
| | | let a = 0; |
| | | if (y != 0) { |
| | | a = x - y; |
| | | a = Number(x) - Number(y); |
| | | return a; |
| | | } else { |
| | | return x; |
| | | return Number(x); |
| | | } |
| | | }, |
| | | checkboxChange(value, index) { |
| | |
| | | // 货代 |
| | | if (this.roleType == 2) { |
| | | this.jhOrderPlanForwardList[index].carNum = this.allrelayto(this.jhOrderPlanForwardList[index].carNum, this.forwardSurplus); |
| | | if (this.jhOrderPlanForwardList[index].carNum <= 0) { |
| | | this.jhOrderPlanForwardList[index].carNum = 0; |
| | | } |
| | | } |
| | | // 客户 |
| | | if (this.roleType == 1) { |
| | | this.jhOrderPlanForwardList[index].carNum = this.allrelayto(this.jhOrderPlanForwardList[index].carNum, this.carNumSurplus1); |
| | | if (this.jhOrderPlanForwardList[index].carNum <= 0) { |
| | | this.jhOrderPlanForwardList[index].carNum = 0; |
| | | } |
| | | } |
| | | } |
| | | }, |