feat: 更新产品提交逻辑,修改上传组件以支持文件类型和数据格式

This commit is contained in:
2026-01-09 14:31:28 +07:00
parent 978df12a6f
commit 07b11e5657

View File

@@ -72,12 +72,11 @@ function handleCreateDraft() {
function handleCreateDraftAndSubmit() { function handleCreateDraftAndSubmit() {
formInst.value?.validate(async errors => { formInst.value?.validate(async errors => {
if (!errors) { if (!errors) {
// await safeClient( await safeClient(
// client.api.admin.rwa.issuance.products.post({ client.api.admin.rwa.issuance.products.submit.post({
// ...form.value, ...form.value
// submitForReview: true })
// }) );
// );
emit('close'); emit('close');
} }
}); });
@@ -129,15 +128,14 @@ function handleCreateDraftAndSubmit() {
<NInput v-model:value="form.description" type="textarea" /> <NInput v-model:value="form.description" type="textarea" />
</NFormItem> </NFormItem>
<NFormItem path="proofDocuments" label="资产证明 "> <NFormItem path="proofDocuments" label="资产证明 ">
<NUpload <Upload
action="https://naive-upload.free.beeceptor.com/" :model-value="form.proofDocuments?.split(',') || []"
:headers="{ 'naive-info': 'hello!' }" :fetch-options="{
:data="{ businessType: 'rwa_proof'
'naive-data': 'cool! naive!'
}" }"
> accept="application/pdf,image/*,.doc,.docx"
<NButton>上传文件</NButton> @update:model-value="val => (form.proofDocuments = val.join(','))"
</NUpload> />
</NFormItem> </NFormItem>
<NSpace justify="end"> <NSpace justify="end">
<NButton type="primary" @click="handleCreateDraftAndSubmit">创建草稿并提交审核</NButton> <NButton type="primary" @click="handleCreateDraftAndSubmit">创建草稿并提交审核</NButton>