|
|
@ -15,6 +15,7 @@ export default { |
|
|
|
const config = useConfig(businessType); |
|
|
|
const onCommand = async (item, rows) => { |
|
|
|
const url = config.edit.addUrl; |
|
|
|
const backUrl = config.edit.backUrl; |
|
|
|
if (item.path === "add") { |
|
|
|
const invbillNum = rows[0].billNum; |
|
|
|
await appListRef.value.onClick( |
|
|
@ -31,6 +32,26 @@ export default { |
|
|
|
true |
|
|
|
); |
|
|
|
} |
|
|
|
if (item.path === "back") { |
|
|
|
const data = appListRef.value.buildQuery(); |
|
|
|
await appListRef.value.onClick( |
|
|
|
async () => { |
|
|
|
const result = await request(backUrl, data, { method: "POST" }, true); |
|
|
|
if (result.errors) { |
|
|
|
if (result.data.code === 400 && result.data.fileName) { |
|
|
|
ElMessage({ |
|
|
|
type: "warnning", |
|
|
|
message: "操作失败", |
|
|
|
}); |
|
|
|
window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`)); |
|
|
|
} |
|
|
|
console.log(result); |
|
|
|
} |
|
|
|
}, |
|
|
|
`确认是否退回到不可结算单?`, |
|
|
|
true |
|
|
|
); |
|
|
|
} |
|
|
|
}; |
|
|
|
return { appListRef, config, onCommand }; |
|
|
|
}, |
|
|
|