From 5fb095f39273767dfb54ec8f2c8816964b7f8840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E4=B8=87=E4=BF=8A?= Date: Tue, 13 Jan 2026 17:59:30 +0800 Subject: [PATCH] =?UTF-8?q?feat/=E5=90=88=E5=90=8C=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Swagger.json | 3296 +++++++++++++++++++++++++- src/api/contractTemplate.js | 100 + src/router/index.js | 26 +- src/views/base/contract-template.vue | 367 ++- 4 files changed, 3517 insertions(+), 272 deletions(-) create mode 100644 src/api/contractTemplate.js diff --git a/Swagger.json b/Swagger.json index 3cace7a..43c8998 100644 --- a/Swagger.json +++ b/Swagger.json @@ -2,7 +2,7 @@ "schemes": [], "swagger": "2.0", "info": { - "description": "基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档\n添加qq群: 521386980 进入技术交流群 请先star,谢谢!", + "description": "基于Gin + Vue + Element UI的前后端分离权限管理系统的接口文档", "title": "go-admin API", "contact": {}, "license": { @@ -81,6 +81,540 @@ } } }, + "/api/v1/contract-template": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取合同模版列表", + "tags": [ + "合同模版" + ], + "summary": "获取合同模版列表", + "parameters": [ + { + "type": "string", + "description": "合同类型", + "name": "contractType", + "in": "query" + }, + { + "type": "string", + "description": "合同模版名称", + "name": "templateName", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.Page" + }, + { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/go-admin_app_admin_models.ContractTemplate" + } + } + } + } + ] + } + } + } + ] + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "创建合同模版(文件必填)", + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "合同模版" + ], + "summary": "创建合同模版", + "parameters": [ + { + "type": "string", + "description": "合同类型", + "name": "contractType", + "in": "formData", + "required": true + }, + { + "type": "string", + "description": "合同模版名称", + "name": "templateName", + "in": "formData", + "required": true + }, + { + "type": "string", + "format": "date", + "description": "发布日期", + "name": "publishDate", + "in": "formData", + "required": true + }, + { + "type": "file", + "description": "模版文件", + "name": "file", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"创建成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除合同模版", + "tags": [ + "合同模版" + ], + "summary": "删除合同模版", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ContractTemplateDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/contract-template/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取合同模版", + "tags": [ + "合同模版" + ], + "summary": "获取合同模版", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/go-admin_app_admin_models.ContractTemplate" + } + } + } + ] + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改合同模版(文件可选)", + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "合同模版" + ], + "summary": "修改合同模版", + "parameters": [ + { + "type": "integer", + "description": "合同模版ID", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "合同类型", + "name": "contractType", + "in": "formData" + }, + { + "type": "string", + "description": "合同模版名称", + "name": "templateName", + "in": "formData" + }, + { + "type": "string", + "format": "date", + "description": "发布日期", + "name": "publishDate", + "in": "formData" + }, + { + "type": "file", + "description": "模版文件", + "name": "file", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"修改成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/contract-template/{id}/file": { + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "上传新的合同模版文件替换旧的", + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "合同模版" + ], + "summary": "更新合同模版文件", + "parameters": [ + { + "type": "integer", + "description": "合同模版ID", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "file", + "description": "模版文件", + "name": "file", + "in": "formData", + "required": true + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"文件更新成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/customer": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取客户管理列表", + "tags": [ + "客户管理" + ], + "summary": "获取客户管理列表", + "parameters": [ + { + "type": "string", + "description": "客户名称", + "name": "customerName", + "in": "query" + }, + { + "type": "string", + "description": "客户类型", + "name": "customerType", + "in": "query" + }, + { + "type": "string", + "description": "客户状态", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "省份", + "name": "province", + "in": "query" + }, + { + "type": "string", + "description": "地市", + "name": "city", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.Page" + }, + { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/go-admin_app_admin_models.Customer" + } + } + } + } + ] + } + } + } + ] + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "创建客户管理", + "consumes": [ + "application/json" + ], + "tags": [ + "客户管理" + ], + "summary": "创建客户管理", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CustomerControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"创建成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除客户管理", + "tags": [ + "客户管理" + ], + "summary": "删除客户管理", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CustomerDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/customer/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取客户管理", + "tags": [ + "客户管理" + ], + "summary": "获取客户管理", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/go-admin_app_admin_models.Customer" + } + } + } + ] + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改客户管理", + "consumes": [ + "application/json" + ], + "tags": [ + "客户管理" + ], + "summary": "修改客户管理", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.CustomerControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"修改成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, "/api/v1/db/columns/page": { "get": { "description": "数据库表列分页列表 / database table column page list", @@ -811,6 +1345,228 @@ } } }, + "/api/v1/inventory-alert-config": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取库存报警配置列表", + "tags": [ + "库存报警配置" + ], + "summary": "获取库存报警配置列表", + "parameters": [ + { + "type": "string", + "description": "报警类别", + "name": "alertType", + "in": "query" + }, + { + "type": "string", + "description": "报警级别", + "name": "alertLevel", + "in": "query" + }, + { + "type": "string", + "description": "配置状态", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.Page" + }, + { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/go-admin_app_admin_models.InventoryAlertConfig" + } + } + } + } + ] + } + } + } + ] + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "创建库存报警配置", + "consumes": [ + "application/json" + ], + "tags": [ + "库存报警配置" + ], + "summary": "创建库存报警配置", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.InventoryAlertConfigControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"创建成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除库存报警配置", + "tags": [ + "库存报警配置" + ], + "summary": "删除库存报警配置", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.InventoryAlertConfigDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/inventory-alert-config/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取库存报警配置", + "tags": [ + "库存报警配置" + ], + "summary": "获取库存报警配置", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/go-admin_app_admin_models.InventoryAlertConfig" + } + } + } + ] + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改库存报警配置", + "consumes": [ + "application/json" + ], + "tags": [ + "库存报警配置" + ], + "summary": "修改库存报警配置", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.InventoryAlertConfigControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"修改成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, "/api/v1/login": { "post": { "description": "获取token\nLoginHandler can be used by clients to get a jwt token.\nPayload needs to be json in the form of {\"username\": \"USERNAME\", \"password\": \"PASSWORD\"}.\nReply will be of the form {\"token\": \"TOKEN\"}.\ndev mode:It should be noted that all fields cannot be empty, and a value of 0 can be passed in addition to the account password\n注意:开发模式:需要注意全部字段不能为空,账号密码外可以传入0值", @@ -1244,6 +2000,666 @@ } } }, + "/api/v1/price-index": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取价格指标列表", + "tags": [ + "价格指标" + ], + "summary": "获取价格指标列表", + "parameters": [ + { + "type": "string", + "description": "指标类型", + "name": "indexType", + "in": "query" + }, + { + "type": "string", + "description": "发布日期", + "name": "publishDate", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.Page" + }, + { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/go-admin_app_admin_models.PriceIndex" + } + } + } + } + ] + } + } + } + ] + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "创建价格指标", + "consumes": [ + "application/json" + ], + "tags": [ + "价格指标" + ], + "summary": "创建价格指标", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PriceIndexControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"创建成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除价格指标", + "tags": [ + "价格指标" + ], + "summary": "删除价格指标", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PriceIndexDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/price-index/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取价格指标", + "tags": [ + "价格指标" + ], + "summary": "获取价格指标", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/go-admin_app_admin_models.PriceIndex" + } + } + } + ] + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改价格指标", + "consumes": [ + "application/json" + ], + "tags": [ + "价格指标" + ], + "summary": "修改价格指标", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.PriceIndexControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"修改成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/product": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取商品列表", + "tags": [ + "商品" + ], + "summary": "获取商品列表", + "parameters": [ + { + "type": "string", + "description": "商品编码", + "name": "productCode", + "in": "query" + }, + { + "type": "string", + "description": "商品名称", + "name": "productName", + "in": "query" + }, + { + "type": "integer", + "description": "商品类别ID", + "name": "categoryId", + "in": "query" + }, + { + "type": "string", + "description": "商品状态", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.Page" + }, + { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/go-admin_app_admin_models.Product" + } + } + } + } + ] + } + } + } + ] + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "创建商品", + "consumes": [ + "application/json" + ], + "tags": [ + "商品" + ], + "summary": "创建商品", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ProductControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"创建成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除商品", + "tags": [ + "商品" + ], + "summary": "删除商品", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ProductDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/product-category": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取商品类别列表", + "tags": [ + "商品类别" + ], + "summary": "获取商品类别列表", + "parameters": [ + { + "type": "string", + "description": "类别编码", + "name": "categoryCode", + "in": "query" + }, + { + "type": "string", + "description": "类别名称", + "name": "categoryName", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.Page" + }, + { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/go-admin_app_admin_models.ProductCategory" + } + } + } + } + ] + } + } + } + ] + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "创建商品类别", + "consumes": [ + "application/json" + ], + "tags": [ + "商品类别" + ], + "summary": "创建商品类别", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ProductCategoryControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"创建成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除商品类别", + "tags": [ + "商品类别" + ], + "summary": "删除商品类别", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ProductCategoryDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/product-category/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取商品类别", + "tags": [ + "商品类别" + ], + "summary": "获取商品类别", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/go-admin_app_admin_models.ProductCategory" + } + } + } + ] + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改商品类别", + "consumes": [ + "application/json" + ], + "tags": [ + "商品类别" + ], + "summary": "修改商品类别", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ProductCategoryControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"修改成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/product/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取商品", + "tags": [ + "商品" + ], + "summary": "获取商品", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/go-admin_app_admin_models.Product" + } + } + } + ] + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改商品", + "consumes": [ + "application/json" + ], + "tags": [ + "商品" + ], + "summary": "修改商品", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.ProductControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"修改成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, "/api/v1/public/uploadFile": { "post": { "security": [ @@ -1504,28 +2920,6 @@ } } }, - "/api/v1/server-monitor": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "description": "获取JSON", - "tags": [ - "系统信息" - ], - "summary": "系统信息", - "responses": { - "200": { - "description": "{\"code\": 200, \"data\": [...]}", - "schema": { - "$ref": "#/definitions/response.Response" - } - } - } - } - }, "/api/v1/set-config": { "get": { "security": [ @@ -1601,6 +2995,240 @@ } } }, + "/api/v1/supplier": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取供应商管理列表", + "tags": [ + "供应商管理" + ], + "summary": "获取供应商管理列表", + "parameters": [ + { + "type": "string", + "description": "供应商名称", + "name": "supplierName", + "in": "query" + }, + { + "type": "string", + "description": "供应商类型", + "name": "supplierType", + "in": "query" + }, + { + "type": "string", + "description": "供应商状态", + "name": "status", + "in": "query" + }, + { + "type": "string", + "description": "省份", + "name": "province", + "in": "query" + }, + { + "type": "string", + "description": "地市", + "name": "city", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.Page" + }, + { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/go-admin_app_admin_models.Supplier" + } + } + } + } + ] + } + } + } + ] + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "创建供应商管理", + "consumes": [ + "application/json" + ], + "tags": [ + "供应商管理" + ], + "summary": "创建供应商管理", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SupplierControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"创建成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除供应商管理", + "tags": [ + "供应商管理" + ], + "summary": "删除供应商管理", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SupplierDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/supplier/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取供应商管理", + "tags": [ + "供应商管理" + ], + "summary": "获取供应商管理", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/go-admin_app_admin_models.Supplier" + } + } + } + ] + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改供应商管理", + "consumes": [ + "application/json" + ], + "tags": [ + "供应商管理" + ], + "summary": "修改供应商管理", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.SupplierControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"修改成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, "/api/v1/sys-api": { "get": { "security": [ @@ -1673,7 +3301,7 @@ "list": { "type": "array", "items": { - "$ref": "#/definitions/models.SysApi" + "$ref": "#/definitions/go-admin_app_admin_models.SysApi" } } } @@ -1751,7 +3379,7 @@ "type": "object", "properties": { "data": { - "$ref": "#/definitions/models.SysApi" + "$ref": "#/definitions/go-admin_app_admin_models.SysApi" } } } @@ -1867,7 +3495,7 @@ "list": { "type": "array", "items": { - "$ref": "#/definitions/models.SysApi" + "$ref": "#/definitions/go-admin_app_admin_models.SysApi" } } } @@ -2760,6 +4388,468 @@ } } }, + "/api/v1/warehouse": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取仓库管理列表", + "tags": [ + "仓库管理" + ], + "summary": "获取仓库管理列表", + "parameters": [ + { + "type": "string", + "description": "仓库编码", + "name": "warehouseCode", + "in": "query" + }, + { + "type": "string", + "description": "仓库名称", + "name": "warehouseName", + "in": "query" + }, + { + "type": "string", + "description": "省份", + "name": "province", + "in": "query" + }, + { + "type": "string", + "description": "地市", + "name": "city", + "in": "query" + }, + { + "type": "string", + "description": "状态", + "name": "status", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.Page" + }, + { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/go-admin_app_admin_models.Warehouse" + } + } + } + } + ] + } + } + } + ] + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "创建仓库管理", + "consumes": [ + "application/json" + ], + "tags": [ + "仓库管理" + ], + "summary": "创建仓库管理", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.WarehouseControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"创建成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除仓库管理", + "tags": [ + "仓库管理" + ], + "summary": "删除仓库管理", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.WarehouseDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/warehouse-stock": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取仓库垛位列表", + "tags": [ + "仓库垛位" + ], + "summary": "获取仓库垛位列表", + "parameters": [ + { + "type": "integer", + "description": "仓库ID", + "name": "warehouseId", + "in": "query" + }, + { + "type": "string", + "description": "垛位编码", + "name": "stockCode", + "in": "query" + }, + { + "type": "string", + "description": "垛位名称", + "name": "stockName", + "in": "query" + }, + { + "type": "string", + "description": "垛位状态", + "name": "stockStatus", + "in": "query" + }, + { + "type": "integer", + "description": "页条数", + "name": "pageSize", + "in": "query" + }, + { + "type": "integer", + "description": "页码", + "name": "pageIndex", + "in": "query" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/definitions/response.Page" + }, + { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "$ref": "#/definitions/go-admin_app_admin_models.WarehouseStock" + } + } + } + } + ] + } + } + } + ] + } + } + } + }, + "post": { + "security": [ + { + "Bearer": [] + } + ], + "description": "创建仓库垛位", + "consumes": [ + "application/json" + ], + "tags": [ + "仓库垛位" + ], + "summary": "创建仓库垛位", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.WarehouseStockControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"创建成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + }, + "delete": { + "security": [ + { + "Bearer": [] + } + ], + "description": "删除仓库垛位", + "tags": [ + "仓库垛位" + ], + "summary": "删除仓库垛位", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.WarehouseStockDeleteReq" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"删除成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/warehouse-stock/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取仓库垛位", + "tags": [ + "仓库垛位" + ], + "summary": "获取仓库垛位", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/go-admin_app_admin_models.WarehouseStock" + } + } + } + ] + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改仓库垛位", + "consumes": [ + "application/json" + ], + "tags": [ + "仓库垛位" + ], + "summary": "修改仓库垛位", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.WarehouseStockControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"修改成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, + "/api/v1/warehouse/{id}": { + "get": { + "security": [ + { + "Bearer": [] + } + ], + "description": "获取仓库管理", + "tags": [ + "仓库管理" + ], + "summary": "获取仓库管理", + "parameters": [ + { + "type": "string", + "description": "id", + "name": "id", + "in": "path" + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"data\": [...]}", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/response.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/go-admin_app_admin_models.Warehouse" + } + } + } + ] + } + } + } + }, + "put": { + "security": [ + { + "Bearer": [] + } + ], + "description": "修改仓库管理", + "consumes": [ + "application/json" + ], + "tags": [ + "仓库管理" + ], + "summary": "修改仓库管理", + "parameters": [ + { + "description": "body", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/dto.WarehouseControl" + } + } + ], + "responses": { + "200": { + "description": "{\"code\": 200, \"message\": \"修改成功\"}", + "schema": { + "$ref": "#/definitions/response.Response" + } + } + } + } + }, "/logout": { "post": { "security": [ @@ -2784,6 +4874,120 @@ } }, "definitions": { + "dto.ContractTemplateDeleteReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.CustomerControl": { + "type": "object", + "required": [ + "customerName", + "customerType", + "status" + ], + "properties": { + "bankAccount": { + "description": "银行账户", + "type": "string" + }, + "bankName": { + "description": "开户行", + "type": "string" + }, + "city": { + "description": "地市", + "type": "string" + }, + "contactPerson": { + "description": "联系人", + "type": "string" + }, + "createBy": { + "type": "integer" + }, + "customerName": { + "description": "客户名称", + "type": "string" + }, + "customerType": { + "description": "客户类型(发电厂、炼钢厂等)", + "type": "string" + }, + "detailAddress": { + "description": "详细地址", + "type": "string" + }, + "district": { + "description": "区县", + "type": "string" + }, + "email": { + "description": "邮箱", + "type": "string" + }, + "id": { + "description": "编码", + "type": "integer" + }, + "mobilePhone": { + "description": "手机号", + "type": "string" + }, + "province": { + "description": "省份", + "type": "string" + }, + "registerAddress": { + "description": "注册地址", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "status": { + "description": "客户状态(启用、禁用)", + "type": "string" + }, + "taxNumber": { + "description": "税号", + "type": "string" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.CustomerDeleteReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "updateBy": { + "type": "integer" + } + } + }, "dto.GetSetSysConfigReq": { "type": "object", "properties": { @@ -2795,6 +4999,58 @@ } } }, + "dto.InventoryAlertConfigControl": { + "type": "object", + "properties": { + "alertLevel": { + "description": "报警级别(高、中、低)", + "type": "string" + }, + "alertType": { + "description": "报警类别(库存不足、库存积压)", + "type": "string" + }, + "createBy": { + "type": "integer" + }, + "id": { + "description": "编码", + "type": "integer" + }, + "remark": { + "description": "备注说明", + "type": "string" + }, + "status": { + "description": "配置状态(启用、禁用)", + "type": "string" + }, + "threshold": { + "description": "阀值(吨)", + "type": "number" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.InventoryAlertConfigDeleteReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "updateBy": { + "type": "integer" + } + } + }, "dto.PassWord": { "type": "object", "properties": { @@ -2806,6 +5062,189 @@ } } }, + "dto.PriceIndexControl": { + "type": "object", + "required": [ + "indexType", + "price", + "publishDate" + ], + "properties": { + "createBy": { + "type": "integer" + }, + "heatValue": { + "description": "热值", + "type": "number" + }, + "id": { + "description": "编码", + "type": "integer" + }, + "indexType": { + "description": "指标类型(CCI价、神华外购石炭价、神华外购价)", + "type": "string" + }, + "price": { + "description": "价格", + "type": "number" + }, + "publishDate": { + "description": "发布日期", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "unit": { + "description": "单位(默认 元/吨)", + "type": "string" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.PriceIndexDeleteReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.ProductCategoryControl": { + "type": "object", + "required": [ + "categoryCode", + "categoryName" + ], + "properties": { + "categoryCode": { + "description": "类别编码", + "type": "string" + }, + "categoryName": { + "description": "类别名称", + "type": "string" + }, + "createBy": { + "type": "integer" + }, + "id": { + "description": "编码", + "type": "integer" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.ProductCategoryDeleteReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.ProductControl": { + "type": "object", + "required": [ + "categoryId", + "productCode", + "productName", + "status" + ], + "properties": { + "categoryId": { + "description": "商品类别(商品类别表id)", + "type": "integer" + }, + "createBy": { + "type": "integer" + }, + "heatValueLower": { + "description": "热值区间下限", + "type": "number" + }, + "heatValueUpper": { + "description": "热值区间上限", + "type": "number" + }, + "id": { + "description": "编码", + "type": "integer" + }, + "productCode": { + "description": "商品编码", + "type": "string" + }, + "productName": { + "description": "商品名称", + "type": "string" + }, + "specification": { + "description": "规格型号", + "type": "string" + }, + "standardHeatValue": { + "description": "标准热值", + "type": "number" + }, + "status": { + "description": "商品状态(启用、禁用)", + "type": "string" + }, + "unit": { + "description": "商品单位(默认吨)", + "type": "string" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.ProductDeleteReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "updateBy": { + "type": "integer" + } + } + }, "dto.ResetSysUserPwdReq": { "type": "object", "properties": { @@ -2845,6 +5284,111 @@ } } }, + "dto.SupplierControl": { + "type": "object", + "required": [ + "status", + "supplierName", + "supplierType" + ], + "properties": { + "bankAccount": { + "description": "银行账户", + "type": "string" + }, + "bankName": { + "description": "开户行", + "type": "string" + }, + "businessLicense": { + "description": "营业执照图片", + "type": "string" + }, + "city": { + "description": "地市", + "type": "string" + }, + "contactPerson": { + "description": "联系人", + "type": "string" + }, + "createBy": { + "type": "integer" + }, + "detailAddress": { + "description": "详细地址", + "type": "string" + }, + "district": { + "description": "区县", + "type": "string" + }, + "email": { + "description": "邮箱", + "type": "string" + }, + "id": { + "description": "编码", + "type": "integer" + }, + "mobilePhone": { + "description": "手机号", + "type": "string" + }, + "otherCertificates": { + "description": "其它资质材料", + "type": "string" + }, + "province": { + "description": "省份", + "type": "string" + }, + "registerAddress": { + "description": "注册地址", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "status": { + "description": "供应商状态(启用、禁用)", + "type": "string" + }, + "supplierName": { + "description": "供应商名称", + "type": "string" + }, + "supplierType": { + "description": "供应商类型(煤贸商、煤矿等)", + "type": "string" + }, + "taxNumber": { + "description": "税号", + "type": "string" + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.SupplierDeleteReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "updateBy": { + "type": "integer" + } + } + }, "dto.SysApiDeleteReq": { "type": "object", "properties": { @@ -3035,17 +5579,11 @@ "dto.SysDictDataDeleteReq": { "type": "object", "properties": { - "createBy": { - "type": "integer" - }, "ids": { "type": "array", "items": { "type": "integer" } - }, - "updateBy": { - "type": "integer" } } }, @@ -3313,7 +5851,7 @@ "sysApi": { "type": "array", "items": { - "$ref": "#/definitions/models.SysApi" + "$ref": "#/definitions/go-admin_app_admin_models.SysApi" } }, "title": { @@ -3400,7 +5938,7 @@ "sysApi": { "type": "array", "items": { - "$ref": "#/definitions/models.SysApi" + "$ref": "#/definitions/go-admin_app_admin_models.SysApi" } }, "title": { @@ -3568,13 +6106,13 @@ "sysDept": { "type": "array", "items": { - "$ref": "#/definitions/models.SysDept" + "$ref": "#/definitions/go-admin_app_admin_models.SysDept" } }, "sysMenu": { "type": "array", "items": { - "$ref": "#/definitions/models.SysMenu" + "$ref": "#/definitions/go-admin_app_admin_models.SysMenu" } }, "updateBy": { @@ -3637,13 +6175,13 @@ "sysDept": { "type": "array", "items": { - "$ref": "#/definitions/models.SysDept" + "$ref": "#/definitions/go-admin_app_admin_models.SysDept" } }, "sysMenu": { "type": "array", "items": { - "$ref": "#/definitions/models.SysMenu" + "$ref": "#/definitions/go-admin_app_admin_models.SysMenu" } }, "updateBy": { @@ -3789,30 +6327,535 @@ } } }, - "handler.Login": { + "dto.WarehouseControl": { "type": "object", "required": [ - "code", - "password", - "username", - "uuid" + "status", + "warehouseCode", + "warehouseName" ], "properties": { - "code": { + "city": { + "description": "地市", "type": "string" }, - "password": { + "contactPerson": { + "description": "联系人", "type": "string" }, - "username": { + "contactPhone": { + "description": "联系电话", "type": "string" }, - "uuid": { + "createBy": { + "type": "integer" + }, + "detailAddress": { + "description": "详细地址", + "type": "string" + }, + "district": { + "description": "区县", + "type": "string" + }, + "id": { + "description": "编码", + "type": "integer" + }, + "province": { + "description": "省份", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "status": { + "description": "状态(启用、禁用)", + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "warehouseCode": { + "description": "仓库编码", + "type": "string" + }, + "warehouseName": { + "description": "仓库名称", "type": "string" } } }, - "models.SysApi": { + "dto.WarehouseDeleteReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "updateBy": { + "type": "integer" + } + } + }, + "dto.WarehouseStockControl": { + "type": "object", + "required": [ + "stockCapacity", + "stockCode", + "stockName", + "stockStatus", + "warehouseId" + ], + "properties": { + "createBy": { + "type": "integer" + }, + "id": { + "description": "编码", + "type": "integer" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "stockCapacity": { + "description": "垛位容量", + "type": "number" + }, + "stockCode": { + "description": "垛位编码", + "type": "string" + }, + "stockInventory": { + "description": "垛位库存(非必填,默认为0)", + "type": "number" + }, + "stockName": { + "description": "垛位名称", + "type": "string" + }, + "stockStatus": { + "description": "垛位状态(有货、无货)", + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "warehouseId": { + "description": "仓库ID", + "type": "integer" + } + } + }, + "dto.WarehouseStockDeleteReq": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "updateBy": { + "type": "integer" + } + } + }, + "go-admin_app_admin_models.ContractTemplate": { + "type": "object", + "properties": { + "contractType": { + "description": "合同类型(采购合同、销售合同)", + "type": "string" + }, + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "publishDate": { + "description": "发布日期", + "type": "string" + }, + "templateFile": { + "description": "模版文件(保存上传后的文件相对路径)", + "type": "string" + }, + "templateName": { + "description": "合同模版名称", + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + } + } + }, + "go-admin_app_admin_models.Customer": { + "type": "object", + "properties": { + "bankAccount": { + "description": "银行账户", + "type": "string" + }, + "bankName": { + "description": "开户行", + "type": "string" + }, + "city": { + "description": "地市", + "type": "string" + }, + "contactPerson": { + "description": "联系人", + "type": "string" + }, + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "customerName": { + "description": "客户名称", + "type": "string" + }, + "customerType": { + "description": "客户类型(发电厂、炼钢厂等)", + "type": "string" + }, + "detailAddress": { + "description": "详细地址", + "type": "string" + }, + "district": { + "description": "区县", + "type": "string" + }, + "email": { + "description": "邮箱", + "type": "string" + }, + "id": { + "type": "integer" + }, + "mobilePhone": { + "description": "手机号", + "type": "string" + }, + "province": { + "description": "省份", + "type": "string" + }, + "registerAddress": { + "description": "注册地址", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "status": { + "description": "客户状态(启用、禁用)", + "type": "string" + }, + "taxNumber": { + "description": "税号", + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + } + } + }, + "go-admin_app_admin_models.InventoryAlertConfig": { + "type": "object", + "properties": { + "alertLevel": { + "description": "报警级别(高、中、低)", + "type": "string" + }, + "alertType": { + "description": "报警类别(库存不足、库存积压)", + "type": "string" + }, + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "remark": { + "description": "备注说明", + "type": "string" + }, + "status": { + "description": "配置状态(启用、禁用)", + "type": "string" + }, + "threshold": { + "description": "阀值(吨)", + "type": "number" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + } + } + }, + "go-admin_app_admin_models.PriceIndex": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "heatValue": { + "description": "热值", + "type": "number" + }, + "id": { + "type": "integer" + }, + "indexType": { + "description": "指标类型(CCI价、神华外购石炭价、神华外购价)", + "type": "string" + }, + "price": { + "description": "价格", + "type": "number" + }, + "publishDate": { + "description": "发布日期", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "unit": { + "description": "单位(默认 元/吨)", + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + } + } + }, + "go-admin_app_admin_models.Product": { + "type": "object", + "properties": { + "categoryId": { + "description": "商品类别(商品类别表id)", + "type": "integer" + }, + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "heatValueLower": { + "description": "热值区间下限", + "type": "number" + }, + "heatValueUpper": { + "description": "热值区间上限", + "type": "number" + }, + "id": { + "type": "integer" + }, + "productCategory": { + "description": "关联商品类别", + "allOf": [ + { + "$ref": "#/definitions/go-admin_app_admin_models.ProductCategory" + } + ] + }, + "productCode": { + "description": "商品编码", + "type": "string" + }, + "productName": { + "description": "商品名称", + "type": "string" + }, + "specification": { + "description": "规格型号", + "type": "string" + }, + "standardHeatValue": { + "description": "标准热值", + "type": "number" + }, + "status": { + "description": "商品状态(启用、禁用)", + "type": "string" + }, + "unit": { + "description": "商品单位(默认吨)", + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + } + } + }, + "go-admin_app_admin_models.ProductCategory": { + "type": "object", + "properties": { + "categoryCode": { + "description": "类别编码", + "type": "string" + }, + "categoryName": { + "description": "类别名称", + "type": "string" + }, + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + } + } + }, + "go-admin_app_admin_models.Supplier": { + "type": "object", + "properties": { + "bankAccount": { + "description": "银行账户", + "type": "string" + }, + "bankName": { + "description": "开户行", + "type": "string" + }, + "businessLicense": { + "description": "营业执照图片", + "type": "string" + }, + "city": { + "description": "地市", + "type": "string" + }, + "contactPerson": { + "description": "联系人", + "type": "string" + }, + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "detailAddress": { + "description": "详细地址", + "type": "string" + }, + "district": { + "description": "区县", + "type": "string" + }, + "email": { + "description": "邮箱", + "type": "string" + }, + "id": { + "type": "integer" + }, + "mobilePhone": { + "description": "手机号", + "type": "string" + }, + "otherCertificates": { + "description": "其它资质材料", + "type": "string" + }, + "province": { + "description": "省份", + "type": "string" + }, + "registerAddress": { + "description": "注册地址", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "status": { + "description": "供应商状态(启用、禁用)", + "type": "string" + }, + "supplierName": { + "description": "供应商名称", + "type": "string" + }, + "supplierType": { + "description": "供应商类型(煤贸商、煤矿等)", + "type": "string" + }, + "taxNumber": { + "description": "税号", + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + } + } + }, + "go-admin_app_admin_models.SysApi": { "type": "object", "properties": { "action": { @@ -3847,7 +6890,7 @@ } } }, - "models.SysConfig": { + "go-admin_app_admin_models.SysConfig": { "type": "object", "properties": { "configKey": { @@ -3885,13 +6928,13 @@ } } }, - "models.SysDept": { + "go-admin_app_admin_models.SysDept": { "type": "object", "properties": { "children": { "type": "array", "items": { - "$ref": "#/definitions/models.SysDept" + "$ref": "#/definitions/go-admin_app_admin_models.SysDept" } }, "createBy": { @@ -3949,7 +6992,7 @@ } } }, - "models.SysMenu": { + "go-admin_app_admin_models.SysMenu": { "type": "object", "properties": { "action": { @@ -3967,7 +7010,7 @@ "children": { "type": "array", "items": { - "$ref": "#/definitions/models.SysMenu" + "$ref": "#/definitions/go-admin_app_admin_models.SysMenu" } }, "component": { @@ -4027,7 +7070,7 @@ "sysApi": { "type": "array", "items": { - "$ref": "#/definitions/models.SysApi" + "$ref": "#/definitions/go-admin_app_admin_models.SysApi" } }, "title": { @@ -4044,6 +7087,145 @@ } } }, + "go-admin_app_admin_models.Warehouse": { + "type": "object", + "properties": { + "city": { + "description": "地市", + "type": "string" + }, + "contactPerson": { + "description": "联系人", + "type": "string" + }, + "contactPhone": { + "description": "联系电话", + "type": "string" + }, + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "detailAddress": { + "description": "详细地址", + "type": "string" + }, + "district": { + "description": "区县", + "type": "string" + }, + "id": { + "type": "integer" + }, + "province": { + "description": "省份", + "type": "string" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "status": { + "description": "状态(启用、禁用)", + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "warehouseCode": { + "description": "仓库编码", + "type": "string" + }, + "warehouseName": { + "description": "仓库名称", + "type": "string" + } + } + }, + "go-admin_app_admin_models.WarehouseStock": { + "type": "object", + "properties": { + "createBy": { + "type": "integer" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "remark": { + "description": "备注", + "type": "string" + }, + "stockCapacity": { + "description": "垛位容量", + "type": "number" + }, + "stockCode": { + "description": "垛位编码", + "type": "string" + }, + "stockInventory": { + "description": "垛位库存", + "type": "number" + }, + "stockName": { + "description": "垛位名称", + "type": "string" + }, + "stockStatus": { + "description": "垛位状态(有货、无货)", + "type": "string" + }, + "updateBy": { + "type": "integer" + }, + "updatedAt": { + "type": "string" + }, + "warehouse": { + "description": "关联仓库", + "allOf": [ + { + "$ref": "#/definitions/go-admin_app_admin_models.Warehouse" + } + ] + }, + "warehouseId": { + "description": "仓库ID", + "type": "integer" + } + } + }, + "handler.Login": { + "type": "object", + "required": [ + "code", + "password", + "username", + "uuid" + ], + "properties": { + "code": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + }, + "uuid": { + "type": "string" + } + } + }, "response.Page": { "type": "object", "properties": { @@ -4111,9 +7293,6 @@ "createdAt": { "type": "string" }, - "deletedAt": { - "type": "string" - }, "dictType": { "type": "string" }, @@ -4246,9 +7425,6 @@ "dataScope": { "type": "string" }, - "deletedAt": { - "type": "string" - }, "functionAuthor": { "description": "功能作者", "type": "string" diff --git a/src/api/contractTemplate.js b/src/api/contractTemplate.js new file mode 100644 index 0000000..1fa74b7 --- /dev/null +++ b/src/api/contractTemplate.js @@ -0,0 +1,100 @@ +import request from '@/utils/request' + +// 合同模板列表 +export function listContractTemplates(query) { + return request({ + url: '/api/v1/contract-template', + method: 'get', + params: { + contractType: query.contractType, + templateName: query.templateName, + pageSize: query.pageSize, + pageIndex: query.pageNum + } + }) +} + +// 获取单个合同模板详情 +export function getContractTemplate(id) { + return request({ + url: `/api/v1/contract-template/${id}`, + method: 'get' + }) +} + +// 新增合同模板(文件必填) +export function createContractTemplate(data) { + const formData = new FormData() + formData.append('contractType', data.contractType) + formData.append('templateName', data.templateName) + formData.append('publishDate', data.publishDate) + if (data.file) { + formData.append('file', data.file) + } + + return request({ + url: '/api/v1/contract-template', + method: 'post', + data: formData, + headers: { + 'Content-Type': 'multipart/form-data', + repeatSubmit: false + } + }) +} + +// 修改合同模板(文件可选) +export function updateContractTemplate(data) { + const formData = new FormData() + if (data.contractType) { + formData.append('contractType', data.contractType) + } + if (data.templateName) { + formData.append('templateName', data.templateName) + } + if (data.publishDate) { + formData.append('publishDate', data.publishDate) + } + if (data.file) { + formData.append('file', data.file) + } + + return request({ + url: `/api/v1/contract-template/${data.id}`, + method: 'put', + data: formData, + headers: { + 'Content-Type': 'multipart/form-data', + repeatSubmit: false + } + }) +} + +// 仅更新模板文件 +export function updateContractTemplateFile(id, file) { + const formData = new FormData() + formData.append('file', file) + + return request({ + url: `/api/v1/contract-template/${id}/file`, + method: 'post', + data: formData, + headers: { + 'Content-Type': 'multipart/form-data', + repeatSubmit: false + } + }) +} + +// 删除合同模板(支持批量) +export function deleteContractTemplates(ids) { + return request({ + url: '/api/v1/contract-template', + method: 'delete', + data: { + ids + } + }) +} + + diff --git a/src/router/index.js b/src/router/index.js index a7f18f6..e542553 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -86,25 +86,7 @@ export const constantRoutes = [ ] }, // ==================== 采购管理 ==================== - { - path: '/purchase', - component: Layout, - redirect: 'noRedirect', - alwaysShow: true, - name: 'Purchase', - meta: { - title: '采购管理', - icon: 'shopping' - }, - children: [ - { - path: 'task-management', - component: () => import('@/views/purchase/task-management'), - name: 'PurchaseTaskManagement', - meta: { title: '采购任务管理', icon: 'list' } - } - ] - }, + // { // path: '/purchase', // component: Layout, @@ -116,6 +98,12 @@ export const constantRoutes = [ // icon: 'shopping' // }, // children: [ + // { + // path: 'task-management', + // component: () => import('@/views/purchase/task-management'), + // name: 'PurchaseTaskManagement', + // meta: { title: '采购任务管理', icon: 'list' } + // } // { // path: 'order-list', // component: () => import('@/views/purchase/order-list'), diff --git a/src/views/base/contract-template.vue b/src/views/base/contract-template.vue index 74e87b8..c9da573 100644 --- a/src/views/base/contract-template.vue +++ b/src/views/base/contract-template.vue @@ -3,6 +3,14 @@
+ + + @@ -19,13 +27,13 @@
- - + + -
- - {{ templateForm.templateFile.name }} +
+ 当前文件: + + {{ getFileName(templateForm.templateFilePath) }}
+
+ 已选择新文件:{{ templateForm.file.name }} +