From bcf870b58e49769454d8333fbe2c6535beeeb887 Mon Sep 17 00:00:00 2001 From: yuejiayang <146344614+YangLei105@users.noreply.github.com> Date: Sat, 14 Sep 2024 16:38:47 +0800 Subject: [PATCH] =?UTF-8?q?2024.9.14=20=E4=B8=80=E3=80=81=E7=89=A9?= =?UTF-8?q?=E6=96=99=E6=88=90=E6=9C=AC=E4=BF=A1=E6=81=AF=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=EF=BC=88=E7=AC=AC=E4=B8=80=E7=89=88=EF=BC=89=20=E4=BA=8C?= =?UTF-8?q?=E3=80=81=E5=8A=A0=E5=B7=A5=E4=B8=AD=E5=BF=83=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=94=B9=E9=80=A0=20=E4=B8=89=E3=80=81=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=B7=A5=E5=BA=8F=EF=BC=88=E7=AC=AC=E4=B8=80=E7=89=88=EF=BC=89?= =?UTF-8?q?=20=E5=9B=9B=E3=80=81=E5=95=86=E5=93=81=E7=BB=84=20-=20?= =?UTF-8?q?=E6=A0=87=E5=87=86=E5=B7=A5=E5=BA=8F=EF=BC=88=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E7=89=88=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/fanucGroup/fanuc.js | 3 + src/api/part/partCostInformation.js | 7 + src/api/part/partProductGroupStdProcess.js | 10 + src/api/part/standardRoutingOperation.js | 26 + src/views/modules/common/Chooselist_eam.vue | 1 + src/views/modules/fanuc/fanuc.vue | 147 ++- .../modules/part/partCostInformation.vue | 715 ++++++++++++++ .../part/partProductGroupInformation.vue | 437 ++++++++- .../modules/part/standardRoutingOperation.vue | 893 ++++++++++++++++++ 9 files changed, 2237 insertions(+), 2 deletions(-) create mode 100644 src/api/part/partCostInformation.js create mode 100644 src/api/part/partProductGroupStdProcess.js create mode 100644 src/api/part/standardRoutingOperation.js create mode 100644 src/views/modules/part/partCostInformation.vue create mode 100644 src/views/modules/part/standardRoutingOperation.vue diff --git a/src/api/fanucGroup/fanuc.js b/src/api/fanucGroup/fanuc.js index f8bcb75..07d3344 100644 --- a/src/api/fanucGroup/fanuc.js +++ b/src/api/fanucGroup/fanuc.js @@ -23,6 +23,9 @@ export const deleteByCost= data => createAPI(`/cost/delete`,'post',data) //成本查询(绑定人工等级) export const queryCostByLabor= data => createAPI(`/cost/queryByLabor`,'post',data) +// 机台查询 +export const queryResourceInfo= data => createAPI(`/fanuc/queryResourceInfo`,'post',data) + diff --git a/src/api/part/partCostInformation.js b/src/api/part/partCostInformation.js new file mode 100644 index 0000000..97488fd --- /dev/null +++ b/src/api/part/partCostInformation.js @@ -0,0 +1,7 @@ +import { createAPI } from "@/utils/httpRequest.js"; + +// partCostInformationSearch 物料成本信息列表查询 +export const partCostInformationSearch = data => createAPI(`/part/partCostInformation/partCostInformationSearch`,'post',data) + +// partCostInformationEdit 物料成本信息编辑 +export const partCostInformationEdit = data => createAPI(`/part/partCostInformation/partCostInformationEdit`,'post',data) diff --git a/src/api/part/partProductGroupStdProcess.js b/src/api/part/partProductGroupStdProcess.js new file mode 100644 index 0000000..9bbae5f --- /dev/null +++ b/src/api/part/partProductGroupStdProcess.js @@ -0,0 +1,10 @@ +import { createAPI } from "@/utils/httpRequest.js"; + +//查询 +export const searchProductGroupStdProcess= data => createAPI(`/plm/partProductGroupInformation/searchProductGroupStdProcess`,'post',data) + +//新增 +export const saveStdProcessData= data => createAPI(`/plm/partProductGroupInformation/saveStdProcessData`,'post',data) + +// 删除 +export const delProductGroupStdProcess= data => createAPI(`/plm/partProductGroupInformation/delProductGroupStdProcess`,'post',data) diff --git a/src/api/part/standardRoutingOperation.js b/src/api/part/standardRoutingOperation.js new file mode 100644 index 0000000..31481bd --- /dev/null +++ b/src/api/part/standardRoutingOperation.js @@ -0,0 +1,26 @@ +import { createAPI } from "@/utils/httpRequest.js"; + +/** + * 分类信息列表查询 + * @param data + * @returns {*} + */ +export const searchStandardRoutingOperationList = data => createAPI(`/part/standardRoutingOperation/searchStandardRoutingOperationList`,'post',data) +/** + * 分类信息新增 + * @param data + * @returns {*} + */ +export const saveStandardRoutingOperation = data => createAPI(`/part/standardRoutingOperation/saveStandardRoutingOperation`,'post',data) +/** + * 分类信息编辑 + * @param data + * @returns {*} + */ +export const updateStandardRoutingOperation = data => createAPI(`/part/standardRoutingOperation/updateStandardRoutingOperation`,'post',data) +/** + * 分类信息删除 + * @param data + * @returns {*} + */ +export const deleteStandardRoutingOperation = data => createAPI(`/part/standardRoutingOperation/deleteStandardRoutingOperation`,'post',data) diff --git a/src/views/modules/common/Chooselist_eam.vue b/src/views/modules/common/Chooselist_eam.vue index 3a4a837..32958c2 100644 --- a/src/views/modules/common/Chooselist_eam.vue +++ b/src/views/modules/common/Chooselist_eam.vue @@ -241,6 +241,7 @@ export default { this.param6 = '' this.param7 = this.$store.state.user.name this.param = '' + this.dataList = [] } } } diff --git a/src/views/modules/fanuc/fanuc.vue b/src/views/modules/fanuc/fanuc.vue index 889f470..68c6a24 100644 --- a/src/views/modules/fanuc/fanuc.vue +++ b/src/views/modules/fanuc/fanuc.vue @@ -55,7 +55,7 @@ :height="height" :data="dataList" @row-click="changeData" - + :row-style="rowStyle" border style="width: 100%;"> + + + + + + + + @@ -287,6 +312,7 @@ import { queryByCost, //成本查询 amendByCost,//成本修改 deleteByCost,//删除成本 + queryResourceInfo,//机台查询 } from "@/api/fanucGroup/fanuc.js" import {getSiteAndBuByUserName} from "@/api/eam/eam.js" @@ -342,6 +368,7 @@ export default { dataList: [], dataList1: [], dataList2: [], + dataList3: [], dataListLoading: false, modalFlag: false, modalDisableFlag: false, @@ -496,6 +523,24 @@ export default { status: true, fixed: '', }, + { + userId: this.$store.state.user.name, + functionId: 501002, + serialNumber: '501002TableResourceCount', + tableId: "501002Table", + tableName: "状态", + columnWidth: 60, + columnProp: 'resourceCount', + headerAlign: 'center', + align: "center", + columnLabel: '机台数', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, { userId: this.$store.state.user.name, functionId: 501002, @@ -951,6 +996,80 @@ export default { fixed: '', }, ], + columnList3: [ + { + userId: this.$store.state.user.name, + functionId: 501002, + serialNumber: '501002TableResourceId', + tableId: "501002Table", + tableName: "机台编码", + columnWidth: 130, + columnProp: 'resourceId', + headerAlign: 'center', + align: "left", + columnLabel: '机台编码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + userId: this.$store.state.user.name, + functionId: 501002, + serialNumber: '501002TableResourceDesc', + tableId: "501002Table", + tableName: "机台名称", + columnWidth: 130, + columnProp: 'resourceDesc', + headerAlign: 'center', + align: "left", + columnLabel: '机台名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + userId: this.$store.state.user.name, + functionId: 501002, + serialNumber: '501002TableCreationDate', + tableId: "501002Table", + tableName: "创建时间", + columnWidth: 130, + columnProp: 'creationDate', + headerAlign: 'center', + align: "center", + columnLabel: '创建时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + { + userId: this.$store.state.user.name, + functionId: 501002, + serialNumber: '501002TableCreatedBy', + tableId: "501002Table", + tableName: "创建人", + columnWidth: 130, + columnProp: 'createdBy', + headerAlign: 'center', + align: "left", + columnLabel: '创建人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + }, + ], rules: { prodLineNo: [ { @@ -1075,6 +1194,10 @@ export default { this.pageSize = data.page.pageSize this.totalPage = data.page.totalCount } + if (this.dataList.length > 0) { + this.currentRow = this.dataList[0] + this.refreshCurrentTabTable() + } }) }, @@ -1098,6 +1221,8 @@ export default { this.refreshCurrentTabTable() } else if (this.activeName == 'cost') { this.refreshCurrentTabTable2() + } else if (this.activeName == 'resource') { + this.refreshCurrentTabTable3() } }, @@ -1109,8 +1234,17 @@ export default { this.refreshCurrentTabTable() } else if (this.activeName == 'cost') { this.refreshCurrentTabTable2() + } else if (this.activeName == 'resource') { + this.refreshCurrentTabTable3() } }, + + rowStyle ({row}) { + if (this.currentRow.workCenterNo === row.workCenterNo) { + return { 'background-color': '#E8F7F6', cursor: 'pointer' }; + } + }, + refreshCurrentTabTable () { findFanuc(this.currentRow).then(({data}) => { @@ -1136,6 +1270,17 @@ export default { }); }, + refreshCurrentTabTable3 () { + queryResourceInfo(this.currentRow).then(({data}) => { + //区分请求成功和失败的状况 + if (data && data.code == 0) { + this.dataList3 = data.rows + } else { + this.dataList3 = []; + } + }); + }, + // 新增按钮 addModal () { this.modalData1 = { diff --git a/src/views/modules/part/partCostInformation.vue b/src/views/modules/part/partCostInformation.vue new file mode 100644 index 0000000..b39b557 --- /dev/null +++ b/src/views/modules/part/partCostInformation.vue @@ -0,0 +1,715 @@ + + + +``` diff --git a/src/views/modules/part/partProductGroupInformation.vue b/src/views/modules/part/partProductGroupInformation.vue index 9951742..bf45ae5 100644 --- a/src/views/modules/part/partProductGroupInformation.vue +++ b/src/views/modules/part/partProductGroupInformation.vue @@ -75,11 +75,13 @@ fixed="right" header-align="center" align="center" - width="160" + width="230" label="操作"> @@ -138,6 +140,90 @@ 关闭 + + + + + + + + + + + 查询 + 新增 + + + + + + + + + + + + 关闭 + + + + + + + + + + + + + 确定 + 关闭 + + @@ -149,9 +235,11 @@ import { productGroupInformationEdit, // 商品信息编辑 productGroupInformationDelete // 商品信息删除 } from '@/api/part/partProductGroupInformation.js' +import {searchProductGroupStdProcess,saveStdProcessData,delProductGroupStdProcess} from '@/api/part/partProductGroupStdProcess.js' import {getSiteAndBuByUserName} from "@/api/eam/eam.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' +import {searchStandardRoutingOperationList} from "../../../api/part/standardRoutingOperation"; export default { components: { Chooselist @@ -179,6 +267,11 @@ export default { exportFooter: [], resultList: [], userBuList: [], + stdProcessList: [], + stdProcessList1: [], + productGroupCurrentRow: {}, + // 多选 + stdProcessList1Selections: [], // ======== 行高 ======== height: 200, // ======== 分页 ======== @@ -194,6 +287,28 @@ export default { productGroupName: '', active: '', type: '', + operationNo: '', + operationName: '', + page: 1, + limit: 10 + }, + searchData1: { + site: '', + userName: this.$store.state.user.name, + buNo: '', + productGroupId: '', + productGroupName: '', + active: '', + type: '', + operationNo: '', + operationName: '', + page: 1, + limit: 10 + }, + searchData2: { + site: '', + userName: this.$store.state.user.name, + buNo: '', page: 1, limit: 10 }, @@ -355,6 +470,204 @@ export default { columnWidth: 100 }, ], + stdProcessColumnList: [ + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1BuDesc', + tableId: "6010012Table1", + tableName: "标准工序表", + columnProp: 'buDesc', + headerAlign: "center", + align: "center", + columnLabel: 'BU', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1OperationNo', + tableId: "6010012Table1", + tableName: "标准工序表", + columnProp: 'operationNo', + headerAlign: "center", + align: "left", + columnLabel: '工序号', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 120 + }, + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1OperationName', + tableId: "6010012Table1", + tableName: "标准工序表", + columnProp: 'operationName', + headerAlign: "center", + align: "left", + columnLabel: '工序名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 300 + }, + { + functionId: 6010012, + serialNumber: '6010012Table1WorkCenterNo', + tableId: '6010012Table1', + tableName: '标准工序表', + columnProp: 'workCenterNo', + headerAlign: 'center', + align: 'center', + columnLabel: '加工中心编码', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + functionId: 6010012, + serialNumber: '6010012Table1WorkCenterDesc', + tableId: '6010012Table1', + tableName: '标准工序表', + columnProp: 'workCenterDesc', + headerAlign: 'center', + align: 'center', + columnLabel: '加工中心名称', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 200 + }, + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1LaborClassDesc', + tableId: "6010012Table1", + tableName: "标准工序表", + columnProp: 'laborClassDesc', + headerAlign: "center", + align: "center", + columnLabel: '人员等级', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1SetupLaborClassDesc', + tableId: "6010012Table1", + tableName: "标准工序表", + columnProp: 'setupLaborClassDesc', + headerAlign: "center", + align: "center", + columnLabel: '调机时人员等级', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1CreateDate', + tableId: '6010012Table1', + tableName: '标准工序表', + columnProp: 'createDate', + headerAlign: 'center', + align: 'center', + columnLabel: '创建时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 170 + }, + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1CreateBy', + tableId: "6010012Table1", + tableName: "标准工序表", + columnProp: 'createBy', + headerAlign: "center", + align: "center", + columnLabel: '创建人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1UpdateDate', + tableId: "6010012Table1", + tableName: "标准工序表", + columnProp: 'updateDate', + headerAlign: "center", + align: "center", + columnLabel: '更新时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 170 + }, + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1UpdateBy', + tableId: "6010012Table1", + tableName: "标准工序表", + columnProp: 'updateBy', + headerAlign: "center", + align: "center", + columnLabel: '更新人', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + ], rules: { bu: [ { @@ -398,6 +711,8 @@ export default { authUpdate: false, authDelete: false, modalFlag: false, + stdProcessFlag: false, + stdProcessFlag1: false, modalDisableFlag: false, menuId: this.$route.meta.menuId, } @@ -621,6 +936,126 @@ export default { }) }, + stdProcessModal (row) { + this.productGroupCurrentRow = JSON.parse(JSON.stringify(row)); + this.searchProductGroupStdProcess() + this.stdProcessFlag = true + }, + + addStdProcessModal () { + this.searchData2.limit = -1 + this.searchData2.page = 1 + this.searchData2.buNo = this.productGroupCurrentRow.buNo + this.searchData2.site = this.productGroupCurrentRow.site + searchStandardRoutingOperationList(this.searchData2).then(({data}) => { + if (data.code === 0) { + let operationIds = [] + this.stdProcessList.forEach((item) => { + operationIds.push(item.operationId) + }) + data.page.list.forEach((item) => { + if (!operationIds.includes(item.id)) { + this.stdProcessList1.push(item) + } + }) + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + } + }) + this.stdProcessFlag1 = true + }, + + closeStdProcessDialog () { + this.searchData1 = { + site: '', + userName: this.$store.state.user.name, + buDesc: '', + productGroupId: '', + productGroupName: '', + active: '', + type: '', + operationNo: '', + operationName: '', + page: 1, + limit: 10 + } + this.stdProcessList = [] + }, + + closeStdProcess1Dialog () { + this.stdProcessList1 = [] + }, + + // 多选 + selectionChangeHandle (val) { + this.stdProcessList1Selections = val + }, + + searchProductGroupStdProcess () { + this.productGroupCurrentRow.userName = this.$store.state.user.name + this.productGroupCurrentRow.operationNo = this.searchData1.operationNo + this.productGroupCurrentRow.operationName = this.searchData1.operationName + searchProductGroupStdProcess(this.productGroupCurrentRow).then(({data}) => { + if (data.code === 0) { + this.stdProcessList = data.rows + } + }) + }, + + saveStdProcessData () { + if (this.stdProcessList1Selections.length === 0) { + this.$message.warning('请选择工序!') + return + } + let tempData = { + productGroupId: this.productGroupCurrentRow.productGroupId, + stdProcessAddList: this.stdProcessList1Selections, + createBy: this.$store.state.user.name + } + saveStdProcessData(tempData).then(({data}) => { + if (data.code === 0) { + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + this.searchProductGroupStdProcess() + this.stdProcessFlag1 = false + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + delProductGroupStdProcessModal (row) { + this.$confirm(`是否删除这条标准工序信息?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + delProductGroupStdProcess(row).then(({data}) => { + if (data.code === 0) { + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + this.searchProductGroupStdProcess() + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { + }) + }, + // 动态列开始 获取 用户保存的 格式列 async getTableUserColumn(tableId, columnId) { let queryTableUser = { diff --git a/src/views/modules/part/standardRoutingOperation.vue b/src/views/modules/part/standardRoutingOperation.vue new file mode 100644 index 0000000..138a830 --- /dev/null +++ b/src/views/modules/part/standardRoutingOperation.vue @@ -0,0 +1,893 @@ + + + + + +