yangan
2024-10-15 5211e91aa2a919a9026b1db61bc1740c97d78c51
pages/public-page/forward/forward.vue
@@ -75,7 +75,7 @@
                              </u-form-item>
                              
                           </u--form>
                           <view><u-button v-if="/聚氯乙烯树脂/.test(this.productName) &&  isShow" text="分配日计划吨数" type="primary" :plain="true" @click="todoFenPei(val)"></u-button></view>
                           <view><u-button v-if="fenpeiFlag " text="分配日计划吨数" type="primary" :plain="true" @click="todoFenPei(val)"></u-button></view>
                        </view>
                     </view>
                  </view>
@@ -166,6 +166,7 @@
         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);
@@ -200,6 +201,7 @@
            pvcPlanMeasure:'',
            forwardSurplus: 0,
            paramsName: {},
            packingType:'',
            productName:'',
            customerId:'',
            huoDaiData: [],
@@ -251,7 +253,7 @@
      onShow() {
         this.init();
         this.getBuild();
         this.getOrderPlan();
         // this.getOrderPlan();
         if (this.roleType == 2) {
            this.list1.splice(1, 1);
            this.tabHuoDai = false;
@@ -266,6 +268,14 @@
         },
         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: {
@@ -497,6 +507,7 @@
               //    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('存在重复添加');
@@ -644,6 +655,10 @@
                  this.$u.toast('请输入合法数字');
                  isPass = false;
                  return isPass;
               } else if (!v.name){
                  this.$u.toast('请选择车队');
                  isPass = false;
                  return isPass;
               } else {
                  isPass = true;
                  return isPass;
@@ -655,13 +670,13 @@
               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('提交成功');
                     if(/聚氯乙烯树脂/.test(this.productName)){
                     if(this.fenpeiFlag()){
                        setTimeout(()=>{
                           uni
               .navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&status=${0}&pvcPlanMeasure=${this.pvcPlanMeasure}`});
               .navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&status=${1}&pvcPlanMeasure=${this.pvcPlanMeasure}`});
                        },500)