|
|
@@ -9,6 +9,7 @@
|
|
|
>
|
|
|
{{ tenderData.status === 1 ? "招标中" : "" }}
|
|
|
{{ tenderData.status === 2 ? "招标完成" : "" }}
|
|
|
+ {{ tenderData.status === 3 ? "取消招标" : "" }}
|
|
|
</div>
|
|
|
<div class="mr10" v-if="tenderData.status === 1">
|
|
|
竞标截止剩余: {{ getLeftTime(tenderData.bidDeadlineDatetime) }}
|
|
|
@@ -88,7 +89,7 @@
|
|
|
<el-select
|
|
|
class="w300 ml20"
|
|
|
v-model="currentProxyCompanies"
|
|
|
- value-key="value"
|
|
|
+ value-key="id"
|
|
|
placeholder="请选择参与竞标代理公司"
|
|
|
multiple
|
|
|
clearable
|
|
|
@@ -194,10 +195,12 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="df aic jcfe mt30">
|
|
|
+ <div v-if="tenderData.status === 1" class="df aic jcfe mt30">
|
|
|
<div>
|
|
|
- <el-button type="primary" @click="handleTender(1)">取消</el-button>
|
|
|
- <el-button type="primary" @click="handleTender(2)">完成招标</el-button>
|
|
|
+ <el-button type="primary" @click="completeTender(2)">取消</el-button>
|
|
|
+ <el-button type="primary" @click="completeTender(1)">
|
|
|
+ 完成招标
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -227,21 +230,6 @@ const tenderData = ref({
|
|
|
tenderProxies: [],
|
|
|
});
|
|
|
|
|
|
-function handleTender(type) {
|
|
|
- ElMessageBox.confirm(`确认${type === 1 ? "取消" : "完成"}招标?`, "提示", {
|
|
|
- confirmButtonText: "确认",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- ElNotification({
|
|
|
- type: "success",
|
|
|
- message: `${type === 1 ? "取消" : "提交"}成功!`,
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
-}
|
|
|
-
|
|
|
const voyage = ref({
|
|
|
// shipName: "航次船舶",
|
|
|
// loadPort: "武汉",
|
|
|
@@ -314,9 +302,8 @@ async function getTenderProxySelect() {
|
|
|
const currentProxyCompanies = ref([]);
|
|
|
|
|
|
function proxyCompaniesChange(e) {
|
|
|
- // ruleForm.value.proxyCompanyIds = currentProxyCompanies.value
|
|
|
- // .map((item) => item.id)
|
|
|
- // .join(",");
|
|
|
+ console.log(e);
|
|
|
+ currentProxyCompanies.value = e;
|
|
|
}
|
|
|
|
|
|
function remove(scope) {
|
|
|
@@ -352,6 +339,7 @@ async function addTenderProxy() {
|
|
|
type: "success",
|
|
|
message: "添加成功!",
|
|
|
});
|
|
|
+ getTenderDetail();
|
|
|
} else {
|
|
|
ElNotification({
|
|
|
type: "error",
|
|
|
@@ -360,6 +348,30 @@ async function addTenderProxy() {
|
|
|
}
|
|
|
cancelAddTenderCompany();
|
|
|
}
|
|
|
+function completeTender(status) {
|
|
|
+ ElMessageBox.confirm(`确认${status === 2 ? "取消" : "完成"}招标?`, "提示", {
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(async () => {
|
|
|
+ let { data } = await api.completeTender({
|
|
|
+ tenderId: route.query.id,
|
|
|
+ status,
|
|
|
+ });
|
|
|
+ if (data.status === 0) {
|
|
|
+ ElNotification({
|
|
|
+ type: "success",
|
|
|
+ message: `${status === 2 ? "取消" : "完成"}成功!`,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElNotification({
|
|
|
+ type: "error",
|
|
|
+ message: data.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ getTenderDetail();
|
|
|
+ });
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
getTenderDetail();
|
|
|
});
|