Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pmk-channel-vue
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
黄麒宇
pmk-channel-vue
Commits
b039d4b1
Commit
b039d4b1
authored
Jul 24, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交一下
parent
82ee9e25
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
4548 行增加
和
346 行删除
+4548
-346
default.md
default.md
+3237
-0
index.html
index.html
+20
-16
BasicData.vue
src/views/BasicData.vue
+285
-0
HomeView.vue
src/views/HomeView.vue
+125
-119
Setting copy.vue
src/views/Setting copy.vue
+226
-0
Setting.vue
src/views/Setting.vue
+655
-211
没有找到文件。
default.md
0 → 100644
View file @
b039d4b1
# 在线文档
**简介**
:在线文档
**HOST**
:192.168.3.130:10060
**联系人**
:
**Version**
:1.0
**接口路径**
:/v2/api-docs
[
TOC
]
# channel-bill-epc-log-controller
## deleteEpc
**接口地址**
:
`/log/deleteEpc`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"amount": 0,
"billNo": "",
"endTime": "",
"epc": "",
"goodsCode": "",
"goodsName": "",
"id": 0,
"modelCode": "",
"modelName": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"skuCode": "",
"sortBy": "",
"startTime": "",
"storeCode": "",
"type": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelBillEpcLogReq|ChannelBillEpcLogReq|
|
  
amount|||false|integer(int32)||
|
  
billNo|||false|string||
|
  
endTime|||false|string||
|
  
epc|||false|string||
|
  
goodsCode|||false|string||
|
  
goodsName|||false|string||
|
  
id|||false|integer(int64)||
|
  
modelCode|||false|string||
|
  
modelName|||false|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
skuCode|||false|string||
|
  
sortBy|||false|string||
|
  
startTime|||false|string||
|
  
storeCode|||true|string||
|
  
type|||false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## getLogPage
**接口地址**
:
`/log/getLogPage`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"amount": 0,
"billNo": "",
"endTime": "",
"epc": "",
"goodsCode": "",
"goodsName": "",
"id": 0,
"modelCode": "",
"modelName": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"skuCode": "",
"sortBy": "",
"startTime": "",
"storeCode": "",
"type": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelBillEpcLogReq|ChannelBillEpcLogReq|
|
  
amount|||false|integer(int32)||
|
  
billNo|||false|string||
|
  
endTime|||false|string||
|
  
epc|||false|string||
|
  
goodsCode|||false|string||
|
  
goodsName|||false|string||
|
  
id|||false|integer(int64)||
|
  
modelCode|||false|string||
|
  
modelName|||false|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
skuCode|||false|string||
|
  
sortBy|||false|string||
|
  
startTime|||false|string||
|
  
storeCode|||true|string||
|
  
type|||false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«PageResult«ChannelBillEpcLog»»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||PageResult«ChannelBillEpcLog»|PageResult«ChannelBillEpcLog»|
|
  
pageNo||integer(int64)||
|
  
pageSize||integer(int64)||
|
  
records||array|ChannelBillEpcLog|
|
    
billName||string||
|
    
billNo||string||
|
    
boxNum||integer||
|
    
createTime||string||
|
    
epc||string||
|
    
goodsCode||string||
|
    
goodsName||string||
|
    
id||integer||
|
    
modelCode||string||
|
    
modelName||string||
|
    
qty||integer||
|
    
skuCode||string||
|
    
stationId||integer||
|
    
storeCode||string||
|
    
subEpc||string||
|
    
type||string||
|
    
updateTime||string||
|
  
totalPage||integer(int32)||
|
  
totalRows||integer(int64)||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
{
"pageNo"
:
0
,
"pageSize"
:
0
,
"records"
:
[
{
"billName"
:
""
,
"billNo"
:
""
,
"boxNum"
:
0
,
"createTime"
:
""
,
"epc"
:
""
,
"goodsCode"
:
""
,
"goodsName"
:
""
,
"id"
:
0
,
"modelCode"
:
""
,
"modelName"
:
""
,
"qty"
:
0
,
"skuCode"
:
""
,
"stationId"
:
0
,
"storeCode"
:
""
,
"subEpc"
:
""
,
"type"
:
""
,
"updateTime"
:
""
}
],
"totalPage"
:
0
,
"totalRows"
:
0
},
"message"
:
""
,
"timestamp"
:
0
}
```
# channel-config-controller
## getConfig
**接口地址**
:
`/com/junmp/bi/config/getConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"id": 0,
"masterIp": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"serverIp": "",
"serverPort": "",
"sortBy": "",
"storeCode": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelConfigReq|ChannelConfigReq|
|
  
id|||true|integer(int64)||
|
  
masterIp|||true|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
serverIp|||true|string||
|
  
serverPort|||true|string||
|
  
sortBy|||false|string||
|
  
storeCode|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«List«ChannelConfig»»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||array|ChannelConfig|
|
  
id||integer(int64)||
|
  
masterIp||string||
|
  
serverIp||string||
|
  
serverPort||string||
|
  
storeCode||string||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
[
{
"id"
:
0
,
"masterIp"
:
""
,
"serverIp"
:
""
,
"serverPort"
:
""
,
"storeCode"
:
""
}
],
"message"
:
""
,
"timestamp"
:
0
}
```
## getConfigPage
**接口地址**
:
`/com/junmp/bi/config/getConfigPage`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"id": 0,
"masterIp": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"serverIp": "",
"serverPort": "",
"sortBy": "",
"storeCode": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelConfigReq|ChannelConfigReq|
|
  
id|||true|integer(int64)||
|
  
masterIp|||true|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
serverIp|||true|string||
|
  
serverPort|||true|string||
|
  
sortBy|||false|string||
|
  
storeCode|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«PageResult«ChannelConfig»»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||PageResult«ChannelConfig»|PageResult«ChannelConfig»|
|
  
pageNo||integer(int64)||
|
  
pageSize||integer(int64)||
|
  
records||array|ChannelConfig|
|
    
id||integer||
|
    
masterIp||string||
|
    
serverIp||string||
|
    
serverPort||string||
|
    
storeCode||string||
|
  
totalPage||integer(int32)||
|
  
totalRows||integer(int64)||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
{
"pageNo"
:
0
,
"pageSize"
:
0
,
"records"
:
[
{
"id"
:
0
,
"masterIp"
:
""
,
"serverIp"
:
""
,
"serverPort"
:
""
,
"storeCode"
:
""
}
],
"totalPage"
:
0
,
"totalRows"
:
0
},
"message"
:
""
,
"timestamp"
:
0
}
```
## getStoreCode
**接口地址**
:
`/com/junmp/bi/config/getStoreCode`
**请求方式**
:
`GET`
**请求数据类型**
:
`application/x-www-form-urlencoded`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求参数**
:
暂无
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«string»|
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||string||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
""
,
"message"
:
""
,
"timestamp"
:
0
}
```
## removeConfig
**接口地址**
:
`/com/junmp/bi/config/removeConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"id": 0,
"masterIp": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"serverIp": "",
"serverPort": "",
"sortBy": "",
"storeCode": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelConfigReq|ChannelConfigReq|
|
  
id|||true|integer(int64)||
|
  
masterIp|||true|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
serverIp|||true|string||
|
  
serverPort|||true|string||
|
  
sortBy|||false|string||
|
  
storeCode|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## saveConfig
**接口地址**
:
`/com/junmp/bi/config/saveConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"id": 0,
"masterIp": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"serverIp": "",
"serverPort": "",
"sortBy": "",
"storeCode": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelConfigReq|ChannelConfigReq|
|
  
id|||true|integer(int64)||
|
  
masterIp|||true|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
serverIp|||true|string||
|
  
serverPort|||true|string||
|
  
sortBy|||false|string||
|
  
storeCode|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## updateConfig
**接口地址**
:
`/com/junmp/bi/config/updateConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"id": 0,
"masterIp": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"serverIp": "",
"serverPort": "",
"sortBy": "",
"storeCode": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelConfigReq|ChannelConfigReq|
|
  
id|||true|integer(int64)||
|
  
masterIp|||true|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
serverIp|||true|string||
|
  
serverPort|||true|string||
|
  
sortBy|||false|string||
|
  
storeCode|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
# channel-error-controller
## getErrorList
**接口地址**
:
`/error/getErrorList`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"content": "",
"endTime": "",
"errorId": 0,
"handleFlag": 0,
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"sortBy": "",
"startTime": "",
"stationId": 0,
"storeCode": "",
"type": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelErrorReq|ChannelErrorReq|
|
  
content|||false|string||
|
  
endTime|||false|string||
|
  
errorId|||false|integer(int64)||
|
  
handleFlag|||false|integer(int32)||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
sortBy|||false|string||
|
  
startTime|||false|string||
|
  
stationId|||false|integer(int32)||
|
  
storeCode|||false|string||
|
  
type|||false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«List«ChannelError»»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||array|ChannelError|
|
  
content||string||
|
  
createTime||string||
|
  
errorId||integer(int64)||
|
  
handleFlag||integer(int32)||
|
  
stationId||integer(int32)||
|
  
storeCode||string||
|
  
type||string||
|
  
updateTime||string||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
[
{
"content"
:
""
,
"createTime"
:
""
,
"errorId"
:
0
,
"handleFlag"
:
0
,
"stationId"
:
0
,
"storeCode"
:
""
,
"type"
:
""
,
"updateTime"
:
""
}
],
"message"
:
""
,
"timestamp"
:
0
}
```
## getErrorPage
**接口地址**
:
`/error/getErrorPage`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"content": "",
"endTime": "",
"errorId": 0,
"handleFlag": 0,
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"sortBy": "",
"startTime": "",
"stationId": 0,
"storeCode": "",
"type": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelErrorReq|ChannelErrorReq|
|
  
content|||false|string||
|
  
endTime|||false|string||
|
  
errorId|||false|integer(int64)||
|
  
handleFlag|||false|integer(int32)||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
sortBy|||false|string||
|
  
startTime|||false|string||
|
  
stationId|||false|integer(int32)||
|
  
storeCode|||false|string||
|
  
type|||false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«PageResult«ChannelError»»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||PageResult«ChannelError»|PageResult«ChannelError»|
|
  
pageNo||integer(int64)||
|
  
pageSize||integer(int64)||
|
  
records||array|ChannelError|
|
    
content||string||
|
    
createTime||string||
|
    
errorId||integer||
|
    
handleFlag||integer||
|
    
stationId||integer||
|
    
storeCode||string||
|
    
type||string||
|
    
updateTime||string||
|
  
totalPage||integer(int32)||
|
  
totalRows||integer(int64)||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
{
"pageNo"
:
0
,
"pageSize"
:
0
,
"records"
:
[
{
"content"
:
""
,
"createTime"
:
""
,
"errorId"
:
0
,
"handleFlag"
:
0
,
"stationId"
:
0
,
"storeCode"
:
""
,
"type"
:
""
,
"updateTime"
:
""
}
],
"totalPage"
:
0
,
"totalRows"
:
0
},
"message"
:
""
,
"timestamp"
:
0
}
```
## removeError
**接口地址**
:
`/error/removeError`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"content": "",
"endTime": "",
"errorId": 0,
"handleFlag": 0,
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"sortBy": "",
"startTime": "",
"stationId": 0,
"storeCode": "",
"type": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelErrorReq|ChannelErrorReq|
|
  
content|||false|string||
|
  
endTime|||false|string||
|
  
errorId|||false|integer(int64)||
|
  
handleFlag|||false|integer(int32)||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
sortBy|||false|string||
|
  
startTime|||false|string||
|
  
stationId|||false|integer(int32)||
|
  
storeCode|||false|string||
|
  
type|||false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## updateError
**接口地址**
:
`/error/updateError`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"content": "",
"endTime": "",
"errorId": 0,
"handleFlag": 0,
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"searchBeginTime": "",
"searchEndTime": "",
"sortBy": "",
"startTime": "",
"stationId": 0,
"storeCode": "",
"type": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelErrorReq|ChannelErrorReq|
|
  
content|||false|string||
|
  
endTime|||false|string||
|
  
errorId|||false|integer(int64)||
|
  
handleFlag|||false|integer(int32)||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
sortBy|||false|string||
|
  
startTime|||false|string||
|
  
