From dcc4992bd51e9ee4a97099cd3a15085f7e247f23 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期日, 03 十一月 2024 20:21:41 +0800
Subject: [PATCH] update

---
 src/views/console/product-process/process-route/add-craft-version.vue |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 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..8936e9c 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},
@@ -136,7 +136,7 @@
 					groupCategory: 1,
 					groupType: "group_workstation"
 				}
-				this.$HTTP.post(`/api/blade-cps/group/groupWorkstation`,obj).then(res=> {
+				this.$HTTP.post(`/api/smis/group/groupWorkstation`,obj).then(res=> {
 					if(res.code == 200) {
 						var tree = [];
 						var children = [];
@@ -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/smis/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'});
 							}
@@ -171,7 +173,7 @@
 				})
 			},
 			getVersionDetail(id) {
-				this.$HTTP.get(`/api/blade-cps/production-craft-version/detail/${id}`).then(res=> {
+				this.$HTTP.get(`/api/smis/production-craft-version/detail/${id}`).then(res=> {
 					if(res.code == 200) {
 						this.versionDetail = res.data;
 					}else {
@@ -186,7 +188,7 @@
 			},
 			next() {
 				if(this.active == 0) {
-					this.setStep0();
+					this.goStep1();
 				}else if(this.active == 1) {
 					
 				}else if(this.active == 2) {
@@ -194,9 +196,14 @@
 				}
 			},
 			getDetail(id) {
-				this.$HTTP.get(`/api/blade-cps/craft-routing/detail?id=${this.$route.query.id}`).then(res=> {
+				this.$HTTP.get(`/api/smis/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