| | |
| | | </view> |
| | | <view v-if="roleType == 1" class="notice-bar"> |
| | | <u-notice-bar :text="text" :fontSize="30"></u-notice-bar> |
| | | <view class="notice-icon" style="background: url('../../../static/image/banner/notice.png') no-repeat;background-size: cover; width: 42rpx;height: 42rpx;"></view> |
| | | <view |
| | | class="notice-icon" |
| | | style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/notice.png') no-repeat;background-size: cover; width: 42rpx;height: 42rpx;" |
| | | ></view> |
| | | </view> |
| | | <view v-else-if="roleType == 2" class="notice-bar"><u-notice-bar :text="text1" :fontSize="30"></u-notice-bar></view> |
| | | <view class="card-main"> |
| | | <view class="card-block"> |
| | | <view class="forward-card" v-for="(val, index) in jhOrderPlanForwardList" :key="index"> |
| | | <u-swipe-action> |
| | | <u-swipe-action-item :options="options1" @click="deleteGroup(index, val)"> |
| | | <u-swipe-action> |
| | | <u-swipe-action-item :options="options1" v-for="(val, index) in jhOrderPlanForwardList" :key="val.vid" :name="val.vid" @click="deleteGroup(index, val)"> |
| | | <view class="forward-card"> |
| | | <view class="card-content"> |
| | | <u--form labelPosition="left" :model="forwardForm" ref="form1"> |
| | | <u-form-item label="转发对象" labelWidth="21%" ref="item1" @click="forwardObjectClick(index)"> |
| | |
| | | ></u--input> |
| | | </view> |
| | | <u-checkbox-group v-model="val.checkboxValue1" placement="column" @change="v => checkboxChange(v, index, val)"> |
| | | <u-checkbox size="30" shape="circle" labelSize="30" label="全部转发" name="全部转发" :disabled="val.ischecked"></u-checkbox> |
| | | <u-checkbox |
| | | size="30" |
| | | shape="circle" |
| | | labelSize="30" |
| | | label="全部转发" |
| | | name="全部转发" |
| | | :disabled="val.ischecked" |
| | | :checked="val.isSelected" |
| | | ></u-checkbox> |
| | | </u-checkbox-group> |
| | | </view> |
| | | </u-form-item> |
| | | <!-- <u-form-item><u-button text="删除本组" :hairline="false" type="error" @click="deleteGroup(index, val)"></u-button></u-form-item> --> |
| | | </u--form> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </view> |
| | | </view> |
| | | </u-swipe-action-item> |
| | | </u-swipe-action> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | this.orderPlanId = params.orderPlanId; |
| | | this.$reqGet('forwardList', { OrderPlanId: params.orderPlanId }).then(res => { |
| | | if (res.data.length !== 0 && this.roleType == 1) { |
| | | this.jhOrderPlanForwardList = res.data.map(item => { |
| | | this.jhOrderPlanForwardList = res.data.map((item, index) => { |
| | | return { |
| | | id: item.id, |
| | | orderPlanId: item.orderPlanId, |
| | |
| | | carNum: item.carNum, |
| | | xsUserId: item.xsUserId === null ? 0 : item.xsUserId, |
| | | fleetId: item.fleetId === null ? 0 : item.fleetId, |
| | | checkboxValue1: '' |
| | | checkboxValue1: '', |
| | | vid: `${new Date().getTime()}${index}${item.id}` |
| | | }; |
| | | }); |
| | | } else if (res.data.length !== 0 && this.roleType == 2) { |
| | | this.jhOrderPlanForwardList = res.data.map(item => { |
| | | this.jhOrderPlanForwardList = res.data.map((item, index) => { |
| | | return { |
| | | id: item.id, |
| | | orderPlanId: item.orderPlanId, |
| | |
| | | carNum: item.carNum, |
| | | xsUserId: item.xsUserId === null ? 0 : item.xsUserId, |
| | | fleetId: item.fleetId === null ? 0 : item.fleetId, |
| | | checkboxValue1: '' |
| | | checkboxValue1: '', |
| | | vid: `${new Date().getTime()}${index}${item.id}` |
| | | }; |
| | | }); |
| | | } else { |
| | | this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map(v => { |
| | | if (!v.orderPlanId) { |
| | | this.jhOrderPlanForwardList = this.jhOrderPlanForwardList.map((item, index) => { |
| | | if (!item.orderPlanId) { |
| | | return { |
| | | ...v, |
| | | orderPlanId: params.orderPlanId |
| | | ...item, |
| | | orderPlanId: params.orderPlanId, |
| | | vid: `${new Date().getTime()}${index}${item.id}` |
| | | }; |
| | | } |
| | | }); |
| | |
| | | carNum: null, |
| | | xsUserId: 0, |
| | | fleetId: 0, |
| | | checkboxValue1: '' |
| | | checkboxValue1: '', |
| | | isSelected: false |
| | | } |
| | | ], |
| | | // 索引,利用索引正确显示 |
| | |
| | | }; |
| | | }); |
| | | if (value.length != 0) { |
| | | let tempforwardSurplus = this.forwardSurplus; |
| | | let tempcarNumSurplus1 = this.carNumSurplus1; |
| | | // if (v.id) { |
| | | // 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); |
| | | // this.calculate(this.jhOrderPlanForwardList); |
| | | // if (tempcarNumSurplus1 == 0) { |
| | | // this.jhOrderPlanForwardList[index].carNum = this.allrelay(0, this.carNumSurplus1); |
| | | // } |
| | | // } |
| | | // tempcarNumSurplus1 = 0; |
| | | // // 货代 |
| | | // if (this.roleType == 2) { |
| | | // this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.personalForward.carNum, tempforwardSurplus); |
| | | // } |
| | | // tempforwardSurplus = 0; |
| | | // }); |
| | | // } else { } |
| | | |
| | | if (this.roleType == 1) { |
| | | this.jhOrderPlanForwardList[index].carNum = this.allrelay(this.carNumSurplus1, this.jhOrderPlanForwardList[index].carNum); |
| | | this.calculate(this.jhOrderPlanForwardList); |
| | |
| | | }); |
| | | this.whetherClick = true; |
| | | } else { |
| | | this.jhOrderPlanForwardList[index].carNum = 0; |
| | | this.jhOrderPlanForwardList[index].carNum = null; |
| | | this.calculate(this.jhOrderPlanForwardList); |
| | | } |
| | | }, |
| | |
| | | }, 0); |
| | | console.log(total, '提煤单一共的数据'); |
| | | if (this.roleType == 1) { |
| | | if (this.cars2 >= total) { |
| | | this.carNumSurplus1 = this.cars2 - total; |
| | | if (Number(this.cars2) >= total) { |
| | | this.carNumSurplus1 = Number(this.cars2) - total; |
| | | this.whetherClick = false; |
| | | this.whetherClick1 = false; |
| | | } else { |
| | |
| | | } |
| | | } |
| | | if (this.roleType == 2) { |
| | | if (this.carNum >= total) { |
| | | this.carNumSurplusHuodai = this.carNum - total; |
| | | if (Number(this.carNum) >= total) { |
| | | this.carNumSurplusHuodai = Number(this.carNum) - total; |
| | | this.whetherClick = false; |
| | | this.whetherClick1 = false; |
| | | } else { |
| | |
| | | if (!time) { |
| | | time = setTimeout(() => { |
| | | that.calculate(that.jhOrderPlanForwardList); |
| | | if (that.roleType == 1) { |
| | | if (that.jhOrderPlanForwardList[index].carNum < Number(that.carNumSurplus1)) { |
| | | that.$set(that.jhOrderPlanForwardList[index], 'checkboxValue1', ''); |
| | | that.jhOrderPlanForwardList.forEach((v, i) => { |
| | | if (index != i) { |
| | | v.ischecked = false; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | if (that.roleType == 2) { |
| | | if (that.jhOrderPlanForwardList[index].carNum < Number(that.carNumSurplusHuodai)) { |
| | | that.$set(that.jhOrderPlanForwardList[index], 'checkboxValue1', ''); |
| | | that.jhOrderPlanForwardList.forEach((v, i) => { |
| | | if (index != i) { |
| | | v.ischecked = false; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | time = null; |
| | | }, 800); |
| | | } |
| | |
| | | xsUserId: 0, |
| | | fleetId: 0, |
| | | checkboxValue1: '', |
| | | ischecked: false |
| | | ischecked: false, |
| | | vid: new Date().getTime(), |
| | | isSelected: false |
| | | }); |
| | | } else { |
| | | this.jhOrderPlanForwardList.push({ |
| | |
| | | xsUserId: 0, |
| | | fleetId: 0, |
| | | checkboxValue1: '', |
| | | ischecked: true |
| | | ischecked: true, |
| | | vid: new Date().getTime(), |
| | | isSelected: false |
| | | }); |
| | | } |
| | | this.calculate(this.jhOrderPlanForwardList); |
| | |
| | | this.$u.toast('请输入合法数字'); |
| | | isPass = false; |
| | | return isPass; |
| | | } |
| | | // else if (Number(v.carNum) > Number(this.forwardSurplus)) { |
| | | // this.$u.toast('超过最大订单剩余量'); |
| | | // isPass = false; |
| | | // return isPass; |
| | | // } |
| | | else { |
| | | } else { |
| | | isPass = true; |
| | | return isPass; |
| | | } |
| | |
| | | justify-content: center; |
| | | position: relative; |
| | | top: -100rpx; |
| | | z-index: 1; |
| | | margin-bottom: vww(40); |
| | | .card-block { |
| | | width: 690rpx; |
| | | @include flex; |
| | |
| | | width: 610rpx; |
| | | @include flex; |
| | | position: fixed; |
| | | bottom: vww(50); |
| | | left: vww(25); |
| | | z-index: 2; |
| | | bottom: vww(30); |
| | | left: vww(30); |
| | | z-index: 3; |
| | | .AdddBtn, |
| | | .forwardBtn { |
| | | width: 290rpx; |