stationId|||false|integer(int32)||
|
  
storeCode|||false|string||
|
  
type|||false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
# device-controller
## getDevice
**接口地址**
:
`/device/getDevice`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"doubleCheck": 0,
"gpioIp": "",
"gpioPort": 0,
"id": 0,
"ledIp1": "",
"ledIp2": "",
"ledPort1": 0,
"ledPort2": 0,
"ledTitle": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"readerIp": "",
"readerPort": 0,
"readerPower": "",
"readerType": 0,
"searchBeginTime": "",
"searchEndTime": "",
"sortBy": "",
"stationId": 0,
"status": 0,
"storeCode": "",
"type": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelDeviceReq|ChannelDeviceReq|
|
  
doubleCheck|||false|integer(int32)||
|
  
gpioIp|||true|string||
|
  
gpioPort|||true|integer(int32)||
|
  
id|||true|integer(int64)||
|
  
ledIp1|||false|string||
|
  
ledIp2|||false|string||
|
  
ledPort1|||false|integer(int32)||
|
  
ledPort2|||false|integer(int32)||
|
  
ledTitle|||false|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
readerIp|||true|string||
|
  
readerPort|||true|integer(int32)||
|
  
readerPower|||true|string||
|
  
readerType|||true|integer(int32)||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
sortBy|||false|string||
|
  
stationId|||true|integer(int32)||
|
  
status|||false|integer(int32)||
|
  
storeCode|||true|string||
|
  
type|||false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«List«ChannelDevice»»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||array|ChannelDevice|
|
  
antList||string||
|
  
doubleCheck||integer(int32)||
|
  
gpioCount||integer(int32)||
|
  
id||integer(int64)||
|
  
ledIp1||string||
|
  
ledIp2||string||
|
  
ledPort1||integer(int32)||
|
  
ledPort2||integer(int32)||
|
  
ledTitle||string||
|
  
readerCount||integer(int32)||
|
  
readerIp||string||
|
  
readerType||string||
|
  
stationId||integer(int32)||
|
  
status||integer(int32)||
|
  
storeCode||string||
|
  
type||string||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
[
{
"antList"
:
""
,
"doubleCheck"
:
0
,
"gpioCount"
:
0
,
"id"
:
0
,
"ledIp1"
:
""
,
"ledIp2"
:
""
,
"ledPort1"
:
0
,
"ledPort2"
:
0
,
"ledTitle"
:
""
,
"readerCount"
:
0
,
"readerIp"
:
""
,
"readerType"
:
""
,
"stationId"
:
0
,
"status"
:
0
,
"storeCode"
:
""
,
"type"
:
""
}
],
"message"
:
""
,
"timestamp"
:
0
}
```
## removeDevice
**接口地址**
:
`/device/removeDevice`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"doubleCheck": 0,
"gpioIp": "",
"gpioPort": 0,
"id": 0,
"ledIp1": "",
"ledIp2": "",
"ledPort1": 0,
"ledPort2": 0,
"ledTitle": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"readerIp": "",
"readerPort": 0,
"readerPower": "",
"readerType": 0,
"searchBeginTime": "",
"searchEndTime": "",
"sortBy": "",
"stationId": 0,
"status": 0,
"storeCode": "",
"type": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelDeviceReq|ChannelDeviceReq|
|
  
doubleCheck|||false|integer(int32)||
|
  
gpioIp|||true|string||
|
  
gpioPort|||true|integer(int32)||
|
  
id|||true|integer(int64)||
|
  
ledIp1|||false|string||
|
  
ledIp2|||false|string||
|
  
ledPort1|||false|integer(int32)||
|
  
ledPort2|||false|integer(int32)||
|
  
ledTitle|||false|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
readerIp|||true|string||
|
  
readerPort|||true|integer(int32)||
|
  
readerPower|||true|string||
|
  
readerType|||true|integer(int32)||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
sortBy|||false|string||
|
  
stationId|||true|integer(int32)||
|
  
status|||false|integer(int32)||
|
  
storeCode|||true|string||
|
  
type|||false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## saveDevice
**接口地址**
:
`/device/saveDevice`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"doubleCheck": 0,
"gpioIp": "",
"gpioPort": 0,
"id": 0,
"ledIp1": "",
"ledIp2": "",
"ledPort1": 0,
"ledPort2": 0,
"ledTitle": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"readerIp": "",
"readerPort": 0,
"readerPower": "",
"readerType": 0,
"searchBeginTime": "",
"searchEndTime": "",
"sortBy": "",
"stationId": 0,
"status": 0,
"storeCode": "",
"type": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelDeviceReq|ChannelDeviceReq|
|
  
doubleCheck|||false|integer(int32)||
|
  
gpioIp|||true|string||
|
  
gpioPort|||true|integer(int32)||
|
  
id|||true|integer(int64)||
|
  
ledIp1|||false|string||
|
  
ledIp2|||false|string||
|
  
ledPort1|||false|integer(int32)||
|
  
ledPort2|||false|integer(int32)||
|
  
ledTitle|||false|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
readerIp|||true|string||
|
  
readerPort|||true|integer(int32)||
|
  
readerPower|||true|string||
|
  
readerType|||true|integer(int32)||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
sortBy|||false|string||
|
  
stationId|||true|integer(int32)||
|
  
status|||false|integer(int32)||
|
  
storeCode|||true|string||
|
  
type|||false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## updateDevice
**接口地址**
:
`/device/updateDevice`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"doubleCheck": 0,
"gpioIp": "",
"gpioPort": 0,
"id": 0,
"ledIp1": "",
"ledIp2": "",
"ledPort1": 0,
"ledPort2": 0,
"ledTitle": "",
"orderBy": "",
"pageNo": 0,
"pageSize": 0,
"params": {},
"readerIp": "",
"readerPort": 0,
"readerPower": "",
"readerType": 0,
"searchBeginTime": "",
"searchEndTime": "",
"sortBy": "",
"stationId": 0,
"status": 0,
"storeCode": "",
"type": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|ChannelDeviceReq|ChannelDeviceReq|
|
  
doubleCheck|||false|integer(int32)||
|
  
gpioIp|||true|string||
|
  
gpioPort|||true|integer(int32)||
|
  
id|||true|integer(int64)||
|
  
ledIp1|||false|string||
|
  
ledIp2|||false|string||
|
  
ledPort1|||false|integer(int32)||
|
  
ledPort2|||false|integer(int32)||
|
  
ledTitle|||false|string||
|
  
orderBy|||false|string||
|
  
pageNo|||false|integer(int64)||
|
  
pageSize|||false|integer(int64)||
|
  
params|||false|object||
|
  
readerIp|||true|string||
|
  
readerPort|||true|integer(int32)||
|
  
readerPower|||true|string||
|
  
readerType|||true|integer(int32)||
|
  
searchBeginTime|||false|string||
|
  
searchEndTime|||false|string||
|
  
sortBy|||false|string||
|
  
stationId|||true|integer(int32)||
|
  
status|||false|integer(int32)||
|
  
storeCode|||true|string||
|
  
type|||false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
# goods-info-controller
## add
**接口地址**
:
`/goodsInfo/goodsInfo/add`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"boxNum": 0,
"code": "",
"id": 0,
"jldw": "",
"marks": "",
"modelCode": "",
"modelName": "",
"name": "",
"shelfLife": 0,
"skuCode": "",
"volume": 0,
"warningDays": 0,
"zbc": 0,
"zbg": 0,
"zbk": 0
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|BaseGoodsReq|BaseGoodsReq|
|
  
boxNum|||true|integer(int32)||
|
  
code|||true|string||
|
  
id|||true|integer(int64)||
|
  
jldw|||true|string||
|
  
marks|||false|string||
|
  
modelCode|||true|string||
|
  
modelName|||true|string||
|
  
name|||true|string||
|
  
shelfLife|||false|integer(int32)||
|
  
skuCode|||true|string||
|
  
volume|||true|number(double)||
|
  
warningDays|||false|integer(int32)||
|
  
zbc|||true|number(double)||
|
  
zbg|||true|number(double)||
|
  
zbk|||true|number(double)||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## delete
**接口地址**
:
`/goodsInfo/goodsInfo/delete`
**请求方式**
:
`DELETE`
**请求数据类型**
:
`application/x-www-form-urlencoded`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"boxNum": 0,
"code": "",
"id": 0,
"jldw": "",
"marks": "",
"modelCode": "",
"modelName": "",
"name": "",
"shelfLife": 0,
"skuCode": "",
"volume": 0,
"warningDays": 0,
"zbc": 0,
"zbg": 0,
"zbk": 0
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|BaseGoodsReq|BaseGoodsReq|
|
  
boxNum|||true|integer(int32)||
|
  
code|||true|string||
|
  
id|||true|integer(int64)||
|
  
jldw|||true|string||
|
  
marks|||false|string||
|
  
modelCode|||true|string||
|
  
modelName|||true|string||
|
  
name|||true|string||
|
  
shelfLife|||false|integer(int32)||
|
  
skuCode|||true|string||
|
  
volume|||true|number(double)||
|
  
warningDays|||false|integer(int32)||
|
  
zbc|||true|number(double)||
|
  
zbg|||true|number(double)||
|
  
zbk|||true|number(double)||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|204|No Content||
|401|Unauthorized||
|403|Forbidden||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## edit
**接口地址**
:
`/goodsInfo/goodsInfo/edit`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"boxNum": 0,
"code": "",
"id": 0,
"jldw": "",
"marks": "",
"modelCode": "",
"modelName": "",
"name": "",
"shelfLife": 0,
"skuCode": "",
"volume": 0,
"warningDays": 0,
"zbc": 0,
"zbg": 0,
"zbk": 0
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|BaseGoodsReq|BaseGoodsReq|
|
  
boxNum|||true|integer(int32)||
|
  
code|||true|string||
|
  
id|||true|integer(int64)||
|
  
jldw|||true|string||
|
  
marks|||false|string||
|
  
modelCode|||true|string||
|
  
modelName|||true|string||
|
  
name|||true|string||
|
  
shelfLife|||false|integer(int32)||
|
  
skuCode|||true|string||
|
  
volume|||true|number(double)||
|
  
warningDays|||false|integer(int32)||
|
  
zbc|||true|number(double)||
|
  
zbg|||true|number(double)||
|
  
zbk|||true|number(double)||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## list
**接口地址**
:
`/goodsInfo/goodsInfo/list`
**请求方式**
:
`GET`
**请求数据类型**
:
`application/x-www-form-urlencoded`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求参数**
:
暂无
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«List«GoodsInfo»»|
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||array|GoodsInfo|
|
  
boxNum||integer(int32)||
|
  
goodsCode||string||
|
  
goodsName||string||
|
  
id||integer(int64)||
|
  
jldw||string||
|
  
modelCode||string||
|
  
modelName||string||
|
  
skuCode||string||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
[
{
"boxNum"
:
0
,
"goodsCode"
:
""
,
"goodsName"
:
""
,
"id"
:
0
,
"jldw"
:
""
,
"modelCode"
:
""
,
"modelName"
:
""
,
"skuCode"
:
""
}
],
"message"
:
""
,
"timestamp"
:
0
}
```
## page
**接口地址**
:
`/goodsInfo/goodsInfo/page`
**请求方式**
:
`GET`
**请求数据类型**
:
`application/x-www-form-urlencoded`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|condition.categoryCode||query|false|string||
|condition.categoryName||query|false|string||
|condition.goodsCode||query|false|string||
|condition.goodsId||query|false|integer(int64)||
|condition.goodsName||query|false|string||
|condition.jldw||query|false|string||
|condition.volume||query|false|number(double)||
|condition.zbc||query|false|number(double)||
|condition.zbg||query|false|number(double)||
|condition.zbk||query|false|number(double)||
|goodsCode||query|false|string||
|goodsName||query|false|string||
|orderBy||query|false|string||
|pageNo||query|false|integer(int64)||
|pageSize||query|false|integer(int64)||
|params||query|false|object||
|searchBeginTime||query|false|string||
|searchEndTime||query|false|string||
|sortBy||query|false|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«PageResult«GoodsInfo»»|
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||PageResult«GoodsInfo»|PageResult«GoodsInfo»|
|
  
