|
@@ -1,6 +1,8 @@
|
|
|
<script>
|
|
|
-import {Delete, Download, Edit, Plus, Refresh, Search} from "@element-plus/icons-vue";
|
|
|
-import {ElMessageBox} from "element-plus";
|
|
|
+import { Delete, Download, Edit, Monitor, Plus, Refresh, Search } from "@element-plus/icons-vue";
|
|
|
+import { ElMessageBox } from "element-plus";
|
|
|
+import { getAllBiddingInfo, getBiddingInfoByCondition, deleteBiddingInfo } from "@/http/api"
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
|
|
|
export default {
|
|
|
name: "BiddingTable",
|
|
@@ -28,11 +30,11 @@ export default {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
title: '',
|
|
|
- startTime: '',
|
|
|
- endTime: '',
|
|
|
- invoiceType: '',
|
|
|
- paymentTime: '',
|
|
|
- biddingStatus: '',
|
|
|
+ bidding_start_time: '',
|
|
|
+ bidding_end_time: '',
|
|
|
+ invoice_type: '',
|
|
|
+ payment_time: '',
|
|
|
+ bidding_status: '',
|
|
|
},
|
|
|
tableData: [
|
|
|
{
|
|
@@ -63,36 +65,74 @@ export default {
|
|
|
procurementRule: '',
|
|
|
clientName: '',
|
|
|
priceCap: '',
|
|
|
- priceFloor: ''
|
|
|
+ priceFloor: '',
|
|
|
+ bidding_status: '',
|
|
|
},
|
|
|
dialogVisible: false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ query() {
|
|
|
+ getBiddingInfoByCondition(this.searchForm).then(
|
|
|
+ res => {
|
|
|
+ this.tableData = res.data
|
|
|
+ ElMessage.success("搜索成功")
|
|
|
+ }
|
|
|
+ )
|
|
|
+ },
|
|
|
+ deleteById(scope) {
|
|
|
+ ElMessageBox.confirm('将要删除本条记录,是否继续?',
|
|
|
+ '警告',
|
|
|
+ {
|
|
|
+ confirmButtonText: '删除',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(() => {
|
|
|
+ deleteBiddingInfo({
|
|
|
+ id: scope.row.id
|
|
|
+ }),
|
|
|
+ ElMessage({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!',
|
|
|
+ });
|
|
|
+ this.tableData.splice(scope.$index, 1);
|
|
|
+ }).catch((err) => {
|
|
|
+ ElMessage({
|
|
|
+ type: 'info',
|
|
|
+ message: '取消操作' + err,
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
resetSearchForm() {
|
|
|
// 手动重置表单字段
|
|
|
this.searchForm.title = '';
|
|
|
- this.searchForm.startTime = '';
|
|
|
- this.searchForm.endTime = '';
|
|
|
- this.searchForm.invoiceType = '';
|
|
|
- this.searchForm.paymentTime = '';
|
|
|
- this.searchForm.biddingStatus = '';
|
|
|
+ this.searchForm.bidding_start_time = '';
|
|
|
+ this.searchForm.bidding_end_time = '';
|
|
|
+ this.searchForm.invoice_type = '';
|
|
|
+ this.searchForm.payment_time = '';
|
|
|
+ this.searchForm.bidding_status = '';
|
|
|
},
|
|
|
handleClose(done) {
|
|
|
ElMessageBox.confirm('Are you sure to close this dialog?')
|
|
|
- .then(() => {
|
|
|
- done()
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- // catch error
|
|
|
- })
|
|
|
+ .then(() => {
|
|
|
+ done()
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ // catch error
|
|
|
+ })
|
|
|
},
|
|
|
- direct(item, arr) {
|
|
|
+ direct(item, arr, index) {
|
|
|
this.$router.push(item.name)
|
|
|
this.$store.commit("addEditableTabs", item);
|
|
|
this.$store.commit("changeCurrentPath", arr)
|
|
|
+ this.$store.state.selectedBiddingInfo = this.tableData[index];
|
|
|
+ // console.log("this.$store.state.selectedBiddingInfo", this.$store.state.selectedBiddingInfo);
|
|
|
+
|
|
|
},
|
|
|
- }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.query();
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -108,18 +148,18 @@ export default {
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="招采开始时间">
|
|
|
<el-date-picker type="date" placeholder="请选择招采开始时间" clearable="clearable"
|
|
|
- v-model="searchForm.startTime"></el-date-picker>
|
|
|
+ v-model="searchForm.bidding_start_time"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="招采结束时间">
|
|
|
<el-date-picker type="date" placeholder="请选择招采结束时间" clearable="clearable"
|
|
|
- v-model="searchForm.endTime"></el-date-picker>
|
|
|
+ v-model="searchForm.bidding_end_time"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="发票类型">
|
|
|
- <el-select placeholder="请选择发票类型" v-model="searchForm.invoiceType">
|
|
|
+ <el-select placeholder="请选择发票类型" v-model="searchForm.invoice_type">
|
|
|
<el-option label="普通发票"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -130,25 +170,27 @@ export default {
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="付款时间">
|
|
|
<el-date-picker type="date" placeholder="请选择付款时间" clearable="clearable"
|
|
|
- v-model="searchForm.paymentTime"></el-date-picker>
|
|
|
+ v-model="searchForm.payment_time"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="竞标状态">
|
|
|
- <el-select placeholder="请选择竞标状态" v-model="searchForm.invoiceType">
|
|
|
- <el-option label="已结束"></el-option>
|
|
|
+ <el-select placeholder="请选择竞标状态" v-model="searchForm.bidding_status">
|
|
|
+ <el-option value="已结束" label="已结束"></el-option>
|
|
|
+ <el-option value="未进行" label="未进行"></el-option>
|
|
|
+ <el-option value="进行中" label="进行中"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-row :gutter="20">
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" :icon="Search">搜索</el-button>
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" :icon="Search" @click="query">搜索</el-button>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
- <el-form-item>
|
|
|
- <el-button :icon="Refresh" @click="resetSearchForm">重置</el-button>
|
|
|
- </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button :icon="Refresh" @click="resetSearchForm">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
</el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -157,72 +199,42 @@ export default {
|
|
|
<el-button type="success" :icon="Edit" plain>修改</el-button>
|
|
|
<el-button type="danger" :icon="Delete" plain>删除</el-button>
|
|
|
<el-button type="warning" :icon="Download" plain>导出</el-button>
|
|
|
- <el-table
|
|
|
- ref="multipleTable"
|
|
|
- :data="tableData"
|
|
|
- tooltip-effect="dark"
|
|
|
- style="width: 100%"
|
|
|
- @selection-change="handleSelectionChange">
|
|
|
- <el-table-column
|
|
|
- type="selection">
|
|
|
+ <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="title"
|
|
|
- label="标题">
|
|
|
+ <el-table-column prop="title" label="标题">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="quantity"
|
|
|
- label="数量">
|
|
|
+ <el-table-column prop="purchase_quantity" label="数量">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="unit"
|
|
|
- label="单位">
|
|
|
+ <el-table-column prop="purchase_unit" label="单位">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="startTime"
|
|
|
- label="招采开始时间">
|
|
|
+ <el-table-column prop="bidding_start_time" label="招采开始时间">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="endTime"
|
|
|
- label="招采结束时间">
|
|
|
+ <el-table-column prop="bidding_end_time" label="招采结束时间">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="biddingType"
|
|
|
- label="采购类型">
|
|
|
+ <el-table-column prop="purchase_type" label="采购类型">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="remainingTime"
|
|
|
- label="剩余时间">
|
|
|
+ <el-table-column prop="rest_time" label="剩余时间">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="biddingStatus"
|
|
|
- label="竞标状态">
|
|
|
+ <el-table-column prop="bidding_status" label="竞标状态">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="clientName"
|
|
|
- label="委托方名称">
|
|
|
+ <el-table-column prop="client_name" label="委托方名称">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="priceCap"
|
|
|
- label="限制价格上限">
|
|
|
+ <el-table-column prop="price_limit_upper" label="限制价格上限">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="priceFloor"
|
|
|
- label="限制价格下限">
|
|
|
+ <el-table-column prop="price_limit_lower" label="限制价格下限">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="operation"
|
|
|
- label="操作" width="150%">
|
|
|
- <el-button type="primary" size="small" @click="direct({ name: '/startBidding', title: '开始竞价' }, ['集团功能', '开始竞价'])" >竞标详情</el-button>
|
|
|
- <el-link type="primary" :icon="Delete">删除</el-link>
|
|
|
+ <el-table-column prop="operation" label="操作" width="150%">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="primary" size="small"
|
|
|
+ @click="direct({ name: '/startBidding', title: '开始竞价' }, ['集团功能', '开始竞价'], scope.$index)">竞标详情</el-button>
|
|
|
+ <el-link type="primary" size="small" @click="deleteById(scope)">删除</el-link>
|
|
|
+ </template>
|
|
|
+
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <el-dialog
|
|
|
- v-model="dialogVisible"
|
|
|
- title="添加竞价信息"
|
|
|
- width="50%"
|
|
|
- :before-close="handleClose"
|
|
|
- >
|
|
|
+ <el-dialog v-model="dialogVisible" title="添加竞价信息" width="50%" :before-close="handleClose">
|
|
|
<el-form :inline="false" :model="addForm">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="12">
|
|
@@ -256,13 +268,13 @@ export default {
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="招采开始时间" required="required">
|
|
|
<el-date-picker type="date" placeholder="请选择招采开始时间" clearable="clearable"
|
|
|
- v-model="addForm.startTime"></el-date-picker>
|
|
|
+ v-model="addForm.startTime"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="招采结束时间" required="required">
|
|
|
<el-date-picker type="date" placeholder="请选择招采结束时间" clearable="clearable"
|
|
|
- v-model="addForm.endTime"></el-date-picker>
|
|
|
+ v-model="addForm.endTime"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -275,7 +287,7 @@ export default {
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="最晚到货时间">
|
|
|
<el-date-picker type="date" placeholder="请选择最晚到货时间" clearable="clearable"
|
|
|
- v-model="addForm.arrivalDeadline"></el-date-picker>
|
|
|
+ v-model="addForm.arrivalDeadline"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -290,7 +302,7 @@ export default {
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="付款时间">
|
|
|
<el-date-picker type="date" placeholder="请选择付款时间" clearable="clearable"
|
|
|
- v-model="addForm.paymentTime"></el-date-picker>
|
|
|
+ v-model="addForm.paymentTime"></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -322,6 +334,17 @@ export default {
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="竞标状态" required="required">
|
|
|
+ <el-select placeholder="请选择竞标状态" v-model="addForm.bidding_status">
|
|
|
+ <el-option value="已结束" label="已结束"></el-option>
|
|
|
+ <el-option value="未进行" label="未进行"></el-option>
|
|
|
+ <el-option value="进行中" label="进行中"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|