From 8b53f063a074d91e7093d35168bf0dc349c83ba9 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 11 七月 2024 14:14:39 +0800 Subject: [PATCH] feat::发运单详情去除折叠 --- pages/customer-page/addDailyPlan/addDailyPlan.vue | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pages/customer-page/addDailyPlan/addDailyPlan.vue b/pages/customer-page/addDailyPlan/addDailyPlan.vue index 4bd99cb..b722403 100644 --- a/pages/customer-page/addDailyPlan/addDailyPlan.vue +++ b/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() { -- Gitblit v1.9.1