Jelajahi Sumber

bug修改

Signed-off-by: lijunqing <lijunqing@dashoo.cn>
lijunqing 6 tahun lalu
induk
melakukan
d29a134a82

+ 3 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -2038,10 +2038,11 @@ func (this *OilSupplierController) AddEntity() {
 // @Title 修改实体
 // @Description 修改实体
 // @Success	200	{object} controllers.Request
-// @router /update/:id/:type [post]
+// @router /update/:id/:type/:instyle [post]
 func (this *OilSupplierController) UpdateEntity() {
 	id := this.Ctx.Input.Param(":id")
 	typeCode := this.Ctx.Input.Param(":type")
+	instyle := this.Ctx.Input.Param(":instyle")
 	var errinfo ErrorInfo
 	if id == "" {
 		errinfo.Message = "操作失败!请求信息不完整"
@@ -2075,6 +2076,7 @@ func (this *OilSupplierController) UpdateEntity() {
 	updateCols := svc.GetUpdateCols(OilSupplierCertName, typeCode, model.Id)
 	err := svc.UpdateEntityBytbl(OilSupplierName, id, &model, updateCols)
 	if err == nil {
+		svc.DBE.Exec("update OilSupplierCert set Instyle="+instyle+" where SupplierId="+id+" and SupplierTypeCode="+typeCode+"")
 		errinfo.Message = "修改成功!"
 		errinfo.Code = 0
 		this.Data["json"] = &errinfo

+ 1 - 1
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplier.js

@@ -74,7 +74,7 @@ export default {
   },
   updateEntity (entityId, formData, myAxios) {
     return myAxios({
-      url: '/supplier/update/' + entityId + '/' + formData.SupplierTypeCode,
+      url: '/supplier/update/' + entityId + '/' + formData.SupplierTypeCode + '/' + formData.InStyle,
       method: 'post',
       data: formData
     })

+ 7 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -933,7 +933,7 @@
         if (this.formDataCert.Status <= 0 && this.activeName === '0') {
           valid = this.saveEntity()
         } else if (this.formDataCert.Status <= 0 && this.activeName === '1') {
-          this.updateNumberEntity()
+          valid = this.updateNumberEntity()
         }
         if (!valid) {
           return false
@@ -1086,7 +1086,12 @@
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
             //更新子表
-            this.updateNumberEntity()
+            // this.updateNumberEntity()
+              this.initDatas();
+              this.$message({
+                type: "success",
+                message: res.data.message
+              });
           } else {
             this.$message({
               type: 'warning',

+ 7 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -985,7 +985,7 @@
         if (this.formDataCert.Status <= 0 && this.activeName === '0') {
           valid = this.saveEntity()
         } else if (this.formDataCert.Status <= 0 && this.activeName === '1') {
-          this.updateNumberEntity()
+          valid = this.updateNumberEntity()
         }
         if (!valid) {
           return false
@@ -1178,7 +1178,12 @@
           .then(res => {
             if (res.data.code === 0) {
               //更新子表
-              this.updateNumberEntity()
+              // this.updateNumberEntity()
+              this.initDatas();
+              this.$message({
+                type: "success",
+                message: res.data.message
+              });
             } else {
               this.$message({
                 type: "warning",

+ 7 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -980,7 +980,7 @@
         if (this.formDataCert.Status <= 0 && this.activeName === '0') {
           valid = this.saveEntity()
         } else if (this.formDataCert.Status <= 0 && this.activeName === '1') {
-          this.updateNumberEntity()
+          valid = this.updateNumberEntity()
         }
         if (!valid) {
           return false
@@ -1087,7 +1087,12 @@
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
             //更新子表
-            this.updateNumberEntity()
+            // this.updateNumberEntity()
+             this.initDatas();
+              this.$message({
+                type: "success",
+                message: res.data.message
+              });
           } else {
             this.$message({
               type: 'warning',