From 8d27393ebdfe13ec451695bd200d1ebed0bb0d92 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Thu, 4 Jun 2026 10:37:57 +0800 Subject: [PATCH] =?UTF-8?q?2026-06-03=20=E7=89=A9=E6=96=99=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=E7=AE=A1=E7=90=86=E5=A2=9E=E5=8A=A0=E3=80=90=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=90=8C=E6=AD=A5=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qc/qc.js | 1 + src/views/modules/qc/qcPartAttribute.vue | 28 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js index 0410a54..18c3c0f 100644 --- a/src/api/qc/qc.js +++ b/src/api/qc/qc.js @@ -77,6 +77,7 @@ export const getOperationDescList = data => createAPI(`/pms/qc/getOperationDescL export const getManufacturerList = data => createAPI(`/pms/qc/getManufacturerList`,'post',data) export const getPartTemplateLists = data => createAPI(`/pms/qc/getPartTemplateLists`,'post',data) export const qcPartAttributeEdit = data => createAPI(`/pms/qc/qcPartAttributeEdit`,'post',data) +export const syncPartCatalog = data => createAPI(`/pms/qc/syncPartCatalog`,'post',data) // ===================================== 检验标准维护 ===================================== export const qcSpecSearch = data => createAPI(`/pms/qc/qcSpecSearch`,'post',data) diff --git a/src/views/modules/qc/qcPartAttribute.vue b/src/views/modules/qc/qcPartAttribute.vue index ca2d3ba..87babc5 100644 --- a/src/views/modules/qc/qcPartAttribute.vue +++ b/src/views/modules/qc/qcPartAttribute.vue @@ -32,6 +32,7 @@ {{'导出'}} + {{'数据同步'}} @@ -1518,6 +1519,7 @@ qcSpecUpdate, qcSpecDelete, getQcSpecItemList, + syncPartCatalog as syncPartCatalogApi, } from "@/api/qc/qc.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' @@ -2341,11 +2343,13 @@ authDelete: false, authDetail: false, authFile: false, + authSync: false, menuId: this.$route.meta.menuId, activeTable: 'bom', partCurrentRow: {}, secondHeight: 200, searchLoading: false, + syncLoading: false, saveLoading: false, editBatchVisible: false, batchLoading: false, @@ -3836,6 +3840,28 @@ }) }, + syncPartCatalogData () { + this.$confirm('确定执行数据同步吗?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.syncLoading = true + syncPartCatalogApi({site: '*'}).then(({data}) => { + this.syncLoading = false + if (data && data.code === 0) { + this.$message.success(data.msg || '数据同步成功') + this.getDataList() + } else { + this.$message.error(data.msg || '数据同步失败') + } + }).catch(err => { + this.syncLoading = false + this.$message.error('数据同步失败:' + (err.message || '未知错误')) + }) + }).catch(() => {}) + }, + // 导入 qcUpload () { let currentData = { @@ -4242,6 +4268,7 @@ let deleteFlag = this.isAuth(this.menuId+":delete") let detailFlag = this.isAuth(this.menuId+":detail") let fileFlag = this.isAuth(this.menuId+":file") + let syncFlag = this.isAuth(this.menuId+":sync") //处理页面的权限数据 this.authSearch = !searchFlag this.authSave = !saveFlag @@ -4249,6 +4276,7 @@ this.authDelete = !deleteFlag this.authDetail = !detailFlag this.authFile = !fileFlag + this.authSync = !syncFlag }, } }