交班记录新增sort字段

This commit is contained in:
gyq 2024-08-03 16:55:20 +08:00
parent b495926968
commit 671159277c
1 changed files with 4 additions and 3 deletions

View File

@ -73,7 +73,8 @@ export default {
query: {
createdAt: [],
proName: '',
cateId: ''
cateId: '',
sort: 'id,desc'
},
tableData: {
data: [],
@ -129,9 +130,9 @@ export default {
try {
let urlData = null
if (this.query.createdAt.length == 0) { // key -- 2024.7.30 15:50
urlData = `/api/tbHandover?page=${this.tableData.page + 1}&size=${this.tableData.size}&shopId=${localStorage.getItem("shopId")}`
urlData = `/api/tbHandover?page=${this.tableData.page + 1}&size=${this.tableData.size}&shopId=${localStorage.getItem("shopId")}&sort=${this.query.sort}`
} else {
urlData = `/api/tbHandover?page=${this.tableData.page + 1}&size=${this.tableData.size}&shopId=${localStorage.getItem("shopId")}&tradeDay=${this.query.createdAt[0] ? this.query.createdAt[0] : ''}&tradeDay=${this.query.createdAt[1] ? this.query.createdAt[1] : ''}`
urlData = `/api/tbHandover?page=${this.tableData.page + 1}&size=${this.tableData.size}&shopId=${localStorage.getItem("shopId")}&tradeDay=${this.query.createdAt[0] ? this.query.createdAt[0] : ''}&tradeDay=${this.query.createdAt[1] ? this.query.createdAt[1] : ''}&sort=${this.query.sort}`
}
const res = await tbHandoverGet(urlData);
this.tableData.loading = false;