| | |
| | | operationsFlag = false |
| | | } |
| | | }) |
| | | if (!operationsFlag) { |
| | | /* if (!operationsFlag) { |
| | | this.$message.error('每个工序都需添加对应零件') |
| | | this.isSubmit = false |
| | | return |
| | | } |
| | | } */ |
| | | if (this.dataForm.id) { |
| | | putObj(this.dataForm) |
| | | .then((response) => { |
| | |
| | | ...this.dataForm.operations.slice(obj.index - 1) |
| | | ] |
| | | } |
| | | this.dataForm.operations.forEach((e, idx) => { |
| | | e.index = idx + 1 |
| | | }) |
| | | this.$forceUpdate() |
| | | this.$refs.operationTable.sort('index') |
| | | Promise.all([this.save()]).then((res) => { |
| | | this.selectByIndex(obj.index) |
| | | }) |
| | | }) |
| | | }) |
| | | this.dataForm.operations.forEach((e, idx) => { |
| | | e.index = idx + 1 |
| | | }) |
| | | this.$forceUpdate() |
| | | this.$refs.operationTable.sort('index') |
| | | Promise.all([this.save()]).then((res) => { |
| | | this.selectByIndex(obj.index) |
| | | }) |
| | | }else{ |
| | | operation.operationName = operation.name |
| | | operation.operationId = operation.id |