| | |
| | | // @Security ApiKeyAuth |
| | | // @accept application/json |
| | | // @Produce application/json |
| | | // @Success 200 {object} response.Response{data=[]purchase_wms.SrmGetWarehouseInfoResponse} "获取采购类型列表" |
| | | // @Success 200 {object} response.Response{data=[]purchaseRes.OperationInfo} "获取操作信息" |
| | | // @Router /purchase/getOperationInfo/{id} [get] |
| | | func (e *PurchaseApi) GetOperationInfo(c *gin.Context) { |
| | | id, _ := strconv.Atoi(c.Param("id")) |
| | |
| | | operationInfos := make([]purchaseRes.OperationInfo, 0) |
| | | for _, operation := range info.Operations { |
| | | var oi purchaseRes.OperationInfo |
| | | oi.ProductId = operation.ProductId |
| | | oi.ProductName = operation.ProductName |
| | | oi.Number = operation.Number |
| | | oi.Number = operation.ProductId |
| | | oi.Name = operation.ProductName |
| | | oi.OperationNumber = operation.Number |
| | | oi.Status = operation.Status |
| | | oi.Principal = data.Principal |
| | | oi.WarehouseName = data.Warehouse |
| | |
| | | for _, products := range productList { |
| | | if products.Product.Number == operation.ProductId { |
| | | oi.Amount = products.Amount |
| | | oi.Price = products.Price |
| | | oi.PurchasePrice = products.Price |
| | | oi.Total = products.Total |
| | | oi.Unit = products.Product.Unit |
| | | oi.Specifications = products.Product.Specifications |