| | |
| | | </template> |
| | | |
| | | <script> |
| | | import workmanship from './workmanship' //工艺路线 |
| | | import workmanship from './workmanship' //工艺路线 |
| | | export default { |
| | | name: 'add-craft', |
| | | components: {workmanship}, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | setStep0() { |
| | | goStep1() { |
| | | var obj = Object.assign({},this.addStepForm0); |
| | | obj.craftId = this.$route.query.id; |
| | | obj.id = this.$route.query.craftId; |
| | | this.$refs.dialogForm0.validate(async (valid) => { |
| | | if (valid) { |
| | | this.$HTTP.post(`/api/blade-cps/production-craft-version/insert?craftId=${this.$route.query.id}`,obj).then(res=> { |
| | | this.$HTTP.put(`/api/blade-cps/production-craft-version/update`,obj).then(res=> { |
| | | if(res.code == 200) { |
| | | this.active = 1; |
| | | this.getVersionDetail(res.data.id); |
| | | //this.getVersionDetail(res.data.id); |
| | | }else { |
| | | this.$alert(res.message, "提示", {type: 'error'}); |
| | | } |
| | |
| | | }, |
| | | next() { |
| | | if(this.active == 0) { |
| | | this.setStep0(); |
| | | this.goStep1(); |
| | | }else if(this.active == 1) { |
| | | |
| | | }else if(this.active == 2) { |
| | |
| | | this.$HTTP.get(`/api/blade-cps/craft-routing/detail?id=${this.$route.query.id}`).then(res=> { |
| | | if(res.code == 200) { |
| | | this.detail = res.data; |
| | | res.data.dtos.forEach(item=> { |
| | | if(item.id == this.$route.query.craftId) { |
| | | this.addStepForm0.name = item.name; |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |