Browse Source

2026-06-03

物料档案管理增加【数据同步】
master
fengyuan_yang 2 weeks ago
parent
commit
8d27393ebd
  1. 1
      src/api/qc/qc.js
  2. 28
      src/views/modules/qc/qcPartAttribute.vue

1
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)

28
src/views/modules/qc/qcPartAttribute.vue

@ -32,6 +32,7 @@
</el-form-item>
<el-form-item :label="' '">
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>
<el-button v-if="!authSync" :loading="syncLoading" @click="syncPartCatalogData()" type="primary" style="margin-left: 2px">{{'数据同步'}}</el-button>
</el-form-item>
</el-form>
@ -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
},
}
}

Loading…
Cancel
Save