修改上传
This commit is contained in:
@ -5,7 +5,7 @@ VITE_APP_TITLE = 新能源项目管理平台
|
|||||||
VITE_APP_ENV = 'development'
|
VITE_APP_ENV = 'development'
|
||||||
|
|
||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API = 'http://192.168.110.159:8898'
|
VITE_APP_BASE_API = 'http://192.168.110.163:8898'
|
||||||
|
|
||||||
# 无人机接口地址
|
# 无人机接口地址
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-6 bg-gray-50 h100%">
|
<div class="p-6 bg-gray-50 main">
|
||||||
<div class="appWidth mx-auto mt-50 bg-white rounded-xl shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md">
|
<div class="appWidth mx-auto mt-40 bg-white rounded-xl shadow-sm overflow-hidden transition-all duration-300 hover:shadow-md">
|
||||||
<!-- 表单标题区域 -->
|
<!-- 表单标题区域 -->
|
||||||
<div class="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-6">
|
<div class="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-6">
|
||||||
<h2 class="text-2xl font-bold flex items-center"><i class="el-icon-user-circle mr-3"></i>人员配置</h2>
|
<h2 class="text-2xl font-bold flex items-center"><i class="el-icon-user-circle mr-3"></i>人员配置</h2>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
<!-- 表单内容区域 -->
|
<!-- 表单内容区域 -->
|
||||||
<el-form ref="leaveFormRef" :model="form" :rules="rules" label-width="120px" class="p-6 pt30 space-y-6 h75" :disabled="isDisabled">
|
<el-form ref="leaveFormRef" :model="form" :rules="rules" label-width="120px" class="p-6 pt30 space-y-6 h75" :disabled="isDisabled">
|
||||||
<!-- 设计负责人 -->
|
<!-- 设计负责人 -->
|
||||||
<div class="fonts">
|
<div class="fonts w60% ma">
|
||||||
<el-form-item label="采购专员" prop="userId" class="mb-4">
|
<el-form-item label="采购专员" prop="userId" class="mb-4">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.userId"
|
v-model="form.userId"
|
||||||
@ -185,6 +185,9 @@ onUnmounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.main {
|
||||||
|
height: calc(100vh - 90px);
|
||||||
|
}
|
||||||
.appWidth {
|
.appWidth {
|
||||||
width: 50vw;
|
width: 50vw;
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
|
@ -135,18 +135,7 @@
|
|||||||
<el-option label="退货单" value="2" />
|
<el-option label="退货单" value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item label="上传单据" prop="file" v-if="form.bo.materialStatus < 4 || form.bo.materialStatus == 10">
|
||||||
label="上传单据"
|
|
||||||
prop="file"
|
|
||||||
v-if="form.bo.materialStatus < 4 || form.bo.materialStatus == 10"
|
|
||||||
:rules="[
|
|
||||||
{
|
|
||||||
required: isFileRequired,
|
|
||||||
message: '请上传单据',
|
|
||||||
trigger: 'blur'
|
|
||||||
}
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
<file-upload
|
<file-upload
|
||||||
v-model="form.file"
|
v-model="form.file"
|
||||||
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
|
:fileType="['pdf', 'png', 'jpg', 'jpeg']"
|
||||||
@ -385,7 +374,11 @@ const submitForm = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (fileUploadRef.value) {
|
if (fileUploadRef.value) {
|
||||||
fileUploadRef.value!.submitUpload();
|
fileUploadRef.value!.submitUpload().then((res) => {
|
||||||
|
if (res == 'noFile') {
|
||||||
|
proxy?.$modal.msgError('请上传文件');
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
await addCailiaoshebei(form.value.bo).finally(() => (buttonLoading.value = false));
|
await addCailiaoshebei(form.value.bo).finally(() => (buttonLoading.value = false));
|
||||||
dialog.visible = false;
|
dialog.visible = false;
|
||||||
|
Reference in New Issue
Block a user