pageNo||integer(int64)||
|
  
pageSize||integer(int64)||
|
  
records||array|GoodsInfo|
|
    
boxNum||integer||
|
    
goodsCode||string||
|
    
goodsName||string||
|
    
id||integer||
|
    
jldw||string||
|
    
modelCode||string||
|
    
modelName||string||
|
    
skuCode||string||
|
  
totalPage||integer(int32)||
|
  
totalRows||integer(int64)||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
{
"pageNo"
:
0
,
"pageSize"
:
0
,
"records"
:
[
{
"boxNum"
:
0
,
"goodsCode"
:
""
,
"goodsName"
:
""
,
"id"
:
0
,
"jldw"
:
""
,
"modelCode"
:
""
,
"modelName"
:
""
,
"skuCode"
:
""
}
],
"totalPage"
:
0
,
"totalRows"
:
0
},
"message"
:
""
,
"timestamp"
:
0
}
```
# gpio-config-controller
## getConfig
**接口地址**
:
`/gpio/getConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"count": 0,
"gpioHigh": 0,
"gpioId": 0,
"gpioIp": "",
"gpioType": "",
"id": 0,
"storeCode": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|GpioConfigReq|GpioConfigReq|
|
  
count|||false|integer(int32)||
|
  
gpioHigh|||true|integer(int32)||
|
  
gpioId|||true|integer(int32)||
|
  
gpioIp|||true|string||
|
  
gpioType|||true|string||
|
  
id|||true|integer(int64)||
|
  
storeCode|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«List«GpioConfig»»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||array|GpioConfig|
|
  
count||integer(int32)||
|
  
gpioHigh||integer(int32)||
|
  
gpioId||integer(int32)||
|
  
gpioIp||string||
|
  
gpioType||string||
|
  
id||integer(int64)||
|
  
storeCode||string||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
[
{
"count"
:
0
,
"gpioHigh"
:
0
,
"gpioId"
:
0
,
"gpioIp"
:
""
,
"gpioType"
:
""
,
"id"
:
0
,
"storeCode"
:
""
}
],
"message"
:
""
,
"timestamp"
:
0
}
```
## removeConfig
**接口地址**
:
`/gpio/removeConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"count": 0,
"gpioHigh": 0,
"gpioId": 0,
"gpioIp": "",
"gpioType": "",
"id": 0,
"storeCode": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|GpioConfigReq|GpioConfigReq|
|
  
count|||false|integer(int32)||
|
  
gpioHigh|||true|integer(int32)||
|
  
gpioId|||true|integer(int32)||
|
  
gpioIp|||true|string||
|
  
gpioType|||true|string||
|
  
id|||true|integer(int64)||
|
  
storeCode|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## saveConfig
**接口地址**
:
`/gpio/saveConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"count": 0,
"gpioHigh": 0,
"gpioId": 0,
"gpioIp": "",
"gpioType": "",
"id": 0,
"storeCode": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|GpioConfigReq|GpioConfigReq|
|
  
count|||false|integer(int32)||
|
  
gpioHigh|||true|integer(int32)||
|
  
gpioId|||true|integer(int32)||
|
  
gpioIp|||true|string||
|
  
gpioType|||true|string||
|
  
id|||true|integer(int64)||
|
  
storeCode|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## updateConfig
**接口地址**
:
`/gpio/updateConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"count": 0,
"gpioHigh": 0,
"gpioId": 0,
"gpioIp": "",
"gpioType": "",
"id": 0,
"storeCode": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|GpioConfigReq|GpioConfigReq|
|
  
count|||false|integer(int32)||
|
  
gpioHigh|||true|integer(int32)||
|
  
gpioId|||true|integer(int32)||
|
  
gpioIp|||true|string||
|
  
gpioType|||true|string||
|
  
id|||true|integer(int64)||
|
  
storeCode|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
# led-config-controller
## getConfigList
**接口地址**
:
`/ledConfig/getConfigList`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"fontname": "",
"fontsize": 0,
"halign": 0,
"height": 0,
"id": 0,
"inmethod": 0,
"inspeed": 0,
"left1": 0,
"outmethod": 0,
"outspeed": 0,
"sendType": 0,
"stationId": 0,
"stopmethod": 0,
"stopspeed": 0,
"stoptime": 0,
"storeCode": "",
"top": 0,
"valign": 0,
"width": 0,
"wordwrap": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|LedConfigReq|LedConfigReq|
|
  
fontname|||true|string||
|
  
fontsize|||true|integer(int32)||
|
  
halign|||true|integer(int32)||
|
  
height|||true|integer(int32)||
|
  
id|||true|integer(int64)||
|
  
inmethod|||true|integer(int32)||
|
  
inspeed|||true|integer(int32)||
|
  
left1|||true|integer(int32)||
|
  
outmethod|||true|integer(int32)||
|
  
outspeed|||true|integer(int32)||
|
  
sendType|||true|integer(int32)||
|
  
stationId|||true|integer(int32)||
|
  
stopmethod|||true|integer(int32)||
|
  
stopspeed|||true|integer(int32)||
|
  
stoptime|||true|integer(int32)||
|
  
storeCode|||true|string||
|
  
top|||true|integer(int32)||
|
  
valign|||true|integer(int32)||
|
  
width|||true|integer(int32)||
|
  
wordwrap|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«List«LedConfig»»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||array|LedConfig|
|
  
fontname||string||
|
  
fontsize||integer(int32)||
|
  
halign||integer(int32)||
|
  
height||integer(int32)||
|
  
id||integer(int64)||
|
  
inmethod||integer(int32)||
|
  
inspeed||integer(int32)||
|
  
left1||integer(int32)||
|
  
outmethod||integer(int32)||
|
  
outspeed||integer(int32)||
|
  
sendType||integer(int32)||
|
  
stationId||integer(int32)||
|
  
stopmethod||integer(int32)||
|
  
stopspeed||integer(int32)||
|
  
stoptime||integer(int32)||
|
  
storeCode||string||
|
  
top||integer(int32)||
|
  
valign||integer(int32)||
|
  
width||integer(int32)||
|
  
wordwrap||string||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
[
{
"fontname"
:
""
,
"fontsize"
:
0
,
"halign"
:
0
,
"height"
:
0
,
"id"
:
0
,
"inmethod"
:
0
,
"inspeed"
:
0
,
"left1"
:
0
,
"outmethod"
:
0
,
"outspeed"
:
0
,
"sendType"
:
0
,
"stationId"
:
0
,
"stopmethod"
:
0
,
"stopspeed"
:
0
,
"stoptime"
:
0
,
"storeCode"
:
""
,
"top"
:
0
,
"valign"
:
0
,
"width"
:
0
,
"wordwrap"
:
""
}
],
"message"
:
""
,
"timestamp"
:
0
}
```
## removeConfig
**接口地址**
:
`/ledConfig/removeConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"fontname": "",
"fontsize": 0,
"halign": 0,
"height": 0,
"id": 0,
"inmethod": 0,
"inspeed": 0,
"left1": 0,
"outmethod": 0,
"outspeed": 0,
"sendType": 0,
"stationId": 0,
"stopmethod": 0,
"stopspeed": 0,
"stoptime": 0,
"storeCode": "",
"top": 0,
"valign": 0,
"width": 0,
"wordwrap": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|LedConfigReq|LedConfigReq|
|
  
fontname|||true|string||
|
  
fontsize|||true|integer(int32)||
|
  
halign|||true|integer(int32)||
|
  
height|||true|integer(int32)||
|
  
id|||true|integer(int64)||
|
  
inmethod|||true|integer(int32)||
|
  
inspeed|||true|integer(int32)||
|
  
left1|||true|integer(int32)||
|
  
outmethod|||true|integer(int32)||
|
  
outspeed|||true|integer(int32)||
|
  
sendType|||true|integer(int32)||
|
  
stationId|||true|integer(int32)||
|
  
stopmethod|||true|integer(int32)||
|
  
stopspeed|||true|integer(int32)||
|
  
stoptime|||true|integer(int32)||
|
  
storeCode|||true|string||
|
  
top|||true|integer(int32)||
|
  
valign|||true|integer(int32)||
|
  
width|||true|integer(int32)||
|
  
