yangan
2024-07-05 4f9eb354382eda4fe5e47c12e58a40896df552d9
pages/customer-page/addDailyPlan/addDailyPlan.vue
@@ -53,7 +53,7 @@
               </uni-tr>
               <uni-tr v-for="(item, index) in subDataList" :key="index">
                  <uni-td align="center">
                     <view>{{ item.productName }}</view></uni-td>
                     <view>{{   item.productName}}</view></uni-td>
               <uni-td>
                  <view class="name">{{ item.orderType }}</view>
               </uni-td>
@@ -163,17 +163,27 @@
                  uni.hideLoading()
                  if (res.code == 0) {
                     this.customerNameList = res.data.map(item=>{
                        item.text = item.productName + '-' + item.orderCode;
                        item.text = (item.productNames ? item.productNames : item.productName) + '-' + item.orderCode;
                        item.value = item.id;
                        return item;
                     })
                     });
                     if(this.customerNameList.length === 1){
                        this.deptId = this.customerNameList[0].value; //选择当前
                        if(this.deptId){
                           this.deptChange(this.deptId);
                        }
                     }
                     console.log(this.customerNameList,'')
                  }
               })
            },
         deptChange(e) {
            console.log(e,'eee');
            this.subDataList = this.customerNameList.filter(item=>item.id === e);
            this.subDataList = this.customerNameList.filter(item=>item.id === e).length ?
            this.customerNameList.filter(item=>item.id === e)[0].tmOrderList  : [];
            ;
            
         },
         confirmBuild() {