| | |
| | | :readonly="true" |
| | | border="bottom"></u--input> |
| | | </u-form-item> |
| | | <u-form-item label="输入数量" |
| | | <u-form-item label="输入车数" |
| | | ref="item2" |
| | | labelWidth="21%"> |
| | | <view class="forward-card-amount"> |
| | | <view class="forward-card-amount-input"> |
| | | <u--input v-model="val.carNum" |
| | | placeholder="请输入转发数量" |
| | | placeholder="请输入转发车数" |
| | | @input="debouncecarNumInput(index, val.carNum,val.xsUserId)" |
| | | @blur="blurInput(index, val.carNum,val.xsUserId)" |
| | | border="bottom"></u--input> |
| | |
| | | </u-checkbox-group> |
| | | </view> |
| | | </u-form-item> |
| | | |
| | | </u--form> |
| | | <view><u-button v-if="fenpeiFlag " text="分配日计划吨数" type="primary" :plain="true" @click="todoFenPei(val)"></u-button></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | console.log(params, '转发页面的参数'); |
| | | let reg=RegExp(/销/) |
| | | this.isshow=!reg.test(params.orderType) |
| | | this.productName = params.productName; |
| | | this.customerId = params.customerId; |
| | | this.packingType = params.packingType; |
| | | this.pvcPlanMeasure = params.pvcPlanMeasure; |
| | | // 客户 |
| | | this.cars2 = Number(params.cars2); |
| | | this.tempcarNumSurplus1 = this.carNumSurplus1 = Number(params.carNumSurplus1 || 0); |
| | |
| | | data() { |
| | | return { |
| | | isshow:false, |
| | | pvcPlanMeasure:'', |
| | | forwardSurplus: 0, |
| | | paramsName: {}, |
| | | packingType:'', |
| | | productName:'', |
| | | customerId:'', |
| | | huoDaiData: [], |
| | | isClickFlag:true,// true 可以 or false for forward and back to the direction of the car direction (default |
| | | fleetData: [], |
| | |
| | | index: '', |
| | | checkboxValue1: '', |
| | | selectPopupShow: false, |
| | | list1: [{ name: '车队' }, { name: '承运商' }], |
| | | list1: [{ name: '车队' }], //{ name: '承运商' } |
| | | tabHuoDai: false, |
| | | carNumSurplus1: '', //剩余的收发单数量(转发的数量 - 领取的数量) |
| | | tempcarNumSurplus1: '', |
| | |
| | | }], |
| | | loading: false, //提交loading |
| | | originForwardName: '', //原转发对象 |
| | | isShow:false, |
| | | laterForwardName: '', //后转发对象 |
| | | errorDataList: [], // 错误数据 |
| | | isDirectAdd: false, // 是否是在原来有对象的item修改 是的为true |
| | |
| | | }, |
| | | onShow() { |
| | | this.init(); |
| | | this.getBuild(); |
| | | // this.getOrderPlan(); |
| | | if (this.roleType == 2) { |
| | | this.list1.splice(1, 1); |
| | | this.tabHuoDai = false; |
| | |
| | | }, |
| | | text1() { |
| | | return `已拥有${this.carNum}张收发单,剩余${this.carNumSurplusHuodai}张收发单`; |
| | | }, |
| | | fenpeiFlag(){ |
| | | console.log(this.productName,this.packingType,'122222222cumped',/聚氯乙烯树脂/.test(this.productName) || (this.packingType && this.packingType == '1')) |
| | | if(/聚氯乙烯树脂/.test(this.productName) || (this.packingType && this.packingType == '1')){ |
| | | return true |
| | | }else{ |
| | | return false |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }) |
| | | this.$reqGet('forwardList', { OrderPlanId: this.orderPlanId }).then(res => { |
| | | uni.hideLoading() |
| | | if(res.data.length){ |
| | | this.isShow = true; |
| | | }else{ |
| | | this.isShow = false; |
| | | |
| | | } |
| | | if (res.data.length !== 0 && this.roleType == 1) { |
| | | this.jhOrderPlanForwardList = res.data.map((item, index) => { |
| | | return { |
| | |
| | | }).catch(e => { |
| | | uni.hideLoading() |
| | | }) |
| | | }, |
| | | getBuild(){ |
| | | console.log(this.productName,'opr') |
| | | if(/聚氯乙烯树脂/.test(this.productName)){ |
| | | this.$reqGet('getBuildList',{orderPlanId:this.orderPlanId,customerId:this.customerId}).then(res=>{ |
| | | console.log(res,'resss') |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | // 返回上一页 |
| | | back() { |
| | |
| | | // this.selectPopupShow = true; |
| | | // } |
| | | // } else { |
| | | console.log(this.jhOrderPlanForwardList,item,'jhOrderPlanForwardList') |
| | | let isableAdd = this.jhOrderPlanForwardList.filter(v => item.name === v.name); |
| | | if (isableAdd.length > 0) { |
| | | this.$u.toast('存在重复添加'); |
| | |
| | | }, |
| | | // 提交 |
| | | submitForm() { |
| | | //车数 * 吨数 < 计划吨数 |
| | | let isPass = false; |
| | | if (this.jhOrderPlanForwardList.length === 0) { |
| | | this.$u.toast('请至少选择一组转发对象'); |
| | |
| | | this.jhOrderPlanForwardList.forEach(v => { |
| | | if (!reg.test(v.carNum) || Number(v.carNum) <= 0) { |
| | | this.$u.toast('请输入合法数字'); |
| | | isPass = false; |
| | | return isPass; |
| | | } else if (!v.name){ |
| | | this.$u.toast('请选择车队'); |
| | | isPass = false; |
| | | return isPass; |
| | | } else { |
| | |
| | | this.$reqPost('forward', this.jhOrderPlanForwardList, 'json').then(res => { |
| | | console.log(res, 'zh'); |
| | | // res.data.length == 0 提交成功 否则提交失败 |
| | | if (res.data.length == 0) { |
| | | if (res.code === 0) { |
| | | this.loading = false |
| | | this.$u.toast('提交成功'); |
| | | setTimeout(() => { |
| | | if(this.fenpeiFlag){ |
| | | setTimeout(()=>{ |
| | | uni |
| | | .navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&status=${1}&pvcPlanMeasure=${this.pvcPlanMeasure}`}); |
| | | |
| | | },500) |
| | | |
| | | }else{ |
| | | setTimeout(() => { |
| | | uni.navigateBack({ delta: 1 }); |
| | | }, 1000); |
| | | } |
| | | |
| | | } else { |
| | | this.loading = false |
| | | this.errorDataList = res.data |
| | |
| | | this.tabHuoDai = false; |
| | | } |
| | | }, |
| | | todoFenPei(val){ |
| | | uni |
| | | .navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&fleetId=${val.fleetId}&pvcPlanMeasure=${this.pvcPlanMeasure}`}); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | .forward-card { |
| | | margin-top: vww(10); |
| | | width: 690rpx; |
| | | height: 275rpx; |
| | | height: 400rpx; |
| | | background: #ffffff; |
| | | box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15); |
| | | border-radius: 20rpx; |