修改bug
This commit is contained in:
@ -1,9 +1,8 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" title="招标文件" width="500" draggable>
|
||||
<el-dialog v-model="dialogVisible" title="招标文件" width="500" draggable @close="closeDialog">
|
||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="ruleForm" :rules="rules" label-width="auto">
|
||||
<el-form-item label="招标文件" prop="name">
|
||||
<file-upload
|
||||
v-model="form.costEstimationFile"
|
||||
:fileSize="100"
|
||||
:auto-upload="false"
|
||||
uploadUrl="/tender/biddingPlan/uploadBiddingDocuments"
|
||||
@ -11,7 +10,7 @@
|
||||
ref="fileUploadRef"
|
||||
:data="{
|
||||
projectId: currentProject?.id,
|
||||
planType: planType,
|
||||
type: planType,
|
||||
fileType: '1',
|
||||
bidStatus: '0',
|
||||
id: row.id
|
||||
@ -22,7 +21,7 @@
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="resetForm()"> 取消 </el-button>
|
||||
<el-button @click="closeDialog()"> 取消 </el-button>
|
||||
<el-button type="primary" @click="submitForm()">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@ -41,15 +40,14 @@ const ruleForm = ref<any>();
|
||||
const rules = ref({
|
||||
costEstimationFile: [{ required: true, message: '请上传招标文件', trigger: ['blur'] }]
|
||||
});
|
||||
const emit = defineProps({
|
||||
success: {
|
||||
type: Function
|
||||
// required: true
|
||||
}
|
||||
});
|
||||
const emit = defineEmits(['success']);
|
||||
const form = ref({
|
||||
costEstimationFile: ''
|
||||
});
|
||||
const closeDialog = () => {
|
||||
dialogVisible.value = false;
|
||||
emit('success');
|
||||
};
|
||||
|
||||
const open = (rows: any, type: string) => {
|
||||
dialogVisible.value = true;
|
||||
@ -68,7 +66,7 @@ const submitForm = () => {
|
||||
return;
|
||||
}
|
||||
dialogVisible.value = false;
|
||||
emit.success();
|
||||
emit('success');
|
||||
});
|
||||
};
|
||||
defineExpose({
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-model="dialogVisible" title="招标文件" width="500" draggable>
|
||||
<el-dialog v-model="dialogVisible" title="招标文件" width="500" draggable @close="closeDialog">
|
||||
<el-form ref="ruleFormRef" style="max-width: 600px" :model="form" :rules="rules" label-width="auto">
|
||||
<el-form-item label="中标单位" prop="winningBidder">
|
||||
<el-select v-model="form.winningBidder" filterable placeholder="请选择单位" style="width: 240px">
|
||||
@ -14,9 +14,10 @@
|
||||
uploadUrl="/tender/biddingPlan/uploadBiddingDocuments"
|
||||
method="put"
|
||||
ref="fileUploadRef"
|
||||
:limit="1"
|
||||
:data="{
|
||||
projectId: currentProject?.id,
|
||||
planType: planType,
|
||||
type: planType,
|
||||
fileType: '0',
|
||||
bidStatus: '0',
|
||||
id: row.id,
|
||||
@ -28,7 +29,7 @@
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="resetForm()"> 取消 </el-button>
|
||||
<el-button @click="closeDialog()"> 取消 </el-button>
|
||||
<el-button type="primary" @click="submitForm()">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@ -50,12 +51,7 @@ const options = ref<any>([]);
|
||||
const rules = ref({
|
||||
costEstimationFile: [{ required: true, message: '请上传招标文件', trigger: ['blur'] }]
|
||||
});
|
||||
const emit = defineProps({
|
||||
success: {
|
||||
type: Function
|
||||
// required: true
|
||||
}
|
||||
});
|
||||
const emit = defineEmits(['success']);
|
||||
const form = ref({
|
||||
costEstimationFile: '',
|
||||
winningBidder: ''
|
||||
@ -68,6 +64,11 @@ const open = (rows: any, type: string) => {
|
||||
planType.value = type;
|
||||
getUnitListData();
|
||||
};
|
||||
const closeDialog = () => {
|
||||
dialogVisible.value = false;
|
||||
form.value.winningBidder = '';
|
||||
emit('success');
|
||||
};
|
||||
const getUnitListData = async () => {
|
||||
let res = await getUnitList({
|
||||
projectId: currentProject.value?.id
|
||||
@ -84,6 +85,13 @@ const getUnitListData = async () => {
|
||||
};
|
||||
const resetForm = () => {};
|
||||
const submitForm = () => {
|
||||
if (!form.value.winningBidder) {
|
||||
ElMessage({
|
||||
message: '请选择中标单位',
|
||||
type: 'warning'
|
||||
});
|
||||
return;
|
||||
}
|
||||
fileUploadRef.value.submitUpload().then((res) => {
|
||||
if (res == 'noFile') {
|
||||
ElMessage({
|
||||
@ -93,7 +101,7 @@ const submitForm = () => {
|
||||
return;
|
||||
}
|
||||
dialogVisible.value = false;
|
||||
emit.success();
|
||||
emit('success');
|
||||
});
|
||||
};
|
||||
defineExpose({
|
||||
|
@ -41,7 +41,9 @@
|
||||
<el-table-column prop="winningBidder" label="中标单位" />
|
||||
<el-table-column prop="bidFileName" label="中标文件">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link :disabled="scope.row.bidStatus == 1">{{ scope.row.bidFileName }} </el-button>
|
||||
<el-button type="primary" link :disabled="scope.row.bidStatus == 1" @click="openPdf(scope.row.bidFile)"
|
||||
>{{ scope.row.bidFileName }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="plannedBiddingTime" label="计划招标时间" align="center">
|
||||
|
Reference in New Issue
Block a user