Fixiaobai
2023-10-31 54d5ec8ed84113f7d928c4b6e86bc9d640bffc71
	modified:   src/api/basic/division.js
modified: src/views/basic/division/division-form.vue
modified: src/views/basic/division/index.vue
modified: src/views/basic/part/index.vue
modified: src/views/basic/post/post-form.vue
modified: src/views/technology/document/index.vue
modified: vue.config.js
已修改7个文件
247 ■■■■■ 文件已修改
src/api/basic/division.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/division/division-form.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/division/index.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/part/index.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basic/post/post-form.vue 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/document/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basic/division.js
@@ -69,3 +69,10 @@
    data: obj
  })
}
export function loadFactoryListByCompany(id) {
  return request({
    url: '/mes/factory/byCompanyId?id='+id,
    method: 'get',
  })
}
src/views/basic/division/division-form.vue
@@ -31,26 +31,9 @@
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="管理人员" prop="staffId">
            <el-select
              v-model="dataForm.staffId"
              filterable
              placeholder="请选择"
              style="width: 100%;"
            >
              <el-option
                v-for="(item, index) in this.staffOptions"
                :key="index"
                :label="item.staffName"
                :value="item.id"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="公司" prop="companyId">
            <el-select
            @change="changeCompany"
              v-model="dataForm.companyId"
              filterable
              placeholder="请选择"
@@ -62,6 +45,14 @@
                :label="item.companyName"
                :value="item.id"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="工厂" prop="factotyId">
            <el-select style="width: 100%;" v-model="dataForm.factotyId" @change="changeFactory" placeholder="请选择">
              <el-option v-for="item in factotyOption" :key="item.id" :label="item.factoryName" :value="item.id">
              </el-option>
            </el-select>
          </el-form-item>
@@ -93,7 +84,8 @@
  addObj,
  putObj,
  loadStaff,
  dataFormTransfer
  dataFormTransfer,
  loadFactoryListByCompany
} from '@/api/basic/division'
import { loadCompany } from '@/api/basic/factory'
@@ -101,18 +93,20 @@
  data() {
    return {
      visible: false,
      factotyOption:[],
      dataForm: {
        id: 0,
        divisionNo: '',
        divisionName: '',
        supervisorId: '',
        remark: '',
        factotyId: null,
        factotyName: null,
        companyId: '',
        createTime: '',
        updateTime: '',
        createUser: '',
        updateUser: '',
        companyId: '',
        staffId: ''
      },
      companyOptions: [],
@@ -126,7 +120,10 @@
        ],
        companyId: [
          { required: true, message: '公司不能为空', trigger: 'blur' }
        ]
        ],
        factotyId: [
          { required: true, message: '工厂不能为空', trigger: 'blur' }
        ],
      },
      isSubmit: false
    }
