招标信息不同角色使用不同接口修改,新增状态为待审核,点击操作进行状态修改,
parent
ed73383afc
commit
e58c9edf93
|
|
@ -1,15 +1,29 @@
|
|||
import { defHttp } from '@/utils/http/axios';
|
||||
|
||||
enum Api {
|
||||
// 招标信息
|
||||
LoadBiddingInfo = '/api/BiddingInfo/LoadBiddingInfo',
|
||||
AddBiddingInfo = '/api/BiddingInfo/AddBiddingInfo',
|
||||
EditBiddingInfo = '/api/BiddingInfo/EditBiddingInfo',
|
||||
DeleteBiddingInfo = '/api/BiddingInfo/DeleteBiddingInfo',
|
||||
}
|
||||
|
||||
export function LoadBiddingInfo(params) {
|
||||
const getRequestBiddingListUrl = (userType) => {
|
||||
switch(userType){
|
||||
case 1:
|
||||
// 招标代理
|
||||
return '/api/BiddingInfo/LoadAgencyBiddingInfo'
|
||||
case 2:
|
||||
// 供应商
|
||||
return '/api/BiddingInfo/LoadCompanyBiddingInfo'
|
||||
case 3:
|
||||
// 甲方公司
|
||||
return '/api/BiddingInfo/LoadBiddingInfo'
|
||||
}
|
||||
}
|
||||
// 招标信息
|
||||
export function LoadBiddingInfo(params, userType) {
|
||||
return defHttp.get({
|
||||
url: Api.LoadBiddingInfo,
|
||||
url: getRequestBiddingListUrl(userType),
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
<a-date-picker class="item-date-picker" v-model:value="bidOpeningTime" placeholder="请输入日期时间"/>
|
||||
<div class="item-title">当前状态</div>
|
||||
<a-select
|
||||
:disabled="modalType == 'insert'"
|
||||
class="item-select"
|
||||
v-model:value="nowStatus"
|
||||
:options="props.nowStatusOptions"
|
||||
|
|
@ -93,6 +94,9 @@ onMounted(() => {
|
|||
bidWinningAmount.value = props.info.bidWinningAmount
|
||||
bidAgent.value = props.info.bidAgent
|
||||
}
|
||||
if(props.modalType == 'insert'){
|
||||
nowStatus.value = '待审核'
|
||||
}
|
||||
})
|
||||
const id = ref('')
|
||||
const projectName = ref('')
|
||||
|
|
|
|||
|
|
@ -81,12 +81,12 @@
|
|||
>
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template v-if="
|
||||
(column.dataIndex === 'money' && user == 1) ||
|
||||
(column.dataIndex === 'winBid' && user == 2)
|
||||
(column.dataIndex === 'biddingAmount' && user == 1) ||
|
||||
(column.dataIndex === 'bidWinningAmount' && user == 2)
|
||||
">
|
||||
<div class="blue-span">{{ text }}</div>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'status'">
|
||||
<template v-if="column.dataIndex === 'nowStatus'">
|
||||
<div class="status-cell">
|
||||
<div class="status-icon"></div>
|
||||
{{ text }}
|
||||
|
|
@ -96,11 +96,12 @@
|
|||
<a-dropdown overlayClassName="operate-dropdown" placement="bottom" :arrow="{ pointAtCenter: true }">
|
||||
<template #overlay>
|
||||
<a-menu @click="operateClick">
|
||||
<a-menu-item key="1" @click="openAddTenderModal('update',record)">修改</a-menu-item>
|
||||
<a-menu-item key="2" v-if="user == 3">审核</a-menu-item>
|
||||
<a-menu-item key="4" v-if="user == 3">变更</a-menu-item>
|
||||
<a-menu-item key="5" v-if="user == 3">开标</a-menu-item>
|
||||
<a-menu-item key="6" v-if="user == 3">废标</a-menu-item>
|
||||
<a-menu-item key="1" v-if="user == 2">报名</a-menu-item>
|
||||
<a-menu-item key="2" v-if="user == 3" :disabled="record.nowStatus !== '待审核'" @click="openAddTenderModal('update',record)">修改</a-menu-item>
|
||||
<a-menu-item key="3" v-if="user == 3" @click="changeNowStatus(record, '正常')">审核</a-menu-item>
|
||||
<a-menu-item key="4" v-if="user == 3" @click="changeNowStatus(record, '待审核')">变更</a-menu-item>
|
||||
<a-menu-item key="5" v-if="user == 3" @click="changeNowStatus(record, '已开标')">开标</a-menu-item>
|
||||
<a-menu-item key="6" v-if="user == 3" @click="changeNowStatus(record, '终止')">废标</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button class="operate-button" type="primary">
|
||||
|
|
@ -197,8 +198,9 @@ import { ref, onMounted } from "vue"
|
|||
import { yearOptions, proxyColumns, supplierColumns, proprietorColumns, biddingformOptions, biddingtypeOptions, nowStatusOptions } from './util'
|
||||
import { SearchOutlined, PlusOutlined, DownOutlined } from '@ant-design/icons-vue'
|
||||
import InsertModal from './InsertModal/index.vue'
|
||||
import { LoadBiddingInfo } from '@/api/demo/tender'
|
||||
import { LoadBiddingInfo, EditBiddingInfo } from '@/api/demo/tender'
|
||||
import { getUserType } from '@/views/demo/util'
|
||||
import { message } from "ant-design-vue"
|
||||
|
||||
onMounted(() => {
|
||||
query()
|
||||
|
|
@ -236,6 +238,7 @@ const rowSelection = {
|
|||
}),
|
||||
};
|
||||
const changeTabs = (type) => {
|
||||
|
||||
params.value.type = type
|
||||
query()
|
||||
}
|
||||
|
|
@ -260,13 +263,15 @@ const changeAddModal = (type) => {
|
|||
insertModalOpen.value = type
|
||||
}
|
||||
const query = () => {
|
||||
let nowstatus = params.value.type == 0? ['待审核','正常','超期','暂停']: null
|
||||
let requestParams = {
|
||||
...params.value,
|
||||
nowstatus: nowstatus,
|
||||
page: page.value,
|
||||
limit: limit.value
|
||||
}
|
||||
loading.value = true
|
||||
LoadBiddingInfo(requestParams).then(res => {
|
||||
LoadBiddingInfo(requestParams, user.value).then(res => {
|
||||
showList.value = res.items
|
||||
total.value = res.total
|
||||
page.value = 1
|
||||
|
|
@ -278,10 +283,22 @@ const openAddTenderModal = (type, item) => {
|
|||
modalType.value = type
|
||||
if(type == 'update'){
|
||||
showInfo.value = item
|
||||
console.log(111111111111,item)
|
||||
}
|
||||
changeAddModal(true)
|
||||
}
|
||||
const changeNowStatus = (item, type) => {
|
||||
let requestParams = {
|
||||
...item,
|
||||
nowStatus: type
|
||||
}
|
||||
loading.value = true
|
||||
EditBiddingInfo(requestParams).then(res => {
|
||||
message.success('状态修改成功')
|
||||
query()
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
Loading…
Reference in New Issue