feat: 更新产品提交逻辑,修改上传组件以支持文件类型和数据格式
This commit is contained in:
@@ -72,12 +72,11 @@ function handleCreateDraft() {
|
||||
function handleCreateDraftAndSubmit() {
|
||||
formInst.value?.validate(async errors => {
|
||||
if (!errors) {
|
||||
// await safeClient(
|
||||
// client.api.admin.rwa.issuance.products.post({
|
||||
// ...form.value,
|
||||
// submitForReview: true
|
||||
// })
|
||||
// );
|
||||
await safeClient(
|
||||
client.api.admin.rwa.issuance.products.submit.post({
|
||||
...form.value
|
||||
})
|
||||
);
|
||||
emit('close');
|
||||
}
|
||||
});
|
||||
@@ -129,15 +128,14 @@ function handleCreateDraftAndSubmit() {
|
||||
<NInput v-model:value="form.description" type="textarea" />
|
||||
</NFormItem>
|
||||
<NFormItem path="proofDocuments" label="资产证明 ">
|
||||
<NUpload
|
||||
action="https://naive-upload.free.beeceptor.com/"
|
||||
:headers="{ 'naive-info': 'hello!' }"
|
||||
:data="{
|
||||
'naive-data': 'cool! naive!'
|
||||
<Upload
|
||||
:model-value="form.proofDocuments?.split(',') || []"
|
||||
:fetch-options="{
|
||||
businessType: 'rwa_proof'
|
||||
}"
|
||||
>
|
||||
<NButton>上传文件</NButton>
|
||||
</NUpload>
|
||||
accept="application/pdf,image/*,.doc,.docx"
|
||||
@update:model-value="val => (form.proofDocuments = val.join(','))"
|
||||
/>
|
||||
</NFormItem>
|
||||
<NSpace justify="end">
|
||||
<NButton type="primary" @click="handleCreateDraftAndSubmit">创建草稿并提交审核</NButton>
|
||||
|
||||
Reference in New Issue
Block a user