@@ -146,6 +143,19 @@
        }
      })
    },
    changeCompany() {
      console.log(this.dataForm.companyId);
      loadFactoryListByCompany(this.dataForm.companyId).then((res) => {
        console.log(res.data);
        this.factotyOption = res.data.data
      })
    },
    changeFactory(){
      this.dataForm.factotyName=this.factotyOption.filter(item=>{
        return item.id==this.dataForm.factotyId
      })[0].factoryName;
      console.log(this.dataForm);
    },
    // 表单提交
    dataFormSubmit() {
      this.isSubmit = true
@@ -155,7 +165,9 @@
        remark: this.dataForm.remark,
        staffId: this.dataForm.staffId,
        companyId: this.dataForm.companyId,
        id: this.dataForm.id
        id: this.dataForm.id,
        factoryName: this.dataForm.factotyName,
        factotyId: this.dataForm.factotyId
      }
      this.$refs.dataForm.validate((valid) => {
        if (valid) {
src/views/basic/division/index.vue
@@ -1,24 +1,12 @@
<template>
  <div class="mod-config">
    <basic-container>
      <ttable
        :table="table"
        @handleSelectionChange="handleSelectionChange"
        :uploadInfo="uploadInfo"
        :isShowHide="true"
        :prelang="prelang"
        :options="options"
        :ajaxFun="ajaxFun"
        ref="divisionTable"
      >
      <ttable :table="table" @handleSelectionChange="handleSelectionChange" :uploadInfo="uploadInfo" :isShowHide="true"
        :prelang="prelang" :options="options" :ajaxFun="ajaxFun" ref="divisionTable">
        <template #toolbar></template>
      </ttable>
      <!-- 弹窗, 新增 / 修改 -->
      <table-form
        v-if="addOrUpdateVisible"
        ref="addOrUpdate"
        @refreshDataList="getData"
      ></table-form>
      <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form>
    </basic-container>
  </div>
</template>
@@ -82,21 +70,21 @@
            isSearch: true,
            searchInfoType: 'text'
          },
          // 管理人员
          {
            minWidth: '140',
            prop: 'staffName',
            label: '管理人员',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // 公司
          {
            minWidth: '120',
            prop: 'companyName',
            label: '公司',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // 管理人员
          {
            minWidth: '140',
            prop: 'factoryName',
            label: '工厂',
            sort: true,
            isTrue: true,
            isSearch: true,
@@ -204,7 +192,7 @@
        closeOnClickModal: false,
        type: 'warning'
      })
        .then(function() {
        .then(function () {
          return delObj(row.id)
        })
        .then((data) => {
src/views/basic/part/index.vue
@@ -5,6 +5,10 @@
        :prelang="prelang" :options="options" :bottomOffset="125" :ajaxFun="ajaxFun" ref="partTable">
        <template #toolbar></template>
      </ttable>
      <el-upload :headers="{'Authorization': 'Bearer ' + yourToken}" class="upload-demo" action="/mes/part/uploadExcel" :on-preview="handlePreview"
        :on-remove="handleRemove" :file-list="fileList" :on-success="fileUpload"  :limit="1">
        <el-button size="small" type="primary">点击Excel导入</el-button>
      </el-upload>
      <!-- 弹窗, 新增 / 修改 -->
      <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form>
      <PrintLabelForm :currshowlist.sync="showPrintLabelForm" :printLabelInfo="printLabelInfo" />
@@ -33,16 +37,18 @@
import { mapGetters } from 'vuex'
import ttable from '@/views/common/ztt-table.vue'
import { remote } from '../../../api/admin/dict'
import { dateFormat,dateFormatYearMonthDate,dateFormatPlus } from '@/util/date'
import { dateFormat, dateFormatYearMonthDate, dateFormatPlus } from '@/util/date'
import PrintLabelForm from './print-label-form.vue'
export default {
  data() {
    return {
      fileList: [],
      selectDate: "",
      dialogVisible: false,
      ajaxFun: fetchList,
      addOrUpdateVisible: false,
      multipleSelection: [],
      yourToken: "",
      uploadInfo: {
        // 是否展示上传EXCEL以及对应的url
        isShow: true,
@@ -357,23 +363,29 @@
          }
        ],
        toolbar: [
          {
            text: '新增',
            type: 'primary',
            fun: this.addOrUpdateHandle
          },
          {
            text: '获取IFS零件',
            type: 'primary',
            fun: this.syncISDate,
            loading: false
          },
          {
            text: '大标签',
            type: 'primary',
            fun: this.printLabel,
            loading: false
          }
          // {
          //   text: '新增',
          //   type: 'primary',
          //   fun: this.addOrUpdateHandle
          // },
          // {
          //   text: '获取IFS零件',
          //   type: 'primary',
          //   fun: this.syncISDate,
          //   loading: false
          // },
          // {
          //   text: '大标签',
          //   type: 'primary',
          //   fun: this.printLabel,
          //   loading: false
          // },
          // {
          //   text: 'Excel导入',
          //   type: 'primary',
          //   fun: this.uploadPartExcel,
          //   loading: false
          // },
        ],
        operator: [
          {
@@ -412,6 +424,8 @@
    PrintLabelForm
  },
  created() {
    let token=JSON.parse(sessionStorage.getItem("ztt-access_token")).content
    this.yourToken=token
    this.table.column.find((e) => e.label === 'IFS启用批次管理').isTrue = false
    this.table.column.find((e) => e.label === '计划方法').isTrue = false
    this.getUnitType('unit')
@@ -427,6 +441,16 @@
    ...mapGetters(['permissions'])
  },
  methods: {
    handleRemove(file, fileList) {
      console.log(file, fileList);
    },
    handlePreview(file) {
    },
    fileUpload(){
      this.$message.success('后台正在导入中,请稍后刷新!')
      this.fileList=[]
    },
    handleClose() {
      this.selectDate = "";
      this.dialogVisible = false
@@ -650,9 +674,9 @@
      let datas = new FormData()
      let times = null;
      if (this.selectDate != '' && this.selectDate != null) {
        times=dateFormatPlus(this.selectDate)
      }else{
        times=null
        times = dateFormatPlus(this.selectDate)
      } else {
        times = null
      }
      datas.set("date", times)
      // console.log(datas.get("date"));
@@ -683,6 +707,9 @@
          // this.$message.error('同步ERP失败:' + e)
        })
    },
    uploadPartExcel() {
    },
    printLabel() {
      if (this.multipleSelection && this.multipleSelection.length > 0) {
        if (this.multipleSelection && this.multipleSelection.length === 1) {
src/views/basic/post/post-form.vue
@@ -1,29 +1,45 @@
<template>
  <el-dialog
    :title="!dataForm.id ? '新增' : '修改'"
    :close-on-click-modal="false"
    :visible.sync="visible"
  >
    <el-form
      :model="dataForm"
      :rules="dataRule"
      ref="dataForm"
      label-width="120px"
      class="l-mes"
    >
  <el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible">
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px" class="l-mes">
      <el-row>
        <el-col :span="12">
          <el-form-item label="公司" prop="company">
            <el-select style="width: 100%;" v-model="dataForm.company" placeholder="请选择">
              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="工厂" prop="factory">
            <el-select style="width: 100%;" v-model="dataForm.factory" placeholder="请选择">
              <el-option v-for="item in optionsfactory" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="部门" prop="division">
            <el-select style="width: 100%;" v-model="dataForm.division" placeholder="请选择">
              <el-option v-for="item in optionsdepartment" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="岗位编号" prop="postNo">
            <el-input v-model="dataForm.postNo" placeholder=""></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="岗位名称" prop="postName">
            <el-input v-model="dataForm.postName" placeholder=""></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="备注" prop="remark">
            <el-input v-model="dataForm.remark" placeholder=""></el-input>
@@ -33,12 +49,7 @@
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取消</el-button>
      <el-button
        type="primary"
        :disabled="isSubmit"
        v-thinclick="`dataFormSubmit`"
        >确定</el-button
      >
      <el-button type="primary" :disabled="isSubmit" v-thinclick="`dataFormSubmit`">确定</el-button>
    </span>
  </el-dialog>
</template>
@@ -51,8 +62,14 @@
    return {
      ruleOptions: [],
      visible: false,
      options: [],
      optionsfactory:[],
      optionsdepartment: [],
      dataForm: {
        id: 0,
        company: null,
        factory: null,
        division: null,
        postNo: '',
        postName: '',
        remark: ''
@@ -60,6 +77,18 @@
      dataRule: {
        postName: [
          { required: true, message: '岗位名称不能为空', trigger: 'blur' }
        ],
        postNo: [
          { required: true, message: '岗位编号不能为空', trigger: 'blur' }
        ],
        company: [
          { required: true, message: '公司名称不能为空', trigger: 'blur' }
        ],
        factory: [
          { required: true, message: '工厂名称不能为空', trigger: 'blur' }
        ],
        division: [
          { required: true, message: '部门名称不能为空', trigger: 'blur' }
        ]
      },
      isSubmit: false
src/views/technology/document/index.vue
@@ -20,12 +20,12 @@
            v-if="permissions.technology_document_del"
            >批量删除</el-button
          >
          <el-button
          <!-- <el-button
            type="primary"
            @click="bindTestStandard"
            v-if="permissions.technology_document_standard_upload"
            >批量绑定检测标准</el-button
          >
          > -->
        </template>
      </ttable>
      <el-dialog
vue.config.js
@@ -3,7 +3,7 @@
 * https://cli.vuejs.org/zh/config/
 */
//const url = 'http://ztt-gateway:9999'
const url = 'http://192.168.0.15:9999'
const url = 'http://ztt-gateway:9999'
const localUrl = 'http://localhost:8089'
//const localUrl = 'http://10.88.15.95:8089'
const CompressionWebpackPlugin = require('compression-webpack-plugin')