| | |
| | | // 客户 |
| | | if (this.roleType == 1) { |
| | | this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.personalForward.carNum, tempcarNumSurplus1); |
| | | if (this.jhOrderPlanForwardList[index].carNum == 0) { |
| | | this.jhOrderPlanForwardList[index].carNum == tempcarNumSurplus1; |
| | | } |
| | | } |
| | | tempcarNumSurplus1 = 0; |
| | | // 货代 |
| | |
| | | }); |
| | | } else { |
| | | if (this.roleType == 1) { |
| | | this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.jhOrderPlanForwardList[index].carNum, this.carNumSurplus1); |
| | | this.jhOrderPlanForwardList[index].carNum = this.carNumSurplus1; |
| | | // this.allrelay(this.jhOrderPlanForwardList[index].carNum, this.carNumSurplus1); |
| | | } |
| | | tempcarNumSurplus1 = 0; |
| | | if (this.roleType == 2) { |
| | | this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.jhOrderPlanForwardList[index].carNum, this.forwardSurplus); |
| | | this.jhOrderPlanForwardList[index].carNum = this.forwardSurplus; |
| | | // this.allrelay(this.jhOrderPlanForwardList[index].carNum, this.forwardSurplus); |
| | | } |
| | | tempforwardSurplus = 0; |
| | | } |
| | |
| | | let tempcarNumSurplus1 = this.carNumSurplus1; |
| | | // 货代 |
| | | if (this.roleType == 2) { |
| | | this.jhOrderPlanForwardList[index].carNum = this.allrelayto(this.jhOrderPlanForwardList[index].carNum, this.forwardSurplus); |
| | | this.jhOrderPlanForwardList[index].carNum = 0; |
| | | 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); |
| | | this.jhOrderPlanForwardList[index].carNum = 0; |
| | | if (this.jhOrderPlanForwardList[index].carNum <= 0) { |
| | | this.jhOrderPlanForwardList[index].carNum = 0; |
| | | } |
| | |
| | | if (this.jhOrderPlanForwardList.length === 0) { |
| | | this.$u.toast('请至少选择一组转发对象'); |
| | | } |
| | | let reg = /^[1-9]\d*$/; |
| | | this.jhOrderPlanForwardList.forEach(v => { |
| | | if (isNaN(Number(v.carNum)) || Number(v.carNum) <= 0) { |
| | | if (!reg.test(v.carNum) || Number(v.carNum) <= 0) { |
| | | this.$u.toast('请输入合法数字'); |
| | | isPass = false; |
| | | return isPass; |