跟单
This commit is contained in:
parent
4e57ca1432
commit
b3c141c677
@ -16,7 +16,7 @@
|
|||||||
const specialPro = ref([] as any[])
|
const specialPro = ref([] as any[])
|
||||||
const list = ref([] as any[])
|
const list = ref([] as any[])
|
||||||
const special = ref('' as any)
|
const special = ref('' as any)
|
||||||
const getLog = ref([] as any[])
|
const trackingLog = ref([] as any[])
|
||||||
const form = ref({ czrq: formatDate(new Date()), yjxybrq: formatDate(new Date()) } as any)
|
const form = ref({ czrq: formatDate(new Date()), yjxybrq: formatDate(new Date()) } as any)
|
||||||
|
|
||||||
onLoad(async (option : any) => {
|
onLoad(async (option : any) => {
|
||||||
@ -58,26 +58,26 @@
|
|||||||
specialPro.value = res.data
|
specialPro.value = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getAction('/tracking/getLog?id=' + itemList.value.subId).then((res : any) => {
|
getAction('/tracking/getLog?id=' + itemList.value.id).then((res : any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
let index=false
|
trackingLog.value=res.data
|
||||||
processes.value.processes.forEach((m : any) => {
|
processes.value.processes.forEach((m : any) => {
|
||||||
if (!m.id||!index) {
|
if (!m.id) {
|
||||||
let a = res.data.find((l : any) => l.details.zt == m.name)
|
let a = res.data.find((l : any) => l.details.zt == m.name)
|
||||||
if (a) {
|
if (a) {
|
||||||
m.rq = a.details.form.czrq
|
m.rq = a.details.form.czrq
|
||||||
|
res.data=res.data.concat(a.details.trackingLog)
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
index=true
|
})
|
||||||
let a = res.data.find((l : any) => l.details.zt == m.name && l.trackingLogId == itemList.value.id)
|
processes.value.processes.forEach((m : any) => {
|
||||||
if (a) {
|
let a = res.data.find((l : any) => l.details.zt == m.name)
|
||||||
m.rq = a.details.form.czrq
|
if (a) {
|
||||||
}
|
m.rq = a.details.form.czrq
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(processes.value);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to parse item JSON:', error);
|
console.error('Failed to parse item JSON:', error);
|
||||||
// 可以选择在这里显示错误消息给用户
|
// 可以选择在这里显示错误消息给用户
|
||||||
@ -262,6 +262,7 @@
|
|||||||
trackingLogId: itemList.value.id,
|
trackingLogId: itemList.value.id,
|
||||||
subId: itemList.value.subId,
|
subId: itemList.value.subId,
|
||||||
details: {
|
details: {
|
||||||
|
trackingLog:trackingLog.value,
|
||||||
zt: special.value,
|
zt: special.value,
|
||||||
list: list.value,
|
list: list.value,
|
||||||
form: form.value,
|
form: form.value,
|
||||||
|
@ -38,20 +38,21 @@
|
|||||||
} else {
|
} else {
|
||||||
processes.value = JSON.parse(itemList.value.processes)
|
processes.value = JSON.parse(itemList.value.processes)
|
||||||
}
|
}
|
||||||
getAction('/tracking/getLog?id='+itemList.value.subId).then((res:any)=>{
|
getAction('/tracking/getLog?id='+itemList.value.id).then((res:any)=>{
|
||||||
if(res.code===200){
|
if(res.code===200){
|
||||||
let index=''
|
|
||||||
processes.value.processes.forEach((m : any) => {
|
processes.value.processes.forEach((m : any) => {
|
||||||
if (!m.id) {
|
if (!m.id) {
|
||||||
let a = res.data.find((l : any) => l.details.zt == m.name)
|
let a = res.data.find((l : any) => l.details.zt == m.name)
|
||||||
if (a) {
|
if (a) {
|
||||||
m.rq = a.details.form.czrq
|
m.rq = a.details.form.czrq
|
||||||
|
res.data=res.data.concat(a.details.trackingLog)
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
let a = res.data.find((l : any) => l.details.zt == m.name && l.trackingLogId == itemList.value.id)
|
})
|
||||||
if (a) {
|
processes.value.processes.forEach((m : any) => {
|
||||||
m.rq = a.details.form.czrq
|
let a = res.data.find((l : any) => l.details.zt == m.name && l.trackingLogId == itemList.value.id)
|
||||||
}
|
if (a) {
|
||||||
|
m.rq = a.details.form.czrq
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let b=res.data.find((l:any)=>l.trackingLogId==itemList.value.id&&l.details.zt==='待出厂')
|
let b=res.data.find((l:any)=>l.trackingLogId==itemList.value.id&&l.details.zt==='待出厂')
|
||||||
|
Loading…
Reference in New Issue
Block a user