From 9374ccfb147e2838b253c24b9e546aab1bf98c12 Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Tue, 19 Mar 2024 17:06:03 +0800 Subject: [PATCH 1/4] update --- src/views/bid_bidding_decision/index.vue | 33 +++++++--------- src/views/bid_buy_bidding_document/index.vue | 40 ++++++++++---------- src/views/bid_document_examination/index.vue | 23 ++++++----- src/views/bid_result/index.vue | 33 +++++++--------- 4 files changed, 59 insertions(+), 70 deletions(-) diff --git a/src/views/bid_bidding_decision/index.vue b/src/views/bid_bidding_decision/index.vue index 4efeaaf..31431a3 100644 --- a/src/views/bid_bidding_decision/index.vue +++ b/src/views/bid_bidding_decision/index.vue @@ -2,15 +2,15 @@ <div> <el-card class="!border-none mb-4" shadow="never"> <el-form class="mb-[-16px]" :model="queryParams" label-width="auto" inline> - <el-form-item label="决策编码" prop="code"> - <el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入决策编码" /> - </el-form-item> - <el-form-item label="项目名称" prop="project_name"> - <el-input class="w-[280px]" v-model="queryParams.project_name" clearable placeholder="请输入项目名称" /> + <el-form-item label="所属项目" prop="project_id"> + <selectRemote :formData="queryParams" model="project_id" :api="apiProjectSearch" /> </el-form-item> <el-form-item label="客户名称" prop="custom_name"> <el-input class="w-[280px]" v-model="queryParams.custom_name" clearable placeholder="请输入客户名称" /> </el-form-item> + <el-form-item label="决策编码" prop="code"> + <el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入决策编码" /> + </el-form-item> <el-form-item label="资金来源" prop="bidding_project_fund_source"> <el-select class="w-[280px]" v-model="queryParams.bidding_project_fund_source" clearable placeholder="请选择类型"> @@ -46,23 +46,19 @@ <el-table :data="pager.lists" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" /> <el-table-column label="序号" type="index" width="55" /> - <el-table-column label="决策编码" prop="code" show-overflow-tooltip /> - <el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip /> <el-table-column label="项目名称" prop="project_name" show-overflow-tooltip /> + <el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip /> + <el-table-column label="决策编码" prop="code" show-overflow-tooltip /> <el-table-column label="项目估算" width="125" prop="project_estimation" show-overflow-tooltip /> - <el-table-column label="资金来源" width="155" prop="bidding_project_fund_source" show-overflow-tooltip /> + <el-table-column label="资金来源" width="155" prop="bidding_project_fund_source" + show-overflow-tooltip /> <el-table-column label="投标时间" prop="bidding_time" width="155" show-overflow-tooltip /> - <!-- <el-table-column label="购买标书时间" width="155" prop="buy_bid_document_date" show-overflow-tooltip /> --> <el-table-column label="招标方式" prop="bid_type" show-overflow-tooltip /> <el-table-column label="竞争对手" prop="competitor" show-overflow-tooltip /> - <!-- <el-table-column label="是否需要保证金" prop="is_margin"> - <template #default="{ row }"> - <dict-value :options="dictData.whether_status" :value="row.is_margin" /> - </template> - </el-table-column> --> <el-table-column label="保证金金额" prop="margin_amount" width="125" show-overflow-tooltip /> <el-table-column label="开标日期" prop="bid_opening_date" show-overflow-tooltip /> - <el-table-column label="保证金退还时间" width="155" prop="margin_amount_return_date" show-overflow-tooltip /> + <el-table-column label="保证金退还时间" width="155" prop="margin_amount_return_date" + show-overflow-tooltip /> <el-table-column label="有无内部资源" width="155" prop="is_internal_resources" show-overflow-tooltip /> <el-table-column label="项目把握度" width="85" prop="project_assurance" show-overflow-tooltip /> <el-table-column label="操作" width="160" fixed="right"> @@ -93,8 +89,7 @@ import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' import { apiBidBiddingDecisionLists, apiBidBiddingDecisionDetail } from '@/api/bid_bidding_decision' -import { timeFormat } from '@/utils/util' -import feedback from '@/utils/feedback' +import { apiProjectSearch } from '@/api/project' import EditPopup from './edit.vue' import DetailPopup from './detail.vue' const detailRef = shallowRef<InstanceType<typeof DetailPopup>>() @@ -107,10 +102,9 @@ const showDtail = ref(false) // 查询条件 const queryParams = reactive({ - bidding_project_fund_source: '', bid_type: "", - project_name: "", + project_id: "", code: "", custom_name: "", }) @@ -154,4 +148,3 @@ if (route.query?.listId) { handledetail({ id: route.query.listId }) } </script> - diff --git a/src/views/bid_buy_bidding_document/index.vue b/src/views/bid_buy_bidding_document/index.vue index fd0ce3c..a0ff0a3 100644 --- a/src/views/bid_buy_bidding_document/index.vue +++ b/src/views/bid_buy_bidding_document/index.vue @@ -2,11 +2,15 @@ <div> <el-card class="!border-none mb-4" shadow="never"> <el-form class="mb-[-16px]" :model="queryParams" label-width="auto" inline> - <el-form-item label="项目" prop="project_id"> - <el-select class="w-[250px]" v-model="queryParams.project_id" clearable placeholder="请选择项目"> - <el-option v-for="(item, index) in projectList" :key="index" :label="item.name" - :value="parseInt(item.id)" /> - </el-select> + <el-form-item label="所属项目" prop="project_id"> + <selectRemote :formData="queryParams" model="project_id" :api="apiProjectSearch" /> + </el-form-item> + <el-form-item label="客户名称" prop="custom_name"> + <el-input class="w-[250px]" v-model="queryParams.custom_name" clearable placeholder="请输入客户名称" /> + </el-form-item> + <el-form-item label="决策编号" prop="bid_decision_code"> + <el-input class="w-[250px]" v-model="queryParams.bid_decision_code" clearable + placeholder="请输入投标决策编号" /> </el-form-item> <el-form-item label="标书编号" prop="bid_document_no"> <el-input class="w-[250px]" v-model="queryParams.bid_document_no" clearable placeholder="请输入标书编号" /> @@ -16,13 +20,8 @@ placeholder="请输入招标公司名称" /> </el-form-item> <el-form-item label="投标公司名称" prop="bid_company_name"> - <el-input class="w-[250px]" v-model="queryParams.bid_company_name" clearable placeholder="请输入招标公司名称" /> - </el-form-item> - <el-form-item label="项目名称" prop="project_name"> - <el-input class="w-[250px]" v-model="queryParams.project_name" clearable placeholder="请输入项目名称" /> - </el-form-item> - <el-form-item label="客户名称" prop="custom_name"> - <el-input class="w-[250px]" v-model="queryParams.custom_name" clearable placeholder="请输入客户名称" /> + <el-input class="w-[250px]" v-model="queryParams.bid_company_name" clearable + placeholder="请输入招标公司名称" /> </el-form-item> <el-form-item> <el-button type="primary" @click="resetPage">查询</el-button> @@ -44,11 +43,12 @@ <el-table :data="pager.lists" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" /> <el-table-column label="序号" type="index" width="55" /> - <el-table-column label="投标决策编号" prop="bid_decision_code" width="210" show-overflow-tooltip /> - <el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip /> <el-table-column label="项目名称" prop="project_name" show-overflow-tooltip /> + <el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip /> + <el-table-column label="投标决策编号" prop="bid_decision_code" width="210" show-overflow-tooltip /> <el-table-column label="标书编号" prop="bid_document_no" width="180" show-overflow-tooltip /> - <el-table-column label="招标公司名称" width="120" prop="invite_tenders_company_name" show-overflow-tooltip /> + <el-table-column label="招标公司名称" width="120" prop="invite_tenders_company_name" + show-overflow-tooltip /> <el-table-column label="投标公司名称" width="120" prop="bid_company_name" show-overflow-tooltip /> <el-table-column label="购买人员" prop="buyer" show-overflow-tooltip /> <el-table-column label="购买标书金额" width="120" prop="amount" show-overflow-tooltip /> @@ -66,7 +66,8 @@ <!-- <el-button v-perms="['bid.bid_buy_bidding_document/delete']" type="danger" link @click="handleDelete(row.id)"> 删除 </el-button> --> - <el-button v-perms="['bid.bid_buy_bidding_document/detail']" link @click="handledetail(row)"> + <el-button v-perms="['bid.bid_buy_bidding_document/detail']" link + @click="handledetail(row)"> 详情 </el-button> </template> @@ -86,9 +87,7 @@ import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' import { apiBidBuyBiddingDocumentLists, apiBidBuyBiddingDocumentDetail } from '@/api/bid_buy_bidding_document' -import { timeFormat } from '@/utils/util' -import { apiProjectLists } from '@/api/project' -import feedback from '@/utils/feedback' +import { apiProjectSearch } from '@/api/project' import EditPopup from './edit.vue' import DetailPopup from './detail.vue' const detailRef = shallowRef<InstanceType<typeof DetailPopup>>() @@ -106,8 +105,7 @@ const queryParams = reactive({ bid_document_no: '', invite_tenders_company_name: '', bid_company_name: '', - code: '', - project_name: '', + bid_decision_code: '', custom_name: '', }) diff --git a/src/views/bid_document_examination/index.vue b/src/views/bid_document_examination/index.vue index af7a015..24eda4e 100644 --- a/src/views/bid_document_examination/index.vue +++ b/src/views/bid_document_examination/index.vue @@ -2,11 +2,14 @@ <div> <el-card class="!border-none mb-4" shadow="never"> <el-form class="mb-[-16px]" :model="queryParams" inline> - <el-form-item label="购买标书" prop="buy_bidding_document_id"> - <el-select v-model="queryParams.buy_bidding_document_id" clearable placeholder="请选择购买标书"> - <el-option v-for="(item, index) in documentList" :key="index" :label="item.name" - :value="parseInt(item.id)" /> - </el-select> + <el-form-item label="所属项目" prop="project_id"> + <selectRemote :formData="queryParams" model="project_id" :api="apiProjectSearch" /> + </el-form-item> + <el-form-item label="标书编号" prop="bid_document_no"> + <el-input class="w-[250px]" v-model="queryParams.bid_document_no" clearable placeholder="请输入标书编号" /> + </el-form-item> + <el-form-item label="审查编号" prop="code"> + <el-input class="w-[250px]" v-model="queryParams.code" clearable placeholder="请输入审查编号" /> </el-form-item> <el-form-item label="是否需要保证金" prop="is_need_deposit"> <el-select v-model="queryParams.is_need_deposit" clearable placeholder="请选择是否需要保证金"> @@ -34,9 +37,9 @@ <el-table :data="pager.lists" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" /> <el-table-column label="序号" type="index" width="55" /> + <el-table-column label="项目名称" prop="project_name" show-overflow-tooltip /> <el-table-column label="审查编号" prop="code" show-overflow-tooltip /> <el-table-column label="标书编号" prop="bid_document_no" show-overflow-tooltip /> - <el-table-column label="项目名称" prop="project_name" show-overflow-tooltip /> <el-table-column label="招标公司名称" prop="invite_tenders_company_name" show-overflow-tooltip /> <el-table-column label="投标公司名称" prop="bid_company_name" show-overflow-tooltip /> <el-table-column label="招标项目资金来源" width="150" prop="bidding_project_fund_source" @@ -53,7 +56,8 @@ <!-- <el-button v-perms="['bid.bid_document_examination/delete']" type="danger" link @click="handleDelete(row.id)"> 删除 </el-button> --> - <el-button v-perms="['bid.bid_document_examination/detail']" link @click="handledetail(row)"> + <el-button v-perms="['bid.bid_document_examination/detail']" link + @click="handledetail(row)"> 详情 </el-button> </template> @@ -77,6 +81,7 @@ import { apiBidDocumentExaminationDetail } from '@/api/bid_document_examination' import { apiBidBuyBiddingDocumentLists } from '@/api/bid_buy_bidding_document' +import { apiProjectSearch } from '@/api/project' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' import DetailPopup from './detail.vue' @@ -94,7 +99,8 @@ const documentList = ref([]) // 查询条件 const queryParams = reactive({ - buy_bidding_document_id: '', + bid_document_no: '', + code: '', is_need_deposit: '' }) @@ -160,4 +166,3 @@ if (route.query?.listId) { documentlists() getLists() </script> - diff --git a/src/views/bid_result/index.vue b/src/views/bid_result/index.vue index ac761b9..1b0bcaa 100644 --- a/src/views/bid_result/index.vue +++ b/src/views/bid_result/index.vue @@ -2,20 +2,13 @@ <div> <el-card class="!border-none mb-4" shadow="never"> <el-form class="mb-[-16px]" :model="queryParams" inline> - - <el-form-item label="标书审查" prop="bid_document_examination_id"> - <el-select v-model="queryParams.bid_document_examination_id" clearable placeholder="请选择标书审查"> - <el-option v-for="(item, index) in documentList" :key="index" :label="item.bid_document_no" - :value="parseInt(item.id)" /> - </el-select> + <el-form-item label="所属项目" prop="project_id"> + <selectRemote :formData="queryParams" model="project_id" :api="apiProjectSearch" /> </el-form-item> - <el-form-item label="项目" prop="project_id"> - <el-select v-model="queryParams.project_id" clearable placeholder="请选择项目"> - <el-option v-for="(item, index) in projectList" :key="index" :label="item.name" - :value="parseInt(item.id)" /> - </el-select> + <el-form-item label="审查编号" prop="code"> + <el-input class="w-[250px]" v-model="queryParams.bid_document_examination_code" clearable + placeholder="请输入审查编号" /> </el-form-item> - <el-form-item> <el-button type="primary" @click="resetPage">查询</el-button> <el-button @click="resetParams">重置</el-button> @@ -29,17 +22,17 @@ </template> 新增 </el-button> - <el-button v-perms="['bid.bid_result/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)"> + <el-button v-perms="['bid.bid_result/delete']" :disabled="!selectData.length" + @click="handleDelete(selectData)"> 删除 </el-button> <div class="mt-4"> <el-table :data="pager.lists" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" /> <el-table-column label="序号" type="index" width="55" /> - - <el-table-column label="标书审查编号" prop="bid_document_examination_code" show-overflow-tooltip /> - <el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip /> <el-table-column label="项目名称" prop="project_name" show-overflow-tooltip /> + <el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip /> + <el-table-column label="标书审查编号" prop="bid_document_examination_code" show-overflow-tooltip /> <el-table-column label="项目编码" prop="project_code" show-overflow-tooltip /> <el-table-column label="投标时间" prop="bidding_time" show-overflow-tooltip /> <el-table-column label="开标日期" prop="bid_opening_date" show-overflow-tooltip /> @@ -56,7 +49,8 @@ <el-button v-perms="['bid.bid_result/edit']" type="primary" link @click="handleEdit(row)"> 编辑 </el-button> - <el-button v-perms="['bid.bid_result/delete']" type="danger" link @click="handleDelete(row.id)"> + <el-button v-perms="['bid.bid_result/delete']" type="danger" link + @click="handleDelete(row.id)"> 删除 </el-button> <el-button v-perms="['bid.bid_result/detail']" link @click="handledetail(row)"> @@ -82,7 +76,7 @@ import { apiBidResultLists, apiBidResultDelete, apiBidResultDetail } from '@/api import { apiBidDocumentExaminationLists } from '@/api/bid_document_examination' -import { apiProjectLists } from '@/api/project' +import { apiProjectSearch } from '@/api/project' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' import DetailPopup from './detail.vue' @@ -96,7 +90,7 @@ const projectList = ref([]) const documentList = ref([]) // 查询条件 const queryParams = reactive({ - bid_document_examination_id: '', + bid_document_examination_code: '', project_id: '' }) @@ -165,4 +159,3 @@ documentlists() projectlist() getLists() </script> - From acad0b892f3ef3f696f38170f02fedd28c716155 Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Tue, 19 Mar 2024 17:13:12 +0800 Subject: [PATCH 2/4] update --- src/views/bid_result/index.vue | 1 - src/views/quotation/index.vue | 17 ++++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/views/bid_result/index.vue b/src/views/bid_result/index.vue index 1b0bcaa..c747e16 100644 --- a/src/views/bid_result/index.vue +++ b/src/views/bid_result/index.vue @@ -33,7 +33,6 @@ <el-table-column label="项目名称" prop="project_name" show-overflow-tooltip /> <el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip /> <el-table-column label="标书审查编号" prop="bid_document_examination_code" show-overflow-tooltip /> - <el-table-column label="项目编码" prop="project_code" show-overflow-tooltip /> <el-table-column label="投标时间" prop="bidding_time" show-overflow-tooltip /> <el-table-column label="开标日期" prop="bid_opening_date" show-overflow-tooltip /> <el-table-column label="是否中标" prop="is_successful" show-overflow-tooltip> diff --git a/src/views/quotation/index.vue b/src/views/quotation/index.vue index fb6ad59..0250316 100644 --- a/src/views/quotation/index.vue +++ b/src/views/quotation/index.vue @@ -2,14 +2,11 @@ <div> <el-card class="!border-none mb-4" shadow="never"> <el-form class="mb-[-16px]" :model="queryParams" label-width="auto" inline> - <el-form-item label="客户" prop="custom_id"> - <el-select class="w-[280px]" v-model="queryParams.custom_id" clearable placeholder="请选择客户"> - <el-option v-for="(item, index) in customerList" :key="index" :label="item.name" - :value="parseInt(item.id)" /> - </el-select> + <el-form-item label="客户名称" prop="custom_id"> + <selectRemote :formData="queryParams" model="custom_id" :api="apiCustomSearch" /> </el-form-item> - <el-form-item label="编码" prop="code"> - <el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入编码" /> + <el-form-item label="报价单号" prop="code"> + <el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入报价单号" /> </el-form-item> <el-form-item label="制单人" prop="create_user"> <el-input class="w-[280px]" v-model="queryParams.create_user" clearable placeholder="请输入制单人" /> @@ -42,8 +39,8 @@ <el-table :data="pager.lists" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" /> <el-table-column label="序号" type="index" width="55" /> + <el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip /> <el-table-column label="报价单号" prop="code" show-overflow-tooltip /> - <el-table-column label="客户" prop="custom_name" show-overflow-tooltip /> <el-table-column label="报价日期" prop="quotation_date" show-overflow-tooltip /> <el-table-column label="联系人" prop="custom_master_name" show-overflow-tooltip /> <el-table-column label="联系电话" prop="custom_master_phone" show-overflow-tooltip /> @@ -81,8 +78,7 @@ import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' import { apiQuotationLists, apiQuotationDelete, apiQuotationDetail } from '@/api/quotation' -import { apiCustomLists } from '@/api/custom' -import { timeFormat } from '@/utils/util' +import { apiCustomSearch } from '@/api/custom' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' import DetailPopup from './detail.vue' @@ -160,4 +156,3 @@ const customerlist = async () => { customerlist() getLists() </script> - From a085fd8c17f9fd5d165c70d3aa508459d17543f2 Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Tue, 19 Mar 2024 17:22:11 +0800 Subject: [PATCH 3/4] update --- src/api/quotation.ts | 19 +++++++---- src/views/quotation/index.vue | 9 ----- src/views/quotation_detail/index.vue | 49 ++-------------------------- 3 files changed, 15 insertions(+), 62 deletions(-) diff --git a/src/api/quotation.ts b/src/api/quotation.ts index 3bda79d..d0ec226 100644 --- a/src/api/quotation.ts +++ b/src/api/quotation.ts @@ -1,26 +1,31 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 报价单列表 export function apiQuotationLists(params: any) { - return request.get({ url: '/quotation.quotation/lists', params }) + return request.get({ url: "/quotation.quotation/lists", params }); } // 添加报价单 export function apiQuotationAdd(params: any) { - return request.post({ url: '/quotation.quotation/add', params }) + return request.post({ url: "/quotation.quotation/add", params }); } // 编辑报价单 export function apiQuotationEdit(params: any) { - return request.post({ url: '/quotation.quotation/edit', params }) + return request.post({ url: "/quotation.quotation/edit", params }); } // 删除报价单 export function apiQuotationDelete(params: any) { - return request.post({ url: '/quotation.quotation/delete', params }) + return request.post({ url: "/quotation.quotation/delete", params }); } // 报价单详情 export function apiQuotationDetail(params: any) { - return request.get({ url: '/quotation.quotation/detail', params }) -} \ No newline at end of file + return request.get({ url: "/quotation.quotation/detail", params }); +} + +//apiQuotationSearch +export function apiQuotationSearch(params: any) { + return request.get({ url: "/quotation.quotation/datas", params }); +} diff --git a/src/views/quotation/index.vue b/src/views/quotation/index.vue index 0250316..2995ed3 100644 --- a/src/views/quotation/index.vue +++ b/src/views/quotation/index.vue @@ -87,7 +87,6 @@ const editRef = shallowRef<InstanceType<typeof EditPopup>>() // 是否显示编辑框 const showEdit = ref(false) const showDtail = ref(false) -const customerList = ref([]) // 查询条件 const queryParams = reactive({ @@ -140,19 +139,11 @@ const handleDelete = async (id: number | any[]) => { // 详情 const handleDetail = async (data: any) => { let res = await apiQuotationDetail({ id: data.id }) - showDtail.value = true await nextTick() detailRef.value?.open() detailRef.value?.setFormData(res) } -//获取客户列表 -const customerlist = async () => { - let res = await apiCustomLists({ page_size: 9999, page_no: 1 }) - customerList.value = res.lists -} - -customerlist() getLists() </script> diff --git a/src/views/quotation_detail/index.vue b/src/views/quotation_detail/index.vue index 16e64fd..cf989ab 100644 --- a/src/views/quotation_detail/index.vue +++ b/src/views/quotation_detail/index.vue @@ -2,14 +2,9 @@ <div> <el-card class="!border-none mb-4" shadow="never"> <el-form class="mb-[-16px]" :model="queryParams" inline> - <el-form-item label="报价单" prop="quotation_id"> - <el-select class="w-[280px]" v-model="queryParams.quotation_id" clearable placeholder="请选择税率"> - <el-option label="全部" value=""></el-option> - <el-option v-for="(item, index) in quotationList" :key="index" :label="item.code" - :value="item.id" /> - </el-select> + <el-form-item label="报价单号" prop="quotation_id"> + <selectRemote :formData="queryParams" model="quotation_id" :api="apiQuotationSearch" /> </el-form-item> - <el-form-item> <el-button type="primary" @click="resetPage">查询</el-button> <el-button @click="resetParams">重置</el-button> @@ -40,9 +35,7 @@ <el-table-column label="不含税金额" prop="tax_exclusive_amount" show-overflow-tooltip /> <el-table-column label="含税金额" prop="tax_inclusive_amount" show-overflow-tooltip /> <el-table-column label="备注" prop="remark" show-overflow-tooltip /> - <!-- <el-table-column label="添加人" prop="product_num" show-overflow-tooltip /> --> <el-table-column label="创建日期" prop="create_time" show-overflow-tooltip /> - <el-table-column label="备注" prop="remark" show-overflow-tooltip /> </el-table> </div> <div class="flex mt-4 justify-end"> @@ -56,31 +49,17 @@ <script lang="ts" setup name="quotationDetailLists"> import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' -import { apiQuotationLists } from '@/api/quotation' +import { apiQuotationSearch } from '@/api/quotation' import { apiQuotationDetailLists } from '@/api/quotation_detail' -import { timeFormat } from '@/utils/util' -import feedback from '@/utils/feedback' -// import EditPopup from './edit.vue' -// const editRef = shallowRef<InstanceType<typeof EditPopup>>() // 是否显示编辑框 const showEdit = ref(false) -const quotationList = ref([]) // 查询条件 const queryParams = reactive({ quotation_id: '', - }) -//获取报价单数据 -const quotationlist = () => { - apiQuotationLists({ page_no: 1, page_size: 9995 }).then((res) => { - quotationList.value = res.lists - }) - -} - // 选中数据 const selectData = ref<any[]>([]) @@ -98,27 +77,5 @@ const { pager, getLists, resetParams, resetPage } = usePaging({ params: queryParams }) -// // 添加 -// const handleAdd = async () => { -// showEdit.value = true -// await nextTick() -// editRef.value?.open('add') -// } - -// // 编辑 -// const handleEdit = async (data: any) => { -// showEdit.value = true -// await nextTick() -// editRef.value?.open('edit') -// editRef.value?.setFormData(data) -// } - -// // 删除 -// const handleDelete = async (id: number | any[]) => { -// await feedback.confirm('确定要删除?') -// await apiQuotationDetailDelete({ id }) -// getLists() -// } -quotationlist() getLists() </script> From 031a77c930737347180be415a31f0b23a5071a4e Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Tue, 19 Mar 2024 17:56:57 +0800 Subject: [PATCH 4/4] update --- src/views/customer_demand/detail.vue | 26 ---------- src/views/customer_demand/edit.vue | 35 -------------- src/views/project/components/Overview.vue | 4 -- src/views/project/detail.vue | 10 ---- src/views/project/edit.vue | 58 +---------------------- 5 files changed, 2 insertions(+), 131 deletions(-) diff --git a/src/views/customer_demand/detail.vue b/src/views/customer_demand/detail.vue index 769e363..1818030 100644 --- a/src/views/customer_demand/detail.vue +++ b/src/views/customer_demand/detail.vue @@ -5,10 +5,6 @@ <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> <el-tab-pane label="需求详情" name="first"> <el-descriptions :column="2" border> - <el-descriptions-item label="组织名称" label-align="left" align="left" - label-class-name="my-label">{{ formData.org_name }}</el-descriptions-item> - <el-descriptions-item label="部门名称" label-align="left" align="left" - label-class-name="my-label">{{ formData.dept_name }}</el-descriptions-item> <el-descriptions-item label="客户名称" label-align="left" align="left" label-class-name="my-label">{{ formData.custom_name }}</el-descriptions-item> <el-descriptions-item label="项目名称" label-align="left" align="left" @@ -48,17 +44,10 @@ }}</el-descriptions-item> <el-descriptions-item label="更新人" label-align="left" align="left" label-class-name="my-label"> {{ formData.update_user_name - - }}</el-descriptions-item> <el-descriptions-item label="更新日期" label-align="left" align="left" label-class-name="my-label"> {{ formData.update_time - - - }}</el-descriptions-item> - - <el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label"> <div v-if="formDataannex.length > 0"> @@ -66,7 +55,6 @@ style="margin-left: 5px;display: block;"> <el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri" target="_blank">文件{{ index + 1 }}查看</el-link> - </div> </div> <div v-else> @@ -113,7 +101,6 @@ <el-table-column label="概算金额(万元)" prop='estimate_amount' width="180" /> <el-table-column label="要求" prop='ask' /> <el-table-column label="附件" prop="annex" show-overflow-tooltip> - <template #default="{ row }"> <div v-if="row.annex && row.annex.length > 0"> <div v-for="(item, i) in row.annex " :key='i'> @@ -145,7 +132,6 @@ <el-table-column label="竞争对手劣势" prop='competitor_disadvantages' /> <el-table-column label="备注" prop='remark' /> <el-table-column label="附件" prop="annex" show-overflow-tooltip> - <template #default="{ row }"> <div v-if="row.annex && row.annex.length > 0"> <div v-for="(item, i) in row.annex " :key='i'> @@ -180,7 +166,6 @@ import { apiCustomDetail } from '@/api/custom' import { apiCustomerDemandSolutionLists } from '@/api/customer_demand_solution' import { apiProjectEstimateLists } from '@/api/project_estimate' import { apiCompetitorLists } from '@/api/competitor' -import { timeFormat } from '@/utils/util' import type { TabsPaneContext } from 'element-plus' const activeName = ref('first') @@ -231,7 +216,6 @@ const formData = reactive({ }) - //条数 const handleSizeChange1 = (val: number) => { pager1.page_size = val @@ -284,9 +268,6 @@ const competitorLists = () => { }) } - - - // 获取详情 const setFormData = async (data: Record<any, any>) => { Object.assign(formData, data) @@ -331,13 +312,6 @@ const handleClose = () => { emit('close') } - - - - - - - defineExpose({ open, setFormData, diff --git a/src/views/customer_demand/edit.vue b/src/views/customer_demand/edit.vue index a0776f7..2188987 100644 --- a/src/views/customer_demand/edit.vue +++ b/src/views/customer_demand/edit.vue @@ -3,19 +3,6 @@ <popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose"> <el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules"> - <el-form-item label="组织" prop="org_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"> - <el-select class="flex-1" v-model="formData.org_id" clearable placeholder="请选择组织" - @change="area_change"> - <el-option v-for="(item, index) in orglist" :key="index" :label="item.name" - :value="parseInt(item.id)" /> - </el-select> - </el-form-item> - <el-form-item label="部门" prop="dept_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"> - <el-select class="flex-1" v-model="formData.dept_id" clearable placeholder="请选择部门"> - <el-option v-for="(item, index) in jobs" :key="index" :label="item.name" - :value="parseInt(item.id)" /> - </el-select> - </el-form-item> <el-form-item label="项目名称" prop="project_id" @click="showDialog = true" :rules="[{ required: true, message: '不可为空', trigger: 'change' }]"> <el-input v-model="project_name" clearable placeholder="请选择项目" :disabled="project" /> @@ -69,8 +56,6 @@ <script lang="ts" setup name="customerDemandEdit"> import type { FormInstance } from 'element-plus' import Popup from '@/components/popup/index.vue' -import { deptAll } from '@/api/org/department' -import { getAll } from '@/api/org/organization' import projectTable from "@/components/project/index.vue" import { apiCustomerDemandAdd, apiCustomerDemandEdit, apiCustomerDemandDetail } from '@/api/customer_demand' import { useDictData } from '@/hooks/useDictOptions' @@ -98,24 +83,9 @@ const formDataannex = reactive([]) - -const getlista = () => { - getAll().then((res) => { - // orglist = res.data - - Object.assign(orglist, res) - - }) -} - const area_change = (e: any) => { formData.org_id = e let data = { 'org_id': e } - deptAll(data).then((res) => { - - Object.assign(jobs, res) - - }) } // 弹窗标题 const popupTitle = computed(() => { @@ -160,9 +130,6 @@ const formRules = reactive<any>({ // 获取详情 const setFormData = async (data: Record<any, any>) => { - deptAll({ 'org_id': data.org_id }).then((res) => { - Object.assign(jobs, res) - }) if (data.annex && data.annex.length > 0) { const arry1 = data.annex.map((item: any, index: any) => { return { @@ -217,8 +184,6 @@ const handleClose = () => { emit('close') } - -getlista() defineExpose({ open, setFormData, diff --git a/src/views/project/components/Overview.vue b/src/views/project/components/Overview.vue index ad3006a..b88742e 100644 --- a/src/views/project/components/Overview.vue +++ b/src/views/project/components/Overview.vue @@ -1,9 +1,5 @@ <template> <el-descriptions :column="3" title="基本信息" border> - <el-descriptions-item label="组织名称" label-align="left" align="left" label-class-name="my-label">{{ formData.org_name - }}</el-descriptions-item> - <el-descriptions-item label="部门名称" label-align="left" align="left" label-class-name="my-label"> - {{ formData.dept_name }}</el-descriptions-item> <el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label">{{ formData.name }}</el-descriptions-item> <el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> diff --git a/src/views/project/detail.vue b/src/views/project/detail.vue index f8e9730..f4d123e 100644 --- a/src/views/project/detail.vue +++ b/src/views/project/detail.vue @@ -58,11 +58,8 @@ import type { FormInstance } from 'element-plus' import Popup from '@/components/popup/index.vue' import { apiCustomDetail } from '@/api/custom' -import { timeFormat } from '@/utils/util' import type { PropType } from 'vue' import type { TabsPaneContext } from 'element-plus' -import { apiCustomServiceLists } from '@/api/custom_service' -import { subpackagdetailLists } from '@/api/project_subpackage_budget_detail' import Overview from "./components/Overview.vue" import Business from "./components/Business.vue" import tender from "./components/tender.vue" @@ -132,13 +129,6 @@ const handleClose = () => { emit('close') } - - - - - - - defineExpose({ open, setFormData, diff --git a/src/views/project/edit.vue b/src/views/project/edit.vue index 523a4e0..4d6406f 100644 --- a/src/views/project/edit.vue +++ b/src/views/project/edit.vue @@ -3,20 +3,9 @@ <popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose"> <el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules"> - <div - style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;"> - - <el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门"> - <el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" /> - </el-select> - <el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" - @change="deptrmt"> - <el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" /> - </el-select> - </div> <el-row :gutter="10"> <el-col :span="8"> - <el-form-item label="客户名s称" prop="custom_name" + <el-form-item label="客户名称" prop="custom_name" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"> <el-input v-model="formData.custom_name" @click="showDialog = true" clearable placeholder="请选择客户" /> @@ -117,12 +106,6 @@ value-format="YYYY-MM-DD" placeholder="选择投标时间"> </el-date-picker> </el-form-item> - - <!-- <el-form-item label="投标时间" prop="bidding_time"> - <el-date-picker class="flex-1 !flex" v-model="formData.bidding_time" clearable type="date" - value-format="YYYY-MM-DD" placeholder="选择投标时间"> - </el-date-picker> - </el-form-item> --> </el-col> <el-col :span="8"> <el-form-item label="信息来源" prop="information_sources" @@ -249,13 +232,8 @@ import { apiProjectAdd, apiProjectEdit, apiProjectDetail } from '@/api/project' import { getAllProjectTypes } from '@/api/projecttype' import type { PropType } from 'vue' - - const protype = reactive([]) -const list1 = reactive([]) -const list2 = reactive([]) -import { deptAll } from '@/api/org/department' -import { getAll } from '@/api/org/organization' + defineProps({ dictData: { type: Object as PropType<Record<string, any[]>>, @@ -273,34 +251,7 @@ const customEvent = (e: any) => { formData.custom_name = e.name; showDialog.value = false; }; -//获取所有组织 -const getlist = () => { - getAll().then((res) => { - Object.assign(list1, res) - if (res.length > 0 && !formData.org_id) { - formData.org_id = res[0].id - deptAll({ 'org_id': res[0].id }).then((res) => { - if (res.length > 0) { - Object.assign(list2, res) - formData.dept_id = res[0].id - } - }) - } - }) -} -//获取部门 -const deptrmt = (e: any) => { - formData.dept_id = '' - getlist1(e) - -} -//获取所有部门 -const getlist1 = (id: any) => { - deptAll({ 'org_id': id }).then((res) => { - list2.splice(0, list2.length, ...res) - }) -} // 弹窗标题 const popupTitle = computed(() => { return mode.value == 'edit' ? '编辑项目表' : '新增项目表' @@ -358,10 +309,6 @@ const setFormData = async (data: Record<any, any>) => { formData[key] = data[key] } } - if (data.dept_id) { - getlist1(data.org_id) - } - if (!Array.isArray(formData.project_content)) formData.project_content = []; if (!Array.isArray(formData.annex)) formData.annex = []; //@ts-ignore @@ -392,7 +339,6 @@ const handleSubmit = async () => { const open = (type = 'add') => { mode.value = type popupRef.value?.open() - getlist() getAllProjectTypes().then((res) => { protype.splice(0, protype.length, ...res);