新增订单打印状态

This commit is contained in:
gyq
2025-12-29 17:35:29 +08:00
parent 2325b89093
commit d96009bf6f
2 changed files with 25 additions and 3 deletions

View File

@@ -14,14 +14,22 @@ const contentConfig: IContentConfig = {
pageSize: 10,
pageSizes: [10, 20, 30, 50],
},
indexAction: function (params) {
async indexAction(params) {
console.log(params);
if (params.createAt) {
params.startTime = params.createAt[0];
params.endTime = params.createAt[1];
delete params.createAt;
}
return OrderApi.getList(params);
const res = await OrderApi.getList(params)
console.log('OrderApi.getList', res);
res.records.map(item => {
item.payLoading = false
item.printStatus = JSON.parse(item.printStatus || '[]')
})
return res;
},
indexActionData: {},
// deleteAction: OrderApi.delete,
@@ -93,7 +101,14 @@ const contentConfig: IContentConfig = {
templet: "custom",
slotName: "options",
},
{
label: "打印状态",
align: "center",
prop: "printStatus",
width: 120,
templet: "custom",
slotName: "printStatus",
},
{
label: "状态",
align: "center",

View File

@@ -51,6 +51,13 @@
</div>
</template>
<!-- 打印状态 -->
<template #printStatus="scope">
<span v-if="scope.row.printStatus.length > 0" style="color: var(--el-color-danger)">
打印失败{{scope.row.printStatus.map(item => item.name).join('、')}}
</span>
</template>
<template #options="scope">
{{ returnOptionsLabel(scope.prop, scope.row[scope.prop]) }}
</template>