1
This commit is contained in:
@@ -16,6 +16,9 @@
|
||||
<el-form-item label="下单人">
|
||||
<el-input v-model="queryParams.buyer" placeholder="下单人" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="地址">
|
||||
<el-input v-model="queryParams.address" placeholder="收货地址" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-input v-model="queryParams.status" placeholder="备注/状态" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
@@ -28,7 +31,7 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
range-separator="至"
|
||||
@change="handleQuery"
|
||||
@change="handleDateRangeChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -103,7 +106,10 @@ export default {
|
||||
link: undefined,
|
||||
orderId: undefined,
|
||||
buyer: undefined,
|
||||
status: undefined
|
||||
address: undefined,
|
||||
status: undefined,
|
||||
beginTime: null,
|
||||
endTime: null
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -113,12 +119,7 @@ export default {
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
const params = { ...this.queryParams }
|
||||
if (this.dateRange && this.dateRange.length === 2) {
|
||||
params.beginTime = this.dateRange[0]
|
||||
params.endTime = this.dateRange[1]
|
||||
}
|
||||
listJDOrders(params).then(res => {
|
||||
listJDOrders(this.queryParams).then(res => {
|
||||
this.list = (res.rows || res.data || [])
|
||||
this.total = res.total || 0
|
||||
this.loading = false
|
||||
@@ -130,9 +131,32 @@ export default {
|
||||
},
|
||||
resetQuery() {
|
||||
this.dateRange = []
|
||||
this.queryParams = { pageNum: 1, pageSize: 10 }
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
remark: undefined,
|
||||
distributionMark: undefined,
|
||||
modelNumber: undefined,
|
||||
link: undefined,
|
||||
orderId: undefined,
|
||||
buyer: undefined,
|
||||
address: undefined,
|
||||
status: undefined,
|
||||
beginTime: null,
|
||||
endTime: null
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
/** 日期范围变化处理 */
|
||||
handleDateRangeChange(dates) {
|
||||
if (dates && dates.length === 2) {
|
||||
this.queryParams.beginTime = dates[0]
|
||||
this.queryParams.endTime = dates[1]
|
||||
} else {
|
||||
this.queryParams.beginTime = null
|
||||
this.queryParams.endTime = null
|
||||
}
|
||||
},
|
||||
toYuan(n) {
|
||||
if (n == null || n === '') return ''
|
||||
const num = Number(n)
|
||||
@@ -141,12 +165,7 @@ export default {
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const params = { ...this.queryParams }
|
||||
if (this.dateRange && this.dateRange.length === 2) {
|
||||
params.beginTime = this.dateRange[0]
|
||||
params.endTime = this.dateRange[1]
|
||||
}
|
||||
this.download('/system/jdorder/export', params, `京东订单数据_${new Date().getTime()}.xlsx`)
|
||||
this.download('/system/jdorder/export', this.queryParams, `京东订单数据_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user