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