1
This commit is contained in:
@@ -162,8 +162,15 @@
|
|||||||
<el-table-column label="完成时间" prop="finishTime" width="160">
|
<el-table-column label="完成时间" prop="finishTime" width="160">
|
||||||
<template slot-scope="scope">{{ parseTime(scope.row.finishTime) }}</template>
|
<template slot-scope="scope">{{ parseTime(scope.row.finishTime) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="180">
|
<el-table-column label="操作" fixed="right" width="220">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
@click="copyReturnInfo(scope.row)"
|
||||||
|
>
|
||||||
|
退货复制
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -520,6 +527,7 @@ export default {
|
|||||||
return this.queryParams.beginTime === todayStr && this.queryParams.endTime === todayStr
|
return this.queryParams.beginTime === todayStr && this.queryParams.endTime === todayStr
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
this.prepareQueryParams()
|
||||||
this.queryParams.pageNum = 1
|
this.queryParams.pageNum = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
@@ -586,6 +594,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
this.prepareQueryParams()
|
||||||
this.download('/system/jdorder/export', this.queryParams, `京东订单数据_${new Date().getTime()}.xlsx`)
|
this.download('/system/jdorder/export', this.queryParams, `京东订单数据_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
/** 复制到剪贴板 */
|
/** 复制到剪贴板 */
|
||||||
@@ -912,6 +921,47 @@ export default {
|
|||||||
/** H-TF订单自动写入配置更新后的回调 */
|
/** H-TF订单自动写入配置更新后的回调 */
|
||||||
handleAutoConfigUpdated() {
|
handleAutoConfigUpdated() {
|
||||||
this.$message.success('H-TF订单自动写入配置已更新')
|
this.$message.success('H-TF订单自动写入配置已更新')
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 准备查询参数:去除空格并在关键词搜索时清空日期 */
|
||||||
|
prepareQueryParams() {
|
||||||
|
const textKeys = ['remark', 'distributionMark', 'modelNumber', 'link', 'orderId', 'thirdPartyOrderNo', 'buyer', 'address', 'status']
|
||||||
|
let hasKeyword = false
|
||||||
|
|
||||||
|
textKeys.forEach(key => {
|
||||||
|
const value = this.queryParams[key]
|
||||||
|
if (typeof value === 'string') {
|
||||||
|
const trimmed = value.trim()
|
||||||
|
if (trimmed) {
|
||||||
|
this.queryParams[key] = trimmed
|
||||||
|
hasKeyword = true
|
||||||
|
} else {
|
||||||
|
this.queryParams[key] = undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (hasKeyword) {
|
||||||
|
this.dateRange = []
|
||||||
|
this.queryParams.beginTime = null
|
||||||
|
this.queryParams.endTime = null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 退货复制 */
|
||||||
|
copyReturnInfo(row) {
|
||||||
|
const parts = [
|
||||||
|
row.remark,
|
||||||
|
row.orderId,
|
||||||
|
row.modelNumber,
|
||||||
|
row.thirdPartyOrderNo,
|
||||||
|
row.distributionMark,
|
||||||
|
row.address,
|
||||||
|
row.buyer
|
||||||
|
].map(item => (item == null ? '' : String(item).trim()))
|
||||||
|
|
||||||
|
const text = parts.join('\n')
|
||||||
|
this.copyToClipboard(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user