wordwrap|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## saveConfig
**接口地址**
:
`/ledConfig/saveConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"fontname": "",
"fontsize": 0,
"halign": 0,
"height": 0,
"id": 0,
"inmethod": 0,
"inspeed": 0,
"left1": 0,
"outmethod": 0,
"outspeed": 0,
"sendType": 0,
"stationId": 0,
"stopmethod": 0,
"stopspeed": 0,
"stoptime": 0,
"storeCode": "",
"top": 0,
"valign": 0,
"width": 0,
"wordwrap": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|LedConfigReq|LedConfigReq|
|
  
fontname|||true|string||
|
  
fontsize|||true|integer(int32)||
|
  
halign|||true|integer(int32)||
|
  
height|||true|integer(int32)||
|
  
id|||true|integer(int64)||
|
  
inmethod|||true|integer(int32)||
|
  
inspeed|||true|integer(int32)||
|
  
left1|||true|integer(int32)||
|
  
outmethod|||true|integer(int32)||
|
  
outspeed|||true|integer(int32)||
|
  
sendType|||true|integer(int32)||
|
  
stationId|||true|integer(int32)||
|
  
stopmethod|||true|integer(int32)||
|
  
stopspeed|||true|integer(int32)||
|
  
stoptime|||true|integer(int32)||
|
  
storeCode|||true|string||
|
  
top|||true|integer(int32)||
|
  
valign|||true|integer(int32)||
|
  
width|||true|integer(int32)||
|
  
wordwrap|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
## updateConfig
**接口地址**
:
`/ledConfig/updateConfig`
**请求方式**
:
`POST`
**请求数据类型**
:
`application/json`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求示例**
:
```javascript
{
"fontname": "",
"fontsize": 0,
"halign": 0,
"height": 0,
"id": 0,
"inmethod": 0,
"inspeed": 0,
"left1": 0,
"outmethod": 0,
"outspeed": 0,
"sendType": 0,
"stationId": 0,
"stopmethod": 0,
"stopspeed": 0,
"stoptime": 0,
"storeCode": "",
"top": 0,
"valign": 0,
"width": 0,
"wordwrap": ""
}
```
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|req|req|body|true|LedConfigReq|LedConfigReq|
|
  
fontname|||true|string||
|
  
fontsize|||true|integer(int32)||
|
  
halign|||true|integer(int32)||
|
  
height|||true|integer(int32)||
|
  
id|||true|integer(int64)||
|
  
inmethod|||true|integer(int32)||
|
  
inspeed|||true|integer(int32)||
|
  
left1|||true|integer(int32)||
|
  
outmethod|||true|integer(int32)||
|
  
outspeed|||true|integer(int32)||
|
  
sendType|||true|integer(int32)||
|
  
stationId|||true|integer(int32)||
|
  
stopmethod|||true|integer(int32)||
|
  
stopspeed|||true|integer(int32)||
|
  
stoptime|||true|integer(int32)||
|
  
storeCode|||true|string||
|
  
top|||true|integer(int32)||
|
  
valign|||true|integer(int32)||
|
  
width|||true|integer(int32)||
|
  
wordwrap|||true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|201|Created||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
# rfid-controller
## openReader
**接口地址**
:
`/rfid/openReader`
**请求方式**
:
`GET`
**请求数据类型**
:
`application/x-www-form-urlencoded`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求参数**
:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
| -------- | -------- | ----- | -------- | -------- | ------ |
|storeCode||query|true|string||
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK||
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
暂无
**响应示例**
:
```
javascript
```
# sync-v-2-controller
## syncGoods
**接口地址**
:
`/platform/syncGoods`
**请求方式**
:
`GET`
**请求数据类型**
:
`application/x-www-form-urlencoded`
**响应数据类型**
:
`*/*`
**接口描述**
:
**请求参数**
:
暂无
**响应状态**
:
| 状态码 | 说明 | schema |
| -------- | -------- | ----- |
|200|OK|ApiRes«boolean»|
|401|Unauthorized||
|403|Forbidden||
|404|Not Found||
**响应参数**
:
| 参数名称 | 参数说明 | 类型 | schema |
| -------- | -------- | ----- |----- |
|code||integer(int32)|integer(int32)|
|data||boolean||
|message||string||
|timestamp||integer(int64)|integer(int64)|
**响应示例**
:
```
javascript
{
"code"
:
0
,
"data"
:
true
,
"message"
:
""
,
"timestamp"
:
0
}
```
\ No newline at end of file
index.html
View file @
b039d4b1
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<link
rel=
"icon"
href=
"/favicon.ico"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
平面库射频通道
</title>
</head>
<script>
window
.
_CONFIG
=
{};
window
.
_CONFIG
[
'publicURL'
]
=
'http://192.168.3.130:10030'
;
window
.
_CONFIG
[
'wsURL'
]
=
'ws://192.168.3.130:10030/notice/'
</script>
<body>
<div
id=
"app"
></div>
<script
type=
"module"
src=
"/src/main.js"
></script>
</body>
</html>
<head>
<meta
charset=
"UTF-8"
>
<link
rel=
"icon"
href=
"/favicon.ico"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
平面库射频通道
</title>
</head>
<script>
window
.
_CONFIG
=
{};
window
.
_CONFIG
[
'publicURL'
]
=
'http://192.168.3.130:10060'
;
window
.
_CONFIG
[
'wsURL'
]
=
'ws://192.168.3.130:10060/notice/'
</script>
<body>
<div
id=
"app"
></div>
<script
type=
"module"
src=
"/src/main.js"
></script>
</body>
</html>
\ No newline at end of file
src/views/BasicData.vue
0 → 100644
View file @
b039d4b1
<
template
>
<div
class=
"basic-data-container"
>
<el-card
class=
"card-container"
>
<template
#
header
>
<div
class=
"card-header"
>
<span>
基础信息
</span>
</div>
</
template
>
<div
class=
"content-wrapper"
>
<!-- 同步按钮区域 -->
<div
class=
"head-container"
style=
"margin-bottom: 10px;"
>
<el-button
type=
"primary"
@
click=
"handleSync"
:loading=
"syncLoading"
>
<el-icon>
<Refresh
/>
</el-icon>
同步基础数据
</el-button>
</div>
<!-- 搜索表单 -->
<el-form
:model=
"searchForm"
:inline=
"true"
style=
"margin-bottom: 10px;"
>
<el-form-item
label=
"品名名称"
>
<el-input
v-model=
"searchForm.goodsName"
placeholder=
"请输入品名名称"
clearable
style=
"width: 200px;"
/>
</el-form-item>
<!-- <el-form-item label="品名编码">
<el-input v-model="searchForm.goodsCode" placeholder="请输入品名编码" clearable style="width: 200px;" />
</el-form-item> -->
<el-form-item
label=
"号型名称"
>
<el-input
v-model=
"searchForm.modelName"
placeholder=
"请输入号型名称"
clearable
style=
"width: 200px;"
/>
</el-form-item>
<!-- <el-form-item label="号型编码">
<el-input v-model="searchForm.modelCode" placeholder="请输入号型编码" clearable style="width: 200px;" />
</el-form-item> -->
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 表格容器 -->
<div
class=
"table-wrapper"
>
<el-table
:header-cell-style=
"{ backgroundColor: '#f5f7fa', color: '#000', fontSize: '16px', fontWeight: '600' }"
:data=
"tableData"
border
style=
"width: 100%;"
height=
"100%"
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"70"
/>
<el-table-column
prop=
"goodsName"
label=
"品名名称"
align=
"center"
min-width=
"150"
/>
<el-table-column
prop=
"goodsCode"
label=
"品名编码"
align=
"center"
min-width=
"120"
/>
<el-table-column
prop=
"modelName"
label=
"号型名称"
align=
"center"
min-width=
"120"
/>
<el-table-column
prop=
"modelCode"
label=
"号型编码"
align=
"center"
min-width=
"150"
/>
<el-table-column
prop=
"skuCode"
label=
"SKU编码"
align=
"center"
min-width=
"140"
/>
<el-table-column
prop=
"jldw"
label=
"计量单位"
align=
"center"
min-width=
"100"
/>
<el-table-column
prop=
"boxNum"
label=
"箱数"
align=
"center"
min-width=
"80"
/>
</el-table>
</div>
<!-- 分页固定在底部 -->
<div
class=
"pagination-wrapper"
>
<el-pagination
v-model:current-page=
"pagination.current"
v-model:page-size=
"pagination.size"
:page-sizes=
"[10, 20, 50, 100]"
:total=
"pagination.total"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</div>
</el-card>
</div>
</template>
<
script
>
import
{
defineComponent
,
ref
,
reactive
,
onMounted
}
from
'vue'
import
{
getAction
}
from
'@/api/manage'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
{
Refresh
}
from
'@element-plus/icons-vue'
export
default
defineComponent
({
name
:
'BasicData'
,
components
:
{
Refresh
},
setup
()
{
// 搜索表单
const
searchForm
=
reactive
({
goodsCode
:
''
,
goodsName
:
''
,
modelName
:
''
,
modelCode
:
''
})
// 表格数据
const
tableData
=
ref
([])
// 同步按钮loading状态
const
syncLoading
=
ref
(
false
)
// 分页配置
const
pagination
=
reactive
({
current
:
1
,
size
:
10
,
total
:
0
})
// API URL配置
const
apiUrl
=
reactive
({
page
:
'/goodsInfo/goodsInfo/page'
,
sync
:
'/platform/syncGoods'
})
// 加载数据
const
loadData
=
()
=>
{
const
params
=
{
pageNo
:
pagination
.
current
,
pageSize
:
pagination
.
size
}
// 添加搜索条件
if
(
searchForm
.
goodsCode
)
{
params
.
goodsCode
=
searchForm
.
goodsCode
}
if
(
searchForm
.
goodsName
)
{
params
.
goodsName
=
searchForm
.
goodsName
}
if
(
searchForm
.
modelName
)
{
params
.
modelName
=
searchForm
.
modelName
}
if
(
searchForm
.
modelCode
)
{
params
.
modelCode
=
searchForm
.
modelCode
}
getAction
(
apiUrl
.
page
,
params
).
then
(
res
=>
{
// 根据实际返回数据,成功状态码为99200
if
(
res
.
code
!==
99200
)
{
ElMessage
.
error
(
res
.
message
||
'数据加载失败'
)
return
}
tableData
.
value
=
res
.
data
?.
records
||
[]
pagination
.
total
=
parseInt
(
res
.
data
?.
totalRows
)
||
0
}).
catch
(
error
=>
{
ElMessage
.
error
(
'数据加载失败'
)
console
.
error
(
'Load data error:'
,
error
)
})
}
// 搜索
const
handleSearch
=
()
=>
{
pagination
.
current
=
1
loadData
()
}
// 重置搜索
const
handleReset
=
()
=>
{
searchForm
.
goodsCode
=
''
searchForm
.
goodsName
=
''
searchForm
.
modelName
=
''
searchForm
.
modelCode
=
''
handleSearch
()
}
// 分页大小改变
const
handleSizeChange
=
(
val
)
=>
{
pagination
.
size
=
val
pagination
.
current
=
1
loadData
()
}
// 页码改变
const
handleCurrentChange
=
(
val
)
=>
{
pagination
.
current
=
val
loadData
()
}
// 同步商品数据
const
handleSync
=
()
=>
{
syncLoading
.
value
=
true
getAction
(
apiUrl
.
sync
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
{
ElMessage
.
error
(
res
.
message
||
'同步失败'
)
return
}
ElMessage
.
success
(
'同步成功'
)
// 同步成功后刷新数据
loadData
()
}).
catch
(
error
=>
{
ElMessage
.
error
(
'同步失败'
)
console
.
error
(
'Sync error:'
,
error
)
}).
finally
(()
=>
{
syncLoading
.
value
=
false
})
}
// 初始化
onMounted
(()
=>
{
loadData
()
})
return
{
searchForm
,
tableData
,
pagination
,
syncLoading
,
loadData
,
handleSearch
,
handleReset
,
handleSizeChange
,
handleCurrentChange
,
handleSync
}
}
})
</
script
>
<
style
scoped
lang=
"scss"
>
.basic-data-container
{
height
:
100%
;
.card-container
{
height
:
calc
(
100vh
-
147px
);
:deep(.el-card__body)
{
height
:
calc
(
100%
-
55px
);
padding
:
20px
;
display
:
flex
;
flex-direction
:
column
;
}
}
.content-wrapper
{
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
overflow
:
hidden
;
}
.head-container
{
flex-shrink
:
0
;
display
:
flex
;
margin-bottom
:
10px
;
}
.el-form
{
flex-shrink
:
0
;
}
.table-wrapper
{
flex
:
1
;
overflow
:
hidden
;
min-height
:
0
;
margin-bottom
:
16px
;
:deep(.el-table)
{
height
:
100%
;
.el-table__body-wrapper
{
overflow-y
:
auto
;
}
}
}
.pagination-wrapper
{
flex-shrink
:
0
;
padding
:
12px
0
0
0
;
background-color
:
#fff
;
border-top
:
1px
solid
#ebeef5
;
display
:
flex
;
justify-content
:
flex-end
;
}
}
.head-container
{
display
:
flex
;
}
:deep
(
.el-input-number
.el-input__inner
)
{
text-align
:
left
;
}
.card-header
{
height
:
26px
;
font-size
:
20px
;
font-weight
:
bold
;
font-family
:
'Times New Roman'
,
Times
,
serif
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
</
style
>
\ No newline at end of file
src/views/HomeView.vue
View file @
b039d4b1
<
template
>
<el-tabs
:tab-position=
"tabPosition"
v-model=
"activeIndex"
type=
"card"
:stretch=
"true"
class=
"menu-tabs"
@
tab-change=
"tabChange"
:style=
"
{backgroundColor: color}">
<el-tab-pane
v-for=
"item in tabList"
:key=
"item.title"
>
<template
#
label
>
<span
class=
"custom-tabs-label"
>
<i
:class=
"item.icon"
style=
"font-size: 24px;margin-right: 10px;color: #fff;"
></i>
<span
class=
"tabfont"
>
{{
item
.
title
}}
</span>
</span>
</
template
>
<component
:is=
"item.template"
:ref=
"item.template"
@
refresh=
"handleRefresh"
@
logChange=
"handleLogChange"
@
changeTab=
"handleChangeTab"
></component>
</el-tab-pane>
<el-card>
<!-- class="log-scroll" -->
<div
v-html=
"log"
style=
"font-weight: 550;font-family: Times New Roman;display: flex;align-items: center;"
></div>
</el-card>
</el-tabs>
<el-tabs
:tab-position=
"tabPosition"
v-model=
"activeIndex"
type=
"card"
:stretch=
"true"
class=
"menu-tabs"
@
tab-change=
"tabChange"
:style=
"
{ backgroundColor: color }">
<el-tab-pane
v-for=
"item in tabList"
:key=
"item.title"
>
<template
#
label
>
<span
class=
"custom-tabs-label"
>
<i
:class=
"item.icon"
style=
"font-size: 24px;margin-right: 10px;color: #fff;"
></i>
<span
class=
"tabfont"
>
{{
item
.
title
}}
</span>
</span>
</
template
>
<component
:is=
"item.template"
:ref=
"item.template"
@
refresh=
"handleRefresh"
@
logChange=
"handleLogChange"
@
changeTab=
"handleChangeTab"
></component>
</el-tab-pane>
<el-card>
<!-- class="log-scroll" -->
<div
v-html=
"log"
style=
"font-weight: 550;font-family: Times New Roman;display: flex;align-items: center;"
></div>
</el-card>
</el-tabs>
</template>
<
script
>
...
...
@@ -25,125 +27,129 @@ import Query from './Query.vue'
import
Setting
from
'./Setting.vue'
import
ChannelSetting
from
'./ChannelSetting.vue'
import
NoOrder
from
'./NoOrder.vue'
import
BasicData
from
'./BasicData.vue'
export
default
defineComponent
({
components
:
{
RFID
,
InTask
,
OutTask
,
Query
,
Setting
,
ChannelSetting
,
NoOrder
},
setup
()
{
const
{
proxy
}
=
getCurrentInstance
()
const
tabPosition
=
ref
(
'bottom'
)
const
log
=
ref
(
''
)
const
activeIndex
=
ref
(
'0'
)
const
color
=
ref
(
'#1f8a36'
)
const
tabList
=
[
{
title
:
'射频识别'
,
icon
:
'iconfont icon-tiaozhishibie'
,
template
:
'RFID'
},
{
title
:
'入库作业'
,
icon
:
'iconfont icon-rukuguanli-'
,
template
:
'InTask'
},
{
title
:
'出库作业'
,
icon
:
'iconfont icon-chukuguanli-'
,
template
:
'OutTask'
},
// {title: '手动设置', icon: 'iconfont icon-shezhi', template: 'Setting'},
{
title
:
'无单据上报'
,
icon
:
'iconfont icon-tiaozhishibie'
,
template
:
'NoOrder'
},
{
title
:
'查询'
,
icon
:
'iconfont icon-chaxun'
,
template
:
'Query'
},
{
title
:
'通道配置'
,
icon
:
'iconfont icon-shezhi'
,
template
:
'ChannelSetting'
},
]
if
(
sessionStorage
.
getItem
(
'bgColor'
))
{
color
.
value
=
sessionStorage
.
getItem
(
'bgColor'
)
}
else
{
sessionStorage
.
setItem
(
'bgColor'
,
'#1f8a36'
)
}
onMounted
(()
=>
{
setTimeout
(()
=>
{
changeBg
()
},
200
)
});
function
changeBg
()
{
for
(
var
i
=
0
;
i
<
document
.
getElementsByClassName
(
'el-card__header'
).
length
;
i
++
){
document
.
getElementsByClassName
(
'el-card__header'
)[
i
].
style
.
backgroundColor
=
color
.
value
}
}
function
tabChange
(
index
)
{
if
(
index
==
0
)
{
return
}
proxy
.
$refs
[
tabList
[
index
].
template
][
0
].
loadData
()
}
function
handleRefresh
()
{
console
.
log
(
'刷新起点'
)
setTimeout
(()
=>
{
proxy
.
$refs
.
InTask
[
0
].
loadData
()
proxy
.
$refs
.
OutTask
[
0
].
loadData
()
proxy
.
$refs
.
NoOrder
[
0
].
getTableData
()
},
500
)
}
function
handleLogChange
(
data
)
{
log
.
value
=
data
}
function
handleChangeTab
()
{
activeIndex
.
value
=
'5'
}
return
{
activeIndex
,
tabPosition
,
tabList
,
log
,
color
,
tabChange
,
handleRefresh
,
handleLogChange
,
handleChangeTab
}
},
components
:
{
RFID
,
InTask
,
OutTask
,
Query
,
Setting
,
ChannelSetting
,
NoOrder
,
BasicData
},
setup
()
{
const
{
proxy
}
=
getCurrentInstance
()
const
tabPosition
=
ref
(
'bottom'
)
const
log
=
ref
(
''
)
const
activeIndex
=
ref
(
'0'
)
const
color
=
ref
(
'#1f8a36'
)
const
tabList
=
[
{
title
:
'射频识别'
,
icon
:
'iconfont icon-tiaozhishibie'
,
template
:
'RFID'
},
// {title: '入库作业', icon: 'iconfont icon-rukuguanli-', template: 'InTask'},
// {title: '出库作业', icon: 'iconfont icon-chukuguanli-', template: 'OutTask'},
{
title
:
'手动设置'
,
icon
:
'iconfont icon-shezhi'
,
template
:
'Setting'
},
// {title: '无单据上报', icon: 'iconfont icon-tiaozhishibie', template: 'NoOrder'},
{
title
:
'查询'
,
icon
:
'iconfont icon-chaxun'
,
template
:
'Query'
},
{
title
:
'通道配置'
,
icon
:
'iconfont icon-shezhi'
,
template
:
'ChannelSetting'
},
{
title
:
'基础信息'
,
icon
:
'iconfont icon-tiaozhishibie'
,
template
:
'BasicData'
},
]
if
(
sessionStorage
.
getItem
(
'bgColor'
))
{
color
.
value
=
sessionStorage
.
getItem
(
'bgColor'
)
}
else
{
sessionStorage
.
setItem
(
'bgColor'
,
'#1f8a36'
)
}
onMounted
(()
=>
{
setTimeout
(()
=>
{
changeBg
()
},
200
)
});
function
changeBg
()
{
for
(
var
i
=
0
;
i
<
document
.
getElementsByClassName
(
'el-card__header'
).
length
;
i
++
)
{
document
.
getElementsByClassName
(
'el-card__header'
)[
i
].
style
.
backgroundColor
=
color
.
value
}
}
function
tabChange
(
index
)
{
if
(
index
==
0
)
{
return
}
proxy
.
$refs
[
tabList
[
index
].
template
][
0
].
loadData
()
}
function
handleRefresh
()
{
console
.
log
(
'刷新起点'
)
setTimeout
(()
=>
{
proxy
.
$refs
.
InTask
[
0
].
loadData
()
proxy
.
$refs
.
OutTask
[
0
].
loadData
()
proxy
.
$refs
.
NoOrder
[
0
].
getTableData
()
},
500
)
}
function
handleLogChange
(
data
)
{
log
.
value
=
data
}
function
handleChangeTab
()
{
activeIndex
.
value
=
'5'
}
return
{
activeIndex
,
tabPosition
,
tabList
,
log
,
color
,
tabChange
,
handleRefresh
,
handleLogChange
,
handleChangeTab
}
},
})
</
script
>
<
style
scope
>
.tabfont
{
font-family
:
'微软雅黑'
;
font-size
:
30px
;
font-weight
:
550
;
color
:
aliceblue
;
font-family
:
'微软雅黑'
;
font-size
:
30px
;
font-weight
:
550
;
color
:
aliceblue
;
}
.log-scroll
{
display
:
inline-block
;
white-space
:
nowrap
;
animation
:
scroll
20s
linear
infinite
;
display
:
inline-block
;
white-space
:
nowrap
;
animation
:
scroll
20s
linear
infinite
;
}
@keyframes
scroll
{
0
%
{
transform
:
translateX
(
100%
);
}
100
%
{
transform
:
translateX
(
0%
);
}
}
0
%
{
transform
:
translateX
(
100%
);
}
.red
{
width
:
10px
;
height
:
10px
;
border-radius
:
50%
;
background
:
red
;
margin
:
0
10px
0
10px
;
100
%
{
transform
:
translateX
(
0%
);
}
}
.green
{
width
:
10px
;
height
:
10px
;
border-radius
:
50%
;
background
:
green
;
margin
:
0
10px
0
10px
;
.red
{
width
:
10px
;
height
:
10px
;
border-radius
:
50%
;
background
:
red
;
margin
:
0
10px
0
10px
;
}
.gray
{
width
:
10px
;
height
:
10px
;
border-radius
:
50%
;
background
:
gray
;
margin
:
0
10px
0
10px
;
.green
{
width
:
10px
;
height
:
10px
;
border-radius
:
50%
;
background
:
green
;
margin
:
0
10px
0
10px
;
}
.gray
{
width
:
10px
;
height
:
10px
;
border-radius
:
50%
;
background
:
gray
;
margin
:
0
10px
0
10px
;
}
</
style
>
src/views/Setting copy.vue
0 → 100644
View file @
b039d4b1
<
template
>
<el-row>
<el-col
:span=
"6"
>
<el-card
style=
"height: calc(100vh - 147px);"
>
<el-form
label-position=
"right"
size=
"large"
label-width=
"100px"
:model=
"formData"
style=
"max-width: 460px;"
>
<el-form-item
label=
"通道"
>
<el-select
v-model=
"formData.stationId"
style=
"width: 100%;"
filterable
placeholder=
"请选择通道"
@
change=
"changeStation"
>
<el-option
v-for=
"item in bindList"
:key=
"item.stationId"
:label=
"item.stationId"
:value=
"item.stationId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"单号"
>
<el-select
v-model=
"formData.billNo"
style=
"width: 100%;"
filterable
clearable
placeholder=
"请选择单号"
@
change=
"changeBill"
>
<el-option
v-for=
"item in billList"
:key=
"item.billNo"
:label=
"item.billName"
:value=
"item.billNo"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"品名"
>
<el-select
v-model=
"formData.goodsCode"
style=
"width: 100%;"
filterable
clearable
placeholder=
"请选择品名"
@
change=
"changeGoods"
>
<el-option
v-for=
"item in goodsList"
:key=
"item.goodsCode"
:label=
"item.goodsName"
:value=
"item.goodsCode"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"号型"
>
<el-select
v-model=
"formData.modelCode"
style=
"width: 100%;"
filterable
clearable
placeholder=
"请选择号型"
@
change=
"changeModel"
>
<el-option
v-for=
"item in modelList"
:key=
"item.modelCode"
:label=
"item.modelName"
:value=
"item.modelCode"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"单包数量"
>
<el-input-number
v-model=
"formData.amount"
:min=
"0"
:precision=
"0"
style=
"width: 100%;"
/>
</el-form-item>
<div
style=
"text-align: center;"
>
<el-button
round
type=
"success"
@
click=
"automatic"
style=
"width: 45%"
>
自动
</el-button>
<el-button
round
type=
"primary"
@
click=
"manual"
style=
"width: 45%"
>
手动
</el-button>
</div>
</el-form>
</el-card>
</el-col>
<el-col
:span=
"18"
>
<el-card
style=
"height: calc(100vh - 147px);"
>
<el-table
:header-cell-style=
"
{ backgroundColor: '#f5f7fa', color: '#000', fontSize: '18px', fontWeight: '600' }"
:data="bindList" border size="large" style="width: 100%;">
<el-table-column
type=
"index"
label=
"序号"
width=
"70"
align=
"center"
/>
<el-table-column
prop=
"stationId"
label=
"通道号"
align=
"center"
/>
<el-table-column
prop=
"state"
label=
"状态"
align=
"center"
>
<template
#
default=
"scope"
>
{{
scope
.
row
.
state
===
0
?
'自动'
:
scope
.
row
.
state
===
1
?
'手动'
:
''
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"billName"
label=
"单号"
align=
"center"
/>
<el-table-column
prop=
"goodsName"
label=
"品名"
align=
"center"
/>
<el-table-column
prop=
"modelName"
label=
"号型"
align=
"center"
/>
<el-table-column
prop=
"amount"
label=
"数量"
align=
"center"
/>
</el-table>
</el-card>
</el-col>
</el-row>
</template>
<
script
>
import
{
defineComponent
,
ref
,
reactive
,
toRefs
,
getCurrentInstance
}
from
'vue'
import
{
ElMessage
}
from
'element-plus'
import
{
postAction
}
from
'@/api/manage'
export
default
defineComponent
({
setup
()
{
const
bindList
=
ref
([])
const
channelList
=
ref
([])
const
billList
=
ref
([])
const
goodsList
=
ref
([])
const
modelList
=
ref
([])
const
formData
=
ref
({
amount
:
1
})
const
{
proxy
}
=
getCurrentInstance
()
const
searchData
=
ref
({
pageNo
:
1
,
pageSize
:
10
})
const
total
=
ref
(
0
)
const
state
=
reactive
({
url
:
{
getBindPage
:
'/bind/getBindPage'
,
getBillPage
:
'/bill/getBillPage'
,
getGoodsPage
:
'/bill/getGoodsPage'
,
getModelPage
:
'/bill/getModelPage'
,
updateBind
:
'/bind/updateBind'
}
});
function
handleCurrentChange
(
val
)
{
searchData
.
value
.
pageNo
=
val
loadData
()
}
const
loadData
=
(
e
)
=>
{
if
(
sessionStorage
.
getItem
(
'storeInfo'
))
{
searchData
.
value
.
storeCode
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
)).
storeCode
postAction
(
state
.
url
.
getBindPage
,
searchData
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
bindList
.
value
=
res
.
data
.
records
total
.
value
=
res
.
data
.
totalRows
-
0
if
(
e
)
{
}
else
{
if
(
res
.
data
.
records
.
length
>
0
)
{
formData
.
value
.
stationId
=
res
.
data
.
records
[
0
].
stationId
formData
.
value
.
id
=
res
.
data
.
records
[
0
].
id
}
}
})
}
}
const
loadSelect
=
()
=>
{
if
(
sessionStorage
.
getItem
(
'storeInfo'
))
{
postAction
(
state
.
url
.
getBillPage
,
{
pageNo
:
1
,
pageSize
:
50
,
type
:
'IN'
,
storeCode
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
)).
storeCode
}).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
billList
.
value
=
res
.
data
.
records
})
}
}
function
changeStation
(
value
)
{
if
(
value
)
{
formData
.
value
.
id
=
bindList
.
value
.
find
(
i
=>
i
.
stationId
==
formData
.
value
.
stationId
).
id
console
.
log
(
formData
.
value
.
id
)
}
}
function
changeBill
(
value
)
{
goodsList
.
value
=
[]
formData
.
value
.
goodsCode
=
''
modelList
.
value
=
[]
formData
.
value
.
modelCode
=
''
if
(
value
)
{
formData
.
value
.
bizBillNo
=
billList
.
value
.
find
(
i
=>
i
.
billNo
==
formData
.
value
.
billNo
).
bizBillNo
formData
.
value
.
billName
=
billList
.
value
.
find
(
i
=>
i
.
billNo
==
formData
.
value
.
billNo
).
billName
postAction
(
state
.
url
.
getGoodsPage
,
{
pageNo
:
1
,
pageSize
:
50
,
type
:
'IN'
,
storeCode
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
)).
storeCode
,
bizBillNo
:
formData
.
value
.
bizBillNo
}).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
goodsList
.
value
=
res
.
data
.
records
})
}
}
function
changeGoods
(
value
)
{
modelList
.
value
=
[]
formData
.
value
.
modelCode
=
''
if
(
value
)
{
formData
.
value
.
goodsName
=
goodsList
.
value
.
find
(
i
=>
i
.
goodsCode
==
formData
.
value
.
goodsCode
).
goodsName
postAction
(
state
.
url
.
getModelPage
,
{
pageNo
:
1
,
pageSize
:
50
,
type
:
'IN'
,
storeCode
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
)).
storeCode
,
bizBillNo
:
formData
.
value
.
bizBillNo
,
goodsCode
:
value
}).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
modelList
.
value
=
res
.
data
.
records
})
}
}
function
changeModel
(
value
)
{
if
(
value
)
{
formData
.
value
.
modelName
=
modelList
.
value
.
find
(
i
=>
i
.
modelCode
==
formData
.
value
.
modelCode
).
modelName
formData
.
value
.
skuCode
=
modelList
.
value
.
find
(
i
=>
i
.
modelCode
==
formData
.
value
.
modelCode
).
skuCode
}
}
function
automatic
()
{
formData
.
value
.
billNo
=
''
formData
.
value
.
goodsCode
=
''
formData
.
value
.
modelCode
=
''
formData
.
value
.
state
=
0
postAction
(
state
.
url
.
updateBind
,
formData
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
ElMessage
.
success
(
res
.
message
)
loadData
(
1
)
})
}
function
manual
()
{
if
(
!
formData
.
value
.
billNo
)
{
return
ElMessage
.
warning
(
'请选择单号'
)
}
if
(
!
formData
.
value
.
goodsCode
)
{
return
ElMessage
.
warning
(
'请选择品名'
)
}
if
(
!
formData
.
value
.
modelCode
)
{
return
ElMessage
.
warning
(
'请选择号型'
)
}
formData
.
value
.
state
=
1
postAction
(
state
.
url
.
updateBind
,
formData
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
ElMessage
.
success
(
res
.
message
)
loadData
(
1
)
})
}
// loadData()
loadSelect
()
return
{
...
toRefs
(
state
),
bindList
,
channelList
,
billList
,
goodsList
,
modelList
,
formData
,
searchData
,
total
,
handleCurrentChange
,
changeStation
,
changeBill
,
changeGoods
,
changeModel
,
automatic
,
manual
,
loadData
}
},
})
</
script
>
\ No newline at end of file
src/views/Setting.vue
View file @
b039d4b1
<
template
>
<el-row>
<el-col
:span=
"6"
>
<el-card
style=
"height: calc(100vh - 147px);"
>
<el-form
label-position=
"right"
size=
"large"
label-width=
"100px"
:model=
"formData"
style=
"max-width: 460px;"
>
<el-form-item
label=
"通道"
>
<el-select
v-model=
"formData.stationId"
style=
"width: 100%;"
filterable
placeholder=
"请选择通道"
@
change=
"changeStation"
>
<el-option
v-for=
"item in bindList"
:key=
"item.stationId"
:label=
"item.stationId"
:value=
"item.stationId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"单号"
>
<el-select
v-model=
"formData.billNo"
style=
"width: 100%;"
filterable
clearable
placeholder=
"请选择单号"
@
change=
"changeBill"
>
<el-option
v-for=
"item in billList"
:key=
"item.billNo"
:label=
"item.billName"
:value=
"item.billNo"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"品名"
>
<el-select
v-model=
"formData.goodsCode"
style=
"width: 100%;"
filterable
clearable
placeholder=
"请选择品名"
@
change=
"changeGoods"
>
<el-option
v-for=
"item in goodsList"
:key=
"item.goodsCode"
:label=
"item.goodsName"
:value=
"item.goodsCode"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"号型"
>
<el-select
v-model=
"formData.modelCode"
style=
"width: 100%;"
filterable
clearable
placeholder=
"请选择号型"
@
change=
"changeModel"
>
<el-option
v-for=
"item in modelList"
:key=
"item.modelCode"
:label=
"item.modelName"
:value=
"item.modelCode"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"单包数量"
>
<el-input-number
v-model=
"formData.amount"
:min=
"0"
:precision=
"0"
style=
"width: 100%;"
/>
</el-form-item>
<div
style=
"text-align: center;"
>
<el-button
round
type=
"success"
@
click=
"automatic"
style=
"width: 45%"
>
自动
</el-button>
<el-button
round
type=
"primary"
@
click=
"manual"
style=
"width: 45%"
>
手动
</el-button>
</div>
</el-form>
</el-card>
</el-col>
<el-col
:span=
"18"
>
<el-card
style=
"height: calc(100vh - 147px);"
>
<el-table
:header-cell-style=
"
{backgroundColor: '#f5f7fa',color: '#000',fontSize: '18px',fontWeight: '600'}" :data="bindList" border size="large" style="width: 100%;">
<el-table-column
type=
"index"
label=
"序号"
width=
"70"
align=
"center"
/>
<el-table-column
prop=
"stationId"
label=
"通道号"
align=
"center"
/>
<el-table-column
prop=
"state"
label=
"状态"
align=
"center"
>
<template
#
default=
"scope"
>
{{
scope
.
row
.
state
===
0
?
'自动'
:
scope
.
row
.
state
===
1
?
'手动'
:
''
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"billName"
label=
"单号"
align=
"center"
/>
<el-table-column
prop=
"goodsName"
label=
"品名"
align=
"center"
/>
<el-table-column
prop=
"modelName"
label=
"号型"
align=
"center"
/>
<el-table-column
prop=
"amount"
label=
"数量"
align=
"center"
/>
</el-table>
</el-card>
</el-col>
</el-row>
</template>
<div>
<el-card>
<template
#
header
>
<div
class=
"card-header"
>
<span>
手动设置
</span>
</div>
</
template
>
<!-- 搜索表单 -->
<el-form
:model=
"searchForm"
:inline=
"true"
style=
"margin-bottom: 20px;"
>
<el-form-item
label=
"托盘号"
>
<el-input
v-model=
"searchForm.palletNo"
placeholder=
"请输入托盘号"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
@
click=
"handleReset"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 工具栏 -->
<div
class=
"head-container"
style=
"margin-bottom: 20px;"
>
<el-button
type=
"primary"
@
click=
"handleAdd"
>
<el-icon>
<Plus
/>
</el-icon>
新增托盘
</el-button>
</div>
<!-- 托盘列表 -->
<el-collapse
v-model=
"activeCollapse"
accordion
>
<el-collapse-item
v-for=
"pallet in palletList"
:key=
"pallet.palletNo"
:name=
"pallet.palletNo"
>
<
template
#
title
>
<div
class=
"collapse-title"
>
<span
class=
"pallet-no"
>
托盘号:
{{
pallet
.
palletNo
}}
</span>
<span
class=
"goods-count"
>
绑定物资数:
{{
pallet
.
goodsList
.
length
}}
</span>
<el-button
type=
"primary"
size=
"small"
@
click
.
stop=
"handleAddGoods(pallet)"
>
添加物资
</el-button>
<el-popconfirm
title=
"确定要删除整个托盘吗?"
@
confirm=
"handleDeletePallet(pallet)"
>
<template
#
reference
>
<el-button
type=
"danger"
size=
"small"
@
click
.
stop
>
删除托盘
</el-button>
</
template
>
</el-popconfirm>
</div>
</template>
<!-- 托盘绑定的物资表格 -->
<el-table
:data=
"pallet.goodsList"
border
style=
"width: 100%"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"60"
align=
"center"
/>
<el-table-column
prop=
"goodsCode"
label=
"品名编码"
align=
"center"
min-width=
"120"
/>
<el-table-column
prop=
"goodsName"
label=
"品名名称"
align=
"center"
min-width=
"150"
/>
<el-table-column
prop=
"modelCode"
label=
"号型编码"
align=
"center"
min-width=
"120"
/>
<el-table-column
prop=
"modelName"
label=
"号型名称"
align=
"center"
min-width=
"120"
/>
<el-table-column
prop=
"skuCode"
label=
"SKU编码"
align=
"center"
min-width=
"140"
/>
<el-table-column
prop=
"jldw"
label=
"计量单位"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"qty"
label=
"数量"
align=
"center"
width=
"100"
>
<
template
#
default=
"scope"
>
<el-input-number
v-model=
"scope.row.qty"
:min=
"1"
size=
"small"
@
change=
"handleQtyChange(pallet, scope.row)"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"100"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-popconfirm
title=
"确定要解绑该物资吗?"
@
confirm=
"handleDeleteGoods(pallet, scope.row)"
>
<template
#
reference
>
<el-button
type=
"danger"
size=
"small"
>
解绑
</el-button>
</
template
>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-collapse-item>
</el-collapse>
<!-- 空状态 -->
<el-empty
v-if=
"palletList.length === 0"
description=
"暂无托盘数据,请点击新增托盘"
/>
<!-- 分页 -->
<div
style=
"margin-top: 20px; display: flex; justify-content: flex-end;"
>
<el-pagination
v-model:current-page=
"pagination.current"
v-model:page-size=
"pagination.size"
:page-sizes=
"[5, 10, 20, 50]"
:total=
"pagination.total"
layout=
"total, sizes, prev, pager, next, jumper"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</el-card>
<!-- 新增托盘对话框(包含物资绑定) -->
<el-dialog
v-model=
"dialogVisible"
width=
"70%"
title=
"新增托盘"
@
close=
"handleDialogClose"
>
<el-form
:model=
"form"
:rules=
"formRules"
ref=
"formRef"
label-width=
"100px"
>
<el-form-item
label=
"托盘号"
prop=
"palletNo"
>
<el-input
v-model=
"form.palletNo"
placeholder=
"请输入托盘号"
clearable
style=
"width: 300px"
/>
</el-form-item>
<el-divider
content-position=
"left"
>
绑定物资
</el-divider>
<!-- 物资选择行 -->
<div
class=
"goods-select-row"
>
<el-select
v-model=
"currentGoodsId"
placeholder=
"请选择物资"
clearable
filterable
style=
"width: 300px"
@
change=
"handleSelectGoods"
>
<el-option
v-for=
"item in availableGoodsList"
:key=
"item.id"
:label=
"`${item.goodsCode} - ${item.goodsName} - ${item.modelName}`"
:value=
"item.id"
/>
</el-select>
<el-input-number
v-model=
"currentGoodsQty"
:min=
"1"
:max=
"999999"
placeholder=
"数量"
style=
"width: 150px; margin: 0 10px"
/>
<el-button
type=
"primary"
@
click=
"handleAddGoodsToForm"
:disabled=
"!currentGoodsId || currentGoodsQty < 1"
>
添加物资
</el-button>
</div>
<!-- 已选物资表格 -->
<el-table
:data=
"form.goodsList"
border
style=
"width: 100%; margin-top: 15px"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"60"
align=
"center"
/>
<el-table-column
prop=
"goodsCode"
label=
"品名编码"
align=
"center"
min-width=
"120"
/>
<el-table-column
prop=
"goodsName"
label=
"品名名称"
align=
"center"
min-width=
"150"
/>
<el-table-column
prop=
"modelCode"
label=
"号型编码"
align=
"center"
min-width=
"120"
/>
<el-table-column
prop=
"modelName"
label=
"号型名称"
align=
"center"
min-width=
"120"
/>
<el-table-column
prop=
"skuCode"
label=
"SKU编码"
align=
"center"
min-width=
"140"
/>
<el-table-column
prop=
"jldw"
label=
"计量单位"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"qty"
label=
"数量"
align=
"center"
width=
"120"
>
<
template
#
default=
"scope"
>
<el-input-number
v-model=
"scope.row.qty"
:min=
"1"
size=
"small"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"80"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-button
type=
"danger"
size=
"small"
@
click=
"handleRemoveGoodsFromForm(scope.$index)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-form>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmitPallet"
:loading=
"submitLoading"
>
确定
</el-button>
</div>
</
template
>
</el-dialog>
<!-- 添加物资对话框(用于已有托盘添加物资) -->
<el-dialog
v-model=
"goodsDialogVisible"
width=
"60%"
title=
"添加物资"
@
close=
"handleGoodsDialogClose"
>
<el-form
:model=
"goodsForm"
:rules=
"goodsFormRules"
ref=
"goodsFormRef"
label-width=
"100px"
>
<el-form-item
label=
"选择物资"
prop=
"goodsInfo"
>
<el-select
v-model=
"goodsForm.goodsInfo"
placeholder=
"请选择物资"
clearable
filterable
style=
"width: 100%"
@
change=
"handleGoodsChange"
>
<el-option
v-for=
"item in goodsList"
:key=
"item.id"
:label=
"`${item.goodsCode} - ${item.goodsName} - ${item.modelName}`"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"数量"
prop=
"qty"
>
<el-input-number
v-model=
"goodsForm.qty"
:min=
"1"
:max=
"999999"
style=
"width: 100%"
/>
</el-form-item>
<!-- 选中物资的详细信息展示 -->
<el-divider
content-position=
"left"
>
物资详细信息
</el-divider>
<el-descriptions
:column=
"2"
border
>
<el-descriptions-item
label=
"品名编码"
>
{{ selectedGoods.goodsCode || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"品名名称"
>
{{ selectedGoods.goodsName || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"号型编码"
>
{{ selectedGoods.modelCode || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"号型名称"
>
{{ selectedGoods.modelName || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"SKU编码"
>
{{ selectedGoods.skuCode || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"计量单位"
>
{{ selectedGoods.jldw || '-' }}
</el-descriptions-item>
<el-descriptions-item
label=
"箱规"
>
{{ selectedGoods.boxNum || '-' }}
</el-descriptions-item>
</el-descriptions>
</el-form>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"goodsDialogVisible = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleSubmitGoods"
:loading=
"submitLoading"
>
确定
</el-button>
</div>
</
template
>
</el-dialog>
</div>
</template>
<
script
>
import
{
defineComponent
,
ref
,
reactive
,
toRefs
,
getCurrentInstance
}
from
'vue'
import
{
defineComponent
,
ref
,
reactive
,
onMounted
,
computed
}
from
'vue'
import
{
getAction
}
from
'@/api/manage'
import
{
ElMessage
}
from
'element-plus'
import
{
postAction
}
from
'@/api/manage'
import
{
Plus
}
from
'@element-plus/icons-vue'
export
default
defineComponent
({
setup
()
{
const
bindList
=
ref
([])
const
channelList
=
ref
([])
const
billList
=
ref
([])
const
goodsList
=
ref
([])
const
modelList
=
ref
([])
const
formData
=
ref
({
amount
:
1
})
const
{
proxy
}
=
getCurrentInstance
()
const
searchData
=
ref
({
pageNo
:
1
,
pageSize
:
10
})
const
total
=
ref
(
0
)
const
state
=
reactive
({
url
:
{
getBindPage
:
'/bind/getBindPage'
,
getBillPage
:
'/bill/getBillPage'
,
getGoodsPage
:
'/bill/getGoodsPage'
,
getModelPage
:
'/bill/getModelPage'
,
updateBind
:
'/bind/updateBind'
}
});
function
handleCurrentChange
(
val
)
{
searchData
.
value
.
pageNo
=
val
loadData
()
}
const
loadData
=
(
e
)
=>
{
if
(
sessionStorage
.
getItem
(
'storeInfo'
))
{
searchData
.
value
.
storeCode
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
)).
storeCode
postAction
(
state
.
url
.
getBindPage
,
searchData
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
bindList
.
value
=
res
.
data
.
records
total
.
value
=
res
.
data
.
totalRows
-
0
if
(
e
)
{
}
else
{
if
(
res
.
data
.
records
.
length
>
0
)
{
formData
.
value
.
stationId
=
res
.
data
.
records
[
0
].
stationId
formData
.
value
.
id
=
res
.
data
.
records
[
0
].
id
}
}
})
}
}
const
loadSelect
=
()
=>
{
if
(
sessionStorage
.
getItem
(
'storeInfo'
))
{
postAction
(
state
.
url
.
getBillPage
,
{
pageNo
:
1
,
pageSize
:
50
,
type
:
'IN'
,
storeCode
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
)).
storeCode
}).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
billList
.
value
=
res
.
data
.
records
})
}
}
function
changeStation
(
value
)
{
if
(
value
)
{
formData
.
value
.
id
=
bindList
.
value
.
find
(
i
=>
i
.
stationId
==
formData
.
value
.
stationId
).
id
console
.
log
(
formData
.
value
.
id
)
}
}
function
changeBill
(
value
)
{
goodsList
.
value
=
[]
formData
.
value
.
goodsCode
=
''
modelList
.
value
=
[]
formData
.
value
.
modelCode
=
''
if
(
value
)
{
formData
.
value
.
bizBillNo
=
billList
.
value
.
find
(
i
=>
i
.
billNo
==
formData
.
value
.
billNo
).
bizBillNo
formData
.
value
.
billName
=
billList
.
value
.
find
(
i
=>
i
.
billNo
==
formData
.
value
.
billNo
).
billName
postAction
(
state
.
url
.
getGoodsPage
,
{
pageNo
:
1
,
pageSize
:
50
,
type
:
'IN'
,
storeCode
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
)).
storeCode
,
bizBillNo
:
formData
.
value
.
bizBillNo
}).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
goodsList
.
value
=
res
.
data
.
records
})
}
}
function
changeGoods
(
value
)
{
modelList
.
value
=
[]
formData
.
value
.
modelCode
=
''
if
(
value
)
{
formData
.
value
.
goodsName
=
goodsList
.
value
.
find
(
i
=>
i
.
goodsCode
==
formData
.
value
.
goodsCode
).
goodsName
postAction
(
state
.
url
.
getModelPage
,
{
pageNo
:
1
,
pageSize
:
50
,
type
:
'IN'
,
storeCode
:
JSON
.
parse
(
sessionStorage
.
getItem
(
'storeInfo'
)).
storeCode
,
bizBillNo
:
formData
.
value
.
bizBillNo
,
goodsCode
:
value
}).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
modelList
.
value
=
res
.
data
.
records
})
}
}
function
changeModel
(
value
)
{
if
(
value
)
{
formData
.
value
.
modelName
=
modelList
.
value
.
find
(
i
=>
i
.
modelCode
==
formData
.
value
.
modelCode
).
modelName
formData
.
value
.
skuCode
=
modelList
.
value
.
find
(
i
=>
i
.
modelCode
==
formData
.
value
.
modelCode
).
skuCode
}
}
function
automatic
()
{
formData
.
value
.
billNo
=
''
formData
.
value
.
goodsCode
=
''
formData
.
value
.
modelCode
=
''
formData
.
value
.
state
=
0
postAction
(
state
.
url
.
updateBind
,
formData
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
ElMessage
.
success
(
res
.
message
)
loadData
(
1
)
})
}
function
manual
()
{
if
(
!
formData
.
value
.
billNo
)
{
return
ElMessage
.
warning
(
'请选择单号'
)
}
if
(
!
formData
.
value
.
goodsCode
)
{
return
ElMessage
.
warning
(
'请选择品名'
)
}
if
(
!
formData
.
value
.
modelCode
)
{
return
ElMessage
.
warning
(
'请选择号型'
)
}
formData
.
value
.
state
=
1
postAction
(
state
.
url
.
updateBind
,
formData
.
value
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
return
ElMessage
.
error
(
res
.
message
);
ElMessage
.
success
(
res
.
message
)
loadData
(
1
)
})
}
// loadData()
loadSelect
()
return
{
...
toRefs
(
state
),
bindList
,
channelList
,
billList
,
goodsList
,
modelList
,
formData
,
searchData
,
total
,
handleCurrentChange
,
changeStation
,
changeBill
,
changeGoods
,
changeModel
,
automatic
,
manual
,
loadData
}
},
name
:
'PalletBinding'
,
components
:
{
Plus
},
setup
()
{
// 搜索表单
const
searchForm
=
reactive
({
palletNo
:
''
})
// 托盘列表数据(假数据)
const
palletList
=
ref
([])
// 展开的折叠面板
const
activeCollapse
=
ref
(
''
)
// 物资列表(从接口获取)
const
goodsList
=
ref
([])
// 分页配置
const
pagination
=
reactive
({
current
:
1
,
size
:
10
,
total
:
0
})
// 所有托盘数据(用于分页)
const
allPalletData
=
ref
([])
// 新增托盘对话框相关
const
dialogVisible
=
ref
(
false
)
const
formRef
=
ref
()
const
submitLoading
=
ref
(
false
)
const
form
=
reactive
({
palletNo
:
''
,
goodsList
:
[]
})
const
formRules
=
reactive
({
palletNo
:
[
{
required
:
true
,
message
:
'请输入托盘号'
,
trigger
:
'blur'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
const
exists
=
allPalletData
.
value
.
some
(
p
=>
p
.
palletNo
===
value
)
if
(
exists
)
{
callback
(
new
Error
(
'托盘号已存在'
))
}
else
{
callback
()
}
},
trigger
:
'blur'
}
]
})
// 新增托盘弹窗中的物资选择
const
currentGoodsId
=
ref
(
''
)
const
currentGoodsQty
=
ref
(
1
)
// 可用物资列表(排除已选的)
const
availableGoodsList
=
computed
(()
=>
{
const
selectedIds
=
form
.
goodsList
.
map
(
g
=>
g
.
id
)
return
goodsList
.
value
.
filter
(
g
=>
!
selectedIds
.
includes
(
g
.
id
))
})
// 添加物资对话框相关(用于已有托盘添加物资)
const
goodsDialogVisible
=
ref
(
false
)
const
goodsFormRef
=
ref
()
const
currentPallet
=
ref
(
null
)
const
goodsForm
=
reactive
({
goodsInfo
:
''
,
qty
:
1
})
const
goodsFormRules
=
reactive
({
goodsInfo
:
[
{
required
:
true
,
message
:
'请选择物资'
,
trigger
:
'change'
}
],
qty
:
[
{
required
:
true
,
message
:
'请输入数量'
,
trigger
:
'blur'
}
]
})
// 选中的物资信息
const
selectedGoods
=
reactive
({
id
:
''
,
goodsCode
:
''
,
goodsName
:
''
,
modelCode
:
''
,
modelName
:
''
,
skuCode
:
''
,
jldw
:
''
,
boxNum
:
''
})
// API URL配置
const
apiUrl
=
reactive
({
goodsList
:
'/goodsInfo/goodsInfo/list'
})
// 加载物资列表
const
loadGoodsList
=
()
=>
{
getAction
(
apiUrl
.
goodsList
).
then
(
res
=>
{
if
(
res
.
code
!==
99200
)
{
console
.
error
(
'加载物资列表失败:'
,
res
.
message
)
return
}
goodsList
.
value
=
res
.
data
||
[]
}).
catch
(
error
=>
{
console
.
error
(
'Load goods list error:'
,
error
)
// 假数据
goodsList
.
value
=
[
{
id
:
'1'
,
goodsCode
:
'123456'
,
goodsName
:
'鞋子'
,
modelCode
:
'1234560101'
,
modelName
:
'XL'
,
skuCode
:
'123456789'
,
jldw
:
'件'
,
boxNum
:
10
},
{
id
:
'2'
,
goodsCode
:
'123457'
,
goodsName
:
'手套'
,
modelCode
:
'1234570202'
,
modelName
:
'XXL'
,
skuCode
:
'123456782'
,
jldw
:
'双'
,
boxNum
:
10
},
{
id
:
'3'
,
goodsCode
:
'400001'
,
goodsName
:
'20靴'
,
modelCode
:
'4000010109'
,
modelName
:
'290'
,
skuCode
:
'889000004'
,
jldw
:
'件'
,
boxNum
:
10
},
{
id
:
'4'
,
goodsCode
:
'400001'
,
goodsName
:
'20靴'
,
modelCode
:
'4000010309'
,
modelName
:
'280'
,
skuCode
:
'889000006'
,
jldw
:
'件'
,
boxNum
:
10
},
{
id
:
'5'
,
goodsCode
:
'400002'
,
goodsName
:
'运动鞋'
,
modelCode
:
'4000020101'
,
modelName
:
'42'
,
skuCode
:
'889000007'
,
jldw
:
'双'
,
boxNum
:
20
}
]
})
}
// 加载托盘数据(假数据)
const
loadPalletData
=
()
=>
{
const
mockData
=
[
{
palletNo
:
'PALLET001'
,
goodsList
:
[
{
id
:
'1'
,
goodsCode
:
'123456'
,
goodsName
:
'鞋子'
,
modelCode
:
'1234560101'
,
modelName
:
'XL'
,
skuCode
:
'123456789'
,
jldw
:
'件'
,
boxNum
:
10
,
qty
:
50
},
{
id
:
'2'
,
goodsCode
:
'123457'
,
goodsName
:
'手套'
,
modelCode
:
'1234570202'
,
modelName
:
'XXL'
,
skuCode
:
'123456782'
,
jldw
:
'双'
,
boxNum
:
10
,
qty
:
100
}
]
},
{
palletNo
:
'PALLET002'
,
goodsList
:
[
{
id
:
'3'
,
goodsCode
:
'400001'
,
goodsName
:
'20靴'
,
modelCode
:
'4000010109'
,
modelName
:
'290'
,
skuCode
:
'889000004'
,
jldw
:
'件'
,
boxNum
:
10
,
qty
:
30
}
]
}
]
allPalletData
.
value
=
mockData
updatePageData
()
}
// 更新分页数据
const
updatePageData
=
()
=>
{
const
start
=
(
pagination
.
current
-
1
)
*
pagination
.
size
const
end
=
start
+
pagination
.
size
let
filteredData
=
[...
allPalletData
.
value
]
if
(
searchForm
.
palletNo
)
{
filteredData
=
filteredData
.
filter
(
p
=>
p
.
palletNo
.
includes
(
searchForm
.
palletNo
))
}
pagination
.
total
=
filteredData
.
length
palletList
.
value
=
filteredData
.
slice
(
start
,
end
)
if
(
palletList
.
value
.
length
>
0
&&
!
activeCollapse
.
value
)
{
activeCollapse
.
value
=
palletList
.
value
[
0
].
palletNo
}
}
// 搜索
const
handleSearch
=
()
=>
{
pagination
.
current
=
1
updatePageData
()
}
// 重置搜索
const
handleReset
=
()
=>
{
searchForm
.
palletNo
=
''
handleSearch
()
}
// 分页大小改变
const
handleSizeChange
=
(
val
)
=>
{
pagination
.
size
=
val
pagination
.
current
=
1
updatePageData
()
}
// 页码改变
const
handleCurrentChange
=
(
val
)
=>
{
pagination
.
current
=
val
updatePageData
()
}
// 新增托盘
const
handleAdd
=
()
=>
{
dialogVisible
.
value
=
true
}
// 选择物资添加到表单列表
const
handleSelectGoods
=
(
value
)
=>
{
// 只是选中,不自动添加
}
// 添加物资到表单
const
handleAddGoodsToForm
=
()
=>
{
const
goods
=
goodsList
.
value
.
find
(
g
=>
g
.
id
===
currentGoodsId
.
value
)
if
(
!
goods
)
return
// 检查是否已存在
if
(
form
.
goodsList
.
some
(
g
=>
g
.
id
===
goods
.
id
))
{
ElMessage
.
warning
(
'该物资已添加'
)
return
}
form
.
goodsList
.
push
({
id
:
goods
.
id
,
goodsCode
:
goods
.
goodsCode
,
goodsName
:
goods
.
goodsName
,
modelCode
:
goods
.
modelCode
,
modelName
:
goods
.
modelName
,
skuCode
:
goods
.
skuCode
,
jldw
:
goods
.
jldw
,
boxNum
:
goods
.
boxNum
,
qty
:
currentGoodsQty
.
value
})
// 重置选择
currentGoodsId
.
value
=
''
currentGoodsQty
.
value
=
1
ElMessage
.
success
(
'物资添加成功,请继续添加或提交托盘'
)
}
// 从表单中删除物资
const
handleRemoveGoodsFromForm
=
(
index
)
=>
{
form
.
goodsList
.
splice
(
index
,
1
)
}
// 提交新增托盘
const
handleSubmitPallet
=
()
=>
{
formRef
.
value
.
validate
((
valid
)
=>
{
if
(
!
valid
)
return
const
newPallet
=
{
palletNo
:
form
.
palletNo
,
goodsList
:
[...
form
.
goodsList
]
}
allPalletData
.
value
.
unshift
(
newPallet
)
updatePageData
()
ElMessage
.
success
(
`新增托盘成功,共绑定
${
form
.
goodsList
.
length
}
种物资`
)
dialogVisible
.
value
=
false
handleDialogClose
()
})
}
// 删除托盘
const
handleDeletePallet
=
(
pallet
)
=>
{
const
index
=
allPalletData
.
value
.
findIndex
(
p
=>
p
.
palletNo
===
pallet
.
palletNo
)
if
(
index
!==
-
1
)
{
allPalletData
.
value
.
splice
(
index
,
1
)
updatePageData
()
ElMessage
.
success
(
'删除托盘成功'
)
}
}
// 添加物资(已有托盘)
const
handleAddGoods
=
(
pallet
)
=>
{
currentPallet
.
value
=
pallet
goodsDialogVisible
.
value
=
true
}
// 物资选择变化
const
handleGoodsChange
=
(
value
)
=>
{
const
goods
=
goodsList
.
value
.
find
(
item
=>
item
.
id
==
value
)
if
(
goods
)
{
Object
.
assign
(
selectedGoods
,
{
id
:
goods
.
id
,
goodsCode
:
goods
.
goodsCode
,
goodsName
:
goods
.
goodsName
,
modelCode
:
goods
.
modelCode
,
modelName
:
goods
.
modelName
,
skuCode
:
goods
.
skuCode
,
jldw
:
goods
.
jldw
,
boxNum
:
goods
.
boxNum
})
}
else
{
Object
.
assign
(
selectedGoods
,
{
id
:
''
,
goodsCode
:
''
,
goodsName
:
''
,
modelCode
:
''
,
modelName
:
''
,
skuCode
:
''
,
jldw
:
''
,
boxNum
:
''
})
}
}
// 提交添加物资(已有托盘)
const
handleSubmitGoods
=
()
=>
{
goodsFormRef
.
value
.
validate
((
valid
)
=>
{
if
(
!
valid
)
return
const
selected
=
goodsList
.
value
.
find
(
item
=>
item
.
id
==
goodsForm
.
goodsInfo
)
if
(
!
selected
)
{
ElMessage
.
warning
(
'请选择有效的物资'
)
return
}
if
(
currentPallet
.
value
.
goodsList
.
some
(
g
=>
g
.
id
===
selected
.
id
))
{
ElMessage
.
warning
(
'该物资已绑定在当前托盘上'
)
return
}
const
newGoods
=
{
id
:
selected
.
id
,
goodsCode
:
selected
.
goodsCode
,
goodsName
:
selected
.
goodsName
,
modelCode
:
selected
.
modelCode
,
modelName
:
selected
.
modelName
,
skuCode
:
selected
.
skuCode
,
jldw
:
selected
.
jldw
,
boxNum
:
selected
.
boxNum
,
qty
:
goodsForm
.
qty
}
currentPallet
.
value
.
goodsList
.
push
(
newGoods
)
updatePageData
()
ElMessage
.
success
(
'添加物资成功'
)
goodsDialogVisible
.
value
=
false
handleGoodsDialogClose
()
})
}
// 删除物资
const
handleDeleteGoods
=
(
pallet
,
goods
)
=>
{
const
index
=
pallet
.
goodsList
.
findIndex
(
g
=>
g
.
id
===
goods
.
id
)
if
(
index
!==
-
1
)
{
pallet
.
goodsList
.
splice
(
index
,
1
)
updatePageData
()
ElMessage
.
success
(
'解绑成功'
)
}
}
// 数量变更
const
handleQtyChange
=
(
pallet
,
goods
)
=>
{
console
.
log
(
'数量变更:'
,
pallet
.
palletNo
,
goods
.
goodsCode
,
goods
.
qty
)
}
// 关闭新增托盘对话框
const
handleDialogClose
=
()
=>
{
form
.
palletNo
=
''
form
.
goodsList
=
[]
currentGoodsId
.
value
=
''
currentGoodsQty
.
value
=
1
formRef
.
value
?.
resetFields
()
}
// 关闭添加物资对话框
const
handleGoodsDialogClose
=
()
=>
{
goodsForm
.
goodsInfo
=
''
goodsForm
.
qty
=
1
Object
.
assign
(
selectedGoods
,
{
id
:
''
,
goodsCode
:
''
,
goodsName
:
''
,
modelCode
:
''
,
modelName
:
''
,
skuCode
:
''
,
jldw
:
''
,
boxNum
:
''
})
goodsFormRef
.
value
?.
resetFields
()
currentPallet
.
value
=
null
}
// 初始化
onMounted
(()
=>
{
loadGoodsList
()
loadPalletData
()
})
return
{
searchForm
,
palletList
,
goodsList
,
availableGoodsList
,
activeCollapse
,
pagination
,
dialogVisible
,
goodsDialogVisible
,
form
,
formRules
,
formRef
,
submitLoading
,
currentGoodsId
,
currentGoodsQty
,
goodsForm
,
goodsFormRules
,
goodsFormRef
,
selectedGoods
,
handleSearch
,
handleReset
,
handleSizeChange
,
handleCurrentChange
,
handleAdd
,
handleSelectGoods
,
handleAddGoodsToForm
,
handleRemoveGoodsFromForm
,
handleSubmitPallet
,
handleDeletePallet
,
handleAddGoods
,
handleGoodsChange
,
handleSubmitGoods
,
handleDeleteGoods
,
handleQtyChange
,
handleDialogClose
,
handleGoodsDialogClose
}
}
})
</
script
>
\ No newline at end of file
</
script
>
<
style
scoped
>
.head-container
{
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
}
.dialog-footer
{
display
:
flex
;
justify-content
:
flex-end
;
gap
:
12px
;
}
.collapse-title
{
display
:
flex
;
align-items
:
center
;
gap
:
20px
;
flex
:
1
;
}
.pallet-no
{
font-size
:
16px
;
font-weight
:
bold
;
color
:
#303133
;
}
.goods-count
{
font-size
:
14px
;
color
:
#909399
;
}
.goods-select-row
{
display
:
flex
;
align-items
:
center
;
padding
:
10px
0
;
}
:deep
(
.el-collapse-item__header
)
{
padding
:
0
16px
;
}
:deep
(
.el-collapse-item__wrap
)
{
padding
:
16px
;
}
:deep
(
.el-input-number
.el-input__inner
)
{
text-align
:
left
;
}
.card-header
{
height
:
26px
;
font-size
:
20px
;
font-weight
:
bold
;
font-family
:
'Times New Roman'
,
Times
,
serif
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论