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