| | |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="80px" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="工艺编码" style=" display: flex;"> |
| | | <el-form-item label="工艺路线编码" style=" display: flex;"> |
| | | <el-input v-model="form.routecode" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称" style=" display: flex;"> |
| | |
| | | <el-divider /> |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>--> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | |
| | | prop="lm_date" |
| | | label="创建时间" |
| | | sortable="custom" |
| | | width="160" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | width="120" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | |
| | | <el-dialog |
| | | :title="operation==='add'?'新增':'预览'" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | width="1000px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | :fullscreen="isFullscreen" |
| | | :top="isIpad?'5vh':'15vh'" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="110px"> |
| | | <div style="display: flex"> |
| | | <el-form-item label="工艺编码" prop="code" style="margin-right: 20px"> |
| | | <el-form-item label="工艺路线编码" prop="code" style="margin-right: 20px"> |
| | | <el-input v-model="dialogForm.code" :disabled="operation!=='add'" style="width: 220px" /> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称" prop="name"> |
| | |
| | | <el-form-item prop="enable" label="使用状态" style="margin-right: 20px"> |
| | | <el-select |
| | | v-model="dialogForm.enable" |
| | | filterable |
| | | :disabled="operation==='edit'" |
| | | :popper-append-to-body="false" |
| | | style="width: 220px" |
| | |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { AddUpdateRoute, DeleteRoute, RouteSearch, RouteSelect, StepSelect, ViewRoute } from '@/api/zzmx' |
| | | import { AddUpdateRoute, DeleteRoute, RouteSearch, StepSelect, ViewRoute } from '@/api/zzmx' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Zzjg', |
| | | name: 'GYLX', |
| | | components: { |
| | | Pagination |
| | | }, |
| | |
| | | } |
| | | } |
| | | return { |
| | | isFullscreen: false, |
| | | isIpad: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | |
| | | id: '', |
| | | code: '', |
| | | name: '', |
| | | enable: '', |
| | | enable: 'Y', |
| | | description: '', |
| | | Data: [] |
| | | }, |
| | |
| | | selectedName: '', // 选中的名称 |
| | | autocompleteValue: '', // 可搜索输入框中的值 |
| | | routeArr: [], // 工艺设置下拉所有值 |
| | | addDisabled: false, // 添加按钮是否可点击 |
| | | addDisabled: true, // 添加按钮是否可点击 |
| | | editDisabled: true, // 修改按钮是否可点击 |
| | | mouseFocusPosition: 0, // 鼠标聚焦的位置 |
| | | operation: '', |
| | |
| | | }) |
| | | if (!flag) { |
| | | return this.$message.info('输入框内容与下拉选项内容不匹配!') |
| | | } |
| | | |
| | | // 3.输入框内容与已选内容相同时不能保存 |
| | | let flag2 = false |
| | | this.dynamicTags.forEach(item => { |
| | | if (item.stepname === this.autocompleteValue.trim()) { |
| | | flag2 = true |
| | | } |
| | | }) |
| | | if (tag.stepname === this.autocompleteValue.trim()) { |
| | | flag2 = false |
| | | } |
| | | if (flag2) { |
| | | return this.$message.info('此工序已选,请选择其它工序!') |
| | | } |
| | | |
| | | // 将值替换到原tag位置上 |
| | |
| | | handleClose() { |
| | | this.dialogForm.code = '' |
| | | this.dialogForm.name = '' |
| | | this.dialogForm.enable = '' |
| | | this.dialogForm.enable = 'Y' |
| | | this.dialogForm.description = '' |
| | | this.dialogForm.Data = [] |
| | | this.dynamicTags = [ |
| | | { editDisabled: true, stepcode: 'Step01', seq: 1, stepname: ' ', effect: 'light' } |
| | | ] |
| | | this.addDisabled = true |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // 对话框取消 |
| | |
| | | this.dynamicTags.forEach(item => { |
| | | Data.push({ seq: item.seq, stepcode: item.stepcode, stepname: item.stepname }) |
| | | }) |
| | | |
| | | Data.forEach(item => { |
| | | if (item.stepname === this.routeArr.find(it => it.stepname === item.stepname).stepname) { |
| | | item.stepcode = this.routeArr.find(it => it.stepname === item.stepname).stepcode |
| | | } |
| | | }) |
| | | console.log(Data, 32) |
| | | this.$refs.dialogForm.validate(valid => { |
| | | if (valid) { |
| | | const data = { |
| | |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | this.isFullscreen = window.innerHeight < 800 |
| | | this.tableHeight = this.mainHeight - 50 |
| | | if (window.innerHeight < 769) { |
| | | this.tableHeight = this.tableHeight - 50 |
| | | } |
| | | this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367 |
| | | }) |
| | | } |
| | | } |
| | |
| | | color: #606266; |
| | | } |
| | | |
| | | //::v-deep .el-dialog__body { |
| | | // padding: 20px 100px !important; |
| | | //} |
| | | ::v-deep .el-dialog__body { |
| | | padding: 20px 100px !important; |
| | | padding: 20px 60px !important; |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |
| | |
| | | position: absolute; |
| | | margin-left: -7px; |
| | | z-index: 2; |
| | | width: 15px; |
| | | height: 15px !important; |
| | | width: 16px; |
| | | height: 16px !important; |
| | | font-size: 12px; |
| | | text-align: center; |
| | | line-height: 15px; |