| | |
| | | '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}-数控程序编制补充`; |
| | | this.attachForm.title = `${this.attachForm.drawingNo}-${this.attachForm.processNo}-${val}-数控程序补充`; |
| | | } |
| | | }, |
| | | }, |
| | |
| | | type: 'input', |
| | | span: 24, |
| | | dataType: 'string', |
| | | disabled:true, |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | blur: (col) => { |
| | | this.handleTrim(col) |
| | | }, |
| | | }, |
| | | { |
| | | label: '零组件号', |
| | |
| | | span: 12, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | blur: (col) => { |
| | | this.handleTrim(col) |
| | | }, |
| | | }, |
| | | { |
| | | label: '图号版次', |
| | |
| | | span: 12, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | blur: (col) => { |
| | | this.handleTrim(col) |
| | | }, |
| | | }, |
| | | { |
| | | label: '产品型号', |
| | |
| | | span: 12, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | blur: (col) => { |
| | | this.handleTrim(col) |
| | | }, |
| | | }, |
| | | { |
| | | label: '工序号', |
| | |
| | | dataType: 'string', |
| | | max: 999, |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | blur: (col) => { |
| | | this.handleTrim(col) |
| | | }, |
| | | }, |
| | | { |
| | | label: '工序名称', |
| | |
| | | span: 12, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | blur: (col) => { |
| | | this.handleTrim(col) |
| | | }, |
| | | }, |
| | | { |
| | | label: '工序版次', |
| | |
| | | span: 12, |
| | | dataType: 'string', |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | blur: (col) => { |
| | | this.handleTrim(col) |
| | | }, |
| | | }, |
| | | { |
| | | label: '工艺版次', |
| | | label: '批次号', |
| | | prop: 'craftEdition', |
| | | placeholder:'如"A"', |
| | | type: 'input', |
| | | span: 12, |
| | | dataType: 'string', |
| | | maxlength: 2, |
| | | rules: [{ required: true, message: '必填', trigger: 'blur' }], |
| | | maxlength: 10, |
| | | blur: (col) => { |
| | | this.handleTrim(col) |
| | | }, |
| | | }, |
| | | { |
| | | label: '加工机床', |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | handleTrim(col){ |
| | | //console.log(col) |
| | | let value = this.attachForm[col.column.prop]; |
| | | if (typeof value === 'string') { |
| | | const trimmedValue = value.trim(); |
| | | // 只有当值确实发生变化时才更新 |
| | | if (trimmedValue !== value) { |
| | | this.attachForm[col.column.prop] = trimmedValue; |
| | | } |
| | | } |
| | | }, |
| | | formSubmit(form, done) { |
| | | var form = { ...form }; |
| | | this.machineCodeList.forEach(item => { |