1
This commit is contained in:
@@ -168,9 +168,7 @@
|
||||
v-model="scope.row.isRefunded"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="handleRefundedChange(scope.row)"
|
||||
active-text="是"
|
||||
inactive-text="否">
|
||||
@change="handleRefundedChange(scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -183,9 +181,7 @@
|
||||
v-model="scope.row.isRefundReceived"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="handleRefundReceivedChange(scope.row)"
|
||||
active-text="是"
|
||||
inactive-text="否">
|
||||
@change="handleRefundReceivedChange(scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -198,9 +194,7 @@
|
||||
v-model="scope.row.isRebateReceived"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
@change="handleRebateReceivedChange(scope.row)"
|
||||
active-text="是"
|
||||
inactive-text="否">
|
||||
@change="handleRebateReceivedChange(scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -518,7 +512,14 @@ export default {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listJDOrders(this.queryParams).then(res => {
|
||||
this.list = (res.rows || res.data || [])
|
||||
const list = (res.rows || res.data || [])
|
||||
// 为退款相关字段设置默认值
|
||||
this.list = list.map(item => ({
|
||||
...item,
|
||||
isRefunded: item.isRefunded != null ? item.isRefunded : 0,
|
||||
isRefundReceived: item.isRefundReceived != null ? item.isRefundReceived : 0,
|
||||
isRebateReceived: item.isRebateReceived != null ? item.isRebateReceived : 0
|
||||
}))
|
||||
this.total = res.total || 0
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
@@ -529,7 +530,15 @@ export default {
|
||||
|
||||
try {
|
||||
const res = await listJDOrders(this.queryParams)
|
||||
this.list = (res.rows || res.data || [])
|
||||
let list = (res.rows || res.data || [])
|
||||
// 为退款相关字段设置默认值
|
||||
list = list.map(item => ({
|
||||
...item,
|
||||
isRefunded: item.isRefunded != null ? item.isRefunded : 0,
|
||||
isRefundReceived: item.isRefundReceived != null ? item.isRefundReceived : 0,
|
||||
isRebateReceived: item.isRebateReceived != null ? item.isRebateReceived : 0
|
||||
}))
|
||||
this.list = list
|
||||
this.total = res.total || 0
|
||||
|
||||
// 如果今天的数据为空,且是默认查询(没有手动选择日期),则尝试查询昨天
|
||||
@@ -548,7 +557,15 @@ export default {
|
||||
|
||||
// 查询昨天的数据
|
||||
const yesterdayRes = await listJDOrders(this.queryParams)
|
||||
this.list = (yesterdayRes.rows || yesterdayRes.data || [])
|
||||
let yesterdayList = (yesterdayRes.rows || yesterdayRes.data || [])
|
||||
// 为退款相关字段设置默认值
|
||||
yesterdayList = yesterdayList.map(item => ({
|
||||
...item,
|
||||
isRefunded: item.isRefunded != null ? item.isRefunded : 0,
|
||||
isRefundReceived: item.isRefundReceived != null ? item.isRefundReceived : 0,
|
||||
isRebateReceived: item.isRebateReceived != null ? item.isRebateReceived : 0
|
||||
}))
|
||||
this.list = yesterdayList
|
||||
this.total = yesterdayRes.total || 0
|
||||
|
||||
if (this.list.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user