From e7b0b34176549cfec809c6b89c4cab0999e488b9 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期二, 28 三月 2023 16:40:56 +0800 Subject: [PATCH] 修改大部分问题 --- pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue | 126 +++++++++++++++++++++++++---------------- 1 files changed, 76 insertions(+), 50 deletions(-) diff --git a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue index b13c229..ed6d1c9 100644 --- a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue +++ b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails.vue @@ -10,7 +10,7 @@ </uni-tr> <uni-tr> <uni-th align="left">棰嗗彇鎬婚噺</uni-th> - <uni-td align="left">{{ orderPlanDetail.fleetOrHuodaiNub || 0 }}寮�</uni-td> + <uni-td align="left">{{ cars2 || 0 }}寮�</uni-td> </uni-tr> <uni-tr v-for="(item, index) in orderPlanDetail.huodaiList" :key="index"> <uni-th align="left">{{ item.huoDaiName }}</uni-th> @@ -27,49 +27,25 @@ </uni-table> </view> <combined-title title="鎻愮叅鍗曡鎯�"></combined-title> - <view class="compDetails" v-for="(item, index) in orderPlanDetail.yyDailyList" :key="index"> - <uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁"> - <uni-tr> - <uni-th align="left">鎻愮叅鍗曠紪鍙�</uni-th> - <uni-td align="left">{{ item.code || '' }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">鎻愮叅鍗曠姸鎬�</uni-th> - <uni-td align="left">{{ coalStatus[item.status] }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">杞︾墝鍙�</uni-th> - <uni-td align="left">{{ item.carNo || '' }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">鍏ュ満鏃堕棿</uni-th> - <uni-td align="left">{{ item.inTime || '' }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">鍑哄満鏃堕棿</uni-th> - <uni-td align="left">{{ item.outTime || '' }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">鐨噸</uni-th> - <uni-td align="left">{{ item.skin || 0 }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">姣涢噸</uni-th> - <uni-td align="left">{{ item.hair || 0 }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">鍑�閲�</uni-th> - <uni-td align="left">{{ item.clean || 0 }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">璁㈠崟缂栧彿</uni-th> - <uni-td align="left">{{ orderCode || '' }}</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">璁㈠崟鍓╀綑閲�</uni-th> - <uni-td align="left">{{ item.allowance || 0 }}</uni-td> - </uni-tr> - </uni-table> + <view class="empty-pointer" v-if="!yyDailyList">鏆傛棤鏇村鏁版嵁</view> + <view class="compDetails card" v-for="(item, index) in yyDailyList" :key="index"> + <view class="coal-status"> + <view class="label-title">鎻愮叅鍗曠姸鎬�</view> + <view class="label-value">{{ coalStatus[item.status] }}</view> + </view> + <view class="coal-clean"> + <view class="label-title">鍑�閲�</view> + <view class="label-value">{{ item.clean || 0 }}</view> + </view> + <view class="coal-carNo"> + <view class="label-title">杞︾墝鍙�</view> + <view class="label-value">{{ item.carNo || '' }}</view> + </view> + <view class="coal-allowance"> + <view class="label-title">浣欓噺</view> + <view class="label-value">{{ item.allowance || 0 }}</view> + </view> + <view class="more-button"><u-button type="success" text="鏇村" @click="showMore(index)"></u-button></view> </view> </view> </view> @@ -82,24 +58,31 @@ combinedTitle }, onLoad(value) { - console.log('椤甸潰鍔犺浇', value); - if (value.orderPlanId && value.code) { - this.orderPlanId = value.orderPlanId; - this.orderCode = value.code; - } + this.orderPlanId = value.orderPlanId; + this.orderCode = value.code; + this.cars2 = value.cars2; + console.log(value, '鍙戣繍璁″垝鍙傛暟'); }, data() { return { orderPlanId: null, orderCode: null, orderPlanDetail: {}, - coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅鍦�', '鍑虹叅浠�'] + coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅鍦�', '鍑虹叅浠�'], + yyDailyList: [], + // 棰嗗彇鏁伴噺 + cars2: '' }; }, onShow() { this.init(); }, methods: { + showMore(index) { + uni.navigateTo({ + url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore?orderPlanId=${this.orderPlanId}&index=${index}` + }); + }, init() { this.GetOrderPlanDetail(); }, @@ -111,6 +94,7 @@ this.$reqGet('xiangqingList', { orderPlanId: this.orderPlanId }).then(res => { if (res.code == 0) { this.orderPlanDetail = res.data; + this.yyDailyList = res.data.yyDailyList; uni.hideLoading(); } }); @@ -120,9 +104,16 @@ </script> <style lang="scss" scoped> +.empty-pointer { + position: absolute; + top: 50%; + left: 38%; + color: #909399; +} ::v-deep.fayunPlan { width: 100%; margin: 0 auto; + background-color: #f4f4f4; display: flex; flex-direction: column; .fayunPlanBody { @@ -143,6 +134,41 @@ background-color: #f5f5f5; } } + .card { + width: 94%; + height: vww(150); + margin: vww(24) auto 0 auto; + background-color: #fff; + border-radius: 4px; + box-shadow: 0 2px 12px 0 #ebeef5; + position: relative; + display: flex; + justify-content: center; + align-items: flex-start; + .coal-status, + .coal-clean, + .coal-allowance, + .coal-carNo { + width: 50%; + margin-top: vww(30); + height: vww(50); + text-align: center; + .label-title { + color: #909399; + } + .label-value { + margin-top: vww(10); + color: #606266; + } + } + .more-button { + width: vww(60); + position: absolute; + top: vww(100); + display: flex; + justify-content: center; + } + } // 琛ㄦ牸鏍峰紡 .uni-table { .uni-table-tr { -- Gitblit v1.9.1