From bb52e0d4baffe8e0486c951e525b6614bd4aaa28 Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期一, 24 四月 2023 14:08:56 +0800
Subject: [PATCH] 修改样式,修复已知bug
---
pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue | 362 +++++++++++++++++++++++++++------------------------
1 files changed, 191 insertions(+), 171 deletions(-)
diff --git a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
index 1da3993..b8dd609 100644
--- a/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
+++ b/pages/customer-page/customer-my/faYunstatistics/faYunstatistics.vue
@@ -8,158 +8,124 @@
</view>
</view>
<view class="collapse-main">
- <u-collapse>
- <u-collapse-item :title="dateRange" value="绛涢��">
- <view class="filter-main">
- <view class="filter-body">
- <view class="condition-name">鐓ょ锛�</view>
- <view class="filter-name">
- <view class="filter-button" v-for="(item, index) in coalList" :key="index" @click="filterCondition(0, index, item.condition)">
- <u-button shape="circle" :text="item.condition" :type="item.active ? 'success' : ''" size="small" v-if="index < coalShow"></u-button>
- </view>
- <view class="toggle-button">
- <u-button
- shape="circle"
- :text="coalShow < coalTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
- type="primary"
- size="small"
- @click="toggle(0)"
- v-if="coalTotal > 3"
- ></u-button>
- </view>
- </view>
- </view>
- <view class="filter-body">
- <view class="condition-name">绫诲瀷锛�</view>
- <view class="filter-name">
- <view class="filter-button" v-for="(item, index) in typeList" :key="index" @click="filterCondition(1, index, item.condition)">
- <u-button shape="circle" :text="item.condition" :type="item.active ? 'success' : ''" size="small"></u-button>
- </view>
- <view class="toggle-button">
- <u-button
- shape="circle"
- :text="typeShow < typeTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
- type="primary"
- size="small"
- @click="toggle(1)"
- v-if="typeTotal > 3"
- ></u-button>
- </view>
- </view>
- </view>
- <view class="filter-body">
- <view class="condition-name">瀹㈡埛锛�</view>
- <view class="filter-name">
- <view class="filter-button" v-for="(item, index) in customerList" :key="index" @click="filterCondition(2, index, item.condition)">
- <u-button shape="circle" :text="item.condition" :type="item.active ? 'success' : ''" size="small"></u-button>
- </view>
- <view class="toggle-button">
- <u-button
- shape="circle"
- :text="customerShow < customerTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
- type="primary"
- size="small"
- @click="toggle(2)"
- v-if="customerTotal > 3"
- ></u-button>
- </view>
- </view>
- </view>
- <view class="filter-body" v-if="roleType == 1">
- <view class="condition-name">璐т唬锛�</view>
- <view class="filter-name">
- <view class="filter-button" v-for="(item, index) in forwarderList" :key="index" @click="filterCondition(3, index, item.condition)">
- <u-button shape="circle" :text="item.condition" :type="item.active ? 'success' : ''" size="small"></u-button>
- </view>
- <view class="toggle-button">
- <u-button
- shape="circle"
- :text="forwarderShow < forwarderTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
- type="primary"
- size="small"
- @click="toggle(3)"
- v-if="forwarderTotal > 3"
- ></u-button>
- </view>
- </view>
- </view>
- <view class="filter-body" v-if="roleType != 3">
- <view class="condition-name">杞﹂槦锛�</view>
- <view class="filter-name">
- <view class="filter-button" v-for="(item, index) in fleetList" :key="index" @click="filterCondition(4, index, item.condition)">
- <u-button shape="circle" :text="item.condition" :type="item.active ? 'success' : ''" size="small"></u-button>
- </view>
- <view class="toggle-button">
- <u-button
- shape="circle"
- :text="fleetShow < fleetTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
- type="primary"
- size="small"
- @click="toggle(4)"
- v-if="fleetTotal > 3"
- ></u-button>
- </view>
- </view>
- </view>
- <view class="filter-body" v-if="roleType != 1">
- <view class="condition-name">鐭垮満锛�</view>
- <view class="filter-name">
- <view class="filter-button" v-for="(item, index) in filedList" :key="index" @click="filterCondition(5, index, item.condition)">
- <u-button shape="circle" :text="item.condition" :type="item.active ? 'success' : ''" size="small"></u-button>
- </view>
- <view class="toggle-button">
- <u-button
- shape="circle"
- :text="filedShow < filedTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
- type="primary"
- size="small"
- @click="toggle(5)"
- v-if="filedTotal > 3"
- ></u-button>
- </view>
- </view>
- </view>
- <view class="filter-body" v-if="roleType == 2">
- <view class="condition-name">杞︾墝鍙凤細</view>
- <view class="filter-name">
- <view class="filter-button" v-for="(item, index) in carNoList" :key="index" @click="filterCondition(6, index, item.condition)">
- <u-button shape="circle" :text="item.condition" :type="item.active ? 'success' : ''" size="small"></u-button>
- </view>
- <view class="toggle-button">
- <u-button
- shape="circle"
- :text="carNoShow < carNoTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
- type="primary"
- size="small"
- @click="toggle(6)"
- v-if="carNoTotal > 3"
- ></u-button>
- </view>
- </view>
- </view>
- <view class="filter-body">
- <view class="condition-name">鏃ユ湡锛�</view>
- <view class="filter-name">
- <u-button :text="dateselect" @click="opencalendar"></u-button>
- <view class="filter-button">
- <uni-calendar
- ref="calendar"
- class="uni-calendar--hook"
- :clear-date="true"
- :date="info.date"
- :insert="info.insert"
- :lunar="info.lunar"
- :startDate="info.startDate"
- :endDate="info.endDate"
- :range="info.range"
- @confirm="confirm"
- />
- </view>
+ <view class="filter-show">
+ <view class="filtershow-date">{{ dateRange }}</view>
+ <view class="filter-icon"><u-icon name="grid" :size="40" color="#9ec16c "></u-icon></view>
+ <view class="filtershow-text" @click="showPopup">绛涢��</view>
+ </view>
+ <u-popup :show="conditinonShow" mode="top" :closeable="true" :closeOnClickOverlay="true" @close="conditinonclose">
+ <view class="filter-main">
+ <view class="filter-body date-button">
+ <view class="condition-name">鏃ユ湡</view>
+ <view class="filter-name">
+ <u-button :text="dateselect" @click="opencalendar"></u-button>
+ <view class="filter-button ">
+ <uni-calendar
+ ref="calendar"
+ class="uni-calendar--hook"
+ :clear-date="true"
+ :date="info.date"
+ :insert="info.insert"
+ :lunar="info.lunar"
+ :startDate="info.startDate"
+ :endDate="info.endDate"
+ :range="info.range"
+ @confirm="confirm"
+ />
</view>
</view>
</view>
- </u-collapse-item>
- </u-collapse>
+ <view class="filter-body">
+ <view class="condition-name">鐓ょ</view>
+ <view class="filter-name">
+ <view class="filter-button" v-for="(item, index) in coalList" :key="index" @click="filterCondition(0, index, item.condition)">
+ <u-button :text="item.condition" :type="item.active ? 'success' : ''" size="small" v-if="index < coalShow"></u-button>
+ </view>
+ <view class="toggle-button">
+ <u-button :text="coalShow < coalTotal ? '鏌ョ湅鏇村' : '鏀惰捣'" type="primary" size="small" @click="toggle(0)" v-if="coalTotal > 3"></u-button>
+ </view>
+ </view>
+ </view>
+ <view class="filter-body">
+ <view class="condition-name">绫诲瀷</view>
+ <view class="filter-name">
+ <view class="filter-button" v-for="(item, index) in typeList" :key="index" @click="filterCondition(1, index, item.condition)">
+ <u-button :text="item.condition" :type="item.active ? 'success' : ''" size="small" v-if="index < typeShow"></u-button>
+ </view>
+ <view class="toggle-button">
+ <u-button :text="typeShow < typeTotal ? '鏌ョ湅鏇村' : '鏀惰捣'" type="primary" size="small" @click="toggle(1)" v-if="typeTotal > 3"></u-button>
+ </view>
+ </view>
+ </view>
+ <view class="filter-body">
+ <view class="condition-name">瀹㈡埛</view>
+ <view class="filter-name">
+ <view class="filter-button" v-for="(item, index) in customerList" :key="index" @click="filterCondition(2, index, item.condition)">
+ <u-button :text="item.condition" :type="item.active ? 'success' : ''" size="small" v-if="index < customerShow"></u-button>
+ </view>
+ <view class="toggle-button">
+ <u-button
+ :text="customerShow < customerTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
+ type="primary"
+ size="small"
+ @click="toggle(2)"
+ v-if="customerTotal > 3"
+ ></u-button>
+ </view>
+ </view>
+ </view>
+ <view class="filter-body" v-if="roleType == 1">
+ <view class="condition-name">璐т唬</view>
+ <view class="filter-name">
+ <view class="filter-button" v-for="(item, index) in forwarderList" :key="index" @click="filterCondition(3, index, item.condition)">
+ <u-button :text="item.condition" :type="item.active ? 'success' : ''" v-if="index < forwarderShow"></u-button>
+ </view>
+ <view class="toggle-button">
+ <u-button
+ :text="forwarderShow < forwarderTotal ? '鏌ョ湅鏇村' : '鏀惰捣'"
+ type="primary"
+ size="small"
+ @click="toggle(3)"
+ v-if="forwarderTotal > 3"
+ ></u-button>
+ </view>
+ </view>
+ </view>
+ <view class="filter-body" v-if="roleType != 3">
+ <view class="condition-name">杞﹂槦</view>
+ <view class="filter-name">
+ <view class="filter-button" v-for="(item, index) in fleetList" :key="index" @click="filterCondition(4, index, item.condition)">
+ <u-button :text="item.condition" :type="item.active ? 'success' : ''" size="small" v-if="index < fleetShow"></u-button>
+ </view>
+ <view class="toggle-button">
+ <u-button :text="fleetShow < fleetTotal ? '鏌ョ湅鏇村' : '鏀惰捣'" type="primary" size="small" @click="toggle(4)" v-if="fleetTotal > 3"></u-button>
+ </view>
+ </view>
+ </view>
+ <view class="filter-body" v-if="roleType != 1">
+ <view class="condition-name">鐭垮満</view>
+ <view class="filter-name">
+ <view class="filter-button" v-for="(item, index) in filedList" :key="index" @click="filterCondition(5, index, item.condition)">
+ <u-button :text="item.condition" :type="item.active ? 'success' : ''" size="small" v-if="index < filedShow"></u-button>
+ </view>
+ <view class="toggle-button">
+ <u-button :text="filedShow < filedTotal ? '鏌ョ湅鏇村' : '鏀惰捣'" type="primary" size="small" @click="toggle(5)" v-if="filedTotal > 3"></u-button>
+ </view>
+ </view>
+ </view>
+ <view class="filter-body" v-if="roleType == 2">
+ <view class="condition-name">杞︾墝鍙�</view>
+ <view class="filter-name">
+ <view class="filter-button" v-for="(item, index) in carNoList" :key="index" @click="filterCondition(6, index, item.condition)">
+ <u-button :text="item.condition" :type="item.active ? 'success' : ''" size="small" v-if="index < carNoShow"></u-button>
+ </view>
+ <view class="toggle-button">
+ <u-button :text="carNoShow < carNoTotal ? '鏌ョ湅鏇村' : '鏀惰捣'" type="primary" size="small" @click="toggle(6)" v-if="carNoTotal > 3"></u-button>
+ </view>
+ </view>
+ </view>
+ </view>
+ </u-popup>
</view>
<view class="date-information">
<view class="statistics-card" v-for="(item, index) in filterList" :key="index">
@@ -173,8 +139,8 @@
}}鍚�
</view>
</view>
- <view class="card-main" v-for="(value, i) in item.taskCoalList" :key="i">
- <view class="arrow-right" @click="faYunDetail(value.id)"><u-icon name="arrow-right" size="50"></u-icon></view>
+ <view class="card-main" v-for="(value, i) in item.taskCoalList" :key="i" @click="faYunDetail(value.id)">
+ <view class="arrow-right"><u-icon name="arrow-right" size="50"></u-icon></view>
<view class="main-body">
<view class="coal-name">鐓ょ:{{ value.coalName || '' }}</view>
<view class="clean">鎵ц閲�:{{ value.clean.toFixed(2) || 0 }}</view>
@@ -185,6 +151,7 @@
</view>
</view>
</view>
+ <tab-bar :current="1"></tab-bar>
</view>
</template>
@@ -213,6 +180,8 @@
filterList: [],
totalLength: 0,
totalTon: 0,
+ // 绛涢�夊脊鍑哄眰
+ conditinonShow: false,
// 瓒呰繃涓よ鑷姩闅愯棌
coalShow: 3,
typeShow: 3,
@@ -414,6 +383,7 @@
}
},
confirm(e) {
+ console.log(e, '鏃ユ湡閫夋嫨');
this.first = e.range.before;
this.last = e.range.after;
},
@@ -494,8 +464,13 @@
url: `/pages/public-page/faYunstatisticsDetails/faYunstatisticsDetails?id=${takeCoalId}`
});
},
- confirm() {
- this.modalShow = false;
+ // 鎵撳紑绛涢�夋潯浠跺脊绐�
+ showPopup() {
+ this.conditinonShow = true;
+ },
+ // 鍏抽棴绛涢�夋潯浠跺脊绐�
+ conditinonclose() {
+ this.conditinonShow = false;
}
},
computed: {
@@ -544,15 +519,14 @@
</script>
<style lang="scss" scoped>
-::v-deep .u-cell__value {
- color: #9ec16c !important;
- font-size: vww(18) !important;
+::v-deep .toggle-button .u-button {
+ width: vww(40);
}
-::v-deep .filter-name:nth-last-child(1) {
- .u-button {
- width: 66%;
- }
-}
+// ::v-deep .filter-name:nth-last-child(1) {
+// .u-button {
+// width: 66%;
+// }
+// }
.main {
width: 96%;
margin: 0 auto;
@@ -586,11 +560,54 @@
background-color: #fff;
border: 1px solid #cccccc;
border-radius: vww(5);
+ .filter-show {
+ width: 100%;
+ height: vww(40);
+ background-color: #fff;
+ border-radius: vww(5);
+ font-size: vww(18);
+ color: #333;
+ position: relative;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ .filtershow-date {
+ font-size: vww(15);
+ padding-left: vww(8);
+ }
+ .filter-icon {
+ position: absolute;
+ right: vww(45);
+ top: vww(11);
+ }
+ .filtershow-text {
+ color: #9ec16c;
+ padding-right: vww(8);
+ position: relative;
+ &::before {
+ content: '';
+ position: absolute;
+ width: 1px;
+ height: vww(22);
+ background-color: #dcdfe6;
+ right: 94px;
+ bottom: 0;
+ }
+ }
+ }
.filter-main {
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-around;
+ .date-button {
+ width: 80%;
+ height: vww(80);
+ margin: vww(5) auto;
+ .condition-name {
+ margin-bottom: vww(10);
+ }
+ }
.filter-body {
width: 100%;
position: relative;
@@ -598,31 +615,34 @@
justify-content: flex-start;
flex-wrap: wrap;
.condition-name {
+ margin-left: vww(15);
+ margin-top: vww(10);
font-size: vww(16);
+ color: #686868;
}
.filter-name {
- width: 100%;
+ width: 94%;
+ margin: 0 auto;
+ position: relative;
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
align-items: flex-start;
- position: relative;
- top: vww(-34);
.filter-button {
color: #393a3c;
height: vww(16);
padding: vww(8);
margin: vww(5) vww(5);
- &:nth-child(1) {
- margin-left: vww(48);
- }
+ margin-bottom: vww(10);
}
.toggle-button {
- margin: vww(12) auto;
- position: relative;
- left: -10%;
- transform: translateX(-50%);
+ width: 30%;
+ display: flex;
+ justify-content: center;
+ position: absolute;
+ right: vww(-21);
+ top: vww(-23);
}
}
}
--
Gitblit v1.9.1