diff --git a/pages-warehouse/home/home.vue b/pages-warehouse/home/home.vue index e62fe7d..a144a84 100644 --- a/pages-warehouse/home/home.vue +++ b/pages-warehouse/home/home.vue @@ -198,7 +198,7 @@ export default { /** * 配件单查询 */ - getTicketWares(){ + async getTicketWares(){ request({ url: '/admin-api/repair/tw/page', method: 'get', @@ -206,17 +206,21 @@ export default { }).then((res)=>{ console.log(res,187) if (res.code == 200){ - this.ticketWares = res.rows + res.rows.map((item) => { + getDictTextByCodeAndValue("ticket_wares_status",item.status).then(value => { + item.statusStr = value + }).catch(error => { + item.statusStr = "未知" + console.error(error); + }); + item.createTimeStr = formatDate(item.createTime) + }) this.total = res.total if (this.pageNo != 1) { this.ticketWares = this.ticketWares.concat(res.rows) } else { this.ticketWares = res.rows } - this.ticketWares.map((item) => { - item.statusStr = getDictTextByCodeAndValue('ticket_wares_status', item.status) - item.createTimeStr = formatDate(item.createTime) - }) this.isTriggered = false } })