From 7a467e65fcf78012adbce215f9e00278a7e96e3e Mon Sep 17 00:00:00 2001 From: ruanqi Date: Thu, 6 Jan 2022 18:38:50 +0800 Subject: [PATCH] =?UTF-8?q?20211213=20=E6=9F=90=E4=BA=9B=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/calendar.vue | 24 ++- src/views/modules/base/searchPartNo.vue | 3 +- src/views/modules/base/workCenter.vue | 131 ++++++++++++- src/views/modules/knifemold/tool-info.vue | 32 +--- .../searchProcessRouteTool.vue | 32 +++- .../searchProductProcessRoute.vue | 96 ++++++++++ .../beginMaterialSlittedSet.vue | 178 ++++++++++++------ .../searchSAPPurchaseOrder.vue | 10 +- .../searchSAPSlittedOrder.vue | 8 +- 9 files changed, 412 insertions(+), 102 deletions(-) diff --git a/src/views/modules/base/calendar.vue b/src/views/modules/base/calendar.vue index b3c32b0..b94af77 100644 --- a/src/views/modules/base/calendar.vue +++ b/src/views/modules/base/calendar.vue @@ -799,15 +799,33 @@ this.height = window.innerHeight - 190; }) }, + watch: { + '$route' (to, from) { + if(localStorage.getItem('calendar')!=undefined){ + this.jump(); + } + } + }, methods: { + jump(){ + let data=JSON.parse(localStorage.getItem('calendar')); + localStorage.removeItem('calendar'); + getCalendarData(data).then(({data}) => { + this.dataList = data.rows + }) + }, // 多选数据 selectionChangeHandle (val) { this.dataListSelections = val }, getData(){ - getCalendarData(this.searchData).then(({data}) => { - this.dataList = data.rows - }) + if(localStorage.getItem('calendar')!=undefined){ + this.jump(); + }else { + getCalendarData(this.searchData).then(({data}) => { + this.dataList = data.rows + }) + } }, newCalendarModel(){ this.newCalendarData.id=0, diff --git a/src/views/modules/base/searchPartNo.vue b/src/views/modules/base/searchPartNo.vue index 2e43e99..862d2d1 100644 --- a/src/views/modules/base/searchPartNo.vue +++ b/src/views/modules/base/searchPartNo.vue @@ -5,7 +5,7 @@ - + @@ -280,6 +280,7 @@ ], } }, + mounted() { this.$nextTick(() => { this.height = window.innerHeight - 180; diff --git a/src/views/modules/base/workCenter.vue b/src/views/modules/base/workCenter.vue index 24ffd76..0e2706a 100644 --- a/src/views/modules/base/workCenter.vue +++ b/src/views/modules/base/workCenter.vue @@ -73,10 +73,15 @@ + + {{'物料信息'}} + + + {{'工作日历'}} + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 关闭 + + @@ -235,11 +280,28 @@ saveWorkCenterData, deleteWorkCenterData, }from "@/api/base/site.js" + import { + searchPartNoData, + } from "@/api/base/site.js" + export default { //加工中心 name: "workCenter", data() { return { + currentRow:null, + partFlag:false, + partData:{ + partNo:'', + partDescription:'', + site:'', + createDate:'', + umid:'', + active:'', + configurationTemplateID:'', + modelFlag:'', + }, + currentRow2:null, // 导出 start exportData: [], exportName: "加工中心涉及产品"+this.dayjs().format('YYYYMMDDHHmmss'), @@ -774,10 +836,60 @@ }, mounted() { this.$nextTick(() => { - this.height = window.innerHeight - 230; + this.height = window.innerHeight - 250; }) }, + watch: { + '$route' (to, from) { + if(localStorage.getItem('workCenterNo')!=undefined){ + this.jump(); + } + } + }, methods: { + clickData2(row){ + this.currentRow2 = JSON.parse(JSON.stringify(row)); + }, + jumpCalendar(){ + if(this.currentRow2==null){ + this.$alert("请选择卷!", '错误', { + confirmButtonText: '确定' + }) + return false; + } + let inData={user:this.$store.state.user.name,site:this.currentRow2.site,calendarId:this.currentRow2.calendarID}; + localStorage.setItem('calendar', JSON.stringify(inData)) + this.$router.replace('base-calendar') + }, + getPartDetail(){ + if(this.currentRow==null){ + this.$alert("请选择卷!", '错误', { + confirmButtonText: '确定' + }) + return false; + } + let inData={ + user:this.$store.state.user.name, + site:this.currentRow.site, + partNo:this.currentRow.partNo + } + searchPartNoData(inData).then(({data}) => { + if (data.rows.length==0){ + this.$alert("该物料编码不存在", '错误', { + confirmButtonText: '确定' + }) + return false; + } + this.partData = data.rows[0]; + this.partFlag=true; + }) + + }, + first(){ + if(localStorage.getItem('workCenterNo')!=undefined){ + this.jump(); + } + }, getData(){ let inData={ user:this.$store.state.user.name @@ -787,6 +899,21 @@ this.modelFlag2=true; }) }, + jump(){ + let data=JSON.parse(localStorage.getItem('workCenterNo')); + localStorage.removeItem('workCenterNo'); + getWorkCenterData(data).then(({data}) => { + this.dataList3 = data.rows; + this.modelData=data.rows[0]; + getWorkCenterDataDetail(this.modelData).then(({data}) => { + this.dataList2 = data.rows2; + this.dataList = data.rows1; + }) + }) + }, + clickData(row){ + this.currentRow = JSON.parse(JSON.stringify(row)); + }, addModal(){ this.modelData2={}; this.modelData2.add=0; @@ -966,7 +1093,7 @@ // 导出 end }, created() { - + this.first(); } } diff --git a/src/views/modules/knifemold/tool-info.vue b/src/views/modules/knifemold/tool-info.vue index 17762a0..d994ccf 100644 --- a/src/views/modules/knifemold/tool-info.vue +++ b/src/views/modules/knifemold/tool-info.vue @@ -62,7 +62,6 @@ {{ buttons.edit }} - {{ buttons.print }} @@ -344,7 +343,6 @@ getSfdcToolingHistList, getToolHeaderList, updateToolDetail, - printTool, } from '@/api/knifemold/tool-info.js' export default { @@ -707,8 +705,7 @@ search: '查询', download: '导出', settingTable: '设置列表', - defaultTable: '设置默认配置', - print : '打印', + defaultTable: '设置默认配置' }, // 导出 start exportData: [], @@ -814,31 +811,6 @@ this.getLanguageList() }, methods: { - printMethod(){ - if (this.currentDetailData.toolInstanceId == ''){ - this.$alert('请选择工具信息!', '操作提示', { - confirmButtonText: '确定', - callback: action => { - } - }); - return - } - let reportFamily = '工具标签' - let toolInstanceId = this.currentDetailData.toolInstanceId - let jsonData = { - reportFamily : reportFamily, - toolInstanceId : toolInstanceId, - } - printTool(jsonData).then(({data}) =>{ - if (data.code != 0){ - this.$alert(data.msg, '操作提示', { - confirmButtonText: '确定', - callback: action => { - } - }); - } - }) - }, rowDblclick(row, column, event){ console.log(row) console.log(column) @@ -1070,7 +1042,7 @@ getFunctionButtonList() { searchFunctionButtonList(this.queryButton).then(({data}) => { if (JSON.stringify(data.data)!=='{}') { - //this.buttons = data.data + this.buttons = data.data } else { saveButtonList(this.buttonList).then(({data}) => { }) diff --git a/src/views/modules/productProcessRoute/searchProcessRouteTool.vue b/src/views/modules/productProcessRoute/searchProcessRouteTool.vue index fd587c6..e22c89a 100644 --- a/src/views/modules/productProcessRoute/searchProcessRouteTool.vue +++ b/src/views/modules/productProcessRoute/searchProcessRouteTool.vue @@ -93,6 +93,8 @@ placeholder="选择日期"> {{'查询'}} + {{'工具信息'}} + {{'加工中心'}} { this.dataList = data.rows }) }, + jumpToolInfo(){ + if(this.currentRow==null){ + this.$alert("请选择卷!", '错误', { + confirmButtonText: '确定' + }) + return false; + } + let inData={site:this.$store.state.user.site,toolId:this.currentRow.toolID,toolDescription:this.currentRow.toolDescription}; + localStorage.setItem('toolInfo', JSON.stringify(inData)) + this.$router.replace('knifemold-tool-info') + }, + jumpWorkCenter(){ + if(this.currentRow==null){ + this.$alert("请选择卷!", '错误', { + confirmButtonText: '确定' + }) + return false; + } + let inData={user:this.$store.state.user.name,site:this.currentRow.site,workCenterNo:this.currentRow.workCenterNo}; + localStorage.setItem('workCenterNo', JSON.stringify(inData)) + this.$router.replace('base-workCenter') + }, //导出excel createExportData() { - return this.dataList; - }, startDownload() { // this.exportData = this.dataList diff --git a/src/views/modules/productProcessRoute/searchProductProcessRoute.vue b/src/views/modules/productProcessRoute/searchProductProcessRoute.vue index 205dc09..26a75c7 100644 --- a/src/views/modules/productProcessRoute/searchProductProcessRoute.vue +++ b/src/views/modules/productProcessRoute/searchProductProcessRoute.vue @@ -81,6 +81,8 @@ placeholder="选择日期"> {{'查询'}} + {{'物料信息'}} + {{'加工中心'}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 关闭 + + + @@ -130,16 +171,32 @@ searchProductProcessRoute, } from "@/api/base/productProcessRoute.js" + import { + searchPartNoData, + } from "@/api/base/site.js" + export default { name: "searchProductProcessRoute", data() { return { + partFlag:false, + partData:{ + partNo:'', + partDescription:'', + site:'', + createDate:'', + umid:'', + active:'', + configurationTemplateID:'', + modelFlag:'', + }, // 导出 start exportData: [], exportName: "产品工艺路线"+this.dayjs().format('YYYYMMDDHHmmss'), exportHeader: ["产品工艺路线"], exportFooter: [], // 导出 end + currentRow:null, height: 200, modelFlag:false, modelInputFlag:true, @@ -613,6 +670,45 @@ this.dataList = data.rows }) }, + clickData(row){ + this.currentRow = JSON.parse(JSON.stringify(row)); + }, + + getPartDetail(){ + if(this.currentRow==null){ + this.$alert("请选择卷!", '错误', { + confirmButtonText: '确定' + }) + return false; + } + let inData={ + user:this.$store.state.user.name, + site:this.currentRow.site, + partNo:this.currentRow.partNo + } + searchPartNoData(inData).then(({data}) => { + if (data.rows.length==0){ + this.$alert("该物料编码不存在", '错误', { + confirmButtonText: '确定' + }) + return false; + } + this.partData = data.rows[0]; + this.partFlag=true; + }) + + }, + jumpWorkCenter(){ + if(this.currentRow==null){ + this.$alert("请选择卷!", '错误', { + confirmButtonText: '确定' + }) + return false; + } + let inData={user:this.$store.state.user.name,site:this.currentRow.site,workCenterNo:this.currentRow.workCenterNo}; + localStorage.setItem('workCenterNo', JSON.stringify(inData)) + this.$router.replace('base-workCenter') + }, //导出excel createExportData() { diff --git a/src/views/modules/purchasingManagement/beginMaterialSlittedSet.vue b/src/views/modules/purchasingManagement/beginMaterialSlittedSet.vue index 9decd3e..da2d592 100644 --- a/src/views/modules/purchasingManagement/beginMaterialSlittedSet.vue +++ b/src/views/modules/purchasingManagement/beginMaterialSlittedSet.vue @@ -1,25 +1,19 @@