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}}