优化问题

This commit is contained in:
duan
2024-06-27 17:55:33 +08:00
parent ad74689313
commit 939702e998
10 changed files with 97 additions and 25 deletions

View File

@@ -3,7 +3,7 @@
<div class="head-container">
<div class="filter_wrap">
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" @change="getTableData">
end-placeholder="结束日期" value-format="yyyy-MM-dd" @change="getTableData">
</el-date-picker>
<el-button type="primary" @click="getTableData">查询</el-button>
<el-button @click="resetHandle">重置</el-button>
@@ -81,12 +81,19 @@ export default {
methods: {
async getTableData() {
this.tableData.loading = true
let arr = []
console.log(this.query,'tiaoshi1')
if (this.query.createdAt.length) {
arr = [this.query.createdAt[0] + ' 00:00:00', this.query.createdAt[1] + ' 23:59:59']
} else {
arr = []
}
try {
const res = await tbProductStockOperateList({
page: this.tableData.page,
size: this.tableData.size,
shopId: localStorage.getItem('shopId'),
createdAt: this.query.createdAt
createdAt: arr
})
this.tableData.loading = false
this.tableData.list = res.content