招标代理对接接口
parent
6a1e662c1f
commit
7d58b292b3
|
|
@ -0,0 +1,45 @@
|
|||
import { defHttp } from '@/utils/http/axios';
|
||||
enum Api {
|
||||
// 招标代理
|
||||
LoadBiddingAgency = '/api/BiddingAgency/LoadBiddingAgency',
|
||||
AddBiddingAgency = '/api/BiddingAgency/AddBiddingAgency',
|
||||
EditBiddingAgency = '/api/BiddingAgency/EditBiddingAgency',
|
||||
DeleteBiddingAgency = '/api/BiddingAgency/DeleteBiddingAgency',
|
||||
ReviewBiddingAgency = '/api/BiddingAgency/ReviewBiddingAgency',
|
||||
AddCompanyAccount = '/api/BiddingAgency/AddCompanyAccount',
|
||||
}
|
||||
|
||||
export function LoadBiddingAgency(params) {
|
||||
return defHttp.get({
|
||||
url: Api.LoadBiddingAgency,
|
||||
params,
|
||||
});
|
||||
}
|
||||
export function AddBiddingAgency(params) {
|
||||
return defHttp.post({
|
||||
url: Api.AddBiddingAgency,
|
||||
params,
|
||||
});
|
||||
}
|
||||
export function EditBiddingAgency(params) {
|
||||
return defHttp.post({
|
||||
url: Api.EditBiddingAgency,
|
||||
params,
|
||||
});
|
||||
}
|
||||
export function DeleteBiddingAgency(id) {
|
||||
return defHttp.post({
|
||||
url: `${Api.DeleteBiddingAgency}?id=${id}`,
|
||||
});
|
||||
}
|
||||
export function ReviewBiddingAgency(id) {
|
||||
return defHttp.post({
|
||||
url: `${Api.ReviewBiddingAgency}?id=${id}`,
|
||||
});
|
||||
}
|
||||
export function AddCompanyAccount(params) {
|
||||
return defHttp.post({
|
||||
url: Api.AddCompanyAccount,
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,249 @@
|
|||
<template>
|
||||
|
||||
<div class="title-div">
|
||||
<div class="title-span-div">
|
||||
<div class="title-icon"></div>
|
||||
<div class="title-span">账号管理</div>
|
||||
</div>
|
||||
<div class="close-button" @click="emits('changeManageModal',false)"></div>
|
||||
</div>
|
||||
<div class="interval"></div>
|
||||
<a-spin tip="加载中..." :spinning="loading">
|
||||
<div class="modal-content">
|
||||
<div class="left-content">
|
||||
<div class="item-title">企业名称</div>
|
||||
<a-input class="item-input" v-model:value="agencyName" placeholder="请输入企业名称" disabled/>
|
||||
<div class="item-title">账号分配</div>
|
||||
<a-select
|
||||
class="item-select"
|
||||
v-model:value="userId"
|
||||
:options="userOptions"
|
||||
placeholder="请为企业分配账号"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<div class="search-select-suffixIcon"></div>
|
||||
</template>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="interval"></div>
|
||||
<div class="footer">
|
||||
<a-button class="cancel-button" @click="emits('changeManageModal',false)">取消</a-button>
|
||||
<a-button class="save-button" type="primary" @click="submit">确认提交</a-button>
|
||||
</div>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, defineEmits, defineProps, onMounted } from "vue"
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { AddCompanyAccount } from '@/api/demo/bidagency'
|
||||
import { getAccountList } from '@/api/demo/system';
|
||||
const props = defineProps(['info'])
|
||||
const emits = defineEmits(['changeManageModal', 'query'])
|
||||
onMounted(() => {
|
||||
agencyId.value = props.info.id
|
||||
agencyName.value = props.info.name
|
||||
getAccountList({page:1,limit:999}).then(res => {
|
||||
userOptions.value = res.items.map(item => {
|
||||
return { label: item.name, value: item.id }
|
||||
})
|
||||
})
|
||||
})
|
||||
const agencyId = ref('')
|
||||
const agencyName = ref('')
|
||||
const userId = ref()
|
||||
const userOptions = ref([])
|
||||
const loading = ref(false)
|
||||
|
||||
|
||||
|
||||
const submit = () => {
|
||||
if(!userId.value){
|
||||
return message.warning('请为招标代理分配账号!')
|
||||
}
|
||||
loading.value = true
|
||||
let params = [
|
||||
{
|
||||
agencyId: agencyId.value,
|
||||
userId: userId.value
|
||||
}
|
||||
]
|
||||
console.log('params',params)
|
||||
AddCompanyAccount(params).then(res => {
|
||||
message.success('保存成功!')
|
||||
emits('query')
|
||||
emits('changeManageModal',false)
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.title-div{
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
padding-top: 15px;
|
||||
padding-left: 26px;
|
||||
padding-right: 35px;
|
||||
padding-bottom: 14px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.title-span-div{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.title-icon{
|
||||
width: 3px;
|
||||
height: 18px;
|
||||
background: #0B60BD;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
margin-right: 9px;
|
||||
}
|
||||
.title-span{
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
color: #11131B;
|
||||
line-height: 33px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
}
|
||||
}
|
||||
.close-button{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-image: url('/public/tender/tender_close_modal_button.png');
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.interval{
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border: 1px solid #DBDBDB;
|
||||
opacity: 0.66;
|
||||
}
|
||||
.modal-content{
|
||||
display: flex;
|
||||
padding-top: 24px;
|
||||
padding-left: 38px;
|
||||
padding-right: 40px;
|
||||
padding-bottom: 27px;
|
||||
.item-title{
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: #000000;
|
||||
line-height: 20px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
.item-input{
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
// box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 6px;
|
||||
border: 1px solid #A9BBD8;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.item-select{
|
||||
width: 100%;
|
||||
margin-bottom: 24px;
|
||||
:deep(.ant-select-selector){
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
// box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 6px;
|
||||
border: 1px solid #A9BBD8;
|
||||
}
|
||||
:deep(.ant-select-selection-item){
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: #000000;
|
||||
line-height: 20px;
|
||||
}
|
||||
:deep(.ant-select-selection-placeholder){
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
line-height: 20px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
}
|
||||
.search-select-suffixIcon{
|
||||
width: 10px;
|
||||
height: 6px;
|
||||
background-image: url('/public/tender/search_select_icon.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
.item-date-picker{
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
// box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 6px;
|
||||
border: 1px solid #A9BBD8;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.left-content{
|
||||
width: 100%;
|
||||
// margin-right: 124px;
|
||||
}
|
||||
}
|
||||
.footer{
|
||||
height: 85px;
|
||||
padding-right: 34px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
.cancel-button{
|
||||
width: 101px;
|
||||
height: 40px;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 4px;
|
||||
border: 1px solid #979797;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #222738;
|
||||
line-height: 33px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
margin-right: 24px;
|
||||
}
|
||||
.delete-button{
|
||||
width: 146px;
|
||||
height: 40px;
|
||||
background: #ed6f6f;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 4px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
line-height: 33px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
margin-right: 24px;
|
||||
}
|
||||
.save-button{
|
||||
width: 146px;
|
||||
height: 40px;
|
||||
background: #0081FF;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 4px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
line-height: 33px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,332 @@
|
|||
<template>
|
||||
|
||||
<div class="title-div">
|
||||
<div class="title-span-div">
|
||||
<div class="title-icon"></div>
|
||||
<div class="title-span">添加招标代理信息</div>
|
||||
</div>
|
||||
<div class="close-button" @click="emits('changeAddModal',false)"></div>
|
||||
</div>
|
||||
<div class="interval"></div>
|
||||
<a-spin tip="加载中..." :spinning="loading">
|
||||
<div class="modal-content">
|
||||
<div class="left-content">
|
||||
<div class="item-title">企业名称</div>
|
||||
<a-input class="item-input" v-model:value="name" placeholder="请输入企业名称" />
|
||||
<div class="item-title">信用代码</div>
|
||||
<a-input class="item-input" v-model:value="code" placeholder="请输入信用代码" />
|
||||
<div class="item-title">企业法人</div>
|
||||
<a-input class="item-input" v-model:value="legalPerson" placeholder="请输入企业法人" />
|
||||
<div class="item-title">营业执照</div>
|
||||
<a-upload
|
||||
v-model:file-list="licenseList"
|
||||
accept=".zip"
|
||||
:maxCount="1"
|
||||
:custom-request="customRequest"
|
||||
>
|
||||
<a-button>
|
||||
<upload-outlined></upload-outlined>
|
||||
上传营业执照
|
||||
</a-button>
|
||||
<template #itemRender="{ file, actions }">
|
||||
<a-space>
|
||||
<span>{{ file.name }}</span>
|
||||
</a-space>
|
||||
</template>
|
||||
</a-upload>
|
||||
</div>
|
||||
<div class="right-content">
|
||||
<div class="item-title">联系人</div>
|
||||
<a-input class="item-input" v-model:value="contactPerson" placeholder="请输入联系人" />
|
||||
<div class="item-title">联系方式</div>
|
||||
<a-input class="item-input" v-model:value="phone" placeholder="请输入联系方式" />
|
||||
<div class="item-title">账号状态</div>
|
||||
<a-select
|
||||
class="item-select"
|
||||
v-model:value="accountState"
|
||||
:options="accountStateOptions"
|
||||
placeholder="请选择账号状态"
|
||||
>
|
||||
<template #suffixIcon>
|
||||
<div class="search-select-suffixIcon"></div>
|
||||
</template>
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="interval"></div>
|
||||
<div class="footer">
|
||||
<a-button class="cancel-button" @click="emits('changeAddModal',false)">取消</a-button>
|
||||
<a-button v-if="props.modalType == 'update'" class="delete-button" type="primary" @click="delData">删除</a-button>
|
||||
<a-button class="save-button" type="primary" @click="submit">确认提交</a-button>
|
||||
</div>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, h, defineEmits, defineProps, onMounted, createVNode } from "vue"
|
||||
import { ExclamationCircleOutlined, PlusOutlined, } from '@ant-design/icons-vue';
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { AddBiddingAgency, EditBiddingAgency, DeleteBiddingAgency } from '@/api/demo/bidagency'
|
||||
import { uploadFile } from '@/api/demo/enterprise'
|
||||
import { accountStateOptions } from '@/views/demo/enterpriselist/util'
|
||||
const props = defineProps(['modalType', 'info'])
|
||||
const emits = defineEmits(['changeAddModal', 'query'])
|
||||
onMounted(() => {
|
||||
if(props.modalType == 'update'){
|
||||
id.value = props.info.id
|
||||
name.value = props.info.name
|
||||
code.value = props.info.code
|
||||
legalPerson.value = props.info.legalPerson
|
||||
|
||||
contactPerson.value = props.info.contactPerson
|
||||
phone.value = props.info.phone
|
||||
accountState.value = props.info.accountState
|
||||
license.value = props.info.license
|
||||
licenseList.value = [{
|
||||
uid: '-1',
|
||||
name: props.info.license,
|
||||
}]
|
||||
}
|
||||
})
|
||||
const id = ref('')
|
||||
const name = ref('')
|
||||
const code = ref('')
|
||||
const legalPerson = ref('')
|
||||
const license = ref('')
|
||||
const licenseList = ref([])
|
||||
const contactPerson = ref('')
|
||||
const phone = ref('')
|
||||
const accountState = ref(0)
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
|
||||
|
||||
const submit = () => {
|
||||
loading.value = true
|
||||
let params = {
|
||||
id: id.value,
|
||||
name: name.value,
|
||||
code: code.value,
|
||||
legalPerson: legalPerson.value,
|
||||
license: license.value,
|
||||
contactPerson: contactPerson.value,
|
||||
phone: phone.value,
|
||||
accountState: accountState.value,
|
||||
}
|
||||
console.log('params',params)
|
||||
if(props.modalType == 'insert'){
|
||||
AddBiddingAgency(params).then(res => {
|
||||
message.success('招标代理信息添加成功')
|
||||
emits('query')
|
||||
emits('changeAddModal',false)
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}else{
|
||||
EditBiddingAgency(params).then(res => {
|
||||
message.success('招标代理信息修改成功')
|
||||
emits('query')
|
||||
emits('changeAddModal',false)
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
const delData = () => {
|
||||
Modal.confirm({
|
||||
title: `确认删除该招标代理信息吗?`,
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
centered: true,
|
||||
onOk() {
|
||||
return DeleteBiddingAgency(id.value).then(res => {
|
||||
message.success("删除成功")
|
||||
emits('query')
|
||||
emits('changeAddModal',false)
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
const customRequest = (file) => {
|
||||
const formData = new FormData()
|
||||
formData.append('files', file.file)
|
||||
uploadFile(formData).then(res => {
|
||||
license.value = res[0].filePath
|
||||
console.log('licenseList',licenseList)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.title-div{
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
padding-top: 15px;
|
||||
padding-left: 26px;
|
||||
padding-right: 35px;
|
||||
padding-bottom: 14px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.title-span-div{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.title-icon{
|
||||
width: 3px;
|
||||
height: 18px;
|
||||
background: #0B60BD;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
margin-right: 9px;
|
||||
}
|
||||
.title-span{
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
color: #11131B;
|
||||
line-height: 33px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
}
|
||||
}
|
||||
.close-button{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-image: url('/public/tender/tender_close_modal_button.png');
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.interval{
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border: 1px solid #DBDBDB;
|
||||
opacity: 0.66;
|
||||
}
|
||||
.modal-content{
|
||||
display: flex;
|
||||
padding-top: 24px;
|
||||
padding-left: 38px;
|
||||
padding-right: 40px;
|
||||
padding-bottom: 27px;
|
||||
.item-title{
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: #000000;
|
||||
line-height: 20px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
.item-input{
|
||||
width: 286px;
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
// box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 6px;
|
||||
border: 1px solid #A9BBD8;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.item-select{
|
||||
width: 100%;
|
||||
margin-bottom: 24px;
|
||||
:deep(.ant-select-selector){
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
// box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 6px;
|
||||
border: 1px solid #A9BBD8;
|
||||
}
|
||||
:deep(.ant-select-selection-item){
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: #000000;
|
||||
line-height: 20px;
|
||||
}
|
||||
:deep(.ant-select-selection-placeholder){
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
line-height: 20px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
}
|
||||
.search-select-suffixIcon{
|
||||
width: 10px;
|
||||
height: 6px;
|
||||
background-image: url('/public/tender/search_select_icon.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
.item-date-picker{
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
// box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 6px;
|
||||
border: 1px solid #A9BBD8;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.left-content{
|
||||
width: 286px;
|
||||
margin-right: 124px;
|
||||
}
|
||||
.right-content{
|
||||
width: 286px;
|
||||
|
||||
}
|
||||
}
|
||||
.footer{
|
||||
height: 85px;
|
||||
padding-right: 34px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
.cancel-button{
|
||||
width: 101px;
|
||||
height: 40px;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 4px;
|
||||
border: 1px solid #979797;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #222738;
|
||||
line-height: 33px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
margin-right: 24px;
|
||||
}
|
||||
.delete-button{
|
||||
width: 146px;
|
||||
height: 40px;
|
||||
background: #ed6f6f;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 4px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
line-height: 33px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
margin-right: 24px;
|
||||
}
|
||||
.save-button{
|
||||
width: 146px;
|
||||
height: 40px;
|
||||
background: #0081FF;
|
||||
box-shadow: 0px 10px 30px 0px rgba(0,0,6,0.15);
|
||||
border-radius: 4px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #FFFFFF;
|
||||
line-height: 33px;
|
||||
text-shadow: 0px 10px 30px rgba(0,0,6,0.15);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -21,17 +21,17 @@
|
|||
<a-input
|
||||
style="width: 201px;"
|
||||
class="search-input"
|
||||
v-model:value="params.no"
|
||||
v-model:value="params.code"
|
||||
placeholder="请输入信用代码"
|
||||
/>
|
||||
<a-button class="search-button search" type="primary" >
|
||||
<a-button class="search-button search" type="primary" @click="query()">
|
||||
<template #icon>
|
||||
<div class="search-icon"></div>
|
||||
</template>
|
||||
搜索
|
||||
</a-button>
|
||||
</div>
|
||||
<a-button class="search-button add-button" type="primary" >
|
||||
<a-button class="search-button add-button" type="primary" @click="openAddEnterpriseModal('insert','')">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
</template>
|
||||
|
|
@ -39,31 +39,33 @@
|
|||
</a-button>
|
||||
</div>
|
||||
<div class="content-div">
|
||||
<a-table
|
||||
<a-table
|
||||
:loading="loading"
|
||||
rowKey="id"
|
||||
class="content-table"
|
||||
:row-selection="rowSelection"
|
||||
:columns="getShowColumns()"
|
||||
:data-source="data"
|
||||
:columns="columns"
|
||||
:data-source="showList"
|
||||
:pagination="false"
|
||||
:scroll="{ y: 550 }"
|
||||
>
|
||||
<template #bodyCell="{ column, text }">
|
||||
<template v-if="column.dataIndex === 'businesslicense'">
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template v-if="column.dataIndex === 'license'">
|
||||
<div class="blue-span">{{ text }}</div>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'status'">
|
||||
<div :class="`status-cell ${text == '正常'? 'success-status': 'error-status'}`">
|
||||
<template v-if="column.dataIndex === 'accountState'">
|
||||
<div :class="`status-cell ${text == 0? 'success-status': 'error-status'}`">
|
||||
<div class="status-icon"></div>
|
||||
{{ text }}
|
||||
{{ text == 0? '正常': '停用' }}
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'operate'">
|
||||
<a-dropdown overlayClassName="operate-dropdown" placement="bottom" :arrow="{ pointAtCenter: true }">
|
||||
<template #overlay>
|
||||
<a-menu @click="operateClick">
|
||||
<a-menu-item key="1">修改</a-menu-item>
|
||||
<a-menu-item key="2">审核</a-menu-item>
|
||||
<a-menu-item key="4">账号管理</a-menu-item>
|
||||
<a-menu-item key="1" :disabled="record.isReview" @click="openAddEnterpriseModal('update',record)">修改</a-menu-item>
|
||||
<a-menu-item key="2" :disabled="record.isReview" @click="review(record)">审核</a-menu-item>
|
||||
<a-menu-item key="4" @click="accountManage(record)">账号管理</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button class="operate-button" type="primary">
|
||||
|
|
@ -79,7 +81,7 @@
|
|||
v-model:current="page"
|
||||
v-model:pageSize="limit"
|
||||
show-quick-jumper
|
||||
:total="500"
|
||||
:total="total"
|
||||
@change="paginationChange"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -140,22 +142,40 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-modal width="775px" v-model:open="insertModalOpen" :footer="null" :closable="false" :destroyOnClose="true" :maskClosable="false" :keyboard="false">
|
||||
<InsertModal
|
||||
:modalType="modalType"
|
||||
:info="showInfo"
|
||||
@changeAddModal="changeAddModal"
|
||||
@query="query"
|
||||
/>
|
||||
</a-modal>
|
||||
<a-modal width="775px" v-model:open="accountManageModal" :footer="null" :closable="false" :destroyOnClose="true" :maskClosable="false" :keyboard="false">
|
||||
<AccountManage
|
||||
:info="enterpriseInfo"
|
||||
@changeManageModal="changeManageModal"
|
||||
@query="query"
|
||||
/>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue"
|
||||
import { yearOptions, proxyColumns, supplierColumns, proprietorColumns, data } from './util'
|
||||
import { ref, onMounted } from "vue"
|
||||
import { yearOptions, columns } from './util'
|
||||
import { SearchOutlined, PlusOutlined, DownOutlined } from '@ant-design/icons-vue'
|
||||
import { LoadBiddingAgency, ReviewBiddingAgency } from '@/api/demo/bidagency'
|
||||
import { message } from "ant-design-vue"
|
||||
import InsertModal from './InsertModal/index.vue'
|
||||
import AccountManage from './AccountManage/index.vue'
|
||||
|
||||
onMounted(() => {
|
||||
query()
|
||||
})
|
||||
const user = ref(3)
|
||||
const params = ref({
|
||||
type: 0,
|
||||
year: null,
|
||||
name: null,
|
||||
no: null,
|
||||
genre: null,
|
||||
form: null,
|
||||
name:null,
|
||||
code:null,
|
||||
})
|
||||
const fromValue = ref({
|
||||
title:'',
|
||||
|
|
@ -164,6 +184,14 @@ const fromValue = ref({
|
|||
})
|
||||
const page = ref(1)
|
||||
const limit = ref(10)
|
||||
const total = ref(0)
|
||||
const showList = ref([])
|
||||
const loading = ref(false)
|
||||
const insertModalOpen = ref(false)
|
||||
const accountManageModal = ref(false)
|
||||
const modalType = ref('')
|
||||
const showInfo = ref({})
|
||||
const enterpriseInfo = ref({})
|
||||
|
||||
const rowSelection = {
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
|
|
@ -174,25 +202,51 @@ const rowSelection = {
|
|||
name: record.name,
|
||||
}),
|
||||
};
|
||||
const changeTabs = (type) => {
|
||||
params.value.type = type
|
||||
}
|
||||
const paginationChange = (a,b) => {
|
||||
console.log(a,b)
|
||||
}
|
||||
const getShowColumns = () => {
|
||||
switch(user.value){
|
||||
case 1:
|
||||
return proxyColumns
|
||||
case 2:
|
||||
return supplierColumns
|
||||
case 3:
|
||||
return proprietorColumns
|
||||
}
|
||||
query()
|
||||
}
|
||||
const operateClick = (a,b,c) => {
|
||||
console.log(a,b,c)
|
||||
}
|
||||
const query = () => {
|
||||
let requestParams = {
|
||||
...params.value,
|
||||
page: page.value,
|
||||
limit: limit.value
|
||||
}
|
||||
loading.value = true
|
||||
LoadBiddingAgency(requestParams).then(res => {
|
||||
showList.value = res.items
|
||||
total.value = res.total
|
||||
page.value = 1
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
const changeAddModal = (type) => {
|
||||
insertModalOpen.value = type
|
||||
}
|
||||
const changeManageModal = (type) => {
|
||||
accountManageModal.value = type
|
||||
}
|
||||
const openAddEnterpriseModal = (type, item) => {
|
||||
modalType.value = type
|
||||
if(type == 'update'){
|
||||
showInfo.value = item
|
||||
}
|
||||
changeAddModal(true)
|
||||
}
|
||||
const review = (record) => {
|
||||
ReviewBiddingAgency(record.id).then(res => {
|
||||
message.success('招标代理信息审核成功')
|
||||
query()
|
||||
})
|
||||
}
|
||||
const accountManage = (record) => {
|
||||
enterpriseInfo.value = record
|
||||
accountManageModal.value = true
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
|||
|
|
@ -2,52 +2,18 @@ import { getYearList } from '@/views/demo/util'
|
|||
|
||||
export const yearOptions = getYearList();
|
||||
|
||||
export const proxyColumns = [
|
||||
{
|
||||
title: '项目名称',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '项目编号',
|
||||
dataIndex: 'no',
|
||||
},
|
||||
{
|
||||
title: '招标类型',
|
||||
dataIndex: 'type',
|
||||
},
|
||||
{
|
||||
title: '招标金额(元)',
|
||||
dataIndex: 'money',
|
||||
},
|
||||
{
|
||||
title: '招标形式',
|
||||
dataIndex: 'form',
|
||||
},
|
||||
{
|
||||
title: '采购人',
|
||||
dataIndex: 'person',
|
||||
},
|
||||
{
|
||||
title: '报名截止',
|
||||
dataIndex: 'endtime',
|
||||
},
|
||||
{
|
||||
title: '开标时间',
|
||||
dataIndex: 'starttime',
|
||||
},
|
||||
];
|
||||
export const supplierColumns = [
|
||||
export const columns = [
|
||||
{
|
||||
title: '企业名称',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '信用代码',
|
||||
dataIndex: 'no',
|
||||
dataIndex: 'code',
|
||||
},
|
||||
{
|
||||
title: '营业执照',
|
||||
dataIndex: 'businesslicense',
|
||||
dataIndex: 'license',
|
||||
},
|
||||
{
|
||||
title: '企业法人',
|
||||
|
|
@ -55,124 +21,18 @@ export const supplierColumns = [
|
|||
},
|
||||
{
|
||||
title: '联系人',
|
||||
dataIndex: 'user',
|
||||
dataIndex: 'contactPerson',
|
||||
},
|
||||
{
|
||||
title: '联系方式',
|
||||
dataIndex: 'usernumber',
|
||||
},
|
||||
{
|
||||
title: '企业资质',
|
||||
dataIndex: 'certification',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operate',
|
||||
},
|
||||
];
|
||||
export const proprietorColumns = [
|
||||
{
|
||||
title: '企业名称',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '信用代码',
|
||||
dataIndex: 'no',
|
||||
},
|
||||
{
|
||||
title: '营业执照',
|
||||
dataIndex: 'businesslicense',
|
||||
},
|
||||
{
|
||||
title: '企业法人',
|
||||
dataIndex: 'legalPerson',
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
dataIndex: 'user',
|
||||
},
|
||||
{
|
||||
title: '联系方式',
|
||||
dataIndex: 'usernumber',
|
||||
dataIndex: 'phone',
|
||||
},
|
||||
{
|
||||
title: '账号状态',
|
||||
dataIndex: 'status',
|
||||
},
|
||||
{
|
||||
title: '企业资质',
|
||||
dataIndex: 'certification',
|
||||
dataIndex: 'accountState',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operate',
|
||||
},
|
||||
];
|
||||
export const data = [
|
||||
{
|
||||
key: '1',
|
||||
name: 'XXXX有限公司',
|
||||
no: '91110302****015136',
|
||||
businesslicense: '文件名.jpg/png/pdf…',
|
||||
legalPerson: '李XX',
|
||||
user: '李XX',
|
||||
usernumber: '1877999966',
|
||||
certification: '材料类/工程类/服务类',
|
||||
status: '正常',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: 'XXXX有限公司',
|
||||
no: '91110302****015136',
|
||||
businesslicense: '文件名.jpg/png/pdf…',
|
||||
legalPerson: '李XX',
|
||||
user: '李XX',
|
||||
usernumber: '1877999966',
|
||||
certification: '材料类/工程类/服务类',
|
||||
status: '禁用',
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
name: 'XXXX有限公司',
|
||||
no: '91110302****015136',
|
||||
businesslicense: '文件名.jpg/png/pdf…',
|
||||
legalPerson: '李XX',
|
||||
user: '李XX',
|
||||
usernumber: '1877999966',
|
||||
certification: '材料类/工程类/服务类',
|
||||
status: '正常',
|
||||
},
|
||||
{
|
||||
key: '4',
|
||||
name: 'XXXX有限公司',
|
||||
no: '91110302****015136',
|
||||
businesslicense: '文件名.jpg/png/pdf…',
|
||||
legalPerson: '李XX',
|
||||
user: '李XX',
|
||||
usernumber: '1877999966',
|
||||
certification: '材料类/工程类/服务类',
|
||||
status: '禁用',
|
||||
},
|
||||
{
|
||||
key: '5',
|
||||
name: 'XXXX有限公司',
|
||||
no: '91110302****015136',
|
||||
businesslicense: '文件名.jpg/png/pdf…',
|
||||
legalPerson: '李XX',
|
||||
user: '李XX',
|
||||
usernumber: '1877999966',
|
||||
certification: '材料类/工程类/服务类',
|
||||
status: '正常',
|
||||
},
|
||||
{
|
||||
key: '6',
|
||||
name: 'XXXX有限公司',
|
||||
no: '91110302****015136',
|
||||
businesslicense: '文件名.jpg/png/pdf…',
|
||||
legalPerson: '李XX',
|
||||
user: '李XX',
|
||||
usernumber: '1877999966',
|
||||
certification: '材料类/工程类/服务类',
|
||||
status: '禁用',
|
||||
},
|
||||
];
|
||||
Loading…
Reference in New Issue