From ec5e5cb6ca37903838e3e6c791757fab0463eb1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sat, 23 Jul 2022 13:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/core/xmProduct/XmProductEdit.vue | 23 +++++++++++++++---- src/views/xm/core/xmProject/XmProjectEdit.vue | 4 ++-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/views/xm/core/xmProduct/XmProductEdit.vue b/src/views/xm/core/xmProduct/XmProductEdit.vue index aff42d50..078f5805 100644 --- a/src/views/xm/core/xmProduct/XmProductEdit.vue +++ b/src/views/xm/core/xmProduct/XmProductEdit.vue @@ -5,8 +5,8 @@ @@ -99,6 +99,9 @@ + + 保存 + @@ -106,8 +109,9 @@ import util from "@/common/js/util"; //全局公共库 import { initDicts, - editXmProduct, + addXmProduct, editSomeFields, + createProductCode } from "@/api/xm/core/xmProduct"; import { mapGetters } from "vuex"; @@ -273,7 +277,7 @@ export default { this.load.edit = true; let params = Object.assign({}, this.editForm); params.branchId = this.userInfo.branchId; - editXmProduct(params) + addXmProduct(params) .then((res) => { this.load.edit = false; var tips = res.data.tips; @@ -343,6 +347,17 @@ export default { }) .catch((e) => Object.assign(this.editForm, this.editFormBak)); }, + + + createProductCode(){ + createProductCode({}).then(res=>{ + var tips=res.data.tips; + if(tips.isOk){ + this.$set(this.editForm,'code',res.data.data) + } + this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' }); + }) + }, /**end 在上面加自定义方法**/ }, //end method components: { diff --git a/src/views/xm/core/xmProject/XmProjectEdit.vue b/src/views/xm/core/xmProject/XmProjectEdit.vue index cc329b49..874e925c 100644 --- a/src/views/xm/core/xmProject/XmProjectEdit.vue +++ b/src/views/xm/core/xmProject/XmProjectEdit.vue @@ -3,8 +3,8 @@ - - 项目代号: {{editForm.code}}   项目编号: {{editForm.id}} + + 项目代号: {{editForm.code}}    项目编号: {{editForm.id}}