| | |
| | | :hairline="false" |
| | | @click.stop="addForm" |
| | | :disabled="whetherClick"></u-button></view> |
| | | <!--分享日计划 --> |
| | | <view |
| | | class="AdddBtn"><u-button text="分享日计划" |
| | | :hairline="false" |
| | | open-type="share" |
| | | :loading='loading'></u-button></view> |
| | | <!-- 提交按钮 --> |
| | | <view |
| | | @click.stop="submitForm" |
| | | class="forwardBtn"><u-button text="提交" |
| | | :hairline="false" |
| | | type="warning" |
| | | @click.stop="submitForm" |
| | | :disabled="whetherClick1" |
| | | :loading='loading'></u-button></view> |
| | | |
| | | </view> |
| | | <!-- 增加按钮 --> |
| | | |
| | |
| | | } |
| | | this.getOrderPlan() |
| | | }, |
| | | onShareAppMessage(res) { |
| | | if (res.from === 'button') {// 来自页面内分享按钮 |
| | | console.log(res.target) |
| | | } |
| | | return { |
| | | title: '分享日计划', |
| | | path: 'pages/driver-page/delivery-my/delivery-my/delivery-my?'+ `id=${this.orderPlanId}` |
| | | } |
| | | |
| | | }, |
| | | |
| | | |
| | | data() { |
| | | return { |
| | | forwardSurplus: 0, |
| | | paramsName: {}, |
| | | huoDaiData: [], //货代Data |
| | | fleetData: [], //车队Data |
| | | huoDaiData: [], |
| | | isClickFlag:true,// true 可以 or false for forward and back to the direction of the car direction (default |
| | | fleetData: [], |
| | | // 日计划id |
| | | orderPlanId: '', |
| | | jhOrderPlanForwardList: [{ //转发对象 |
| | |
| | | selectPopupShow: false, |
| | | list1: [{ name: '车队' }, { name: '货代' }], |
| | | tabHuoDai: false, |
| | | carNumSurplus1: '', //剩余的提煤单数量(转发的数量 - 领取的数量) |
| | | carNumSurplus1: '', //剩余的收发单数量(转发的数量 - 领取的数量) |
| | | tempcarNumSurplus1: '', |
| | | cars2: '', //已经领取的车数 |
| | | carNum: '', |
| | |
| | | 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: { |
| | |
| | | }, |
| | | // 转发对象 |
| | | forwardObjectClick(index, name, id) { |
| | | if(!id){ |
| | | this.selectPopupShow = true; |
| | | this.index = index; |
| | | this.originForwardName = name || '' |
| | | this.isDirectAdd = this.originForwardName !== '' |
| | | this.forwardId = id |
| | | }else{ |
| | | return |
| | | } |
| | | |
| | | }, |
| | | selectPopupClose() { |
| | | this.selectPopupShow = false; |
| | |
| | | // }) |
| | | // this.selectPopupShow = false; |
| | | // } else { |
| | | // this.$u.toast('提煤单剩余数为0或已添加'); |
| | | // this.$u.toast('收发单剩余数为0或已添加'); |
| | | // this.selectPopupShow = true; |
| | | // } |
| | | // } else { |
| | |
| | | // }) |
| | | // this.selectPopupShow = false; |
| | | // } else { |
| | | // this.$u.toast('提煤单剩余数为0或已添加'); |
| | | // this.$u.toast('收发单剩余数为0或已添加'); |
| | | // this.selectPopupShow = true; |
| | | // } |
| | | // } else { |
| | |
| | | // } |
| | | }); |
| | | }, |
| | | // 计算提煤单数量,添加或删除时调用 |
| | | // 计算收发单数量,添加或删除时调用 |
| | | calculate(arr) { |
| | | let total = arr.reduce((prev, cur) => { |
| | | return cur.carNum + prev; |
| | | }, 0); |
| | | console.log(total, '提煤单一共的数据'); |
| | | console.log(total, '收发单一共的数据'); |
| | | //roleType 1客户 2 货代 3司机 5装卸员 |
| | | if (this.roleType == 1) { |
| | | if (Number(this.cars2) > total) { |
| | | this.carNumSurplus1 = Number(this.cars2) - total; |
| | | this.whetherClick = false; |
| | | this.whetherClick1 = false; |
| | | } else if (Number(this.cars2) == total) { //剩余的提煤单为0(添加、提交按钮不能点击) |
| | | } else if (Number(this.cars2) == total) { //剩余的收发单为0(添加、提交按钮不能点击) |
| | | this.whetherClick = true; |
| | | this.whetherClick1 = false; |
| | | this.carNumSurplus1 = Number(this.cars2) - total; |
| | | } else { |
| | | this.carNumSurplus1 = 0; |
| | | this.$u.toast('剩余提煤单数量不足'); |
| | | this.$u.toast('剩余收发单数量不足'); |
| | | this.whetherClick = true; |
| | | this.whetherClick1 = true; |
| | | } |
| | |
| | | this.carNumSurplusHuodai = Number(this.carNum) - total; |
| | | } else { |
| | | this.carNumSurplusHuodai = 0; |
| | | this.$u.toast('剩余提煤单数量不足'); |
| | | this.$u.toast('剩余收发单数量不足'); |
| | | this.whetherClick = true; |
| | | this.whetherClick1 = true; |
| | | } |
| | |
| | | return isPass; |
| | | } |
| | | }); |
| | | console.log(this.jhOrderPlanForwardList,'jhOderPlan') |
| | | if (isPass) { |
| | | this.loading = true; |
| | | this.$reqPost('forward', this.jhOrderPlanForwardList, 'json').then(res => { |
| | |
| | | } else { |
| | | this.tabHuoDai = false; |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | } |
| | | |
| | | .utils-buttonGroup { |
| | | width: 610rpx; |
| | | width: 700rpx; |
| | | @include flex; |
| | | justify-content: space-between; |
| | | position: fixed; |
| | | bottom: vww(30); |
| | | left: vww(30); |
| | | left: vww(18); |
| | | z-index: 3; |
| | | |
| | | .AdddBtn, |