From 359f2f3fd0da6d69474cce87353beb54bfdbf90c Mon Sep 17 00:00:00 2001 From: lishihai <dslsh@dscom> Date: 星期四, 20 六月 2024 14:24:52 +0800 Subject: [PATCH] 概述->新建或编辑(出库/入库)信息,编辑的时候显示保存的成本单价和销售单价 --- controllers/operation_type.go | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/controllers/operation_type.go b/controllers/operation_type.go index 7246617..9b0525e 100644 --- a/controllers/operation_type.go +++ b/controllers/operation_type.go @@ -116,7 +116,12 @@ util.ResponseFormat(c, code.RequestParamError, err.Error()) return } - list, total, err := models.NewOperationTypeSearch().SetPage(params.Page, params.PageSize).SetKeyword(params.Keyword).SetOrder("id desc").SetPreload(true).Find() + list, total, err := models.NewOperationTypeSearch(). + SetPage(params.Page, params.PageSize). + SetKeyword(params.Keyword). + SetOrder("id desc"). + SetWarehouseId(params.WarehouseId). + SetPreload(true).Find() if err != nil { util.ResponseFormat(c, code.RequestError, "鏌ユ壘澶辫触") return @@ -142,7 +147,7 @@ list[k].FinishCount = value.Count } if value, ok := mapStatistics[strconv.Itoa(v.Id)+string(constvar.OperationStatus_Cancel)]; ok { - list[k].FinishCount = value.Count + list[k].CancelCount = value.Count } } util.ResponseFormatListWithPage(c, code.Success, list, cast.ToInt(total), params.Page, params.PageSize) -- Gitblit v1.8.0