modified: src/api/basic/part.js
modified: src/page/index/index.vue
modified: src/page/index/layout.vue
modified: src/page/index/logo.vue
modified: src/page/index/sidebar/sidebarItem.vue
modified: src/page/index/tags.vue
modified: src/views/basic/location/location-form.vue
modified: src/views/basic/part/index.vue
modified: src/views/basic/warehouse/warehouse-form.vue
modified: src/views/basic/workstation/workstation-form.vue
modified: src/views/plan/schedulelookover/index.vue
| | |
| | | |
| | | /** |
| | | * 同步基础数据 |
| | | * @param query |
| | | * @param obj |
| | | * @returns {*} |
| | | */ |
| | | export function syncPart(query) { |
| | | export function syncPart(obj) { |
| | | return request({ |
| | | url: '/mes/part/syncPart', |
| | | url: '/mes/part/syncNewIfs', |
| | | method: 'post', |
| | | params: query |
| | | data: obj |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <div :class="{ 'avue--collapse': isCollapse }" class="avue-contail"> |
| | | <div class="avue-header" style="background-color: rgb(160, 46, 109);"> |
| | | <div class="avue-header" style="background-color: #875a7b;"> |
| | | <!-- 顶部导航栏 --> |
| | | <top /> |
| | | </div> |
| | |
| | | <template> |
| | | <template> |
| | | <router-view/> |
| | | </template> |
| | |
| | | <template> |
| | | <div class="avue-logo" style="background-color:rgb(160, 46, 109);"> |
| | | <div class="avue-logo" style="background-color:#875a7b;"> |
| | | <transition-group name="fade"> |
| | | <template v-if="!keyCollapse"> |
| | | <span |
| | | key="1" style="background-color:rgb(160, 46, 109);font-weight: bold; " |
| | | key="1" style="background-color:#875a7b;font-weight: bold; " |
| | | class="avue-logo_title" @click="goIndex"><span |
| | | class="logo-lg">{{sysTitle&&sysTitle!='null'?sysTitle:'MES'}}</span> |
| | | </span> |
| | |
| | | style="width: 220px;" |
| | | src="/images/Sun-Mes-Logo-Normal.png" |
| | | /></span>--> |
| | | <div key="1" style="width:220px;height:60px;background-color:rgb(160, 46, 109);position: relative;"> |
| | | <div key="1" style="width:220px;height:60px;background-color:#875a7b;position: relative;"> |
| | | <el-image |
| | | v-if="logSrc != null" |
| | | style="width:200px;position: absolute;" |
| | |
| | | <template> |
| | | <div class="menu-wrapper"> |
| | | <template v-for="item in menu"> |
| | | <el-menu-item |
| | | v-if="validatenull(item[childrenKey]) && vaildRoles(item)" |
| | | :index="item[pathKey]" |
| | | :key="item[labelKey]" |
| | | :class="{'is-active':vaildAvtive(item)}" |
| | | @click="open(item)"> |
| | | <i :class="item[iconKey]"/> |
| | | <span |
| | | slot="title" |
| | | :alt="item[pathKey]">{{ item[labelKey] }}</span> |
| | | <template v-for="(item,index) in menus"> |
| | | <el-menu-item v-if="validatenull(item[childrenKey]) && vaildRoles(item)" :index="item[pathKey]" |
| | | :key="index" :class="{ 'is-active': vaildAvtive(item) }" @click="open(item)"> |
| | | <i :class="item[iconKey]" /> |
| | | <span slot="title" :alt="item[pathKey]">{{ item[labelKey] }}</span> |
| | | </el-menu-item> |
| | | <el-submenu |
| | | v-else-if="!validatenull(item[childrenKey])&&vaildRoles(item)" |
| | | :index="item[pathKey]" |
| | | :key="item[labelKey]"> |
| | | <el-submenu v-else-if="!validatenull(item[childrenKey]) && vaildRoles(item)" :index="item[pathKey]" |
| | | :key="index"> |
| | | <template slot="title"> |
| | | <i :class="item[iconKey]"/> |
| | | <span |
| | | slot="title" |
| | | :class="{'el-menu--display':collapse && first}">{{ item[labelKey] }}</span> |
| | | <i :class="item[iconKey]" /> |
| | | <span slot="title" :class="{ 'el-menu--display': collapse && first }">{{ item[labelKey] }}</span> |
| | | </template> |
| | | <template v-for="(child,cindex) in item[childrenKey]"> |
| | | <el-menu-item |
| | | v-if="validatenull(child[childrenKey])" |
| | | :index="child[pathKey],cindex" |
| | | :class="{'is-active':vaildAvtive(child)}" |
| | | :key="child[labelKey]" |
| | | > |
| | | <template v-for="(child, cindex) in item[childrenKey]"> |
| | | <el-menu-item v-if="validatenull(child[childrenKey])" :index="child[pathKey], cindex" |
| | | :class="{ 'is-active': vaildAvtive(child) }" :key="cindex"> |
| | | <!--<a slot="title" draggable="true" @dragend ="dragOpen(child)" style="display: block;" > |
| | | <span>{{ child[labelKey] }}</span> |
| | | </a>--> |
| | | <a slot="title" :href="'#'+child[pathKey]" @click.prevent="open(child)" style="display: block;" > |
| | | <a slot="title" :href="'#' + child[pathKey]" @click.prevent="open(child)" style="display: block;"> |
| | | <span>{{ child[labelKey] }}</span> |
| | | </a> |
| | | </el-menu-item> |
| | | <sidebar-item |
| | | v-else |
| | | :menu="[child]" |
| | | :key="cindex" |
| | | :props="props" |
| | | :screen="screen" |
| | | :collapse="collapse"/> |
| | | <sidebar-item v-else :menu="[child]" :key="cindex" :props="props" :screen="screen" :collapse="collapse" /> |
| | | </template> |
| | | </el-submenu> |
| | | </template> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | config: config |
| | | config: config, |
| | | menus: [], |
| | | } |
| | | }, |
| | | created() {}, |
| | | mounted() {}, |
| | | created() { |
| | | //过滤基础不要的菜单 |
| | | // this.filterMenus('基础',['POC','盘具维护','IFS日志']) |
| | | }, |
| | | mounted() { |
| | | this.filterMenus('基础',['POC','盘具维护','IFS日志']) |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['roles']), |
| | | labelKey() { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | dragOpen(item){ |
| | | var routeData=this.$router.resolve({ |
| | | name:item[this.labelKey], |
| | | filterMenus(fatherName, childrens) { |
| | | this.menus=this.menu |
| | | let start_menu = JSON.parse(JSON.stringify(this.menus)); |
| | | let base = start_menu.filter(item => { |
| | | return item.label === fatherName |
| | | })[0] |
| | | let up_base = base.children.filter(item => { |
| | | return !childrens.includes(item.label); |
| | | }) |
| | | this.menus.forEach(element => { |
| | | if (element.label === '基础') { |
| | | element.children = [] |
| | | element.children = up_base |
| | | } |
| | | }); |
| | | }, |
| | | dragOpen(item) { |
| | | var routeData = this.$router.resolve({ |
| | | name: item[this.labelKey], |
| | | query: item.query |
| | | }); |
| | | window.open(routeData.href,'_blank'); |
| | | window.open(routeData.href, '_blank'); |
| | | }, |
| | | vaildAvtive(item) { |
| | | const groupFlag = (item['group'] || []).some(ele => |
| | |
| | | console.log(item[this.pathKey]) |
| | | if (this.screen <= 1) this.$store.commit('SET_COLLAPSE'); |
| | | this.$router.$avueRouter.group = item.group; |
| | | if(item[this.labelKey]=='工作台'){ |
| | | if (item[this.labelKey] == '工作台') { |
| | | /*this.$router.push({ |
| | | name:item[this.labelKey], |
| | | query: item.query |
| | | }).catch(() => {})*/ |
| | | var routeData=this.$router.resolve({ |
| | | name:item[this.labelKey], |
| | | var routeData = this.$router.resolve({ |
| | | name: item[this.labelKey], |
| | | query: item.query |
| | | }); |
| | | window.open(routeData.href, '_blank'); |
| | | }else{ |
| | | } else { |
| | | this.$router.push({ |
| | | path: this.$router.$avueRouter.getPath({ |
| | | name: item[this.labelKey], |
| | | src: item[this.pathKey] |
| | | }), |
| | | query: item.query |
| | | }).catch(() => {}) |
| | | }).catch(() => { }) |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div style="background-color:rgb(160, 46, 109)" |
| | | <div style="background-color:#875a7b" |
| | | v-if="showTag" |
| | | @click="contextmenuFlag=false" |
| | | class="avue-tags"> |
| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工厂" prop="factoryId"> |
| | | <el-select |
| | | <el-select disabled |
| | | v-model="dataForm.factoryId" |
| | | filterable |
| | | placeholder="请选择工厂" |
| | |
| | | visible: false, |
| | | dataForm: { |
| | | id: 0, |
| | | factoryId: '', |
| | | factoryId: 117, |
| | | pType: '', |
| | | locNo: '', |
| | | locName: '', |
| | |
| | | <template> |
| | | <div class="mod-config"> |
| | | <basic-container> |
| | | <ttable |
| | | :table="table" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | :uploadInfo="uploadInfo" |
| | | :isShowHide="true" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | :bottomOffset="125" |
| | | :ajaxFun="ajaxFun" |
| | | ref="partTable" |
| | | > |
| | | <ttable :table="table" @handleSelectionChange="handleSelectionChange" :uploadInfo="uploadInfo" :isShowHide="true" |
| | | :prelang="prelang" :options="options" :bottomOffset="125" :ajaxFun="ajaxFun" ref="partTable"> |
| | | <template #toolbar></template> |
| | | </ttable> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <table-form |
| | | v-if="addOrUpdateVisible" |
| | | ref="addOrUpdate" |
| | | @refreshDataList="getData" |
| | | ></table-form> |
| | | <PrintLabelForm |
| | | :currshowlist.sync="showPrintLabelForm" |
| | | :printLabelInfo="printLabelInfo" |
| | | /> |
| | | <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form> |
| | | <PrintLabelForm :currshowlist.sync="showPrintLabelForm" :printLabelInfo="printLabelInfo" /> |
| | | </basic-container> |
| | | <el-dialog title="同步IFS" :visible.sync="dialogVisible" width="30%" :before-close="handleClose"> |
| | | <el-row> |
| | | <el-col :span="6""> |
| | | 同步日期: |
| | | </el-col> |
| | | <el-col :span="18"> |
| | | <el-date-picker style="width: 100%;" v-model="selectDate" type="date" placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">取 消</el-button> |
| | | <el-button type="primary" @click="syncIfs">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | selectDate: null, |
| | | dialogVisible: false, |
| | | ajaxFun: fetchList, |
| | | addOrUpdateVisible: false, |
| | | multipleSelection: [], |
| | |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | { |
| | | text: '同步ERP', |
| | | text: '同步IFS', |
| | | type: 'primary', |
| | | fun: this.syncIfs, |
| | | fun: this.syncISDate, |
| | | loading: false |
| | | }, |
| | | { |
| | |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | methods: { |
| | | handleClose() { |
| | | this.selectDate=null; |
| | | this.dialogVisible = false |
| | | }, |
| | | // 获取数据列表 |
| | | getData() { |
| | | this.$refs.partTable.getDataList() |
| | |
| | | closeOnClickModal: false, |
| | | type: 'warning' |
| | | }) |
| | | .then(function() { |
| | | .then(function () { |
| | | return delObj(row.id) |
| | | }) |
| | | .then((data) => { |
| | |
| | | // this.$message.warning('请先选择零件,再进行同步!') |
| | | // } |
| | | // }, |
| | | syncISDate() { |
| | | this.dialogVisible = true |
| | | }, |
| | | syncIfs() { |
| | | syncPart({}) |
| | | this.table.toolbar.find((e) => e.text === '同步IFS').loading = true |
| | | this.handleClose() |
| | | let data=new FormData() |
| | | data.append("date",this.selectDatethis.selectDate) |
| | | console.log(data); |
| | | syncPart(data) |
| | | .then((res) => { |
| | | const data = res.data |
| | | if (data.code === 0) { |
| | | this.$message.success('开始同步') |
| | | } else { |
| | | this.$message.error('同步ERP失败') |
| | | this.$message.error('同步IFS失败') |
| | | } |
| | | }) |
| | | .catch((e) => { |
| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工厂" prop="factoryId"> |
| | | <el-select |
| | | <el-select disabled |
| | | v-model="dataForm.factoryId" |
| | | filterable |
| | | placeholder="请选择" |
| | |
| | | warehouseName: '', |
| | | warehouseDesc: '', |
| | | warehouseType: '', |
| | | factoryId: '', |
| | | factoryId: 117, |
| | | warehouseAddr: '', |
| | | warehouseMap: '', |
| | | warehouseStatus: '', |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工厂" prop="factoryId"> |
| | | <el-select |
| | | <el-select disabled |
| | | v-model="dataForm.factoryId" |
| | | placeholder="工厂" |
| | | filterable |
| | |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | <el-row> |
| | | <el-row style="width: 100%;"> |
| | | <el-tabs |
| | | type="card" |
| | | v-model="activeTabName" |
| | | ref="tabs" |
| | | style="height: 400px" |
| | | style="height: 400px;width: 100%;" |
| | | > |
| | | <el-tab-pane label="设备" name="equip"> |
| | | <el-transfer |
| | |
| | | > |
| | | </el-transfer> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="检验待处理库位" name="pending"> |
| | | <!-- <el-tab-pane label="检验待处理库位" name="pending"> |
| | | <el-transfer |
| | | filterable |
| | | v-model="pendingLocationIds" |
| | |
| | | @change="handleProductInspectionLocation" |
| | | > |
| | | </el-transfer> |
| | | </el-tab-pane> |
| | | </el-tab-pane> --> |
| | | <el-tab-pane label="人工模板" name="handyman"> |
| | | <el-transfer |
| | | filterable |
| | |
| | | workstationNo: '', |
| | | name: '', |
| | | type: '', |
| | | factoryId: 0, |
| | | factoryId: 117, |
| | | remark: '', |
| | | artificialType: '', |
| | | workCenter: '', |
| | |
| | | 'dataForm.factoryId': { |
| | | handler(newValue, oldValue) { |
| | | if (!this.dataForm.id) { |
| | | console.log(1); |
| | | if (newValue) { |
| | | this.workstationFactory.factoryId = this.dataForm.factoryId |
| | | getEquipmentByFactoryId(this.workstationFactory).then( |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | viewEnd: this.scheduleDate[1], |
| | | workStationList: this.workStationList, |
| | | stateList: this.checkStatusList, |
| | | sceneId: null |
| | | sceneId: null, |
| | | }) |
| | | ) |
| | | .then((response) => { |