diff --git a/src/api/part/partProductGroupPtm.js b/src/api/part/partProductGroupPtm.js new file mode 100644 index 0000000..4b8f9fe --- /dev/null +++ b/src/api/part/partProductGroupPtm.js @@ -0,0 +1,19 @@ +import { createAPI } from "@/utils/httpRequest.js"; + +//查询 searchProductGroupPtm +export const searchProductGroupPtmCondition = data => createAPI("/plm/partProductGroupInformation/searchProductGroupPtmCondition", "post", data); + +// searchProductGroupPtmConditionItemProcess +export const searchProductGroupPtmConditionItemProcess = data => createAPI("/plm/partProductGroupInformation/searchProductGroupPtmConditionItemProcess", "post", data); + +//新增 saveProductGroupPtm +export const saveProductGroupPtm = data => createAPI("/plm/partProductGroupInformation/saveProductGroupPtm", "post", data); + +//删除 delProductGroupPtm +export const delProductGroupPtm = data => createAPI("/plm/partProductGroupInformation/delProductGroupPtm", "post", data); + +// 编辑属性值接口 updatePtmConditionItemValue +export const updatePtmConditionItemValue = data => createAPI("/plm/partProductGroupInformation/updatePtmConditionItemValue", "post", data); + +// 编辑工序值接口 updatePtmConditionProcessValue +export const updatePtmConditionProcessValue = data => createAPI("/plm/partProductGroupInformation/updatePtmConditionProcessValue", "post", data); diff --git a/src/views/modules/fanuc/fanuc.vue b/src/views/modules/fanuc/fanuc.vue index 68c6a24..d961b6f 100644 --- a/src/views/modules/fanuc/fanuc.vue +++ b/src/views/modules/fanuc/fanuc.vue @@ -101,52 +101,52 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/views/modules/part/partCostInformation.vue b/src/views/modules/part/partCostInformation.vue index b39b557..a67da5e 100644 --- a/src/views/modules/part/partCostInformation.vue +++ b/src/views/modules/part/partCostInformation.vue @@ -1,6 +1,16 @@ @@ -100,16 +100,12 @@ - + - {{ i.sitename }} - - {{ i.buDesc }} - @@ -126,6 +122,15 @@ + + + @@ -161,6 +166,7 @@ style="width: 100%;"> 关闭 + + +
+ + +

条件

+
+ + 新增 + +
+ + + + + + + + + +
+ + + 编辑 + + + + + + + + 编辑 + + + + + + + + + 关闭 + +
+ + + + + + + + + + + 属性模板 + + + + + + 保存 + 关闭 + + + + + + + + + + + 保存 + 关闭 + + + + + + + + + + + 保存 + 关闭 + + + + + @@ -240,6 +449,7 @@ 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"; +import {delProductGroupPtm, saveProductGroupPtm, searchProductGroupPtmCondition, searchProductGroupPtmConditionItemProcess,updatePtmConditionItemValue,updatePtmConditionProcessValue} from "../../../api/part/partProductGroupPtm"; export default { components: { Chooselist @@ -260,6 +470,7 @@ export default { }, data () { return { + isVisible1: false, // 导出 exportData: [], exportName: '商品组' + this.dayjs().format('YYYYMMDDHHmmss'), @@ -270,6 +481,7 @@ export default { stdProcessList: [], stdProcessList1: [], productGroupCurrentRow: {}, + productGroupConditionCurrentRow: {}, // 多选 stdProcessList1Selections: [], // ======== 行高 ======== @@ -278,6 +490,7 @@ export default { pageIndex: 1, pageSize: 50, totalPage: 0, + activeName: 'first', // 条件查询 searchData: { site: '', @@ -318,13 +531,30 @@ export default { bu: '', site: this.$store.state.user.site, buNo: '', + yieldRate: '', productGroupId: '', productGroupName: '', active: '', type: '' }, + ptmModalData: { + bu: '', + site: this.$store.state.user.site, + buNo: '', + seqNo: '', + conditionDesc: '', + recordType: '', + itemNo: '', + itemDesc: '', + productGroupId: '', + }, // ======== 数据列表 ======== dataList: [], + productGroupPtmConditionList: [], + productGroupPtmConditionItemList: [], + copyItemAttributeList: [], + productGroupPtmConditionProcessList: [], + copyProcessAttributeList: [], // 展示列集 columnList: [ { @@ -397,6 +627,24 @@ export default { fixed: '', columnWidth: 120 }, + // yieldRate + { + functionId: 601006, + serialNumber: '601006Table1YieldRate', + tableId: '601006Table1', + tableName: '商品组信息表', + columnProp: 'yieldRate', + headerAlign: 'center', + align: 'right', + columnLabel: 'Yield Rate', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80 + }, { userId: this.$store.state.user.name, functionId: 601006, @@ -473,9 +721,9 @@ export default { stdProcessColumnList: [ { userId: this.$store.state.user.name, - functionId: 6010012, - serialNumber: '6010012Table1BuDesc', - tableId: "6010012Table1", + functionId: 601006, + serialNumber: '601006Table2BuDesc', + tableId: "601006Table2", tableName: "标准工序表", columnProp: 'buDesc', headerAlign: "center", @@ -487,13 +735,14 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 70, + isVisible: true // 控制显示的属性 }, { userId: this.$store.state.user.name, - functionId: 6010012, - serialNumber: '6010012Table1OperationNo', - tableId: "6010012Table1", + functionId: 601006, + serialNumber: '601006Table2OperationNo', + tableId: "601006Table2", tableName: "标准工序表", columnProp: 'operationNo', headerAlign: "center", @@ -505,17 +754,18 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 120 + columnWidth: 80, + isVisible: true // 控制显示的属性 }, { userId: this.$store.state.user.name, - functionId: 6010012, - serialNumber: '6010012Table1OperationName', - tableId: "6010012Table1", + functionId: 601006, + serialNumber: '601006Table2OperationName', + tableId: "601006Table2", tableName: "标准工序表", columnProp: 'operationName', headerAlign: "center", - align: "left", + align: "center", columnLabel: '工序名称', columnHidden: false, columnImage: false, @@ -523,16 +773,17 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 300 + columnWidth: 170, + isVisible: true // 控制显示的属性 }, { - functionId: 6010012, - serialNumber: '6010012Table1WorkCenterNo', - tableId: '6010012Table1', + functionId: 601006, + serialNumber: '601006Table2WorkCenterNo', + tableId: '601006Table2', tableName: '标准工序表', columnProp: 'workCenterNo', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '加工中心编码', columnHidden: false, columnImage: false, @@ -540,16 +791,17 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 100, + isVisible: true // 控制显示的属性 }, { - functionId: 6010012, - serialNumber: '6010012Table1WorkCenterDesc', - tableId: '6010012Table1', + functionId: 601006, + serialNumber: '601006Table2WorkCenterDesc', + tableId: '601006Table2', tableName: '标准工序表', columnProp: 'workCenterDesc', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '加工中心名称', columnHidden: false, columnImage: false, @@ -557,17 +809,18 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 200 + columnWidth: 170, + isVisible: true // 控制显示的属性 }, { userId: this.$store.state.user.name, - functionId: 6010012, - serialNumber: '6010012Table1LaborClassDesc', - tableId: "6010012Table1", + functionId: 601006, + serialNumber: '601006Table2LaborClassDesc', + tableId: "601006Table2", tableName: "标准工序表", columnProp: 'laborClassDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '人员等级', columnHidden: false, columnImage: false, @@ -575,17 +828,18 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 80, + isVisible: true // 控制显示的属性 }, { userId: this.$store.state.user.name, - functionId: 6010012, - serialNumber: '6010012Table1SetupLaborClassDesc', - tableId: "6010012Table1", + functionId: 601006, + serialNumber: '601006Table2SetupLaborClassDesc', + tableId: "601006Table2", tableName: "标准工序表", columnProp: 'setupLaborClassDesc', headerAlign: "center", - align: "center", + align: "left", columnLabel: '调机时人员等级', columnHidden: false, columnImage: false, @@ -593,13 +847,90 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 100, + isVisible: true // 控制显示的属性 }, { userId: this.$store.state.user.name, - functionId: 6010012, - serialNumber: '6010012Table1CreateDate', - tableId: '6010012Table1', + functionId: 601006, + serialNumber: '601006Table2LaborRunFactor', + tableId: "601006Table2", + tableName: "标准工序表", + columnProp: 'laborRunFactor', + headerAlign: "center", + align: "right", + columnLabel: '机器单位产出', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100, + isVisible: false // 控制显示的属性 + }, + { + userId: this.$store.state.user.name, + functionId: 601006, + serialNumber: '601006Table2LaborCycleTime', + tableId: "601006Table2", + tableName: "标准工序表", + columnProp: 'laborCycleTime', + headerAlign: "center", + align: "right", + columnLabel: '机器产出时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100, + isVisible: false // 控制显示的属性 + }, + { + userId: this.$store.state.user.name, + functionId: 601006, + serialNumber: '601006Table2MachRunFactor', + tableId: "601006Table2", + tableName: "标准工序表", + columnProp: 'machRunFactor', + headerAlign: "center", + align: "right", + columnLabel: '人工单位产出', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100, + isVisible: false // 控制显示的属性 + }, + { + userId: this.$store.state.user.name, + functionId: 601006, + serialNumber: '601006Table2MachCycleTime', + tableId: "601006Table2", + tableName: "标准工序表", + columnProp: 'machCycleTime', + headerAlign: "center", + align: "right", + columnLabel: '人工产出时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100, + isVisible: false // 控制显示的属性 + }, + { + userId: this.$store.state.user.name, + functionId: 601006, + serialNumber: '601006Table2CreateDate', + tableId: '601006Table2', tableName: '标准工序表', columnProp: 'createDate', headerAlign: 'center', @@ -611,17 +942,18 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 170 + columnWidth: 170, + isVisible: true // 控制显示的属性 }, { userId: this.$store.state.user.name, - functionId: 6010012, - serialNumber: '6010012Table1CreateBy', - tableId: "6010012Table1", + functionId: 601006, + serialNumber: '601006Table2CreateBy', + tableId: "601006Table2", tableName: "标准工序表", columnProp: 'createBy', headerAlign: "center", - align: "center", + align: "left", columnLabel: '创建人', columnHidden: false, columnImage: false, @@ -629,13 +961,14 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 100, + isVisible: true // 控制显示的属性 }, { userId: this.$store.state.user.name, - functionId: 6010012, - serialNumber: '6010012Table1UpdateDate', - tableId: "6010012Table1", + functionId: 601006, + serialNumber: '601006Table2UpdateDate', + tableId: "601006Table2", tableName: "标准工序表", columnProp: 'updateDate', headerAlign: "center", @@ -647,17 +980,18 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 170 + columnWidth: 170, + isVisible: true // 控制显示的属性 }, { userId: this.$store.state.user.name, - functionId: 6010012, - serialNumber: '6010012Table1UpdateBy', - tableId: "6010012Table1", + functionId: 601006, + serialNumber: '601006Table2UpdateBy', + tableId: "601006Table2", tableName: "标准工序表", columnProp: 'updateBy', headerAlign: "center", - align: "center", + align: "left", columnLabel: '更新人', columnHidden: false, columnImage: false, @@ -665,25 +999,108 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 100, + isVisible: true // 控制显示的属性 }, ], + columnItemList: [ + { + userId: this.$store.state.user.name, + functionId: 601006, + serialNumber: '601006Table3ItemID', + tableId: "601006Table3", + tableName: "物料属性表", + columnProp: 'itemNo', + headerAlign: "center", + align: "center", + columnLabel: '属性编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100, + }, + { + userId: this.$store.state.user.name, + functionId: 601006, + serialNumber: '601006Table3PropertiesItemDesc', + tableId: "601006Table3", + tableName: "物料属性表", + columnProp: 'itemDesc', + headerAlign: "center", + align: "left", + columnLabel: '属性名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 120, + }, + { + userId: this.$store.state.user.name, + functionId: 601006, + serialNumber: '601006Table3ValueType', + tableId: "601006Table3", + tableName: "物料属性表", + columnProp: 'valueType', + headerAlign: "center", + align: "center", + columnLabel: '属性类型', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100, + }, + { + userId: this.$store.state.user.name, + functionId: 601006, + serialNumber: '601006Table3ValueChooseFlag', + tableId: "601006Table3", + tableName: "物料属性表", + columnProp: 'textValue', + headerAlign: "center", + align: "left", + columnLabel: '属性值', + columnHidden: false, + columnImage: false, + status: true, + fixed: '', + columnWidth: 100, + }, + // { + // userId: this.$store.state.user.name, + // functionId: 601006, + // serialNumber: '601006Table3ValueChooseFlag', + // tableId: "601006Table3", + // tableName: "物料属性表", + // columnProp: 'numValue', + // headerAlign: "center", + // align: "center", + // columnLabel: '数字值', + // columnHidden: false, + // columnImage: false, + // status: true, + // fixed: '', + // columnWidth: 70, + // }, + ], rules: { bu: [ { required: true, message: ' ', - trigger: ['blur','change'] + trigger: ['blur', 'change'] } ], - productGroupId:[ + productGroupId: [ { required: true, message: ' ', trigger: 'change' } ], - productGroupName:[ + productGroupName: [ { required: true, message: ' ', @@ -704,6 +1121,27 @@ export default { trigger: 'change' } ], + seqNo:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], + conditionDesc:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ], + itemNo:[ + { + required: true, + message: ' ', + trigger: 'change' + } + ] }, // ======== 模态框开关控制 ======== authSearch: false, @@ -713,6 +1151,10 @@ export default { modalFlag: false, stdProcessFlag: false, stdProcessFlag1: false, + productGroupPtmFlag: false, + ptmSaveFlag: false, + ptmConditionItemUpdateFlag: false, + ptmConditionProcessUpdateFlag: false, modalDisableFlag: false, menuId: this.$route.meta.menuId, } @@ -793,6 +1235,48 @@ export default { return s }, + // ======== chooseList相关方法 ======== + /** + * 获取基础数据列表S + * @param val + * @param type + */ + getBaseList (val, type) { + this.tagNo = val + // this.tempCodeNo = this.ptmModalData.itemNo + this.$nextTick(() => { + let strVal = '' + if (val === 219) { + strVal = this.ptmModalData.itemNo + } + this.$refs.baseList.init(val, strVal) + }) + }, + /** + * 列表方法的回调 + * @param val + */ + getBaseData (val) { + console.log(val) + if (this.tagNo === 219) { + // if (this.modalData.flag === '2') { + // if (val.code_no != this.tempCodeNo) { + // this.$confirm(`更换属性模板将替换下方物料属性数据,请确认?`, '提示', { + // confirmButtonText: '确定', + // cancelButtonText: '取消', + // type: 'warning' + // }).then(() => { + // this.ptmModalData.itemNo = val.code_no + // }).catch(() => { + // }) + // } + // } else { + this.ptmModalData.itemNo = val.code_no + this.ptmModalData.itemDesc = val.code_desc + // } + } + }, + // 获取数据列表 getDataList () { this.searchData.limit = this.pageSize @@ -803,6 +1287,11 @@ export default { this.pageIndex = data.page.currPage this.pageSize = data.page.pageSize this.totalPage = data.page.totalCount + this.dataList.forEach((item) => { + if (item.type !== '2'){ + item.yieldRate = '0' + } + }) } }) }, @@ -818,6 +1307,7 @@ export default { productGroupName: '', active: 'Y', type: '', + yieldRate: '', createBy: this.$store.state.user.name, } this.modalDisableFlag = false @@ -839,6 +1329,7 @@ export default { productGroupName: row.productGroupName, active: row.active, type: row.type, + yieldRate: row.yieldRate, updateBy: this.$store.state.user.name, } this.modalDisableFlag = true @@ -870,6 +1361,13 @@ export default { this.$message.warning('请选择商品组!') return } + // 如果yieldRate<0或者大于10,提示时间为2000ms + if (!(this.modalData.yieldRate >= 0 && this.modalData.yieldRate < 10)) { + this.$alert('Yield Rate必须为0-10的正数!', '错误', { + confirmButtonText: '确定' + }) + return + } if (this.modalData.flag === '1') { productGroupInformationSave(this.modalData).then(({data}) => { if (data && data.code === 0) { @@ -939,6 +1437,7 @@ export default { stdProcessModal (row) { this.productGroupCurrentRow = JSON.parse(JSON.stringify(row)); this.searchProductGroupStdProcess() + this.isVisible1 = false this.stdProcessFlag = true }, @@ -1056,6 +1555,220 @@ export default { }) }, + ProcessTimeMatrixModal (row) { + this.productGroupCurrentRow = JSON.parse(JSON.stringify(row)); + this.searchProductGroupPtmCondition() + this.isVisible1 = true + this.productGroupPtmFlag = true + }, + + currentConditionChangeHandle (row) { + this.productGroupConditionCurrentRow = { + conditionId: row.conditionId, + site: row.site, + buNo: row.buNo + } + this.searchProductGroupPtmConditionItemProcess() + }, + + searchProductGroupPtmCondition () { + searchProductGroupPtmCondition(this.productGroupCurrentRow).then(({data}) => { + if (data.code === 0) { + this.productGroupPtmConditionList = data.rows1 + // this.productGroupPtmConditionItemList = data.rows2 + // this.productGroupPtmConditionProcessList = data.rows3 + } + if (this.productGroupPtmConditionList.length > 0) { + this.$refs.conditionTable.setCurrentRow(this.productGroupPtmConditionList[0]) + this.currentConditionChangeHandle(this.productGroupPtmConditionList[0]) + this.$refs.conditionTable.setCurrentRow(this.productGroupPtmConditionList[0]) + } else { + this.productGroupPtmConditionItemList = [] + this.productGroupPtmConditionProcessList = [] + } + }) + }, + + searchProductGroupPtmConditionItemProcess(){ + let inData = { + conditionId: this.productGroupConditionCurrentRow.conditionId, + site: this.productGroupConditionCurrentRow.site, + buNo: this.productGroupConditionCurrentRow.buNo, + recordType : 'IP', + } + searchProductGroupPtmConditionItemProcess(inData).then(({data}) => { + if (data.code === 0) { + this.productGroupPtmConditionItemList = data.rows1 + this.productGroupPtmConditionProcessList = data.rows2 + } + }) + }, + + saveProductGroupPtmModal () { + if (this.productGroupPtmConditionList.length > 0) { + let seqNos = [] + this.productGroupPtmConditionList.forEach((item) => { + seqNos.push(item.seqNo) + }) + this.ptmModalData.seqNo = Math.max.apply(null, seqNos) + 1 + } else { + this.ptmModalData.seqNo = 1 + } + this.ptmSaveFlag = true + }, + + saveProductGroupPtm () { + if (this.ptmModalData.conditionDesc === '' || this.ptmModalData.conditionDesc == null) { + this.$message.warning('请填写条件描述!') + return + } + if (this.ptmModalData.itemNo === '' || this.ptmModalData.itemNo == null) { + this.$message.warning('请选择属性模板!') + return + } + let tempData = { + site: this.productGroupCurrentRow.site, + buNo: this.productGroupCurrentRow.buNo, + recordType : 'IP', + productGroupId: this.productGroupCurrentRow.productGroupId, + seqNo: this.ptmModalData.seqNo, + conditionDesc: this.ptmModalData.conditionDesc, + createBy: this.$store.state.user.name, + userName: this.$store.state.user.name + } + saveProductGroupPtm(tempData).then(({data}) => { + if (data.code === 0) { + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + this.searchProductGroupPtmCondition() + this.ptmSaveFlag = false + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + delProductGroupPtmModal (row) { + this.$confirm(`是否删除这条信息?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + delProductGroupPtm(row).then(({data}) => { + if (data.code === 0) { + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + this.searchProductGroupPtmCondition() + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { + }) + }, + + closeProductGroupPtmDialog () { + this.ptmModalData = { + conditionDesc: '', + itemNo: '', + itemDesc: '', + createBy: this.$store.state.user.name, + } + }, + + updatePtmConditionItemModal () { + this.copyItemAttributeList = JSON.parse(JSON.stringify(this.productGroupPtmConditionItemList)) + this.ptmConditionItemUpdateFlag = true + }, + + /** + * 编辑属性值 + */ + updatePtmConditionItemValue () { + let tempData = { + ptmItemAddList: JSON.parse(JSON.stringify(this.copyItemAttributeList)) + } + updatePtmConditionItemValue(tempData).then(({data}) => { + if (data && data.code === 0) { + this.searchProductGroupPtmConditionItemProcess() + this.closePtmConditionItemUpdateDialog() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.loading = false + }).catch((error) => { + this.$message.error(error) + this.loading = false + }) + }, + + closePtmConditionItemUpdateDialog () { + this.copyItemAttributeList = [] + this.ptmConditionItemUpdateFlag = false + }, + + updatePtmConditionProcessModal () { + this.copyProcessAttributeList = JSON.parse(JSON.stringify(this.productGroupPtmConditionProcessList)) + this.ptmConditionProcessUpdateFlag = true + }, + + updatePtmConditionProcessValue () { + let tempData = { + ptmProcessAddList: JSON.parse(JSON.stringify(this.copyProcessAttributeList)) + } + updatePtmConditionProcessValue(tempData).then(({data}) => { + if (data && data.code === 0) { + this.searchProductGroupPtmConditionItemProcess() + this.closePtmConditionProcessUpdateDialog() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + this.loading = false + }).catch((error) => { + this.$message.error(error) + this.loading = false + }) + }, + + closePtmConditionProcessUpdateDialog () { + this.copyProcessAttributeList = [] + this.ptmConditionProcessUpdateFlag = false + }, + + // 列表表格选择替换 + tabClick (tab, event) { + // 刷新列表数据 + this.searchProductGroupPtmConditionItemProcess() + }, + // 动态列开始 获取 用户保存的 格式列 async getTableUserColumn(tableId, columnId) { let queryTableUser = { @@ -1115,6 +1828,31 @@ export default { diff --git a/src/views/modules/part/standardRoutingOperation.vue b/src/views/modules/part/standardRoutingOperation.vue index 138a830..a3f56ee 100644 --- a/src/views/modules/part/standardRoutingOperation.vue +++ b/src/views/modules/part/standardRoutingOperation.vue @@ -114,7 +114,7 @@ 人员等级编码 - +
@@ -123,7 +123,7 @@ 调机时人员等级编码 - + @@ -157,6 +157,17 @@ export default { components: { ChooseList }, + watch: { + 'modalData.workCenterNo': function (val) { + this.modalData.workCenterNo = val.toUpperCase() + }, + 'modalData.setupLaborClassNo': function (val) { + this.modalData.setupLaborClassNo = val.toUpperCase() + }, + 'modalData.laborClassNo': function (val) { + this.modalData.laborClassNo = val.toUpperCase() + }, + }, data () { return { // 导出 @@ -289,6 +300,24 @@ export default { fixed: '', columnWidth: 200 }, + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1LaborClassNo', + tableId: "6010012Table1", + tableName: "标准工序表", + columnProp: 'laborClassNo', + 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, @@ -298,7 +327,25 @@ export default { columnProp: 'laborClassDesc', headerAlign: "center", align: "center", - columnLabel: '人员等级', + columnLabel: '人员等级描述', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 6010012, + serialNumber: '6010012Table1SetupLaborClassNo', + tableId: "6010012Table1", + tableName: "标准工序表", + columnProp: 'setupLaborClassNo', + headerAlign: "center", + align: "center", + columnLabel: '调机时人员等级编码', columnHidden: false, columnImage: false, columnSortable: false, @@ -316,14 +363,14 @@ export default { columnProp: 'setupLaborClassDesc', headerAlign: "center", align: "center", - columnLabel: '调机时人员等级', + columnLabel: '调机时人员等级描述', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 118 }, { userId: this.$store.state.user.name, @@ -562,17 +609,24 @@ export default { this.tagNo1 = type this.$nextTick(() => { let strVal = '' + let conSql = '' if (val === 217) { if(type === 1) { - strVal = this.modalData.laborClassNo + strVal = this.modalData.laborClassNo?this.modalData.laborClassNo:'' } else if (type === 2) { - strVal = this.modalData.setupLaborClassNo + strVal = this.modalData.setupLaborClassNo?this.modalData.setupLaborClassNo:'' } } if (val === 216) { - strVal = this.modalData.workCenterNo + strVal = this.modalData.workCenterNo?this.modalData.workCenterNo:'' + } + if (this.modalData.bu === null || this.modalData.bu === '') { + this.$message.warning("请选择BU!") + return + } else { + conSql = " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'" } - this.$refs.baseList.init(val, strVal) + this.$refs.baseList.init(val, strVal, conSql) }) }, /** @@ -628,6 +682,7 @@ export default { } this.modalDisableFlag = false this.modalFlag = true + console.log(this.modalData) }, /** @@ -641,9 +696,15 @@ export default { site: row.site, bu: row.site + '_' + row.buNo, buNo: row.buNo, + id: row.id, operationNo: row.operationNo, operationName: row.operationName, workCenterNo: row.workCenterNo, + workCenterDesc: row.workCenterDesc, + laborClassNo: row.laborClassNo, + laborClassDesc: row.laborClassDesc, + setupLaborClassNo: row.setupLaborClassNo, + setupLaborClassDesc: row.setupLaborClassDesc, updateBy: this.$store.state.user.name, } this.modalDisableFlag = true @@ -762,67 +823,76 @@ export default { if (this.modalData.workCenterNo != null && this.modalData.workCenterNo !== '') { let tempData = { tagno: tagNo, - conditionSql: " and work_center_no = '" + this.modalData.workCenterNo + "'" + " and site = '" + this.modalData.site + "'" + " and bu_no = '" + this.modalData.buNo + "'" + conditionSql: " and work_center_no = '" + this.modalData.workCenterNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { - this.modalData.workCenterNo = data.baseListData[0].work_center_no this.modalData.workCenterDesc = data.baseListData[0].work_center_desc } else { - this.$message.warning('该加工中心不存在!') + this.$alert('该加工中心不存在,请重新输入加工中心编码!', '提示', { + confirmButtonText: '确定' + }) + this.modalData.workCenterNo = '' this.modalData.workCenterDesc = '' } } else { this.$message.warning(data.msg) + this.modalData.workCenterNo = '' this.modalData.workCenterDesc = '' } }) } }, - // 人员等级 + // 人员等级描述 setupLaborClassBlur (tagNo) { if (this.modalData.setupLaborClassNo != null && this.modalData.setupLaborClassNo !== '') { let tempData = { tagno: tagNo, - conditionSql: " and class_no = '" + this.modalData.setupLaborClassNo + "'" + " and site = '" + this.modalData.site + "'" + " and bu_no = '" + this.modalData.buNo + "'" + conditionSql: " and class_no = '" + this.modalData.setupLaborClassNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { - this.modalData.setupLaborClassNo = data.baseListData[0].class_no this.modalData.setupLaborClassDesc = data.baseListData[0].class_desc } else { - this.$message.warning('该人员等级不存在!') + this.$alert('该调机时人员等级不存在,请重新输入调机时人员等级编码!', '提示', { + confirmButtonText: '确定' + }) + this.modalData.setupLaborClassNo = '' this.modalData.setupLaborClassDesc = '' } } else { this.$message.warning(data.msg) + this.modalData.setupLaborClassNo = '' this.modalData.setupLaborClassDesc = '' } }) } }, - // 人员等级 + // 人员等级描述 laborClassBlur (tagNo) { if (this.modalData.laborClassNo != null && this.modalData.laborClassNo !== '') { let tempData = { tagno: tagNo, - conditionSql: " and class_no = '" + this.modalData.laborClassNo + "'" + " and site = '" + this.modalData.site + "'" + " and bu_no = '" + this.modalData.buNo + "'" + conditionSql: " and class_no = '" + this.modalData.laborClassNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'" } verifyData(tempData).then(({data}) => { if (data && data.code === 0) { if (data.baseListData.length > 0) { - this.modalData.laborClassNo = data.baseListData[0].class_no this.modalData.laborClassDesc = data.baseListData[0].class_desc } else { - this.$message.warning('该人员等级不存在!') + this.$alert('该人员等级不存在,请重新输入人员等级编码!', '提示', { + confirmButtonText: '确定' + }) + this.modalData.laborClassNo = '' this.modalData.laborClassDesc = '' } } else { this.$message.warning(data.msg) + this.modalData.laborClassNo = '' this.modalData.laborClassDesc = '' } })