Fixiaobai
2023-10-24 1f631433ad4d54484b1d956ae05b8c36e5d4e95f
	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
已修改11个文件
203 ■■■■ 文件已修改
src/api/basic/part.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/index/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/index/layout.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/index/logo.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/index/sidebar/sidebarItem.vue 94 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/page/index/tags.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/location/location-form.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/part/index.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/warehouse/warehouse-form.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/workstation/workstation-form.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/schedulelookover/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basic/part.js
@@ -115,13 +115,13 @@
/**
 * 同步基础数据
 * @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
  })
}
src/page/index/index.vue
@@ -1,6 +1,6 @@
<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>
src/page/index/layout.vue
@@ -1,3 +1,3 @@
<template>
 <template>
  <router-view/>
</template>
src/page/index/logo.vue
@@ -1,9 +1,9 @@
<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>
@@ -12,7 +12,7 @@
            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;"
src/page/index/sidebar/sidebarItem.vue
@@ -1,48 +1,28 @@
<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>
@@ -77,11 +57,17 @@
  },
  data() {
    return {
      config: config
      config: config,
      menus: [],
    }
  },
  created() {},
  mounted() {},
  created() {
    //过滤基础不要的菜单
    // this.filterMenus('基础',['POC','盘具维护','IFS日志'])
  },
  mounted() {
    this.filterMenus('基础',['POC','盘具维护','IFS日志'])
   },
  computed: {
    ...mapGetters(['roles']),
    labelKey() {
@@ -101,12 +87,28 @@
    }
  },
  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 =>
@@ -126,24 +128,24 @@
      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(() => { })
      }
    }
  }
src/page/index/tags.vue
@@ -1,5 +1,5 @@
<template>
  <div style="background-color:rgb(160, 46, 109)"
  <div style="background-color:#875a7b"
    v-if="showTag"
    @click="contextmenuFlag=false"
    class="avue-tags">
src/views/basic/location/location-form.vue
@@ -15,7 +15,7 @@
      <el-row>
        <el-col :span="12">
          <el-form-item label="工厂" prop="factoryId">
            <el-select
            <el-select disabled
              v-model="dataForm.factoryId"
              filterable
              placeholder="请选择工厂"
@@ -222,7 +222,7 @@
      visible: false,
      dataForm: {
        id: 0,
        factoryId: '',
        factoryId: 117,
        pType: '',
        locNo: '',
        locName: '',
src/views/basic/part/index.vue
@@ -1,30 +1,29 @@
<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>
@@ -40,6 +39,8 @@
export default {
  data() {
    return {
      selectDate: null,
      dialogVisible: false,
      ajaxFun: fetchList,
      addOrUpdateVisible: false,
      multipleSelection: [],
@@ -363,9 +364,9 @@
            fun: this.addOrUpdateHandle
          },
          {
            text: '同步ERP',
            text: '同步IFS',
            type: 'primary',
            fun: this.syncIfs,
            fun: this.syncISDate,
            loading: false
          },
          {
@@ -427,6 +428,10 @@
    ...mapGetters(['permissions'])
  },
  methods: {
    handleClose() {
      this.selectDate=null;
      this.dialogVisible = false
    },
    // 获取数据列表
    getData() {
      this.$refs.partTable.getDataList()
@@ -446,7 +451,7 @@
        closeOnClickModal: false,
        type: 'warning'
      })
        .then(function() {
        .then(function () {
          return delObj(row.id)
        })
        .then((data) => {
@@ -627,14 +632,22 @@
    //     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) => {
src/views/basic/warehouse/warehouse-form.vue
@@ -60,7 +60,7 @@
      <el-row>
        <el-col :span="12">
          <el-form-item label="工厂" prop="factoryId">
            <el-select
            <el-select disabled
              v-model="dataForm.factoryId"
              filterable
              placeholder="请选择"
@@ -187,7 +187,7 @@
        warehouseName: '',
        warehouseDesc: '',
        warehouseType: '',
        factoryId: '',
        factoryId: 117,
        warehouseAddr: '',
        warehouseMap: '',
        warehouseStatus: '',
src/views/basic/workstation/workstation-form.vue
@@ -64,7 +64,7 @@
            </el-select>
          </el-form-item>
          <el-form-item label="工厂" prop="factoryId">
            <el-select
            <el-select disabled
              v-model="dataForm.factoryId"
              placeholder="工厂"
              filterable
@@ -87,12 +87,12 @@
        </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
@@ -160,7 +160,7 @@
          >
          </el-transfer>
        </el-tab-pane>
        <el-tab-pane label="检验待处理库位" name="pending">
        <!-- <el-tab-pane label="检验待处理库位" name="pending">
          <el-transfer
            filterable
            v-model="pendingLocationIds"
@@ -181,7 +181,7 @@
            @change="handleProductInspectionLocation"
          >
          </el-transfer>
        </el-tab-pane>
        </el-tab-pane> -->
        <el-tab-pane label="人工模板" name="handyman">
          <el-transfer
            filterable
@@ -221,7 +221,7 @@
        workstationNo: '',
        name: '',
        type: '',
        factoryId: 0,
        factoryId: 117,
        remark: '',
        artificialType: '',
        workCenter: '',
@@ -296,6 +296,7 @@
    'dataForm.factoryId': {
      handler(newValue, oldValue) {
        if (!this.dataForm.id) {
          console.log(1);
          if (newValue) {
            this.workstationFactory.factoryId = this.dataForm.factoryId
            getEquipmentByFactoryId(this.workstationFactory).then(
@@ -592,3 +593,6 @@
  }
}
</script>
<style scoped>
</style>
src/views/plan/schedulelookover/index.vue
@@ -145,7 +145,7 @@
          viewEnd: this.scheduleDate[1],
          workStationList: this.workStationList,
          stateList: this.checkStatusList,
          sceneId: null
          sceneId: null,
        })
      )
        .then((response) => {