| | |
| | | ctx.OkWithDetailed(storeList) |
| | | } |
| | | |
| | | // ConfirmOutput |
| | | // @Tags SalesDetails |
| | | // @Summary 确认发货 |
| | | // @Produce application/json |
| | | // @Param object body request.ConfirmOutput true "明细编码" |
| | | // @Success 200 {object} response.ListResponse |
| | | // @Router /api/salesDetails/confirmOutput [post] |
| | | func (s *SalesDetailsApi) ConfirmOutput(c *gin.Context) { |
| | | var params request.ConfirmOutput |
| | | ctx, ok := contextx.NewContext(c, ¶ms) |
| | | if !ok { |
| | | return |
| | | } |
| | | if len(params.Products) == 0 || params.SaleDetailNumber == "" { |
| | | ctx.FailWithMsg(ecode.ParamsErr, "参数缺失") |
| | | return |
| | | } |
| | | var flag bool |
| | | for _, p := range params.Products { |
| | | if p.OutputAmount.GreaterThan(decimal.Zero) { |
| | | flag = true |
| | | } |
| | | } |
| | | if !flag { |
| | | ctx.FailWithMsg(ecode.ParamsErr, "发货数量缺失") |
| | | return |
| | | } |
| | | |
| | | ctx.OkWithDetailed(nil) |
| | | } |
| | | |
| | | // GetDeliveryList |
| | | // @Tags SalesDetails |
| | | // @Summary 发货明细 |