yangan
2024-09-05 48a4ff3409804fc62139a9fa9fc05498cbc0a0ce
pages/public-page/forward/forward.vue
@@ -75,7 +75,7 @@
                              </u-form-item>
                              
                           </u--form>
                           <view><u-button text="分配日计划吨数" type="primary" :plain="true" @click="todoFenPei"></u-button></view>
                           <view><u-button v-if="/聚氯乙烯树脂/.test(this.productName) &&  isShow" 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.pvcPlanMeasure = params.pvcPlanMeasure;
         // 客户
         this.cars2 = Number(params.cars2);
         this.tempcarNumSurplus1 = this.carNumSurplus1 = Number(params.carNumSurplus1 || 0);
@@ -196,6 +197,7 @@
      data() {
         return {
            isshow:false,
            pvcPlanMeasure:'',
            forwardSurplus: 0,
            paramsName: {},
            productName:'',
@@ -239,6 +241,7 @@
            }],
            loading: false, //提交loading
            originForwardName: '', //原转发对象
            isShow:false,
            laterForwardName: '', //后转发对象
            errorDataList: [], // 错误数据
            isDirectAdd: false, // 是否是在原来有对象的item修改 是的为true
@@ -248,6 +251,7 @@
      onShow() {
         this.init();
         this.getBuild();
         // this.getOrderPlan();
         if (this.roleType == 2) {
            this.list1.splice(1, 1);
            this.tabHuoDai = false;
@@ -271,6 +275,12 @@
            })
            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 {
@@ -487,6 +497,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('存在重复添加');
@@ -651,7 +662,7 @@
                     if(/聚氯乙烯树脂/.test(this.productName)){
                        setTimeout(()=>{
                           uni
               .navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&status=${0}`});
               .navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&status=${0}&pvcPlanMeasure=${this.pvcPlanMeasure}`});
                        },500)
               
@@ -678,9 +689,9 @@
               this.tabHuoDai = false;
            }
         },
         todoFenPei(){
         todoFenPei(val){
            uni
               .navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}`});
               .navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&fleetId=${val.fleetId}&pvcPlanMeasure=${this.pvcPlanMeasure}`});
         }
      }
   };