1、新增串码追踪相关接口;
This commit is contained in:
parent
5988e905ff
commit
f5494a7fb8
|
@ -364,3 +364,28 @@ func QueryName(c *gin.Context) {
|
|||
app.OK(c, list, "OK")
|
||||
return
|
||||
}
|
||||
|
||||
// ImeiTrace 串码追踪
|
||||
// @Summary 串码追踪
|
||||
// @Tags 库存管理
|
||||
// @Produce json
|
||||
// @Accept json
|
||||
// @Param request body models.ImeiTraceReq true "串码追踪模型"
|
||||
// @Success 200 {object} models.ImeiTraceResp
|
||||
// @Router /api/v1/inventory/imei/trace [post]
|
||||
func ImeiTrace(c *gin.Context) {
|
||||
req := &models.ImeiTraceReq{}
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
app.Error(c, http.StatusBadRequest, errors.New("param err"), "参数错误")
|
||||
return
|
||||
}
|
||||
|
||||
list, err := models.QueryImeiTraceData(req)
|
||||
if err != nil {
|
||||
app.Error(c, http.StatusInternalServerError, err, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
app.OK(c, list, "OK")
|
||||
return
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ func ErpPurchaseChangeCreate(c *gin.Context) {
|
|||
|
||||
if len(req.Commodities) == 0 {
|
||||
logger.Error("erp purchase change commodities is nil")
|
||||
app.Error(c, http.StatusInternalServerError, err, "操作失败")
|
||||
app.Error(c, http.StatusInternalServerError, err, "操作失败:未添加商品")
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ func ErpPurchaseChangeCreate(c *gin.Context) {
|
|||
// @Produce json
|
||||
// @Accept json
|
||||
// @Param request body models.ErpPurchaseChangeEditReq true "采购换机-编辑模型"
|
||||
// @Success 200 {object} models.ErpPurchaseChangeEditResp
|
||||
// @Success 200 {object} models.ErpPurchaseChangeOrder
|
||||
// @Router /api/v1/erp_purchase/change/edit [post]
|
||||
func ErpPurchaseChangeEdit(c *gin.Context) {
|
||||
req := new(model.ErpPurchaseChangeEditReq)
|
||||
|
@ -127,13 +127,13 @@ func ErpPurchaseChangeEdit(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
// ErpPurchaseChangeList 采购换机列表
|
||||
// @Summary 采购换机列表
|
||||
// ErpPurchaseChangeList 采购换机-列表
|
||||
// @Summary 采购换机-列表
|
||||
// @Tags 采购换机, V1.4.5
|
||||
// @Produce json
|
||||
// @Accept json
|
||||
// @Param request body models.ErpPurchaseChangeOrderListReq true "采购换机列表模型"
|
||||
// @Success 200 {object} models.ErpPurchaseChangeListResp
|
||||
// @Success 200 {object} models.ErpPurchaseChangeOrderListResp
|
||||
// @Router /api/v1/erp_purchase/change/list [post]
|
||||
func ErpPurchaseChangeList(c *gin.Context) {
|
||||
req := &model.ErpPurchaseChangeOrderListReq{}
|
||||
|
@ -329,7 +329,7 @@ func ErpPurchaseChangeAudit(c *gin.Context) {
|
|||
// 更新库存信息
|
||||
// 审核:旧机器出库、新机器入库
|
||||
// 反审核:旧机器入库、新机器出库
|
||||
err = model.AuditChangeOrder(begin, erpPurchaseChangeOrder, orderState)
|
||||
err = model.AuditChangeOrder(begin, erpPurchaseChangeOrder, req.State)
|
||||
if err != nil {
|
||||
begin.Rollback()
|
||||
app.Error(c, http.StatusInternalServerError, err, "审核失败:"+err.Error())
|
||||
|
|
|
@ -3670,3 +3670,171 @@ type CommodityDetailRequest struct {
|
|||
type CommodityDelRequest struct {
|
||||
ErpCommodityId uint32 `json:"erp_commodity_id" binding:"required"` // 商品id
|
||||
}
|
||||
|
||||
// ImeiTraceReq 串码追踪入参
|
||||
type ImeiTraceReq struct {
|
||||
IMEI string `json:"imei"` // 商品串码
|
||||
}
|
||||
|
||||
// ImeiTraceResp 串码追踪出参
|
||||
type ImeiTraceResp struct {
|
||||
List []ImeiTraceData `json:"list"`
|
||||
Total int `json:"total"` // 总条数
|
||||
}
|
||||
|
||||
type ImeiTraceData struct {
|
||||
StoreId uint32 `json:"store_id" gorm:"index"` // 门店id
|
||||
StoreName string `json:"store_name"` // 门店名称
|
||||
SerialType string `json:"serial_type"` // 单据类型
|
||||
MakerTime *time.Time `json:"maker_time"` // 单据日期
|
||||
SerialNumber string `json:"serial_number" gorm:"index"` // 单据编号
|
||||
ErpCommodityId uint32 `json:"erp_commodity_id" gorm:"index"` // 商品id
|
||||
ErpCommodityName string `json:"erp_commodity_name"` // 商品名称
|
||||
CommoditySerialNumber string `json:"commodity_serial_number" gorm:"index"` // 商品编号
|
||||
Count int `json:"count"` // 商品数量
|
||||
Remarks string `json:"remarks"` // 备注
|
||||
}
|
||||
|
||||
// QueryImeiTraceData 串码追踪,返回多个结果
|
||||
func QueryImeiTraceData(req *ImeiTraceReq) (*ImeiTraceResp, error) {
|
||||
if req == nil || req.IMEI == "" {
|
||||
return nil, errors.New("imei不能为空")
|
||||
}
|
||||
|
||||
var results []ImeiTraceData
|
||||
|
||||
// 1. 查询采购入库记录(关联采购订单与采购商品明细)
|
||||
var purchaseRecords []ImeiTraceData
|
||||
err := orm.Eloquent.Table("erp_purchase_inventory").
|
||||
Select(`erp_purchase_order.store_id AS store_id,
|
||||
erp_purchase_order.store_name AS store_name,
|
||||
'采购入库' AS serial_type,
|
||||
erp_purchase_order.maker_time AS maker_time,
|
||||
erp_purchase_order.serial_number AS serial_number,
|
||||
erp_purchase_inventory.erp_commodity_id AS erp_commodity_id,
|
||||
erp_purchase_inventory.erp_commodity_name AS erp_commodity_name,
|
||||
erp_purchase_inventory.commodity_serial_number AS commodity_serial_number,
|
||||
erp_purchase_inventory.count AS count,
|
||||
erp_purchase_order.remark AS remarks`).
|
||||
Joins("LEFT JOIN erp_purchase_order ON erp_purchase_order.id = erp_purchase_inventory.erp_purchase_order_id").
|
||||
Where("erp_purchase_inventory.imei = ?", req.IMEI).
|
||||
Find(&purchaseRecords).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
results = append(results, purchaseRecords...)
|
||||
|
||||
// 2. 查询产品入库记录(关联产品入库订单与产品入库商品信息)
|
||||
var productRecords []ImeiTraceData
|
||||
err = orm.Eloquent.Table("erp_inventory_product_commodity").
|
||||
Select(`erp_inventory_product_order.store_id AS store_id,
|
||||
erp_inventory_product_order.store_name AS store_name,
|
||||
'产品入库' AS serial_type,
|
||||
erp_inventory_product_order.maker_time AS maker_time,
|
||||
erp_inventory_product_order.serial_number AS serial_number,
|
||||
erp_inventory_product_commodity.commodity_id AS erp_commodity_id,
|
||||
erp_inventory_product_commodity.commodity_name AS erp_commodity_name,
|
||||
'' AS commodity_serial_number,
|
||||
erp_inventory_product_commodity.count AS count,
|
||||
erp_inventory_product_commodity.remark AS remarks`).
|
||||
Joins("LEFT JOIN erp_inventory_product_order ON erp_inventory_product_order.id = erp_inventory_product_commodity.product_order_id").
|
||||
Where("erp_inventory_product_commodity.imei = ?", req.IMEI).
|
||||
Find(&productRecords).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
results = append(results, productRecords...)
|
||||
|
||||
// 3. 查询库存调拨记录(以接收门店为准)
|
||||
var allotRecords []ImeiTraceData
|
||||
err = orm.Eloquent.Table("erp_inventory_allot_commodity").
|
||||
Select(`erp_inventory_allot_order.receive_store_id AS store_id,
|
||||
erp_inventory_allot_order.receive_store_name AS store_name,
|
||||
'库存调拨' AS serial_type,
|
||||
erp_inventory_allot_order.maker_time AS maker_time,
|
||||
erp_inventory_allot_order.serial_number AS serial_number,
|
||||
erp_inventory_allot_commodity.commodity_id AS erp_commodity_id,
|
||||
erp_inventory_allot_commodity.commodity_name AS erp_commodity_name,
|
||||
'' AS commodity_serial_number,
|
||||
erp_inventory_allot_commodity.count AS count,
|
||||
erp_inventory_allot_commodity.remark AS remarks`).
|
||||
Joins("LEFT JOIN erp_inventory_allot_order ON erp_inventory_allot_order.id = erp_inventory_allot_commodity.allot_order_id").
|
||||
Where("erp_inventory_allot_commodity.imei = ?", req.IMEI).
|
||||
Find(&allotRecords).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
results = append(results, allotRecords...)
|
||||
|
||||
// 4. 查询库存变动记录
|
||||
var changeRecords []ImeiTraceData
|
||||
err = orm.Eloquent.Table("erp_inventory_change_commodity").
|
||||
Select(`erp_inventory_change_order.store_id AS store_id,
|
||||
erp_inventory_change_order.store_name AS store_name,
|
||||
CASE erp_inventory_change_order.change_type
|
||||
WHEN 'add' THEN '库存增加'
|
||||
WHEN 'reduce' THEN '库存减少'
|
||||
ELSE '库存变动' END AS serial_type,
|
||||
erp_inventory_change_order.maker_time AS maker_time,
|
||||
erp_inventory_change_order.serial_number AS serial_number,
|
||||
erp_inventory_change_commodity.commodity_id AS erp_commodity_id,
|
||||
erp_inventory_change_commodity.commodity_name AS erp_commodity_name,
|
||||
'' AS commodity_serial_number,
|
||||
erp_inventory_change_commodity.count AS count,
|
||||
erp_inventory_change_commodity.remark AS remarks`).
|
||||
Joins("LEFT JOIN erp_inventory_change_order ON erp_inventory_change_order.id = erp_inventory_change_commodity.change_order_id").
|
||||
Where("erp_inventory_change_commodity.imei = ?", req.IMEI).
|
||||
Find(&changeRecords).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
results = append(results, changeRecords...)
|
||||
|
||||
// 5. 查询零售订单记录(关联零售订单与订单商品表)
|
||||
var retailRecords []ImeiTraceData
|
||||
err = orm.Eloquent.Table("erp_order_commodity").
|
||||
Select(`erp_order.store_id AS store_id,
|
||||
erp_order.store_name AS store_name,
|
||||
CASE erp_order.retail_type
|
||||
WHEN 'sale' THEN '零售销售'
|
||||
WHEN 'rejected' THEN '零售退货'
|
||||
ELSE '零售订单' END AS serial_type,
|
||||
erp_order.maker_time AS maker_time,
|
||||
erp_order.bill_sn AS serial_number,
|
||||
erp_order_commodity.erp_commodity_id AS erp_commodity_id,
|
||||
erp_order_commodity.erp_commodity_name AS erp_commodity_name,
|
||||
erp_order_commodity.count AS count,
|
||||
erp_order_commodity.remark AS remarks`).
|
||||
Joins("LEFT JOIN erp_order ON erp_order.id = erp_order_commodity.erp_order_id").
|
||||
Where("erp_order_commodity.imei = ?", req.IMEI).
|
||||
Find(&retailRecords).Error
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
results = append(results, retailRecords...)
|
||||
|
||||
for i, _ := range results {
|
||||
if results[i].CommoditySerialNumber == "" {
|
||||
commodityInfo, _ := GetCommodity(results[i].ErpCommodityId)
|
||||
if commodityInfo != nil {
|
||||
results[i].CommoditySerialNumber = commodityInfo.SerialNumber
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 可选:对结果按单据日期(maker_time)倒序排序(时间最新的在最前)
|
||||
sort.Slice(results, func(i, j int) bool {
|
||||
// 如果任一 maker_time 为空,则不做排序调整
|
||||
if results[i].MakerTime == nil || results[j].MakerTime == nil {
|
||||
return false
|
||||
}
|
||||
return results[i].MakerTime.After(*results[j].MakerTime)
|
||||
})
|
||||
|
||||
// 组装返回结构
|
||||
resp := &ImeiTraceResp{
|
||||
List: results,
|
||||
Total: len(results),
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ func CheckCreateErpPurchaseChangeOrderParam(req *ErpPurchaseChangeCreateReq) err
|
|||
|
||||
// 判断是否是串码商品,非串码商品不支持
|
||||
if item.IMEIType == 1 {
|
||||
return errors.New("操作失败:非串码商品不支持")
|
||||
return errors.New("操作失败:采购换机不支持非串码商品")
|
||||
}
|
||||
|
||||
var imeiStockCommodity ErpStockCommodity
|
||||
|
@ -177,7 +177,7 @@ func CheckCreateErpPurchaseChangeOrderParam(req *ErpPurchaseChangeCreateReq) err
|
|||
}
|
||||
|
||||
if imeiStockCommodity.StoreId != req.StoreId {
|
||||
return errors.New(item.OriginIMEI + "商品非所选门店库存,请检查")
|
||||
return errors.New("商品" + "[" + item.OriginIMEI + "]非所选门店库存,请检查")
|
||||
}
|
||||
|
||||
// 判断新商品串码是否已录入或者使用过
|
||||
|
@ -188,8 +188,8 @@ func CheckCreateErpPurchaseChangeOrderParam(req *ErpPurchaseChangeCreateReq) err
|
|||
return err
|
||||
}
|
||||
|
||||
if imeiStockCommodity.ID != 0 {
|
||||
return errors.New("串码" + "[" + item.OriginIMEI + "]重复")
|
||||
if newImeiStockCommodity.ID != 0 {
|
||||
return errors.New("串码" + "[" + item.NewIMEI + "]重复")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ func CheckEditErpPurchaseChangeOrderParam(req *ErpPurchaseChangeEditReq) error {
|
|||
|
||||
// 判断是否是串码商品,非串码商品不支持
|
||||
if item.IMEIType == 1 {
|
||||
return errors.New("操作失败:非串码商品不支持")
|
||||
return errors.New("操作失败:采购换机不支持非串码商品")
|
||||
}
|
||||
|
||||
var imeiStockCommodity ErpStockCommodity
|
||||
|
@ -226,7 +226,7 @@ func CheckEditErpPurchaseChangeOrderParam(req *ErpPurchaseChangeEditReq) error {
|
|||
}
|
||||
|
||||
if imeiStockCommodity.StoreId != req.StoreId {
|
||||
return errors.New(item.OriginIMEI + "商品非所选门店库存,请检查")
|
||||
return errors.New("商品" + "[" + item.OriginIMEI + "]非所选门店库存,请检查")
|
||||
}
|
||||
|
||||
// 判断新商品串码是否已录入或者使用过
|
||||
|
@ -237,7 +237,7 @@ func CheckEditErpPurchaseChangeOrderParam(req *ErpPurchaseChangeEditReq) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if imeiStockCommodity.ID != 0 {
|
||||
if newImeiStockCommodity.ID != 0 {
|
||||
return errors.New("串码" + "[" + item.OriginIMEI + "]重复")
|
||||
}
|
||||
}
|
||||
|
@ -488,37 +488,36 @@ func (m *ErpPurchaseChangeOrderListReq) List(c *gin.Context) (*ErpPurchaseChange
|
|||
|
||||
// AuditChangeOrder 审核采购换机订单
|
||||
func AuditChangeOrder(begin *gorm.DB, req ErpPurchaseChangeOrder, state int) error {
|
||||
var purchaseChangeOrder ErpPurchaseChangeOrder
|
||||
err := orm.Eloquent.Table("erp_purchase_change_order").Where("id=?", req.ID).Find(&purchaseChangeOrder).Error
|
||||
var commodities []ErpPurchaseChangeCommodity
|
||||
err := orm.Eloquent.Table("erp_purchase_change_commodity").Where("change_order_id = ?", req.ID).Find(&commodities).Error
|
||||
if err != nil {
|
||||
logger.Error("check erp_purchase_change_order err:", logger.Field("err", err))
|
||||
return err
|
||||
}
|
||||
|
||||
if state == ErpPurchaseChangeOrderUnAudit { // 反向审核,状态更新为:待审核
|
||||
for i, _ := range req.Commodities {
|
||||
if req.Commodities[i].IMEIType == 2 || req.Commodities[i].IMEIType == 3 { // 串码商品
|
||||
// 旧串码商品出库
|
||||
if req.Commodities[i].OriginIMEI == "" {
|
||||
if state == 1 { // 审核
|
||||
for i, _ := range commodities {
|
||||
if commodities[i].IMEIType == 2 || commodities[i].IMEIType == 3 { // 串码商品
|
||||
if commodities[i].OriginIMEI == "" {
|
||||
return errors.New("串码为空")
|
||||
}
|
||||
|
||||
var imeiStockCommodity ErpStockCommodity
|
||||
err = orm.Eloquent.Table("erp_stock_commodity").Where("imei = ? and state = ?",
|
||||
req.Commodities[i].OriginIMEI, InStock).Find(&imeiStockCommodity).Error
|
||||
commodities[i].OriginIMEI, InStock).Find(&imeiStockCommodity).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if imeiStockCommodity.ID == 0 {
|
||||
return errors.New("商品" + "[" + req.Commodities[i].ErpCommodityName + "]库存不足")
|
||||
return errors.New("商品" + "[" + commodities[i].ErpCommodityName + "]库存不足")
|
||||
}
|
||||
|
||||
if imeiStockCommodity.StoreId != req.StoreId {
|
||||
return errors.New(req.Commodities[i].ErpCommodityName + "商品非所选门店库存,请检查")
|
||||
return errors.New("商品" + "[" + commodities[i].OriginIMEI + "]非所选门店库存,请检查")
|
||||
}
|
||||
|
||||
err = begin.Table("erp_stock_commodity").Where("imei = ?", req.Commodities[i].OriginIMEI).
|
||||
err = begin.Table("erp_stock_commodity").Where("imei = ?", commodities[i].OriginIMEI).
|
||||
Updates(map[string]interface{}{
|
||||
"state": PurchaseChange,
|
||||
"updated_at": time.Now(),
|
||||
|
@ -532,8 +531,9 @@ func AuditChangeOrder(begin *gorm.DB, req ErpPurchaseChangeOrder, state int) err
|
|||
// 新串码商品入库
|
||||
newStockCommodity := imeiStockCommodity
|
||||
newStockCommodity.ID = 0
|
||||
newStockCommodity.IMEI = req.Commodities[i].NewIMEI
|
||||
err = begin.Create(newStockCommodity).Error
|
||||
newStockCommodity.IMEI = commodities[i].NewIMEI
|
||||
newStockCommodity.StockSn = req.SerialNumber
|
||||
err = begin.Create(&newStockCommodity).Error
|
||||
if err != nil {
|
||||
begin.Rollback()
|
||||
logger.Error("create purchase order err:", logger.Field("err", err))
|
||||
|
@ -543,18 +543,18 @@ func AuditChangeOrder(begin *gorm.DB, req ErpPurchaseChangeOrder, state int) err
|
|||
return errors.New("非串码商品不支持采购换货")
|
||||
}
|
||||
}
|
||||
} else if state == ErpPurchaseChangeOrderFinished { // 正向审核,状态更新为:已完成
|
||||
for i, _ := range req.Commodities {
|
||||
} else if state == 2 { // 取消审核
|
||||
for i, _ := range commodities {
|
||||
// 查询新串码的库存情况
|
||||
var imeiStockCommodity ErpStockCommodity
|
||||
err = orm.Eloquent.Table("erp_stock_commodity").Where("imei = ? and state = ?",
|
||||
req.Commodities[i].NewIMEI, InStock).Find(&imeiStockCommodity).Error
|
||||
commodities[i].NewIMEI, InStock).Find(&imeiStockCommodity).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if imeiStockCommodity.ID == 0 {
|
||||
return errors.New("商品" + "[" + req.Commodities[i].NewIMEI + "]不在库")
|
||||
return errors.New("商品" + "[" + commodities[i].NewIMEI + "]不在库")
|
||||
}
|
||||
|
||||
err = begin.Delete(imeiStockCommodity).Error // 删除新串码库存
|
||||
|
@ -565,7 +565,7 @@ func AuditChangeOrder(begin *gorm.DB, req ErpPurchaseChangeOrder, state int) err
|
|||
}
|
||||
|
||||
// 更新旧串码为在库状态
|
||||
err = begin.Table("erp_stock_commodity").Where("imei = ?", req.Commodities[i].OriginIMEI).
|
||||
err = begin.Table("erp_stock_commodity").Where("imei = ?", commodities[i].OriginIMEI).
|
||||
Updates(map[string]interface{}{
|
||||
"state": InStock,
|
||||
"updated_at": time.Now(),
|
||||
|
|
|
@ -18,6 +18,7 @@ func registerInventoryManageRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJ
|
|||
r.POST("add_remark", inventorymanage.AddRemark) // 添加备注
|
||||
r.POST("query_code", inventorymanage.QueryCode) // 查询商品串码或者条码
|
||||
r.POST("query_name", inventorymanage.QueryName) // 通过名称模糊查询商品库存详情
|
||||
r.POST("imei/trace", inventorymanage.ImeiTrace) // 串码追踪
|
||||
|
||||
// 产品入库
|
||||
r1 := v1.Group("/inventory/product").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
|
||||
|
|
573
docs/docs.go
573
docs/docs.go
|
@ -2527,6 +2527,176 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/change/audit": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"采购换机",
|
||||
"V1.4.5"
|
||||
],
|
||||
"summary": "采购换机-审核",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "采购换机-审核模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeAuditReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/app.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/change/create": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"采购换机",
|
||||
"V1.4.5"
|
||||
],
|
||||
"summary": "采购换机-新增",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "采购换机-新增模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeCreateReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeOrder"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/change/delete": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"采购换机",
|
||||
"V1.4.5"
|
||||
],
|
||||
"summary": "采购换机-删除",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "采购换机-删除模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeDeleteReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/app.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/change/edit": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"采购换机",
|
||||
"V1.4.5"
|
||||
],
|
||||
"summary": "采购换机-编辑",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "采购换机-编辑模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeEditReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeOrder"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/change/list": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"采购换机",
|
||||
"V1.4.5"
|
||||
],
|
||||
"summary": "采购换机-列表",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "采购换机列表模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeOrderListReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeOrderListResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/create": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
|
@ -3827,6 +3997,39 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/inventory/imei/trace": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"库存管理"
|
||||
],
|
||||
"summary": "串码追踪",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "串码追踪模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ImeiTraceReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ImeiTraceResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/inventory/import": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
|
@ -6546,6 +6749,12 @@ const docTemplate = `{
|
|||
"name": "shopper_code",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "小程序ID",
|
||||
"name": "uid",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "是否导出:1-导出",
|
||||
|
@ -11802,6 +12011,297 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeAuditReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"serial_number",
|
||||
"state"
|
||||
],
|
||||
"properties": {
|
||||
"serial_number": {
|
||||
"description": "单据编号",
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"description": "审核操作: 1-审核 2-取消审核",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeCommodity": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"change_order_id": {
|
||||
"description": "采购换机订单id",
|
||||
"type": "integer"
|
||||
},
|
||||
"commodity_serial_number": {
|
||||
"description": "商品编号",
|
||||
"type": "string"
|
||||
},
|
||||
"count": {
|
||||
"description": "数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"createdAt": {
|
||||
"description": "创建时间",
|
||||
"type": "string"
|
||||
},
|
||||
"erp_commodity_id": {
|
||||
"description": "商品id",
|
||||
"type": "integer"
|
||||
},
|
||||
"erp_commodity_name": {
|
||||
"description": "商品名称",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "数据库记录编号",
|
||||
"type": "integer"
|
||||
},
|
||||
"imei_type": {
|
||||
"description": "1-无串码 2-串码",
|
||||
"type": "integer"
|
||||
},
|
||||
"new_color": {
|
||||
"description": "新机身颜色",
|
||||
"type": "string"
|
||||
},
|
||||
"new_imei": {
|
||||
"description": "新机身串码",
|
||||
"type": "string"
|
||||
},
|
||||
"origin_color": {
|
||||
"description": "原机身颜色",
|
||||
"type": "string"
|
||||
},
|
||||
"origin_imei": {
|
||||
"description": "原机身串码",
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"description": "更新时间",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeCreateReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"commodities"
|
||||
],
|
||||
"properties": {
|
||||
"commodities": {
|
||||
"description": "采购换机商品信息",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeCommodity"
|
||||
}
|
||||
},
|
||||
"erp_supplier_id": {
|
||||
"description": "供应商id:入库必传",
|
||||
"type": "integer"
|
||||
},
|
||||
"remark": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"store_id": {
|
||||
"description": "门店id:入库必传",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeDeleteReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"serial_number"
|
||||
],
|
||||
"properties": {
|
||||
"serial_number": {
|
||||
"description": "单据编号",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeEditReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"Commodities"
|
||||
],
|
||||
"properties": {
|
||||
"Commodities": {
|
||||
"description": "采购商品信息",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeCommodity"
|
||||
}
|
||||
},
|
||||
"change_order_id": {
|
||||
"description": "采购换机订单id",
|
||||
"type": "integer"
|
||||
},
|
||||
"erp_supplier_id": {
|
||||
"description": "供应商id:入库必传",
|
||||
"type": "integer"
|
||||
},
|
||||
"remark": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"store_id": {
|
||||
"description": "门店id:入库必传",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeOrder": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"audit_time": {
|
||||
"description": "审核时间",
|
||||
"type": "string"
|
||||
},
|
||||
"auditor_id": {
|
||||
"description": "审核人id",
|
||||
"type": "integer"
|
||||
},
|
||||
"auditor_name": {
|
||||
"description": "审核人名称",
|
||||
"type": "string"
|
||||
},
|
||||
"commodities": {
|
||||
"description": "采购换机商品信息",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeCommodity"
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"description": "创建时间",
|
||||
"type": "string"
|
||||
},
|
||||
"erp_supplier_id": {
|
||||
"description": "供应商id",
|
||||
"type": "integer"
|
||||
},
|
||||
"erp_supplier_name": {
|
||||
"description": "供应商名称",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "数据库记录编号",
|
||||
"type": "integer"
|
||||
},
|
||||
"maker_id": {
|
||||
"description": "制单人id",
|
||||
"type": "integer"
|
||||
},
|
||||
"maker_name": {
|
||||
"description": "制单人名称",
|
||||
"type": "string"
|
||||
},
|
||||
"maker_time": {
|
||||
"description": "制单时间",
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"serial_number": {
|
||||
"description": "单据编号",
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"description": "1-待审核 2-已完成",
|
||||
"type": "integer"
|
||||
},
|
||||
"store_id": {
|
||||
"description": "门店id",
|
||||
"type": "integer"
|
||||
},
|
||||
"store_name": {
|
||||
"description": "门店名称",
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"description": "更新时间",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeOrderListReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"audit_time_end": {
|
||||
"description": "审核结束时间",
|
||||
"type": "string"
|
||||
},
|
||||
"audit_time_start": {
|
||||
"description": "审核开始时间",
|
||||
"type": "string"
|
||||
},
|
||||
"erp_supplier_id": {
|
||||
"description": "供应商id",
|
||||
"type": "integer"
|
||||
},
|
||||
"handler_id": {
|
||||
"description": "经手人id",
|
||||
"type": "integer"
|
||||
},
|
||||
"pageIndex": {
|
||||
"description": "页码",
|
||||
"type": "integer"
|
||||
},
|
||||
"pageSize": {
|
||||
"description": "页面条数",
|
||||
"type": "integer"
|
||||
},
|
||||
"serial_number": {
|
||||
"description": "单据编号",
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"description": "状态:1-待审核 2-已完成 3-已终止",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"store_id": {
|
||||
"description": "门店id",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeOrderListResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeOrder"
|
||||
}
|
||||
},
|
||||
"pageIndex": {
|
||||
"description": "页码",
|
||||
"type": "integer"
|
||||
},
|
||||
"pageSize": {
|
||||
"description": "页面条数",
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"description": "总条数",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseCommodity": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -14449,6 +14949,10 @@ const docTemplate = `{
|
|||
"description": "商品id",
|
||||
"type": "integer"
|
||||
},
|
||||
"is_export": {
|
||||
"description": "1-导出",
|
||||
"type": "integer"
|
||||
},
|
||||
"order_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
@ -14746,6 +15250,75 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"models.ImeiTraceData": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"commodity_serial_number": {
|
||||
"description": "商品编号",
|
||||
"type": "string"
|
||||
},
|
||||
"count": {
|
||||
"description": "商品数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"erp_commodity_id": {
|
||||
"description": "商品id",
|
||||
"type": "integer"
|
||||
},
|
||||
"erp_commodity_name": {
|
||||
"description": "商品名称",
|
||||
"type": "string"
|
||||
},
|
||||
"maker_time": {
|
||||
"description": "单据日期",
|
||||
"type": "string"
|
||||
},
|
||||
"remarks": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"serial_number": {
|
||||
"description": "单据编号",
|
||||
"type": "string"
|
||||
},
|
||||
"serial_type": {
|
||||
"description": "单据类型",
|
||||
"type": "string"
|
||||
},
|
||||
"store_id": {
|
||||
"description": "门店id",
|
||||
"type": "integer"
|
||||
},
|
||||
"store_name": {
|
||||
"description": "门店名称",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ImeiTraceReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"imei": {
|
||||
"description": "商品串码",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ImeiTraceResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ImeiTraceData"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"description": "总条数",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.InsertSysUserReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
@ -2516,6 +2516,176 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/change/audit": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"采购换机",
|
||||
"V1.4.5"
|
||||
],
|
||||
"summary": "采购换机-审核",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "采购换机-审核模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeAuditReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/app.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/change/create": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"采购换机",
|
||||
"V1.4.5"
|
||||
],
|
||||
"summary": "采购换机-新增",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "采购换机-新增模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeCreateReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeOrder"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/change/delete": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"采购换机",
|
||||
"V1.4.5"
|
||||
],
|
||||
"summary": "采购换机-删除",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "采购换机-删除模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeDeleteReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/app.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/change/edit": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"采购换机",
|
||||
"V1.4.5"
|
||||
],
|
||||
"summary": "采购换机-编辑",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "采购换机-编辑模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeEditReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeOrder"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/change/list": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"采购换机",
|
||||
"V1.4.5"
|
||||
],
|
||||
"summary": "采购换机-列表",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "采购换机列表模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeOrderListReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeOrderListResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/erp_purchase/create": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
|
@ -3816,6 +3986,39 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/inventory/imei/trace": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"库存管理"
|
||||
],
|
||||
"summary": "串码追踪",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "串码追踪模型",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ImeiTraceReq"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ImeiTraceResp"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/inventory/import": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
|
@ -6535,6 +6738,12 @@
|
|||
"name": "shopper_code",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "小程序ID",
|
||||
"name": "uid",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "是否导出:1-导出",
|
||||
|
@ -11791,6 +12000,297 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeAuditReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"serial_number",
|
||||
"state"
|
||||
],
|
||||
"properties": {
|
||||
"serial_number": {
|
||||
"description": "单据编号",
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"description": "审核操作: 1-审核 2-取消审核",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeCommodity": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"change_order_id": {
|
||||
"description": "采购换机订单id",
|
||||
"type": "integer"
|
||||
},
|
||||
"commodity_serial_number": {
|
||||
"description": "商品编号",
|
||||
"type": "string"
|
||||
},
|
||||
"count": {
|
||||
"description": "数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"createdAt": {
|
||||
"description": "创建时间",
|
||||
"type": "string"
|
||||
},
|
||||
"erp_commodity_id": {
|
||||
"description": "商品id",
|
||||
"type": "integer"
|
||||
},
|
||||
"erp_commodity_name": {
|
||||
"description": "商品名称",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "数据库记录编号",
|
||||
"type": "integer"
|
||||
},
|
||||
"imei_type": {
|
||||
"description": "1-无串码 2-串码",
|
||||
"type": "integer"
|
||||
},
|
||||
"new_color": {
|
||||
"description": "新机身颜色",
|
||||
"type": "string"
|
||||
},
|
||||
"new_imei": {
|
||||
"description": "新机身串码",
|
||||
"type": "string"
|
||||
},
|
||||
"origin_color": {
|
||||
"description": "原机身颜色",
|
||||
"type": "string"
|
||||
},
|
||||
"origin_imei": {
|
||||
"description": "原机身串码",
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"description": "更新时间",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeCreateReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"commodities"
|
||||
],
|
||||
"properties": {
|
||||
"commodities": {
|
||||
"description": "采购换机商品信息",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeCommodity"
|
||||
}
|
||||
},
|
||||
"erp_supplier_id": {
|
||||
"description": "供应商id:入库必传",
|
||||
"type": "integer"
|
||||
},
|
||||
"remark": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"store_id": {
|
||||
"description": "门店id:入库必传",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeDeleteReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"serial_number"
|
||||
],
|
||||
"properties": {
|
||||
"serial_number": {
|
||||
"description": "单据编号",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeEditReq": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"Commodities"
|
||||
],
|
||||
"properties": {
|
||||
"Commodities": {
|
||||
"description": "采购商品信息",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeCommodity"
|
||||
}
|
||||
},
|
||||
"change_order_id": {
|
||||
"description": "采购换机订单id",
|
||||
"type": "integer"
|
||||
},
|
||||
"erp_supplier_id": {
|
||||
"description": "供应商id:入库必传",
|
||||
"type": "integer"
|
||||
},
|
||||
"remark": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"store_id": {
|
||||
"description": "门店id:入库必传",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeOrder": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"audit_time": {
|
||||
"description": "审核时间",
|
||||
"type": "string"
|
||||
},
|
||||
"auditor_id": {
|
||||
"description": "审核人id",
|
||||
"type": "integer"
|
||||
},
|
||||
"auditor_name": {
|
||||
"description": "审核人名称",
|
||||
"type": "string"
|
||||
},
|
||||
"commodities": {
|
||||
"description": "采购换机商品信息",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeCommodity"
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"description": "创建时间",
|
||||
"type": "string"
|
||||
},
|
||||
"erp_supplier_id": {
|
||||
"description": "供应商id",
|
||||
"type": "integer"
|
||||
},
|
||||
"erp_supplier_name": {
|
||||
"description": "供应商名称",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "数据库记录编号",
|
||||
"type": "integer"
|
||||
},
|
||||
"maker_id": {
|
||||
"description": "制单人id",
|
||||
"type": "integer"
|
||||
},
|
||||
"maker_name": {
|
||||
"description": "制单人名称",
|
||||
"type": "string"
|
||||
},
|
||||
"maker_time": {
|
||||
"description": "制单时间",
|
||||
"type": "string"
|
||||
},
|
||||
"remark": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"serial_number": {
|
||||
"description": "单据编号",
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"description": "1-待审核 2-已完成",
|
||||
"type": "integer"
|
||||
},
|
||||
"store_id": {
|
||||
"description": "门店id",
|
||||
"type": "integer"
|
||||
},
|
||||
"store_name": {
|
||||
"description": "门店名称",
|
||||
"type": "string"
|
||||
},
|
||||
"updatedAt": {
|
||||
"description": "更新时间",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeOrderListReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"audit_time_end": {
|
||||
"description": "审核结束时间",
|
||||
"type": "string"
|
||||
},
|
||||
"audit_time_start": {
|
||||
"description": "审核开始时间",
|
||||
"type": "string"
|
||||
},
|
||||
"erp_supplier_id": {
|
||||
"description": "供应商id",
|
||||
"type": "integer"
|
||||
},
|
||||
"handler_id": {
|
||||
"description": "经手人id",
|
||||
"type": "integer"
|
||||
},
|
||||
"pageIndex": {
|
||||
"description": "页码",
|
||||
"type": "integer"
|
||||
},
|
||||
"pageSize": {
|
||||
"description": "页面条数",
|
||||
"type": "integer"
|
||||
},
|
||||
"serial_number": {
|
||||
"description": "单据编号",
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"description": "状态:1-待审核 2-已完成 3-已终止",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"store_id": {
|
||||
"description": "门店id",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseChangeOrderListResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ErpPurchaseChangeOrder"
|
||||
}
|
||||
},
|
||||
"pageIndex": {
|
||||
"description": "页码",
|
||||
"type": "integer"
|
||||
},
|
||||
"pageSize": {
|
||||
"description": "页面条数",
|
||||
"type": "integer"
|
||||
},
|
||||
"total": {
|
||||
"description": "总条数",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ErpPurchaseCommodity": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -14438,6 +14938,10 @@
|
|||
"description": "商品id",
|
||||
"type": "integer"
|
||||
},
|
||||
"is_export": {
|
||||
"description": "1-导出",
|
||||
"type": "integer"
|
||||
},
|
||||
"order_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
@ -14735,6 +15239,75 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"models.ImeiTraceData": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"commodity_serial_number": {
|
||||
"description": "商品编号",
|
||||
"type": "string"
|
||||
},
|
||||
"count": {
|
||||
"description": "商品数量",
|
||||
"type": "integer"
|
||||
},
|
||||
"erp_commodity_id": {
|
||||
"description": "商品id",
|
||||
"type": "integer"
|
||||
},
|
||||
"erp_commodity_name": {
|
||||
"description": "商品名称",
|
||||
"type": "string"
|
||||
},
|
||||
"maker_time": {
|
||||
"description": "单据日期",
|
||||
"type": "string"
|
||||
},
|
||||
"remarks": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"serial_number": {
|
||||
"description": "单据编号",
|
||||
"type": "string"
|
||||
},
|
||||
"serial_type": {
|
||||
"description": "单据类型",
|
||||
"type": "string"
|
||||
},
|
||||
"store_id": {
|
||||
"description": "门店id",
|
||||
"type": "integer"
|
||||
},
|
||||
"store_name": {
|
||||
"description": "门店名称",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ImeiTraceReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"imei": {
|
||||
"description": "商品串码",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ImeiTraceResp": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"list": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.ImeiTraceData"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"description": "总条数",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.InsertSysUserReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
@ -3454,6 +3454,216 @@ definitions:
|
|||
- serial_number
|
||||
- state
|
||||
type: object
|
||||
models.ErpPurchaseChangeAuditReq:
|
||||
properties:
|
||||
serial_number:
|
||||
description: 单据编号
|
||||
type: string
|
||||
state:
|
||||
description: '审核操作: 1-审核 2-取消审核'
|
||||
type: integer
|
||||
required:
|
||||
- serial_number
|
||||
- state
|
||||
type: object
|
||||
models.ErpPurchaseChangeCommodity:
|
||||
properties:
|
||||
change_order_id:
|
||||
description: 采购换机订单id
|
||||
type: integer
|
||||
commodity_serial_number:
|
||||
description: 商品编号
|
||||
type: string
|
||||
count:
|
||||
description: 数量
|
||||
type: integer
|
||||
createdAt:
|
||||
description: 创建时间
|
||||
type: string
|
||||
erp_commodity_id:
|
||||
description: 商品id
|
||||
type: integer
|
||||
erp_commodity_name:
|
||||
description: 商品名称
|
||||
type: string
|
||||
id:
|
||||
description: 数据库记录编号
|
||||
type: integer
|
||||
imei_type:
|
||||
description: 1-无串码 2-串码
|
||||
type: integer
|
||||
new_color:
|
||||
description: 新机身颜色
|
||||
type: string
|
||||
new_imei:
|
||||
description: 新机身串码
|
||||
type: string
|
||||
origin_color:
|
||||
description: 原机身颜色
|
||||
type: string
|
||||
origin_imei:
|
||||
description: 原机身串码
|
||||
type: string
|
||||
remark:
|
||||
description: 备注
|
||||
type: string
|
||||
updatedAt:
|
||||
description: 更新时间
|
||||
type: string
|
||||
type: object
|
||||
models.ErpPurchaseChangeCreateReq:
|
||||
properties:
|
||||
commodities:
|
||||
description: 采购换机商品信息
|
||||
items:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeCommodity'
|
||||
type: array
|
||||
erp_supplier_id:
|
||||
description: 供应商id:入库必传
|
||||
type: integer
|
||||
remark:
|
||||
description: 备注
|
||||
type: string
|
||||
store_id:
|
||||
description: 门店id:入库必传
|
||||
type: integer
|
||||
required:
|
||||
- commodities
|
||||
type: object
|
||||
models.ErpPurchaseChangeDeleteReq:
|
||||
properties:
|
||||
serial_number:
|
||||
description: 单据编号
|
||||
type: string
|
||||
required:
|
||||
- serial_number
|
||||
type: object
|
||||
models.ErpPurchaseChangeEditReq:
|
||||
properties:
|
||||
Commodities:
|
||||
description: 采购商品信息
|
||||
items:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeCommodity'
|
||||
type: array
|
||||
change_order_id:
|
||||
description: 采购换机订单id
|
||||
type: integer
|
||||
erp_supplier_id:
|
||||
description: 供应商id:入库必传
|
||||
type: integer
|
||||
remark:
|
||||
description: 备注
|
||||
type: string
|
||||
store_id:
|
||||
description: 门店id:入库必传
|
||||
type: integer
|
||||
required:
|
||||
- Commodities
|
||||
type: object
|
||||
models.ErpPurchaseChangeOrder:
|
||||
properties:
|
||||
audit_time:
|
||||
description: 审核时间
|
||||
type: string
|
||||
auditor_id:
|
||||
description: 审核人id
|
||||
type: integer
|
||||
auditor_name:
|
||||
description: 审核人名称
|
||||
type: string
|
||||
commodities:
|
||||
description: 采购换机商品信息
|
||||
items:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeCommodity'
|
||||
type: array
|
||||
createdAt:
|
||||
description: 创建时间
|
||||
type: string
|
||||
erp_supplier_id:
|
||||
description: 供应商id
|
||||
type: integer
|
||||
erp_supplier_name:
|
||||
description: 供应商名称
|
||||
type: string
|
||||
id:
|
||||
description: 数据库记录编号
|
||||
type: integer
|
||||
maker_id:
|
||||
description: 制单人id
|
||||
type: integer
|
||||
maker_name:
|
||||
description: 制单人名称
|
||||
type: string
|
||||
maker_time:
|
||||
description: 制单时间
|
||||
type: string
|
||||
remark:
|
||||
description: 备注
|
||||
type: string
|
||||
serial_number:
|
||||
description: 单据编号
|
||||
type: string
|
||||
state:
|
||||
description: 1-待审核 2-已完成
|
||||
type: integer
|
||||
store_id:
|
||||
description: 门店id
|
||||
type: integer
|
||||
store_name:
|
||||
description: 门店名称
|
||||
type: string
|
||||
updatedAt:
|
||||
description: 更新时间
|
||||
type: string
|
||||
type: object
|
||||
models.ErpPurchaseChangeOrderListReq:
|
||||
properties:
|
||||
audit_time_end:
|
||||
description: 审核结束时间
|
||||
type: string
|
||||
audit_time_start:
|
||||
description: 审核开始时间
|
||||
type: string
|
||||
erp_supplier_id:
|
||||
description: 供应商id
|
||||
type: integer
|
||||
handler_id:
|
||||
description: 经手人id
|
||||
type: integer
|
||||
pageIndex:
|
||||
description: 页码
|
||||
type: integer
|
||||
pageSize:
|
||||
description: 页面条数
|
||||
type: integer
|
||||
serial_number:
|
||||
description: 单据编号
|
||||
type: string
|
||||
state:
|
||||
description: 状态:1-待审核 2-已完成 3-已终止
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
store_id:
|
||||
description: 门店id
|
||||
type: integer
|
||||
type: object
|
||||
models.ErpPurchaseChangeOrderListResp:
|
||||
properties:
|
||||
list:
|
||||
items:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeOrder'
|
||||
type: array
|
||||
pageIndex:
|
||||
description: 页码
|
||||
type: integer
|
||||
pageSize:
|
||||
description: 页面条数
|
||||
type: integer
|
||||
total:
|
||||
description: 总条数
|
||||
type: integer
|
||||
type: object
|
||||
models.ErpPurchaseCommodity:
|
||||
properties:
|
||||
amount:
|
||||
|
@ -5371,6 +5581,9 @@ definitions:
|
|||
goods_id:
|
||||
description: 商品id
|
||||
type: integer
|
||||
is_export:
|
||||
description: 1-导出
|
||||
type: integer
|
||||
order_id:
|
||||
type: integer
|
||||
pageIndex:
|
||||
|
@ -5581,6 +5794,55 @@ definitions:
|
|||
description: 排序序号
|
||||
type: integer
|
||||
type: object
|
||||
models.ImeiTraceData:
|
||||
properties:
|
||||
commodity_serial_number:
|
||||
description: 商品编号
|
||||
type: string
|
||||
count:
|
||||
description: 商品数量
|
||||
type: integer
|
||||
erp_commodity_id:
|
||||
description: 商品id
|
||||
type: integer
|
||||
erp_commodity_name:
|
||||
description: 商品名称
|
||||
type: string
|
||||
maker_time:
|
||||
description: 单据日期
|
||||
type: string
|
||||
remarks:
|
||||
description: 备注
|
||||
type: string
|
||||
serial_number:
|
||||
description: 单据编号
|
||||
type: string
|
||||
serial_type:
|
||||
description: 单据类型
|
||||
type: string
|
||||
store_id:
|
||||
description: 门店id
|
||||
type: integer
|
||||
store_name:
|
||||
description: 门店名称
|
||||
type: string
|
||||
type: object
|
||||
models.ImeiTraceReq:
|
||||
properties:
|
||||
imei:
|
||||
description: 商品串码
|
||||
type: string
|
||||
type: object
|
||||
models.ImeiTraceResp:
|
||||
properties:
|
||||
list:
|
||||
items:
|
||||
$ref: '#/definitions/models.ImeiTraceData'
|
||||
type: array
|
||||
total:
|
||||
description: 总条数
|
||||
type: integer
|
||||
type: object
|
||||
models.InsertSysUserReq:
|
||||
properties:
|
||||
account_type:
|
||||
|
@ -11234,6 +11496,116 @@ paths:
|
|||
tags:
|
||||
- 采购管理
|
||||
- V1.3.0
|
||||
/api/v1/erp_purchase/change/audit:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 采购换机-审核模型
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeAuditReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/app.Response'
|
||||
summary: 采购换机-审核
|
||||
tags:
|
||||
- 采购换机
|
||||
- V1.4.5
|
||||
/api/v1/erp_purchase/change/create:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 采购换机-新增模型
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeCreateReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeOrder'
|
||||
summary: 采购换机-新增
|
||||
tags:
|
||||
- 采购换机
|
||||
- V1.4.5
|
||||
/api/v1/erp_purchase/change/delete:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 采购换机-删除模型
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeDeleteReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/app.Response'
|
||||
summary: 采购换机-删除
|
||||
tags:
|
||||
- 采购换机
|
||||
- V1.4.5
|
||||
/api/v1/erp_purchase/change/edit:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 采购换机-编辑模型
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeEditReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeOrder'
|
||||
summary: 采购换机-编辑
|
||||
tags:
|
||||
- 采购换机
|
||||
- V1.4.5
|
||||
/api/v1/erp_purchase/change/list:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 采购换机列表模型
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeOrderListReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.ErpPurchaseChangeOrderListResp'
|
||||
summary: 采购换机-列表
|
||||
tags:
|
||||
- 采购换机
|
||||
- V1.4.5
|
||||
/api/v1/erp_purchase/create:
|
||||
post:
|
||||
consumes:
|
||||
|
@ -12066,6 +12438,27 @@ paths:
|
|||
summary: 查询库存详情(详情页专用,门店复选)
|
||||
tags:
|
||||
- 库存管理
|
||||
/api/v1/inventory/imei/trace:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- description: 串码追踪模型
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/models.ImeiTraceReq'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.ImeiTraceResp'
|
||||
summary: 串码追踪
|
||||
tags:
|
||||
- 库存管理
|
||||
/api/v1/inventory/import:
|
||||
post:
|
||||
consumes:
|
||||
|
@ -13788,6 +14181,10 @@ paths:
|
|||
in: query
|
||||
name: shopper_code
|
||||
type: string
|
||||
- description: 小程序ID
|
||||
in: query
|
||||
name: uid
|
||||
type: string
|
||||
- description: 是否导出:1-导出
|
||||
in: query
|
||||
name: is_export
|
||||
|
|
Loading…
Reference in New Issue
Block a user