zhangqian
2023-08-29 cd6940f07750c1e2cd3a5c0eeafa6cc0309ef2f6
docs/docs.go
@@ -4466,6 +4466,409 @@
                }
            }
        },
        "/purchase/purchase": {
            "put": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "更新采购单信息",
                "parameters": [
                    {
                        "description": "采购单ID, 采购单信息",
                        "name": "data",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/purchaserequest.UpdatePurchase"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "更新采购单信息",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "创建采购单",
                "parameters": [
                    {
                        "description": "采购单用户名, 采购单手机号码",
                        "name": "data",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/purchaserequest.AddPurchase"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "创建采购单",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/purchase/purchase/{id}": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "获取单一采购单信息",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "采购单ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "获取单一采购单信息,返回包括采购单详情",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/response.PurchaseResponse"
                                        },
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "删除采购单",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "采购单ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "删除采购单",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/purchase/purchaseList": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "分页获取采购单列表",
                "parameters": [
                    {
                        "type": "string",
                        "description": "关键字",
                        "name": "keyword",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "页码",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "每页大小",
                        "name": "pageSize",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "分页获取采购单列表,返回包括列表,总数,页码,每页数量",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/response.PageResult"
                                        },
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/purchase/purchaseType": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "创建采购类型",
                "parameters": [
                    {
                        "description": "采购类型list",
                        "name": "data",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/purchaserequest.PurchaseType"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "创建采购类型",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/purchase/purchaseTypeList": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "获取采购类型列表",
                "responses": {
                    "200": {
                        "description": "获取采购类型列表",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/purchase.PurchaseType"
                                            }
                                        },
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/purchase/submit/{id}": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Purchase"
                ],
                "summary": "提交采购单",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "采购单ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "提交采购单",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/response.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "msg": {
                                            "type": "string"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/s/changeSupplierStatus": {
            "post": {
                "security": [
@@ -7818,6 +8221,242 @@
                }
            }
        },
        "purchase.OrderStatus": {
            "type": "integer",
            "enum": [
                1,
                2,
                3,
                4
            ],
            "x-enum-comments": {
                "OrderStatusCompleted": "已完成",
                "OrderStatusConfirmed": "已下单",
                "OrderStatusReceived": "已到货",
                "OrderStatusStored": "已入库"
            },
            "x-enum-varnames": [
                "OrderStatusConfirmed",
                "OrderStatusReceived",
                "OrderStatusStored",
                "OrderStatusCompleted"
            ]
        },
        "purchase.Purchase": {
            "type": "object",
            "properties": {
                "contact": {
                    "description": "联系人",
                    "type": "string"
                },
                "deliveryDate": {
                    "description": "交付日期",
                    "type": "string"
                },
                "id": {
                    "description": "主键ID",
                    "type": "integer"
                },
                "name": {
                    "description": "采购名称",
                    "type": "string"
                },
                "number": {
                    "description": "采购编号",
                    "type": "string"
                },
                "phone": {
                    "description": "联系人电话",
                    "type": "string"
                },
                "purchaseType": {
                    "$ref": "#/definitions/purchase.PurchaseType"
                },
                "purchaseTypeId": {
                    "description": "采购类型id",
                    "type": "integer"
                },
                "remark": {
                    "description": "备注",
                    "type": "string"
                },
                "signingDate": {
                    "description": "签约日期",
                    "type": "string"
                },
                "status": {
                    "description": "状态",
                    "allOf": [
                        {
                            "$ref": "#/definitions/purchase.OrderStatus"
                        }
                    ]
                },
                "supplier": {
                    "$ref": "#/definitions/test.Supplier"
                },
                "supplierId": {
                    "description": "供应商id",
                    "type": "integer"
                }
            }
        },
        "purchase.PurchaseProducts": {
            "type": "object",
            "properties": {
                "amount": {
                    "description": "采购数量",
                    "type": "number"
                },
                "id": {
                    "description": "主键ID",
                    "type": "integer"
                },
                "price": {
                    "description": "采购单价",
                    "type": "number"
                },
                "productId": {
                    "description": "产品id",
                    "type": "integer"
                },
                "purchaseId": {
                    "description": "采购id",
                    "type": "integer"
                },
                "remark": {
                    "description": "描述",
                    "type": "string"
                },
                "total": {
                    "description": "采购总价",
                    "type": "number"
                }
            }
        },
        "purchase.PurchaseType": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "主键ID",
                    "type": "integer"
                },
                "name": {
                    "description": "采购类型",
                    "type": "string"
                },
                "pin": {
                    "description": "是否置顶",
                    "type": "boolean"
                },
                "sort": {
                    "description": "排序",
                    "type": "integer"
                }
            }
        },
        "purchaserequest.AddPurchase": {
            "type": "object",
            "properties": {
                "productList": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/purchase.PurchaseProducts"
                    }
                },
                "purchase": {
                    "$ref": "#/definitions/purchaserequest.Purchase"
                }
            }
        },
        "purchaserequest.Purchase": {
            "type": "object",
            "properties": {
                "contact": {
                    "description": "联系人",
                    "type": "string"
                },
                "deliveryDate": {
                    "description": "交付日期",
                    "type": "string"
                },
                "id": {
                    "description": "主键ID",
                    "type": "integer"
                },
                "name": {
                    "description": "采购名称",
                    "type": "string"
                },
                "number": {
                    "description": "采购编号",
                    "type": "string"
                },
                "phone": {
                    "description": "联系人电话",
                    "type": "string"
                },
                "purchaseTypeId": {
                    "description": "采购类型id",
                    "type": "integer"
                },
                "remark": {
                    "description": "备注",
                    "type": "string"
                },
                "signingDate": {
                    "description": "签约日期",
                    "type": "string"
                },
                "status": {
                    "description": "状态",
                    "allOf": [
                        {
                            "$ref": "#/definitions/purchase.OrderStatus"
                        }
                    ]
                },
                "supplierId": {
                    "description": "供应商id",
                    "type": "integer"
                }
            }
        },
        "purchaserequest.PurchaseType": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "主键ID",
                    "type": "integer"
                },
                "name": {
                    "description": "采购类型",
                    "type": "string"
                },
                "pin": {
                    "description": "是否置顶",
                    "type": "boolean"
                },
                "sort": {
                    "description": "排序",
                    "type": "integer"
                }
            }
        },
        "purchaserequest.UpdatePurchase": {
            "type": "object",
            "properties": {
                "productList": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/purchase.PurchaseProducts"
                    }
                },
                "purchase": {
                    "$ref": "#/definitions/purchaserequest.Purchase"
                }
            }
        },
        "request.AddMenuAuthorityInfo": {
            "type": "object",
            "properties": {
@@ -8270,6 +8909,20 @@
                }
            }
        },
        "response.PurchaseResponse": {
            "type": "object",
            "properties": {
                "productList": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/purchase.PurchaseProducts"
                    }
                },
                "purchase": {
                    "$ref": "#/definitions/purchase.Purchase"
                }
            }
        },
        "response.Response": {
            "type": "object",
            "properties": {