Merge branch 'feature-purchase' into developer
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-alert title="仅支持上传PDF格式文件,上传新文件将替换原有同类型文件" type="info" :closable="false" style="margin-bottom: 16px" />
|
||||
<el-alert title="仅支持上传PDF格式文件,每个类型仅能上传1个文件,如需更新,请先删除原文件" type="info" :closable="false" style="margin-bottom: 16px" />
|
||||
|
||||
<el-empty v-if="uploadedFileTypes.length === 0" description="该采购申请暂无上传材料" />
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<el-form-item v-for="item in displayedFileTypes" :key="item.value" :label="item.label">
|
||||
<upload-file
|
||||
v-model="fileMap[item.value]"
|
||||
:limit="5"
|
||||
:limit="1"
|
||||
:file-type="['pdf']"
|
||||
:data="{ fileType: item.value, purchaseId: purchaseId }"
|
||||
upload-file-url="/purchase/purchasingfiles/upload"
|
||||
@@ -32,8 +32,7 @@
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="submitting" @click="handleSubmit"> 确认更新 </el-button>
|
||||
<el-button @click="visible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -132,6 +131,10 @@ const open = async (id: string, no?: string) => {
|
||||
const handleUploadSuccess = (res: any, fileType: string) => {
|
||||
if (res && res.data) {
|
||||
useMessage().success('上传成功');
|
||||
// 自动提交更新
|
||||
nextTick(() => {
|
||||
handleSubmit();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user