This commit is contained in:
PQZ 2024-10-22 18:40:08 +08:00
parent cd830ea98d
commit cce35c630f

View File

@ -198,7 +198,7 @@ export default {
/** /**
* 配件单查询 * 配件单查询
*/ */
getTicketWares(){ async getTicketWares(){
request({ request({
url: '/admin-api/repair/tw/page', url: '/admin-api/repair/tw/page',
method: 'get', method: 'get',
@ -206,17 +206,21 @@ export default {
}).then((res)=>{ }).then((res)=>{
console.log(res,187) console.log(res,187)
if (res.code == 200){ 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 this.total = res.total
if (this.pageNo != 1) { if (this.pageNo != 1) {
this.ticketWares = this.ticketWares.concat(res.rows) this.ticketWares = this.ticketWares.concat(res.rows)
} else { } else {
this.ticketWares = res.rows this.ticketWares = res.rows
} }
this.ticketWares.map((item) => {
item.statusStr = getDictTextByCodeAndValue('ticket_wares_status', item.status)
item.createTimeStr = formatDate(item.createTime)
})
this.isTriggered = false this.isTriggered = false
} }
}) })