|
|
|
@ -455,7 +455,6 @@
|
|
|
|
|
res.data.stlDate = res.data.stlDate.split(' ')[0]
|
|
|
|
|
}
|
|
|
|
|
bookingDetails.value = res.data
|
|
|
|
|
console.log(bookingDetails.value)
|
|
|
|
|
// 如果是审批页面切状态是已审单弹出选择现舱非现舱
|
|
|
|
|
inPageLoading.value = false
|
|
|
|
|
})
|
|
|
|
@ -567,6 +566,18 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 获取右侧勾选中的服务项目的code,拼接成字符串传给后台
|
|
|
|
|
let serviceItem = ''
|
|
|
|
|
const seriveItems = RefrightContent.value.bookingServiceItem
|
|
|
|
|
if (seriveItems && seriveItems.length) {
|
|
|
|
|
const sitems = seriveItems.filter(item => {
|
|
|
|
|
return item.isYield == true
|
|
|
|
|
})
|
|
|
|
|
const codes = sitems.map(item => {
|
|
|
|
|
return item.projectCode
|
|
|
|
|
})
|
|
|
|
|
serviceItem = String(codes)
|
|
|
|
|
}
|
|
|
|
|
// 提交的post数据
|
|
|
|
|
const postData = {
|
|
|
|
|
...baseinfoForm,
|
|
|
|
@ -577,7 +588,10 @@
|
|
|
|
|
...customerForm,
|
|
|
|
|
...noteForm,
|
|
|
|
|
ediInfo: ediFrom,
|
|
|
|
|
ctnInfo
|
|
|
|
|
ctnInfo,
|
|
|
|
|
soRemark: ediFrom.soRemark,
|
|
|
|
|
closeDocRemark: ediFrom.closeDocRemark,
|
|
|
|
|
serviceItem
|
|
|
|
|
}
|
|
|
|
|
// 处理截港截单时间
|
|
|
|
|
if (postData.closingDate && postData.closingDate.length == 13) {
|
|
|
|
@ -998,6 +1012,7 @@
|
|
|
|
|
Withdraw(postData).then(res => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
createMessage.success('撤销成功!')
|
|
|
|
|
RefrightContent.value.getStatusServiceList(1, null)
|
|
|
|
|
}
|
|
|
|
|
init()
|
|
|
|
|
})
|
|
|
|
@ -1026,12 +1041,15 @@
|
|
|
|
|
businessType: '1',
|
|
|
|
|
taskTypeName: type || route.query.status
|
|
|
|
|
}
|
|
|
|
|
completeTask(type, true)
|
|
|
|
|
await completeTask(type, true)
|
|
|
|
|
if (type) postData['hasCabin'] = true
|
|
|
|
|
loading.value = true
|
|
|
|
|
await CreateTask(postData).then(res => {
|
|
|
|
|
CreateTask(postData).then(res => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
if (!b) createMessage.success(res.message)
|
|
|
|
|
// 关闭当前页面
|
|
|
|
|
const { fullPath } = route //获取当前路径
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
loading.value = false
|
|
|
|
|
})
|
|
|
|
@ -1181,12 +1199,16 @@
|
|
|
|
|
if (res.data) {
|
|
|
|
|
// 是最后一个审批人,若果此票是现舱,弹窗选择现舱弹窗
|
|
|
|
|
const shippingSpaceType = RefbasicInfo.value.formData.shippingSpaceType
|
|
|
|
|
if (shippingSpaceType == 'xc') {
|
|
|
|
|
if (shippingSpaceType == 'xc' && route.query.status == 'WAIT_ORDER_AUDIT') {
|
|
|
|
|
// 选择现舱
|
|
|
|
|
sspace.value.init()
|
|
|
|
|
} else {
|
|
|
|
|
// 非现舱直接审核通过
|
|
|
|
|
seaExportTaskAudit(remark, true)
|
|
|
|
|
// 非现舱直接审核通过 (如果是审单,需要自动订舱)
|
|
|
|
|
if (route.query.status == 'WAIT_ORDER_AUDIT') {
|
|
|
|
|
seaExportTaskAudit(remark, true)
|
|
|
|
|
} else {
|
|
|
|
|
seaExportTaskAudit(remark, false)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 不是最后一个审批人,直接审核
|
|
|
|
@ -1231,36 +1253,41 @@
|
|
|
|
|
return createMessage.warning('请填写订舱编号或主提单号!')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (status == 'ORDER_AUDIT_REJECTED') {
|
|
|
|
|
SubmitAudit({
|
|
|
|
|
businessId: id.value,
|
|
|
|
|
businessType: 1,
|
|
|
|
|
taskTypeName: 'WAIT_ORDER_AUDIT'
|
|
|
|
|
}).then(res => {
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
})
|
|
|
|
|
} else if (status == 'WAIT_SI_REJECT') {
|
|
|
|
|
SubmitAudit({
|
|
|
|
|
businessId: id.value,
|
|
|
|
|
businessType: 1,
|
|
|
|
|
taskTypeName: 'WAIT_SI'
|
|
|
|
|
}).then(res => {
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
const postData = {
|
|
|
|
|
businessId: id.value,
|
|
|
|
|
businessType: 1,
|
|
|
|
|
taskTypeName: type || status,
|
|
|
|
|
taskStatus: 2,
|
|
|
|
|
autoCreateNext: true
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
if (status == 'ORDER_AUDIT_REJECTED') {
|
|
|
|
|
SubmitAudit({
|
|
|
|
|
businessId: id.value,
|
|
|
|
|
businessType: 1,
|
|
|
|
|
taskTypeName: 'WAIT_ORDER_AUDIT'
|
|
|
|
|
}).then(res => {
|
|
|
|
|
resolve(res)
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
})
|
|
|
|
|
} else if (status == 'WAIT_SI_REJECT') {
|
|
|
|
|
SubmitAudit({
|
|
|
|
|
businessId: id.value,
|
|
|
|
|
businessType: 1,
|
|
|
|
|
taskTypeName: 'WAIT_SI'
|
|
|
|
|
}).then(res => {
|
|
|
|
|
resolve(res)
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
const postData = {
|
|
|
|
|
businessId: id.value,
|
|
|
|
|
businessType: 1,
|
|
|
|
|
taskTypeName: type || status,
|
|
|
|
|
taskStatus: 2,
|
|
|
|
|
autoCreateNext: true
|
|
|
|
|
}
|
|
|
|
|
if (type) postData.autoCreateNext = false
|
|
|
|
|
SetTaskStatus(postData).then(res => {
|
|
|
|
|
if (!b) createMessage.success('操作成功!')
|
|
|
|
|
resolve(res)
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (type) postData.autoCreateNext = false
|
|
|
|
|
SetTaskStatus(postData).then(res => {
|
|
|
|
|
if (!b) createMessage.success('操作成功!')
|
|
|
|
|
tabStore.closeTabByKey(fullPath, router)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
watch(
|
|
|
|
|
() => copyFlag,
|
|
|
|
|