diff --git a/src/App.vue b/src/App.vue index cc7379f..20db938 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,7 +5,7 @@ diff --git a/src/views/main-navbar-update-language.vue b/src/views/main-navbar-update-language.vue index 6dbc8ac..477a808 100644 --- a/src/views/main-navbar-update-language.vue +++ b/src/views/main-navbar-update-language.vue @@ -2,6 +2,7 @@ @@ -11,10 +12,9 @@ {{language}} - - - - + + @@ -28,6 +28,9 @@ diff --git a/src/views/main-navbar-update-password.vue b/src/views/main-navbar-update-password.vue index f25a54c..b4e9b53 100644 --- a/src/views/main-navbar-update-password.vue +++ b/src/views/main-navbar-update-password.vue @@ -2,6 +2,7 @@ diff --git a/src/views/main-navbar.vue b/src/views/main-navbar.vue index fbe9a24..983692a 100644 --- a/src/views/main-navbar.vue +++ b/src/views/main-navbar.vue @@ -10,40 +10,31 @@ - {{$t('commonSystemName')}} - {{$t('commonAbbreviation')}} + {{pageLanguage.XjSysManage}} + {{pageLanguage.abbreviation}} + @@ -109,13 +61,94 @@ import UpdatePassword from './main-navbar-update-password' import UpdateLanguage from './main-navbar-update-language' import {clearLoginInfo} from '@/utils' - + import { + searchFunctionButtonList, + saveButtonList, + searchSysLanguage, + } from "@/api/sysLanguage.js" export default { data() { return { updatePassowrdVisible: false, updateLanguageVisible: false, - message: this.$t('language.name') + message: this.$t('language.name'), + languageList: [], + pageLanguage: { + XjSysManage: '旭捷管理系统', + abbreviation: '旭捷', + setting: '设置', + languageSetting: '语言设置', + userSetting: '用户设置', + updatePassword: '修改密码', + updateDefaultLanguage: '修改默认语言', + cssSetting: '主提设置' + }, + // 导出 end + pageLanguageList: [ + { + functionId: "systemInformation", + languageValue: '旭捷管理系统', + objectId: 'XjSysManage', + objectType: "label", + tableId: "systemInformation" + }, + { + functionId: "systemInformation", + languageValue: '首页', + objectId: 'homePage', + objectType: "label", + tableId: "systemInformation" + }, + { + functionId: "systemInformation", + languageValue: '旭捷', + objectId: 'abbreviation', + objectType: "label", + tableId: "systemInformation" + }, + { + functionId: "systemInformation", + languageValue: '设置', + objectId: 'setting', + objectType: "label", + tableId: "systemInformation" + }, + { + functionId: "systemInformation", + languageValue: '语言设置', + objectId: 'languageSetting', + objectType: "label", + tableId: "systemInformation" + }, + { + functionId: "systemInformation", + languageValue: '用户设置', + objectId: 'userSetting', + objectType: "label", + tableId: "systemInformation" + }, + { + functionId: "systemInformation", + languageValue: '修改密码', + objectId: 'updatePassword', + objectType: "label", + tableId: "systemInformation" + }, + { + functionId: "systemInformation", + languageValue: '修改用户语言', + objectId: 'updateDefaultLanguage', + objectType: "label", + tableId: "systemInformation" + }, + { + functionId: "systemInformation", + languageValue: '主题设置', + objectId: 'cssSetting', + objectType: "label", + tableId: "systemInformation" + } + ], } }, components: { @@ -149,8 +182,36 @@ return this.$store.state.user.userDisplay } } + }, + activated() { + }, methods: { + // 获取多语言列表 + getLanguageList() { + searchSysLanguage({}).then(({data}) => { + this.languageList = data.rows + }) + }, + // 获取页面多语言数据 + getFunctionButtonList() { + let queryButton = { + functionId: 'systemInformation', + tableId: 'systemInformation', + languageCode: this.$i18n.locale, + objectType: 'label' + } + searchFunctionButtonList(queryButton).then(({data}) => { + if (JSON.stringify(data.data) != '{}') { + this.pageLanguage = data.data + + } else { + saveButtonList(this.pageLanguageList).then(({data}) => { + this.getFunctionButtonList() + }) + } + }) + }, // 注3:增加语言切换函数 switch_the_language(val) { localStorage.setItem('locale', val) @@ -190,6 +251,10 @@ }).catch(() => { }) } + }, + created() { + this.getLanguageList() + this.getFunctionButtonList() } } diff --git a/src/views/main-sidebar.vue b/src/views/main-sidebar.vue index ec36444..3870d66 100644 --- a/src/views/main-sidebar.vue +++ b/src/views/main-sidebar.vue @@ -14,22 +14,9 @@ - {{ $t('commonhomePage') }} + {{ pageLanguage.homePage }} - - - - - - - - - - - - - - + { + if (JSON.stringify(data.data) != '{}') { + this.pageLanguage = data.data + } + }) + }, // 用户收藏夹 userFavorites() { let query = { @@ -175,19 +184,19 @@ export default { menuSum = Array.from(new Set([...menuSum])) if (menuSum.length > 0) { - let menuList = menuSum.filter(item => item.parentId == 0); - this.menuList=menuList - this.treeList(menuList,menuSum) + let menuList = menuSum.filter(item => item.parentId == 0); + this.menuList = menuList + this.treeList(menuList, menuSum) } } }, // 封装树形结构 - treeList(menuList,menuSum) { + treeList(menuList, menuSum) { for (let m1 of menuList) { for (let m2 of menuSum) { - if (m1.menuId == m2.parentId){ + if (m1.menuId == m2.parentId) { m1.list.push(m2) - this.treeList( m1.list,menuSum) + this.treeList(m1.list, menuSum) } } } diff --git a/src/views/modules/base/maintainProductRouting.vue b/src/views/modules/base/maintainProductRouting.vue index 27365ce..eaa4dec 100644 --- a/src/views/modules/base/maintainProductRouting.vue +++ b/src/views/modules/base/maintainProductRouting.vue @@ -124,6 +124,7 @@ 查询 + 新增 + + + - 加工中心编码: + 加工中心编码: @@ -225,7 +236,7 @@ - 工具编号: + 工具编号: @@ -400,7 +411,7 @@ 新产品工艺路线 - 工艺路线编码: + 工艺路线编码: @@ -450,6 +461,67 @@ 关闭 + + + + 工艺路线编码: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 关闭 + + @@ -475,6 +547,8 @@ changeOrderRouting, saveCopyRouting, setDefault, + saveRoutingHeaderData, + deleteRoutingHeaderData }from "@/api/base/site.js" import Chooselist from '@/views/modules/common/Chooselist' export default { @@ -484,6 +558,21 @@ }, data () { return { + routingHeaderInputFlag:false, + routingHeaderModelFlag:false, + routingHeaderData:{ + partNo:'', + site:'', + status:'', + revNo:'', + phaseInDate:'', + phaseOutDate:'', + routingType:'', + remark:'', + defaultflag:'', + repairFlag:'', + add:'', + }, selectList:[], resourceList1:[], resourceList2:[], @@ -1329,7 +1418,8 @@ revNo:'', add:'', user:'', - } + }, + tagNo2:'', } }, mounted() { @@ -1338,6 +1428,99 @@ }) }, methods: { + editRoutingHeaderModel(row){ + this.routingHeaderData={ + partNo:row.partNo, + site:row.site, + status:row.status, + revNo:row.revNo, + phaseInDate:row.phaseInDate, + phaseOutDate:row.phaseOutDate, + routingType:row.routingType, + remark:row.remark, + defaultflag:row.defaultflag, + repairFlag:row.repairFlag, + add:1, + }; + this.routingHeaderInputFlag=true; + this.routingHeaderModelFlag=true; + }, + addRoutingHeaderModel(){ + this.routingHeaderData={ + partNo:'', + site:this.$store.state.user.site, + status:'试验', + revNo:'', + phaseInDate:new Date(), + phaseOutDate:null, + routingType:'制造', + remark:'', + defaultflag:'Y', + repairFlag:'N', + add:0, + }; + this.routingHeaderInputFlag=false; + this.routingHeaderModelFlag=true; + }, + saveRoutingHeaderData(){ + if(this.routingHeaderData.partNo==''||this.routingHeaderData.partNo==null){ + this.$alert("请输入工艺路线号!",'错误',{ + confirmButtonText:'确定' + }) + return false; + } + if(this.routingHeaderData.revNo==''||this.routingHeaderData.revNo==null){ + this.$alert("请输入版本号!",'错误',{ + confirmButtonText:'确定' + }) + return false; + } + if(this.routingHeaderData.phaseInDate==''||this.routingHeaderData.phaseInDate==null){ + this.$alert("请选择启用日期!",'错误',{ + confirmButtonText:'确定' + }) + return false; + } + saveRoutingHeaderData(this.routingHeaderData).then(({data}) => { + if (data && data.code == 200) { + this.routingHeaderModelFlag = false + this.searchRoutingWithPartNo(); + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + deleteRoutingHeaderData(row){ + this.$confirm(`是否删除此工艺路线的所有数据?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let inData = { + site: row.site, + partNo: row.partNo, + revNo: row.revNo, + } + deleteRoutingHeaderData(inData).then(({data}) => { + if (data && data.code == 200) { + this.searchRoutingWithPartNo(); + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + }, getBaseData(val){ if (this.tagNo === 24){ this.detailData.workCenterNo = val.WorkCenterNo @@ -1347,23 +1530,33 @@ this.getToolDesc(); } if (this.tagNo === 5){ - this.copyRoutingData.partNo1 = val.PartNo - this.getPartDescription(); + if(this.tagNo2===1) { + this.copyRoutingData.partNo1 = val.PartNo + this.getPartDescription(); + }else { + this.routingHeaderData.partNo= val.PartNo + } } }, // 获取基础数据列表 - getBaseList(val){ + getBaseList(val,val2){ this.tagNo = val + this.tagNo2 = val2 this.$nextTick(() => { let strVal = ""; if (val === 24){ strVal = this.detailData.workCenterNo } if (val === 70){ - strVal = this.toolData.toolID + strVal = this.toolData.toolID + } if (val === 5){ - strVal = this.copyRoutingData.partNo1 + if(val2===1) { + strVal = this.copyRoutingData.partNo1 + }else { + strVal = this.routingHeaderData.partNo + } } this.$refs.baseList.init(val,strVal) }) @@ -1375,9 +1568,16 @@ }) return false; } - let size=this.dataList2.length; + let size; + let itemNo; + if(this.dataList2){ + size=this.dataList2.length; + itemNo=this.dataList2[Number(size-1)].itemNo+10; + }else { + itemNo=10; + } this.detailData={ - itemNo:this.dataList2[Number(size-1)].itemNo+10, + itemNo:itemNo, operationDesc:'', workCenterNo:'', machSetupTime:0, @@ -2098,6 +2298,38 @@ saveCopyRouting(inData).then(({data}) => { if (data && data.code == 200) { this.copyRoutingModelFlag = false + let data={ + partNo:this.mainData.partNo, + site:this.mainData.site, + revNo:this.mainData.revNo, + } + searchRoutingWithPartNo(data).then(({data}) => { + if(data.rows.length>0){ + if(data.rows[0].repairFlag=='Y'){ + data.rows[0].repairFlag=true; + }else { + data.rows[0].repairFlag=false; + } + if(data.rows[0].defaultflag=='Y'){ + data.rows[0].defaultflag=true; + }else { + data.rows[0].defaultflag=false; + } + this.mainData = data.rows[0] + let data1={ + site: data.rows[0].site, + partNo:data.rows[0].partNo, + revNo:data.rows[0].revNo, + } + searchRoutingDetailData(data1).then(({data}) => { + this.dataList2=data.rows; + }) + searchRoutingToolData(data1).then(({data}) => { + this.dataList3=data.rows; + }) + } + + }) this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/base/partDistribution.vue b/src/views/modules/base/partDistribution.vue index aa2d157..51f4c91 100644 --- a/src/views/modules/base/partDistribution.vue +++ b/src/views/modules/base/partDistribution.vue @@ -1,8 +1,11 @@ diff --git a/src/views/modules/common/Chooselist.vue b/src/views/modules/common/Chooselist.vue index 43e7e9a..8cb5895 100644 --- a/src/views/modules/common/Chooselist.vue +++ b/src/views/modules/common/Chooselist.vue @@ -139,7 +139,7 @@ export default { prop = item.substring(index2+1,l) } let column = { - "columnProp":prop, + "columnProp":prop.trim(), "columnLabel": name, "columnHidden": false, "columnImage": false, diff --git a/src/views/modules/sys/language/common.vue b/src/views/modules/sys/language/common.vue index a38c6e1..f5ad180 100644 --- a/src/views/modules/sys/language/common.vue +++ b/src/views/modules/sys/language/common.vue @@ -7,7 +7,7 @@ - + @@ -30,8 +30,6 @@ class="el-button el-button--primary el-button--medium"> {{ buttons.download }} - - {{ buttons.list }} @@ -82,11 +80,22 @@ - - + + + + + + + {{ buttons.search }} + + + {{ buttons.addList }} + + +