This commit is contained in:
X1627315083
2024-03-15 17:23:25 +08:00
parent 3cdbd9e179
commit 5f9fe870c7
9 changed files with 289 additions and 177 deletions

View File

@@ -1,39 +1,38 @@
<template>
<div class="allOrder_page">
<div class="allOrder_table_search">
<!-- <a-range-picker
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker> -->
<!-- <div class="content_search_block">
<input
class="search_input"
:placeholder="
$t('HistoryPage.inputContent1')
"
v-model="searchCollectionName"
@keydown.enter="searchAllOrderList()"
/>
<div
class="search_icon_block"
@click="searchAllOrderList()"
<div class="allOrder_state">
<div class="allOrder_state_item">
<span>Time:</span>
<a-range-picker
class="range_picker"
v-model:value="rangePickerValue"
:placeholder="[
$t('HistoryPage.StartDate'),
$t('HistoryPage.EndDate'),
]"
valueFormat="YYYY-MM-DD"
>
<span
class="icon iconfont icon-sousuo"
></span>
</div>
</div> -->
<template #suffixIcon>
<span
class="icon iconfont range_picker_icon icon-rili"
></span>
</template>
</a-range-picker>
</div>
</div>
<div class="allOrder_search">
<div
class="allOrder_search_item"
@click="searchAllOrderList()"
>
<span
class="icon iconfont icon-sousuo"
></span>
</div>
</div>
</div>
<div class="allOrder_table_content" ref="historyTable">
<a-table
@@ -130,16 +129,29 @@ export default defineComponent({
let dataList: any = ref([]);
let rangePickerValue: any = ref([]);
let collectionList: any = ref([]);
let allDataList: any = ref([]);
let userInfo: any = {};
let currentState = ref({
value:'income',
})
let state:any = ref([
{
label:'Income',
value:'income',
},
{
label:'Expend',
value:'expend',
},
])
return {
columns,
dataList,
renameData,
rangePickerValue,
collectionList,
allDataList,
userInfo,
currentState,
state,
};
},
data() {
@@ -154,6 +166,7 @@ export default defineComponent({
mounted() {
let historyTable: any = this.$refs.historyTable;
this.historyTableHeight = historyTable.clientHeight - 130;
this.getAllOrderList()
},
methods: {
init(){
@@ -163,12 +176,9 @@ export default defineComponent({
},
//改变页码
changePage(e: any) {
this.currentPage = e.current;
this.pageSize = e.pageSize;
this.collectionList = this.allDataList.slice(
(this.currentPage - 1) * this.pageSize,
(this.currentPage - 1) * this.pageSize + this.pageSize
);
this.currentPage = e.current
this.pageSize = e.pageSize
this.getAllOrderList();
},
//查询列表
searchAllOrderList() {
@@ -177,21 +187,34 @@ export default defineComponent({
},
//获取列表
getAllOrderList() {
let startDate: any = this.rangePickerValue
? new Date(this.rangePickerValue[0]).getTime()
let startTime = '00:00:00'
let endTime = '00:00:00'
let startDate: any = this.rangePickerValue[0]
? this.rangePickerValue[0]+' '+startTime
: "";
let endDate: any = this.rangePickerValue
? new Date(this.rangePickerValue[1]).getTime()
let endDate: any = this.rangePickerValue[1]
? this.rangePickerValue[1]+' '+endTime
: "";
Https.axiosGet(Https.httpUrls.orderInfoList).then((rv: any) => {
let data = {
endTime: endDate,
isIncome: this.currentState.value == 'income'?true:false,
page:this.currentPage,
size:this.pageSize,
startTime: startDate
}
console.log(data);
// getCreditsDetail
// orderInfoList
Https.axiosPost(Https.httpUrls.orderInfoList,data).then((rv: any) => {
this.total = rv.length;
this.allDataList = rv
this.collectionList = this.allDataList.slice(
(this.currentPage - 1) * this.pageSize,
(this.currentPage - 1) * this.pageSize + this.pageSize
);
this.collectionList = rv
if(this.currentPage > 1 && rv.content.length == 0){
this.currentPage = 1
this.getAllOrderList()
}else{
this.collectionList = rv.content
this.total = rv.total
}
});
},
@@ -213,9 +236,11 @@ export default defineComponent({
padding: 2rem 3.5rem 5rem 2.8rem;
background: #fff;
display: flex;
justify-content: space-between;
justify-content: flex-start;
align-items: center;
.allOrder_search{
width: 40%;
width: 20%;
.allOrder_search_item{
background: #343579;
border-color: #343579;
@@ -230,22 +255,39 @@ export default defineComponent({
}
.allOrder_state {
position: relative;
display: flex;
align-items: center;
cursor: pointer;
width: 60%;
width: 80%;
.allOrder_state_item{
margin-right: 2rem;
margin-bottom: 2rem;
display: flex;
align-items: center;
margin-right: 5rem;
>span{
font-size: 1.6rem;
font-size: 2rem;
font-weight: 400;
color: #030303;
margin-right: 15px;
flex-shrink: 0;
display: block;
min-width: 13rem;
text-align: right;
min-width: 5rem;
text-align: left;
}
.ant-picker-range{
height: 5rem;
}
.ant-select-lg{
font-size: 14px;
.ant-select-selector{
height: 5rem;
.ant-select-selection-item{
line-height: 5rem;
}
input{
line-height: 5rem;
height: 5rem;
}
}
}
}
.allOrder_current{