From 07b5244ba8572922728f2663883915861554e7e0 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期日, 02 七月 2023 17:30:54 +0800 Subject: [PATCH] 验质逻辑修改 --- pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue | 292 ++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 180 insertions(+), 112 deletions(-) diff --git a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue index bd64aac..cb10d83 100644 --- a/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue +++ b/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanMore/fayunPlanMore.vue @@ -11,7 +11,7 @@ <view class="body-container"> <view class="container-block"> <view class="">鎻愮叅鍗曠姸鎬�</view> - <view class="">{{ coalStatus[yyDailyList.status] }}</view> + <view class="">{{ coalStatus[yyDailyList.statusWeigh]||'' }}</view> </view> </view> <view class="body-container"> @@ -57,24 +57,36 @@ </view> </view> </view> - <view class="origin-info" v-if="yyDailyList.orderType == '澶栬喘' || yyDailyList.orderType == '鍐呰喘' || yyDailyList.orderType == '杞嚭'"> - <combined-title title="鍘熷彂淇℃伅"></combined-title> - <view class="body-container"> - <view class="container-block"> - <view class="">鐨噸</view> - <view class="">{{ yyDailyList.skinTwo || 0 }}</view> - </view> - </view> - <view class="body-container"> - <view class="container-block"> - <view class="">姣涢噸</view> - <view class="">{{ yyDailyList.hairTwo || 0 }}</view> - </view> - </view> - <view class="body-container"> - <view class="container-block"> - <view class="">鍑�閲�</view> - <view class="">{{ yyDailyList.cleanTwo || 0 }}</view> + <view class="weigh-history" + v-if="showWeigh.length!==0"> + <view class="block-main"> + <view class="weigh-item" + v-for='item in showWeigh' + :key="item.id"> + <view class="weigh-time"> + <u-tag :text="item.createTime.slice(-8,-3)" + plain></u-tag> + </view> + <view class="item-block"> + <view class="item"> + <view class="concrete" + :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/skin.png)`, backgroundSize: 'cover', backgroundRepeat: 'no-repeat' }"> + 鐨�</view> + <view class="num">{{ item.skin }}</view> + </view> + <view class="item"> + <view class="concrete" + :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/hair.png)`, backgroundSize: 'cover', backgroundRepeat: 'no-repeat' }"> + 姣�</view> + <view class="num">{{ item.hair }}</view> + </view> + <view class="item"> + <view class="concrete" + :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/clean.png)`, backgroundSize: 'cover', backgroundRepeat: 'no-repeat' }"> + 鍑�</view> + <view class="num">{{ item.clean }}</view> + </view> + </view> </view> </view> </view> @@ -83,106 +95,162 @@ </template> <script> -import combinedTitle from '@/components/combined-title/combined-title.vue'; - -export default { - components: { - combinedTitle - }, - onLoad(params) { - this.id = params.id; - }, - onShow() { - this.GetOrderPlanDetail(); - }, - data() { - return { - id: '', - yyDailyList: {}, - orderPlanDetail: {}, - coalStatus: ['棰嗗彇', '棰勭害', '绛惧埌', '鍏ュ満', '绉扮毊', '绉版瘺', '绂诲満', '鍏ョ鎴�', '鍑虹鎴�', '鍏ョ叅浠�', '鍑虹叅浠�', '鏀剧┖', '浣滃簾', '鍏ュ満鐢宠', '杩涘叆鍦洪櫌'], - index: '' - }; - }, - methods: { - GetOrderPlanDetail() { - uni.showLoading({ - title: '鍔犺浇涓�...' - }); - this.$reqGet('getTakeCoal', { takeCoalId: this.id }).then(res => { - if (res.code == 0) { - this.orderPlanDetail = res.data; - this.yyDailyList = res.data; - console.log(this.yyDailyList); - uni.hideLoading(); - } else { - this.$u.toast('鍔犺浇澶辫触'); - } - }); + import combinedTitle from '@/components/combined-title/combined-title.vue'; + import { onlineurl } from '@/api/request.js' + export default { + components: { + combinedTitle + }, + onLoad(params) { + this.id = params.id; + }, + onShow() { + this.GetOrderPlanDetail(); + }, + data() { + return { + id: '', + yyDailyList: {}, + orderPlanDetail: {}, + coalStatus: ['鏈О閲�', '绉伴噸涓�', '楠岃川涓�', '绉伴噸瀹屾垚', '楠岃川瀹屾垚'], + index: '', + onlineurl, + }; + }, + computed: { + // 灞曠ず鐨瘺鍑� + showWeigh() { + return this.orderPlanDetail.tmTaskCoalItems ? this.orderPlanDetail.tmTaskCoalItems : [] + } + }, + methods: { + GetOrderPlanDetail() { + uni.showLoading({ + title: '鍔犺浇涓�...' + }); + this.$reqGet('getTakeCoal', { takeCoalId: this.id }).then(res => { + if (res.code == 0) { + this.orderPlanDetail = res.data; + this.yyDailyList = res.data; + uni.hideLoading(); + } else { + this.$u.toast('鍔犺浇澶辫触'); + } + }); + } } - } -}; + }; </script> -<style scoped lang="scss"> -@mixin flex { - display: flex; - justify-content: space-between; - align-items: center; -} -.main { - width: 100%; - margin-top: vww(10); - color: #303030; - @include flex; - flex-direction: column; - .main-body { - width: 690rpx; - height: 1062rpx; - background: #ffffff; - box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12); - border-radius: 20rpx; - @include flex flex-direction: column; - align-items: flex-start; - .body-container { - color: #303030; - width: 100%; - height: vww(56); - border-bottom: vww(1) solid #d6d6d6; - @include flex; - justify-content: center; - .container-block { - width: 96%; - height: vww(56); - @include flex; - } - } - .last { - border-bottom: none; - } +<style scoped + lang="scss"> + @mixin flex { + display: flex; + justify-content: space-between; + align-items: center; } - .origin-info { - width: 690rpx; - min-height: 300rpx; - margin-top: 20rpx; - margin-bottom: 20rpx; - background: #ffffff; - box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12); - border-radius: 20rpx; + + .main { + width: 100%; + margin-top: vww(10); + color: #303030; @include flex; flex-direction: column; - align-items: flex-start; - .body-container { - width: 100%; - height: vww(56); - border-bottom: vww(1) solid #d6d6d6; - @include flex; - justify-content: center; - .container-block { - width: 94%; + + .main-body { + width: 690rpx; + height: 1062rpx; + background: #ffffff; + box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12); + border-radius: 20rpx; + @include flex flex-direction: column; + align-items: flex-start; + + .body-container { + color: #303030; + width: 100%; + height: vww(56); + border-bottom: vww(1) solid #d6d6d6; @include flex; + justify-content: center; + + .container-block { + width: 96%; + height: vww(56); + @include flex; + } + } + + .last { + border-bottom: none; + } + } + + .weigh-history { + width: 690rpx; + height: 100%; + min-height: 420rpx; + margin: vww(40) auto; + margin-top: 20rpx; + background: #ffffff; + box-shadow: 4rpx 6rpx 51rpx 0rpx rgba(73, 120, 240, 0.11); + border-radius: 20rpx; + position: relative; + font-size: 30rpx; + font-weight: 300; + color: #303030; + overflow: hidden; + + + .block-main { + display: grid; + grid-template-columns: auto; + grid-template-rows: repeat(auto-fit, minmax(40rpx, 1fr)); + gap: auto 5rpx; + width: 94%; + height: 100%; + min-height: 380rpx; + margin: vww(18) vww(7) vww(11) vww(17); + gap: 10rpx 20rpx; + + .weigh-item { + width: 100%; + height: vww(80); + @include flex; + flex-direction: column; + justify-content: space-around; + align-items: flex-start; + + .item-block { + width: 100%; + height: vww(36); + @include flex; + justify-content: space-around; + + .item { + min-width: vww(50); + height: vww(45); + font-size: 21rpx; + font-weight: 400; + color: #ffffff; + text-align: center; + line-height: vww(30); + @include flex; + + .concrete { + width: vww(36); + height: vww(36); + } + + .num { + font-size: 40rpx; + font-weight: 300; + color: #303030; + } + } + } + } } } } -} -</style> +</style> \ No newline at end of file -- Gitblit v1.9.1