| | |
| | | <el-form-item label="项目名称" prop="checkitemname"> |
| | | <el-input v-model="dialogForm.checkitemname" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="所属车间" prop="workshopcode"> |
| | | <el-select |
| | | v-model="dialogForm.workshopcode" |
| | | filterable |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in WorkShopArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="项目描述" prop="checkitemdescr"> |
| | | <el-input v-model="dialogForm.checkitemdescr" type="textarea" style="width: 200px" /> |
| | | </el-form-item> |
| | |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | import { WorkShopSelect } from '@/api/deviceManager' |
| | | |
| | | export default { |
| | | name: 'Xxxx', |
| | | name: 'ProcessCheckItem', |
| | | components: { |
| | | Pagination, TableColumnSettings |
| | | }, |
| | |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'org_code', |
| | | label: '所属车间编码', |
| | | id: 5, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'org_name', |
| | | label: '所属车间', |
| | | id: 6, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 330, |
| | | width: false, |
| | | prop: 'descr', |
| | | label: '标准描述', |
| | | id: 5, |
| | | id: 7, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | |
| | | width: false, |
| | | prop: 'lm_user', |
| | | label: '创建人员', |
| | | id: 6, |
| | | id: 8, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | |
| | | width: false, |
| | | prop: 'lm_date', |
| | | label: '创建时间', |
| | | id: 7, |
| | | id: 9, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | |
| | | ], |
| | | checkitemname: [ |
| | | { required: true, message: '请输入名称', trigger: ['blur', 'change'] } |
| | | ], |
| | | workshopcode: [ |
| | | { required: true, message: '请选择所属车间', trigger: ['blur', 'change'] } |
| | | ] |
| | | } |
| | | }, |
| | | WorkShopArr: [] // 所属车间数组 |
| | | } |
| | | }, |
| | | created() { |
| | | this.getStepCheckItemSearch() |
| | | 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.$nextTick(() => { |
| | | this.dialogForm.checkitemcode = row.code |
| | | this.dialogForm.checkitemname = row.name |
| | | this.dialogForm.workshopcode = row.org_code |
| | | this.dialogForm.checkitemdescr = row.descr |
| | | }) |
| | | }, |
| | |
| | | this.dialogForm.checkitemcode = '' |
| | | this.dialogForm.checkitemname = '' |
| | | this.dialogForm.checkitemdescr = '' |
| | | this.dialogForm.workshopcode = '' |
| | | this.$refs.dialogForm.clearValidate() |
| | | }, |
| | | // 对话框取消 |
| | |
| | | checkitemcode: this.dialogForm.checkitemcode, |
| | | checkitemname: this.dialogForm.checkitemname, |
| | | checkitemdescr: this.dialogForm.checkitemdescr, |
| | | wkshopcode: this.dialogForm.workshopcode, |
| | | OperType: this.operation === 'add' ? 'Add' : 'Update' |
| | | } |
| | | AddUpdateStepCheckItem(data).then(res => { |