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
| | |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export function loadFactoryListByCompany(id) { |
| | | return request({ |
| | | url: '/mes/factory/byCompanyId?id='+id, |
| | | method: 'get', |
| | | }) |
| | | } |
| | |
| | | </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="请选择" |
| | |
| | | :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> |
| | |
| | | addObj, |
| | | putObj, |
| | | loadStaff, |
| | | dataFormTransfer |
| | | dataFormTransfer, |
| | | loadFactoryListByCompany |
| | | } from '@/api/basic/division' |
| | | import { loadCompany } from '@/api/basic/factory' |
| | | |
| | |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | factotyOption:[], |
| | | dataForm: { |
| | | id: 0, |
| | | divisionNo: '', |
| | | divisionName: '', |
| | | supervisorId: '', |
| | | remark: '', |
| | | factotyId: null, |
| | | factotyName: null, |
| | | companyId: '', |
| | | createTime: '', |
| | | updateTime: '', |
| | | createUser: '', |
| | | updateUser: '', |
| | | companyId: '', |
| | | staffId: '' |
| | | }, |
| | | companyOptions: [], |
| | |
| | | ], |
| | | companyId: [ |
| | | { required: true, message: '公司不能为空', trigger: 'blur' } |
| | | ] |
| | | ], |
| | | factotyId: [ |
| | | { required: true, message: '工厂不能为空', trigger: 'blur' } |
| | | ], |
| | | }, |
| | | isSubmit: false |
| | | } |
| | |
| | | } |
| | | }) |
| | | }, |
| | | 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 |
| | |
| | | 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) { |
| | |
| | | <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> |
| | |
| | | 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, |
| | |
| | | closeOnClickModal: false, |
| | | type: 'warning' |
| | | }) |
| | | .then(function() { |
| | | .then(function () { |
| | | return delObj(row.id) |
| | | }) |
| | | .then((data) => { |
| | |
| | | :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" /> |
| | |
| | | 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, |
| | |
| | | } |
| | | ], |
| | | 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: [ |
| | | { |
| | |
| | | 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') |
| | |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | methods: { |
| | | handleRemove(file, fileList) { |
| | | console.log(file, fileList); |
| | | }, |
| | | handlePreview(file) { |
| | | |
| | | }, |
| | | fileUpload(){ |
| | | this.$message.success('后台正在导入中,请稍后刷新!') |
| | | this.fileList=[] |
| | | }, |
| | | handleClose() { |
| | | this.selectDate = ""; |
| | | this.dialogVisible = false |
| | |
| | | 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")); |
| | |
| | | // this.$message.error('同步ERP失败:' + e) |
| | | }) |
| | | }, |
| | | uploadPartExcel() { |
| | | |
| | | }, |
| | | printLabel() { |
| | | if (this.multipleSelection && this.multipleSelection.length > 0) { |
| | | if (this.multipleSelection && this.multipleSelection.length === 1) { |
| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | return { |
| | | ruleOptions: [], |
| | | visible: false, |
| | | options: [], |
| | | optionsfactory:[], |
| | | optionsdepartment: [], |
| | | dataForm: { |
| | | id: 0, |
| | | company: null, |
| | | factory: null, |
| | | division: null, |
| | | postNo: '', |
| | | postName: '', |
| | | remark: '' |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | * 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') |