| | |
| | | <!-- |
| | | * @Author: 李喆(开发组) lzhe@yxqiche.com |
| | | * @Date: 2025-05-28 12:03:55 |
| | | * @LastEditors: 李喆(开发组) lzhe@yxqiche.com |
| | | * @LastEditTime: 2025-06-13 14:50:38 |
| | | * @LastEditors: gaoshp |
| | | * @LastEditTime: 2025-08-10 13:05:56 |
| | | * @FilePath: /mdmweb/src/views/flowmgr/taskassign.vue |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | --> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getQueryString, |
| | | } from '@/utils/util'; |
| | | |
| | | export default { |
| | | watch: { |
| | | 'attachForm.drawingNo': function (val) { |
| | | if(val && this.attachForm.processNo && this.attachForm.processEdition) { |
| | | this.attachForm.title = `${val}-${this.attachForm.processNo}-${this.attachForm.processEdition}-数控程序编制`; |
| | | } |
| | | }, |
| | | 'attachForm.processNo': function (val) { |
| | | if(val && this.attachForm.drawingNo && this.attachForm.processEdition) { |
| | | //this.attachForm.title = `${val}-${this.attachForm.processNo}-数控程序编制`; |
| | | this.attachForm.title = `${this.attachForm.drawingNo}-${val}-${this.attachForm.processEdition}-数控程序编制`; |
| | | } |
| | | }, |
| | | 'attachForm.processEdition': function (val) { |
| | | if(val && this.attachForm.drawingNo && this.attachForm.processNo ) { |
| | | //this.attachForm.title = `${val}-${this.attachForm.processNo}-数控程序编制`; |
| | | this.attachForm.title = `${this.attachForm.drawingNo}-${this.attachForm.processNo}-${val}-数控程序编制`; |
| | | } |
| | | }, |
| | | }, |
| | | data() { |
| | | |
| | | var isTempFlow = getQueryString("isTempFlow"); |
| | | isTempFlow = isTempFlow === 'Y'?'Y':'N'; |
| | | console.log('isTempFlow='+isTempFlow); |
| | | var that = this; |
| | | return { |
| | | isTempFlow:isTempFlow,//是否临时流程 |
| | | form: {}, |
| | | machineCodeList: [], |
| | | attachOption: { |
| | |
| | | tip: false, |
| | | column: [ |
| | | { |
| | | label: '图号', |
| | | label: '流程标题', |
| | | prop: 'title', |
| | | type: 'input', |
| | | span: 24, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '零组件号', |
| | | prop: 'drawingNo', |
| | | type: 'input', |
| | | span: 12, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '图号版次', |
| | |
| | | type: 'input', |
| | | span: 12, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '产品型号', |
| | | prop: 'productType', |
| | | prop: 'productModel', |
| | | type: 'input', |
| | | span: 12, |
| | | dataType: 'string', |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: '请选择流程类型', |
| | | // trigger: 'blur', |
| | | // }, |
| | | // ], |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '工序号', |
| | | prop: 'processNo', |
| | | type: 'input', |
| | | span: 12, |
| | | step: 1, |
| | | precision: 0, |
| | | dataType: 'string', |
| | | max: 999, |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '工序名称', |
| | |
| | | type: 'input', |
| | | span: 12, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '工序版次', |
| | | prop: 'processEdition', |
| | | type: 'input', |
| | | span: 12, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '工艺版次', |
| | | prop: 'craftEdition', |
| | | placeholder:'如"A"', |
| | | type: 'input', |
| | | span: 12, |
| | | dataType: 'string', |
| | | maxlength: 2, |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '加工机床', |
| | | prop: 'machineCode', |
| | | type: 'select', |
| | | dicUrl: `/blade-mdm/machine/page`, |
| | | dicFormatter: function(res) { |
| | | filterable: true, |
| | | dicUrl: `/blade-mdm/machine/page?size=10000`, |
| | | dicFormatter: function (res) { |
| | | that.machineCodeList = res.data.records; |
| | | return res.data.records; |
| | | }, |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | props: { |
| | | label: 'name', |
| | | label: 'code', |
| | | value: 'code', |
| | | }, |
| | | span: 12 |
| | |
| | | { |
| | | label: '计划锁定时间(天)', |
| | | prop: 'planLockDays', |
| | | type: 'input', |
| | | type: 'number', |
| | | min:0, |
| | | max:30, |
| | | span: 12, |
| | | dataType: 'string', |
| | | controls:true, |
| | | dataType: 'number', |
| | | controlsPosition:'right', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '计划开工时间', |
| | |
| | | valueFormat: "YYYY-MM-DD", |
| | | span: 12, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | }, |
| | | { |
| | | label: '偏离单号', |
| | | prop: 'deviation', |
| | | type: 'input', |
| | | span: 12, |
| | | dataType: 'string', |
| | | // rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | } |
| | | ], |
| | | }, |
| | | attachForm: {}, |
| | | attachForm: {planLockDays:7},//默认7天 |
| | | }; |
| | | }, |
| | | methods: { |
| | | formSubmit(form,done) { |
| | | var form = {...form}; |
| | | this.machineCodeList.forEach(item=> { |
| | | if(form.machineCode == item.code) { |
| | | formSubmit(form, done) { |
| | | var form = { ...form }; |
| | | this.machineCodeList.forEach(item => { |
| | | if (form.machineCode == item.code) { |
| | | form.machineMode = item.name; |
| | | } |
| | | }) |
| | | form.producePlanId = "1932411828915224578"; |
| | | |
| | | axios({ |
| | | url: '/blade-mdm/flow/dispatch/start', |
| | | method: 'post', |
| | | data: form, |
| | | }).then( |
| | | res => { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | this.$refs.form.resetForm(); |
| | | done(); |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '操作成功!', |
| | | }); |
| | | this.$refs.form.resetForm(); |
| | | done(); |
| | | }, |
| | | error => { |
| | | window.console.log(error); |
| | | done(); |
| | | window.console.log(error); |
| | | done(); |
| | | } |
| | | ); |
| | | } |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | |
| | | </style> |
| | | <style lang="scss"></style> |