From 1f8e7f2773e24d990334b41ea713d8b0264ea2d0 Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Wed, 20 Mar 2024 14:45:44 +0800 Subject: [PATCH] update --- src/api/procurement_contract.ts | 18 ++++--- src/api/suppler_list.ts | 19 ++++--- src/views/contract/index.vue | 1 + src/views/contract_negotiation/edit.vue | 53 +------------------ src/views/contract_negotiation/index.vue | 31 ++++++----- src/views/procurement_contract/detail.vue | 10 ++-- src/views/procurement_contract/edit.vue | 53 +------------------ src/views/procurement_contract/index.vue | 22 +++----- .../procurement_contract_detail/index.vue | 26 ++++----- 9 files changed, 65 insertions(+), 168 deletions(-) diff --git a/src/api/procurement_contract.ts b/src/api/procurement_contract.ts index 60e4c08..2de6336 100644 --- a/src/api/procurement_contract.ts +++ b/src/api/procurement_contract.ts @@ -1,26 +1,30 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 采购合同列表 export function apiProcurementContractLists(params: any) { - return request.get({ url: '/contract.procurement_contract/lists', params }) + return request.get({ url: "/contract.procurement_contract/lists", params }); } // 添加采购合同 export function apiProcurementContractAdd(params: any) { - return request.post({ url: '/contract.procurement_contract/add', params }) + return request.post({ url: "/contract.procurement_contract/add", params }); } // 编辑采购合同 export function apiProcurementContractEdit(params: any) { - return request.post({ url: '/contract.procurement_contract/edit', params }) + return request.post({ url: "/contract.procurement_contract/edit", params }); } // 删除采购合同 export function apiProcurementContractDelete(params: any) { - return request.post({ url: '/contract.procurement_contract/delete', params }) + return request.post({ url: "/contract.procurement_contract/delete", params }); } // 采购合同详情 export function apiProcurementContractDetail(params: any) { - return request.get({ url: '/contract.procurement_contract/detail', params }) -} \ No newline at end of file + return request.get({ url: "/contract.procurement_contract/detail", params }); +} + +export function apiProcurementContractSearch(params: any) { + return request.get({ url: "/contract.procurement_contract/datas", params }); +} diff --git a/src/api/suppler_list.ts b/src/api/suppler_list.ts index 990941a..b829627 100644 --- a/src/api/suppler_list.ts +++ b/src/api/suppler_list.ts @@ -1,27 +1,30 @@ -import request from '@/utils/request' +import request from "@/utils/request"; // 供应商表列表 export function apisupplierLists(params: any) { - return request.get({ url: '/supplier.supplier/lists', params }) + return request.get({ url: "/supplier.supplier/lists", params }); } // 添加供应商 export function apisupplierAdd(params: any) { - return request.post({ url: '/supplier.supplier/add', params }) + return request.post({ url: "/supplier.supplier/add", params }); } // 编辑供应商 export function apisupplierEdit(params: any) { - return request.post({ url: '/supplier.supplier/edit', params }) + return request.post({ url: "/supplier.supplier/edit", params }); } // 删除供应商 export function apisupplierDelete(params: any) { - return request.post({ url: '/supplier.supplier/delete', params }) + return request.post({ url: "/supplier.supplier/delete", params }); } - // 供应商详情 export function apisupplierDetail(params: any) { - return request.get({ url: '/supplier.supplier/detail', params }) -} \ No newline at end of file + return request.get({ url: "/supplier.supplier/detail", params }); +} + +export function apiSupplierSearch(params: any) { + return request.get({ url: "/supplier.supplier/datas", params }); +} diff --git a/src/views/contract/index.vue b/src/views/contract/index.vue index 682f7e4..9ea90b0 100644 --- a/src/views/contract/index.vue +++ b/src/views/contract/index.vue @@ -43,6 +43,7 @@ + diff --git a/src/views/contract_negotiation/edit.vue b/src/views/contract_negotiation/edit.vue index 73e74af..734b365 100644 --- a/src/views/contract_negotiation/edit.vue +++ b/src/views/contract_negotiation/edit.vue @@ -3,18 +3,6 @@ -
- - - - - - - -
- { return mode.value == 'edit' ? '编辑合同洽商' : '新增合同洽商' @@ -238,10 +223,7 @@ const delFileFn2 = (index: number) => { // 表单数据 const formData = reactive({ id: '', - dept_id: '', - org_id: '', contract_id: '', - // approve_id: '', negotiation_name: '', negotiation_no: '', negotiation_amount: '', @@ -320,34 +302,6 @@ watch( } ) -//获取所有组织 -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 setFormData = async (data: Record) => { if (data.negotiation_quotation && data.negotiation_quotation.length > 0) { @@ -379,10 +333,6 @@ const setFormData = async (data: Record) => { } } - - if (data.dept_id) { - getlist1(data.org_id) - } business_director.value = data.business_director contract_name.value = data.contract_name contract_code.value = data.contract_code @@ -422,7 +372,6 @@ const handleSubmit = async () => { const open = (type = 'add') => { mode.value = type popupRef.value?.open() - getlist() } // 关闭回调 diff --git a/src/views/contract_negotiation/index.vue b/src/views/contract_negotiation/index.vue index 421473e..c366e1f 100644 --- a/src/views/contract_negotiation/index.vue +++ b/src/views/contract_negotiation/index.vue @@ -2,16 +2,19 @@
+ + + + + + + + + - - - - - - - + @@ -42,6 +45,7 @@ + @@ -60,7 +64,8 @@ @click="handleDelete(row.id)"> 删除 - + 详情 @@ -80,7 +85,9 @@ import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' import { apiContractNegotiationLists, apiContractNegotiationDelete, apiContractNegotiationDetail } from '@/api/contract_negotiation' -import { timeFormat } from '@/utils/util' +import { apiContractSearch } from '@/api/contract' +import { apiProjectSearch } from '@/api/project' +import { apiCustomSearch } from '@/api/custom' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' import DetailPopup from './detail.vue' @@ -94,8 +101,9 @@ const showDtail = ref(false) // 查询条件 const queryParams = reactive({ - project_name: '', - negotiation_name: '', + contract_id: '', + project_id: '', + custom_id: '', negotiation_no: '', negotiation_type: '' }) @@ -160,4 +168,3 @@ if (route.query?.listId) { } getLists() - diff --git a/src/views/procurement_contract/detail.vue b/src/views/procurement_contract/detail.vue index b821303..82293e7 100644 --- a/src/views/procurement_contract/detail.vue +++ b/src/views/procurement_contract/detail.vue @@ -5,8 +5,10 @@ - - + {{ formData.supplier_code }} + {{ formData.supplier_name }} {{ formData.project_name }} @@ -17,10 +19,6 @@ label-class-name="my-label">{{ formData.contract_name }} {{ formData.contract_no }} - {{ formData.supplier_code }} - {{ formData.supplier_name }} {{ formData.contract_type_text }} diff --git a/src/views/procurement_contract/edit.vue b/src/views/procurement_contract/edit.vue index d94e94d..7c90609 100644 --- a/src/views/procurement_contract/edit.vue +++ b/src/views/procurement_contract/edit.vue @@ -3,18 +3,6 @@ -
- - - - - - - -
- { }) } - - -//获取所有组织 -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 formData = reactive({ id: '', - dept_id: '', - org_id: '', supplier_id: '', project_id: '', contract_name: '', @@ -532,9 +485,6 @@ const setFormData = async (data: Record) => { }); Object.assign(formDataannex, arry1) } - if (data.dept_id) { - getlist1(data.org_id) - } for (const key in formData) { if (data[key] != null && data[key] != undefined) { //@ts-ignore @@ -595,7 +545,6 @@ const open = (type = 'add') => { mode.value = type popupRef.value?.open() - getlist() } // 关闭回调 diff --git a/src/views/procurement_contract/index.vue b/src/views/procurement_contract/index.vue index 6f23d74..86f3831 100644 --- a/src/views/procurement_contract/index.vue +++ b/src/views/procurement_contract/index.vue @@ -3,16 +3,10 @@ - - - + - - - - + + @@ -41,10 +35,10 @@ + - @@ -66,7 +60,8 @@ @click="handleDelete(row.id)"> 删除
- + 详情 @@ -87,8 +82,8 @@ import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' import { apiProcurementContractLists, apiProcurementContractDelete, apiProcurementContractDetail } from '@/api/procurement_contract' import feedback from '@/utils/feedback' -import { apiProjectLists } from '@/api/project' -import { apisupplierLists } from '@/api/suppler_list' +import { apiProjectSearch } from '@/api/project' +import { apiSupplierSearch } from '@/api/suppler_list' import EditPopup from './edit.vue' import DetailPopup from './detail.vue' const detailRef = shallowRef>() @@ -170,4 +165,3 @@ projectlist() supplierlist() getLists() - diff --git a/src/views/procurement_contract_detail/index.vue b/src/views/procurement_contract_detail/index.vue index a35bf2f..e8fa4dd 100644 --- a/src/views/procurement_contract_detail/index.vue +++ b/src/views/procurement_contract_detail/index.vue @@ -1,14 +1,9 @@