From dcf9c9e0410fe1186239e3f8d6f7bdc789c08010 Mon Sep 17 00:00:00 2001 From: lzhe <lzhe@example.com> Date: 星期三, 05 六月 2024 18:00:39 +0800 Subject: [PATCH] 1 --- src/views/console/product-process/process-route/add-craft-version.vue | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/views/console/product-process/process-route/add-craft-version.vue b/src/views/console/product-process/process-route/add-craft-version.vue index e9b3905..16f1926 100644 --- a/src/views/console/product-process/process-route/add-craft-version.vue +++ b/src/views/console/product-process/process-route/add-craft-version.vue @@ -71,7 +71,7 @@ </template> <script> - import workmanship from './workmanship' //宸ヨ壓璺嚎 +import workmanship from './workmanship' //宸ヨ壓璺嚎 export default { name: 'add-craft', components: {workmanship}, @@ -153,14 +153,16 @@ } }) }, - 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'}); } @@ -186,7 +188,7 @@ }, next() { if(this.active == 0) { - this.setStep0(); + this.goStep1(); }else if(this.active == 1) { }else if(this.active == 2) { @@ -197,6 +199,11 @@ 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; + } + }) } }) } -- Gitblit v1.9.3