diff --git a/src/api/scheduleReport/com_scan_material.js b/src/api/scheduleReport/com_scan_material.js index adcfa5b..92c6df8 100644 --- a/src/api/scheduleReport/com_scan_material.js +++ b/src/api/scheduleReport/com_scan_material.js @@ -1,4 +1,7 @@ import { createAPI } from '@/utils/httpRequest.js' +// 查询材料卷信息 +export const getRmRollData = data => createAPI('schedule/getRmRollData', 'POST', data) + // 材料下机操作 -export const processCuttingMaterialRoll = data => createAPI('schedule/processCuttingMaterialRoll', 'POST', data) +export const scanRmRollNo = data => createAPI('schedule/scanRmRollNo', 'POST', data) diff --git a/src/api/scheduleReport/com_separate_roll.js b/src/api/scheduleReport/com_separate_roll.js new file mode 100644 index 0000000..3c8a858 --- /dev/null +++ b/src/api/scheduleReport/com_separate_roll.js @@ -0,0 +1,7 @@ +import { createAPI } from '@/utils/httpRequest.js' + +//获取当前派工单的标准卷数量 +export const getSeqStandardRollQty = data => createAPI('schedule/getSeqStandardRollQty', 'POST', data) + +// 执行创建分卷的操作 +export const createSplitSfdcRoll = data => createAPI('schedule/createSplitSfdcRoll', 'POST', data) diff --git a/src/api/yieldReport/com_separate_roll.js b/src/api/yieldReport/com_separate_roll.js deleted file mode 100644 index edda3ba..0000000 --- a/src/api/yieldReport/com_separate_roll.js +++ /dev/null @@ -1,19 +0,0 @@ -import { createAPI } from '@/utils/httpRequest.js' - -// 校验创建分卷的操作 -export const checkCreateSplitSfdcRoll = data => createAPI('schedule/checkCreateSplitSfdcRoll', 'POST', data) - -// 执行创建分卷的操作 -export const createSplitSfdcRoll = data => createAPI('schedule/createSplitSfdcRoll', 'POST', data) - - -// 校验fqc创建分卷的操作 -export const otherCheckCreateSplitSfdcRoll = data => createAPI('schedule/otherCheckCreateSplitSfdcRoll', 'POST', data) - -// 执行fqc创建分卷的操作 -export const otherCreateSplitSfdcRoll = data => createAPI('schedule/otherCreateSplitSfdcRoll', 'POST', data) - - -// 换包装分卷 -export const workbenchCreateslittingrollRepackAction = data => createAPI('schedule/workbench_createslittingroll_Repack_action', 'POST', data) - diff --git a/src/views/modules/scheduleReport/com_die_cutting_report.vue b/src/views/modules/scheduleReport/com_die_cutting_report.vue index 860b293..bfe430a 100644 --- a/src/views/modules/scheduleReport/com_die_cutting_report.vue +++ b/src/views/modules/scheduleReport/com_die_cutting_report.vue @@ -35,7 +35,7 @@ {{ this.currentRollOps.rollNo }} - {{ buttons.scanMaterialButton }} @@ -94,7 +94,7 @@ v-loading="dataListLoading" :summary-method="sfdcRollListSummaries" highlight-current-row - @current-change="selectSfdcRoll" + @current-change="setSfdcRoll" style="width: 100%;"> + + + + + + + @@ -151,35 +160,15 @@ import { printSfdcLabel, } from "@/views/modules/scheduleReport/print_roll_label.js" +import comScanMaterial from './com_scan_material' /* 扫描卷的组件 */ +import comSeparateRoll from "./com_separate_roll"; + var functionId = 'C10000001'; export default { data() { return { titleCon: '', visible: false, - rollSplitButton: false, // 拆分卷是否可用 - selectSfdcRollData: '',// 2022-11-17 - showMalformedMaterialFlag: false,// 2022-11-17 - malformedMaterialButtonFlag: true,// 2022-11-17 - showDefault: false, - showNotOverFlag: false, - showOperatorFlag: false, - showSwitchFlag: false, - showSeparateFlag: false, - showFinishFlag: false, - showFinishPartFlag: false, - showMergeFlag: false, - showTuningFlag: false, - showProduceFlag: false, - showDefectFlag: false, - showToolFlag: false, - showReplaceToolFlag: false, - showMaterialFlag: false, - showKeyMaterialFlag: false, - showReplaceMaterialFlag: false, - showCuttingMaterialFlag: false, - showDownFlag: false, - showFinishScheduleFlag: false, activeTable: 'sfdc_rollOps', sfdcRollOpsList: [], sfdcRollList: [], @@ -403,27 +392,12 @@ export default { seqNo: '', orderNo: '', itemNo: 0, - resourceId: '', - scheduledDate: '', - shiftNo: '', partNo: '', workCenterNo: '', - workCenterDesc: '', - resourceDesc: '', rollNo: '', partDesc: '', - planStartTime: '', - planFinishTime: '', - qtyRequiredOriginal: 0, - preItemNo: '', - preItemDesc: '', - nextItemDesc: '', - nextItemNo: 0, - operatorId: '', functionName: '', currentRollFlag: false, - repairOrderFlag: '', - checkMultipleRoll: '' }, currentRollOps: { site: this.$store.state.user.site, @@ -558,10 +532,6 @@ export default { planStartDate: '刷新', lotSize: '原始派工单需求数量', scheduledDate: ' 排产日期', - shiftNo: '班次', - preItemNo: '前道工序', - nextItemNo: ' 后道工序', - onlyCurrentRoll: '仅显示当前卷信息', rollButtons: '卷操作', listDesc: '列表信息', rollopsList: '生产卷操作信息', @@ -922,9 +892,11 @@ export default { } }, components: { - + comScanMaterial, /* 扫描卷的组件 */ + comSeparateRoll, /* 创建分卷 */ }, methods: { + init(seqNo) { //判断是否关闭所有的页面按钮 this.scheduleData.seqNo = seqNo; @@ -965,99 +937,28 @@ export default { await this.refreshCurrentTabTable(); }, - - - selectSfdcRoll(row) { - this.malformedMaterialButtonFlag = false - this.selectSfdcRollData = row + //设置当前的夏季卷 + setSfdcRoll(row) { + this.currentSfdcRollRow = row; }, - // 获取特殊权限 - getUserSpecialSecurity() { - // 没有机器下机卷 - if (!this.sfdcRollList) { - this.rollSplitButton = true - return - } - // 特殊权限 - let data = { - userSpecialSecurityNo: 240, - username: this.$store.state.user.name - } - getUserSpecialSecurity(data).then(({data}) => { - if (data.userSpecialSecurity == 'Y') { - this.rollSplitButton = false - } else { - this.rollSplitButton = true - } - }) - }, - rollSplit() { - // 取消收藏 - this.$confirm(`确实要创建一个异常卷?`, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - let dto = { - site: this.$store.state.user.site, - orderNo: this.scheduleData.orderNo, - itemNo: this.scheduleData.itemNo, - seqNo: this.scheduleData.seqNo, - userId: this.$store.state.user.name, - } - rollSplit(dto).then(({data}) => { - if (data && data.code == 0) { - this.getSfdcRollList() - this.$message.success(data.msg) - } else { - this.$message.warning(data.msg) - } - }) - }) - }, - malformedMaterialModal() { - if (!this.selectSfdcRollData) { - this.$message.warning('请选择机器下机卷!') - return; - } + /*扫描材料卷*/ + scanMaterialModal() { //打开生产过程的工具的页面 this.$nextTick(() => { - this.showMalformedMaterialFlag = true; - this.$refs.comMalformedMaterial.init(this.scheduleData, this.operatorData, this.selectSfdcRollData) + this.$refs.comScanMaterial.init(this.scheduleData) }); }, - scannerMaterial(row) { - - }, - // 不良记录 - sfdcDefectListSummaries(param) { - const {columns, data} = param; - const sums = []; - columns.forEach((column, index) => { - if (index === 1) { - sums[index] = this.labels.totalSum; - return; - } - if (index == 4) { - const values = data.map(item => Number(item[column.property])); - if (!values.every(value => isNaN(value))) { - sums[index] = values.reduce((prev, curr) => { - const value = Number(curr); - if (!isNaN(value)) { - return prev + curr; - } else { - return prev; - } - }, 0); - sums[index]; - } - sums[index] = (sums[index] ? sums[index] : 0) - } + /*创建分卷的modal调用*/ + separateRollModal() { + //打开创建分卷的页面 76一会还把 + this.$nextTick(() => { + this.showSeparateFlag = true; + this.$refs.comSeparateRoll.init(this.scheduleData) }); - return sums; }, + // 机器下机卷 sfdcRollListSummaries(param) { const {columns, data} = param; @@ -1087,35 +988,7 @@ export default { }); return sums; }, - // 删除卷 - switchRollReverse() { - if (this.currentRollOps.rollNo === '暂无卷号') { - this.$message.warning(this.labels.noneRollNo); - return; - } - this.$confirm(this.labels.sureDeleteRoll + this.currentRollOps.rollNo + this.labels.currentRollNo, '提示', { - confirmButtonText: this.labels.confirmLabel, - celButtonText: this.labels.cancelLabel, - type: 'warning' - }).then(() => { - //执行删除卷 - this.scheduleData.repairOrderFlag = 'Y' - this.scheduleData.checkMultipleRoll = 'Y' - switchrollReverse(this.scheduleData).then(({data}) => { - if (data.code == 0) { - this.$message.success(data.msg) - this.refreshPageData() - } - if (data.code == 400) { - this.$message.warning(data.msg) - } - if (data.code == 500) { - this.$message.error(data.msg) - } - }) - }); - }, // 获取派工单的信息 getScheduleDataBySeqNo() { getScheduleDataBySeqNo(this.scheduleData.seqNo).then(({data}) => { @@ -1149,31 +1022,12 @@ export default { this.refreshCurrentTabTable(); }, - //刷新派工单的材料表的记录 - getSfdcMaterialList() { - getSfdcMaterialByCon(this.searchData).then(({data}) => { - this.sfdcMaterialList = data.rows; - }); - }, //刷新派工单 的下机卷的记录 getSfdcRollOpsList() { getSfdcRollOpsByCon(this.searchData).then(({data}) => { this.sfdcRollOpsList = data.rows; }); }, - //刷新派工单的不良标的记录 - getSfdcDefectList() { - getSfdcDefectByCon(this.searchData).then(({data}) => { - this.sfdcDefectList = data.rows; - }); - }, - - //刷新派工单 的下机卷的记录 - getSfdcRollList() { - getSfdcRollByCon(this.searchData).then(({data}) => { - this.sfdcRollList = data.rows; - }); - }, //刷新页签的table数据 async refreshCurrentTabTable() { @@ -1197,62 +1051,6 @@ export default { } }, - - - - /*提示是否扫描材料卷*/ - warnCreateNewRollConfirm() { - //禁用当按钮 操作完成 恢复 - this.buttonTags.createNewRollFlag = true; - //提示操作 - this.$confirm(this.labels.sureCreateNewRoll, '提示', { - confirmButtonText: this.labels.confirmLabel, - celButtonText: this.labels.cancelLabel, - type: 'warning' - }).then(() => { - //执行扫描材料卷的操作 - this.createNewRollFun(); - }); - }, - - //扫描材料卷的功能 - createNewRollFun() { - //校验当前的功能是否可用 - this.scheduleData.operatorId = this.operatorData.operatorId; - checkCreateNewSfdcRoll(this.scheduleData).then(({data}) => { - if (data.code === 200) { - //调用创建卷的方法 - this.createNewRollDo(); - } else { - // 操作完成 恢复 - this.buttonTags.createNewRollFlag = false; - this.$message.error(data.msg) - } - }); - }, - - /*切换卷操作*/ - switchRollModal() { - //1.首先调用菜单判断方式 看看是否可以结束卷 - //checkProduceButton('switchRollFlag'); - //打开切换用户的页面 - this.$nextTick(() => { - this.showSwitchFlag = true; - this.$refs.comSwitchRoll.init(this.scheduleData, this.operatorData) - }); - }, - - /*创建分卷的modal调用*/ - separateRollModal() { - //1.首先调用菜单判断方式 看看是否可以结束卷 - //checkProduceButton('separateRollFlag'); - //打开创建分卷的页面 76一会还把 - this.$nextTick(() => { - this.showSeparateFlag = true; - this.$refs.comSeparateRoll.init(this.scheduleData, this.operatorData) - }); - }, - /*结束卷操作*/ finishRollModal() { //1.首先调用菜单判断方式 看看是否可以结束卷 @@ -1260,35 +1058,7 @@ export default { //打开结束卷的页面 this.$nextTick(() => { this.showFinishFlag = true; - this.$refs.comFinishRoll.init(this.scheduleData, this.operatorData) - }); - }, - - /*合并卷modal*/ - mergeRollModal() { - //1.首先调用菜单判断方式 看看是否可以结束卷 - //checkProduceButton('mergeRollFlag'); - //判断是否是暂无卷号 - let currentRollNo = this.currentRollOps.rollNo; - if (currentRollNo === '暂无卷号') { - this.$message.error(this.labels.noRollCantMerge); - return false; - } - //打开合并卷的页面 - this.$nextTick(() => { - this.showMergeFlag = true; - this.$refs.comMergeRoll.init(this.scheduleData, this.operatorData) - }); - }, - - /*开始调机modal*/ - startTuningModal() { - //1.首先调用菜单判断方式 看看是否可以结束卷 - //checkProduceButton('startTuningFlag'); - //打开开始调机的页面 - this.$nextTick(() => { - this.showTuningFlag = true; - this.$refs.comStartTuning.init(this.scheduleData, this.operatorData) + this.$refs.comFinishRoll.init(this.scheduleData) }); }, @@ -1299,91 +1069,7 @@ export default { //打开开始生产的页面 this.$nextTick(() => { this.showProduceFlag = true; - this.$refs.comStartProduce.init(this.scheduleData, this.operatorData) - }); - }, - - /*报告不良modal*/ - defectRollModal() { - //1.首先调用菜单判断方式 看看是否可以结束卷 - //checkProduceButton('defectRollFlag'); - //打开不良卷的页面 - this.$nextTick(() => { - this.showDefectFlag = true; - this.$refs.comDefectRoll.init(this.scheduleData, this.operatorData) - }); - }, - - /*生产过程的工具组件*/ - produceToolModal() { - //1.首先调用菜单判断方式 打开生产过程的工具的页面 - //checkProduceButton('produceToolFlag'); - //打开生产过程的工具的页面 - this.$nextTick(() => { - this.showToolFlag = true; - this.$refs.comProduceTool.init(this.scheduleData, this.operatorData, 0) - }); - }, - - /*生产过程的工具组件*/ - produceMaterialModal() { - //1.首先调用菜单判断方式 打开生产过程的材料的页面 - //checkProduceButton('produceMaterialFlag'); - //打开生产过程的工具的页面 - this.$nextTick(() => { - this.showMaterialFlag = true; - this.$refs.comProduceMaterial.init(this.scheduleData, this.operatorData) - }); - }, - - // 主材 - produceKeyMaterialModal() { - //1.首先调用菜单判断方式 打开生产过程的材料的页面 - //checkProduceButton('produceMaterialFlag'); - //打开生产过程的工具的页面 - this.$nextTick(() => { - this.showKeyMaterialFlag = true; - this.$refs.comProduceKeyMaterial.init(this.scheduleData, this.operatorData) - }); - }, - /*生产过程的停机组件*/ - produceDownModal() { - //1.首先调用菜单判断方式 打开生产过程的停机的页面 - //checkProduceButton('produceDownFlag'); - //打开生产过程的工具的页面 - this.$nextTick(() => { - this.showDownFlag = true; - this.$refs.comProduceDown.init(this.scheduleData, this.operatorData) - }); - }, - - /*替换工具的组件*/ - replaceToolModal(toolRow) { - //1.首先调用菜单判断方式 打开生产过程的停机的页面 - //checkProduceButton('produceDownFlag'); - //打开生产过程的工具的页面 - this.$nextTick(() => { - this.showReplaceToolFlag = true; - this.$refs.comReplaceTool.init(this.scheduleData, this.operatorData, toolRow) - }); - }, - - /*替换工具的组件*/ - replaceMaterialModal(materialRow) { - //1.首先调用菜单判断方式 打开生产过程的停机的页面 - //checkProduceButton('produceDownFlag'); - //打开生产过程的工具的页面 - this.$nextTick(() => { - this.showReplaceMaterialFlag = true; - this.$refs.comReplaceMaterial.init(this.scheduleData, this.operatorData, materialRow) - }); - }, - - /*材料下料的modal*/ - cuttingMaterialModal(materialRow) { - this.$nextTick(() => { - this.showCuttingMaterialFlag = true; - this.$refs.comCuttingMaterial.init(this.scheduleData, this.operatorData, materialRow); + this.$refs.comStartProduce.init(this.scheduleData) }); }, @@ -1391,69 +1077,7 @@ export default { finishMaterialModal(materialRow) { this.$nextTick(() => { this.showMaterialFlag = true; - this.$refs.comProduceMaterial.init(this.scheduleData, this.operatorData) - }); - }, - - //打开结束派工单的modal - showFinishScheduleModal() { - //打开操作员切换功能 - this.showFinishScheduleFlag = true; - this.$nextTick(() => { - this.$refs.comFinishSchedule.init(this.scheduleData, this.operatorData); - }); - }, - - //结束派工单后刷新页面 - processFinishScheduleOperation() { - //刷新当前页面的数据 - this.refreshPageTables(); - }, - - //扫描材料卷的方法 - createNewRollDo() { - createNewRoll(this.scheduleData).then(({data}) => { - //判断是否成功 - if (data.success) { - this.$message.success(data.msg); - //刷新当的按钮 - this.refreshPageData(); - } else { - //打开当前扫描材料卷的按钮 - this.buttonTags.createNewRollFlag = false; - this.$message.error(data.msg); - } - }); - }, - - /*提醒是否重新打开的提示*/ - warnReopenSfdcRollsConfirm(sfdcRollRow) { - this.$confirm(this.labels.sureReopenSfdcRoll + sfdcRollRow.rollNo + this.labels.sureLabel, '提示', { - confirmButtonText: this.labels.confirmLabel, - celButtonText: this.labels.cancelLabel, - type: 'warning' - }).then(() => { - //执行重新打开sfdcRolls记录的操作 - this.reopenSfdcRollsOperation(sfdcRollRow); - }); - }, - - /*执行重新sfdcRolls表的记录*/ - reopenSfdcRollsOperation(sfdcRollRow) { - let sfdcRoll = { - 'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo, - 'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo, - 'rollNo': sfdcRollRow.rollNo, 'operatorId': this.scheduleData.operatorId - }; - reopenSfdcRolls(sfdcRoll).then(({data}) => { - //判断是否成功 - if (data.code == 500) { - this.$message.error(data.msg); - } else { - this.$message.success(data.resultMap.resultMsg); - //刷新报工的页面 - this.refreshPageData(); - } + this.$refs.comProduceMaterial.init(this.scheduleData) }); }, diff --git a/src/views/modules/scheduleReport/com_scan_material.vue b/src/views/modules/scheduleReport/com_scan_material.vue index 1adb7a6..1b71f14 100644 --- a/src/views/modules/scheduleReport/com_scan_material.vue +++ b/src/views/modules/scheduleReport/com_scan_material.vue @@ -1,33 +1,34 @@