|
|
|
@ -86,12 +86,26 @@
|
|
|
|
|
</div> -->
|
|
|
|
|
</a-tab-pane>
|
|
|
|
|
<a-tab-pane key="2" tab="电子文档">
|
|
|
|
|
<!-- <DsFile
|
|
|
|
|
ref="dsFile"
|
|
|
|
|
fileType="infoclient"
|
|
|
|
|
:TriggerSave="true"
|
|
|
|
|
:id="rowId"
|
|
|
|
|
@FnTriggerSave="FnTriggerSave"
|
|
|
|
|
:SetSelect="{
|
|
|
|
|
show: true,
|
|
|
|
|
}"
|
|
|
|
|
/> -->
|
|
|
|
|
<DsFile
|
|
|
|
|
ref="dsFile"
|
|
|
|
|
fileType="infoclient"
|
|
|
|
|
:dynamicDisabled="3"
|
|
|
|
|
:TriggerSave="true"
|
|
|
|
|
:succinct="true"
|
|
|
|
|
:id="rowId"
|
|
|
|
|
@FnTriggerSave="FnTriggerSave"
|
|
|
|
|
@FnUpload="FnUpload"
|
|
|
|
|
@handleSuccess="handleSuccess"
|
|
|
|
|
:SetSelect="{
|
|
|
|
|
show: true,
|
|
|
|
|
}"
|
|
|
|
@ -356,12 +370,34 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const dsFile = ref()
|
|
|
|
|
async function FnUpload(FnUp) {
|
|
|
|
|
if (!rowId.value) {
|
|
|
|
|
await handleSave(false)
|
|
|
|
|
}
|
|
|
|
|
FnUp(rowId.value)
|
|
|
|
|
}
|
|
|
|
|
async function FnTriggerSave() {
|
|
|
|
|
await handleSave(false, true)
|
|
|
|
|
if (rowId.value) {
|
|
|
|
|
dsFile.value.openFileModel()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function handleSuccess(data) {
|
|
|
|
|
const id = data.id.split('.')[0]
|
|
|
|
|
let ApiData: any = {
|
|
|
|
|
id: unref(rowId),
|
|
|
|
|
formName: 'CM_BuyCtn',
|
|
|
|
|
tableName: '',
|
|
|
|
|
fileId: id,
|
|
|
|
|
}
|
|
|
|
|
ApiDealExcel(ApiData).then((res) => {
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
activeKey.value = '1'
|
|
|
|
|
refresh()
|
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
async function DealExcel() {
|
|
|
|
|
if (!rowId.value) {
|
|
|
|
|
await handleSave(false, false)
|
|
|
|
@ -374,9 +410,11 @@
|
|
|
|
|
fileId: dsFile.value.dsFileList.SelectId,
|
|
|
|
|
}
|
|
|
|
|
ApiDealExcel(ApiData).then((res) => {
|
|
|
|
|
activeKey.value = '1'
|
|
|
|
|
refresh()
|
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
|
if (res.succeeded) {
|
|
|
|
|
activeKey.value = '1'
|
|
|
|
|
refresh()
|
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
notification.warning({ message: '请先在电子文档中勾选一个文件。', duration: 3 })
|
|
|
|
|