This commit is contained in:
2023-10-13 10:41:12 +08:00
parent e81318100e
commit df63ebc37d
2 changed files with 43 additions and 3 deletions

View File

@@ -21,7 +21,7 @@
<td>{{e.task_no}}</td>
<td>{{e.start_devicecode}}</td>
<td>{{e.next_devicecode}}</td>
<td>{{e.inst_status}}</td>
<td>{{e.inst_status_name}}</td>
<td>{{e.priority}}</td>
<td>{{e.create_time}}</td>
<td>{{e.carrier}}</td>
@@ -64,6 +64,17 @@
async _tasks () {
let res = await tasks(this.keyword, this.startPoint, this.endPoint)
if (res.code === '1') {
res.result.map(el => {
if(el.inst_status === '0') {
this.$set(el, 'inst_status_name', '就绪')
}
if(el.inst_status === '1') {
this.$set(el, 'inst_status_name', '执行中')
}
if(el.inst_status === '2') {
this.$set(el, 'inst_status_name', '完成')
}
})
this.dataList = [...res.result]
} else {
uni.showToast({

View File

@@ -25,8 +25,8 @@
<td>{{e.inst_no}}</td>
<td>{{e.start_devicecode}}</td>
<td>{{e.next_devicecode}}</td>
<td>{{e.inst_status}}</td>
<td>{{e.inst_step}}</td>
<td>{{e.inst_status_name}}</td>
<td>{{e.inst_step_name}}</td>
<td>{{e.carrier}}</td>
<td>{{e.priority}}</td>
<td>{{e.create_time}}</td>
@@ -71,6 +71,35 @@
async _insts () {
let res = await insts(this.keyword, this.startPoint, this.endPoint)
if (res.code === '1') {
res.result.map(el => {
if(el.inst_status === '0') {
this.$set(el, 'inst_status_name', '就绪')
}
if(el.inst_status === '1') {
this.$set(el, 'inst_status_name', '执行中')
}
if(el.inst_status === '2') {
this.$set(el, 'inst_status_name', '完成')
}
if(el.inst_status === '3') {
this.$set(el, 'inst_status_name', '取消')
}
if(el.inst_status === '4') {
this.$set(el, 'inst_status_name', '异常')
}
if(el.inst_step === '1') {
this.$set(el, 'inst_step_name', '请求取货')
}
if(el.inst_step === '2') {
this.$set(el, 'inst_step_name', '取货完成')
}
if(el.inst_step === '3') {
this.$set(el, 'inst_step_name', '请求放货')
}
if(el.inst_step === '4') {
this.$set(el, 'inst_step_name', '放货完成')
}
})
this.dataList = [...res.result]
} else {
uni.showToast({