From 5c7d78e847739fbd4af4aa28359fc3ee36763a19 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期三, 10 七月 2024 08:31:27 +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