From 156a667b09390614c685c15a3c42b035e7a1d269 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期一, 15 七月 2024 14:58:13 +0800 Subject: [PATCH] fix:库管日计划页面详情 列表修改样式 --- pages/customer-page/addDailyPlan/addDailyPlan.vue | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pages/customer-page/addDailyPlan/addDailyPlan.vue b/pages/customer-page/addDailyPlan/addDailyPlan.vue index 4bd99cb..cc9f5ad 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> @@ -158,22 +158,32 @@ methods: { //鏌ヨ璁㈠崟 getDingdan(){ - this.$reqGet('getAppOrderList',{orderType:'澶栬喘'}) + this.$reqGet('getAppOrderList',{orderType:'澶栭攢'}) .then(res => { 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