| | |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="工序编码" style=" display: flex;"> |
| | | <el-input v-model="form.stepcode" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="工序名称" style=" display: flex;"> |
| | | <el-input v-model="form.stepname" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="启用状态" style=" display: flex;"> |
| | | <el-form-item label="所属车间" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.enable" |
| | | filterable |
| | | v-model="form.WorkShop" |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <!-- @focus="getWareHouseSelect"--> |
| | | <el-option |
| | | v-for="item in enableArr" |
| | | v-for="item in WorkShopArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工序编码" style=" display: flex;"> |
| | | <el-input v-model="form.stepcode" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="工序名称" style=" display: flex;"> |
| | | <el-input v-model="form.stepname" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="工序类型" style=" display: flex;"> |
| | | <el-select |
| | |
| | | > |
| | | <el-option |
| | | v-for="item in steptypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="启用状态" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.enable" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in enableArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes" |
| | | layout="total,prev, pager, next,sizes,jumper" |
| | | popper-class="select_bottom" |
| | | @pagination="getStepSearch" |
| | | /> |
| | |
| | | <el-form-item prop="steptypecode" label="工序类型"> |
| | | <el-radio-group |
| | | v-model="dialogForm.steptypecode" |
| | | style="width: 200px" |
| | | style="width: 210px" |
| | | > |
| | | <el-radio |
| | | v-for="item in steptypeArr" |
| | |
| | | :label="item.name" |
| | | /> |
| | | </el-radio-group> |
| | | <!-- <el-select--> |
| | | <!-- v-model="dialogForm.steptypecode"--> |
| | | <!-- filterable--> |
| | | <!-- style="width: 200px"--> |
| | | <!-- placeholder="请选择"--> |
| | | <!-- :popper-append-to-body="false"--> |
| | | <!-- >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in steptypeArr"--> |
| | | <!-- :key="item.code"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- />--> |
| | | <!-- </el-select>--> |
| | | <el-form-item prop="wkshopcode" label="所属车间"> |
| | | <el-select |
| | | v-model="dialogForm.wkshopcode" |
| | | filterable |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | > |
| | | <el-option |
| | | v-for="item in WorkShopArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form-item> |
| | | <el-form-item prop="enable" label="启用状态"> |
| | | <el-select |
| | |
| | | <el-divider /> |
| | | <div> |
| | | <div style="margin-bottom:20px"> |
| | | <i class="el-icon-s-operation":style="{color:$store.state.settings.theme}" /> 工作站集合: |
| | | <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" /> 工作站集合: |
| | | </div> |
| | | <div class="myCheckboxGroup"> |
| | | <div |
| | |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | import { getCookie } from '@/utils/auth' |
| | | import { WorkShopSelect } from '@/api/deviceManager' |
| | | |
| | | export default { |
| | | name: 'GXDY', |
| | | name: 'ProcessDefine', |
| | | components: { |
| | | Pagination, TableColumnSettings |
| | | }, |
| | |
| | | stepcode: '', // 工序编码 |
| | | stepname: '', // 工序名称 |
| | | enable: '', // 启用状态 |
| | | WorkShop: this.$store.state.settings.orgType !== 'W' ? '' : getCookie('stu_torgcode'), // 所属车间 |
| | | steptypecode: [], // 工序类型编码 |
| | | createuser: '', // 创建人员 |
| | | prop: 'lm_date', // 排序字段 |
| | |
| | | { code: 'W', name: '外协' } |
| | | // { code: 'Z;W', name: '自制;外协' } |
| | | ], |
| | | WorkShopArr: [], // 所属车间数组 |
| | | total: 10, |
| | | tableData: [], |
| | | tableColumnSettingsArray: [ |
| | |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'org_code', |
| | | label: '所属组织编码', |
| | | id: 8, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'org_name', |
| | | label: '所属车间', |
| | | id: 9, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'lm_user', |
| | | label: '创建人员', |
| | | id: 8, |
| | | id: 10, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | |
| | | width: 160, |
| | | prop: 'lm_date', |
| | | label: '创建时间', |
| | | id: 9, |
| | | id: 11, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | |
| | | width: 110, |
| | | prop: 'is_eqp', |
| | | label: '关联工作站', |
| | | id: 10, |
| | | id: 12, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: false |
| | |
| | | width: 110, |
| | | prop: 'is_defect', |
| | | label: '关联缺陷', |
| | | id: 11, |
| | | id: 13, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: false |
| | |
| | | 'steptypecode': '自制', |
| | | 'enable': 'Y', |
| | | 'description': '', |
| | | 'OperType': '' |
| | | 'OperType': '', |
| | | 'wkshopcode': this.$store.state.settings.orgType !== 'W' ? '' : getCookie('stu_torgcode') // 所属车间 |
| | | }, |
| | | operation: '', |
| | | dialogFormRules: { |
| | |
| | | ], |
| | | enable: [ |
| | | { required: true, message: '请选择状态', trigger: ['blur', 'change'] } |
| | | ], |
| | | wkshopcode: [ |
| | | { required: true, message: '请选择所属车间', trigger: ['blur', 'change'] } |
| | | ] |
| | | }, |
| | | workDialogVisible: false, |
| | | workDialogForm: { |
| | | stepcode: '', // 工序编码 |
| | | stepname: '', // 工序名称 |
| | | WorkShop: '', // 所属车间 |
| | | workArr: [], // 工作站所有数组 |
| | | workGatherArr: [], // 工作站集合数组 |
| | | workCodeSelectedGatherArr: [], // 工作站选中集合的code数组 |
| | |
| | | }, |
| | | created() { |
| | | this.getStepSearch() |
| | | this.getWorkShopSelect() |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | // 获取所属车间下拉 |
| | | async getWorkShopSelect() { |
| | | const { data: res } = await WorkShopSelect() |
| | | this.WorkShopArr = res |
| | | }, |
| | | tableColumnUpdate(val, isCopyTrue) { |
| | | if (isCopyTrue) { |
| | | this.tableColumnSettingsArray = val |
| | |
| | | this.form.enable = '' |
| | | this.form.steptypecode = '' |
| | | this.form.createuser = '' |
| | | this.form.WorkShop = this.$store.state.settings.orgType !== 'W' ? '' : getCookie('stu_torgcode')// 所属车间 |
| | | this.getStepSearch() |
| | | }, |
| | | |
| | |
| | | this.dialogForm.stepname = row.stepname |
| | | this.dialogForm.steptypecode = this.steptypeArr.find(item => item.code === row.flwtype).name |
| | | this.dialogForm.description = row.descr |
| | | this.dialogForm.wkshopcode = row.org_code |
| | | this.dialogForm.enable = row.enable |
| | | }) |
| | | }, |
| | |
| | | this.dialogForm.steptypecode = '自制' |
| | | this.dialogForm.enable = 'Y' |
| | | this.dialogForm.description = '' |
| | | this.dialogForm.wkshopcode = this.$store.state.settings.orgType !== 'W' ? '' : getCookie('stu_torgcode')// 所属车间 |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // 对话框取消 |
| | |
| | | steptypecode: this.steptypeArr.find(item => item.name === this.dialogForm.steptypecode).code, |
| | | enable: this.dialogForm.enable, |
| | | description: this.dialogForm.description, |
| | | WorkShop: this.dialogForm.wkshopcode, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update' |
| | | } |
| | | AddUpdateStep(data).then(res => { |
| | |
| | | |
| | | this.workDialogForm.stepcode = row.stepcode |
| | | this.workDialogForm.stepname = row.stepname |
| | | StepAssociationEqp({ stepcode: this.workDialogForm.stepcode }).then(res => { |
| | | this.workDialogForm.WorkShop = row.org_code |
| | | StepAssociationEqp({ stepcode: this.workDialogForm.stepcode, WorkShop: row.org_code }).then(res => { |
| | | if (res.code === '200') { |
| | | setTimeout(() => { |
| | | loading.close() |
| | |
| | | } |
| | | }) |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const res = await SaveStepAssociationEqp(this.workDialogForm.stepcode, data) |
| | | const res = await SaveStepAssociationEqp(this.workDialogForm.stepcode, this.workDialogForm.WorkShop, data) |
| | | if (res.code === '200') { |
| | | this.workDialogVisible = false |
| | | this.$message.success('保存成功!') |
| | |
| | | |
| | | this.defectTreeCode = row.stepcode |
| | | this.defectTreeName = row.stepname |
| | | this.workDialogForm.WorkShop = row.org_code |
| | | |
| | | StepAssociationDefect({ stepcode: row.stepcode }).then(res => { |
| | | StepAssociationDefect({ stepcode: row.stepcode, WorkShop: row.org_code }).then(res => { |
| | | if (res.code === '200') { |
| | | setTimeout(() => { |
| | | loading.close() |
| | |
| | | } |
| | | }) |
| | | this.$store.state.app.buttonIsDisabled = true |
| | | const res = await SaveStepAssociationDefect(this.defectTreeCode, data) |
| | | const res = await SaveStepAssociationDefect(this.defectTreeCode, this.workDialogForm.WorkShop, data) |
| | | if (res.code === '200') { |
| | | this.defectDialogVisible = false |
| | | this.$message.success('保存成功!') |