From 544cc078620392d9697878ab67a4676b3a82caa6 Mon Sep 17 00:00:00 2001 From: Teo <2642673902@qq.com> Date: Wed, 13 Aug 2025 19:47:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/materials/purchaseDoc/index.ts | 63 +++ src/api/materials/purchaseDoc/types.ts | 296 ++++++++++++++ src/components/Process/approvalButton.vue | 7 +- src/views/design/scheme/indexEdit.vue | 2 +- src/views/design/volumeCatalog/indexEdit.vue | 2 +- src/views/materials/batchPlan/index.vue | 6 +- src/views/materials/batchPlan/indexEdit.vue | 14 +- src/views/materials/purchaseDoc/index.vue | 392 +++++++++++++++++++ 8 files changed, 769 insertions(+), 13 deletions(-) create mode 100644 src/api/materials/purchaseDoc/index.ts create mode 100644 src/api/materials/purchaseDoc/types.ts create mode 100644 src/views/materials/purchaseDoc/index.vue diff --git a/src/api/materials/purchaseDoc/index.ts b/src/api/materials/purchaseDoc/index.ts new file mode 100644 index 0000000..9ce657f --- /dev/null +++ b/src/api/materials/purchaseDoc/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { PurchaseDocVO, PurchaseDocForm, PurchaseDocQuery } from '@/api/cailiaoshebei/purchaseDoc/types'; + +/** + * 查询物资-采购联系单列表 + * @param query + * @returns {*} + */ + +export const listPurchaseDoc = (query?: PurchaseDocQuery): AxiosPromise => { + return request({ + url: '/cailiaoshebei/purchaseDoc/list', + method: 'get', + params: query + }); +}; + +/** + * 查询物资-采购联系单详细 + * @param id + */ +export const getPurchaseDoc = (id: string | number): AxiosPromise => { + return request({ + url: '/cailiaoshebei/purchaseDoc/' + id, + method: 'get' + }); +}; + +/** + * 新增物资-采购联系单 + * @param data + */ +export const addPurchaseDoc = (data: PurchaseDocForm) => { + return request({ + url: '/cailiaoshebei/purchaseDoc', + method: 'post', + data: data + }); +}; + +/** + * 修改物资-采购联系单 + * @param data + */ +export const updatePurchaseDoc = (data: PurchaseDocForm) => { + return request({ + url: '/cailiaoshebei/purchaseDoc', + method: 'put', + data: data + }); +}; + +/** + * 删除物资-采购联系单 + * @param id + */ +export const delPurchaseDoc = (id: string | number | Array) => { + return request({ + url: '/cailiaoshebei/purchaseDoc/' + id, + method: 'delete' + }); +}; diff --git a/src/api/materials/purchaseDoc/types.ts b/src/api/materials/purchaseDoc/types.ts new file mode 100644 index 0000000..bbf7e44 --- /dev/null +++ b/src/api/materials/purchaseDoc/types.ts @@ -0,0 +1,296 @@ +export interface PurchaseDocVO { + /** + * 主键ID + */ + id: string | number; + + /** + * 项目ID + */ + projectId: string | number; + + /** + * 采购单编号 + */ + docCode: string; + + /** + * 供应商 + */ + supplier: string; + + /** + * 事由 + */ + reason: string; + + /** + * 设备统称 + */ + name: string; + + /** + * 到货日期 + */ + arrivalDate: string; + + /** + * 设计负责人联系方式 + */ + designDirectorTel: string; + + /** + * 现场技术负责人联系方式 + */ + technicalDirectorTel: string; + + /** + * 收货地址 + */ + receivingAddress: string; + + /** + * 联系人 + */ + contacts: string; + + /** + * 项目负责人 + */ + projectDirector: string; + + /** + * 采购经办人 + */ + purchasingAgent: string; + + /** + * 日期 + */ + preparedDate: string; + + /** + * 反馈文件地址 + */ + feedbackUrl: string; + + /** + * 签收单位 + */ + signingUnit: string; + + /** + * 签收人 + */ + signingPerson: string; + + /** + * 签收日期 + */ + signingDate: string; + + /** + * 审核状态 + */ + status: string; + +} + +export interface PurchaseDocForm extends BaseEntity { + /** + * 主键ID + */ + id?: string | number; + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 采购单编号 + */ + docCode?: string; + + /** + * 供应商 + */ + supplier?: string; + + /** + * 事由 + */ + reason?: string; + + /** + * 设备统称 + */ + name?: string; + + /** + * 到货日期 + */ + arrivalDate?: string; + + /** + * 设计负责人联系方式 + */ + designDirectorTel?: string; + + /** + * 现场技术负责人联系方式 + */ + technicalDirectorTel?: string; + + /** + * 收货地址 + */ + receivingAddress?: string; + + /** + * 联系人 + */ + contacts?: string; + + /** + * 项目负责人 + */ + projectDirector?: string; + + /** + * 采购经办人 + */ + purchasingAgent?: string; + + /** + * 日期 + */ + preparedDate?: string; + + /** + * 反馈文件地址 + */ + feedbackUrl?: string; + + /** + * 签收单位 + */ + signingUnit?: string; + + /** + * 签收人 + */ + signingPerson?: string; + + /** + * 签收日期 + */ + signingDate?: string; + + /** + * 审核状态 + */ + status?: string; + +} + +export interface PurchaseDocQuery extends PageQuery { + + /** + * 项目ID + */ + projectId?: string | number; + + /** + * 采购单编号 + */ + docCode?: string; + + /** + * 供应商 + */ + supplier?: string; + + /** + * 事由 + */ + reason?: string; + + /** + * 设备统称 + */ + name?: string; + + /** + * 到货日期 + */ + arrivalDate?: string; + + /** + * 设计负责人联系方式 + */ + designDirectorTel?: string; + + /** + * 现场技术负责人联系方式 + */ + technicalDirectorTel?: string; + + /** + * 收货地址 + */ + receivingAddress?: string; + + /** + * 联系人 + */ + contacts?: string; + + /** + * 项目负责人 + */ + projectDirector?: string; + + /** + * 采购经办人 + */ + purchasingAgent?: string; + + /** + * 日期 + */ + preparedDate?: string; + + /** + * 反馈文件地址 + */ + feedbackUrl?: string; + + /** + * 签收单位 + */ + signingUnit?: string; + + /** + * 签收人 + */ + signingPerson?: string; + + /** + * 签收日期 + */ + signingDate?: string; + + /** + * 审核状态 + */ + status?: string; + + /** + * 日期范围参数 + */ + params?: any; +} + + + diff --git a/src/components/Process/approvalButton.vue b/src/components/Process/approvalButton.vue index cb4fe8d..545e96a 100644 --- a/src/components/Process/approvalButton.vue +++ b/src/components/Process/approvalButton.vue @@ -15,6 +15,9 @@ diff --git a/src/views/design/scheme/indexEdit.vue b/src/views/design/scheme/indexEdit.vue index 307eb89..2a0ed6b 100644 --- a/src/views/design/scheme/indexEdit.vue +++ b/src/views/design/scheme/indexEdit.vue @@ -134,7 +134,7 @@ const submitFormData = ref({ const taskVariables = ref>({}); const flowCodeOptions = [ { - value: currentProject.value?.id + '_scheme', + value: currentProject.value?.id + '_completeScheme', label: '设计方案审批' } ]; diff --git a/src/views/design/volumeCatalog/indexEdit.vue b/src/views/design/volumeCatalog/indexEdit.vue index d5404e0..e0912ce 100644 --- a/src/views/design/volumeCatalog/indexEdit.vue +++ b/src/views/design/volumeCatalog/indexEdit.vue @@ -264,7 +264,7 @@ const handleStartWorkFlow = async (data: LeaveForm) => { }; //审批记录 const handleApprovalRecord = () => { - approvalRecordRef.value.init(form.value.id); + approvalRecordRef.value.init(form.value.design); }; //提交回调 const submitCallback = async () => { diff --git a/src/views/materials/batchPlan/index.vue b/src/views/materials/batchPlan/index.vue index 74d9bd4..49bc049 100644 --- a/src/views/materials/batchPlan/index.vue +++ b/src/views/materials/batchPlan/index.vue @@ -190,7 +190,7 @@ const total = ref(0); const mainTotal = ref(0); const batchOptions = ref([]); const { wf_business_status } = toRefs(proxy?.useDict('wf_business_status')); - +const route = useRoute(); const queryFormRef = ref(); const cailiaoshebeiFormRef = ref(); @@ -250,7 +250,7 @@ const batchNumber = ref(''); const { queryParams, form, rules } = toRefs(data); /** 查询物资-材料设备列表 */ -const getList = async (type: string) => { +const getList = async (type?: string) => { loading.value = true; const res = await listBatch(queryParams.value.batchData); batchOptions.value = res.rows; @@ -451,7 +451,7 @@ const handleAudit = async () => { proxy?.$modal.msgError('请选择批次号'); return; } - proxy?.$tab.closePage(proxy.$route); + proxy?.$tab.closePage(route); proxy?.$tab.openPage('/materials-management/batchPlan/indexEdit', '审核物资设备批次需求计划', { id: queryParams.value.mainData.mrpBaseId, status: form.value.mrpBaseBo.status + '_batchRequirements', diff --git a/src/views/materials/batchPlan/indexEdit.vue b/src/views/materials/batchPlan/indexEdit.vue index d6cfb39..4410be4 100644 --- a/src/views/materials/batchPlan/indexEdit.vue +++ b/src/views/materials/batchPlan/indexEdit.vue @@ -103,6 +103,8 @@ import { CailiaoshebeiVO } from '@/api/materials/batchPlan/types'; const userStore = useUserStoreHook(); // 从 store 中获取项目列表和当前选中的项目 const currentProject = computed(() => userStore.selectedProject); +const route = useRoute(); +const router = useRouter(); const buttonLoading = ref(false); const loading = ref(true); //路由参数 @@ -233,8 +235,8 @@ const handleApprovalRecord = () => { }; //提交回调 const submitCallback = async () => { - await proxy.$tab.closePage(proxy.$route); - proxy.$router.go(-1); + await proxy.$tab.closePage(route); + router.go(-1); }; //审批 const approvalVerifyOpen = async () => { @@ -246,8 +248,8 @@ const submit = async (status, data) => { if (status === 'draft') { buttonLoading.value = false; proxy?.$modal.msgSuccess('暂存成功'); - proxy.$tab.closePage(proxy.$route); - proxy.$router.go(-1); + proxy.$tab.closePage(route); + router.go(-1); } else { if ((form.value.mrpBaseBo.status === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') { flowCode.value = flowCodeOptions[0].value; @@ -264,8 +266,8 @@ const submit = async (status, data) => { onMounted(() => { nextTick(async () => { - routeParams.value = proxy.$route.query; - console.log('🚀 ~ proxy.$route.query:', proxy.$route.query); + routeParams.value = route.query; + console.log('🚀 ~ proxy.$route.query:', route.query); reset(); loading.value = false; if (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval') { diff --git a/src/views/materials/purchaseDoc/index.vue b/src/views/materials/purchaseDoc/index.vue new file mode 100644 index 0000000..adcc234 --- /dev/null +++ b/src/views/materials/purchaseDoc/index.vue @@ -0,0 +1,392 @@ + + +