Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
30837f9858 | |||
b6763f37aa | |||
732ca54eef | |||
072757fada | |||
30ed83a8c2 | |||
404c5fe121 | |||
dcba6962f2 | |||
cf2a5a7861 | |||
5cdd141dc4 | |||
43f9da790e | |||
baa2094fb6 | |||
89e51af775 | |||
d8a2b3d301 | |||
23a733e178 | |||
f2e8952030 | |||
49bbd6fcda | |||
dc406786e7 | |||
97b8ddd3b5 | |||
1cc0f4671e | |||
67a21b43e6 | |||
83ebb675dc |
8
.env.dev
8
.env.dev
@ -2,7 +2,7 @@
|
||||
# @Author: zwq
|
||||
# @Date: 2023-08-17 15:10:53
|
||||
# @LastEditors: zwq
|
||||
# @LastEditTime: 2023-11-02 10:02:06
|
||||
# @LastEditTime: 2024-05-11 15:03:43
|
||||
# @Description:
|
||||
###
|
||||
# 开发环境配置
|
||||
@ -12,9 +12,9 @@ ENV = 'development'
|
||||
VUE_APP_TITLE = 南京锂膜管理系统
|
||||
|
||||
# 南京锂膜管理系统/开发环境
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.23:48080'
|
||||
VUE_APP_BASE_API = 'http://192.168.0.31:48081'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.26:48080'
|
||||
# VUE_APP_BASE_API = 'http://192.168.1.118:48081'
|
||||
# VUE_APP_BASE_API = 'http://192.168.0.31:48081'
|
||||
VUE_APP_BASE_API = 'http://192.168.1.20:48081'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
@ -2,7 +2,7 @@
|
||||
# @Author: zwq
|
||||
# @Date: 2023-08-17 15:10:53
|
||||
# @LastEditors: zwq
|
||||
# @LastEditTime: 2023-11-02 11:20:37
|
||||
# @LastEditTime: 2024-04-28 11:50:59
|
||||
# @Description:
|
||||
###
|
||||
# 生产环境配置
|
||||
@ -12,10 +12,12 @@ ENV = 'production'
|
||||
VUE_APP_TITLE = 南京锂膜管理系统
|
||||
|
||||
# 南京锂膜管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
# VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_BASE_API = ''
|
||||
|
||||
# 根据服务器或域名修改
|
||||
PUBLIC_PATH = 'http://192.168.0.31:8003/'
|
||||
# PUBLIC_PATH = 'http://192.168.0.31:8003/'
|
||||
PUBLIC_PATH = ''
|
||||
# 二级部署路径
|
||||
VUE_APP_APP_NAME ='yudao-admin'
|
||||
|
||||
|
@ -55,6 +55,7 @@
|
||||
"file-saver": "2.0.5",
|
||||
"fuse.js": "6.6.2",
|
||||
"highlight.js": "9.18.5",
|
||||
"jquery": "^3.7.1",
|
||||
"js-beautify": "1.13.0",
|
||||
"jsencrypt": "3.3.1",
|
||||
"min-dash": "3.5.2",
|
||||
|
43
src/App.vue
43
src/App.vue
@ -1,28 +1,39 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-17 15:10:52
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-04-29 14:12:16
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
<theme-picker />
|
||||
</div>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
<theme-picker />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ThemePicker from "@/components/ThemePicker";
|
||||
import ThemePicker from '@/components/ThemePicker';
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
components: { ThemePicker },
|
||||
metaInfo() {
|
||||
return {
|
||||
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
|
||||
titleTemplate: title => {
|
||||
return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
|
||||
}
|
||||
}
|
||||
}
|
||||
name: 'App',
|
||||
components: { ThemePicker },
|
||||
metaInfo() {
|
||||
return {
|
||||
title:
|
||||
this.$store.state.settings.dynamicTitle &&
|
||||
this.$store.state.settings.title,
|
||||
titleTemplate: (title) => {
|
||||
return title
|
||||
? `${title} - ${process.env.VUE_APP_TITLE}`
|
||||
: process.env.VUE_APP_TITLE;
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
#app .theme-picker {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
28
src/api/asrs/stacker.js
Normal file
28
src/api/asrs/stacker.js
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:23:58
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-09-23 14:03:46
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
// 更新巷道
|
||||
export function updateStacker(data) {
|
||||
return request({
|
||||
url: '/asrs/stacker/update',
|
||||
method: 'put',
|
||||
data: data,
|
||||
timeout: 100000,
|
||||
})
|
||||
}
|
||||
|
||||
// 获得巷道分页
|
||||
export function getStackerPage(query) {
|
||||
return request({
|
||||
url: '/asrs/stacker/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
59
src/api/asrs/warehousePklb.js
Normal file
59
src/api/asrs/warehousePklb.js
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 14:50:15
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-06-07 10:49:13
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获得盘库分页
|
||||
export function getWarehousePklbPage(query) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-pklb/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 盘货明细表
|
||||
export function getWarehousePklbDetailPage(query) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-pklb-detail/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 检查盘货明细表
|
||||
export function getWarehousePklbDetailCheck(data) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-pklb-detail/check',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 盘货入库
|
||||
export function makeWarehouseIn(data) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-storehouse/makewarehousein',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 同步mes出库
|
||||
export function checkout(data) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-pklb-detail/checkout',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 导出盘库 Excel
|
||||
export function exportWarehouseExcel(query) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-pklb/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:31:37
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-31 09:48:35
|
||||
* @LastEditTime: 2024-06-04 16:14:21
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
@ -40,6 +40,14 @@ export function outWarehouseStorehouse(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 盘库
|
||||
export function makeWarehouseStorehouse(data) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-storehouse/makewarehouseout',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除立库库位
|
||||
export function deleteWarehouseStorehouse(id) {
|
||||
return request({
|
||||
@ -84,6 +92,15 @@ export function getWarehouseStorehousePage(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得立库库位分页
|
||||
export function getWarehouseStorehouseMonitoring(query) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-storehouse/monitoring',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获得立库库位列表
|
||||
export function getWarehouseStorehouseList(query) {
|
||||
return request({
|
||||
@ -100,6 +117,29 @@ export function getLineList(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获得线边库
|
||||
export function getLine(id) {
|
||||
return request({
|
||||
url: '/asrs/line-edge-library/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 更新线边库
|
||||
export function updateLine(data) {
|
||||
return request({
|
||||
url: '/asrs/line-edge-library/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 码头移库
|
||||
export function moveLine(query) {
|
||||
return request({
|
||||
url: '/asrs/line-edge-library/move',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 导出立库库位 Excel
|
||||
export function exportWarehouseStorehouseExcel(query) {
|
||||
return request({
|
||||
|
@ -16,6 +16,22 @@ export function inventoryOverview(id) {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 熟化时间提醒
|
||||
export function rollTimeRemind(day) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-storehouse-goods-specification/xday?xDays=' + day,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 导出熟化时间提醒 Excel
|
||||
export function exportgetoverfinishtimeExcel(day) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-storehouse-goods-specification/exportgetoverfinishtime?xDays=' + day,
|
||||
method: 'get',
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 更新立体仓库货物规格关联
|
||||
export function updateWarehouseStorehouseGoodsSpecification(data) {
|
||||
return request({
|
||||
|
@ -52,3 +52,12 @@ export function exportAgvLogExcel(query) {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得wcs堆垛机报警分页
|
||||
export function getWCSAlarmPage(query) {
|
||||
return request({
|
||||
url: '/asrs/wcs-alarm/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
137
src/api/oth/delivery.js
Normal file
137
src/api/oth/delivery.js
Normal file
@ -0,0 +1,137 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2024-04-16 15:08:37
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-07-15 13:42:39
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
// 创建出库单
|
||||
export function createDelivery(data) {
|
||||
return request({
|
||||
url: '/asrs/delivery/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 创建点对点出库单
|
||||
export function createDeliveryList(data) {
|
||||
return request({
|
||||
url: '/asrs/delivery/createList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新出库单
|
||||
export function updateDelivery(data) {
|
||||
return request({
|
||||
url: '/asrs/delivery/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除出库单
|
||||
export function deleteDelivery(id) {
|
||||
return request({
|
||||
url: '/asrs/delivery/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得出库单
|
||||
export function getDelivery(id) {
|
||||
return request({
|
||||
url: '/asrs/delivery/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 获得出库单分页
|
||||
export function getDeliveryPage(query) {
|
||||
return request({
|
||||
url: '/asrs/delivery/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 重启当前出库单
|
||||
export function restartDelivery(data) {
|
||||
return request({
|
||||
url: '/asrs/delivery/restart',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 暂停当前出库单
|
||||
export function pauseDelivery(data) {
|
||||
return request({
|
||||
url: '/asrs/delivery/pause',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 提升当前出库单
|
||||
export function improveDelivery(data) {
|
||||
return request({
|
||||
url: '/asrs/delivery/improve',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 取消当前出库单
|
||||
export function cancelDelivery(data) {
|
||||
return request({
|
||||
url: '/asrs/delivery/cancel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获得出库单历史分页
|
||||
export function getDeliveryHisPage(query) {
|
||||
return request({
|
||||
url: '/asrs/delivery-history/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得出库单历史和膜卷关系
|
||||
export function getDeliveryHisProPage(query) {
|
||||
return request({
|
||||
url: '/asrs/delivery-history-product/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获得code
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/asrs/delivery/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出历史 Excel
|
||||
export function exportDeliveryHisExcel(query) {
|
||||
return request({
|
||||
url: '/asrs/delivery-history-product/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 出库后同步mes信息
|
||||
export function mesoutsync(data) {
|
||||
return request({
|
||||
url: '/asrs/delivery-history/mesoutsync',
|
||||
method: 'post',
|
||||
data: data,
|
||||
timeout: 100000,
|
||||
})
|
||||
}
|
49
src/api/oth/equipment.js
Normal file
49
src/api/oth/equipment.js
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2024-04-02 14:13:57
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-04-03 10:54:07
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获得设备保养记录日志分页
|
||||
export function getEquipmentLogPage(query) {
|
||||
return request({
|
||||
url: '/asrs/mes-equipment-parts-maintenance-log/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获得设备保养操作日志分页
|
||||
export function getEquipmentPage(query) {
|
||||
return request({
|
||||
url: '/asrs/mes-equipment-parts-maintenance/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 润滑
|
||||
export function update(data) {
|
||||
return request({
|
||||
url: '/asrs/mes-equipment-parts-maintenance/oiling',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 更换
|
||||
export function up(data) {
|
||||
return request({
|
||||
url: '/asrs/mes-equipment-parts-maintenance/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 清洗
|
||||
export function clean(data) {
|
||||
return request({
|
||||
url: '/asrs/mes-equipment-parts-maintenance/clean',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
68
src/api/oth/equipmentList.js
Normal file
68
src/api/oth/equipmentList.js
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 14:50:15
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-06-11 14:48:15
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建立库仓库
|
||||
export function createEquipment(data) {
|
||||
return request({
|
||||
url: '/asrs/equipment/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新立库仓库
|
||||
export function updateEquipment(data) {
|
||||
return request({
|
||||
url: '/asrs/equipment/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获得仓库code
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/asrs/equipment/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
// 删除立库仓库
|
||||
export function deleteEquipment(id) {
|
||||
return request({
|
||||
url: '/asrs/equipment/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得立库仓库
|
||||
export function getEquipment(id) {
|
||||
return request({
|
||||
url: '/asrs/equipment/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得立库仓库分页
|
||||
export function getEquipmentPage(query) {
|
||||
return request({
|
||||
url: '/asrs/equipment/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出立库仓库 Excel
|
||||
export function exportEquipmentExcel(query) {
|
||||
return request({
|
||||
url: '/asrs/equipment/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
68
src/api/oth/equipmentType.js
Normal file
68
src/api/oth/equipmentType.js
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 14:50:15
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-06-11 14:48:15
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建立库仓库
|
||||
export function createEquipmentType(data) {
|
||||
return request({
|
||||
url: '/asrs/equipment-type/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新立库仓库
|
||||
export function updateEquipmentType(data) {
|
||||
return request({
|
||||
url: '/asrs/equipment-type/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获得仓库code
|
||||
export function getCode() {
|
||||
return request({
|
||||
url: '/asrs/equipment-type/getCode',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
// 删除立库仓库
|
||||
export function deleteEquipmentType(id) {
|
||||
return request({
|
||||
url: '/asrs/equipment-type/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得立库仓库
|
||||
export function getEquipmentType(id) {
|
||||
return request({
|
||||
url: '/asrs/equipment-type/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得立库仓库分页
|
||||
export function getEquipmentTypePage(query) {
|
||||
return request({
|
||||
url: '/asrs/equipment-type/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 导出立库仓库 Excel
|
||||
export function exportEquipmentTypeExcel(query) {
|
||||
return request({
|
||||
url: '/asrs/equipment-type/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
@ -52,3 +52,11 @@ export function exportMainTaskExcel(query) {
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
// 重补空托盘
|
||||
export function Radd(id) {
|
||||
return request({
|
||||
url: '/asrs/job-main-task/reoutemptytray?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-09-07 14:01:29
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-09-07 14:17:19
|
||||
* @LastEditTime: 2024-03-13 14:57:37
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
25
src/api/oth/rollMessage.js
Normal file
25
src/api/oth/rollMessage.js
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2024-05-10 10:02:43
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-05-10 10:15:45
|
||||
* @Description:
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
// 获得分页
|
||||
export function getPage(query) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-storehouse-goods-specification/rollMessagePage',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 导出Excel
|
||||
export function exportExcel(query) {
|
||||
return request({
|
||||
url: '/asrs/warehouse-storehouse-goods-specification/exportRollMessage',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
@ -71,7 +71,6 @@
|
||||
}
|
||||
|
||||
.el-menu-item, .el-submenu__title {
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
@ -105,7 +104,7 @@
|
||||
background-color: $base-sub-menu-hover !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
& .theme-dark .el-submenu .el-menu-item.is-active {
|
||||
background-color: #0b50ff !important;
|
||||
}
|
||||
|
@ -1,83 +1,84 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-17 15:10:53
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-20 15:30:57
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-popover placement="bottom" width="600" trigger="click">
|
||||
<!-- icon 展示 -->
|
||||
<el-badge slot="reference" :is-dot="unreadCount > 0" type="danger">
|
||||
<svg-icon icon-class="message" @click="getList"/>
|
||||
</el-badge>
|
||||
|
||||
<!-- 弹出列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column width="120" property="templateNickname" label="发送人" />
|
||||
<el-table-column width="180" property="createTime" label="发送时间">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center" prop="templateType" width="100">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE" :value="scope.row.templateType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="templateContent" label="内容" />
|
||||
</el-table>
|
||||
|
||||
<!-- 更多 -->
|
||||
<div style="text-align: right; margin-top: 10px">
|
||||
<el-button type="primary" size="mini" @click="goMyList">查看全部</el-button>
|
||||
</div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<div title="膜卷熟化时间提醒" >
|
||||
<svg-icon icon-class="message" @click="refreshPage" />
|
||||
<!-- icon 展示 -->
|
||||
<el-badge :value="unreadCount" type="danger" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getUnreadNotifyMessageCount, getUnreadNotifyMessageList} from "@/api/system/notify/message";
|
||||
import { listData } from '@/api/system/dict/data';
|
||||
import { rollTimeRemind } from '@/api/asrs/warehouseStorehouseGoodsSpecification';
|
||||
|
||||
export default {
|
||||
name: 'NotifyMessage',
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 列表
|
||||
list: [],
|
||||
// 未读数量,
|
||||
unreadCount: 0,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 首次加载小红点
|
||||
this.getUnreadCount()
|
||||
// 轮询刷新小红点
|
||||
setInterval(() => {
|
||||
this.getUnreadCount()
|
||||
},1000 * 60 * 2)
|
||||
},
|
||||
methods: {
|
||||
getList: function() {
|
||||
this.loading = true;
|
||||
getUnreadNotifyMessageList().then(response => {
|
||||
this.list = response.data;
|
||||
this.loading = false;
|
||||
// 强制设置 unreadCount 为 0,避免小红点因为轮询太慢,不消除
|
||||
this.unreadCount = 0
|
||||
});
|
||||
},
|
||||
getUnreadCount: function() {
|
||||
getUnreadNotifyMessageCount().then(response => {
|
||||
this.unreadCount = response.data;
|
||||
})
|
||||
},
|
||||
goMyList: function() {
|
||||
this.$router.push({
|
||||
name: 'MyNotifyMessage'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
name: 'NotifyMessage',
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 列表
|
||||
list: [],
|
||||
// 未读数量,
|
||||
unreadCount: 0,
|
||||
xDays: '',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.setTimer();
|
||||
},
|
||||
created() {
|
||||
// 首次加载小红点
|
||||
this.refreshPage();
|
||||
// 轮询刷新小红点
|
||||
setInterval(() => {
|
||||
this.refreshPage();
|
||||
}, 1000 * 60 * 60);
|
||||
},
|
||||
methods: {
|
||||
setTimer() {
|
||||
// 获取当前时间
|
||||
const now = new Date();
|
||||
// 计算到下一个午夜12点的时间差(毫秒)
|
||||
const timeToMidnight =
|
||||
23 * 60 * 60 * 1000 +
|
||||
59 * 60 * 1000 +
|
||||
59 * 1000 -
|
||||
(now.getTime() % (24 * 60 * 60 * 1000));
|
||||
// 设置定时器
|
||||
this.timer = setTimeout(this.refreshPage, timeToMidnight);
|
||||
},
|
||||
refreshPage() {
|
||||
this.unreadCount = 0;
|
||||
const queryParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
dictType: 'rollTimeRemind',
|
||||
};
|
||||
listData(queryParams).then((response) => {
|
||||
if (response.data.list.length > 0) {
|
||||
this.xDays = response.data.list[0].value;
|
||||
rollTimeRemind(this.xDays).then((response) => {
|
||||
this.unreadCount = response.length;
|
||||
console.log(this.unreadCount);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 重新设置定时器
|
||||
this.setTimer();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.el-badge__content.is-fixed {
|
||||
top: 10px; /* 保证徽章的位置 */
|
||||
top: 10px; /* 保证徽章的位置 */
|
||||
}
|
||||
</style>
|
||||
|
@ -1,33 +1,61 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'MenuItem',
|
||||
functional: true,
|
||||
props: {
|
||||
icon: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
render(h, context) {
|
||||
const { icon, title } = context.props
|
||||
const vnodes = []
|
||||
name: 'MenuItem',
|
||||
functional: true,
|
||||
props: {
|
||||
icon: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
componentName: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
num: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
}, //用来传入小红点个数
|
||||
},
|
||||
render(h, context) {
|
||||
const { icon, title, num, componentName } = context.props;
|
||||
const vnodes = [];
|
||||
|
||||
if (icon) {
|
||||
vnodes.push(<svg-icon icon-class={icon}/>)
|
||||
}
|
||||
if (icon) {
|
||||
vnodes.push(<svg-icon icon-class={icon} />);
|
||||
}
|
||||
|
||||
if (title) {
|
||||
if (title.length > 5) {
|
||||
vnodes.push(<span slot='title' title={(title)}>{(title)}</span>)
|
||||
} else {
|
||||
vnodes.push(<span slot='title'>{(title)}</span>)
|
||||
}
|
||||
}
|
||||
return vnodes
|
||||
}
|
||||
}
|
||||
if (title) {
|
||||
if (title == '膜卷熟化时间提醒') {
|
||||
vnodes.push(
|
||||
<span slot="title" title={title}>
|
||||
{title}
|
||||
<el-badge value={num} class="item" id={componentName} />
|
||||
</span>
|
||||
);
|
||||
} else {
|
||||
if (title.length > 5) {
|
||||
vnodes.push(
|
||||
<span slot="title" title={title}>
|
||||
{title}
|
||||
</span>
|
||||
);
|
||||
} else {
|
||||
vnodes.push(<span slot="title">{title}</span>);
|
||||
}
|
||||
}
|
||||
}
|
||||
return vnodes;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.item {
|
||||
margin-top: -20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,96 +1,171 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-17 15:10:53
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-10-09 15:21:32
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div v-if="!item.hidden">
|
||||
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
</template>
|
||||
<div v-if="!item.hidden">
|
||||
<template
|
||||
v-if="
|
||||
hasOneShowingChild(item.children, item) &&
|
||||
(!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
|
||||
!item.alwaysShow
|
||||
">
|
||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||
<el-menu-item
|
||||
:index="resolvePath(onlyOneChild.path)"
|
||||
:class="{ 'submenu-title-noDropdown': !isNest }">
|
||||
<item
|
||||
:num="message_num(onlyOneChild)"
|
||||
:componentName="onlyOneChild.componentName"
|
||||
:icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
|
||||
:title="onlyOneChild.meta.title" />
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
</template>
|
||||
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template slot="title">
|
||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
||||
</template>
|
||||
<sidebar-item
|
||||
v-for="(child, index) in item.children"
|
||||
:key="child.path + index"
|
||||
:is-nest="true"
|
||||
:item="child"
|
||||
:base-path="resolvePath(child.path)"
|
||||
class="nest-menu"
|
||||
/>
|
||||
</el-submenu>
|
||||
</div>
|
||||
<el-submenu
|
||||
v-else
|
||||
ref="subMenu"
|
||||
:index="resolvePath(item.path)"
|
||||
popper-append-to-body>
|
||||
<template slot="title">
|
||||
<item
|
||||
v-if="item.meta"
|
||||
:icon="item.meta && item.meta.icon"
|
||||
:title="item.meta.title" />
|
||||
</template>
|
||||
<sidebar-item
|
||||
v-for="(child, index) in item.children"
|
||||
:key="child.path + index"
|
||||
:is-nest="true"
|
||||
:item="child"
|
||||
:base-path="resolvePath(child.path)"
|
||||
class="nest-menu" />
|
||||
</el-submenu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import path from 'path'
|
||||
import { isExternal } from '@/utils/validate'
|
||||
import Item from './Item'
|
||||
import AppLink from './Link'
|
||||
import FixiOSBug from './FixiOSBug'
|
||||
import path from 'path';
|
||||
import { isExternal } from '@/utils/validate';
|
||||
import Item from './Item';
|
||||
import AppLink from './Link';
|
||||
import FixiOSBug from './FixiOSBug';
|
||||
import { listData } from '@/api/system/dict/data';
|
||||
import { rollTimeRemind } from '@/api/asrs/warehouseStorehouseGoodsSpecification';
|
||||
|
||||
export default {
|
||||
name: 'SidebarItem',
|
||||
components: { Item, AppLink },
|
||||
mixins: [FixiOSBug],
|
||||
props: {
|
||||
// route object
|
||||
item: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
isNest: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
basePath: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
this.onlyOneChild = null
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
hasOneShowingChild(children = [], parent) {
|
||||
if (!children) {
|
||||
children = [];
|
||||
}
|
||||
const showingChildren = children.filter(item => {
|
||||
if (item.hidden) {
|
||||
return false
|
||||
} else {
|
||||
// Temp set(will be used if only has one showing child)
|
||||
this.onlyOneChild = item
|
||||
return true
|
||||
}
|
||||
})
|
||||
name: 'SidebarItem',
|
||||
components: { Item, AppLink },
|
||||
mixins: [FixiOSBug],
|
||||
props: {
|
||||
// route object
|
||||
item: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
isNest: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
basePath: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
this.onlyOneChild = null;
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
setTimer() {
|
||||
// 获取当前时间
|
||||
const now = new Date();
|
||||
// 计算到下一个午夜12点的时间差(毫秒)
|
||||
const timeToMidnight =
|
||||
23 * 60 * 60 * 1000 +
|
||||
59 * 60 * 1000 +
|
||||
59 * 1000 -
|
||||
(now.getTime() % (24 * 60 * 60 * 1000));
|
||||
// 设置定时器
|
||||
this.timer = setTimeout(this.refreshPage, timeToMidnight);
|
||||
},
|
||||
refreshPage(componentName) {
|
||||
let remindCount = 0;
|
||||
const queryParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
dictType: 'rollTimeRemind',
|
||||
};
|
||||
listData(queryParams).then((response) => {
|
||||
if (response.data.list.length > 0) {
|
||||
rollTimeRemind(response.data.list[0].value).then((response) => {
|
||||
remindCount = response.length;
|
||||
console.log(componentName);
|
||||
const elx = document
|
||||
.getElementById(componentName)
|
||||
.getElementsByClassName('el-badge__content')[0];
|
||||
console.log(componentName);
|
||||
console.log(elx);
|
||||
elx.innerHTML = remindCount;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// When there is only one child router, the child router is displayed by default
|
||||
if (showingChildren.length === 1) {
|
||||
return true
|
||||
}
|
||||
// 重新设置定时器
|
||||
this.setTimer();
|
||||
},
|
||||
message_num(data) {
|
||||
if (data.meta.title == '膜卷熟化时间提醒') {
|
||||
console.log(data);
|
||||
//判断自己需要传入的标题,不然你标题多的时候会请求很多次
|
||||
this.refreshPage(data.componentName);
|
||||
setInterval(() => {
|
||||
this.refreshPage(data.componentName);
|
||||
}, 1000 * 60 * 60 * 12);
|
||||
let num = 0; //到时候这边可以换成接口赋值
|
||||
return num;
|
||||
}
|
||||
},
|
||||
hasOneShowingChild(children = [], parent) {
|
||||
if (!children) {
|
||||
children = [];
|
||||
}
|
||||
const showingChildren = children.filter((item) => {
|
||||
if (item.hidden) {
|
||||
return false;
|
||||
} else {
|
||||
// Temp set(will be used if only has one showing child)
|
||||
this.onlyOneChild = item;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
// Show parent if there are no child router to display
|
||||
if (showingChildren.length === 0) {
|
||||
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
|
||||
return true
|
||||
}
|
||||
// When there is only one child router, the child router is displayed by default
|
||||
if (showingChildren.length === 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false
|
||||
},
|
||||
resolvePath(routePath) {
|
||||
if (isExternal(routePath)) {
|
||||
return routePath
|
||||
}
|
||||
if (isExternal(this.basePath)) {
|
||||
return this.basePath
|
||||
}
|
||||
return path.resolve(this.basePath, routePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Show parent if there are no child router to display
|
||||
if (showingChildren.length === 0) {
|
||||
this.onlyOneChild = { ...parent, path: '', noShowingChildren: true };
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
resolvePath(routePath) {
|
||||
if (isExternal(routePath)) {
|
||||
return routePath;
|
||||
}
|
||||
if (isExternal(this.basePath)) {
|
||||
return this.basePath;
|
||||
}
|
||||
return path.resolve(this.basePath, routePath);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -1,112 +1,203 @@
|
||||
<template>
|
||||
<div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
|
||||
<div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
|
||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||
<div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
|
||||
<div :class="{'fixed-header':fixedHeader}">
|
||||
<navbar />
|
||||
<tags-view v-if="needTagsView" />
|
||||
</div>
|
||||
<app-main />
|
||||
<div class="main-footer" style="color: #C7C7C7; user-select: none; font-size: 14px; letter-spacing: 1px; height: 30px; display: grid; place-content: center;">© 中建材智能自动化研究院有限公司</div>
|
||||
<right-panel>
|
||||
<settings />
|
||||
</right-panel>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:class="classObj"
|
||||
class="app-wrapper"
|
||||
:style="{ '--current-color': theme }">
|
||||
<div
|
||||
v-if="device === 'mobile' && sidebar.opened"
|
||||
class="drawer-bg"
|
||||
@click="handleClickOutside" />
|
||||
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
|
||||
<div
|
||||
:class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
|
||||
class="main-container">
|
||||
<div :class="{ 'fixed-header': fixedHeader }">
|
||||
<navbar />
|
||||
<tags-view v-if="needTagsView" />
|
||||
</div>
|
||||
<app-main />
|
||||
<div
|
||||
class="main-footer"
|
||||
style="
|
||||
color: #c7c7c7;
|
||||
user-select: none;
|
||||
font-size: 14px;
|
||||
letter-spacing: 1px;
|
||||
height: 30px;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
">
|
||||
© 中建材智能自动化研究院有限公司
|
||||
</div>
|
||||
<right-panel>
|
||||
<settings />
|
||||
</right-panel>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import RightPanel from '@/components/RightPanel'
|
||||
import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
|
||||
import ResizeMixin from './mixin/ResizeHandler'
|
||||
import { mapState } from 'vuex'
|
||||
import variables from '@/assets/styles/variables.scss'
|
||||
import RightPanel from '@/components/RightPanel';
|
||||
import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components';
|
||||
import ResizeMixin from './mixin/ResizeHandler';
|
||||
import { mapState } from 'vuex';
|
||||
import variables from '@/assets/styles/variables.scss';
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
name: 'Layout',
|
||||
components: {
|
||||
AppMain,
|
||||
Navbar,
|
||||
RightPanel,
|
||||
Settings,
|
||||
Sidebar,
|
||||
TagsView
|
||||
},
|
||||
mixins: [ResizeMixin],
|
||||
computed: {
|
||||
...mapState({
|
||||
theme: state => state.settings.theme,
|
||||
sideTheme: state => state.settings.sideTheme,
|
||||
sidebar: state => state.app.sidebar,
|
||||
device: state => state.app.device,
|
||||
needTagsView: state => state.settings.tagsView,
|
||||
fixedHeader: state => state.settings.fixedHeader
|
||||
}),
|
||||
classObj() {
|
||||
return {
|
||||
hideSidebar: !this.sidebar.opened,
|
||||
openSidebar: this.sidebar.opened,
|
||||
withoutAnimation: this.sidebar.withoutAnimation,
|
||||
mobile: this.device === 'mobile'
|
||||
}
|
||||
},
|
||||
variables() {
|
||||
return variables;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClickOutside() {
|
||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
|
||||
}
|
||||
}
|
||||
}
|
||||
name: 'Layout',
|
||||
components: {
|
||||
AppMain,
|
||||
Navbar,
|
||||
RightPanel,
|
||||
Settings,
|
||||
Sidebar,
|
||||
TagsView,
|
||||
},
|
||||
mixins: [ResizeMixin],
|
||||
computed: {
|
||||
...mapState({
|
||||
theme: (state) => state.settings.theme,
|
||||
sideTheme: (state) => state.settings.sideTheme,
|
||||
sidebar: (state) => state.app.sidebar,
|
||||
device: (state) => state.app.device,
|
||||
needTagsView: (state) => state.settings.tagsView,
|
||||
fixedHeader: (state) => state.settings.fixedHeader,
|
||||
}),
|
||||
classObj() {
|
||||
return {
|
||||
hideSidebar: !this.sidebar.opened,
|
||||
openSidebar: this.sidebar.opened,
|
||||
withoutAnimation: this.sidebar.withoutAnimation,
|
||||
mobile: this.device === 'mobile',
|
||||
};
|
||||
},
|
||||
variables() {
|
||||
return variables;
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
instance: {
|
||||
closed: true,
|
||||
}, // 通知弹窗实例
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.startFun();
|
||||
axios
|
||||
.post('http://172.22.22.190/wcs-njlm/business/wcsTask/isonline')
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
if (res.data.code == 500) {
|
||||
this.$notify({
|
||||
title: '设备异常',
|
||||
message: res.data.msg,
|
||||
type: 'warning',
|
||||
duration: 0,
|
||||
});
|
||||
} else {
|
||||
console.log('通讯正常');
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('There was an error!', error);
|
||||
this.$notify({
|
||||
title: '通知',
|
||||
message: '设备不在线,请稍后重试',
|
||||
type: 'warning',
|
||||
duration: 0,
|
||||
});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
handleClickOutside() {
|
||||
this.$store.dispatch('app/closeSideBar', { withoutAnimation: false });
|
||||
},
|
||||
startFun() {
|
||||
setInterval(() => {
|
||||
this.getRealAlarm();
|
||||
}, 10000);
|
||||
},
|
||||
getRealAlarm() {
|
||||
axios
|
||||
.post('http://172.22.22.190/wcs-njlm/business/wcsTask/isAlarm34')
|
||||
.then((res) => {
|
||||
res.data.forEach((item, index) => {
|
||||
if (index < 4) {
|
||||
if (item.code !== 0) {
|
||||
this.$notify({
|
||||
title: '异常',
|
||||
message: item.msg,
|
||||
type: 'warning',
|
||||
duration: 8000,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (item.code > 30) {
|
||||
this.$notify({
|
||||
title: '异常',
|
||||
message: item.msg,
|
||||
type: 'warning',
|
||||
duration: 9000,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('There was an error!', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/assets/styles/mixin.scss";
|
||||
@import "~@/assets/styles/variables.scss";
|
||||
@import '~@/assets/styles/mixin.scss';
|
||||
@import '~@/assets/styles/variables.scss';
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
@include clearfix;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
&.mobile.openSidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
}
|
||||
&.mobile.openSidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.drawer-bg {
|
||||
background: #000;
|
||||
opacity: 0.3;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
background: #000;
|
||||
opacity: 0.3;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.fixed-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 9;
|
||||
width: calc(100% - #{$base-sidebar-width});
|
||||
transition: width 0.28s;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 9;
|
||||
width: calc(100% - #{$base-sidebar-width});
|
||||
transition: width 0.28s;
|
||||
}
|
||||
|
||||
.hideSidebar .fixed-header {
|
||||
width: calc(100% - 54px);
|
||||
width: calc(100% - 54px);
|
||||
}
|
||||
|
||||
.sidebarHide .fixed-header {
|
||||
width: calc(100%);
|
||||
width: calc(100%);
|
||||
}
|
||||
|
||||
.mobile .fixed-header {
|
||||
width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,3 +1,10 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2023-10-13 16:08:51
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-05-31 14:01:29
|
||||
* @Description:
|
||||
*/
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import { Message } from 'element-ui'
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-17 15:10:53
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-08 15:33:03
|
||||
* @LastEditTime: 2024-08-19 10:29:41
|
||||
* @Description:
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
@ -83,6 +83,18 @@ export const constantRoutes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/dict',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'type/data/:dictId(\\d+)',
|
||||
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
||||
name: 'SystemDictData',
|
||||
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:01:54
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-11 16:43:48
|
||||
* @LastEditTime: 2024-10-09 14:24:48
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -42,7 +42,7 @@ export default {
|
||||
getDataListURL: getHistogram,
|
||||
},
|
||||
listQuery: {
|
||||
warehouseId: '1698950657556340737',
|
||||
warehouseId: '1696803324030865409',
|
||||
goodName: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
@ -81,7 +81,7 @@ export default {
|
||||
barChart,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
this.listQuery.warehouseId = this.bId
|
||||
this.getArr();
|
||||
},
|
||||
methods: {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:01:54
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-13 14:45:48
|
||||
* @LastEditTime: 2024-05-09 11:29:53
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -16,7 +16,7 @@
|
||||
<pieChart
|
||||
title="饼状图分析"
|
||||
ref="pieChart"
|
||||
height="600px"
|
||||
height="650px"
|
||||
v-if="tableData.totalNumber"
|
||||
:total-number="tableData.totalNumber"
|
||||
:pie-data="tableData.list" />
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:01:54
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-13 14:45:55
|
||||
* @LastEditTime: 2024-10-09 14:25:40
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -16,7 +16,7 @@
|
||||
<pieChart
|
||||
title="饼状图分析"
|
||||
ref="pieChart"
|
||||
height="600px"
|
||||
height="650px"
|
||||
v-if="tableData.totalNumber"
|
||||
:total-number="tableData.totalNumber"
|
||||
:pie-data="tableData.list" />
|
||||
@ -42,7 +42,7 @@ export default {
|
||||
getDataListURL: getPieChart,
|
||||
},
|
||||
listQuery: {
|
||||
warehouseId: '1698950657556340737',
|
||||
warehouseId: '1696803324030865409',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
},
|
||||
@ -71,8 +71,8 @@ export default {
|
||||
pieChart,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
},
|
||||
this.listQuery.warehouseId = this.bId
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
|
@ -33,6 +33,10 @@ const tableProps = [
|
||||
prop: 'reqParameter',
|
||||
label: '请求参数',
|
||||
},
|
||||
{
|
||||
prop: 'response',
|
||||
label: '响应参数',
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '时间',
|
||||
@ -66,7 +70,7 @@ export default {
|
||||
label: '订单出货日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd hh:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
|
@ -113,6 +113,13 @@ export default {
|
||||
data: nameArr,
|
||||
axisLabel: {
|
||||
color: '#979797',
|
||||
interval:0,
|
||||
formatter: function (value) {
|
||||
let valueTxt = ''; if (value.length > 4) { valueTxt = value.substring(0, 4) + '...'; } else {
|
||||
valueTxt = value;
|
||||
}
|
||||
return valueTxt;
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-06-01 10:47:42
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-12 16:32:00
|
||||
* @LastEditTime: 2024-02-23 16:56:33
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -48,7 +48,7 @@ export default {
|
||||
this.chart = null;
|
||||
},
|
||||
methods: {
|
||||
initChart(occupancyData) {
|
||||
initChart(occupancyData,val) {
|
||||
this.chart = echarts.init(this.$el, 'macarons');
|
||||
|
||||
this.chart.setOption({
|
||||
@ -165,7 +165,7 @@ export default {
|
||||
offsetCenter: [0, '20%'],
|
||||
valueAnimation: true,
|
||||
formatter: function (value) {
|
||||
return '{side| }{value|' + value + '%}{side1| }';
|
||||
return '{side| }{value|' + value + '%}{side1| }'+'\n\n{val|已使用库位数量:'+val+'}';
|
||||
},
|
||||
rich: {
|
||||
value: {
|
||||
@ -173,6 +173,10 @@ export default {
|
||||
color: '#0B58FF',
|
||||
padding: [0, 20, 0, 20],
|
||||
},
|
||||
val: {
|
||||
fontSize: 18,
|
||||
color: '#0B58FF',
|
||||
},
|
||||
side: {
|
||||
width: 35,
|
||||
height: 5,
|
||||
|
@ -61,7 +61,7 @@ export default {
|
||||
text: '总数',
|
||||
subtext: this.totalNumber,
|
||||
top: '42%', // 控制位置
|
||||
left: '50%', // 控制位置
|
||||
left: '40%', // 控制位置
|
||||
textAlign: 'center', // 让文字居中
|
||||
textStyle: {
|
||||
color: 'rgba(203, 195, 195, 1)',
|
||||
@ -76,21 +76,25 @@ export default {
|
||||
formatter: '产品: {b}<br/>数量: {c}<br/>占比: {d}%',
|
||||
},
|
||||
legend: {
|
||||
bottom: '0%',
|
||||
left: 'center',
|
||||
type: 'scroll',
|
||||
orient: 'vertical',
|
||||
right: 10,
|
||||
top: 20,
|
||||
bottom: 20,
|
||||
},
|
||||
grid: {
|
||||
top: 40,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
bottom: '0%',
|
||||
containLabel: true,
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'pie',
|
||||
type: 'pie',
|
||||
radius: ['55%', '80%'],
|
||||
radius: ['45%', '70%'],
|
||||
center: ['40%', '50%'],
|
||||
avoidLabelOverlap: true, // 防止牵引线堆叠挤在一块
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
|
661
src/views/asrs/delivery/add-or-updata.vue
Normal file
661
src/views/asrs/delivery/add-or-updata.vue
Normal file
@ -0,0 +1,661 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-19 09:42:47
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="100px">
|
||||
<el-row :gutter="15">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出库单号" prop="deliveryCode">
|
||||
<el-input
|
||||
v-model="dataForm.deliveryCode"
|
||||
clearable
|
||||
placeholder="请输入出库单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="dataForm.deliveryType !== 3">
|
||||
<el-form-item label="货物名称" prop="productName">
|
||||
<el-select
|
||||
v-model="dataForm.productName"
|
||||
filterable
|
||||
style="display: inline-block; width: 100%"
|
||||
@change="setShowTrayType"
|
||||
placeholder="请选择货物名称"
|
||||
remote
|
||||
:remote-method="remoteMethod"
|
||||
value-key="id"
|
||||
:loading="loading">
|
||||
<el-option
|
||||
v-for="item in productArr"
|
||||
:key="item.id"
|
||||
:label="item.goodSpecificationName"
|
||||
:value="item.goodSpecificationName"></el-option>
|
||||
</el-select>
|
||||
<div style="display: inline-block; margin-left: 10px">
|
||||
<el-tag size="mini" type="warning">
|
||||
<i class="el-icon-question" />
|
||||
出空托盘请选择无产品
|
||||
</el-tag>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出库类型" prop="deliveryType">
|
||||
<el-radio-group
|
||||
v-model="dataForm.deliveryType"
|
||||
@input="setNeedTrayNumber">
|
||||
<el-radio :label="1">单托盘出库(空托盘)</el-radio>
|
||||
<el-radio :label="2">多托盘出库(自动包装线)</el-radio>
|
||||
<el-radio :label="3">点对点出库(工单出库)</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<div v-if="dataForm.deliveryType !== 3" style="">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所需托盘数" prop="needTrayNumber">
|
||||
<el-input-number
|
||||
style="width: 100%"
|
||||
v-model="dataForm.needTrayNumber"
|
||||
:min="dataForm.deliveryType === 2 ? 2 : 1"
|
||||
:disabled="dataForm.deliveryType === 1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已补托盘数" prop="alreadyOutNumber">
|
||||
<el-input-number
|
||||
style="width: 100%"
|
||||
v-model="dataForm.alreadyOutNumber"
|
||||
disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="dataForm.deliveryType === 1">
|
||||
<el-form-item
|
||||
label="发货位置"
|
||||
prop="lineEdgeLibraryCode"
|
||||
key="lineEdgeLibraryCode">
|
||||
<el-select
|
||||
v-model="dataForm.lineEdgeLibraryCode"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in potArr"
|
||||
:key="item.id"
|
||||
:label="item.lineEdgeLibraryCode"
|
||||
:value="item.lineEdgeLibraryCode"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="dataForm.deliveryType === 2">
|
||||
<el-form-item label="发货区域" prop="region" key="region">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="dataForm.region"
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in regionArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="!showTrayType">
|
||||
<el-form-item
|
||||
label="货物品质"
|
||||
prop="productQuality"
|
||||
key="productQuality">
|
||||
<el-input
|
||||
v-model="dataForm.productQuality"
|
||||
clearable
|
||||
placeholder="请输入货物品质" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col
|
||||
:span="12"
|
||||
v-if="dataForm.deliveryType === 1 && !showTrayType">
|
||||
<el-form-item label="膜卷号" prop="rollCode" key="rollCode">
|
||||
<el-input
|
||||
v-model="dataForm.rollCode"
|
||||
clearable
|
||||
placeholder="请输入膜卷号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-if="showTrayType">
|
||||
<el-form-item label="托盘类型" key="trayType" prop="trayType">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="dataForm.trayType"
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in trayTypeArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产出工单" prop="workOrder">
|
||||
<el-input
|
||||
v-model="dataForm.workOrder"
|
||||
clearable
|
||||
placeholder="请输入工单" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工序" prop="process">
|
||||
<el-input
|
||||
v-model="dataForm.process"
|
||||
clearable
|
||||
placeholder="请输入工序" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</div>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门" prop="department">
|
||||
<el-input
|
||||
v-model="dataForm.department"
|
||||
clearable
|
||||
placeholder="请输入部门" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请人" prop="applicant">
|
||||
<el-input
|
||||
v-model="dataForm.applicant"
|
||||
clearable
|
||||
placeholder="请输入申请人" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<div v-if="dataForm.deliveryType === 3">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266',
|
||||
}"
|
||||
border
|
||||
empty-text="暂无数据"
|
||||
style="width: 100%"
|
||||
ref="dataList">
|
||||
<el-table-column
|
||||
type="index"
|
||||
fixed="left"
|
||||
label="#"
|
||||
align="center" />
|
||||
<el-table-column prop="lineEdgeLibraryCode" label="目的码头">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.lineEdgeLibraryCode"
|
||||
filterable
|
||||
@change="(val) => setEdgeInfo(val, scope.$index)"
|
||||
style="width: 100%"
|
||||
placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in potArr"
|
||||
:key="item.id"
|
||||
:label="item.lineEdgeLibraryCode"
|
||||
:value="item.lineEdgeLibraryCode"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agvGroundCode" label="码头编码" width="80" />
|
||||
<el-table-column prop="region" label="区域名称" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.region ? regionArr[scope.row.region - 1].name : ''
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="trayCode" label="托盘编码">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.trayCode" readonly>
|
||||
<el-button
|
||||
slot="append"
|
||||
icon="el-icon-search"
|
||||
@click="showTray(scope.$index)" />
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productName" label="物料名称" />
|
||||
<el-table-column prop="productCode" label="物料编码" width="120" />
|
||||
<el-table-column prop="productQuality" label="货物品质" />
|
||||
<el-table-column prop="process" label="工序" />
|
||||
<el-table-column fixed="right" label="操作" width="50">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleClick(scope.$index)">
|
||||
<span
|
||||
class="iconfont icon-delete delete-color"
|
||||
style="color: #f56c6c"></span>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 表格底部加号 -->
|
||||
<el-button class="addButton" icon="el-icon-plus" @click="addNew">
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-dialog
|
||||
width="80%"
|
||||
title="选择库存托盘"
|
||||
:visible.sync="innerVisible"
|
||||
append-to-body>
|
||||
<el-form
|
||||
:model="listQuery"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="68px">
|
||||
<el-form-item label="托盘编码" prop="trayCode">
|
||||
<el-input
|
||||
v-model="listQuery.trayCode"
|
||||
@input="$forceUpdate()"
|
||||
placeholder="请输入托盘编码"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="工序" prop="process">
|
||||
<el-input
|
||||
v-model="listQuery.process"
|
||||
@input="$forceUpdate()"
|
||||
placeholder="请输入工序"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="膜卷号" prop="rollCode">
|
||||
<el-input
|
||||
v-model="listQuery.rollCode"
|
||||
@input="$forceUpdate()"
|
||||
placeholder="请输入膜卷号"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名" prop="productName">
|
||||
<el-input
|
||||
v-model="listQuery.productName"
|
||||
@input="$forceUpdate()"
|
||||
placeholder="请输入产品名"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="品质" prop="grade">
|
||||
<el-input
|
||||
v-model="listQuery.grade"
|
||||
@input="$forceUpdate()"
|
||||
placeholder="请输入品质"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="当日工单" prop="todayOrder">
|
||||
<el-input
|
||||
v-model="listQuery.todayOrder"
|
||||
@input="$forceUpdate()"
|
||||
placeholder="当日工单"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="listQuery.createTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetimerange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
:data="gridData"
|
||||
border
|
||||
v-loading="loadingGrid"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)">
|
||||
<el-table-column type="index" fixed="left" label="#" align="center" />
|
||||
<el-table-column label="" width="40">
|
||||
<template slot-scope="scope">
|
||||
<i
|
||||
class="el-icon-plus"
|
||||
@click="setTray(scope.row)"
|
||||
style="color: #409eff; cursor: pointer; font-weight: bolder" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="trayCode" label="托盘编码" width="80" />
|
||||
<el-table-column property="productCode" label="物料编码" width="120" />
|
||||
<el-table-column property="description" label="物料名称" />
|
||||
<el-table-column property="grade" label="货物品质" width="80" />
|
||||
<el-table-column property="inventory" label="膜卷号" />
|
||||
<el-table-column property="process" label="工序" width="80" />
|
||||
<el-table-column property="createTime" label="入库时间" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getGridList" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../mixins/basic-add';
|
||||
import {
|
||||
createDelivery,
|
||||
updateDelivery,
|
||||
getDelivery,
|
||||
getCode,
|
||||
createDeliveryList,
|
||||
} from '@/api/oth/delivery';
|
||||
import { getPage } from '@/api/oth/rollMessage';
|
||||
import { getLineList } from '@/api/asrs/warehouseStorehouse';
|
||||
import { getGoodSpecificationPage } from '@/api/asrs/goodSpecification';
|
||||
|
||||
const regionArr = [
|
||||
{ name: '一次分切区域1线', id: 1 },
|
||||
{ name: '一次分拣区域', id: 2 },
|
||||
{ name: '二次分切区域', id: 3 },
|
||||
{ name: '二次分拣区域', id: 4 },
|
||||
{ name: '手动包装区域', id: 5 },
|
||||
{ name: '涂覆区域', id: 6 },
|
||||
{ name: '其他', id: 7 },
|
||||
{ name: '自动包装区域', id: 8 },
|
||||
{ name: '一次分切区域2线', id: 9 },
|
||||
{ name: '一次分切区域3线', id: 10 },
|
||||
{ name: '一次分切区域4线', id: 11 },
|
||||
];
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
isGetCode: true,
|
||||
codeURL: getCode,
|
||||
codeName: 'deliveryCode',
|
||||
createURL: createDelivery,
|
||||
updateURL: updateDelivery,
|
||||
infoURL: getDelivery,
|
||||
getOption: true,
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
deliveryCode: undefined,
|
||||
productName: undefined,
|
||||
deliveryType: 1,
|
||||
needTrayNumber: 1,
|
||||
alreadyOutNumber: 0,
|
||||
status: 2,
|
||||
lineEdgeLibraryCode: null,
|
||||
productQuality: null,
|
||||
rollCode: null,
|
||||
trayType: null,
|
||||
workOrder: null,
|
||||
department: null,
|
||||
applicant: null,
|
||||
process: null,
|
||||
},
|
||||
listQuery: {
|
||||
warehouseId: '1696803324030865409',
|
||||
trayCode: null,
|
||||
process: null,
|
||||
rollCode: null,
|
||||
productName: null,
|
||||
grade: null,
|
||||
todayOrder: null,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
},
|
||||
tableData: [{}],
|
||||
regionArr,
|
||||
potArr: [],
|
||||
productArr: [],
|
||||
gridData: [],
|
||||
innerVisible: false,
|
||||
loadingGrid: false,
|
||||
showTrayType: false,
|
||||
trayIndex: null,
|
||||
trayTypeArr: [
|
||||
{ id: 1, name: '6臂' },
|
||||
{ id: 2, name: '12臂' },
|
||||
],
|
||||
loading: false,
|
||||
dataRule: {
|
||||
deliveryCode: [
|
||||
{ required: true, message: '出库单号不能为空', trigger: 'blur' },
|
||||
],
|
||||
productQuality: [
|
||||
{ required: true, message: '货物品质不能为空', trigger: 'blur' },
|
||||
],
|
||||
lineEdgeLibraryCode: [
|
||||
{ required: true, message: '发货位置不能为空', trigger: 'change' },
|
||||
],
|
||||
productName: [
|
||||
{ required: true, message: '货物名称不能为空', trigger: 'change' },
|
||||
],
|
||||
region: [
|
||||
{ required: true, message: '发货区域不能为空', trigger: 'change' },
|
||||
],
|
||||
trayType: [
|
||||
{ required: true, message: '托盘类型不能为空', trigger: 'change' },
|
||||
],
|
||||
department: [
|
||||
{ required: true, message: '部门不能为空', trigger: 'blur' },
|
||||
],
|
||||
applicant: [
|
||||
{ required: true, message: '申请人不能为空', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getArr() {
|
||||
this.showTrayType = false;
|
||||
this.dataForm.rollCode = null;
|
||||
this.dataForm.trayType = null;
|
||||
getLineList({ warehouseId: this.aId }).then((response) => {
|
||||
this.potArr = response.data;
|
||||
});
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
goodSpecificationName: query,
|
||||
// warehouseId: this.warehouseId,
|
||||
};
|
||||
getGoodSpecificationPage(params).then((response) => {
|
||||
this.loading = false;
|
||||
this.productArr = response.data.list;
|
||||
});
|
||||
} else {
|
||||
this.productArr = [];
|
||||
}
|
||||
},
|
||||
setEdgeInfo(val, index) {
|
||||
const info = this.potArr.find((item) => item.lineEdgeLibraryCode === val);
|
||||
this.tableData[index].agvGroundCode = info.agvGroundCode;
|
||||
this.tableData[index].region = info.region;
|
||||
},
|
||||
setNeedTrayNumber(val) {
|
||||
if (val === 1) {
|
||||
this.dataForm.needTrayNumber = 1;
|
||||
this.dataForm.region = null;
|
||||
if (this.dataForm.productName !== '无产品') {
|
||||
this.showTrayType = false;
|
||||
} else {
|
||||
this.showTrayType = true;
|
||||
}
|
||||
} else if (val === 2) {
|
||||
this.dataForm.needTrayNumber = 2;
|
||||
this.dataForm.lineEdgeLibraryCode = null;
|
||||
this.showTrayType = true;
|
||||
} else if (val === 3) {
|
||||
this.tableData = [{}];
|
||||
}
|
||||
},
|
||||
setShowTrayType(val) {
|
||||
if (val === '无产品') {
|
||||
this.showTrayType = true;
|
||||
} else {
|
||||
this.showTrayType = false;
|
||||
}
|
||||
},
|
||||
showTray(index) {
|
||||
this.trayIndex = index;
|
||||
this.innerVisible = true;
|
||||
this.listQuery = {
|
||||
warehouseId: '1696803324030865409',
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getGridList();
|
||||
},
|
||||
getGridList() {
|
||||
this.loadingGrid = true;
|
||||
getPage(this.listQuery).then((response) => {
|
||||
this.loadingGrid = false;
|
||||
this.gridData = response.data.list;
|
||||
this.listQuery.total = response.data.total;
|
||||
});
|
||||
},
|
||||
setTray(val) {
|
||||
this.innerVisible = false;
|
||||
this.$set(this.tableData[this.trayIndex], 'trayCode', val.trayCode);
|
||||
this.$set(this.tableData[this.trayIndex], 'productName', val.description);
|
||||
this.$set(this.tableData[this.trayIndex], 'productCode', val.productCode);
|
||||
this.$set(this.tableData[this.trayIndex], 'productQuality', val.grade);
|
||||
this.$set(this.tableData[this.trayIndex], 'process', val.process);
|
||||
},
|
||||
//dialog查询
|
||||
handleQuery() {
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.trayCode = this.listQuery.trayCode || null;
|
||||
this.listQuery.process = this.listQuery.process || null;
|
||||
this.listQuery.rollCode = this.listQuery.rollCode || null;
|
||||
this.listQuery.productName = this.listQuery.productName || null;
|
||||
this.listQuery.grade = this.listQuery.grade || null;
|
||||
this.listQuery.todayOrder = this.listQuery.todayOrder || null;
|
||||
this.listQuery.startTime = this.listQuery.createTime
|
||||
? this.listQuery.createTime[0]
|
||||
: null;
|
||||
this.listQuery.endTime = this.listQuery.createTime
|
||||
? this.listQuery.createTime[1]
|
||||
: null;
|
||||
this.getGridList();
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
this.listQuery.pageSize = val;
|
||||
this.listQuery.pageNo = 1;
|
||||
this.getGridList();
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle(val) {
|
||||
this.listQuery.pageNo = val;
|
||||
this.getGridList();
|
||||
},
|
||||
addNew() {
|
||||
const obj = {};
|
||||
this.tableData.push(obj);
|
||||
},
|
||||
handleClick(index) {
|
||||
this.tableData.splice(index, 1);
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
// 点对点
|
||||
if (this.dataForm.deliveryType === 3) {
|
||||
let cancel = false;
|
||||
this.tableData.forEach((item) => {
|
||||
item.deliveryCode = this.dataForm.deliveryCode;
|
||||
item.department = this.dataForm.department;
|
||||
item.applicant = this.dataForm.applicant;
|
||||
item.warehouseId = this.aId;
|
||||
item.deliveryType = 3;
|
||||
item.needTrayNumber = 1;
|
||||
if (!item.lineEdgeLibraryCode || !item.trayCode) {
|
||||
cancel = true;
|
||||
this.$modal.msgWarning('目的码头或托盘编码不能为空!');
|
||||
}
|
||||
});
|
||||
if (cancel) return;
|
||||
createDeliveryList(this.tableData).then((response) => {
|
||||
if (response.data === -1) {
|
||||
this.$modal.msgWarning('排、列、层不能重复');
|
||||
} else if (response.data === 0) {
|
||||
this.$modal.msgWarning('名称或编码不能重复');
|
||||
} else {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL(this.dataForm).then((response) => {
|
||||
if (response.data === -1) {
|
||||
this.$modal.msgWarning('排、列、层不能重复');
|
||||
} else if (response.data === 0) {
|
||||
this.$modal.msgWarning('名称或编码不能重复');
|
||||
} else {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.addButton {
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
border-top: none;
|
||||
color: #0b58ff;
|
||||
border-color: #ebeef5;
|
||||
border-radius: 0;
|
||||
}
|
||||
.addButton:hover {
|
||||
color: #0b58ff;
|
||||
border-color: #ebeef5;
|
||||
background-color: #fff;
|
||||
}
|
||||
.addButton:focus {
|
||||
border-color: #ebeef5;
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
426
src/views/asrs/delivery/index.vue
Normal file
426
src/views/asrs/delivery/index.vue
Normal file
@ -0,0 +1,426 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:isFold="true"
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="200"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width="70%">
|
||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit" />
|
||||
</base-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import {
|
||||
getDeliveryPage,
|
||||
restartDelivery,
|
||||
pauseDelivery,
|
||||
improveDelivery,
|
||||
cancelDelivery,
|
||||
deleteDelivery,
|
||||
} from '@/api/oth/delivery';
|
||||
import { getLineList } from '@/api/asrs/warehouseStorehouse';
|
||||
import { getGoodSpecificationPage } from '@/api/asrs/goodSpecification';
|
||||
import codeFilter from '../mixins/code-filter';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'deliveryCode',
|
||||
label: '出库单号',
|
||||
fixed: true,
|
||||
},
|
||||
{
|
||||
prop: 'productName',
|
||||
label: '货物名称',
|
||||
},
|
||||
{
|
||||
prop: 'trayCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'needTrayNumber',
|
||||
label: '所需托盘数',
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
prop: 'alreadyOutNumber',
|
||||
label: '已补托盘数',
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '出库单状态',
|
||||
filter: codeFilter('status'),
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
prop: 'deliveryType',
|
||||
label: '出库类型',
|
||||
filter: codeFilter('deliveryType'),
|
||||
width: 95,
|
||||
},
|
||||
{
|
||||
prop: 'lineEdgeLibraryCode',
|
||||
label: '码头位置',
|
||||
},
|
||||
{
|
||||
prop: 'region',
|
||||
label: '发货区域',
|
||||
filter: codeFilter('region'),
|
||||
},
|
||||
{
|
||||
prop: 'productQuality',
|
||||
label: '货物品质',
|
||||
},
|
||||
{
|
||||
prop: 'rollCode',
|
||||
label: '膜卷号',
|
||||
},
|
||||
{
|
||||
prop: 'trayType',
|
||||
label: '托盘类型',
|
||||
filter: codeFilter('trayType'),
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
prop: 'workOrder',
|
||||
label: '产出工单',
|
||||
},
|
||||
{
|
||||
prop: 'department',
|
||||
label: '部门',
|
||||
},
|
||||
{
|
||||
prop: 'applicant',
|
||||
label: '申请人',
|
||||
},
|
||||
{
|
||||
prop: 'process',
|
||||
label: '工序',
|
||||
},
|
||||
{
|
||||
prop: 'updateTime',
|
||||
label: '更新时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
];
|
||||
const regionArr = [
|
||||
{ name: '一次分切区域1线', id: 1 },
|
||||
{ name: '一次分拣区域', id: 2 },
|
||||
{ name: '二次分切区域', id: 3 },
|
||||
{ name: '二次分拣区域', id: 4 },
|
||||
{ name: '手动包装区域', id: 5 },
|
||||
{ name: '涂覆区域', id: 6 },
|
||||
{ name: '其他', id: 7 },
|
||||
{ name: '自动包装区域', id: 8 },
|
||||
{ name: '一次分切区域2线', id: 9 },
|
||||
{ name: '一次分切区域3线', id: 10 },
|
||||
{ name: '一次分切区域4线', id: 11 },
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getDeliveryPage,
|
||||
deleteURL: deleteDelivery,
|
||||
},
|
||||
regionArr,
|
||||
tableProps,
|
||||
tableData: [],
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'restart',
|
||||
btnName: '重启',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'status',
|
||||
value: 3,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'pause',
|
||||
btnName: '暂停',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'status',
|
||||
value: 3,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'improve',
|
||||
btnName: '提升',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'status',
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'cancel',
|
||||
btnName: '取消',
|
||||
},
|
||||
].filter((v) => v),
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '货物名称',
|
||||
selectOptions: [],
|
||||
param: 'productName',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
labelField: 'goodSpecificationName',
|
||||
valueField: 'goodSpecificationName',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '发货位置',
|
||||
selectOptions: [],
|
||||
param: 'lineEdgeLibraryCode',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
labelField: 'lineEdgeLibraryCode',
|
||||
valueField: 'lineEdgeLibraryCode',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '发货区域',
|
||||
selectOptions: regionArr,
|
||||
param: 'region',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '膜卷号',
|
||||
placeholder: '膜卷号',
|
||||
param: 'rollCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产出工单',
|
||||
placeholder: '产出工单',
|
||||
param: 'workOrder',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '工序',
|
||||
placeholder: '工序',
|
||||
param: 'process',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'trayCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '货物品质',
|
||||
placeholder: '货物品质',
|
||||
param: 'quality',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: { AddOrUpdate },
|
||||
created() {
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
warehouseId: this.listQuery.warehouseId,
|
||||
};
|
||||
getGoodSpecificationPage(params).then((response) => {
|
||||
this.formConfig[0].selectOptions = response.data.list;
|
||||
});
|
||||
getLineList({ warehouseId: this.listQuery.warehouseId }).then(
|
||||
(response) => {
|
||||
this.formConfig[1].selectOptions = response.data;
|
||||
}
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.productName = val.productName;
|
||||
this.listQuery.lineEdgeLibraryCode = val.lineEdgeLibraryCode || null;
|
||||
this.listQuery.region = val.region || null;
|
||||
this.listQuery.productQuality = val.quality || null;
|
||||
this.listQuery.workOrder = val.workOrder || null;
|
||||
this.listQuery.process = val.process || null;
|
||||
this.listQuery.rollCode = val.rollCode || null;
|
||||
this.listQuery.trayCode = val.trayCode || null;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
//tableBtn点击
|
||||
otherMethods(val) {
|
||||
if (val.type === 'restart') {
|
||||
this.$confirm(
|
||||
`确定对出库单号:${val.data.deliveryCode}进行重启操作?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
restartDelivery(val.data).then((response) => {
|
||||
this.$message({
|
||||
message: '重启操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else if (val.type === 'pause') {
|
||||
this.$confirm(
|
||||
`确定对出库单号:${val.data.deliveryCode}进行暂停操作?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
pauseDelivery(val.data).then((response) => {
|
||||
this.$message({
|
||||
message: '暂停操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else if (val.type === 'improve') {
|
||||
this.$confirm(
|
||||
`确定对出库单号:${val.data.deliveryCode}进行提升操作?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
improveDelivery(val.data).then((response) => {
|
||||
this.$message({
|
||||
message: '提升操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.$confirm(
|
||||
`确定对出库单号:${val.data.deliveryCode}进行取消操作?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
cancelDelivery(val.data).then((response) => {
|
||||
this.$message({
|
||||
message: '取消操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
427
src/views/asrs/delivery/indexb.vue
Normal file
427
src/views/asrs/delivery/indexb.vue
Normal file
@ -0,0 +1,427 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:isFold="true"
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="200"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width="70%">
|
||||
<add-or-update ref="addOrUpdate" @refreshDataList="successSubmit" />
|
||||
</base-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import {
|
||||
getDeliveryPage,
|
||||
restartDelivery,
|
||||
pauseDelivery,
|
||||
improveDelivery,
|
||||
cancelDelivery,
|
||||
deleteDelivery,
|
||||
} from '@/api/oth/delivery';
|
||||
import { getLineList } from '@/api/asrs/warehouseStorehouse';
|
||||
import { getGoodSpecificationPage } from '@/api/asrs/goodSpecification';
|
||||
import codeFilter from '../mixins/code-filter';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'deliveryCode',
|
||||
label: '出库单号',
|
||||
fixed: true,
|
||||
},
|
||||
{
|
||||
prop: 'productName',
|
||||
label: '货物名称',
|
||||
},
|
||||
{
|
||||
prop: 'trayCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'needTrayNumber',
|
||||
label: '所需托盘数',
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
prop: 'alreadyOutNumber',
|
||||
label: '已补托盘数',
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '出库单状态',
|
||||
filter: codeFilter('status'),
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
prop: 'deliveryType',
|
||||
label: '出库类型',
|
||||
filter: codeFilter('deliveryType'),
|
||||
width: 95,
|
||||
},
|
||||
{
|
||||
prop: 'lineEdgeLibraryCode',
|
||||
label: '码头位置',
|
||||
},
|
||||
{
|
||||
prop: 'region',
|
||||
label: '发货区域',
|
||||
filter: codeFilter('region'),
|
||||
},
|
||||
{
|
||||
prop: 'productQuality',
|
||||
label: '货物品质',
|
||||
},
|
||||
{
|
||||
prop: 'rollCode',
|
||||
label: '膜卷号',
|
||||
},
|
||||
{
|
||||
prop: 'trayType',
|
||||
label: '托盘类型',
|
||||
filter: codeFilter('trayType'),
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
prop: 'workOrder',
|
||||
label: '产出工单',
|
||||
},
|
||||
{
|
||||
prop: 'department',
|
||||
label: '部门',
|
||||
},
|
||||
{
|
||||
prop: 'applicant',
|
||||
label: '申请人',
|
||||
},
|
||||
{
|
||||
prop: 'process',
|
||||
label: '工序',
|
||||
},
|
||||
{
|
||||
prop: 'updateTime',
|
||||
label: '更新时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
];
|
||||
const regionArr = [
|
||||
{ name: '一次分切区域1线', id: 1 },
|
||||
{ name: '一次分拣区域', id: 2 },
|
||||
{ name: '二次分切区域', id: 3 },
|
||||
{ name: '二次分拣区域', id: 4 },
|
||||
{ name: '手动包装区域', id: 5 },
|
||||
{ name: '涂覆区域', id: 6 },
|
||||
{ name: '其他', id: 7 },
|
||||
{ name: '自动包装区域', id: 8 },
|
||||
{ name: '一次分切区域2线', id: 9 },
|
||||
{ name: '一次分切区域3线', id: 10 },
|
||||
{ name: '一次分切区域4线', id: 11 },
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getDeliveryPage,
|
||||
deleteURL: deleteDelivery,
|
||||
},
|
||||
regionArr,
|
||||
tableProps,
|
||||
tableData: [],
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'restart',
|
||||
btnName: '重启',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'status',
|
||||
value: 3,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'pause',
|
||||
btnName: '暂停',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'unequal',
|
||||
name: 'status',
|
||||
value: 3,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'improve',
|
||||
btnName: '提升',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'status',
|
||||
value: 2,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'cancel',
|
||||
btnName: '取消',
|
||||
},
|
||||
].filter((v) => v),
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '货物名称',
|
||||
selectOptions: [],
|
||||
param: 'productName',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
labelField: 'goodSpecificationName',
|
||||
valueField: 'goodSpecificationName',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '发货位置',
|
||||
selectOptions: [],
|
||||
param: 'lineEdgeLibraryCode',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
labelField: 'lineEdgeLibraryCode',
|
||||
valueField: 'lineEdgeLibraryCode',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '发货区域',
|
||||
selectOptions: regionArr,
|
||||
param: 'region',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '膜卷号',
|
||||
placeholder: '膜卷号',
|
||||
param: 'rollCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产出工单',
|
||||
placeholder: '产出工单',
|
||||
param: 'workOrder',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '工序',
|
||||
placeholder: '工序',
|
||||
param: 'process',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'trayCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '货物品质',
|
||||
placeholder: '货物品质',
|
||||
param: 'quality',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: { AddOrUpdate },
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
warehouseId: this.listQuery.warehouseId,
|
||||
};
|
||||
getGoodSpecificationPage(params).then((response) => {
|
||||
this.formConfig[0].selectOptions = response.data.list;
|
||||
});
|
||||
getLineList({ warehouseId: this.listQuery.warehouseId }).then(
|
||||
(response) => {
|
||||
this.formConfig[1].selectOptions = response.data;
|
||||
}
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.productName = val.productName;
|
||||
this.listQuery.lineEdgeLibraryCode = val.lineEdgeLibraryCode || null;
|
||||
this.listQuery.region = val.region || null;
|
||||
this.listQuery.productQuality = val.quality || null;
|
||||
this.listQuery.workOrder = val.workOrder || null;
|
||||
this.listQuery.process = val.process || null;
|
||||
this.listQuery.rollCode = val.rollCode || null;
|
||||
this.listQuery.trayCode = val.trayCode || null;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
//tableBtn点击
|
||||
otherMethods(val) {
|
||||
if (val.type === 'restart') {
|
||||
this.$confirm(
|
||||
`确定对出库单号:${val.data.deliveryCode}进行重启操作?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
restartDelivery(val.data).then((response) => {
|
||||
this.$message({
|
||||
message: '重启操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else if (val.type === 'pause') {
|
||||
this.$confirm(
|
||||
`确定对出库单号:${val.data.deliveryCode}进行暂停操作?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
pauseDelivery(val.data).then((response) => {
|
||||
this.$message({
|
||||
message: '暂停操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else if (val.type === 'improve') {
|
||||
this.$confirm(
|
||||
`确定对出库单号:${val.data.deliveryCode}进行提升操作?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
improveDelivery(val.data).then((response) => {
|
||||
this.$message({
|
||||
message: '提升操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.$confirm(
|
||||
`确定对出库单号:${val.data.deliveryCode}进行取消操作?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
cancelDelivery(val.data).then((response) => {
|
||||
this.$message({
|
||||
message: '取消操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
326
src/views/asrs/deliveryHis/index.vue
Normal file
326
src/views/asrs/deliveryHis/index.vue
Normal file
@ -0,0 +1,326 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:isFold="true"
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266',
|
||||
}"
|
||||
border
|
||||
v-loading="dataListLoading"
|
||||
style="width: 100%"
|
||||
ref="dataList">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<product :delivery-history-id="scope.row.id"></product>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deliveryCode" label="出库单号" width="155" />
|
||||
<el-table-column prop="productName" label="货物名称" />
|
||||
<el-table-column prop="trayCode" label="托盘编码" />
|
||||
<el-table-column prop="needTrayNumber" label="所需托盘数" width="90" />
|
||||
<el-table-column prop="alreadyOutNumber" label="已补托盘数" width="90" />
|
||||
<el-table-column prop="status" label="出库单状态" width="90">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{ scope.row.status >= 0 ? status[scope.row.status] : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deliveryType" label="出库类型" width="95">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.deliveryType >= 0
|
||||
? deliveryType[scope.row.deliveryType]
|
||||
: ''
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lineEdgeLibraryCode" label="码头位置" />
|
||||
<el-table-column prop="region" label="发货区域" width="95">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{ scope.row.region >= 0 ? region[scope.row.region] : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productQuality" label="货物品质" width="75" />
|
||||
<el-table-column prop="rollCode" label="膜卷号" />
|
||||
<el-table-column prop="trayType" label="托盘类型" width="75">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{ scope.row.trayType >= 0 ? trayType[scope.row.trayType] : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="workOrder" label="产出工单" />
|
||||
<el-table-column prop="department" label="部门" />
|
||||
<el-table-column prop="applicant" label="申请人" />
|
||||
<el-table-column prop="process" label="工序" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="150">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleClick({ data: scope.row, type: 'mes' })"
|
||||
v-hasPermi="['asrs:deliveryHis:mes']">
|
||||
同步给mes
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import product from './product-mini';
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import {
|
||||
getDeliveryHisPage,
|
||||
exportDeliveryHisExcel,
|
||||
mesoutsync,
|
||||
} from '@/api/oth/delivery';
|
||||
import { getLineList } from '@/api/asrs/warehouseStorehouse';
|
||||
import { getGoodSpecificationPage } from '@/api/asrs/goodSpecification';
|
||||
|
||||
const regionArr = [
|
||||
{ name: '一次分切区域1线', id: 1 },
|
||||
{ name: '一次分拣区域', id: 2 },
|
||||
{ name: '二次分切区域', id: 3 },
|
||||
{ name: '二次分拣区域', id: 4 },
|
||||
{ name: '手动包装区域', id: 5 },
|
||||
{ name: '涂覆区域', id: 6 },
|
||||
{ name: '其他', id: 7 },
|
||||
{ name: '自动包装区域', id: 8 },
|
||||
{ name: '一次分切区域2线', id: 9 },
|
||||
{ name: '一次分切区域3线', id: 10 },
|
||||
{ name: '一次分切区域4线', id: 11 },
|
||||
];
|
||||
const region = [
|
||||
'',
|
||||
'一次分切区域1线',
|
||||
'一次分拣区域',
|
||||
'二次分切区域',
|
||||
'二次分拣区域',
|
||||
'手动包装区域',
|
||||
'涂覆区域',
|
||||
'其他',
|
||||
'自动包装区域',
|
||||
'一次分切区域2线',
|
||||
'一次分切区域3线',
|
||||
'一次分切区域4线',
|
||||
];
|
||||
const status = ['', '优先执行', '正常运行', '暂停', '完成', '取消'];
|
||||
const deliveryType = ['', '单托盘出库', '多托盘出库', '点对点出库'];
|
||||
const trayType = ['无要求', '6臂', '12臂'];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getDeliveryHisPage,
|
||||
exportURL: exportDeliveryHisExcel,
|
||||
},
|
||||
status,
|
||||
deliveryType,
|
||||
trayType,
|
||||
region,
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '货物名称',
|
||||
selectOptions: [],
|
||||
param: 'productName',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
labelField: 'goodSpecificationName',
|
||||
valueField: 'goodSpecificationName',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '发货位置',
|
||||
selectOptions: [],
|
||||
param: 'lineEdgeLibraryCode',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
labelField: 'lineEdgeLibraryCode',
|
||||
valueField: 'lineEdgeLibraryCode',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '发货区域',
|
||||
selectOptions: regionArr,
|
||||
param: 'region',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '膜卷号',
|
||||
placeholder: '膜卷号',
|
||||
param: 'rollCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '复判等级',
|
||||
placeholder: '复判等级',
|
||||
param: 'epddj',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '出库单号',
|
||||
placeholder: '出库单号',
|
||||
param: 'deliveryCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产出工单',
|
||||
placeholder: '产出工单',
|
||||
param: 'workOrder',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '工序',
|
||||
placeholder: '工序',
|
||||
param: 'process',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'trayCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '货物品质',
|
||||
placeholder: '货物品质',
|
||||
param: 'quality',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('asrs:deliveryHis:export') ? 'button' : '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
product,
|
||||
},
|
||||
created() {
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
warehouseId: this.listQuery.warehouseId,
|
||||
};
|
||||
getGoodSpecificationPage(params).then((response) => {
|
||||
this.formConfig[0].selectOptions = response.data.list;
|
||||
});
|
||||
getLineList({ warehouseId: this.listQuery.warehouseId }).then(
|
||||
(response) => {
|
||||
this.formConfig[1].selectOptions = response.data;
|
||||
}
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.productName = val.productName;
|
||||
this.listQuery.lineEdgeLibraryCode = val.lineEdgeLibraryCode || null;
|
||||
this.listQuery.region = val.region || null;
|
||||
this.listQuery.productQuality = val.quality || null;
|
||||
this.listQuery.workOrder = val.workOrder || null;
|
||||
this.listQuery.process = val.process || null;
|
||||
this.listQuery.rollCode = val.rollCode || null;
|
||||
this.listQuery.epddj = val.epddj || null;
|
||||
this.listQuery.trayCode = val.trayCode || null;
|
||||
this.listQuery.deliveryCode = val.deliveryCode || null;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
const params = {
|
||||
inventory: val.rollCode || null,
|
||||
trayCode: val.trayCode || null,
|
||||
deliveryCode: val.deliveryCode || null,
|
||||
};
|
||||
this.handleExport(params, '历史出库单导出');
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
mesoutsync({
|
||||
deliveryCode: val.data.deliveryCode,
|
||||
trayCode: val.data.trayCode,
|
||||
}).then(({ data }) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport(params, name) {
|
||||
// 处理查询参数
|
||||
this.$modal
|
||||
.confirm('是否确认 仅根据(膜卷号、出库单号和托盘编码) 条件导出!!!')
|
||||
.then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.excel(response, name + '.xls');
|
||||
this.exportLoading = false;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.app-container .el-table .el-table__cell {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
.el-table .warning-row {
|
||||
background: oldlace;
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
background: #f0f9eb;
|
||||
}
|
||||
</style>
|
327
src/views/asrs/deliveryHis/indexb.vue
Normal file
327
src/views/asrs/deliveryHis/indexb.vue
Normal file
@ -0,0 +1,327 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:isFold="true"
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266',
|
||||
}"
|
||||
border
|
||||
v-loading="dataListLoading"
|
||||
style="width: 100%"
|
||||
ref="dataList">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<product :delivery-history-id="scope.row.id"></product>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deliveryCode" label="出库单号" width="155" />
|
||||
<el-table-column prop="productName" label="货物名称" />
|
||||
<el-table-column prop="trayCode" label="托盘编码" />
|
||||
<el-table-column prop="needTrayNumber" label="所需托盘数" width="90" />
|
||||
<el-table-column prop="alreadyOutNumber" label="已补托盘数" width="90" />
|
||||
<el-table-column prop="status" label="出库单状态" width="90">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{ scope.row.status >= 0 ? status[scope.row.status] : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deliveryType" label="出库类型" width="95">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.deliveryType >= 0
|
||||
? deliveryType[scope.row.deliveryType]
|
||||
: ''
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lineEdgeLibraryCode" label="码头位置" />
|
||||
<el-table-column prop="region" label="发货区域" width="95">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{ scope.row.region >= 0 ? region[scope.row.region] : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="productQuality" label="货物品质" width="75" />
|
||||
<el-table-column prop="rollCode" label="膜卷号" />
|
||||
<el-table-column prop="trayType" label="托盘类型" width="75">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{ scope.row.trayType >= 0 ? trayType[scope.row.trayType] : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="workOrder" label="产出工单" />
|
||||
<el-table-column prop="department" label="部门" />
|
||||
<el-table-column prop="applicant" label="申请人" />
|
||||
<el-table-column prop="process" label="工序" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="150">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleClick({ data: scope.row, type: 'mes' })"
|
||||
v-hasPermi="['asrs:deliveryHis:mes']">
|
||||
同步给mes
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import product from './product-mini';
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import {
|
||||
getDeliveryHisPage,
|
||||
exportDeliveryHisExcel,
|
||||
mesoutsync,
|
||||
} from '@/api/oth/delivery';
|
||||
import { getLineList } from '@/api/asrs/warehouseStorehouse';
|
||||
import { getGoodSpecificationPage } from '@/api/asrs/goodSpecification';
|
||||
|
||||
const regionArr = [
|
||||
{ name: '一次分切区域1线', id: 1 },
|
||||
{ name: '一次分拣区域', id: 2 },
|
||||
{ name: '二次分切区域', id: 3 },
|
||||
{ name: '二次分拣区域', id: 4 },
|
||||
{ name: '手动包装区域', id: 5 },
|
||||
{ name: '涂覆区域', id: 6 },
|
||||
{ name: '其他', id: 7 },
|
||||
{ name: '自动包装区域', id: 8 },
|
||||
{ name: '一次分切区域2线', id: 9 },
|
||||
{ name: '一次分切区域3线', id: 10 },
|
||||
{ name: '一次分切区域4线', id: 11 },
|
||||
];
|
||||
const region = [
|
||||
'',
|
||||
'一次分切区域1线',
|
||||
'一次分拣区域',
|
||||
'二次分切区域',
|
||||
'二次分拣区域',
|
||||
'手动包装区域',
|
||||
'涂覆区域',
|
||||
'其他',
|
||||
'自动包装区域',
|
||||
'一次分切区域2线',
|
||||
'一次分切区域3线',
|
||||
'一次分切区域4线',
|
||||
];
|
||||
const status = ['', '优先执行', '正常运行', '暂停', '完成', '取消'];
|
||||
const deliveryType = ['', '单托盘出库', '多托盘出库', '点对点出库'];
|
||||
const trayType = ['无要求', '6臂', '12臂'];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getDeliveryHisPage,
|
||||
exportURL: exportDeliveryHisExcel,
|
||||
},
|
||||
status,
|
||||
deliveryType,
|
||||
trayType,
|
||||
region,
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '货物名称',
|
||||
selectOptions: [],
|
||||
param: 'productName',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
labelField: 'goodSpecificationName',
|
||||
valueField: 'goodSpecificationName',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '发货位置',
|
||||
selectOptions: [],
|
||||
param: 'lineEdgeLibraryCode',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
labelField: 'lineEdgeLibraryCode',
|
||||
valueField: 'lineEdgeLibraryCode',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '发货区域',
|
||||
selectOptions: regionArr,
|
||||
param: 'region',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '膜卷号',
|
||||
placeholder: '膜卷号',
|
||||
param: 'rollCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '复判等级',
|
||||
placeholder: '复判等级',
|
||||
param: 'epddj',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '出库单号',
|
||||
placeholder: '出库单号',
|
||||
param: 'deliveryCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产出工单',
|
||||
placeholder: '产出工单',
|
||||
param: 'workOrder',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '工序',
|
||||
placeholder: '工序',
|
||||
param: 'process',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'trayCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '货物品质',
|
||||
placeholder: '货物品质',
|
||||
param: 'quality',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('asrs:deliveryHis:export') ? 'button' : '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
product,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
warehouseId: this.listQuery.warehouseId,
|
||||
};
|
||||
getGoodSpecificationPage(params).then((response) => {
|
||||
this.formConfig[0].selectOptions = response.data.list;
|
||||
});
|
||||
getLineList({ warehouseId: this.listQuery.warehouseId }).then(
|
||||
(response) => {
|
||||
this.formConfig[1].selectOptions = response.data;
|
||||
}
|
||||
);
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.productName = val.productName;
|
||||
this.listQuery.lineEdgeLibraryCode = val.lineEdgeLibraryCode || null;
|
||||
this.listQuery.region = val.region || null;
|
||||
this.listQuery.productQuality = val.quality || null;
|
||||
this.listQuery.workOrder = val.workOrder || null;
|
||||
this.listQuery.process = val.process || null;
|
||||
this.listQuery.rollCode = val.rollCode || null;
|
||||
this.listQuery.epddj = val.epddj || null;
|
||||
this.listQuery.trayCode = val.trayCode || null;
|
||||
this.listQuery.deliveryCode = val.deliveryCode || null;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
const params = {
|
||||
inventory: val.rollCode || null,
|
||||
trayCode: val.trayCode || null,
|
||||
deliveryCode: val.deliveryCode || null,
|
||||
};
|
||||
this.handleExport(params, '历史出库单导出');
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
mesoutsync({
|
||||
deliveryCode: val.data.deliveryCode,
|
||||
trayCode: val.data.trayCode,
|
||||
}).then(({ data }) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport(params, name) {
|
||||
// 处理查询参数
|
||||
this.$modal
|
||||
.confirm('是否确认 仅根据(膜卷号、出库单号和托盘编码) 条件导出!!!')
|
||||
.then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.excel(response, name + '.xls');
|
||||
this.exportLoading = false;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.app-container .el-table .el-table__cell {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
.el-table .warning-row {
|
||||
background: oldlace;
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
background: #f0f9eb;
|
||||
}
|
||||
</style>
|
124
src/views/asrs/deliveryHis/product-mini.vue
Normal file
124
src/views/asrs/deliveryHis/product-mini.vue
Normal file
@ -0,0 +1,124 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-24 14:47:58
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-05-31 14:07:27
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<!-- <div class="app-container"> -->
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
max-height="200"
|
||||
:page="1"
|
||||
:limit="listQuery.total"
|
||||
:table-data="tableData" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import { getDeliveryHisProPage } from '@/api/oth/delivery';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'deliveryCode',
|
||||
label: '出库单号',
|
||||
},
|
||||
{
|
||||
prop: 'subContainerCode',
|
||||
label: '悬臂号',
|
||||
},
|
||||
{
|
||||
prop: 'trayCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'inventory',
|
||||
label: '膜卷号',
|
||||
width: 167,
|
||||
},
|
||||
{
|
||||
prop: 'productCode',
|
||||
label: '物料编码',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
prop: 'productName',
|
||||
label: '物料名称',
|
||||
},
|
||||
{
|
||||
prop: 'grade',
|
||||
label: '品质',
|
||||
},
|
||||
{
|
||||
prop: 'epddj',
|
||||
label: '复判等级',
|
||||
},
|
||||
{
|
||||
prop: 'planQty',
|
||||
label: '数量',
|
||||
},
|
||||
{
|
||||
prop: 'orderFrom',
|
||||
label: '产出工单',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'applicant',
|
||||
label: '申请人',
|
||||
},
|
||||
{
|
||||
prop: 'region',
|
||||
label: '目标区域',
|
||||
},
|
||||
{
|
||||
prop: 'lineEdgeLibraryCode',
|
||||
label: '目标位置',
|
||||
},
|
||||
{
|
||||
prop: 'lineId',
|
||||
label: '行号',
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
props: {
|
||||
deliveryHistoryId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getDeliveryHisProPage,
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
listQuery: {
|
||||
deliveryHistoryId: this.deliveryHistoryId,
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
};
|
||||
</script>
|
85
src/views/asrs/device/add-or-updata.vue
Normal file
85
src/views/asrs/device/add-or-updata.vue
Normal file
@ -0,0 +1,85 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-04-03 10:59:47
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="120px">
|
||||
<el-form-item label="部件编号" prop="partCode">
|
||||
<el-input v-model="dataForm.partCode" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="部件名称" prop="partName">
|
||||
<el-input v-model="dataForm.partName" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item :label="label" prop="time">
|
||||
<el-date-picker
|
||||
v-model="dataForm.time"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="timestamp" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { up, clean, update } from '@/api/oth/equipment';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
time: undefined,
|
||||
partName: undefined,
|
||||
partCode: undefined,
|
||||
},
|
||||
url: '',
|
||||
dataRule: {
|
||||
time: [{ required: true, message: '日期不能为空', trigger: 'change' }],
|
||||
},
|
||||
label: '日期',
|
||||
labelArr: ['下次更换日期', '下次清洗日期', '下次润滑日期'],
|
||||
value: 'partReplaceTime'
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(data, type) {
|
||||
this.dataForm.id = data.id;
|
||||
this.visible = true;
|
||||
this.label = this.labelArr[type - 1];
|
||||
this.url = [up, clean, update][type - 1];
|
||||
this.value = ['partReplaceTime','partCleanTime','partLubricationTime'][type - 1]
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
this.dataForm.partCode = data.partCode;
|
||||
this.dataForm.partName = data.partName;
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.dataForm[this.value] = this.dataForm.time
|
||||
this.url(this.dataForm).then((response) => {
|
||||
this.$modal.msgSuccess('操作成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
});
|
||||
},
|
||||
formClear() {
|
||||
this.$refs.dataForm.resetFields();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
204
src/views/asrs/device/mesEquipmentPartsMaintenance.vue
Normal file
204
src/views/asrs/device/mesEquipmentPartsMaintenance.vue
Normal file
@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="140"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width="50%">
|
||||
<add-or-update
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="successSubmit"/>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import { getEquipmentPage } from '@/api/oth/equipment';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'partCode',
|
||||
label: '部件编号',
|
||||
},
|
||||
{
|
||||
prop: 'partName',
|
||||
label: '部件名称',
|
||||
},
|
||||
{
|
||||
prop: 'partReplaceLastTime',
|
||||
label: '上次更换时间',
|
||||
filter: (val)=>parseTime(val,'{y}-{m}-{d}'),
|
||||
},
|
||||
{
|
||||
prop: 'partReplaceTime',
|
||||
label: '需要更换时间',
|
||||
filter: (val)=>parseTime(val,'{y}-{m}-{d}'),
|
||||
},
|
||||
{
|
||||
prop: 'partCleanLastTime',
|
||||
label: '上次清洗时间',
|
||||
filter: (val)=>parseTime(val,'{y}-{m}-{d}'),
|
||||
},
|
||||
{
|
||||
prop: 'partCleanTime',
|
||||
label: '需要清洗时间',
|
||||
filter: (val)=>parseTime(val,'{y}-{m}-{d}'),
|
||||
},
|
||||
{
|
||||
prop: 'partLubricationLastTime',
|
||||
label: '上次润滑时间',
|
||||
filter: (val)=>parseTime(val,'{y}-{m}-{d}'),
|
||||
},
|
||||
{
|
||||
prop: 'partLubricationTime',
|
||||
label: '需要润滑时间',
|
||||
filter: (val)=>parseTime(val,'{y}-{m}-{d}'),
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getEquipmentPage,
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'up',
|
||||
btnName: '更换',
|
||||
},
|
||||
{
|
||||
type: 'clean',
|
||||
btnName: '清洗',
|
||||
},
|
||||
{
|
||||
type: 'update',
|
||||
btnName: '润滑',
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '部件编号',
|
||||
placeholder: '部件编号',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '部件名称',
|
||||
placeholder: '部件名称',
|
||||
param: 'name',
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '重置',
|
||||
name: 'reset',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: { AddOrUpdate },
|
||||
created() {
|
||||
this.listQuery.warehouseId = undefined;
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.partCode = val.code;
|
||||
this.listQuery.partName = val.name;
|
||||
this.listQuery.partReplaceLastTime = val.searchTime;
|
||||
this.listQuery.partReplaceTime = val.searchTime;
|
||||
this.listQuery.partCleanLastTime = val.searchTime;
|
||||
this.listQuery.partCleanTime = val.searchTime;
|
||||
this.listQuery.partLubricationLastTime = val.searchTime;
|
||||
this.listQuery.partLubricationTime = val.searchTime;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
//tableBtn点击
|
||||
otherMethods(val) {
|
||||
if (val.type === "clean") {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = "清洗";
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data,2);
|
||||
});
|
||||
} else if (val.type === "update") {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = "润滑";
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data,3);
|
||||
});
|
||||
} else if (val.type === "up") {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = "更换";
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data,1);
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
147
src/views/asrs/device/mesEquipmentPartsMaintenanceLog.vue
Normal file
147
src/views/asrs/device/mesEquipmentPartsMaintenanceLog.vue
Normal file
@ -0,0 +1,147 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData"></base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import codeFilter from '../mixins/code-filter';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import { getEquipmentLogPage } from '@/api/oth/equipment';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'partCode',
|
||||
label: '部件编号',
|
||||
},
|
||||
{
|
||||
prop: 'partName',
|
||||
label: '部件名称',
|
||||
},
|
||||
{
|
||||
prop: 'maintenanceType',
|
||||
label: '保养类型',
|
||||
filter: codeFilter('maintenanceType'),
|
||||
},
|
||||
{
|
||||
prop: 'maintenanceTime',
|
||||
label: '保养时间',
|
||||
filter: (val)=>parseTime(val,'{y}-{m}-{d}'),
|
||||
},
|
||||
];
|
||||
|
||||
const mainTaskType = [
|
||||
{
|
||||
name: '更换',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: '清洗',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '润滑',
|
||||
id: 3,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getEquipmentLogPage,
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '部件编号',
|
||||
placeholder: '部件编号',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '部件名称',
|
||||
placeholder: '部件名称',
|
||||
param: 'name',
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '保养类型',
|
||||
selectOptions: mainTaskType,
|
||||
param: 'type',
|
||||
defaultSelect: '',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '重置',
|
||||
name: 'reset',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.listQuery.warehouseId = undefined;
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.partCode = val.code;
|
||||
this.listQuery.partName = val.name;
|
||||
this.listQuery.maintenanceTime = val.searchTime;
|
||||
this.listQuery.maintenanceType = val.type;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
188
src/views/asrs/dockTransfer/index.vue
Normal file
188
src/views/asrs/dockTransfer/index.vue
Normal file
@ -0,0 +1,188 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2024-02-27 14:43:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-04-25 16:39:32
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="box-card">
|
||||
<div class="tip">码头起点</div>
|
||||
<el-form :inline="true" :model="startData" label-width="100px">
|
||||
<el-form-item label="选择区域" class="drawer" prop="region">
|
||||
<el-select
|
||||
v-model="startData.region"
|
||||
style="width: 100%"
|
||||
@change="getSArr"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择区域">
|
||||
<el-option
|
||||
v-for="item in regionArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择位置" class="drawer" prop="targetId">
|
||||
<el-select
|
||||
v-model="startData.targetId"
|
||||
:disabled="SDisable"
|
||||
style="width: 100%"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择位置">
|
||||
<el-option
|
||||
v-for="item in potSArr"
|
||||
:key="item.id"
|
||||
:label="item.lineEdgeLibraryCode"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-divider style="margin-bottom: 36px">
|
||||
<i class="el-icon-bottom"></i>
|
||||
</el-divider>
|
||||
<div class="tipe">码头终点</div>
|
||||
<el-form :inline="true" :model="endData" label-width="100px">
|
||||
<el-form-item label="选择区域" class="drawer" prop="region">
|
||||
<el-select
|
||||
v-model="endData.region"
|
||||
style="width: 100%"
|
||||
@change="getEArr"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择区域">
|
||||
<el-option
|
||||
v-for="item in regionArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择位置" class="drawer" prop="targetId">
|
||||
<el-select
|
||||
v-model="endData.targetId"
|
||||
:disabled="EDisable"
|
||||
style="width: 100%"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择位置">
|
||||
<el-option
|
||||
v-for="item in potEArr"
|
||||
:key="item.id"
|
||||
:label="item.lineEdgeLibraryCode"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button type="primary" style="float: left" @click="move()">
|
||||
转移
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getLineList, moveLine } from '@/api/asrs/warehouseStorehouse';
|
||||
const regionArr = [
|
||||
{ name: '一次分切区域1线', id: 1 },
|
||||
{ name: '一次分拣区域', id: 2 },
|
||||
{ name: '二次分切区域', id: 3 },
|
||||
{ name: '二次分拣区域', id: 4 },
|
||||
{ name: '手动包装区域', id: 5 },
|
||||
{ name: '涂覆区域', id: 6 },
|
||||
{ name: '其他', id: 7 },
|
||||
{ name: '自动包装区域', id: 8 },
|
||||
{ name: '一次分切区域2线', id: 9 },
|
||||
{ name: '一次分切区域3线', id: 10 },
|
||||
{ name: '一次分切区域4线', id: 11 },
|
||||
];
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
startData: {
|
||||
targetId: undefined,
|
||||
region: undefined,
|
||||
},
|
||||
endData: {
|
||||
targetId: undefined,
|
||||
region: undefined,
|
||||
},
|
||||
potSArr: [],
|
||||
potEArr: [],
|
||||
regionArr,
|
||||
SDisable: true,
|
||||
EDisable: true,
|
||||
warehouseId: '1696803324030865409',
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.SDisable = true;
|
||||
this.EDisable = true;
|
||||
},
|
||||
getSArr(val) {
|
||||
getLineList({ region: val, warehouseId: this.warehouseId }).then(
|
||||
(response) => {
|
||||
this.potSArr = response.data;
|
||||
this.SDisable = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
getEArr(val) {
|
||||
getLineList({ region: val, warehouseId: this.warehouseId }).then(
|
||||
(response) => {
|
||||
this.potEArr = response.data;
|
||||
this.EDisable = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
move() {
|
||||
if (this.startData.targetId && this.endData.targetId) {
|
||||
moveLine({
|
||||
sourceId: this.startData.targetId,
|
||||
targetId: this.endData.targetId,
|
||||
}).then((response) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请选择起终点!',
|
||||
type: 'warning',
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box-card {
|
||||
padding: 50px;
|
||||
margin: 20px;
|
||||
text-align: center;
|
||||
box-shadow: 0px 0px 5px 2px gray;
|
||||
position: relative;
|
||||
}
|
||||
.tip {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 100px;
|
||||
color: #409eff;
|
||||
}
|
||||
.tipe {
|
||||
position: absolute;
|
||||
top: 150px;
|
||||
left: 100px;
|
||||
color: #409eff;
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
</style>
|
188
src/views/asrs/dockTransfer/indexb.vue
Normal file
188
src/views/asrs/dockTransfer/indexb.vue
Normal file
@ -0,0 +1,188 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2024-02-27 14:43:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-10-09 14:22:05
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="box-card">
|
||||
<div class="tip">码头起点</div>
|
||||
<el-form :inline="true" :model="startData" label-width="100px">
|
||||
<el-form-item label="选择区域" class="drawer" prop="region">
|
||||
<el-select
|
||||
v-model="startData.region"
|
||||
style="width: 100%"
|
||||
@change="getSArr"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择区域">
|
||||
<el-option
|
||||
v-for="item in regionArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择位置" class="drawer" prop="targetId">
|
||||
<el-select
|
||||
v-model="startData.targetId"
|
||||
:disabled="SDisable"
|
||||
style="width: 100%"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择位置">
|
||||
<el-option
|
||||
v-for="item in potSArr"
|
||||
:key="item.id"
|
||||
:label="item.lineEdgeLibraryCode"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-divider style="margin-bottom: 36px">
|
||||
<i class="el-icon-bottom"></i>
|
||||
</el-divider>
|
||||
<div class="tipe">码头终点</div>
|
||||
<el-form :inline="true" :model="endData" label-width="100px">
|
||||
<el-form-item label="选择区域" class="drawer" prop="region">
|
||||
<el-select
|
||||
v-model="endData.region"
|
||||
style="width: 100%"
|
||||
@change="getEArr"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择区域">
|
||||
<el-option
|
||||
v-for="item in regionArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择位置" class="drawer" prop="targetId">
|
||||
<el-select
|
||||
v-model="endData.targetId"
|
||||
:disabled="EDisable"
|
||||
style="width: 100%"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择位置">
|
||||
<el-option
|
||||
v-for="item in potEArr"
|
||||
:key="item.id"
|
||||
:label="item.lineEdgeLibraryCode"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-button type="primary" style="float: left" @click="move()">
|
||||
转移
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getLineList, moveLine } from '@/api/asrs/warehouseStorehouse';
|
||||
const regionArr = [
|
||||
{ name: '一次分切区域1线', id: 1 },
|
||||
{ name: '一次分拣区域', id: 2 },
|
||||
{ name: '二次分切区域', id: 3 },
|
||||
{ name: '二次分拣区域', id: 4 },
|
||||
{ name: '手动包装区域', id: 5 },
|
||||
{ name: '涂覆区域', id: 6 },
|
||||
{ name: '其他', id: 7 },
|
||||
{ name: '自动包装区域', id: 8 },
|
||||
{ name: '一次分切区域2线', id: 9 },
|
||||
{ name: '一次分切区域3线', id: 10 },
|
||||
{ name: '一次分切区域4线', id: 11 },
|
||||
];
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
startData: {
|
||||
targetId: undefined,
|
||||
region: undefined,
|
||||
},
|
||||
endData: {
|
||||
targetId: undefined,
|
||||
region: undefined,
|
||||
},
|
||||
potSArr: [],
|
||||
potEArr: [],
|
||||
regionArr,
|
||||
SDisable: true,
|
||||
EDisable: true,
|
||||
warehouseId: '1698950657556340737',
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.SDisable = true;
|
||||
this.EDisable = true;
|
||||
},
|
||||
getSArr(val) {
|
||||
getLineList({ region: val, warehouseId: this.warehouseId }).then(
|
||||
(response) => {
|
||||
this.potSArr = response.data;
|
||||
this.SDisable = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
getEArr(val) {
|
||||
getLineList({ region: val, warehouseId: this.warehouseId }).then(
|
||||
(response) => {
|
||||
this.potEArr = response.data;
|
||||
this.EDisable = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
move() {
|
||||
if (this.startData.targetId && this.endData.targetId) {
|
||||
moveLine({
|
||||
sourceId: this.startData.targetId,
|
||||
targetId: this.endData.targetId,
|
||||
}).then((response) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请选择起终点!',
|
||||
type: 'warning',
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.box-card {
|
||||
padding: 50px;
|
||||
margin: 20px;
|
||||
text-align: center;
|
||||
box-shadow: 0px 0px 5px 2px gray;
|
||||
position: relative;
|
||||
}
|
||||
.tip {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 100px;
|
||||
color: #409eff;
|
||||
}
|
||||
.tipe {
|
||||
position: absolute;
|
||||
top: 150px;
|
||||
left: 100px;
|
||||
color: #409eff;
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
</style>
|
108
src/views/asrs/equipmentList/add-or-updata.vue
Normal file
108
src/views/asrs/equipmentList/add-or-updata.vue
Normal file
@ -0,0 +1,108 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-06-11 15:14:28
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="120px">
|
||||
<el-form-item label="设备名称" prop="equipmentName">
|
||||
<el-input
|
||||
v-model="dataForm.equipmentName"
|
||||
clearable
|
||||
placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编码" prop="equipmentCode">
|
||||
<el-input
|
||||
v-model="dataForm.equipmentCode"
|
||||
clearable
|
||||
placeholder="请输入设备编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型" prop="typeId">
|
||||
<el-select
|
||||
v-model="dataForm.typeId"
|
||||
clearable
|
||||
@change="setInfo"
|
||||
placeholder="请选择设备类型">
|
||||
<el-option
|
||||
v-for="item in urlOptions.optionArr.arr0"
|
||||
:key="item.id"
|
||||
:label="item.typeName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备数量" prop="equipmentNumber">
|
||||
<el-input-number
|
||||
v-model="dataForm.equipmentNumber"
|
||||
:min="0"
|
||||
placeholder="请输入设备数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../mixins/basic-add';
|
||||
import {
|
||||
createEquipment,
|
||||
updateEquipment,
|
||||
getEquipment,
|
||||
} from '@/api/oth/equipmentList';
|
||||
import { getEquipmentTypePage } from '@/api/oth/equipmentType';
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
createURL: createEquipment,
|
||||
updateURL: updateEquipment,
|
||||
infoURL: getEquipment,
|
||||
getOption: true,
|
||||
optionArrUrl: [getEquipmentTypePage],
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
equipmentName: undefined,
|
||||
equipmentCode: undefined,
|
||||
typeId: undefined,
|
||||
equipmentNumber: undefined,
|
||||
remark: undefined,
|
||||
typeCode: undefined,
|
||||
typeName: undefined,
|
||||
},
|
||||
dataRule: {
|
||||
equipmentName: [
|
||||
{ required: true, message: '设备名称不能为空', trigger: 'blur' },
|
||||
],
|
||||
equipmentCode: [
|
||||
{ required: true, message: '设备编码不能为空', trigger: 'blur' },
|
||||
],
|
||||
typeId: [
|
||||
{ required: true, message: '设备类型不能为空', trigger: 'change' },
|
||||
],
|
||||
equipmentNumber: [
|
||||
{ required: true, message: '设备数量不能为空', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
setInfo(id) {
|
||||
const info = this.urlOptions.optionArr.arr0.find(
|
||||
(item) => item.id === id
|
||||
);
|
||||
this.dataForm.typeCode = info.typeCode;
|
||||
this.dataForm.typeName = info.typeName;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
169
src/views/asrs/equipmentList/index.vue
Normal file
169
src/views/asrs/equipmentList/index.vue
Normal file
@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="100"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width="50%">
|
||||
<add-or-update
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="successSubmit"/>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import {
|
||||
deleteEquipment,
|
||||
getEquipmentPage,
|
||||
} from '@/api/oth/equipmentList';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'equipmentName',
|
||||
label: '设备名称',
|
||||
},
|
||||
{
|
||||
prop: 'equipmentCode',
|
||||
label: '设备编码',
|
||||
},
|
||||
{
|
||||
prop: 'typeName',
|
||||
label: '设备类型',
|
||||
},
|
||||
{
|
||||
prop: 'typeCode',
|
||||
label: '设备类型编码',
|
||||
},
|
||||
{
|
||||
prop: 'equipmentNumber',
|
||||
label: '设备数量',
|
||||
},
|
||||
{
|
||||
prop: 'user',
|
||||
label: '创建人',
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getEquipmentPage,
|
||||
deleteURL: deleteEquipment,
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
},{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
},
|
||||
].filter((v)=>v),
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '设备名称',
|
||||
placeholder: '设备名称',
|
||||
param: 'name',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true,
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.equipmentName = val.name;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
69
src/views/asrs/equipmentType/add-or-updata.vue
Normal file
69
src/views/asrs/equipmentType/add-or-updata.vue
Normal file
@ -0,0 +1,69 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-06-11 14:52:04
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="120px">
|
||||
<el-form-item label="设备类型" prop="typeName">
|
||||
<el-input
|
||||
v-model="dataForm.typeName"
|
||||
clearable
|
||||
placeholder="请输入设备类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型编码" prop="typeCode">
|
||||
<el-input
|
||||
v-model="dataForm.typeCode"
|
||||
clearable
|
||||
placeholder="请输入设备类型编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../mixins/basic-add';
|
||||
import {
|
||||
createEquipmentType,
|
||||
updateEquipmentType,
|
||||
getEquipmentType,
|
||||
getCode,
|
||||
} from '@/api/oth/equipmentType';
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
createURL: createEquipmentType,
|
||||
updateURL: updateEquipmentType,
|
||||
infoURL: getEquipmentType,
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
typeName: undefined,
|
||||
typeCode: undefined,
|
||||
remark: undefined,
|
||||
},
|
||||
dataRule: {
|
||||
typeName: [
|
||||
{ required: true, message: '设备类型不能为空', trigger: 'blur' },
|
||||
],
|
||||
typeCode: [
|
||||
{ required: true, message: '设备类型编码不能为空', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
157
src/views/asrs/equipmentType/index.vue
Normal file
157
src/views/asrs/equipmentType/index.vue
Normal file
@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="100"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
:dialogVisible="addOrUpdateVisible"
|
||||
@cancel="handleCancel"
|
||||
@confirm="handleConfirm"
|
||||
:before-close="handleCancel"
|
||||
width="50%">
|
||||
<add-or-update
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="successSubmit"/>
|
||||
</base-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import {
|
||||
deleteEquipmentType,
|
||||
getEquipmentTypePage,
|
||||
} from '@/api/oth/equipmentType';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'typeName',
|
||||
label: '设备类型',
|
||||
},
|
||||
{
|
||||
prop: 'typeCode',
|
||||
label: '设备类型编码',
|
||||
},
|
||||
{
|
||||
prop: 'user',
|
||||
label: '创建人',
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getEquipmentTypePage,
|
||||
deleteURL: deleteEquipmentType,
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [{
|
||||
type: 'edit',
|
||||
btnName: '编辑',
|
||||
},{
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
},
|
||||
].filter((v)=>v),
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '设备类型',
|
||||
placeholder: '设备类型',
|
||||
param: 'name',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true,
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.typeName = val.name;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -136,7 +136,9 @@ export default {
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {},
|
||||
created() {
|
||||
this.listQuery.warehouseId = null;
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
|
@ -77,7 +77,6 @@ export default {
|
||||
deleteURL: deleteGoodSpecification,
|
||||
},
|
||||
tableProps,
|
||||
bPage: true,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`asrs:good-specification:update`)
|
||||
? {
|
||||
@ -138,7 +137,7 @@ export default {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
this.listQuery.warehouseId = null;
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
|
169
src/views/asrs/heavenlyEyeLog/index-2.vue
Normal file
169
src/views/asrs/heavenlyEyeLog/index-2.vue
Normal file
@ -0,0 +1,169 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2024-05-15 16:18:19
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-05-16 09:57:13
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266',
|
||||
}"
|
||||
border
|
||||
:cell-style="cellStyle"
|
||||
:span-method="objectSpanMethod"
|
||||
empty-text="暂无数据"
|
||||
style="width: 100%"
|
||||
ref="dataList">
|
||||
<el-table-column type="index" fixed="left" label="#" align="center" />
|
||||
<el-table-column prop="name" label="仓库名"></el-table-column>
|
||||
<el-table-column prop="code" label="仓库编码"></el-table-column>
|
||||
<el-table-column
|
||||
v-for="item in columns"
|
||||
:key="item.label"
|
||||
align="center"
|
||||
:label="item.label">
|
||||
<el-table-column
|
||||
v-for="it in item.children"
|
||||
:key="it.prop"
|
||||
:prop="it.prop"
|
||||
align="center"
|
||||
header-align="left"
|
||||
:label="it.label">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row[it.prop] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [
|
||||
{
|
||||
name: 1,
|
||||
code: '1',
|
||||
prop1: '1',
|
||||
prop2: '2',
|
||||
prop3: '3',
|
||||
prop4: '4',
|
||||
prop5: '5',
|
||||
prop6: '6',
|
||||
span: [2, 4],
|
||||
},
|
||||
{
|
||||
name: 2,
|
||||
code: '2',
|
||||
prop1: '7',
|
||||
prop2: '8',
|
||||
prop3: '9',
|
||||
prop4: '10',
|
||||
prop5: '11',
|
||||
prop6: '12',
|
||||
span: [1, 5],
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
label: '2023/1',
|
||||
children: [
|
||||
{
|
||||
label: '1',
|
||||
prop: 'prop1',
|
||||
},
|
||||
{
|
||||
label: '15',
|
||||
prop: 'prop2',
|
||||
},
|
||||
{
|
||||
label: '30',
|
||||
prop: 'prop3',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '2023/2',
|
||||
children: [
|
||||
{
|
||||
label: '1',
|
||||
prop: 'prop4',
|
||||
},
|
||||
{
|
||||
label: '15',
|
||||
prop: 'prop5',
|
||||
},
|
||||
{
|
||||
label: '30',
|
||||
prop: 'prop6',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
color: [
|
||||
'#5470c6',
|
||||
'#91cc75',
|
||||
'#fac858',
|
||||
'#ee6666',
|
||||
'#73c0de',
|
||||
'#3ba272',
|
||||
'#fc8452',
|
||||
'#9a60b4',
|
||||
'#ea7ccc',
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {},
|
||||
methods: {
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
let i = 0;
|
||||
if (columnIndex === 3) {
|
||||
return [1, row.span[0]];
|
||||
} else if (columnIndex === 3 + row.span[i]) {
|
||||
i += 1;
|
||||
return [1, row.span[i]];
|
||||
} else if (columnIndex > 3) {
|
||||
return [0, 0];
|
||||
}
|
||||
},
|
||||
cellStyle({ row, column, rowIndex, columnIndex }) {
|
||||
let i = 0;
|
||||
if (columnIndex === 3) {
|
||||
return {
|
||||
color: 'white',
|
||||
borderRadius: '15px',
|
||||
background: this.color[0],
|
||||
};
|
||||
} else if (columnIndex === 3 + row.span[i]) {
|
||||
i += 1;
|
||||
return {
|
||||
color: 'white',
|
||||
borderRadius: '15px',
|
||||
background: i < 9 ? this.color[i] : 'none',
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.app-container .el-table .el-table__cell {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
.el-table .warning-row {
|
||||
background: oldlace;
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
background: #f0f9eb;
|
||||
}
|
||||
</style>
|
@ -94,7 +94,7 @@ export default {
|
||||
label: '订单出货日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd hh:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:01:54
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-31 11:20:46
|
||||
* @LastEditTime: 2024-02-23 16:41:15
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -58,10 +58,10 @@ export default {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.urlOptions.occupancyURL(this.aId).then((response) => {
|
||||
this.occupancyData = response.data.toFixed(2);
|
||||
this.occupancyData = response.data[0].toFixed(2);
|
||||
const num = mul(this.occupancyData, 100);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.gaugeChart.initChart(num);
|
||||
this.$refs.gaugeChart.initChart(num,response.data[1]);
|
||||
});
|
||||
});
|
||||
this.urlOptions.allURL(this.aId).then((response) => {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:01:54
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-31 11:22:35
|
||||
* @LastEditTime: 2024-10-09 10:34:59
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -53,17 +53,15 @@ export default {
|
||||
barChart,
|
||||
gaugeChart,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.urlOptions.occupancyURL(this.bId).then((response) => {
|
||||
this.occupancyData = response.data.toFixed(2);
|
||||
this.occupancyData = response.data[0].toFixed(2);
|
||||
const num = mul(this.occupancyData, 100);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.gaugeChart.initChart(num);
|
||||
this.$refs.gaugeChart.initChart(num,response.data[1]);
|
||||
});
|
||||
});
|
||||
this.urlOptions.allURL(this.bId).then((response) => {
|
||||
@ -77,15 +75,16 @@ export default {
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
.chart-container {
|
||||
min-height: calc(100vh - 120px - 8px);
|
||||
background-color: #f0f2f7;
|
||||
}
|
||||
|
||||
.chart-card {
|
||||
min-height: calc(100vh - 120px - 8px);
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
|
@ -32,6 +32,7 @@ import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import codeFilter from '../mixins/code-filter';
|
||||
import { getMainTaskPage, deleteMainTask } from '@/api/oth/mainTask';
|
||||
import point from './point';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
@ -57,15 +58,26 @@ const tableProps = [
|
||||
label: '堆垛机',
|
||||
width:110
|
||||
},
|
||||
{
|
||||
prop: 'barCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'agv',
|
||||
label: 'agv',
|
||||
},
|
||||
{
|
||||
prop: 'agvStartPoint',
|
||||
label: 'AGV起点',
|
||||
},
|
||||
{
|
||||
prop: 'agvEndPoint',
|
||||
label: 'AGV终点',
|
||||
},
|
||||
{
|
||||
prop: 'mainTaskState',
|
||||
label: '状态',
|
||||
filter: codeFilter('mainTaskState'),
|
||||
width:110
|
||||
subcomponent: point
|
||||
},
|
||||
{
|
||||
prop: 'taskSource',
|
||||
@ -93,6 +105,46 @@ const mainTaskType = [
|
||||
name: '移库',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: '出库+移库',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
name: '不带agv入库',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: '入库+6臂空托盘出库',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库+移库',
|
||||
id: 8,
|
||||
},
|
||||
{
|
||||
name: '入库+12臂空托盘出库',
|
||||
id: 9,
|
||||
},
|
||||
{
|
||||
name: '平库移库',
|
||||
id: 10,
|
||||
},
|
||||
{
|
||||
name: '盘库出库',
|
||||
id: 11,
|
||||
},
|
||||
{
|
||||
name: '盘库入库',
|
||||
id: 12,
|
||||
},
|
||||
{
|
||||
name: '盘库出库+移库',
|
||||
id: 13,
|
||||
},
|
||||
];
|
||||
const mainTaskState = [
|
||||
{
|
||||
@ -115,23 +167,21 @@ const mainTaskState = [
|
||||
name: '堆垛机运行中',
|
||||
id: 4,
|
||||
},
|
||||
// {
|
||||
// name: '完成',
|
||||
// id: 5,
|
||||
// },
|
||||
];
|
||||
const agvArr = [
|
||||
{
|
||||
name: 'A1',
|
||||
id: 1,
|
||||
name: '完成',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: 'A2',
|
||||
id: 2,
|
||||
name: '已发送传输线',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: 'A3',
|
||||
id: 3,
|
||||
name: '传输线运行中',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '暂时无空托盘',
|
||||
id: 8,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
@ -149,10 +199,10 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'canlce',
|
||||
btnName: '取消',
|
||||
},
|
||||
// {
|
||||
// type: 'canlce',
|
||||
// btnName: '取消',
|
||||
// },
|
||||
],
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
@ -170,6 +220,12 @@ export default {
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'tcode',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '状态',
|
||||
@ -181,7 +237,7 @@ export default {
|
||||
{
|
||||
type: 'select',
|
||||
label: 'agv',
|
||||
selectOptions: agvArr,
|
||||
selectOptions: [],
|
||||
param: 'agv',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
@ -191,7 +247,7 @@ export default {
|
||||
label: '选择日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd hh:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
@ -212,8 +268,19 @@ export default {
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {},
|
||||
created() {
|
||||
this.setFormConfig();
|
||||
},
|
||||
methods: {
|
||||
setFormConfig() {
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i,
|
||||
};
|
||||
this.formConfig[4].selectOptions.push(obj);
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
@ -221,6 +288,7 @@ export default {
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.mainTaskCode = val.code;
|
||||
this.listQuery.mainTaskType = val.taskType;
|
||||
this.listQuery.barCode = val.tcode;
|
||||
this.listQuery.mainTaskState = val.status;
|
||||
this.listQuery.agv = val.agv;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
@ -231,6 +299,7 @@ export default {
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
warehouseId: '1696803324030865409',
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
|
336
src/views/asrs/jobMainTask/indexb.vue
Normal file
336
src/views/asrs/jobMainTask/indexb.vue
Normal file
@ -0,0 +1,336 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:isFold="true"
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="80"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import codeFilter from '../mixins/code-filter';
|
||||
import { getMainTaskPage, deleteMainTask } from '@/api/oth/mainTask';
|
||||
import point from './point';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'mainTaskCode',
|
||||
label: '任务编码',
|
||||
},
|
||||
{
|
||||
prop: 'inOutWarehouseName',
|
||||
label: '出入移库库位',
|
||||
},
|
||||
{
|
||||
prop: 'relocationWarehouseName',
|
||||
label: '移库终点库位',
|
||||
},
|
||||
{
|
||||
prop: 'mainTaskType',
|
||||
label: '任务类型',
|
||||
filter: codeFilter('mainTaskType'),
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'stacker',
|
||||
label: '堆垛机',
|
||||
width:110
|
||||
},
|
||||
{
|
||||
prop: 'barCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'agv',
|
||||
label: 'agv',
|
||||
},
|
||||
{
|
||||
prop: 'agvStartPoint',
|
||||
label: 'AGV起点',
|
||||
},
|
||||
{
|
||||
prop: 'agvEndPoint',
|
||||
label: 'AGV终点',
|
||||
},
|
||||
{
|
||||
prop: 'mainTaskState',
|
||||
label: '状态',
|
||||
subcomponent: point
|
||||
},
|
||||
{
|
||||
prop: 'taskSource',
|
||||
label: '任务来源',
|
||||
filter: codeFilter('taskSource'),
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime,
|
||||
width:150
|
||||
},
|
||||
];
|
||||
const mainTaskType = [
|
||||
{
|
||||
name: '入库',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: '出库',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '移库',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: '出库+移库',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
name: '不带agv入库',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: '入库+6臂空托盘出库',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库+移库',
|
||||
id: 8,
|
||||
},
|
||||
{
|
||||
name: '入库+12臂空托盘出库',
|
||||
id: 9,
|
||||
},
|
||||
{
|
||||
name: '平库移库',
|
||||
id: 10,
|
||||
},
|
||||
{
|
||||
name: '盘库出库',
|
||||
id: 11,
|
||||
},
|
||||
{
|
||||
name: '盘库入库',
|
||||
id: 12,
|
||||
},
|
||||
{
|
||||
name: '盘库出库+移库',
|
||||
id: 13,
|
||||
},
|
||||
];
|
||||
const mainTaskState = [
|
||||
{
|
||||
name: '开始',
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: '已发送agv',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: 'agv运行中',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '已发送堆垛机',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: '堆垛机运行中',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
name: '完成',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: '已发送传输线',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: '传输线运行中',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '暂时无空托盘',
|
||||
id: 8,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getMainTaskPage,
|
||||
deleteURL: deleteMainTask,
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
// {
|
||||
// type: 'canlce',
|
||||
// btnName: '取消',
|
||||
// },
|
||||
],
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '任务编码',
|
||||
placeholder: '任务编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '任务类型',
|
||||
selectOptions: mainTaskType,
|
||||
param: 'taskType',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'tcode',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '状态',
|
||||
selectOptions: mainTaskState,
|
||||
param: 'status',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: 'agv',
|
||||
selectOptions: [],
|
||||
param: 'agv',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '选择日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '重置',
|
||||
name: 'reset',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId
|
||||
this.setFormConfig();
|
||||
},
|
||||
methods: {
|
||||
setFormConfig() {
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i,
|
||||
};
|
||||
this.formConfig[4].selectOptions.push(obj);
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.mainTaskCode = val.code;
|
||||
this.listQuery.mainTaskType = val.taskType;
|
||||
this.listQuery.barCode = val.tcode;
|
||||
this.listQuery.mainTaskState = val.status;
|
||||
this.listQuery.agv = val.agv;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
warehouseId: '1698950657556340737',
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val){
|
||||
this.$confirm(`确定对${'[任务编码=' + val.data.mainTaskCode + ']'}进行取消操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.urlOptions.deleteURL(val.data.id).then(({ data }) => {
|
||||
this.$message({
|
||||
message: "操作成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
54
src/views/asrs/jobMainTask/point.vue
Normal file
54
src/views/asrs/jobMainTask/point.vue
Normal file
@ -0,0 +1,54 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2024-01-17 15:16:28
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-03-13 15:02:49
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
{{ mainTaskState[injectData.mainTaskState] }}
|
||||
<el-button v-if="injectData.mainTaskState===8" type="text" size="mini" @click="Radd()">重补</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Radd } from '@/api/oth/mainTask';
|
||||
const mainTaskState = {
|
||||
0: '开始',
|
||||
1: '已发送agv',
|
||||
2: 'agv运行中',
|
||||
3: '已发送堆垛机',
|
||||
4: '堆垛机运行中',
|
||||
5: '完成',
|
||||
6: '已发送传输线',
|
||||
7: '传输线运行中',
|
||||
8: '暂时无空托盘',
|
||||
};
|
||||
export default {
|
||||
name: 'point',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData,
|
||||
mainTaskState,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
Radd() {
|
||||
Radd(this.injectData.id).then((response) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
@ -24,7 +24,8 @@
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import codeFilter from '../mixins/code-filter';
|
||||
import { getMainTaskHistoryPage } from '@/api/oth/mainTaskHistory';
|
||||
import { getMainTaskHistoryPage,exportMainTaskHistoryExcel } from '@/api/oth/mainTaskHistory';
|
||||
import point from './point';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
@ -50,15 +51,26 @@ const tableProps = [
|
||||
label: '堆垛机',
|
||||
width:110
|
||||
},
|
||||
{
|
||||
prop: 'barCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'agv',
|
||||
label: 'agv',
|
||||
},
|
||||
{
|
||||
prop: 'agvStartPoint',
|
||||
label: 'AGV起点',
|
||||
},
|
||||
{
|
||||
prop: 'agvEndPoint',
|
||||
label: 'AGV终点',
|
||||
},
|
||||
{
|
||||
prop: 'mainTaskState',
|
||||
label: '状态',
|
||||
filter: codeFilter('mainTaskState'),
|
||||
width:110
|
||||
subcomponent: point
|
||||
},
|
||||
{
|
||||
prop: 'taskSource',
|
||||
@ -92,6 +104,46 @@ const mainTaskType = [
|
||||
name: '移库',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: '出库+移库',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
name: '不带agv入库',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: '入库+6臂空托盘出库',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库+移库',
|
||||
id: 8,
|
||||
},
|
||||
{
|
||||
name: '入库+12臂空托盘出库',
|
||||
id: 9,
|
||||
},
|
||||
{
|
||||
name: '平库移库',
|
||||
id: 10,
|
||||
},
|
||||
{
|
||||
name: '盘库出库',
|
||||
id: 11,
|
||||
},
|
||||
{
|
||||
name: '盘库入库',
|
||||
id: 12,
|
||||
},
|
||||
{
|
||||
name: '盘库出库+移库',
|
||||
id: 13,
|
||||
},
|
||||
];
|
||||
const mainTaskState = [
|
||||
{
|
||||
@ -118,34 +170,36 @@ const mainTaskState = [
|
||||
name: '完成',
|
||||
id: 5,
|
||||
},
|
||||
];
|
||||
const agvArr = [
|
||||
{
|
||||
name: 'A1',
|
||||
id: 1,
|
||||
name: '已发送传输线',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: 'A2',
|
||||
id: 2,
|
||||
name: '传输线运行中',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: 'A3',
|
||||
id: 3,
|
||||
name: '暂时无空托盘',
|
||||
id: 8,
|
||||
},
|
||||
];
|
||||
const stackerArr = [
|
||||
{
|
||||
name: 'D1',
|
||||
name: 'DDJ1',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: 'D2',
|
||||
name: 'DDJ2',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: 'D3',
|
||||
name: 'DDJ3',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: 'DDJ4',
|
||||
id: 4,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
@ -153,6 +207,7 @@ export default {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getMainTaskHistoryPage,
|
||||
exportURL: exportMainTaskHistoryExcel,
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
@ -171,6 +226,12 @@ export default {
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'tcode',
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '状态',
|
||||
@ -190,7 +251,7 @@ export default {
|
||||
{
|
||||
type: 'select',
|
||||
label: 'agv',
|
||||
selectOptions: agvArr,
|
||||
selectOptions: [],
|
||||
param: 'agv',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
@ -200,7 +261,7 @@ export default {
|
||||
label: '选择日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd hh:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
@ -217,14 +278,31 @@ export default {
|
||||
btnName: '重置',
|
||||
name: 'reset',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.listQuery.mainTaskState = 5;
|
||||
},
|
||||
this.setFormConfig();
|
||||
},
|
||||
methods: {
|
||||
setFormConfig() {
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i,
|
||||
};
|
||||
this.formConfig[4].selectOptions.push(obj);
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
@ -232,6 +310,7 @@ export default {
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.mainTaskCode = val.code;
|
||||
this.listQuery.mainTaskType = val.taskType;
|
||||
this.listQuery.barCode = val.tcode;
|
||||
// this.listQuery.mainTaskState = val.status;
|
||||
this.listQuery.mainTaskState = 5;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
@ -244,6 +323,7 @@ export default {
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
warehouseId: '1696803324030865409',
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
@ -251,6 +331,21 @@ export default {
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.pageNo = undefined;
|
||||
this.listQuery.pageSize = undefined;
|
||||
this.listQuery.mainTaskCode = val.code;
|
||||
this.listQuery.mainTaskType = val.taskType;
|
||||
this.listQuery.barCode = val.tcode;
|
||||
// this.listQuery.mainTaskState = val.status;
|
||||
this.listQuery.mainTaskState = 5;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
this.listQuery.agv = val.agv;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
this.handleExport(this.listQuery, '历史任务导出');
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
|
356
src/views/asrs/jobMainTaskHistory/indexb.vue
Normal file
356
src/views/asrs/jobMainTaskHistory/indexb.vue
Normal file
@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:isFold="true"
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import codeFilter from '../mixins/code-filter';
|
||||
import { getMainTaskHistoryPage,exportMainTaskHistoryExcel } from '@/api/oth/mainTaskHistory';
|
||||
import point from './point';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'mainTaskCode',
|
||||
label: '任务编码',
|
||||
},
|
||||
{
|
||||
prop: 'inOutWarehouseName',
|
||||
label: '出入移库库位',
|
||||
},
|
||||
{
|
||||
prop: 'relocationWarehouseName',
|
||||
label: '移库终点库位',
|
||||
},
|
||||
{
|
||||
prop: 'mainTaskType',
|
||||
label: '任务类型',
|
||||
filter: codeFilter('mainTaskType'),
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'stacker',
|
||||
label: '堆垛机',
|
||||
width:110
|
||||
},
|
||||
{
|
||||
prop: 'barCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'agv',
|
||||
label: 'agv',
|
||||
},
|
||||
{
|
||||
prop: 'agvStartPoint',
|
||||
label: 'AGV起点',
|
||||
},
|
||||
{
|
||||
prop: 'agvEndPoint',
|
||||
label: 'AGV终点',
|
||||
},
|
||||
{
|
||||
prop: 'mainTaskState',
|
||||
label: '状态',
|
||||
subcomponent: point
|
||||
},
|
||||
{
|
||||
prop: 'taskSource',
|
||||
label: '任务来源',
|
||||
filter: codeFilter('taskSource'),
|
||||
width:100
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime,
|
||||
width:150
|
||||
},
|
||||
{
|
||||
prop: 'cancellation',
|
||||
label: '是否取消',
|
||||
filter: codeFilter('cancellation'),
|
||||
width:90
|
||||
},
|
||||
];
|
||||
const mainTaskType = [
|
||||
{
|
||||
name: '入库',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: '出库',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '移库',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: '出库+移库',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
name: '不带agv入库',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: '入库+6臂空托盘出库',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库+移库',
|
||||
id: 8,
|
||||
},
|
||||
{
|
||||
name: '入库+12臂空托盘出库',
|
||||
id: 9,
|
||||
},
|
||||
{
|
||||
name: '平库移库',
|
||||
id: 10,
|
||||
},
|
||||
{
|
||||
name: '盘库出库',
|
||||
id: 11,
|
||||
},
|
||||
{
|
||||
name: '盘库入库',
|
||||
id: 12,
|
||||
},
|
||||
{
|
||||
name: '盘库出库+移库',
|
||||
id: 13,
|
||||
},
|
||||
];
|
||||
const mainTaskState = [
|
||||
{
|
||||
name: '开始',
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: '已发送agv',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: 'agv运行中',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '已发送堆垛机',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: '堆垛机运行中',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
name: '完成',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: '已发送传输线',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: '传输线运行中',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '暂时无空托盘',
|
||||
id: 8,
|
||||
},
|
||||
];
|
||||
const stackerArr = [
|
||||
{
|
||||
name: 'DDJ1',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: 'DDJ2',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: 'DDJ3',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: 'DDJ4',
|
||||
id: 4,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getMainTaskHistoryPage,
|
||||
exportURL: exportMainTaskHistoryExcel,
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '任务编码',
|
||||
placeholder: '任务编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '任务类型',
|
||||
selectOptions: mainTaskType,
|
||||
param: 'taskType',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'tcode',
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '状态',
|
||||
// selectOptions: mainTaskState,
|
||||
// param: 'status',
|
||||
// defaultSelect: '',
|
||||
// filterable: true,
|
||||
// },
|
||||
{
|
||||
type: 'select',
|
||||
label: '堆垛机',
|
||||
selectOptions: stackerArr,
|
||||
param: 'stacker',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: 'agv',
|
||||
selectOptions: [],
|
||||
param: 'agv',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '选择日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '重置',
|
||||
name: 'reset',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId
|
||||
this.listQuery.mainTaskState = 5;
|
||||
this.setFormConfig();
|
||||
},
|
||||
methods: {
|
||||
setFormConfig() {
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i,
|
||||
};
|
||||
this.formConfig[4].selectOptions.push(obj);
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.mainTaskCode = val.code;
|
||||
this.listQuery.mainTaskType = val.taskType;
|
||||
this.listQuery.barCode = val.tcode;
|
||||
// this.listQuery.mainTaskState = val.status;
|
||||
this.listQuery.mainTaskState = 5;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
this.listQuery.agv = val.agv;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
warehouseId: '1698950657556340737',
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
mainTaskState : 5
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.pageNo = undefined;
|
||||
this.listQuery.pageSize = undefined;
|
||||
this.listQuery.mainTaskCode = val.code;
|
||||
this.listQuery.mainTaskType = val.taskType;
|
||||
this.listQuery.barCode = val.tcode;
|
||||
// this.listQuery.mainTaskState = val.status;
|
||||
this.listQuery.mainTaskState = 5;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
this.listQuery.agv = val.agv;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
this.handleExport(this.listQuery, '历史任务导出');
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
54
src/views/asrs/jobMainTaskHistory/point.vue
Normal file
54
src/views/asrs/jobMainTaskHistory/point.vue
Normal file
@ -0,0 +1,54 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2024-01-17 15:16:28
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-03-13 15:03:09
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
{{ mainTaskState[injectData.mainTaskState] }}
|
||||
<el-button v-if="injectData.mainTaskState===8" type="text" size="mini" @click="Radd()">重补</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Radd } from '@/api/oth/mainTask';
|
||||
const mainTaskState = {
|
||||
0: '开始',
|
||||
1: '已发送agv',
|
||||
2: 'agv运行中',
|
||||
3: '已发送堆垛机',
|
||||
4: '堆垛机运行中',
|
||||
5: '完成',
|
||||
6: '已发送传输线',
|
||||
7: '传输线运行中',
|
||||
8: '暂时无空托盘',
|
||||
};
|
||||
export default {
|
||||
name: 'point',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData,
|
||||
mainTaskState,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
Radd() {
|
||||
Radd(this.injectData.id).then((response) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
duration: 1500,
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
@ -66,7 +66,7 @@ export default {
|
||||
label: '订单出货日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd hh:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-10 15:29:31
|
||||
* @LastEditTime: 2024-05-24 09:45:34
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@ -155,16 +155,13 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport(id) {
|
||||
handleExport(params,name) {
|
||||
// 处理查询参数
|
||||
let params = { warehouseId:id };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '导出.xls');
|
||||
this.$download.excel(response, name+'.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* @Date: 2020-12-29 16:49:28
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-30 15:05:30
|
||||
* @LastEditTime: 2024-06-21 15:00:05
|
||||
* @FilePath: \basic-admin\src\filters\basicData\index.js
|
||||
* @Description:
|
||||
*/
|
||||
@ -16,39 +16,94 @@ const table = {
|
||||
1: '启用',
|
||||
0: '停用',
|
||||
},
|
||||
isOrno:{
|
||||
isOrno: {
|
||||
1: '是',
|
||||
0: '否',
|
||||
},
|
||||
quality:{
|
||||
quality: {
|
||||
2: 'C',
|
||||
1: 'B',
|
||||
0: 'A',
|
||||
},
|
||||
mainTaskType:{
|
||||
1: '入库',
|
||||
2: '出库',
|
||||
3: '移库',
|
||||
},
|
||||
mainTaskState:{
|
||||
0: '开始',
|
||||
1: '已发送agv',
|
||||
2: 'agv运行中',
|
||||
3: '已发送堆垛机',
|
||||
4: '堆垛机运行中',
|
||||
5: '完成',
|
||||
},
|
||||
statepk: {
|
||||
2: '有误',
|
||||
1: '无误',
|
||||
0: '未盘库',
|
||||
},
|
||||
mainTaskType: {
|
||||
1: '入库',
|
||||
2: '出库',
|
||||
3: '移库',
|
||||
4: '出库+移库',
|
||||
5: '不带agv入库',
|
||||
6: '不带agv出库',
|
||||
7: '入库+6臂空托盘出库',
|
||||
8: '不带agv出库+移库',
|
||||
9: '入库+12臂空托盘出库',
|
||||
10: '平库移库',
|
||||
11: '盘库出库',
|
||||
12: '盘库入库',
|
||||
13: '盘库出库+移库',
|
||||
},
|
||||
mainTaskState: {
|
||||
0: '开始',
|
||||
1: '已发送agv',
|
||||
2: 'agv运行中',
|
||||
3: '已发送堆垛机',
|
||||
4: '堆垛机运行中',
|
||||
5: '完成',
|
||||
6: '已发送传输线',
|
||||
7: '传输线运行中',
|
||||
8: '暂时无空托盘',
|
||||
9: '已处理',
|
||||
},
|
||||
taskSource: {
|
||||
1: 'mes下发',
|
||||
2: 'wms手动',
|
||||
3: '自动包装线',
|
||||
},
|
||||
cancellation: {
|
||||
1: '否',
|
||||
2: '是',
|
||||
},
|
||||
specification:{
|
||||
maintenanceType: {
|
||||
1: '更换',
|
||||
2: '清洗',
|
||||
3: '润滑',
|
||||
},
|
||||
specification: {
|
||||
0: '卷',
|
||||
},
|
||||
status: {
|
||||
1: '优先执行',
|
||||
2: '正常运行',
|
||||
3: '暂停',
|
||||
4: '完成',
|
||||
5: '取消',
|
||||
},
|
||||
region: {
|
||||
1: '一次分切区域1线',
|
||||
2: '一次分拣区域',
|
||||
3: '二次分切区域',
|
||||
4: '二次分拣区域',
|
||||
5: '手动包装区域',
|
||||
6: '涂覆区域',
|
||||
7: '其他',
|
||||
8: '自动包装区域',
|
||||
9: '一次分切区域2线',
|
||||
10: '一次分切区域3线',
|
||||
11: '一次分切区域4线',
|
||||
},
|
||||
deliveryType: {
|
||||
1: '单托盘出库',
|
||||
2: '多托盘出库',
|
||||
3: '点对点出库',
|
||||
},
|
||||
trayType: {
|
||||
2: '12臂',
|
||||
1: '6臂',
|
||||
0: '无要求',
|
||||
},
|
||||
}
|
||||
|
||||
// 日期格式化
|
||||
@ -64,7 +119,7 @@ export function parseTime(time, pattern) {
|
||||
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
|
||||
time = parseInt(time)
|
||||
} else if (typeof time === 'string') {
|
||||
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm),'');
|
||||
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.\d{3}/gm), '');
|
||||
}
|
||||
if ((typeof time === 'number') && (time.toString().length === 10)) {
|
||||
time = time * 1000
|
||||
@ -95,17 +150,17 @@ export function parseTime(time, pattern) {
|
||||
}
|
||||
// 去除浮点相乘
|
||||
export function mul(num1, num2) {
|
||||
if (parseFloat(num1).toString() == "NaN" || parseFloat(num2).toString() == "NaN") return;
|
||||
var m = 0, s1 = num1.toString(), s2 = num2.toString();
|
||||
try {
|
||||
m += s1.split(".")[1].length
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
m += s2.split(".")[1].length
|
||||
} catch (e) {
|
||||
}
|
||||
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
|
||||
if (parseFloat(num1).toString() == "NaN" || parseFloat(num2).toString() == "NaN") return;
|
||||
var m = 0, s1 = num1.toString(), s2 = num2.toString();
|
||||
try {
|
||||
m += s1.split(".")[1].length
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
m += s2.split(".")[1].length
|
||||
} catch (e) {
|
||||
}
|
||||
return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
|
||||
}
|
||||
export default function (dictTable) {
|
||||
return function (val) {
|
||||
|
@ -2,45 +2,53 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-09-22 15:36:40
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-09-26 15:59:57
|
||||
* @LastEditTime: 2024-05-06 11:03:59
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="tableInner">
|
||||
<el-input v-model="list[itemProp]" @blur="changeInput" />
|
||||
</div>
|
||||
<div class="tableInner">
|
||||
<el-input
|
||||
v-model="list[itemProp]"
|
||||
:id="'inputFocus'+injectData._pageIndex"
|
||||
@blur="changeInput"
|
||||
@keyup.enter.native="nextInput" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "InputArea",
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
itemProp: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeInput() {
|
||||
this.list.sType = 1
|
||||
this.$emit("emitData", this.list,1);
|
||||
},
|
||||
},
|
||||
name: 'InputArea',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
itemProp: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeInput() {
|
||||
this.list.sType = 1;
|
||||
this.$emit('emitData', this.list, 1);
|
||||
},
|
||||
nextInput(){
|
||||
this.list.sType = 3;
|
||||
this.$emit('emitData', this.list, 3);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.tableInner >>> .el-input__inner {
|
||||
color: #409EFF;
|
||||
border: 1px rgb(232, 231, 231) solid;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
color: #409eff;
|
||||
border: 1px rgb(232, 231, 231) solid;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-24 14:47:58
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-25 14:08:18
|
||||
* @LastEditTime: 2024-04-19 14:30:04
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -37,8 +37,8 @@ const tableProps = [
|
||||
label: '产品名',
|
||||
},
|
||||
{
|
||||
prop: 'goodSpecificationCode',
|
||||
label: '产品编码',
|
||||
prop: 'rollCode',
|
||||
label: '膜卷编码',
|
||||
},
|
||||
{
|
||||
prop: 'specification',
|
||||
@ -50,9 +50,8 @@ const tableProps = [
|
||||
label: '数量',
|
||||
},
|
||||
{
|
||||
prop: 'quality',
|
||||
prop: 'grade',
|
||||
label: '品质',
|
||||
filter: codeFilter('quality'),
|
||||
},
|
||||
];
|
||||
|
||||
|
292
src/views/asrs/rollMessage/index.vue
Normal file
292
src/views/asrs/rollMessage/index.vue
Normal file
@ -0,0 +1,292 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
:isFold="true"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData"></base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import { getPage, exportExcel } from '@/api/oth/rollMessage';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'workOrderCode',
|
||||
label: '入库单号',
|
||||
width: 170,
|
||||
},
|
||||
{
|
||||
prop: 'process',
|
||||
label: '工序',
|
||||
},
|
||||
{
|
||||
prop: 'trayCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'warehouseCode',
|
||||
label: '库房编码',
|
||||
},
|
||||
{
|
||||
prop: 'lineId',
|
||||
label: '行号',
|
||||
},
|
||||
{
|
||||
prop: 'cureTime',
|
||||
label: '已熟化时间',
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
prop: 'inventory',
|
||||
label: '膜卷号',
|
||||
width: 167,
|
||||
},
|
||||
{
|
||||
prop: 'locationType',
|
||||
label: '货位类型',
|
||||
},
|
||||
{
|
||||
prop: 'batchCode',
|
||||
label: '批次号',
|
||||
},
|
||||
{
|
||||
prop: 'containerCode',
|
||||
label: '托盘',
|
||||
},
|
||||
{
|
||||
prop: 'subContainerCode',
|
||||
label: '悬臂',
|
||||
},
|
||||
{
|
||||
prop: 'productCode',
|
||||
label: '物料编码',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
label: '产品名',
|
||||
},
|
||||
{
|
||||
prop: 'planQty',
|
||||
label: '数量',
|
||||
},
|
||||
{
|
||||
prop: 'orderFrom',
|
||||
label: '产出工单',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'finishTime',
|
||||
label: '完成日期',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'customerSpName',
|
||||
label: '客户',
|
||||
},
|
||||
{
|
||||
prop: 'destPoint',
|
||||
label: '目的码头',
|
||||
},
|
||||
{
|
||||
prop: 'resources',
|
||||
label: '资源',
|
||||
},
|
||||
{
|
||||
prop: 'grade',
|
||||
label: '品质',
|
||||
},
|
||||
{
|
||||
prop: 'bugCode',
|
||||
label: '复判缺陷',
|
||||
},
|
||||
{
|
||||
prop: 'gradingExplain',
|
||||
label: '复判不良说明',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'model',
|
||||
label: '型号',
|
||||
},
|
||||
{
|
||||
prop: 'itype',
|
||||
label: '物料类型',
|
||||
},
|
||||
{
|
||||
prop: 'itypeDes',
|
||||
label: '物料类型描述',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'customCode',
|
||||
label: '客户编码',
|
||||
},
|
||||
{
|
||||
prop: 'sfcCreateTime',
|
||||
label: '膜卷生产时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getPage,
|
||||
exportURL: exportExcel,
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
getTrayCode: undefined,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '工序',
|
||||
placeholder: '工序',
|
||||
param: 'process',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '膜卷号',
|
||||
placeholder: '膜卷号',
|
||||
param: 'rollCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品名',
|
||||
placeholder: '产品名',
|
||||
param: 'productName',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '品质',
|
||||
placeholder: '品质',
|
||||
param: 'grade',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '入库单号',
|
||||
placeholder: '入库单号',
|
||||
param: 'workOrderCode',
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '创建时间',
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.listQuery.trayCode = this.$route.query && this.$route.query.trayCode
|
||||
this.formConfig[0].placeholder = this.listQuery.trayCode || '托盘编码'
|
||||
this.getDataList();
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.trayCode = val.code.trim() || null;
|
||||
this.listQuery.process = val.process.trim() || null;
|
||||
this.listQuery.rollCode = val.rollCode.trim() || null;
|
||||
this.listQuery.productName = val.productName.trim() || null;
|
||||
this.listQuery.grade = val.grade.trim() || null;
|
||||
this.listQuery.workOrderCode = val.workOrderCode.trim() || null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.trayCode = val.code || null;
|
||||
this.listQuery.process = val.process || null;
|
||||
this.listQuery.rollCode = val.rollCode || null;
|
||||
this.listQuery.productName = val.productName || null;
|
||||
this.listQuery.grade = val.grade || null;
|
||||
this.listQuery.workOrderCode = val.workOrderCode || null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
this.$modal
|
||||
.confirm('是否确认导出所有数据项?')
|
||||
.then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(this.listQuery);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.excel(response, '膜卷信息.xls');
|
||||
this.exportLoading = false;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
293
src/views/asrs/rollMessage/indexb.vue
Normal file
293
src/views/asrs/rollMessage/indexb.vue
Normal file
@ -0,0 +1,293 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
:isFold="true"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData"></base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import { getPage, exportExcel } from '@/api/oth/rollMessage';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'workOrderCode',
|
||||
label: '入库单号',
|
||||
width: 170,
|
||||
},
|
||||
{
|
||||
prop: 'process',
|
||||
label: '工序',
|
||||
},
|
||||
{
|
||||
prop: 'trayCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'warehouseCode',
|
||||
label: '库房编码',
|
||||
},
|
||||
{
|
||||
prop: 'lineId',
|
||||
label: '行号',
|
||||
},
|
||||
{
|
||||
prop: 'cureTime',
|
||||
label: '已熟化时间',
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
prop: 'inventory',
|
||||
label: '膜卷号',
|
||||
width: 167,
|
||||
},
|
||||
{
|
||||
prop: 'locationType',
|
||||
label: '货位类型',
|
||||
},
|
||||
{
|
||||
prop: 'batchCode',
|
||||
label: '批次号',
|
||||
},
|
||||
{
|
||||
prop: 'containerCode',
|
||||
label: '托盘',
|
||||
},
|
||||
{
|
||||
prop: 'subContainerCode',
|
||||
label: '悬臂',
|
||||
},
|
||||
{
|
||||
prop: 'productCode',
|
||||
label: '物料编码',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
label: '产品名',
|
||||
},
|
||||
{
|
||||
prop: 'planQty',
|
||||
label: '数量',
|
||||
},
|
||||
{
|
||||
prop: 'orderFrom',
|
||||
label: '产出工单',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'finishTime',
|
||||
label: '完成日期',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'customerSpName',
|
||||
label: '客户',
|
||||
},
|
||||
{
|
||||
prop: 'destPoint',
|
||||
label: '目的码头',
|
||||
},
|
||||
{
|
||||
prop: 'resources',
|
||||
label: '资源',
|
||||
},
|
||||
{
|
||||
prop: 'grade',
|
||||
label: '品质',
|
||||
},
|
||||
{
|
||||
prop: 'bugCode',
|
||||
label: '复判缺陷',
|
||||
},
|
||||
{
|
||||
prop: 'gradingExplain',
|
||||
label: '复判不良说明',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'model',
|
||||
label: '型号',
|
||||
},
|
||||
{
|
||||
prop: 'itype',
|
||||
label: '物料类型',
|
||||
},
|
||||
{
|
||||
prop: 'itypeDes',
|
||||
label: '物料类型描述',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'customCode',
|
||||
label: '客户编码',
|
||||
},
|
||||
{
|
||||
prop: 'sfcCreateTime',
|
||||
label: '膜卷生产时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getPage,
|
||||
exportURL: exportExcel,
|
||||
},
|
||||
tableProps,
|
||||
tableData: [],
|
||||
getTrayCode: undefined,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '工序',
|
||||
placeholder: '工序',
|
||||
param: 'process',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '膜卷号',
|
||||
placeholder: '膜卷号',
|
||||
param: 'rollCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品名',
|
||||
placeholder: '产品名',
|
||||
param: 'productName',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '品质',
|
||||
placeholder: '品质',
|
||||
param: 'grade',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '入库单号',
|
||||
placeholder: '入库单号',
|
||||
param: 'workOrderCode',
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '创建时间',
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId
|
||||
this.listQuery.trayCode = this.$route.query && this.$route.query.trayCode
|
||||
this.formConfig[0].placeholder = this.listQuery.trayCode || '托盘编码'
|
||||
this.getDataList();
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.trayCode = val.code.trim() || null;
|
||||
this.listQuery.process = val.process.trim() || null;
|
||||
this.listQuery.rollCode = val.rollCode.trim() || null;
|
||||
this.listQuery.productName = val.productName.trim() || null;
|
||||
this.listQuery.grade = val.grade.trim() || null;
|
||||
this.listQuery.workOrderCode = val.workOrderCode.trim() || null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.listQuery.trayCode = val.code || null;
|
||||
this.listQuery.process = val.process || null;
|
||||
this.listQuery.rollCode = val.rollCode || null;
|
||||
this.listQuery.productName = val.productName || null;
|
||||
this.listQuery.grade = val.grade || null;
|
||||
this.listQuery.workOrderCode = val.workOrderCode || null;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
this.$modal
|
||||
.confirm('是否确认导出所有数据项?')
|
||||
.then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(this.listQuery);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.excel(response, '膜卷信息.xls');
|
||||
this.exportLoading = false;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
183
src/views/asrs/rollTimeRemind/index.vue
Normal file
183
src/views/asrs/rollTimeRemind/index.vue
Normal file
@ -0,0 +1,183 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2024-02-27 14:43:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-08-21 14:04:09
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div v-if="containerCodeArr.length > 0">
|
||||
<el-descriptions title="膜卷熟化时间信息" size="mini" border>
|
||||
<el-descriptions-item label="当前设置天数">
|
||||
{{ this.xDays.value }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="提醒数量">
|
||||
{{ containerCodeArr.length }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="每页数量">
|
||||
<el-input-number
|
||||
v-model="pageSize"
|
||||
:step="50"
|
||||
:min="100"
|
||||
size="small"
|
||||
step-strictly />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider content-position="left">
|
||||
以下每页上限 {{ pageSize }} 条数据
|
||||
</el-divider>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane
|
||||
v-for="i in Math.ceil(containerCodeArr.length / pageSize)"
|
||||
:key="i"
|
||||
:label="'第' + i + '页'"
|
||||
:name="i + '页'">
|
||||
<el-tag
|
||||
style="margin: 5px; border: 1px solid #67c23a;cursor: pointer;"
|
||||
v-for="(item, index) in containerCodeArr.slice(
|
||||
(i - 1) * pageSize,
|
||||
i * pageSize
|
||||
)"
|
||||
:key="index"
|
||||
effect="plain"
|
||||
@click="toRollMessagePage(item.containerCode)"
|
||||
size="small">
|
||||
{{ item.containerCode }}
|
||||
</el-tag>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listData, updateData } from '@/api/system/dict/data';
|
||||
import {
|
||||
rollTimeRemind,
|
||||
exportgetoverfinishtimeExcel,
|
||||
} from '@/api/asrs/warehouseStorehouseGoodsSpecification';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
warehouseId: '1696803324030865409',
|
||||
xDays: {},
|
||||
containerCodeArr: [],
|
||||
activeName: '1页',
|
||||
pageSize: 200,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '设置天数',
|
||||
placeholder: '设置天数',
|
||||
param: 'day',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '设置',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.init();
|
||||
const queryParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
dictType: 'rollTimeRemind',
|
||||
};
|
||||
listData(queryParams).then((response) => {
|
||||
this.formConfig[0].selectOptions = response.data.list;
|
||||
if (response.data.list.length > 0) {
|
||||
this.formConfig[0].placeholder = response.data.list[0].value;
|
||||
this.xDays = response.data.list[0];
|
||||
this.setDay();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
init() {},
|
||||
setDay() {
|
||||
this.containerCodeArr = [];
|
||||
rollTimeRemind(this.xDays.value).then((response) => {
|
||||
this.containerCodeArr = response;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
const regex = /^[1-9]\d*$/;
|
||||
if (regex.test(val.day)) {
|
||||
this.xDays.value = val.day;
|
||||
this.setDay();
|
||||
this.setDict(); //修改字典数据
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请输入正整数天数!',
|
||||
type: 'warning',
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport('膜卷熟化时间信息',val.day);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
/** 修改字典天数设置 */
|
||||
setDict: function () {
|
||||
updateData(this.xDays).then((response) => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport(name,day) {
|
||||
// 处理查询参数
|
||||
this.$modal
|
||||
.confirm('是否确认导出膜卷熟化时间信息')
|
||||
.then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportgetoverfinishtimeExcel(day);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.excel(response, name + '.xls');
|
||||
this.exportLoading = false;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 跳转膜卷信息页面 */
|
||||
toRollMessagePage(trayCode){
|
||||
this.$confirm(`是否跳转到膜卷信息页面? 托盘编码:[ ${trayCode} ]`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "success ",
|
||||
})
|
||||
.then(() => {
|
||||
this.$router.push({
|
||||
path: "rollMessage",
|
||||
query:{
|
||||
trayCode: trayCode
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
183
src/views/asrs/rollTimeRemind/indexb.vue
Normal file
183
src/views/asrs/rollTimeRemind/indexb.vue
Normal file
@ -0,0 +1,183 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2024-02-27 14:43:14
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-10-09 14:40:07
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div v-if="containerCodeArr.length > 0">
|
||||
<el-descriptions title="膜卷熟化时间信息" size="mini" border>
|
||||
<el-descriptions-item label="当前设置天数">
|
||||
{{ this.xDays.value }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="提醒数量">
|
||||
{{ containerCodeArr.length }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="每页数量">
|
||||
<el-input-number
|
||||
v-model="pageSize"
|
||||
:step="50"
|
||||
:min="100"
|
||||
size="small"
|
||||
step-strictly />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider content-position="left">
|
||||
以下每页上限 {{ pageSize }} 条数据
|
||||
</el-divider>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane
|
||||
v-for="i in Math.ceil(containerCodeArr.length / pageSize)"
|
||||
:key="i"
|
||||
:label="'第' + i + '页'"
|
||||
:name="i + '页'">
|
||||
<el-tag
|
||||
style="margin: 5px; border: 1px solid #67c23a;cursor: pointer;"
|
||||
v-for="(item, index) in containerCodeArr.slice(
|
||||
(i - 1) * pageSize,
|
||||
i * pageSize
|
||||
)"
|
||||
:key="index"
|
||||
effect="plain"
|
||||
@click="toRollMessagePage(item.containerCode)"
|
||||
size="small">
|
||||
{{ item.containerCode }}
|
||||
</el-tag>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listData, updateData } from '@/api/system/dict/data';
|
||||
import {
|
||||
rollTimeRemind,
|
||||
exportgetoverfinishtimeExcel,
|
||||
} from '@/api/asrs/warehouseStorehouseGoodsSpecification';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
warehouseId: '1698950657556340737',
|
||||
xDays: {},
|
||||
containerCodeArr: [],
|
||||
activeName: '1页',
|
||||
pageSize: 200,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '设置天数',
|
||||
placeholder: '设置天数',
|
||||
param: 'day',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '设置',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.init();
|
||||
const queryParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
dictType: 'rollTimeRemind',
|
||||
};
|
||||
listData(queryParams).then((response) => {
|
||||
this.formConfig[0].selectOptions = response.data.list;
|
||||
if (response.data.list.length > 0) {
|
||||
this.formConfig[0].placeholder = response.data.list[0].value;
|
||||
this.xDays = response.data.list[0];
|
||||
this.setDay();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
init() {},
|
||||
setDay() {
|
||||
this.containerCodeArr = [];
|
||||
rollTimeRemind(this.xDays.value).then((response) => {
|
||||
this.containerCodeArr = response;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
const regex = /^[1-9]\d*$/;
|
||||
if (regex.test(val.day)) {
|
||||
this.xDays.value = val.day;
|
||||
this.setDay();
|
||||
this.setDict(); //修改字典数据
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请输入正整数天数!',
|
||||
type: 'warning',
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport('膜卷熟化时间信息',val.day);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
/** 修改字典天数设置 */
|
||||
setDict: function () {
|
||||
updateData(this.xDays).then((response) => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport(name,day) {
|
||||
// 处理查询参数
|
||||
this.$modal
|
||||
.confirm('是否确认导出膜卷熟化时间信息')
|
||||
.then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportgetoverfinishtimeExcel(day);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.excel(response, name + '.xls');
|
||||
this.exportLoading = false;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 跳转膜卷信息页面 */
|
||||
toRollMessagePage(trayCode){
|
||||
this.$confirm(`是否跳转到膜卷信息页面? 托盘编码:[ ${trayCode} ]`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "success ",
|
||||
})
|
||||
.then(() => {
|
||||
this.$router.push({
|
||||
path: "rollMessage",
|
||||
query:{
|
||||
trayCode: trayCode
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
582
src/views/asrs/warehouseLineMonitoring/index.vue
Normal file
582
src/views/asrs/warehouseLineMonitoring/index.vue
Normal file
@ -0,0 +1,582 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2024-01-17 09:58:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-06-04 15:58:23
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#d3d3d3" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">锁</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-divider class="divider" content-position="left">
|
||||
二次分拣区
|
||||
</el-divider>
|
||||
<div v-for="i in 5" :key="i + 'G'">
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData
|
||||
.filter(
|
||||
(item) =>
|
||||
item.agvGroundCode.substr(1, 2) == 6 - i &&
|
||||
item.region === 4
|
||||
)
|
||||
.reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-divider class="divider" content-position="left">
|
||||
自动包装区
|
||||
</el-divider>
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter((item) => item.region == 8).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-divider class="divider" content-position="left">
|
||||
一次分拣区
|
||||
</el-divider>
|
||||
<div v-for="i in 7" :key="i + 'F'">
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<!-- <div
|
||||
class="dashboard-layout-item"
|
||||
style="opacity: 0"
|
||||
v-if="i === 7" /> -->
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData
|
||||
.filter(
|
||||
(item) =>
|
||||
item.agvGroundCode.substr(1, 2) == 8 - i &&
|
||||
item.region === 2
|
||||
)
|
||||
.reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-divider class="divider" content-position="left">
|
||||
手动包装区
|
||||
</el-divider>
|
||||
<div v-for="i in 2" :key="i + 'E'">
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData
|
||||
.filter(
|
||||
(item) =>
|
||||
item.agvGroundCode.substr(1, 2) == i + 1 &&
|
||||
item.region === 5
|
||||
)
|
||||
.reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider class="divider" content-position="left">
|
||||
一次分切区
|
||||
</el-divider>
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter((item) => item.region == 1).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter((item) => item.region == 9).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter((item) => item.region == 10).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter((item) => item.region == 11).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-divider class="divider" content-position="left">
|
||||
二次分切区
|
||||
</el-divider>
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item interval"
|
||||
v-for="j in wareData.filter((item) => item.region == 3).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-divider class="divider" content-position="left">涂覆区</el-divider>
|
||||
<div v-for="i in 4" :key="i + 'C'">
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData
|
||||
.filter(
|
||||
(item) =>
|
||||
item.agvGroundCode.substr(1, 2) == i && item.region === 6
|
||||
)
|
||||
.reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="改变库位状态" :visible.sync="dialogFormVisible">
|
||||
<el-form :model="form" label-width="80px">
|
||||
<el-form-item label="库位名称">
|
||||
<el-input v-model="form.lineEdgeLibraryCode" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位状态">
|
||||
<el-radio-group v-model="form.lineEdgeLibraryState">
|
||||
<el-radio :label="0">空</el-radio>
|
||||
<el-radio :label="1">锁</el-radio>
|
||||
<el-radio :label="2">满</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘编码">
|
||||
<el-input
|
||||
v-model="form.trayCode"
|
||||
placeholder="请输入内容"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="changeState">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import {
|
||||
getLineList,
|
||||
getLine,
|
||||
updateLine,
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getLineList,
|
||||
},
|
||||
listQuery: {},
|
||||
wareData: [],
|
||||
dialogFormVisible: false,
|
||||
bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //空,锁,满
|
||||
formConfig: [
|
||||
{
|
||||
type: this.$auth.hasPermi('asrs:warehouse-line-monitoring:query')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '刷新',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
],
|
||||
form: {
|
||||
id: undefined,
|
||||
lineEdgeLibraryState: undefined,
|
||||
trayCode: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.wareData = response.data;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
lState(id) {
|
||||
getLine(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.dialogFormVisible = true;
|
||||
});
|
||||
},
|
||||
changeState() {
|
||||
updateLine(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.dialogFormVisible = false;
|
||||
this.getDataList();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mainbody {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
min-width: 80vw;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.flex-warp {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: #d3d3d3;
|
||||
border-radius: 2px;
|
||||
margin: 0 6px 6px 0;
|
||||
position: relative;
|
||||
&:first-child {
|
||||
margin-left: 40px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
.interval {
|
||||
&:nth-child(2n) {
|
||||
margin-right: 30px;
|
||||
::before {
|
||||
content: '';
|
||||
}
|
||||
::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: -15px;
|
||||
top: 1px;
|
||||
z-index: 1;
|
||||
background-color: black;
|
||||
width: 1px;
|
||||
height: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.hoverDiv {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
&:hover {
|
||||
border: 1px #000000 dashed;
|
||||
transform: scale(1.3);
|
||||
}
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.el-divider {
|
||||
background-color: black;
|
||||
}
|
||||
.tips {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
right: 120px;
|
||||
}
|
||||
.point {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
background-color: #409eff;
|
||||
float: left;
|
||||
margin-top: 7px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
</style>
|
584
src/views/asrs/warehouseLineMonitoring/indexb.vue
Normal file
584
src/views/asrs/warehouseLineMonitoring/indexb.vue
Normal file
@ -0,0 +1,584 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2024-01-17 09:58:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-10-09 10:04:32
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#d3d3d3" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">锁</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-divider class="divider" content-position="left">
|
||||
二次分拣区
|
||||
</el-divider>
|
||||
<div v-for="i in 5" :key="i + 'G'">
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData
|
||||
.filter(
|
||||
(item) =>
|
||||
item.agvGroundCode.substr(1, 2) == 6 - i &&
|
||||
item.region === 4
|
||||
)
|
||||
.reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-divider class="divider" content-position="left">
|
||||
自动包装区
|
||||
</el-divider>
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter((item) => item.region == 8).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-divider class="divider" content-position="left">
|
||||
一次分拣区
|
||||
</el-divider>
|
||||
<div v-for="i in 7" :key="i + 'F'">
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<!-- <div
|
||||
class="dashboard-layout-item"
|
||||
style="opacity: 0"
|
||||
v-if="i === 7" /> -->
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData
|
||||
.filter(
|
||||
(item) =>
|
||||
item.agvGroundCode.substr(1, 2) == 8 - i &&
|
||||
item.region === 2
|
||||
)
|
||||
.reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-divider class="divider" content-position="left">
|
||||
手动包装区
|
||||
</el-divider>
|
||||
<div v-for="i in 2" :key="i + 'E'">
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData
|
||||
.filter(
|
||||
(item) =>
|
||||
item.agvGroundCode.substr(1, 2) == i + 1 &&
|
||||
item.region === 5
|
||||
)
|
||||
.reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider class="divider" content-position="left">
|
||||
一次分切区
|
||||
</el-divider>
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter((item) => item.region == 1).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter((item) => item.region == 9).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter((item) => item.region == 10).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter((item) => item.region == 11).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-divider class="divider" content-position="left">
|
||||
二次分切区
|
||||
</el-divider>
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item interval"
|
||||
v-for="j in wareData.filter((item) => item.region == 3).reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-divider class="divider" content-position="left">涂覆区</el-divider>
|
||||
<div v-for="i in 4" :key="i + 'C'">
|
||||
<el-row style="margin-bottom: 10px" type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData
|
||||
.filter(
|
||||
(item) =>
|
||||
item.agvGroundCode.substr(1, 2) == i && item.region === 6
|
||||
)
|
||||
.reverse()"
|
||||
:key="j.id"
|
||||
:title="j.lineEdgeLibraryCode">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.lineEdgeLibraryCode"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
<div class="point" />
|
||||
托盘编码: {{ j.trayCode }}
|
||||
<br />
|
||||
<div class="point" />
|
||||
Agv地码: {{ j.agvGroundCode }}
|
||||
<br />
|
||||
<el-button
|
||||
@click="lState(j.id)"
|
||||
v-hasPermi="['asrs:warehouse-line-monitoring:change']"
|
||||
type="text">
|
||||
改变库位状态
|
||||
</el-button>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.lineEdgeLibraryState === 1 ? 'not-allowed' : 'pointer',
|
||||
background: bgColor[j.lineEdgeLibraryState],
|
||||
}"></div>
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog title="改变库位状态" :visible.sync="dialogFormVisible">
|
||||
<el-form :model="form" label-width="80px">
|
||||
<el-form-item label="库位名称">
|
||||
<el-input v-model="form.lineEdgeLibraryCode" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位状态">
|
||||
<el-radio-group v-model="form.lineEdgeLibraryState">
|
||||
<el-radio :label="0">空</el-radio>
|
||||
<el-radio :label="1">锁</el-radio>
|
||||
<el-radio :label="2">满</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘编码">
|
||||
<el-input
|
||||
v-model="form.trayCode"
|
||||
placeholder="请输入内容"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="changeState">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import {
|
||||
getLineList,
|
||||
getLine,
|
||||
updateLine,
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getLineList,
|
||||
},
|
||||
listQuery: {},
|
||||
wareData: [],
|
||||
dialogFormVisible: false,
|
||||
bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //空,锁,满
|
||||
formConfig: [
|
||||
{
|
||||
type: this.$auth.hasPermi('asrs:warehouse-line-monitoring:query')
|
||||
? 'button'
|
||||
: '',
|
||||
btnName: '刷新',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
],
|
||||
form: {
|
||||
id: undefined,
|
||||
lineEdgeLibraryState: undefined,
|
||||
trayCode: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.wareData = response.data;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
lState(id) {
|
||||
getLine(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.dialogFormVisible = true;
|
||||
});
|
||||
},
|
||||
changeState() {
|
||||
updateLine(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.dialogFormVisible = false;
|
||||
this.getDataList();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mainbody {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
min-width: 80vw;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.flex-warp {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: #d3d3d3;
|
||||
border-radius: 2px;
|
||||
margin: 0 6px 6px 0;
|
||||
position: relative;
|
||||
&:first-child {
|
||||
margin-left: 40px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
.interval {
|
||||
&:nth-child(2n) {
|
||||
margin-right: 30px;
|
||||
::before {
|
||||
content: '';
|
||||
}
|
||||
::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: -15px;
|
||||
top: 1px;
|
||||
z-index: 1;
|
||||
background-color: black;
|
||||
width: 1px;
|
||||
height: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.hoverDiv {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
&:hover {
|
||||
border: 1px #000000 dashed;
|
||||
transform: scale(1.3);
|
||||
}
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.el-divider {
|
||||
background-color: black;
|
||||
}
|
||||
.tips {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
right: 120px;
|
||||
}
|
||||
.point {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
background-color: #409eff;
|
||||
float: left;
|
||||
margin-top: 7px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
</style>
|
274
src/views/asrs/warehouseLocationMonitoring/index-low.vue
Normal file
274
src/views/asrs/warehouseLocationMonitoring/index-low.vue
Normal file
@ -0,0 +1,274 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-21 14:26:23
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-30 15:08:26
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#FFA08F" style="border: none">锁</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<div v-for="i in listQuery.total" :key="i">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="a in wareData.one.slice((i - 1) * 10, i * 10)"
|
||||
:key="a.id + a.warehouseStorehouseCode"
|
||||
:title="a.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[a.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ a.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="b in wareData.two.slice((i - 1) * 10, i * 10)"
|
||||
:key="b.id + b.warehouseStorehouseCode"
|
||||
:title="b.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[b.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ b.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider class="divider"></el-divider>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="c in wareData.there.slice((i - 1) * 10, i * 10)"
|
||||
:key="c.id + c.warehouseStorehouseCode"
|
||||
:title="c.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[c.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ c.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="d in wareData.four.slice((i - 1) * 10, i * 10)"
|
||||
:key="d.id + d.warehouseStorehouseCode"
|
||||
:title="d.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[d.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ d.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import {
|
||||
getWarehouseStorehouseList,
|
||||
exportWarehouseStorehouseExcel,
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehouseStorehouseList,
|
||||
exportURL: exportWarehouseStorehouseExcel,
|
||||
},
|
||||
listQuery: {
|
||||
stacker: 1,
|
||||
wareLayer: 1,
|
||||
total: 0,
|
||||
},
|
||||
wareData: {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
},
|
||||
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择巷道',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '巷道一' },
|
||||
{ id: 2, name: '巷道二' },
|
||||
{ id: 3, name: '巷道三' },
|
||||
{ id: 4, name: '巷道四' },
|
||||
],
|
||||
param: 'stacker',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择层',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '1' },
|
||||
{ id: 2, name: '2' },
|
||||
{ id: 3, name: '3' },
|
||||
{ id: 4, name: '4' },
|
||||
],
|
||||
param: 'value',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '下载',
|
||||
name: 'export',
|
||||
plain: true,
|
||||
color: 'primary',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
(this.wareData = {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
}),
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
response.data.forEach((a, b) => {
|
||||
if (b % 4 === 0) {
|
||||
this.wareData.one.push(a);
|
||||
} else if (b % 4 === 1) {
|
||||
this.wareData.two.push(a);
|
||||
} else if (b % 4 === 2) {
|
||||
this.wareData.there.push(a);
|
||||
} else if (b % 4 === 3) {
|
||||
this.wareData.four.push(a);
|
||||
}
|
||||
});
|
||||
this.listQuery.total = Math.ceil(response.data.length / 40);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.wareLayer = val.value;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport(this.aId);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mainbody {
|
||||
display: flex;
|
||||
gap: 70px;
|
||||
flex-direction: column;
|
||||
}
|
||||
.flex-warp {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
height: 32px;
|
||||
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
|
||||
border-radius: 2px 4px 4px 2px;
|
||||
margin: 0 3px 8px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.dashboard-layout-item-cricle {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 3px;
|
||||
}
|
||||
.p-name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-left: 15px;
|
||||
}
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
transform: scale(1.3) translateZ(0);
|
||||
}
|
||||
&:nth-child(2n) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
&:first-child {
|
||||
margin-left: 50px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.el-divider {
|
||||
background-color: black;
|
||||
}
|
||||
.tips {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
right: 120px;
|
||||
}
|
||||
</style>
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-21 14:26:23
|
||||
* @Date: 2024-01-17 09:58:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-30 15:08:26
|
||||
* @LastEditTime: 2024-10-09 10:01:32
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -12,128 +12,241 @@
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#FFA08F" style="border: none">锁</el-tag>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
style="margin-right: 50px"
|
||||
@click="stackerBtn">
|
||||
巷道开关
|
||||
</el-button>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#d3d3d3" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">锁</el-tag>
|
||||
<el-tag effect="dark" color="#ff0000" style="border: none">不可用</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<!-- @click="showDia()" -->
|
||||
<div v-for="i in listQuery.total" :key="i">
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 1
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName">
|
||||
<div class="x-coordinate coordinate" v-if="j.wareRow === 1">
|
||||
{{ j.wareColumn }}
|
||||
</div>
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
库位状态:
|
||||
{{
|
||||
j.deactivate === 1
|
||||
? ['空', '锁', '满'][j.warehouseStorehouseState]
|
||||
: '不可用'
|
||||
}}
|
||||
<div v-for="(k, index) in j.productList" :key="index">
|
||||
产品名称: {{ k.goodSpecificationName }}
|
||||
<br />
|
||||
产品数量: {{ k.number }}
|
||||
</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 2
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
库位状态:
|
||||
{{
|
||||
j.deactivate === 1
|
||||
? ['空', '锁', '满'][j.warehouseStorehouseState]
|
||||
: '不可用'
|
||||
}}
|
||||
<div v-for="(k, index) in j.productList" :key="index">
|
||||
产品名称: {{ k.goodSpecificationName }}
|
||||
<br />
|
||||
产品数量: {{ k.number }}
|
||||
</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="a in wareData.one.slice((i - 1) * 10, i * 10)"
|
||||
:key="a.id + a.warehouseStorehouseCode"
|
||||
:title="a.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[a.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ a.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 3
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
库位状态:
|
||||
{{
|
||||
j.deactivate === 1
|
||||
? ['空', '锁', '满'][j.warehouseStorehouseState]
|
||||
: '不可用'
|
||||
}}
|
||||
<div v-for="(k, index) in j.productList" :key="index">
|
||||
产品名称: {{ k.goodSpecificationName }}
|
||||
<br />
|
||||
产品数量: {{ k.number }}
|
||||
</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="b in wareData.two.slice((i - 1) * 10, i * 10)"
|
||||
:key="b.id + b.warehouseStorehouseCode"
|
||||
:title="b.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[b.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ b.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider class="divider"></el-divider>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="c in wareData.there.slice((i - 1) * 10, i * 10)"
|
||||
:key="c.id + c.warehouseStorehouseCode"
|
||||
:title="c.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[c.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ c.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="d in wareData.four.slice((i - 1) * 10, i * 10)"
|
||||
:key="d.id + d.warehouseStorehouseCode"
|
||||
:title="d.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[d.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ d.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter((item) => item.wareRow === i * 4)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
库位状态:
|
||||
{{
|
||||
j.deactivate === 1
|
||||
? ['空', '锁', '满'][j.warehouseStorehouseState]
|
||||
: '不可用'
|
||||
}}
|
||||
<div v-for="(k, index) in j.productList" :key="index">
|
||||
产品名称: {{ k.goodSpecificationName }}
|
||||
<br />
|
||||
产品数量: {{ k.number }}
|
||||
</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider class="divider" v-if="i < listQuery.total"></el-divider>
|
||||
</div>
|
||||
</div>
|
||||
<pot-dialog
|
||||
ref="dialogRef"
|
||||
v-if="diaVisible"
|
||||
@refreshDataList="getDataList"></pot-dialog>
|
||||
<stacker-dialog
|
||||
ref="stackerRef"
|
||||
v-if="stackerVisible"
|
||||
:warehouse-id="listQuery.aId"></stacker-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import {
|
||||
getWarehouseStorehouseList,
|
||||
getWarehouseStorehouseMonitoring,
|
||||
exportWarehouseStorehouseExcel,
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
import potDialog from './potDialog';
|
||||
import stackerDialog from './stackerDialog';
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehouseStorehouseList,
|
||||
getDataListURL: getWarehouseStorehouseMonitoring,
|
||||
exportURL: exportWarehouseStorehouseExcel,
|
||||
},
|
||||
listQuery: {
|
||||
stacker: 1,
|
||||
wareLayer: 1,
|
||||
total: 0,
|
||||
},
|
||||
wareData: {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
},
|
||||
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
|
||||
diaVisible: false,
|
||||
stackerVisible: false,
|
||||
wareData: [],
|
||||
bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //空,锁,满
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择巷道',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '巷道一' },
|
||||
{ id: 2, name: '巷道二' },
|
||||
{ id: 3, name: '巷道三' },
|
||||
{ id: 4, name: '巷道四' },
|
||||
],
|
||||
param: 'stacker',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择层',
|
||||
@ -164,48 +277,46 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
components: {
|
||||
potDialog,
|
||||
stackerDialog,
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
(this.wareData = {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
}),
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
response.data.forEach((a, b) => {
|
||||
if (b % 4 === 0) {
|
||||
this.wareData.one.push(a);
|
||||
} else if (b % 4 === 1) {
|
||||
this.wareData.two.push(a);
|
||||
} else if (b % 4 === 2) {
|
||||
this.wareData.there.push(a);
|
||||
} else if (b % 4 === 3) {
|
||||
this.wareData.four.push(a);
|
||||
}
|
||||
});
|
||||
this.listQuery.total = Math.ceil(response.data.length / 40);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.wareLayer = val.value;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport(this.aId);
|
||||
this.handleExport(this.aId,'库位监控-A仓库');
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.wareData = response.data.list;
|
||||
this.listQuery.total = Math.ceil(response.data.list.length / 120);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
showDia() {
|
||||
this.diaVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialogRef.init();
|
||||
});
|
||||
},
|
||||
stackerBtn() {
|
||||
this.stackerVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.stackerRef.init();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -213,55 +324,60 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.mainbody {
|
||||
display: flex;
|
||||
gap: 70px;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
min-width: 80vw;
|
||||
border-radius: 5px;
|
||||
padding-top: 25px;
|
||||
}
|
||||
.flex-warp {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
height: 32px;
|
||||
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
|
||||
border-radius: 2px 4px 4px 2px;
|
||||
margin: 0 3px 8px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: #d3d3d3;
|
||||
border-radius: 2px;
|
||||
margin: 0 6px 8px 0;
|
||||
position: relative;
|
||||
.dashboard-layout-item-cricle {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 3px;
|
||||
}
|
||||
.p-name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-left: 15px;
|
||||
}
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
transform: scale(1.3) translateZ(0);
|
||||
}
|
||||
&:nth-child(2n) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
&:first-child {
|
||||
margin-left: 50px;
|
||||
margin-left: 40px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
.coordinate {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
.x-coordinate {
|
||||
position: absolute;
|
||||
top: -25px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
.y-coordinate {
|
||||
position: absolute;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 30px;
|
||||
left: -25px;
|
||||
}
|
||||
}
|
||||
.hoverDiv {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
&:hover {
|
||||
border: 1px #000000 dashed;
|
||||
transform: scale(1.3);
|
||||
}
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 10px 0;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
.el-divider {
|
||||
background-color: black;
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-21 14:26:23
|
||||
* @Date: 2024-01-17 09:58:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-30 15:08:33
|
||||
* @LastEditTime: 2024-10-09 10:02:44
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -12,128 +12,241 @@
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#FFA08F" style="border: none">锁</el-tag>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
style="margin-right: 50px"
|
||||
@click="stackerBtn">
|
||||
巷道开关
|
||||
</el-button>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#d3d3d3" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">锁</el-tag>
|
||||
<el-tag effect="dark" color="#ff0000" style="border: none">不可用</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<!-- @click="showDia()" -->
|
||||
<div v-for="i in listQuery.total" :key="i">
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 1
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName">
|
||||
<div class="x-coordinate coordinate" v-if="j.wareRow === 1">
|
||||
{{ j.wareColumn }}
|
||||
</div>
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
库位状态:
|
||||
{{
|
||||
j.deactivate === 1
|
||||
? ['空', '锁', '满'][j.warehouseStorehouseState]
|
||||
: '不可用'
|
||||
}}
|
||||
<div v-for="(k, index) in j.productList" :key="index">
|
||||
产品名称: {{ k.goodSpecificationName }}
|
||||
<br />
|
||||
产品数量: {{ k.number }}
|
||||
</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 2
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
库位状态:
|
||||
{{
|
||||
j.deactivate === 1
|
||||
? ['空', '锁', '满'][j.warehouseStorehouseState]
|
||||
: '不可用'
|
||||
}}
|
||||
<div v-for="(k, index) in j.productList" :key="index">
|
||||
产品名称: {{ k.goodSpecificationName }}
|
||||
<br />
|
||||
产品数量: {{ k.number }}
|
||||
</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="a in wareData.one.slice((i - 1) * 10, i * 10)"
|
||||
:key="a.id + a.warehouseStorehouseCode"
|
||||
:title="a.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[a.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ a.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 3
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
库位状态:
|
||||
{{
|
||||
j.deactivate === 1
|
||||
? ['空', '锁', '满'][j.warehouseStorehouseState]
|
||||
: '不可用'
|
||||
}}
|
||||
<div v-for="(k, index) in j.productList" :key="index">
|
||||
产品名称: {{ k.goodSpecificationName }}
|
||||
<br />
|
||||
产品数量: {{ k.number }}
|
||||
</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="b in wareData.two.slice((i - 1) * 10, i * 10)"
|
||||
:key="b.id + b.warehouseStorehouseCode"
|
||||
:title="b.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[b.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ b.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider class="divider"></el-divider>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="c in wareData.there.slice((i - 1) * 10, i * 10)"
|
||||
:key="c.id + c.warehouseStorehouseCode"
|
||||
:title="c.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[c.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ c.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="d in wareData.four.slice((i - 1) * 10, i * 10)"
|
||||
:key="d.id + d.warehouseStorehouseCode"
|
||||
:title="d.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[d.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ d.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter((item) => item.wareRow === i * 4)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
库位状态:
|
||||
{{
|
||||
j.deactivate === 1
|
||||
? ['空', '锁', '满'][j.warehouseStorehouseState]
|
||||
: '不可用'
|
||||
}}
|
||||
<div v-for="(k, index) in j.productList" :key="index">
|
||||
产品名称: {{ k.goodSpecificationName }}
|
||||
<br />
|
||||
产品数量: {{ k.number }}
|
||||
</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.deactivate === 0 || j.warehouseStorehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.warehouseStorehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider class="divider" v-if="i < listQuery.total"></el-divider>
|
||||
</div>
|
||||
</div>
|
||||
<pot-dialog
|
||||
ref="dialogRef"
|
||||
v-if="diaVisible"
|
||||
@refreshDataList="getDataList"></pot-dialog>
|
||||
<stacker-dialog
|
||||
ref="stackerRef"
|
||||
v-if="stackerVisible"
|
||||
:warehouse-id="listQuery.bId"></stacker-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import {
|
||||
getWarehouseStorehouseList,
|
||||
getWarehouseStorehouseMonitoring,
|
||||
exportWarehouseStorehouseExcel,
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
import potDialog from './potDialog';
|
||||
import stackerDialog from './stackerDialog';
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehouseStorehouseList,
|
||||
getDataListURL: getWarehouseStorehouseMonitoring,
|
||||
exportURL: exportWarehouseStorehouseExcel,
|
||||
},
|
||||
listQuery: {
|
||||
//stacker: 1,
|
||||
wareLayer: 1,
|
||||
total: 0,
|
||||
},
|
||||
wareData: {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
},
|
||||
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
|
||||
diaVisible: false,
|
||||
stackerVisible: false,
|
||||
wareData: [],
|
||||
bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //空,锁,满
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择巷道',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '巷道一' },
|
||||
{ id: 2, name: '巷道二' },
|
||||
{ id: 3, name: '巷道三' },
|
||||
{ id: 4, name: '巷道四' },
|
||||
],
|
||||
param: 'stacker',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择层',
|
||||
@ -164,50 +277,48 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
components: {
|
||||
potDialog,
|
||||
stackerDialog,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
(this.wareData = {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
}),
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
response.data.forEach((a, b) => {
|
||||
if (b % 4 === 0) {
|
||||
this.wareData.one.push(a);
|
||||
} else if (b % 4 === 1) {
|
||||
this.wareData.two.push(a);
|
||||
} else if (b % 4 === 2) {
|
||||
this.wareData.there.push(a);
|
||||
} else if (b % 4 === 3) {
|
||||
this.wareData.four.push(a);
|
||||
}
|
||||
});
|
||||
this.listQuery.total = Math.ceil(response.data.length / 40);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.wareLayer = val.value;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport(this.bId);
|
||||
this.handleExport(this.bId,'库位监控-B仓库');
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.wareData = response.data.list;
|
||||
this.listQuery.total = Math.ceil(response.data.list.length / 120);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
showDia() {
|
||||
this.diaVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dialogRef.init();
|
||||
});
|
||||
},
|
||||
stackerBtn() {
|
||||
this.stackerVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.stackerRef.init();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -215,55 +326,60 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.mainbody {
|
||||
display: flex;
|
||||
gap: 70px;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
min-width: 80vw;
|
||||
border-radius: 5px;
|
||||
padding-top: 25px;
|
||||
}
|
||||
.flex-warp {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
height: 32px;
|
||||
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
|
||||
border-radius: 2px 4px 4px 2px;
|
||||
margin: 0 3px 8px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: #d3d3d3;
|
||||
border-radius: 2px;
|
||||
margin: 0 6px 8px 0;
|
||||
position: relative;
|
||||
.dashboard-layout-item-cricle {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 3px;
|
||||
}
|
||||
.p-name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-left: 15px;
|
||||
}
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
transform: scale(1.3) translateZ(0);
|
||||
}
|
||||
&:nth-child(2n) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
&:first-child {
|
||||
margin-left: 50px;
|
||||
margin-left: 40px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
.coordinate {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
.x-coordinate {
|
||||
position: absolute;
|
||||
top: -25px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
.y-coordinate {
|
||||
position: absolute;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 30px;
|
||||
left: -25px;
|
||||
}
|
||||
}
|
||||
.hoverDiv {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
&:hover {
|
||||
border: 1px #000000 dashed;
|
||||
transform: scale(1.3);
|
||||
}
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 10px 0;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
.el-divider {
|
||||
background-color: black;
|
||||
|
39
src/views/asrs/warehouseLocationMonitoring/potDialog.vue
Normal file
39
src/views/asrs/warehouseLocationMonitoring/potDialog.vue
Normal file
@ -0,0 +1,39 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-01-29 16:55:39
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || ''
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
96
src/views/asrs/warehouseLocationMonitoring/stackerDialog.vue
Normal file
96
src/views/asrs/warehouseLocationMonitoring/stackerDialog.vue
Normal file
@ -0,0 +1,96 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-09-23 14:10:53
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
title="巷道信息"
|
||||
:visible.sync="visible"
|
||||
v-loading="loading"
|
||||
element-loading-text="拼命加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)">
|
||||
<el-card shadow="hover" v-for="item in stackerList" :key="item.id">
|
||||
<el-descriptions :column="1" size="mini" border>
|
||||
<el-descriptions-item label="巷道名称">
|
||||
{{ item.stackerName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="巷道状态">
|
||||
<el-tag size="mini" :type="item.stackerState === 1 ? '' : 'warning'">
|
||||
{{ item.stackerState === 1 ? '开启中' : '已关闭' }}
|
||||
</el-tag>
|
||||
<el-switch
|
||||
style="float: right"
|
||||
@change="changeStatus(item)"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
v-model="item.stackerState" />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateStacker, getStackerPage } from '@/api/asrs/stacker';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
warehouseId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
stackerList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
const params = {
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
warehouseId: this.warehouseId,
|
||||
};
|
||||
getStackerPage(params).then((response) => {
|
||||
this.stackerList = response.data.list.reverse();
|
||||
});
|
||||
});
|
||||
},
|
||||
changeStatus(val) {
|
||||
const _this = this
|
||||
let text = val.stackerState === 1 ? '启用' : '关闭';
|
||||
this.$modal
|
||||
.confirm('确认要"' + text + '""' + val.stackerName + '"巷道吗?')
|
||||
.then(function () {
|
||||
_this.loading = true;
|
||||
const data = {
|
||||
id: val.id,
|
||||
stacker: val.stacker,
|
||||
stackerState: val.stackerState,
|
||||
};
|
||||
return updateStacker(data);
|
||||
})
|
||||
.then(() => {
|
||||
_this.loading = false;
|
||||
this.$modal.msgSuccess(text + '成功');
|
||||
})
|
||||
.catch(function () {
|
||||
val.stackerState = val.stackerState === 1 ? 0 : 1;
|
||||
_this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
65
src/views/asrs/warehousePklb/SmallTitle.vue
Normal file
65
src/views/asrs/warehousePklb/SmallTitle.vue
Normal file
@ -0,0 +1,65 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-01 15:27:31
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-08-01 16:25:54
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div :class="[className, { 'p-0': noPadding }]">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
size: {
|
||||
// 取值范围: xl lg md sm
|
||||
type: String,
|
||||
default: 'de',
|
||||
validator: function (val) {
|
||||
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
|
||||
},
|
||||
},
|
||||
noPadding: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
className: function () {
|
||||
return `${this.size}-title`;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
|
||||
$mgr: 8px;
|
||||
@each $size, $height in $pxls {
|
||||
.#{$size}-title {
|
||||
font-size: 18px;
|
||||
line-height: $height;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
width: 4px;
|
||||
height: $height + 2px;
|
||||
border-radius: 1px;
|
||||
margin-right: $mgr;
|
||||
background-color: #0b58ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.p-0 {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
337
src/views/asrs/warehousePklb/add-or-updata.vue
Normal file
337
src/views/asrs/warehousePklb/add-or-updata.vue
Normal file
@ -0,0 +1,337 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:01:55
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-06-21 15:18:01
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:destroy-on-close="true"
|
||||
:wrapper-closable="false"
|
||||
class="drawer"
|
||||
size="60%">
|
||||
<small-title slot="title" :no-padding="true">盘货明细表</small-title>
|
||||
|
||||
<div class="content">
|
||||
<div class="visual-part">
|
||||
<el-form
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
label-width="100px"
|
||||
label-position="top"
|
||||
@keyup.enter.native="dataFormSubmit">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="托盘编码" prop="containerCode">
|
||||
<el-input
|
||||
v-model="dataForm.containerCode"
|
||||
disabled
|
||||
placeholder="请输入托盘编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="货物规格名称" prop="goodSpecificationName">
|
||||
<el-input
|
||||
v-model="dataForm.goodSpecificationName"
|
||||
disabled
|
||||
placeholder="请输入货物规格名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="品质" prop="grade">
|
||||
<el-input
|
||||
v-model="dataForm.grade"
|
||||
disabled
|
||||
placeholder="请输入品质" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产出工单" prop="orderFrom">
|
||||
<el-input
|
||||
v-model="dataForm.orderFrom"
|
||||
disabled
|
||||
placeholder="请输入产出工单" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
膜卷信息
|
||||
</small-title>
|
||||
|
||||
<div class="attr-list">
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="1"
|
||||
:limit="100"
|
||||
@emitFun="inputChange"
|
||||
:height="400"
|
||||
:table-data="productAttributeList"></base-table>
|
||||
<!-- 表格底部加号 -->
|
||||
<el-button
|
||||
v-if="!isDetail"
|
||||
class="checkButton"
|
||||
type="primary"
|
||||
@click="check"
|
||||
:loading="isloading">
|
||||
检查
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="position: absolute; bottom: 24px; right: 24px">
|
||||
<el-button style="margin-right: 10px" @click="goback()">返回</el-button>
|
||||
<span v-if="!isDetail">
|
||||
<el-button
|
||||
style="margin-right: 10px"
|
||||
type="success"
|
||||
:loading="isloading"
|
||||
@click="makeIn()">
|
||||
入库
|
||||
</el-button>
|
||||
<el-button type="primary" @click="checkout()" :loading="isloading">
|
||||
同步mes出库
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getWarehousePklbDetailPage,
|
||||
getWarehousePklbDetailCheck,
|
||||
makeWarehouseIn,
|
||||
checkout,
|
||||
} from '@/api/asrs/warehousePklb';
|
||||
import inputArea from './inputArea';
|
||||
import SmallTitle from './SmallTitle';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'subContainerCode',
|
||||
label: '悬臂',
|
||||
},
|
||||
{
|
||||
prop: 'inventory',
|
||||
label: '膜卷号',
|
||||
},
|
||||
{
|
||||
prop: 'inventoryInput',
|
||||
label: '输入膜卷号',
|
||||
subcomponent: inputArea,
|
||||
},
|
||||
];
|
||||
|
||||
export default {
|
||||
components: { SmallTitle },
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
isloading: false,
|
||||
tableProps,
|
||||
productAttributeList: [],
|
||||
dataForm: {
|
||||
warehouseStorehouseStorageId: '',
|
||||
orderFrom: '',
|
||||
containerCode: '',
|
||||
grade: '',
|
||||
goodSpecificationName: '',
|
||||
},
|
||||
listQuery: {
|
||||
agvEndPoint: null,
|
||||
barCode: null,
|
||||
asrsLineEdgeLibraryId: null,
|
||||
asrsLineEdgeLibraryName: null,
|
||||
},
|
||||
dataRule: {},
|
||||
isDetail: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
this.productAttributeList.splice(0);
|
||||
},
|
||||
init(data, isDetail) {
|
||||
this.isloading = false;
|
||||
this.isDetail = isDetail;
|
||||
this.dataForm.warehouseStorehouseStorageId =
|
||||
data.warehouseStorehouseStorageId;
|
||||
this.listQuery = {
|
||||
agvEndPoint: data.agvEndPoint,
|
||||
barCode: data.barCode,
|
||||
asrsLineEdgeLibraryId: data.asrsLineEdgeLibraryId,
|
||||
asrsLineEdgeLibraryName: data.asrsLineEdgeLibraryName,
|
||||
};
|
||||
this.initData();
|
||||
this.visible = true;
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
warehouseStorehouseStorageId:
|
||||
this.dataForm.warehouseStorehouseStorageId,
|
||||
};
|
||||
getWarehousePklbDetailPage(params).then((response) => {
|
||||
if (response.data.list.length > 0) {
|
||||
this.dataForm = response.data.list[0];
|
||||
}
|
||||
this.productAttributeList = response.data.list;
|
||||
this.productAttributeList.forEach((item) => {
|
||||
item.isDisabled = this.isDetail;
|
||||
if (this.isDetail) {
|
||||
item.inventoryInput = item.rollCodeCheck;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
inputChange(data) {
|
||||
switch (data.sType) {
|
||||
case 1:
|
||||
this.productAttributeList[data._pageIndex - 1][data.prop] =
|
||||
data[data.prop];
|
||||
break;
|
||||
case 2:
|
||||
this.productAttributeList[data._pageIndex - 1][data.prop] =
|
||||
data.string ? data.string.split('+')[0] : '';
|
||||
this.productAttributeList[data._pageIndex - 1][data.prop + 'Name'] =
|
||||
data.string ? data.string.split('+')[1] : '';
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
//检查按钮
|
||||
check() {
|
||||
this.isloading = true;
|
||||
let cancel = false;
|
||||
let strings = [];
|
||||
this.productAttributeList.forEach((item) => {
|
||||
if (item.inventoryInput) {
|
||||
strings.push(item.inventoryInput);
|
||||
} else {
|
||||
cancel = true;
|
||||
this.isloading = false;
|
||||
this.$modal.msgWarning('膜卷号必须所有都输入才能检查!');
|
||||
}
|
||||
});
|
||||
if (cancel) return;
|
||||
const data = {
|
||||
warehouseStorehouseStorageId:
|
||||
this.dataForm.warehouseStorehouseStorageId,
|
||||
userInputCheckList: strings,
|
||||
};
|
||||
getWarehousePklbDetailCheck(data)
|
||||
.then((response) => {
|
||||
this.$modal.msgWarning(response);
|
||||
this.isloading = false;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('There was an error!', error);
|
||||
this.isloading = false;
|
||||
});
|
||||
},
|
||||
// 同步mes出库
|
||||
checkout() {
|
||||
const data = {
|
||||
warehouseStorehouseStorageId:
|
||||
this.dataForm.warehouseStorehouseStorageId,
|
||||
};
|
||||
this.isloading = true;
|
||||
checkout(data)
|
||||
.then((response) => {
|
||||
this.$modal.msgSuccess('同步mes出库成功');
|
||||
this.visible = false;
|
||||
this.isloading = false;
|
||||
this.$emit('refreshDataList');
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('There was an error!', error);
|
||||
this.isloading = false;
|
||||
});
|
||||
},
|
||||
// 入库
|
||||
makeIn() {
|
||||
const data = {
|
||||
...this.listQuery,
|
||||
makeoutlist: this.productAttributeList,
|
||||
};
|
||||
this.isloading = true;
|
||||
makeWarehouseIn(data)
|
||||
.then((response) => {
|
||||
this.$modal.msgSuccess('入库成功');
|
||||
this.visible = false;
|
||||
this.isloading = false;
|
||||
this.$emit('refreshDataList');
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('There was an error!', error);
|
||||
this.isloading = false;
|
||||
});
|
||||
},
|
||||
goback() {
|
||||
this.$emit('refreshDataList');
|
||||
this.visible = false;
|
||||
this.initData();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drawer >>> .el-drawer {
|
||||
border-radius: 8px 0 0 8px;
|
||||
}
|
||||
|
||||
.drawer >>> .el-form-item__label {
|
||||
padding: 0;
|
||||
}
|
||||
.drawer >>> .el-form-item {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.drawer >>> .el-drawer__header {
|
||||
margin: 0;
|
||||
padding: 32px 32px 24px;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.drawer >>> .content {
|
||||
padding: 0 24px 30px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.drawer >>> .visual-part {
|
||||
flex: 1 auto;
|
||||
max-height: 76vh;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
padding-right: 10px; /* 调整滚动条样式 */
|
||||
}
|
||||
|
||||
.drawer >>> .el-form,
|
||||
.drawer >>> .attr-list {
|
||||
padding: 0 16px;
|
||||
}
|
||||
.checkButton {
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
border-top: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
</style>
|
356
src/views/asrs/warehousePklb/index.vue
Normal file
356
src/views/asrs/warehousePklb/index.vue
Normal file
@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:isFold="true"
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="90"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<add-or-update
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import codeFilter from '../mixins/code-filter';
|
||||
import { getWarehousePklbPage } from '@/api/asrs/warehousePklb';
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'mainTaskCode',
|
||||
label: '任务编码',
|
||||
},
|
||||
{
|
||||
prop: 'inOutWarehouseName',
|
||||
label: '出入移库库位',
|
||||
},
|
||||
{
|
||||
prop: 'relocationWarehouseName',
|
||||
label: '移库终点库位',
|
||||
},
|
||||
{
|
||||
prop: 'mainTaskType',
|
||||
label: '任务类型',
|
||||
filter: codeFilter('mainTaskType'),
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'stacker',
|
||||
label: '堆垛机',
|
||||
width: 110,
|
||||
},
|
||||
{
|
||||
prop: 'barCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'agv',
|
||||
label: 'agv',
|
||||
},
|
||||
{
|
||||
prop: 'agvStartPoint',
|
||||
label: 'AGV起点',
|
||||
},
|
||||
{
|
||||
prop: 'agvEndPoint',
|
||||
label: 'AGV终点',
|
||||
},
|
||||
{
|
||||
prop: 'mainTaskState',
|
||||
label: '状态',
|
||||
filter: codeFilter('mainTaskState'),
|
||||
},
|
||||
{
|
||||
prop: 'statepk',
|
||||
label: '盘库状态',
|
||||
filter: codeFilter('statepk'),
|
||||
},
|
||||
{
|
||||
prop: 'taskSource',
|
||||
label: '任务来源',
|
||||
filter: codeFilter('taskSource'),
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
];
|
||||
const mainTaskType = [
|
||||
{
|
||||
name: '入库',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: '出库',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '移库',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: '出库+移库',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
name: '不带agv入库',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: '入库+6臂空托盘出库',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库+移库',
|
||||
id: 8,
|
||||
},
|
||||
{
|
||||
name: '入库+12臂空托盘出库',
|
||||
id: 9,
|
||||
},
|
||||
{
|
||||
name: '平库移库',
|
||||
id: 10,
|
||||
},
|
||||
];
|
||||
const mainTaskState = [
|
||||
{
|
||||
name: '开始',
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: '已发送agv',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: 'agv运行中',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '已发送堆垛机',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: '堆垛机运行中',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
name: '完成',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: '已发送传输线',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: '传输线运行中',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '暂时无空托盘',
|
||||
id: 8,
|
||||
},
|
||||
{
|
||||
name: '已处理',
|
||||
id: 9,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehousePklbPage,
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'check',
|
||||
btnName: '检查',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'mainTaskState',
|
||||
value: 5,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'mainTaskState',
|
||||
value: 9,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '任务编码',
|
||||
placeholder: '任务编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '任务类型',
|
||||
selectOptions: mainTaskType,
|
||||
param: 'taskType',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'tcode',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '状态',
|
||||
selectOptions: mainTaskState,
|
||||
param: 'status',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: 'agv',
|
||||
selectOptions: [],
|
||||
param: 'agv',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '选择日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '重置',
|
||||
name: 'reset',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {
|
||||
this.setFormConfig();
|
||||
},
|
||||
methods: {
|
||||
setFormConfig() {
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i,
|
||||
};
|
||||
this.formConfig[4].selectOptions.push(obj);
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.mainTaskCode = val.code;
|
||||
this.listQuery.mainTaskType = val.taskType;
|
||||
this.listQuery.barCode = val.tcode;
|
||||
this.listQuery.mainTaskState = val.status;
|
||||
this.listQuery.agv = val.agv;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
warehouseId: '1696803324030865409',
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
if (val.type === 'check') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '盘货明细表';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data, false);
|
||||
});
|
||||
} else if (val.type === 'detail') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '盘货明细表';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data, true);
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
357
src/views/asrs/warehousePklb/indexb.vue
Normal file
357
src/views/asrs/warehousePklb/indexb.vue
Normal file
@ -0,0 +1,357 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:isFold="true"
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
v-loading="dataListLoading"
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="90"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" />
|
||||
<add-or-update
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import codeFilter from '../mixins/code-filter';
|
||||
import { getWarehousePklbPage } from '@/api/asrs/warehousePklb';
|
||||
import AddOrUpdate from './add-or-updata';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'mainTaskCode',
|
||||
label: '任务编码',
|
||||
},
|
||||
{
|
||||
prop: 'inOutWarehouseName',
|
||||
label: '出入移库库位',
|
||||
},
|
||||
{
|
||||
prop: 'relocationWarehouseName',
|
||||
label: '移库终点库位',
|
||||
},
|
||||
{
|
||||
prop: 'mainTaskType',
|
||||
label: '任务类型',
|
||||
filter: codeFilter('mainTaskType'),
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'stacker',
|
||||
label: '堆垛机',
|
||||
width: 110,
|
||||
},
|
||||
{
|
||||
prop: 'barCode',
|
||||
label: '托盘编码',
|
||||
},
|
||||
{
|
||||
prop: 'agv',
|
||||
label: 'agv',
|
||||
},
|
||||
{
|
||||
prop: 'agvStartPoint',
|
||||
label: 'AGV起点',
|
||||
},
|
||||
{
|
||||
prop: 'agvEndPoint',
|
||||
label: 'AGV终点',
|
||||
},
|
||||
{
|
||||
prop: 'mainTaskState',
|
||||
label: '状态',
|
||||
filter: codeFilter('mainTaskState'),
|
||||
},
|
||||
{
|
||||
prop: 'statepk',
|
||||
label: '盘库状态',
|
||||
filter: codeFilter('statepk'),
|
||||
},
|
||||
{
|
||||
prop: 'taskSource',
|
||||
label: '任务来源',
|
||||
filter: codeFilter('taskSource'),
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '创建时间',
|
||||
filter: parseTime,
|
||||
width: 150,
|
||||
},
|
||||
];
|
||||
const mainTaskType = [
|
||||
{
|
||||
name: '入库',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: '出库',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '移库',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: '出库+移库',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
name: '不带agv入库',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: '入库+6臂空托盘出库',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '不带agv出库+移库',
|
||||
id: 8,
|
||||
},
|
||||
{
|
||||
name: '入库+12臂空托盘出库',
|
||||
id: 9,
|
||||
},
|
||||
{
|
||||
name: '平库移库',
|
||||
id: 10,
|
||||
},
|
||||
];
|
||||
const mainTaskState = [
|
||||
{
|
||||
name: '开始',
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
name: '已发送agv',
|
||||
id: 1,
|
||||
},
|
||||
{
|
||||
name: 'agv运行中',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
name: '已发送堆垛机',
|
||||
id: 3,
|
||||
},
|
||||
{
|
||||
name: '堆垛机运行中',
|
||||
id: 4,
|
||||
},
|
||||
{
|
||||
name: '完成',
|
||||
id: 5,
|
||||
},
|
||||
{
|
||||
name: '已发送传输线',
|
||||
id: 6,
|
||||
},
|
||||
{
|
||||
name: '传输线运行中',
|
||||
id: 7,
|
||||
},
|
||||
{
|
||||
name: '暂时无空托盘',
|
||||
id: 8,
|
||||
},
|
||||
{
|
||||
name: '已处理',
|
||||
id: 9,
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehousePklbPage,
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
},
|
||||
tableProps,
|
||||
tableBtn: [
|
||||
{
|
||||
type: 'check',
|
||||
btnName: '检查',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'mainTaskState',
|
||||
value: 5,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'detail',
|
||||
btnName: '详情',
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
type: 'equal',
|
||||
name: 'mainTaskState',
|
||||
value: 9,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '任务编码',
|
||||
placeholder: '任务编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '任务类型',
|
||||
selectOptions: mainTaskType,
|
||||
param: 'taskType',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'tcode',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '状态',
|
||||
selectOptions: mainTaskState,
|
||||
param: 'status',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: 'agv',
|
||||
selectOptions: [],
|
||||
param: 'agv',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '选择日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '重置',
|
||||
name: 'reset',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId
|
||||
this.setFormConfig();
|
||||
},
|
||||
methods: {
|
||||
setFormConfig() {
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i,
|
||||
};
|
||||
this.formConfig[4].selectOptions.push(obj);
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.mainTaskCode = val.code;
|
||||
this.listQuery.mainTaskType = val.taskType;
|
||||
this.listQuery.barCode = val.tcode;
|
||||
this.listQuery.mainTaskState = val.status;
|
||||
this.listQuery.agv = val.agv;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
warehouseId: '1698950657556340737',
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
if (val.type === 'check') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '盘货明细表';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data, false);
|
||||
});
|
||||
} else if (val.type === 'detail') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '盘货明细表';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data, true);
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
55
src/views/asrs/warehousePklb/inputArea.vue
Normal file
55
src/views/asrs/warehousePklb/inputArea.vue
Normal file
@ -0,0 +1,55 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-09-22 15:36:40
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2024-06-21 15:07:10
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="tableInner">
|
||||
<el-input
|
||||
v-model="list[itemProp]"
|
||||
:id="'inputFocus'+injectData._pageIndex"
|
||||
:disabled="injectData.isDisabled"
|
||||
@blur="changeInput"
|
||||
@keyup.enter.native="nextInput" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'InputArea',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
itemProp: {
|
||||
type: String,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
changeInput() {
|
||||
this.list.sType = 1;
|
||||
this.$emit('emitData', this.list, 1);
|
||||
},
|
||||
nextInput(){
|
||||
this.list.sType = 3;
|
||||
this.$emit('emitData', this.list, 3);
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.tableInner >>> .el-input__inner {
|
||||
color: #409eff;
|
||||
border: 1px rgb(232, 231, 231) solid;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
@ -109,12 +109,12 @@ export default {
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`asrs:warehouse-storehouse:delete`)
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
// this.$auth.hasPermi(`asrs:warehouse-storehouse:delete`)
|
||||
// ? {
|
||||
// type: 'delete',
|
||||
// btnName: '删除',
|
||||
// }
|
||||
// : undefined,
|
||||
].filter((v)=>v),
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
@ -136,16 +136,16 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('asrs:warehouse-storehouse:create') ? 'button' : '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true,
|
||||
},
|
||||
// {
|
||||
// type: 'separate',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('asrs:warehouse-storehouse:create') ? 'button' : '',
|
||||
// btnName: '新增',
|
||||
// name: 'add',
|
||||
// color: 'success',
|
||||
// plain: true,
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
|
@ -102,7 +102,6 @@ export default {
|
||||
deleteURL: deleteWarehouseStorehouse,
|
||||
},
|
||||
tableProps,
|
||||
bPage: true,
|
||||
tableBtn: [
|
||||
this.$auth.hasPermi(`asrs:warehouse-storehouse:update`)
|
||||
? {
|
||||
@ -110,12 +109,12 @@ export default {
|
||||
btnName: '编辑',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi(`asrs:warehouse-storehouse:delete`)
|
||||
? {
|
||||
type: 'delete',
|
||||
btnName: '删除',
|
||||
}
|
||||
: undefined,
|
||||
// this.$auth.hasPermi(`asrs:warehouse-storehouse:delete`)
|
||||
// ? {
|
||||
// type: 'delete',
|
||||
// btnName: '删除',
|
||||
// }
|
||||
// : undefined,
|
||||
].filter((v)=>v),
|
||||
tableData: [],
|
||||
formConfig: [
|
||||
@ -137,16 +136,16 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'separate',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('asrs:warehouse-storehouse:create') ? 'button' : '',
|
||||
btnName: '新增',
|
||||
name: 'add',
|
||||
color: 'success',
|
||||
plain: true,
|
||||
},
|
||||
// {
|
||||
// type: 'separate',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('asrs:warehouse-storehouse:create') ? 'button' : '',
|
||||
// btnName: '新增',
|
||||
// name: 'add',
|
||||
// color: 'success',
|
||||
// plain: true,
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
@ -163,7 +162,7 @@ export default {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
this.listQuery.warehouseId = this.bId
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-22 15:01:55
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-10 10:43:39
|
||||
* @LastEditTime: 2024-04-19 14:34:09
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -86,7 +86,7 @@
|
||||
:table-data="productAttributeList">
|
||||
<method-btn
|
||||
slot="handleBtn"
|
||||
:width="70"
|
||||
:width="60"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
@ -131,33 +131,30 @@ const tableProps = [
|
||||
prop: 'goodSpecificationName',
|
||||
label: '产品名',
|
||||
},
|
||||
{
|
||||
prop: 'goodSpecificationCode',
|
||||
label: '产品编码',
|
||||
},
|
||||
{
|
||||
prop: 'specification',
|
||||
label: '产品规格',
|
||||
filter: codeFilter('specification'),
|
||||
width:90
|
||||
width:80
|
||||
},
|
||||
{
|
||||
prop: 'rollCode',
|
||||
label: '膜卷编码',
|
||||
subcomponent: inputArea,
|
||||
},
|
||||
{
|
||||
prop: 'number',
|
||||
label: '数量',
|
||||
subcomponent: inputArea,
|
||||
width:100
|
||||
width: 55,
|
||||
},
|
||||
{
|
||||
prop: 'quality',
|
||||
prop: 'grade',
|
||||
label: '品质',
|
||||
filter: codeFilter('quality'),
|
||||
subcomponent: selectQuality,
|
||||
width:110
|
||||
},
|
||||
{
|
||||
prop: 'cureTime',
|
||||
label: '需要熟化时间(小时)',
|
||||
width:150
|
||||
width: 140
|
||||
},
|
||||
];
|
||||
|
||||
@ -307,7 +304,11 @@ export default {
|
||||
});
|
||||
},
|
||||
addList(data) {
|
||||
this.productAttributeList.push(data.productInfo);
|
||||
data.productInfo.number = 1;
|
||||
data.productInfo.grade = data.grade;
|
||||
for (let i = 0; i < data.number; i++) {
|
||||
this.productAttributeList.push(JSON.parse(JSON.stringify(data.productInfo)));
|
||||
}
|
||||
},
|
||||
goback() {
|
||||
this.$emit('refreshDataList');
|
||||
|
@ -24,16 +24,33 @@
|
||||
v-model="dataForm.productInfo"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
remote
|
||||
:remote-method="remoteMethod"
|
||||
value-key="id"
|
||||
placeholder="请选择产品">
|
||||
placeholder="请选择产品"
|
||||
:loading="loading">
|
||||
<el-option
|
||||
v-for="item in productArr"
|
||||
:key="item.id"
|
||||
:label="item.goodSpecificationName"
|
||||
:value="item"
|
||||
:disabled="!item.deactivate" />
|
||||
:disabled="!item.deactivate" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="品质" prop="grade">
|
||||
<el-input
|
||||
v-model="dataForm.grade"
|
||||
placeholder="请输入品质"
|
||||
clearable
|
||||
:style="{ width: '100%' }" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="number">
|
||||
<el-input-number
|
||||
v-model="dataForm.number"
|
||||
:step="1"
|
||||
:min="1"
|
||||
step-strictly></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row style="text-align: right">
|
||||
@ -58,13 +75,18 @@ export default {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
index: -1,
|
||||
productInfo: '',
|
||||
productInfo: null,
|
||||
number: 1,
|
||||
grade: null,
|
||||
},
|
||||
productArr: [],
|
||||
loading: false,
|
||||
dataRule: {
|
||||
productId: [
|
||||
{ required: true, message: '产品不能为空', trigger: 'blur' },
|
||||
productInfo: [
|
||||
{ required: true, message: '产品不能为空', trigger: 'change' },
|
||||
],
|
||||
number: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
|
||||
grade: [{ required: true, message: '品质不能为空', trigger: 'change' }],
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -76,15 +98,24 @@ export default {
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
});
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
warehouseId: this.warehouseId,
|
||||
goodSpecificationName: query,
|
||||
// warehouseId: this.warehouseId,
|
||||
};
|
||||
getGoodSpecificationPage(params).then((response) => {
|
||||
this.loading = false;
|
||||
this.productArr = response.data.list;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.productArr = [];
|
||||
}
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
|
@ -30,22 +30,20 @@
|
||||
label="库位编码"></el-table-column>
|
||||
<el-table-column prop="trayCode" label="托盘编码"></el-table-column>
|
||||
<el-table-column prop="process" label="工序" width="110">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{ scope.row.process>=0 ? processArr[scope.row.process].name : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cacheLocation" label="缓存库位" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.cacheLocation === 0 ? '否' : '是' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseStorehouseState" label="库位状态" width="100">
|
||||
<el-table-column
|
||||
prop="warehouseStorehouseState"
|
||||
label="库位状态"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.warehouseStorehouseState>=0
|
||||
scope.row.warehouseStorehouseState >= 0
|
||||
? warehouseStorehouseState[scope.row.warehouseStorehouseState]
|
||||
.name
|
||||
: ''
|
||||
@ -55,16 +53,29 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="70">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
:disabled="scope.row.warehouseStorehouseState===1"
|
||||
@click="handleClick({ data: {id:scope.row}, type: 'edit' })"
|
||||
v-hasPermi="[
|
||||
'asrs:warehouse-storehouse-goods-specification:update',
|
||||
]">
|
||||
<span class="iconfont icon-edit primary-color"></span>
|
||||
</el-button>
|
||||
<span v-if="scope.row.deactivate === 1">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
:disabled="scope.row.warehouseStorehouseState === 1"
|
||||
@click="handleClick({ data: { id: scope.row }, type: 'edit' })"
|
||||
v-hasPermi="[
|
||||
'asrs:warehouse-storehouse-goods-specification:update',
|
||||
]">
|
||||
<span class="iconfont icon-edit primary-color"></span>
|
||||
</el-button>
|
||||
</span>
|
||||
<span v-else>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleClick({ data: { id: scope.row }, type: 'restore' })"
|
||||
v-hasPermi="[
|
||||
'asrs:warehouse-storehouse-goods-specification:update',
|
||||
]">
|
||||
启用库位
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -85,7 +96,11 @@ import AddOrUpdate from './add-or-updata';
|
||||
import product from '../product-mini';
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import { getWarehouseStorehousePage, } from "@/api/asrs/warehouseStorehouse";
|
||||
import {
|
||||
getWarehouseStorehousePage,
|
||||
updateWarehouseStorehouse,
|
||||
exportWarehouseStorehouseExcel
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
|
||||
const processArr = [
|
||||
{
|
||||
@ -129,23 +144,51 @@ export default {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehouseStorehousePage,
|
||||
exportURL: exportWarehouseStorehouseExcel
|
||||
},
|
||||
tableData: [],
|
||||
processArr,
|
||||
warehouseStorehouseState,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '库位名',
|
||||
placeholder: '库位名',
|
||||
param: 'name',
|
||||
type: 'select',
|
||||
label: '排',
|
||||
selectOptions: [],
|
||||
param: 'wareRow',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '列',
|
||||
selectOptions: [],
|
||||
param: 'wareColumn',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '层',
|
||||
selectOptions: [],
|
||||
param: 'wareLayer',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '库位编码',
|
||||
placeholder: '库位编码',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '膜卷编码',
|
||||
placeholder: '膜卷编码',
|
||||
param: 'rollCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品名',
|
||||
@ -154,18 +197,24 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品编码',
|
||||
placeholder: '产品编码',
|
||||
param: 'pcode',
|
||||
label: '品质',
|
||||
placeholder: '品质',
|
||||
param: 'quality',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
type: 'input',
|
||||
label: '工序',
|
||||
selectOptions: processArr,
|
||||
placeholder: '工序',
|
||||
param: 'processId',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '工序',
|
||||
// selectOptions: processArr,
|
||||
// param: 'processId',
|
||||
// defaultSelect: '',
|
||||
// filterable: true,
|
||||
// },
|
||||
{
|
||||
type: 'select',
|
||||
label: '库位状态',
|
||||
@ -180,15 +229,13 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
@ -196,19 +243,48 @@ export default {
|
||||
AddOrUpdate,
|
||||
product,
|
||||
},
|
||||
created() {},
|
||||
created() {
|
||||
this.setFormConfig();
|
||||
},
|
||||
methods: {
|
||||
setFormConfig() {
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '排',
|
||||
};
|
||||
this.formConfig[0].selectOptions.push(obj);
|
||||
}
|
||||
for (let i = 1; i <= 30; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '列',
|
||||
};
|
||||
this.formConfig[1].selectOptions.push(obj);
|
||||
}
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '层',
|
||||
};
|
||||
this.formConfig[2].selectOptions.push(obj);
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.warehouseStorehouseName = val.name;
|
||||
this.listQuery.warehouseStorehouseCode = val.code;
|
||||
this.listQuery.wareRow = val.wareRow;
|
||||
this.listQuery.wareColumn = val.wareColumn;
|
||||
this.listQuery.wareLayer = val.wareLayer;
|
||||
this.listQuery.trayCode = val.code;
|
||||
this.listQuery.goodName = val.pname;
|
||||
this.listQuery.goodCode = val.pcode;
|
||||
this.listQuery.grade = val.quality;
|
||||
this.listQuery.rollCode = val.rollCode;
|
||||
this.listQuery.process = val.processId;
|
||||
this.listQuery.warehouseStorehouseState = val.warehouseStorehouseStateId;
|
||||
this.listQuery.warehouseStorehouseState =
|
||||
val.warehouseStorehouseStateId;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
@ -226,12 +302,39 @@ export default {
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
this.listQuery.pageNo = undefined;
|
||||
this.listQuery.pageSize = undefined;
|
||||
this.listQuery.wareRow = val.wareRow;
|
||||
this.listQuery.wareColumn = val.wareColumn;
|
||||
this.listQuery.wareLayer = val.wareLayer;
|
||||
this.listQuery.trayCode = val.code;
|
||||
this.listQuery.goodName = val.pname;
|
||||
this.listQuery.grade = val.quality;
|
||||
this.listQuery.rollCode = val.rollCode;
|
||||
this.listQuery.process = val.processId;
|
||||
this.listQuery.warehouseStorehouseState =
|
||||
val.warehouseStorehouseStateId;
|
||||
this.handleExport(this.listQuery,'库位产品导出');
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
if (val.type === 'restore') {
|
||||
const dataForm = {
|
||||
id: val.data.id.id,
|
||||
deactivate: 1,
|
||||
trayCode: val.data.id.trayCode ? val.data.id.trayCode : '',
|
||||
};
|
||||
updateWarehouseStorehouse(dataForm).then((response) => {
|
||||
this.$modal.msgSuccess('启用成功');
|
||||
this.getDataList();
|
||||
});
|
||||
} else {
|
||||
console.log(11);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -30,22 +30,20 @@
|
||||
label="库位编码"></el-table-column>
|
||||
<el-table-column prop="trayCode" label="托盘编码"></el-table-column>
|
||||
<el-table-column prop="process" label="工序" width="110">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{ scope.row.process>=0 ? processArr[scope.row.process].name : '' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cacheLocation" label="缓存库位" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.cacheLocation === 0 ? '否' : '是' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseStorehouseState" label="库位状态" width="100">
|
||||
<el-table-column
|
||||
prop="warehouseStorehouseState"
|
||||
label="库位状态"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.warehouseStorehouseState>=0
|
||||
scope.row.warehouseStorehouseState >= 0
|
||||
? warehouseStorehouseState[scope.row.warehouseStorehouseState]
|
||||
.name
|
||||
: ''
|
||||
@ -55,15 +53,29 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="70">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleClick({ data: {id:scope.row}, type: 'edit' })"
|
||||
v-hasPermi="[
|
||||
'asrs:warehouse-storehouse-goods-specification:update',
|
||||
]">
|
||||
<span class="iconfont icon-edit primary-color"></span>
|
||||
</el-button>
|
||||
<span v-if="scope.row.deactivate === 1">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
:disabled="scope.row.warehouseStorehouseState === 1"
|
||||
@click="handleClick({ data: { id: scope.row }, type: 'edit' })"
|
||||
v-hasPermi="[
|
||||
'asrs:warehouse-storehouse-goods-specification:update',
|
||||
]">
|
||||
<span class="iconfont icon-edit primary-color"></span>
|
||||
</el-button>
|
||||
</span>
|
||||
<span v-else>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleClick({ data: { id: scope.row }, type: 'restore' })"
|
||||
v-hasPermi="[
|
||||
'asrs:warehouse-storehouse-goods-specification:update',
|
||||
]">
|
||||
启用库位
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -84,7 +96,11 @@ import AddOrUpdate from './add-or-updata';
|
||||
import product from '../product-mini';
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { parseTime } from '../mixins/code-filter';
|
||||
import { getWarehouseStorehousePage, } from "@/api/asrs/warehouseStorehouse";
|
||||
import {
|
||||
getWarehouseStorehousePage,
|
||||
updateWarehouseStorehouse,
|
||||
exportWarehouseStorehouseExcel
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
|
||||
const processArr = [
|
||||
{
|
||||
@ -128,24 +144,51 @@ export default {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehouseStorehousePage,
|
||||
exportURL: exportWarehouseStorehouseExcel
|
||||
},
|
||||
tableData: [],
|
||||
processArr,
|
||||
warehouseStorehouseState,
|
||||
bPage: true,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '库位名',
|
||||
placeholder: '库位名',
|
||||
param: 'name',
|
||||
type: 'select',
|
||||
label: '排',
|
||||
selectOptions: [],
|
||||
param: 'wareRow',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '列',
|
||||
selectOptions: [],
|
||||
param: 'wareColumn',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '层',
|
||||
selectOptions: [],
|
||||
param: 'wareLayer',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '库位编码',
|
||||
placeholder: '库位编码',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '膜卷编码',
|
||||
placeholder: '膜卷编码',
|
||||
param: 'rollCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品名',
|
||||
@ -154,18 +197,24 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品编码',
|
||||
placeholder: '产品编码',
|
||||
param: 'pcode',
|
||||
label: '品质',
|
||||
placeholder: '品质',
|
||||
param: 'quality',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
type: 'input',
|
||||
label: '工序',
|
||||
selectOptions: processArr,
|
||||
placeholder: '工序',
|
||||
param: 'processId',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '工序',
|
||||
// selectOptions: processArr,
|
||||
// param: 'processId',
|
||||
// defaultSelect: '',
|
||||
// filterable: true,
|
||||
// },
|
||||
{
|
||||
type: 'select',
|
||||
label: '库位状态',
|
||||
@ -180,15 +229,13 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
@ -197,20 +244,48 @@ export default {
|
||||
product,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
},
|
||||
this.listQuery.warehouseId = this.bId
|
||||
this.setFormConfig();
|
||||
},
|
||||
methods: {
|
||||
setFormConfig() {
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '排',
|
||||
};
|
||||
this.formConfig[0].selectOptions.push(obj);
|
||||
}
|
||||
for (let i = 1; i <= 30; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '列',
|
||||
};
|
||||
this.formConfig[1].selectOptions.push(obj);
|
||||
}
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '层',
|
||||
};
|
||||
this.formConfig[2].selectOptions.push(obj);
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.warehouseStorehouseName = val.name;
|
||||
this.listQuery.warehouseStorehouseCode = val.code;
|
||||
this.listQuery.wareRow = val.wareRow;
|
||||
this.listQuery.wareColumn = val.wareColumn;
|
||||
this.listQuery.wareLayer = val.wareLayer;
|
||||
this.listQuery.trayCode = val.code;
|
||||
this.listQuery.goodName = val.pname;
|
||||
this.listQuery.goodCode = val.pcode;
|
||||
this.listQuery.grade = val.quality;
|
||||
this.listQuery.rollCode = val.rollCode;
|
||||
this.listQuery.process = val.processId;
|
||||
this.listQuery.warehouseStorehouseState = val.warehouseStorehouseStateId;
|
||||
this.listQuery.warehouseStorehouseState =
|
||||
val.warehouseStorehouseStateId;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
@ -228,12 +303,39 @@ export default {
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
this.listQuery.pageNo = undefined;
|
||||
this.listQuery.pageSize = undefined;
|
||||
this.listQuery.wareRow = val.wareRow;
|
||||
this.listQuery.wareColumn = val.wareColumn;
|
||||
this.listQuery.wareLayer = val.wareLayer;
|
||||
this.listQuery.trayCode = val.code;
|
||||
this.listQuery.goodName = val.pname;
|
||||
this.listQuery.grade = val.quality;
|
||||
this.listQuery.rollCode = val.rollCode;
|
||||
this.listQuery.process = val.processId;
|
||||
this.listQuery.warehouseStorehouseState =
|
||||
val.warehouseStorehouseStateId;
|
||||
this.handleExport(this.listQuery,'库位产品导出');
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
otherMethods(val) {
|
||||
if (val.type === 'restore') {
|
||||
const dataForm = {
|
||||
id: val.data.id.id,
|
||||
deactivate: 1,
|
||||
trayCode: val.data.id.trayCode ? val.data.id.trayCode : '',
|
||||
};
|
||||
updateWarehouseStorehouse(dataForm).then((response) => {
|
||||
this.$modal.msgSuccess('启用成功');
|
||||
this.getDataList();
|
||||
});
|
||||
} else {
|
||||
console.log(11);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -15,8 +15,7 @@
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
label-width="100px"
|
||||
label-position="top"
|
||||
@keyup.enter.native="dataFormSubmit">
|
||||
label-position="top">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="库位编码" prop="warehouseStorehouseCode">
|
||||
@ -34,21 +33,40 @@
|
||||
placeholder="请输入库位名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="托盘编码" prop="trayCode">
|
||||
<el-input
|
||||
v-model="dataForm.trayCode"
|
||||
@input="$forceUpdate()"
|
||||
@keyup.enter.native="nextTInput"
|
||||
ref="input"
|
||||
placeholder="请输入托盘编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="选择起点区域" prop="region">
|
||||
<el-select
|
||||
v-model="dataForm.region"
|
||||
style="width: 100%"
|
||||
@change="getPotArr"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择区域">
|
||||
<el-option
|
||||
v-for="item in regionArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="选择起点位置" prop="startInfo">
|
||||
<el-select
|
||||
v-model="dataForm.startInfo"
|
||||
style="width: 100%"
|
||||
:disabled="potDisable"
|
||||
@change="$forceUpdate()"
|
||||
placeholder="请选择起点位置">
|
||||
<el-option
|
||||
@ -101,7 +119,7 @@
|
||||
:table-data="productAttributeList">
|
||||
<method-btn
|
||||
slot="handleBtn"
|
||||
:width="70"
|
||||
:width="60"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
@ -113,14 +131,19 @@
|
||||
<div style="position: absolute; bottom: 24px; right: 24px">
|
||||
<el-button style="margin-right: 10px" @click="goback()">返回</el-button>
|
||||
<span>
|
||||
<el-button type="primary" @click="dataFormSubmit()">保存</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="dataFormSubmit()"
|
||||
:loading="isloading">
|
||||
保存
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<product-attr-add
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
:warehouse-id="dataForm.warehouseId"
|
||||
:warehouse-id="warehouseId"
|
||||
@refreshDataList="addList" />
|
||||
</el-drawer>
|
||||
</template>
|
||||
@ -149,33 +172,30 @@ const tableProps = [
|
||||
prop: 'goodSpecificationName',
|
||||
label: '产品名',
|
||||
},
|
||||
{
|
||||
prop: 'goodSpecificationCode',
|
||||
label: '产品编码',
|
||||
},
|
||||
{
|
||||
prop: 'specification',
|
||||
label: '产品规格',
|
||||
filter: codeFilter('specification'),
|
||||
width: 90,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
prop: 'rollCode',
|
||||
label: '膜卷编码',
|
||||
subcomponent: inputArea,
|
||||
},
|
||||
{
|
||||
prop: 'number',
|
||||
label: '数量',
|
||||
subcomponent: inputArea,
|
||||
width: 100,
|
||||
width: 55,
|
||||
},
|
||||
{
|
||||
prop: 'quality',
|
||||
prop: 'grade',
|
||||
label: '品质',
|
||||
filter: codeFilter('quality'),
|
||||
subcomponent: selectQuality,
|
||||
width: 110,
|
||||
},
|
||||
{
|
||||
prop: 'cureTime',
|
||||
label: '需要熟化时间(小时)',
|
||||
width: 150,
|
||||
width: 140,
|
||||
},
|
||||
];
|
||||
|
||||
@ -201,6 +221,19 @@ const processArr = [
|
||||
id: 4,
|
||||
},
|
||||
];
|
||||
const regionArr = [
|
||||
{ name: '一次分切区域1线', id: 1 },
|
||||
{ name: '一次分拣区域', id: 2 },
|
||||
{ name: '二次分切区域', id: 3 },
|
||||
{ name: '二次分拣区域', id: 4 },
|
||||
{ name: '手动包装区域', id: 5 },
|
||||
{ name: '涂覆区域', id: 6 },
|
||||
{ name: '其他', id: 7 },
|
||||
{ name: '自动包装区域', id: 8 },
|
||||
{ name: '一次分切区域2线', id: 9 },
|
||||
{ name: '一次分切区域3线', id: 10 },
|
||||
{ name: '一次分切区域4线', id: 11 },
|
||||
];
|
||||
export default {
|
||||
components: { productAttrAdd, SmallTitle },
|
||||
data() {
|
||||
@ -213,14 +246,19 @@ export default {
|
||||
addButtonShow: '新增',
|
||||
processArr,
|
||||
potArr: [],
|
||||
regionArr,
|
||||
potDisable: true,
|
||||
dataForm: {
|
||||
id: null,
|
||||
region: undefined,
|
||||
warehouseStorehouseName: '',
|
||||
warehouseStorehouseCode: '',
|
||||
process: '',
|
||||
trayCode: '',
|
||||
startInfo: '',
|
||||
},
|
||||
warehouseId: null,
|
||||
isloading: false,
|
||||
updata: {},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
@ -250,21 +288,23 @@ export default {
|
||||
this.productAttributeList.splice(0);
|
||||
},
|
||||
init(val) {
|
||||
this.isloading = false;
|
||||
this.potDisable = true;
|
||||
this.updata = val;
|
||||
this.warehouseId = val.warehouseId;
|
||||
this.dataForm.id = val.id;
|
||||
this.dataForm.warehouseStorehouseName = val.warehouseStorehouseName;
|
||||
this.dataForm.warehouseStorehouseCode = val.warehouseStorehouseCode;
|
||||
this.dataForm.process = val.process;
|
||||
this.dataForm.trayCode = val.trayCode;
|
||||
this.dataForm.startInfo = '';
|
||||
this.dataForm.region = null;
|
||||
this.initData();
|
||||
this.visible = true;
|
||||
getLineList().then((response) => {
|
||||
this.potArr = response.data;
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
|
||||
this.$refs.input.focus();
|
||||
if (this.dataForm.id) {
|
||||
// 获取产品详情
|
||||
// 获取产品的属性列表
|
||||
@ -272,6 +312,14 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
getPotArr(val) {
|
||||
getLineList({ region: val, warehouseId: this.warehouseId }).then(
|
||||
(response) => {
|
||||
this.potArr = response.data;
|
||||
this.potDisable = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
getList() {
|
||||
// 获取产品的属性列表
|
||||
@ -285,6 +333,11 @@ export default {
|
||||
this.listQuery.total = response.data.total;
|
||||
});
|
||||
},
|
||||
nextTInput() {
|
||||
if (this.productAttributeList.length > 0) {
|
||||
document.getElementById('inputFocus1').focus();
|
||||
}
|
||||
},
|
||||
inputChange(data) {
|
||||
switch (data.sType) {
|
||||
case 1:
|
||||
@ -297,6 +350,13 @@ export default {
|
||||
this.productAttributeList[data._pageIndex - 1][data.prop + 'Name'] =
|
||||
data.string ? data.string.split('+')[1] : '';
|
||||
break;
|
||||
case 3:
|
||||
if (data._pageIndex < this.productAttributeList.length) {
|
||||
document
|
||||
.getElementById('inputFocus' + (data._pageIndex + 1))
|
||||
.focus();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
@ -342,12 +402,14 @@ export default {
|
||||
this.updata.agvGroundCode = this.dataForm.startInfo.split('-')[1];
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.isloading = true;
|
||||
// 修改的提交
|
||||
this.updata.list = this.productAttributeList;
|
||||
if (this.dataForm.id) {
|
||||
inWarehouseStorehouse(this.updata).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
this.isloading = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
return;
|
||||
@ -366,7 +428,13 @@ export default {
|
||||
});
|
||||
},
|
||||
addList(data) {
|
||||
this.productAttributeList.push(data.productInfo);
|
||||
data.productInfo.number = 1;
|
||||
data.productInfo.grade = data.grade;
|
||||
for (let i = 0; i < data.number; i++) {
|
||||
this.productAttributeList.push(
|
||||
JSON.parse(JSON.stringify(data.productInfo))
|
||||
);
|
||||
}
|
||||
},
|
||||
goback() {
|
||||
this.$emit('refreshDataList');
|
||||
|
@ -23,17 +23,34 @@
|
||||
<el-select
|
||||
v-model="dataForm.productInfo"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
value-key="id"
|
||||
placeholder="请选择产品">
|
||||
filterable
|
||||
remote
|
||||
:remote-method="remoteMethod"
|
||||
value-key="id"
|
||||
placeholder="请选择产品"
|
||||
:loading="loading">
|
||||
<el-option
|
||||
v-for="item in productArr"
|
||||
:key="item.id"
|
||||
:label="item.goodSpecificationName"
|
||||
:value="item"
|
||||
:disabled="!item.deactivate" />
|
||||
:disabled="!item.deactivate" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="品质" prop="grade">
|
||||
<el-input
|
||||
v-model="dataForm.grade"
|
||||
placeholder="请输入品质"
|
||||
clearable
|
||||
:style="{ width: '100%' }" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="number">
|
||||
<el-input-number
|
||||
v-model="dataForm.number"
|
||||
:step="1"
|
||||
:min="1"
|
||||
step-strictly></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row style="text-align: right">
|
||||
@ -58,11 +75,18 @@ export default {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
index: -1,
|
||||
productInfo: '',
|
||||
productInfo: null,
|
||||
number: 1,
|
||||
grade: null,
|
||||
},
|
||||
productArr: [],
|
||||
loading: false,
|
||||
dataRule: {
|
||||
productId: [{ required: true, message: '产品不能为空', trigger: 'blur' }],
|
||||
productInfo: [
|
||||
{ required: true, message: '产品不能为空', trigger: 'change' },
|
||||
],
|
||||
number: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
|
||||
grade: [{ required: true, message: '品质不能为空', trigger: 'change' }],
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -74,21 +98,31 @@ export default {
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
});
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
const params = {
|
||||
pageSize: 100,
|
||||
pageNo: 1,
|
||||
warehouseId: this.warehouseId,
|
||||
goodSpecificationName: query,
|
||||
// warehouseId: this.warehouseId,
|
||||
};
|
||||
getGoodSpecificationPage(params).then((response) => {
|
||||
this.loading = false;
|
||||
this.productArr = response.data.list;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.productArr = [];
|
||||
}
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.dataForm.productInfo.goodSpecificationId = this.dataForm.productInfo.id
|
||||
this.dataForm.productInfo.goodSpecificationId =
|
||||
this.dataForm.productInfo.id;
|
||||
// 修改的提交
|
||||
if (this.dataForm.index >= 0) {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
|
@ -30,13 +30,6 @@
|
||||
label="库位编码"></el-table-column>
|
||||
<el-table-column prop="trayCode" label="托盘编码"></el-table-column>
|
||||
<el-table-column prop="process" label="工序" width="110">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.process >= 0 ? processArr[scope.row.process].name : ''
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cacheLocation" label="缓存库位" width="100">
|
||||
<template slot-scope="scope">
|
||||
@ -58,7 +51,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<el-table-column label="操作" width="120">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.deactivate === 1">
|
||||
<el-button
|
||||
@ -66,7 +59,7 @@
|
||||
v-if="scope.row.warehouseStorehouseState === 0"
|
||||
type="text"
|
||||
@click="handleClick({ data: { id: scope.row }, type: 'in' })"
|
||||
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
|
||||
v-hasPermi="['asrs:warehouse-storehouse-storage:in']">
|
||||
入库
|
||||
</el-button>
|
||||
<el-button
|
||||
@ -74,9 +67,17 @@
|
||||
v-if="scope.row.warehouseStorehouseState === 2"
|
||||
type="text"
|
||||
@click="handleClick({ data: scope.row, type: 'out' })"
|
||||
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
|
||||
v-hasPermi="['asrs:warehouse-storehouse-storage:out']">
|
||||
出库
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="scope.row.warehouseStorehouseState === 2"
|
||||
type="text"
|
||||
@click="handleClick({ data: scope.row, type: 'make' })"
|
||||
v-hasPermi="['asrs:warehouse-storehouse-storage:out']">
|
||||
盘库
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="scope.row.warehouseStorehouseState === 2"
|
||||
@ -183,17 +184,44 @@ export default {
|
||||
warehouseStorehouseState,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '库位名',
|
||||
placeholder: '库位名',
|
||||
param: 'name',
|
||||
type: 'select',
|
||||
label: '排',
|
||||
selectOptions: [],
|
||||
param: 'wareRow',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '列',
|
||||
selectOptions: [],
|
||||
param: 'wareColumn',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '层',
|
||||
selectOptions: [],
|
||||
param: 'wareLayer',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '库位编码',
|
||||
placeholder: '库位编码',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '膜卷编码',
|
||||
placeholder: '膜卷编码',
|
||||
param: 'rollCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品名',
|
||||
@ -202,18 +230,24 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品编码',
|
||||
placeholder: '产品编码',
|
||||
param: 'pcode',
|
||||
label: '品质',
|
||||
placeholder: '品质',
|
||||
param: 'quality',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
type: 'input',
|
||||
label: '工序',
|
||||
selectOptions: processArr,
|
||||
placeholder: '工序',
|
||||
param: 'processId',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '工序',
|
||||
// selectOptions: processArr,
|
||||
// param: 'processId',
|
||||
// defaultSelect: '',
|
||||
// filterable: true,
|
||||
// },
|
||||
{
|
||||
type: 'select',
|
||||
label: '库位状态',
|
||||
@ -228,6 +262,15 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
],
|
||||
};
|
||||
},
|
||||
@ -236,17 +279,45 @@ export default {
|
||||
product,
|
||||
outOrMove,
|
||||
},
|
||||
created() {},
|
||||
created() {
|
||||
this.setFormConfig();
|
||||
},
|
||||
methods: {
|
||||
setFormConfig() {
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '排',
|
||||
};
|
||||
this.formConfig[0].selectOptions.push(obj);
|
||||
}
|
||||
for (let i = 1; i <= 30; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '列',
|
||||
};
|
||||
this.formConfig[1].selectOptions.push(obj);
|
||||
}
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '层',
|
||||
};
|
||||
this.formConfig[2].selectOptions.push(obj);
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.warehouseStorehouseName = val.name;
|
||||
this.listQuery.warehouseStorehouseCode = val.code;
|
||||
this.listQuery.wareRow = val.wareRow;
|
||||
this.listQuery.wareColumn = val.wareColumn;
|
||||
this.listQuery.wareLayer = val.wareLayer;
|
||||
this.listQuery.trayCode = val.code;
|
||||
this.listQuery.goodName = val.pname;
|
||||
this.listQuery.goodCode = val.pcode;
|
||||
this.listQuery.rollCode = val.rollCode;
|
||||
this.listQuery.grade = val.quality;
|
||||
this.listQuery.process = val.processId;
|
||||
this.listQuery.warehouseStorehouseState =
|
||||
val.warehouseStorehouseStateId;
|
||||
@ -255,7 +326,7 @@ export default {
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
warehouseId: '1696803324030865409',
|
||||
warehouseId: this.aId,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
@ -280,20 +351,26 @@ export default {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '出库';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id, 0);
|
||||
this.$refs.addOrUpdate.init(val.data.id, 0,this.listQuery.warehouseId);
|
||||
});
|
||||
} else if (val.type === 'move') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '移库';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id, 1,this.listQuery.warehouseId);
|
||||
this.$refs.addOrUpdate.init(val.data.id, 1,this.listQuery.warehouseId,val.data.stacker);
|
||||
});
|
||||
} else if (val.type === 'in') {
|
||||
this.drawerVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.drawerRef.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === 'restore') {
|
||||
} else if (val.type === 'make') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '盘库';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id, false,this.listQuery.warehouseId);
|
||||
});
|
||||
}else if (val.type === 'restore') {
|
||||
const dataForm = {
|
||||
id: val.data.id.id,
|
||||
deactivate: 1,
|
||||
|
@ -30,13 +30,6 @@
|
||||
label="库位编码"></el-table-column>
|
||||
<el-table-column prop="trayCode" label="托盘编码"></el-table-column>
|
||||
<el-table-column prop="process" label="工序" width="110">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.process >= 0 ? processArr[scope.row.process].name : ''
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cacheLocation" label="缓存库位" width="100">
|
||||
<template slot-scope="scope">
|
||||
@ -58,7 +51,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<el-table-column label="操作" width="120">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.deactivate === 1">
|
||||
<el-button
|
||||
@ -66,7 +59,7 @@
|
||||
v-if="scope.row.warehouseStorehouseState === 0"
|
||||
type="text"
|
||||
@click="handleClick({ data: { id: scope.row }, type: 'in' })"
|
||||
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
|
||||
v-hasPermi="['asrs:warehouse-storehouse-storage:in']">
|
||||
入库
|
||||
</el-button>
|
||||
<el-button
|
||||
@ -74,9 +67,17 @@
|
||||
v-if="scope.row.warehouseStorehouseState === 2"
|
||||
type="text"
|
||||
@click="handleClick({ data: scope.row, type: 'out' })"
|
||||
v-hasPermi="['asrs:warehouse-storehouse-storage:update']">
|
||||
v-hasPermi="['asrs:warehouse-storehouse-storage:out']">
|
||||
出库
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="scope.row.warehouseStorehouseState === 2"
|
||||
type="text"
|
||||
@click="handleClick({ data: scope.row, type: 'make' })"
|
||||
v-hasPermi="['asrs:warehouse-storehouse-storage:out']">
|
||||
盘库
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
v-if="scope.row.warehouseStorehouseState === 2"
|
||||
@ -180,21 +181,47 @@ export default {
|
||||
tableData: [],
|
||||
processArr,
|
||||
drawerVisible: false,
|
||||
bPage: true,
|
||||
warehouseStorehouseState,
|
||||
formConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '库位名',
|
||||
placeholder: '库位名',
|
||||
param: 'name',
|
||||
type: 'select',
|
||||
label: '排',
|
||||
selectOptions: [],
|
||||
param: 'wareRow',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '列',
|
||||
selectOptions: [],
|
||||
param: 'wareColumn',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '层',
|
||||
selectOptions: [],
|
||||
param: 'wareLayer',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
width: 100
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '库位编码',
|
||||
placeholder: '库位编码',
|
||||
label: '托盘编码',
|
||||
placeholder: '托盘编码',
|
||||
param: 'code',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '膜卷编码',
|
||||
placeholder: '膜卷编码',
|
||||
param: 'rollCode',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品名',
|
||||
@ -203,18 +230,24 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
label: '产品编码',
|
||||
placeholder: '产品编码',
|
||||
param: 'pcode',
|
||||
label: '品质',
|
||||
placeholder: '品质',
|
||||
param: 'quality',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
type: 'input',
|
||||
label: '工序',
|
||||
selectOptions: processArr,
|
||||
placeholder: '工序',
|
||||
param: 'processId',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '工序',
|
||||
// selectOptions: processArr,
|
||||
// param: 'processId',
|
||||
// defaultSelect: '',
|
||||
// filterable: true,
|
||||
// },
|
||||
{
|
||||
type: 'select',
|
||||
label: '库位状态',
|
||||
@ -229,6 +262,15 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
],
|
||||
};
|
||||
},
|
||||
@ -238,18 +280,45 @@ export default {
|
||||
outOrMove,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
this.listQuery.warehouseId = this.bId
|
||||
this.setFormConfig();
|
||||
},
|
||||
methods: {
|
||||
setFormConfig() {
|
||||
for (let i = 1; i <= 16; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '排',
|
||||
};
|
||||
this.formConfig[0].selectOptions.push(obj);
|
||||
}
|
||||
for (let i = 1; i <= 30; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '列',
|
||||
};
|
||||
this.formConfig[1].selectOptions.push(obj);
|
||||
}
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
name: i + '层',
|
||||
};
|
||||
this.formConfig[2].selectOptions.push(obj);
|
||||
}
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.warehouseStorehouseName = val.name;
|
||||
this.listQuery.warehouseStorehouseCode = val.code;
|
||||
this.listQuery.wareRow = val.wareRow;
|
||||
this.listQuery.wareColumn = val.wareColumn;
|
||||
this.listQuery.wareLayer = val.wareLayer;
|
||||
this.listQuery.trayCode = val.code;
|
||||
this.listQuery.goodName = val.pname;
|
||||
this.listQuery.goodCode = val.pcode;
|
||||
this.listQuery.rollCode = val.rollCode;
|
||||
this.listQuery.grade = val.quality;
|
||||
this.listQuery.process = val.processId;
|
||||
this.listQuery.warehouseStorehouseState =
|
||||
val.warehouseStorehouseStateId;
|
||||
@ -258,6 +327,7 @@ export default {
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
warehouseId: this.bId,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
@ -282,20 +352,26 @@ export default {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '出库';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id, 0);
|
||||
this.$refs.addOrUpdate.init(val.data.id, 0,this.listQuery.warehouseId);
|
||||
});
|
||||
} else if (val.type === 'move') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '移库';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id, 1,this.listQuery.warehouseId);
|
||||
this.$refs.addOrUpdate.init(val.data.id, 1,this.listQuery.warehouseId,val.data.stacker);
|
||||
});
|
||||
} else if (val.type === 'in') {
|
||||
this.drawerVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.drawerRef.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === 'restore') {
|
||||
} else if (val.type === 'make') {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrEditTitle = '盘库';
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id, false,this.listQuery.warehouseId);
|
||||
});
|
||||
}else if (val.type === 'restore') {
|
||||
const dataForm = {
|
||||
id: val.data.id.id,
|
||||
deactivate: 1,
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-11-02 11:15:57
|
||||
* @LastEditTime: 2024-06-04 16:17:07
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -11,72 +11,188 @@
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="150px">
|
||||
label-width="60px">
|
||||
<el-form-item
|
||||
:label="type ? '选择移库位置' : '选择出库到货位置'"
|
||||
v-if="!type"
|
||||
label-width="150px"
|
||||
label="选择到货区域"
|
||||
class="drawer"
|
||||
prop="region">
|
||||
<el-select
|
||||
v-model="dataForm.region"
|
||||
style="width: 100%"
|
||||
@change="getOutArr"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择区域">
|
||||
<el-option
|
||||
v-for="item in regionArr"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="!type"
|
||||
label-width="150px"
|
||||
label="选择到货位置"
|
||||
class="drawer"
|
||||
prop="targetId">
|
||||
<el-select
|
||||
v-model="dataForm.targetId"
|
||||
:disabled="outDisable"
|
||||
style="width: 100%"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择位置">
|
||||
<el-option
|
||||
v-for="item in potArr"
|
||||
:key="item.id"
|
||||
:label="item.warehouseStorehouseName"
|
||||
:label="item.lineEdgeLibraryCode"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<div v-else style="display: flex; justify-content: space-around">
|
||||
<el-form-item label="排" prop="wareRow">
|
||||
<el-select
|
||||
v-model="dataForm.wareRow"
|
||||
style="width: 150px"
|
||||
placeholder="请选择排">
|
||||
<el-option
|
||||
v-for="item in potArr1"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="列" prop="wareColumn">
|
||||
<el-select
|
||||
v-model="dataForm.wareColumn"
|
||||
style="width: 150px"
|
||||
placeholder="请选择列">
|
||||
<el-option
|
||||
v-for="item in potArr2"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="层" prop="wareLayer">
|
||||
<el-select
|
||||
v-model="dataForm.wareLayer"
|
||||
style="width: 150px"
|
||||
placeholder="请选择层">
|
||||
<el-option
|
||||
v-for="item in potArr3"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicAdd from '../mixins/basic-add';
|
||||
import {
|
||||
getWarehouseStorehouseList,
|
||||
getWarehouseStorehousePage,
|
||||
moveStorehouse,
|
||||
outWarehouseStorehouse,
|
||||
getLineList,
|
||||
getWarehouseStorehouse,
|
||||
makeWarehouseStorehouse,
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
import { getWarehouseStorehouseGoodsSpecificationPage } from '@/api/asrs/warehouseStorehouseGoodsSpecification';
|
||||
|
||||
const potArr3 = [
|
||||
{ label: '1层', id: 1 },
|
||||
{ label: '2层', id: 2 },
|
||||
{ label: '3层', id: 3 },
|
||||
{ label: '4层', id: 4 },
|
||||
];
|
||||
const regionArr = [
|
||||
{ name: '一次分切区域1线', id: 1 },
|
||||
{ name: '一次分拣区域', id: 2 },
|
||||
{ name: '二次分切区域', id: 3 },
|
||||
{ name: '二次分拣区域', id: 4 },
|
||||
{ name: '手动包装区域', id: 5 },
|
||||
{ name: '涂覆区域', id: 6 },
|
||||
{ name: '其他', id: 7 },
|
||||
{ name: '自动包装区域', id: 8 },
|
||||
{ name: '一次分切区域2线', id: 9 },
|
||||
{ name: '一次分切区域3线', id: 10 },
|
||||
{ name: '一次分切区域4线', id: 11 },
|
||||
];
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {},
|
||||
warehouseId: null,
|
||||
dataForm: {
|
||||
sourceId: undefined,
|
||||
targetId: undefined,
|
||||
region: undefined,
|
||||
wareRow: undefined,
|
||||
wareColumn: undefined,
|
||||
wareLayer: undefined,
|
||||
},
|
||||
wareInfo: {
|
||||
list:[]
|
||||
},
|
||||
list: [],
|
||||
},
|
||||
potArr: [],
|
||||
potArr1: [],
|
||||
potArr2: [],
|
||||
potArr3,
|
||||
regionArr,
|
||||
type: 0,
|
||||
isloading: false,
|
||||
outDisable: true, //
|
||||
dataRule: {
|
||||
targetId: [
|
||||
{ required: true, message: '位置不能为空', trigger: 'blur' },
|
||||
region: [
|
||||
{ required: true, message: '区域不能为空', trigger: 'change' },
|
||||
],
|
||||
targetId: [
|
||||
{ required: true, message: '位置不能为空', trigger: 'change' },
|
||||
],
|
||||
wareRow: [{ required: true, message: '排不能为空', trigger: 'blur' }],
|
||||
wareColumn: [
|
||||
{ required: true, message: '列不能为空', trigger: 'blur' },
|
||||
],
|
||||
wareLayer: [{ required: true, message: '层不能为空', trigger: 'blur' }],
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init(id, type, wId) {
|
||||
init(id, type, wId, stacker) {
|
||||
this.isloading = false;
|
||||
this.dataForm.sourceId = id || '';
|
||||
this.warehouseId = wId || null;
|
||||
this.dataForm.targetId = null;
|
||||
this.dataForm.region = null;
|
||||
this.type = type;
|
||||
this.outDisable = true;
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
if (this.type) {
|
||||
getWarehouseStorehouseList({ warehouseId: wId,warehouseStorehouseState:0 }).then((response) => {
|
||||
this.potArr = response.data;
|
||||
});
|
||||
this.potArr1.splice(0, this.potArr1.length);
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
const obj = {
|
||||
id: i + (stacker - 1) * 4,
|
||||
label: i + (stacker - 1) * 4 + '排',
|
||||
};
|
||||
this.potArr1.push(obj);
|
||||
}
|
||||
this.potArr2.splice(0, this.potArr2.length);
|
||||
for (let i = 1; i <= 30; i++) {
|
||||
const obj = {
|
||||
id: i,
|
||||
label: i + '列',
|
||||
};
|
||||
this.potArr2.push(obj);
|
||||
}
|
||||
return;
|
||||
}
|
||||
getLineList().then((response) => {
|
||||
this.potArr = response.data;
|
||||
});
|
||||
getWarehouseStorehouse(id).then((response) => {
|
||||
this.wareInfo = response.data;
|
||||
});
|
||||
@ -91,39 +207,75 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
getOutArr(val) {
|
||||
getLineList({ region: val, warehouseId: this.warehouseId }).then(
|
||||
(response) => {
|
||||
this.potArr = response.data;
|
||||
this.outDisable = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
if (this.type) {
|
||||
moveStorehouse(this.dataForm.sourceId, this.dataForm.targetId).then(
|
||||
(response) => {
|
||||
this.$modal.msgSuccess('移库成功');
|
||||
if (!this.isloading) {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
this.isloading = true;
|
||||
if (this.type) {
|
||||
const lQ = {
|
||||
warehouseId: this.warehouseId,
|
||||
wareRow: this.dataForm.wareRow,
|
||||
wareColumn: this.dataForm.wareColumn,
|
||||
wareLayer: this.dataForm.wareLayer,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
};
|
||||
getWarehouseStorehousePage(lQ).then((response) => {
|
||||
if (response.data.list) {
|
||||
this.dataForm.targetId = response.data.list[0].id;
|
||||
moveStorehouse(
|
||||
this.dataForm.sourceId,
|
||||
this.dataForm.targetId
|
||||
).then((response) => {
|
||||
this.$modal.msgSuccess('移库成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
const pos = this.potArr.find((item) => {
|
||||
return item.id === this.dataForm.targetId;
|
||||
});
|
||||
this.wareInfo.agvGroundCode = pos.agvGroundCode;
|
||||
this.wareInfo.lineEdgeLibraryCode = pos.lineEdgeLibraryCode;
|
||||
if (this.type === 0) {
|
||||
outWarehouseStorehouse(this.wareInfo).then((response) => {
|
||||
this.$modal.msgSuccess('出库成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
}
|
||||
);
|
||||
return;
|
||||
}
|
||||
const pos = this.potArr.find((item) => {
|
||||
return item.id === this.dataForm.targetId;
|
||||
});
|
||||
return;
|
||||
}
|
||||
makeWarehouseStorehouse(this.wareInfo).then((response) => {
|
||||
this.$modal.msgSuccess('盘库成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
});
|
||||
this.wareInfo.agvGroundCode = pos.agvGroundCode;
|
||||
this.wareInfo.lineEdgeLibraryCode = pos.lineEdgeLibraryCode;
|
||||
// const data = {
|
||||
// id: this.dataForm.sourceId,
|
||||
// agvGroundCode: position.agvGroundCode,
|
||||
// lineEdgeLibraryCode: position.lineEdgeLibraryCode,
|
||||
// };
|
||||
outWarehouseStorehouse(this.wareInfo).then((response) => {
|
||||
this.$modal.msgSuccess('出库成功');
|
||||
this.visible = false;
|
||||
this.$emit('refreshDataList');
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$modal.msgWarning('请勿重复提交!');
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drawer >>> .el-select-dropdown__item {
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
|
@ -22,22 +22,16 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseName" label="仓库名"></el-table-column>
|
||||
<el-table-column prop="warehouseCode" label="仓库编码"></el-table-column>
|
||||
<el-table-column
|
||||
prop="warehouseStorehouseName"
|
||||
label="库位名"></el-table-column>
|
||||
<el-table-column prop="warehouseStorehouseName" label="库位名" />
|
||||
<el-table-column
|
||||
prop="warehouseStorehouseCode"
|
||||
label="库位编码"></el-table-column>
|
||||
<el-table-column prop="workOrderCode" label="工单编码" />
|
||||
<el-table-column prop="trayCode" label="托盘编码"></el-table-column>
|
||||
<el-table-column prop="process" label="工序" width="110">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.process >= 0 ? processArr[scope.row.process].name : ''
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="process"
|
||||
label="工序"
|
||||
width="110"></el-table-column>
|
||||
<el-table-column prop="createTime" label="出入库时间">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
@ -45,7 +39,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="warehouseStorehouseStorageState"
|
||||
label="出入库状态" width="100">
|
||||
label="出入库状态"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
@ -70,7 +65,10 @@
|
||||
<script>
|
||||
import product from '../product-mini';
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { getWarehouseStorehouseStoragePage } from '@/api/asrs/warehouseStorehouseStorage';
|
||||
import {
|
||||
getWarehouseStorehouseStoragePage,
|
||||
exportWarehouseStorehouseStorageExcel,
|
||||
} from '@/api/asrs/warehouseStorehouseStorage';
|
||||
const warehouseStorehouseStorageState = [
|
||||
{
|
||||
name: '入库',
|
||||
@ -113,6 +111,7 @@ export default {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehouseStorehouseStoragePage,
|
||||
exportURL: exportWarehouseStorehouseStorageExcel,
|
||||
},
|
||||
processArr,
|
||||
tableData: [],
|
||||
@ -138,7 +137,7 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '库位状态',
|
||||
label: '出入库状态',
|
||||
selectOptions: warehouseStorehouseStorageState,
|
||||
param: 'state',
|
||||
defaultSelect: '',
|
||||
@ -149,7 +148,7 @@ export default {
|
||||
label: '出入库时间',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd hh:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
@ -161,15 +160,13 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
@ -186,7 +183,7 @@ export default {
|
||||
this.listQuery.warehouseStorehouseName = val.name;
|
||||
this.listQuery.warehouseStorehouseCode = val.kcode;
|
||||
this.listQuery.trayCode = val.tcode;
|
||||
this.listQuery.warehouseStorehouseStorageState =val.state;
|
||||
this.listQuery.warehouseStorehouseStorageState = val.state;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
@ -207,7 +204,16 @@ export default {
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
this.listQuery.pageNo = undefined;
|
||||
this.listQuery.pageSize = undefined;
|
||||
this.listQuery.warehouseStorehouseName = val.name;
|
||||
this.listQuery.warehouseStorehouseCode = val.kcode;
|
||||
this.listQuery.trayCode = val.tcode;
|
||||
this.listQuery.warehouseStorehouseStorageState = val.state;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
this.handleExport(this.listQuery, '出入库历史信息导出');
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
@ -221,4 +227,11 @@ export default {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
.el-table .warning-row {
|
||||
background: oldlace;
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
background: #f0f9eb;
|
||||
}
|
||||
</style>
|
||||
|
@ -22,22 +22,16 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseName" label="仓库名"></el-table-column>
|
||||
<el-table-column prop="warehouseCode" label="仓库编码"></el-table-column>
|
||||
<el-table-column
|
||||
prop="warehouseStorehouseName"
|
||||
label="库位名"></el-table-column>
|
||||
<el-table-column prop="warehouseStorehouseName" label="库位名" />
|
||||
<el-table-column
|
||||
prop="warehouseStorehouseCode"
|
||||
label="库位编码"></el-table-column>
|
||||
<el-table-column prop="workOrderCode" label="工单编码" />
|
||||
<el-table-column prop="trayCode" label="托盘编码"></el-table-column>
|
||||
<el-table-column prop="process" label="工序">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
scope.row.process >= 0 ? processArr[scope.row.process].name : ''
|
||||
}}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="process"
|
||||
label="工序"
|
||||
width="110"></el-table-column>
|
||||
<el-table-column prop="createTime" label="出入库时间">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
@ -45,7 +39,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="warehouseStorehouseStorageState"
|
||||
label="出入库状态">
|
||||
label="出入库状态"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
{{
|
||||
@ -70,7 +65,10 @@
|
||||
<script>
|
||||
import product from '../product-mini';
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import { getWarehouseStorehouseStoragePage, } from "@/api/asrs/warehouseStorehouseStorage";
|
||||
import {
|
||||
getWarehouseStorehouseStoragePage,
|
||||
exportWarehouseStorehouseStorageExcel,
|
||||
} from '@/api/asrs/warehouseStorehouseStorage';
|
||||
const warehouseStorehouseStorageState = [
|
||||
{
|
||||
name: '入库',
|
||||
@ -113,6 +111,7 @@ export default {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehouseStorehouseStoragePage,
|
||||
exportURL: exportWarehouseStorehouseStorageExcel,
|
||||
},
|
||||
processArr,
|
||||
tableData: [],
|
||||
@ -138,7 +137,7 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '库位状态',
|
||||
label: '出入库状态',
|
||||
selectOptions: warehouseStorehouseStorageState,
|
||||
param: 'state',
|
||||
defaultSelect: '',
|
||||
@ -149,11 +148,11 @@ export default {
|
||||
label: '出入库时间',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd hh:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'searchTime2',
|
||||
param: 'searchTime',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@ -161,15 +160,13 @@ export default {
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
|
||||
// },
|
||||
// {
|
||||
// type: this.$auth.hasPermi('base:factory:export') ? 'button' : '',
|
||||
// btnName: '导出',
|
||||
// name: 'export',
|
||||
// color: 'warning',
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
@ -177,7 +174,7 @@ export default {
|
||||
product,
|
||||
},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
this.listQuery.warehouseId = this.bId
|
||||
},
|
||||
methods: {
|
||||
buttonClick(val) {
|
||||
@ -188,7 +185,7 @@ export default {
|
||||
this.listQuery.warehouseStorehouseName = val.name;
|
||||
this.listQuery.warehouseStorehouseCode = val.kcode;
|
||||
this.listQuery.trayCode = val.tcode;
|
||||
this.listQuery.warehouseStorehouseStorageState =val.state;
|
||||
this.listQuery.warehouseStorehouseStorageState = val.state;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
@ -209,7 +206,16 @@ export default {
|
||||
this.addOrUpdateHandle();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
this.listQuery.pageNo = undefined;
|
||||
this.listQuery.pageSize = undefined;
|
||||
this.listQuery.warehouseStorehouseName = val.name;
|
||||
this.listQuery.warehouseStorehouseCode = val.kcode;
|
||||
this.listQuery.trayCode = val.tcode;
|
||||
this.listQuery.warehouseStorehouseStorageState = val.state;
|
||||
this.listQuery.createTime = val.searchTime;
|
||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : '';
|
||||
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : '';
|
||||
this.handleExport(this.listQuery, '出入库历史信息导出');
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
@ -223,4 +229,11 @@ export default {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
.el-table .warning-row {
|
||||
background: oldlace;
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
background: #f0f9eb;
|
||||
}
|
||||
</style>
|
||||
|
@ -61,7 +61,7 @@ export default {
|
||||
text: '总数',
|
||||
subtext: this.totalNumber,
|
||||
top: '42%', // 控制位置
|
||||
left: '50%', // 控制位置
|
||||
left: '40%', // 控制位置
|
||||
textAlign: 'center', // 让文字居中
|
||||
textStyle: {
|
||||
color: 'rgba(203, 195, 195, 1)',
|
||||
@ -75,60 +75,26 @@ export default {
|
||||
show: true, // 控制鼠标悬浮是否显示数据
|
||||
formatter: '产品: {b}<br/>数量: {c}<br/>占比: {d}%',
|
||||
},
|
||||
// legend: {
|
||||
// orient: 'vartical',
|
||||
// top: 'center',
|
||||
// left: 'right',
|
||||
// icon: 'circle',
|
||||
// itemGap: 16, //图例每项之间的间隔
|
||||
// textStyle: {
|
||||
// // 文字的样式
|
||||
// fontSize: 24, // 可控制每个legend项的间距
|
||||
// color: '#828282',
|
||||
// rich: {
|
||||
// oneone: {
|
||||
// width: 50,
|
||||
// color: '#000000',
|
||||
// fontSize: 12,
|
||||
// fontWeight: 'bolder',
|
||||
// },
|
||||
// twotwo: {
|
||||
// width: 35,
|
||||
// color: '#333',
|
||||
// fontSize: 12,
|
||||
// },
|
||||
// threethree: {
|
||||
// width: 20,
|
||||
// color: '#959595',
|
||||
// fontSize: 12,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// formatter: (name) => {
|
||||
// var target = this.pieData.find((item) => {
|
||||
// return item.name === name;
|
||||
// }).number;
|
||||
// var v = ((target / this.totalNumber) * 100).toFixed(2);
|
||||
// return `{oneone|${name}} {twotwo|${target}个} {threethree|${v}%}`;
|
||||
// },
|
||||
// },
|
||||
|
||||
legend: {
|
||||
bottom: '0%',
|
||||
left: 'center',
|
||||
type: 'scroll',
|
||||
orient: 'vertical',
|
||||
right: 10,
|
||||
top: 20,
|
||||
bottom: 20,
|
||||
},
|
||||
grid: {
|
||||
top: 40,
|
||||
left: '2%',
|
||||
right: '2%',
|
||||
bottom: '3%',
|
||||
bottom: '0%',
|
||||
containLabel: true,
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: 'pie',
|
||||
type: 'pie',
|
||||
radius: ['55%', '80%'],
|
||||
radius: ['45%', '70%'],
|
||||
center: ['40%', '50%'],
|
||||
avoidLabelOverlap: true, // 防止牵引线堆叠挤在一块
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
|
@ -15,7 +15,7 @@
|
||||
<el-col :span="23">
|
||||
<pieChart
|
||||
ref="pieChart"
|
||||
height="600px"
|
||||
height="650px"
|
||||
v-if="tableData.totalNumber"
|
||||
:total-number="tableData.totalNumber"
|
||||
:pie-data="tableData.list" />
|
||||
|
@ -110,7 +110,7 @@ export default {
|
||||
label: '出入库时间',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd hh:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-21 14:26:23
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-20 16:36:31
|
||||
* @LastEditTime: 2024-08-19 09:38:57
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -12,25 +12,48 @@
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#FFA08F" style="border: none">锁</el-tag>
|
||||
<el-tag
|
||||
effect="dark"
|
||||
color="#16DC09"
|
||||
style="border: none">
|
||||
满
|
||||
</el-tag>
|
||||
<el-tag effect="dark" color="#d3d3d3" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#ff0000" style="border: none">不可用</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<div v-for="i in listQuery.total" :key="i" class="div-row">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="a in wareData.slice((i - 1) * 20, i * 20)"
|
||||
:key="a.id + a.finishProductCode"
|
||||
:title="a.finishProductName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[a.finishProductWarehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ a.finishProductName }}</p>
|
||||
v-for="j in wareData.slice((i - 1) * 30, i * 30)"
|
||||
:key="j.id + j.finishProductCode"
|
||||
:title="j.finishProductName">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.finishProductName"
|
||||
width="200"
|
||||
trigger="hover">
|
||||
库位状态:
|
||||
{{
|
||||
j.deactivate === 1
|
||||
? ['空', '满'][j.finishProductWarehouseState]
|
||||
: '不可用'
|
||||
}}
|
||||
<div
|
||||
slot="reference"
|
||||
class="hoverDiv"
|
||||
:style="{
|
||||
cursor:
|
||||
j.deactivate === 0 || j.finishProductWarehouseState === 1
|
||||
? 'not-allowed'
|
||||
: 'pointer',
|
||||
background:
|
||||
j.deactivate === 1
|
||||
? bgColor[j.finishProductWarehouseState]
|
||||
: '#ff0000',
|
||||
}" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -53,29 +76,28 @@ export default {
|
||||
exportURL: exportFinishProductWarehouseExcel,
|
||||
},
|
||||
listQuery: {
|
||||
wareLayer: 1,
|
||||
total: 0,
|
||||
},
|
||||
wareData: [],
|
||||
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
|
||||
bgColor: ['#d3d3d3', '#16DC09'], //空,满
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择层',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '1' },
|
||||
{ id: 2, name: '2' },
|
||||
{ id: 3, name: '3' },
|
||||
{ id: 4, name: '4' },
|
||||
],
|
||||
param: 'value',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '选择层',
|
||||
// selectOptions: [
|
||||
// { id: 1, name: '1' },
|
||||
// { id: 2, name: '2' },
|
||||
// { id: 3, name: '3' },
|
||||
// { id: 4, name: '4' },
|
||||
// ],
|
||||
// param: 'value',
|
||||
// filterable: true,
|
||||
// defaultSelect: 1,
|
||||
// clearable: false,
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
btnName: '刷新',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
@ -98,14 +120,13 @@ export default {
|
||||
this.wareData = [],
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.wareData = response.data
|
||||
this.listQuery.total = Math.ceil(response.data.length / 20);
|
||||
this.listQuery.total = Math.ceil(response.data.length / 30);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.wareLayer = val.value;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
@ -122,8 +143,11 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.mainbody {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
min-width: 80vw;
|
||||
border-radius: 5px;
|
||||
padding-top: 25px;
|
||||
}
|
||||
.flex-warp {
|
||||
flex-wrap: nowrap;
|
||||
@ -134,36 +158,12 @@ export default {
|
||||
}
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
height: 40px;
|
||||
box-shadow: 1px 1px 4px 1px rgba(166, 174, 190, 0.8);
|
||||
border-radius: 4px;
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: #d3d3d3;
|
||||
border-radius: 2px;
|
||||
margin: 0 6px 8px 0;
|
||||
position: relative;
|
||||
.dashboard-layout-item-cricle {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
left: 24px;
|
||||
}
|
||||
.p-name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
transform: scale(1.3) translateZ(0);
|
||||
}
|
||||
&:nth-child(2n) {
|
||||
margin-right: 18px;
|
||||
}
|
||||
@ -174,6 +174,14 @@ export default {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
.hoverDiv {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
&:hover {
|
||||
border: 1px #000000 dashed;
|
||||
transform: scale(1.3);
|
||||
}
|
||||
}
|
||||
.tips {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-17 15:10:53
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-10 11:00:56
|
||||
* @LastEditTime: 2024-04-29 14:23:14
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
|
@ -1,81 +1,138 @@
|
||||
<template xmlns="">
|
||||
<div class="container">
|
||||
<div class="logo"></div>
|
||||
<!-- 登录区域 -->
|
||||
<div class="content">
|
||||
<!-- 配图 -->
|
||||
<div class="pic"></div>
|
||||
<!-- 表单 -->
|
||||
<div class="field">
|
||||
<!-- [移动端]标题 -->
|
||||
<h2 class="mobile-title">
|
||||
<h3 class="title">芋道后台管理系统</h3>
|
||||
</h2>
|
||||
<div class="container">
|
||||
<div class="logo"></div>
|
||||
<!-- 登录区域 -->
|
||||
<div class="content">
|
||||
<!-- 配图 -->
|
||||
<div class="pic"></div>
|
||||
<!-- 表单 -->
|
||||
<div class="field">
|
||||
<!-- [移动端]标题 -->
|
||||
<h2 class="mobile-title">
|
||||
<h3 class="title">芋道后台管理系统</h3>
|
||||
</h2>
|
||||
|
||||
<!-- 表单 -->
|
||||
<div class="form-cont">
|
||||
<el-tabs class="form" v-model="loginForm.loginType" style=" float:none;">
|
||||
<el-tab-pane label="账号密码登录" name="uname">
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="短信验证码登录" name="sms">
|
||||
<!-- 表单 -->
|
||||
<div class="form-cont">
|
||||
<el-tabs
|
||||
class="form"
|
||||
v-model="loginForm.loginType"
|
||||
style="float: none">
|
||||
<el-tab-pane label="账号密码登录" name="uname"></el-tab-pane>
|
||||
<!-- <el-tab-pane label="短信验证码登录" name="sms">
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
<div>
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form">
|
||||
<el-form-item prop="tenantName" v-if="tenantEnable">
|
||||
<el-input v-model="loginForm.tenantName" type="text" auto-complete="off" placeholder='租户'>
|
||||
<svg-icon slot="prefix" icon-class="tree" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- 账号密码登录 -->
|
||||
<div v-if="loginForm.loginType === 'uname'">
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
|
||||
@keyup.enter.native="getCode">
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;">记住密码</el-checkbox>
|
||||
</div>
|
||||
</el-tabs>
|
||||
<div>
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
:model="loginForm"
|
||||
:rules="LoginRules"
|
||||
class="login-form">
|
||||
<el-form-item prop="tenantName" v-if="tenantEnable">
|
||||
<el-input
|
||||
v-model="loginForm.tenantName"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="租户">
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="tree"
|
||||
class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<!-- 账号密码登录 -->
|
||||
<div v-if="loginForm.loginType === 'uname'">
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
v-model="loginForm.username"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="账号">
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="user"
|
||||
class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
type="password"
|
||||
auto-complete="off"
|
||||
placeholder="密码"
|
||||
@keyup.enter.native="getCode">
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="password"
|
||||
class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-checkbox
|
||||
v-model="loginForm.rememberMe"
|
||||
style="margin: 0 0 25px 0">
|
||||
记住密码
|
||||
</el-checkbox>
|
||||
</div>
|
||||
|
||||
<!-- 短信验证码登录 -->
|
||||
<div v-if="loginForm.loginType === 'sms'">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input v-model="loginForm.mobile" type="text" auto-complete="off" placeholder="请输入手机号">
|
||||
<svg-icon slot="prefix" icon-class="phone" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="mobileCode">
|
||||
<el-input v-model="loginForm.mobileCode" type="text" auto-complete="off" placeholder="短信验证码"
|
||||
class="sms-login-mobile-code-prefix" @keyup.enter.native="handleLogin">
|
||||
<template>
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</template>
|
||||
<template slot="append">
|
||||
<span v-if="mobileCodeTimer <= 0" class="getMobileCode" @click="getSmsCode"
|
||||
style="cursor: pointer;">获取验证码</span>
|
||||
<span v-if="mobileCodeTimer > 0" class="getMobileCode">{{ mobileCodeTimer }}秒后可重新获取</span>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!-- 短信验证码登录 -->
|
||||
<div v-if="loginForm.loginType === 'sms'">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input
|
||||
v-model="loginForm.mobile"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="请输入手机号">
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="phone"
|
||||
class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="mobileCode">
|
||||
<el-input
|
||||
v-model="loginForm.mobileCode"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="短信验证码"
|
||||
class="sms-login-mobile-code-prefix"
|
||||
@keyup.enter.native="handleLogin">
|
||||
<template>
|
||||
<svg-icon
|
||||
slot="prefix"
|
||||
icon-class="password"
|
||||
class="el-input__icon input-icon" />
|
||||
</template>
|
||||
<template slot="append">
|
||||
<span
|
||||
v-if="mobileCodeTimer <= 0"
|
||||
class="getMobileCode"
|
||||
@click="getSmsCode"
|
||||
style="cursor: pointer">
|
||||
获取验证码
|
||||
</span>
|
||||
<span v-if="mobileCodeTimer > 0" class="getMobileCode">
|
||||
{{ mobileCodeTimer }}秒后可重新获取
|
||||
</span>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<!-- 下方的登录按钮 -->
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button :loading="loading" size="medium" type="primary" style="width:100%;"
|
||||
@click.native.prevent="getCode">
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<!-- 下方的登录按钮 -->
|
||||
<el-form-item style="width: 100%">
|
||||
<el-button
|
||||
:loading="loading"
|
||||
size="medium"
|
||||
type="primary"
|
||||
style="width: 100%"
|
||||
@click.native.prevent="getCode">
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 社交登录 -->
|
||||
<!-- <el-form-item style="width:100%;">
|
||||
<!-- 社交登录 -->
|
||||
<!-- <el-form-item style="width:100%;">
|
||||
<div class="oauth-login" style="display:flex">
|
||||
<div class="oauth-login-item" v-for="item in SysUserSocialTypeEnum" :key="item.type" @click="doSocialLogin(item)">
|
||||
<img :src="item.img" height="25px" width="25px" alt="登录" >
|
||||
@ -83,267 +140,308 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 图形验证码 -->
|
||||
<Verify ref="verify" :captcha-type="'blockPuzzle'" :img-size="{ width: '400px', height: '200px' }"
|
||||
@success="handleLogin" />
|
||||
<!-- 图形验证码 -->
|
||||
<Verify
|
||||
ref="verify"
|
||||
:captcha-type="'blockPuzzle'"
|
||||
:img-size="{ width: '400px', height: '200px' }"
|
||||
@success="handleLogin" />
|
||||
|
||||
<!-- footer -->
|
||||
<div class="footer">
|
||||
Copyright © 2023 中建材智能自动化院 All Rights Reserved.
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer -->
|
||||
<div class="footer">
|
||||
Copyright © 2023 中建材智能自动化院 All Rights Reserved.
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sendSmsCode, socialAuthRedirect } from "@/api/login";
|
||||
import { getTenantIdByName } from "@/api/system/tenant";
|
||||
import { SystemUserSocialTypeEnum } from "@/utils/constants";
|
||||
import { getCaptchaEnable, getTenantEnable } from "@/utils/ruoyi";
|
||||
import { sendSmsCode, socialAuthRedirect } from '@/api/login';
|
||||
import { getTenantIdByName } from '@/api/system/tenant';
|
||||
import { SystemUserSocialTypeEnum } from '@/utils/constants';
|
||||
import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi';
|
||||
import {
|
||||
getPassword,
|
||||
getRememberMe, getTenantName,
|
||||
getUsername,
|
||||
removePassword, removeRememberMe, removeTenantName,
|
||||
removeUsername,
|
||||
setPassword, setRememberMe, setTenantId, setTenantName,
|
||||
setUsername
|
||||
} from "@/utils/auth";
|
||||
getPassword,
|
||||
getRememberMe,
|
||||
getTenantName,
|
||||
getUsername,
|
||||
removePassword,
|
||||
removeRememberMe,
|
||||
removeTenantName,
|
||||
removeUsername,
|
||||
setPassword,
|
||||
setRememberMe,
|
||||
setTenantId,
|
||||
setTenantName,
|
||||
setUsername,
|
||||
} from '@/utils/auth';
|
||||
|
||||
import Verify from '@/components/Verifition/Verify';
|
||||
import { resetUserPwd } from "@/api/system/user";
|
||||
import { resetUserPwd } from '@/api/system/user';
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
components: {
|
||||
Verify
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
codeUrl: "",
|
||||
captchaEnable: true,
|
||||
tenantEnable: true,
|
||||
mobileCodeTimer: 0,
|
||||
loginForm: {
|
||||
loginType: "uname",
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
captchaVerification: "",
|
||||
mobile: "",
|
||||
mobileCode: "",
|
||||
rememberMe: false,
|
||||
tenantName: "芋道源码",
|
||||
},
|
||||
scene: 21,
|
||||
name: 'Login',
|
||||
components: {
|
||||
Verify,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
codeUrl: '',
|
||||
captchaEnable: true,
|
||||
tenantEnable: true,
|
||||
mobileCodeTimer: 0,
|
||||
loginForm: {
|
||||
loginType: 'uname',
|
||||
username: '',
|
||||
password: '',
|
||||
captchaVerification: '',
|
||||
mobile: '',
|
||||
mobileCode: '',
|
||||
rememberMe: false,
|
||||
tenantName: '芋道源码',
|
||||
},
|
||||
scene: 21,
|
||||
|
||||
LoginRules: {
|
||||
username: [
|
||||
{ required: true, trigger: "blur", message: "用户名不能为空" }
|
||||
],
|
||||
password: [
|
||||
{ required: true, trigger: "blur", message: "密码不能为空" }
|
||||
],
|
||||
mobile: [
|
||||
{ required: true, trigger: "blur", message: "手机号不能为空" },
|
||||
{
|
||||
validator: function (rule, value, callback) {
|
||||
if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
|
||||
callback(new Error("手机号格式错误"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, trigger: "blur"
|
||||
}
|
||||
],
|
||||
tenantName: [
|
||||
{ required: true, trigger: "blur", message: "租户不能为空" },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
// debugger
|
||||
getTenantIdByName(value).then(res => {
|
||||
const tenantId = res.data;
|
||||
if (tenantId && tenantId >= 0) {
|
||||
// 设置租户
|
||||
setTenantId(tenantId)
|
||||
callback();
|
||||
} else {
|
||||
callback('租户不存在');
|
||||
}
|
||||
});
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
},
|
||||
loading: false,
|
||||
redirect: undefined,
|
||||
// 枚举
|
||||
SysUserSocialTypeEnum: SystemUserSocialTypeEnum,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// 租户开关
|
||||
this.tenantEnable = getTenantEnable();
|
||||
if (this.tenantEnable) {
|
||||
getTenantIdByName(this.loginForm.tenantName).then(res => { // 设置租户
|
||||
const tenantId = res.data;
|
||||
if (tenantId && tenantId >= 0) {
|
||||
setTenantId(tenantId)
|
||||
}
|
||||
});
|
||||
}
|
||||
// 验证码开关
|
||||
this.captchaEnable = getCaptchaEnable();
|
||||
// 重定向地址
|
||||
this.redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : undefined;
|
||||
this.getCookie();
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
this.captchaEnable = false
|
||||
// 情况一,未开启:则直接登录
|
||||
if (!this.captchaEnable) {
|
||||
this.handleLogin({})
|
||||
return;
|
||||
}
|
||||
LoginRules: {
|
||||
username: [
|
||||
{ required: true, trigger: 'blur', message: '用户名不能为空' },
|
||||
],
|
||||
password: [
|
||||
{ required: true, trigger: 'blur', message: '密码不能为空' },
|
||||
],
|
||||
mobile: [
|
||||
{ required: true, trigger: 'blur', message: '手机号不能为空' },
|
||||
{
|
||||
validator: function (rule, value, callback) {
|
||||
if (
|
||||
/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(
|
||||
value
|
||||
) === false
|
||||
) {
|
||||
callback(new Error('手机号格式错误'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
},
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
tenantName: [
|
||||
{ required: true, trigger: 'blur', message: '租户不能为空' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
// debugger
|
||||
getTenantIdByName(value).then((res) => {
|
||||
const tenantId = res.data;
|
||||
if (tenantId && tenantId >= 0) {
|
||||
// 设置租户
|
||||
setTenantId(tenantId);
|
||||
callback();
|
||||
} else {
|
||||
callback('租户不存在');
|
||||
}
|
||||
});
|
||||
},
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
loading: false,
|
||||
redirect: undefined,
|
||||
// 枚举
|
||||
SysUserSocialTypeEnum: SystemUserSocialTypeEnum,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// 租户开关
|
||||
this.tenantEnable = getTenantEnable();
|
||||
if (this.tenantEnable) {
|
||||
getTenantIdByName(this.loginForm.tenantName).then((res) => {
|
||||
// 设置租户
|
||||
const tenantId = res.data;
|
||||
if (tenantId && tenantId >= 0) {
|
||||
setTenantId(tenantId);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 验证码开关
|
||||
this.captchaEnable = getCaptchaEnable();
|
||||
// 重定向地址
|
||||
this.redirect = this.$route.query.redirect
|
||||
? decodeURIComponent(this.$route.query.redirect)
|
||||
: undefined;
|
||||
this.getCookie();
|
||||
},
|
||||
methods: {
|
||||
getCode() {
|
||||
this.captchaEnable = false;
|
||||
// 情况一,未开启:则直接登录
|
||||
if (!this.captchaEnable) {
|
||||
this.handleLogin({});
|
||||
return;
|
||||
}
|
||||
|
||||
// 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录
|
||||
// 弹出验证码
|
||||
this.$refs.verify.show()
|
||||
},
|
||||
getCookie() {
|
||||
const username = getUsername();
|
||||
const password = getPassword();
|
||||
const rememberMe = getRememberMe();
|
||||
const tenantName = getTenantName();
|
||||
this.loginForm = {
|
||||
...this.loginForm,
|
||||
username: username ? username : this.loginForm.username,
|
||||
password: password ? password : this.loginForm.password,
|
||||
rememberMe: rememberMe ? getRememberMe() : false,
|
||||
tenantName: tenantName ? tenantName : this.loginForm.tenantName,
|
||||
};
|
||||
},
|
||||
handleLogin(captchaParams) {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
// 设置 Cookie
|
||||
if (this.loginForm.rememberMe) {
|
||||
setUsername(this.loginForm.username)
|
||||
setPassword(this.loginForm.password)
|
||||
setRememberMe(this.loginForm.rememberMe)
|
||||
setTenantName(this.loginForm.tenantName)
|
||||
} else {
|
||||
removeUsername()
|
||||
removePassword()
|
||||
removeRememberMe()
|
||||
removeTenantName()
|
||||
}
|
||||
this.loginForm.captchaVerification = captchaParams.captchaVerification
|
||||
// 发起登陆
|
||||
// console.log("发起登录", this.loginForm);
|
||||
this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => {
|
||||
console.log(this.redirect)
|
||||
this.$router.push({ path: "/" }).catch(() => {
|
||||
});
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
async doSocialLogin(socialTypeEnum) {
|
||||
// 设置登录中
|
||||
this.loading = true;
|
||||
let tenant = false;
|
||||
if (this.tenantEnable) {
|
||||
await this.$prompt('请输入租户名称', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(async ({ value }) => {
|
||||
await getTenantIdByName(value).then(res => {
|
||||
const tenantId = res.data;
|
||||
tenant = true
|
||||
if (tenantId && tenantId >= 0) {
|
||||
setTenantId(tenantId)
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
// 取消登录按钮 loading状态
|
||||
this.loading = false;
|
||||
// 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录
|
||||
// 弹出验证码
|
||||
this.$refs.verify.show();
|
||||
},
|
||||
getCookie() {
|
||||
const username = getUsername();
|
||||
const password = getPassword();
|
||||
const rememberMe = getRememberMe();
|
||||
const tenantName = getTenantName();
|
||||
this.loginForm = {
|
||||
...this.loginForm,
|
||||
username: username ? username : this.loginForm.username,
|
||||
password: password ? password : this.loginForm.password,
|
||||
rememberMe: rememberMe ? getRememberMe() : false,
|
||||
tenantName: tenantName ? tenantName : this.loginForm.tenantName,
|
||||
};
|
||||
},
|
||||
handleLogin(captchaParams) {
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
// 设置 Cookie
|
||||
if (this.loginForm.rememberMe) {
|
||||
setUsername(this.loginForm.username);
|
||||
setPassword(this.loginForm.password);
|
||||
setRememberMe(this.loginForm.rememberMe);
|
||||
setTenantName(this.loginForm.tenantName);
|
||||
} else {
|
||||
removeUsername();
|
||||
removePassword();
|
||||
removeRememberMe();
|
||||
removeTenantName();
|
||||
}
|
||||
this.loginForm.captchaVerification =
|
||||
captchaParams.captchaVerification;
|
||||
// 发起登陆
|
||||
// console.log("发起登录", this.loginForm);
|
||||
this.$store
|
||||
.dispatch(
|
||||
this.loginForm.loginType === 'sms' ? 'SmsLogin' : 'Login',
|
||||
this.loginForm
|
||||
)
|
||||
.then(() => {
|
||||
console.log(this.redirect);
|
||||
this.$store.dispatch('tagsView/delAllVisitedViews');
|
||||
this.$router.push({ path: '/' }).catch(() => {});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
async doSocialLogin(socialTypeEnum) {
|
||||
// 设置登录中
|
||||
this.loading = true;
|
||||
let tenant = false;
|
||||
if (this.tenantEnable) {
|
||||
await this.$prompt('请输入租户名称', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
})
|
||||
.then(async ({ value }) => {
|
||||
await getTenantIdByName(value).then((res) => {
|
||||
const tenantId = res.data;
|
||||
tenant = true;
|
||||
if (tenantId && tenantId >= 0) {
|
||||
setTenantId(tenantId);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
// 取消登录按钮 loading状态
|
||||
this.loading = false;
|
||||
|
||||
return false
|
||||
});
|
||||
} else {
|
||||
tenant = true
|
||||
}
|
||||
if (tenant) {
|
||||
// 计算 redirectUri
|
||||
const redirectUri = location.origin + '/social-login?'
|
||||
+ encodeURIComponent('type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/")); // 重定向不能丢
|
||||
// const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
|
||||
// const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
|
||||
// 进行跳转
|
||||
socialAuthRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => {
|
||||
// console.log(res.url);
|
||||
window.location.href = res.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
/** ========== 以下为升级短信登录 ========== */
|
||||
getSmsCode() {
|
||||
if (this.mobileCodeTimer > 0) return;
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (!valid) return;
|
||||
sendSmsCode(this.loginForm.mobile, this.scene, this.loginForm.uuid, this.loginForm.code).then(res => {
|
||||
this.$modal.msgSuccess("获取验证码成功")
|
||||
this.mobileCodeTimer = 60;
|
||||
let msgTimer = setInterval(() => {
|
||||
this.mobileCodeTimer = this.mobileCodeTimer - 1;
|
||||
if (this.mobileCodeTimer <= 0) {
|
||||
clearInterval(msgTimer);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
tenant = true;
|
||||
}
|
||||
if (tenant) {
|
||||
// 计算 redirectUri
|
||||
const redirectUri =
|
||||
location.origin +
|
||||
'/social-login?' +
|
||||
encodeURIComponent(
|
||||
'type=' +
|
||||
socialTypeEnum.type +
|
||||
'&redirect=' +
|
||||
(this.redirect || '/')
|
||||
); // 重定向不能丢
|
||||
// const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
|
||||
// const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
|
||||
// 进行跳转
|
||||
socialAuthRedirect(
|
||||
socialTypeEnum.type,
|
||||
encodeURIComponent(redirectUri)
|
||||
).then((res) => {
|
||||
// console.log(res.url);
|
||||
window.location.href = res.data;
|
||||
});
|
||||
}
|
||||
},
|
||||
/** ========== 以下为升级短信登录 ========== */
|
||||
getSmsCode() {
|
||||
if (this.mobileCodeTimer > 0) return;
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
sendSmsCode(
|
||||
this.loginForm.mobile,
|
||||
this.scene,
|
||||
this.loginForm.uuid,
|
||||
this.loginForm.code
|
||||
).then((res) => {
|
||||
this.$modal.msgSuccess('获取验证码成功');
|
||||
this.mobileCodeTimer = 60;
|
||||
let msgTimer = setInterval(() => {
|
||||
this.mobileCodeTimer = this.mobileCodeTimer - 1;
|
||||
if (this.mobileCodeTimer <= 0) {
|
||||
clearInterval(msgTimer);
|
||||
}
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/assets/styles/login.scss";
|
||||
|
||||
@import '~@/assets/styles/login.scss';
|
||||
|
||||
.oauth-login {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.oauth-login-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.oauth-login-item img {
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.oauth-login-item span:hover {
|
||||
text-decoration: underline red;
|
||||
color: red;
|
||||
text-decoration: underline red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.sms-login-mobile-code-prefix {
|
||||
:deep(.el-input__prefix) {
|
||||
top: 22%;
|
||||
}
|
||||
}</style>
|
||||
:deep(.el-input__prefix) {
|
||||
top: 22%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -92,7 +92,7 @@ export default {
|
||||
label: '订单出货日期',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd hh:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
|
@ -47,7 +47,7 @@
|
||||
<dict-tag :type="DICT_TYPE.SYSTEM_ROLE_TYPE" :value="scope.row.type"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="显示顺序" prop="sort" width="100" />
|
||||
<el-table-column label="显示顺序" prop="sort" sortable width="100" />
|
||||
<el-table-column label="状态" align="center" width="100">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)"/>
|
||||
@ -58,6 +58,7 @@
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
@ -482,7 +483,7 @@ export default {
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal.confirm('是否确认导出所有角色数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认导出所有角色数据项?').then(()=> {
|
||||
this.exportLoading = true;
|
||||
return exportRole(queryParams);
|
||||
}).then(response => {
|
||||
|
@ -1,314 +1,460 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<doc-alert title="SaaS 多租户" url="https://doc.iocoder.cn/saas-tenant/" />
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="租户名" prop="name">
|
||||
<el-input v-model="queryParams.name" placeholder="请输入租户名" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contactName">
|
||||
<el-input v-model="queryParams.contactName" placeholder="请输入联系人" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系手机" prop="contactMobile">
|
||||
<el-input v-model="queryParams.contactMobile" placeholder="请输入联系手机" clearable @keyup.enter.native="handleQuery"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="租户状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择租户状态" clearable>
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
|
||||
:key="dict.value" :label="dict.label" :value="dict.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
|
||||
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="app-container">
|
||||
<doc-alert title="SaaS 多租户" url="https://doc.iocoder.cn/saas-tenant/" />
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px">
|
||||
<el-form-item label="租户名" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入租户名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contactName">
|
||||
<el-input
|
||||
v-model="queryParams.contactName"
|
||||
placeholder="请输入联系人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系手机" prop="contactMobile">
|
||||
<el-input
|
||||
v-model="queryParams.contactMobile"
|
||||
placeholder="请输入联系手机"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="租户状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择租户状态"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.createTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||
v-hasPermi="['system:tenant:create']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
||||
v-hasPermi="['system:tenant:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:tenant:create']">
|
||||
新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
:loading="exportLoading"
|
||||
v-hasPermi="['system:tenant:export']">
|
||||
导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="租户编号" align="center" prop="id" />
|
||||
<el-table-column label="租户名" align="center" prop="name" />
|
||||
<el-table-column label="租户套餐" align="center" prop="packageId">
|
||||
<template v-slot="scope">
|
||||
<el-tag v-if="scope.row.packageId === 0" type="danger">系统租户</el-tag>
|
||||
<el-tag v-else> {{getPackageName(scope.row.packageId)}} </el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系人" align="center" prop="contactName" />
|
||||
<el-table-column label="联系手机" align="center" prop="contactMobile" />
|
||||
<el-table-column label="账号额度" align="center" prop="accountCount">
|
||||
<template v-slot="scope">
|
||||
<el-tag> {{scope.row.accountCount}} </el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="过期时间" align="center" prop="expireTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.expireTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="绑定域名" align="center" prop="domain" width="180" />
|
||||
<el-table-column label="租户状态" align="center" prop="status">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:tenant:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:tenant:delete']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"/>
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="list">
|
||||
<el-table-column label="租户编号" align="center" prop="id" />
|
||||
<el-table-column label="租户名" align="center" prop="name" />
|
||||
<el-table-column label="租户套餐" align="center" prop="packageId">
|
||||
<template v-slot="scope">
|
||||
<el-tag v-if="scope.row.packageId === 0" type="danger">
|
||||
系统租户
|
||||
</el-tag>
|
||||
<el-tag v-else>{{ getPackageName(scope.row.packageId) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系人" align="center" prop="contactName" />
|
||||
<el-table-column label="联系手机" align="center" prop="contactMobile" />
|
||||
<el-table-column label="账号额度" align="center" prop="accountCount">
|
||||
<template v-slot="scope">
|
||||
<el-tag>{{ scope.row.accountCount }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="过期时间"
|
||||
align="center"
|
||||
prop="expireTime"
|
||||
width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.expireTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="绑定域名"
|
||||
align="center"
|
||||
prop="domain"
|
||||
width="180" />
|
||||
<el-table-column label="租户状态" align="center" prop="status">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:tenant:update']">
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:tenant:delete']">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="租户名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入租户名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="租户套餐" prop="packageId">
|
||||
<el-select v-model="form.packageId" placeholder="请选择租户套餐" clearable size="small">
|
||||
<el-option v-for="item in packageList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contactName">
|
||||
<el-input v-model="form.contactName" placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系手机" prop="contactMobile">
|
||||
<el-input v-model="form.contactMobile" placeholder="请输入联系手机" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.id === undefined" label="用户名称" prop="username">
|
||||
<el-input v-model="form.username" placeholder="请输入用户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.id === undefined" label="用户密码" prop="password">
|
||||
<el-input v-model="form.password" placeholder="请输入用户密码" type="password" show-password />
|
||||
</el-form-item>
|
||||
<el-form-item label="账号额度" prop="accountCount">
|
||||
<el-input-number v-model="form.accountCount" placeholder="请输入账号额度" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="过期时间" prop="expireTime">
|
||||
<el-date-picker clearable size="small" v-model="form.expireTime" type="date"
|
||||
value-format="timestamp" placeholder="请选择过期时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="绑定域名" prop="domain">
|
||||
<el-input v-model="form.domain" placeholder="请输入绑定域名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="租户状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
|
||||
:key="dict.value" :label="parseInt(dict.value)">{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="租户名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入租户名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="租户套餐" prop="packageId">
|
||||
<el-select
|
||||
v-model="form.packageId"
|
||||
placeholder="请选择租户套餐"
|
||||
clearable
|
||||
size="small">
|
||||
<el-option
|
||||
v-for="item in packageList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contactName">
|
||||
<el-input v-model="form.contactName" placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系手机" prop="contactMobile">
|
||||
<el-input v-model="form.contactMobile" placeholder="请输入联系手机" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.id === undefined"
|
||||
label="用户名称"
|
||||
prop="username">
|
||||
<el-input v-model="form.username" placeholder="请输入用户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.id === undefined"
|
||||
label="用户密码"
|
||||
prop="password">
|
||||
<el-input
|
||||
v-model="form.password"
|
||||
placeholder="请输入用户密码"
|
||||
type="password"
|
||||
show-password />
|
||||
</el-form-item>
|
||||
<el-form-item label="账号额度" prop="accountCount">
|
||||
<el-input-number
|
||||
v-model="form.accountCount"
|
||||
placeholder="请输入账号额度"
|
||||
controls-position="right"
|
||||
:min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="过期时间" prop="expireTime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
v-model="form.expireTime"
|
||||
type="date"
|
||||
value-format="timestamp"
|
||||
placeholder="请选择过期时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="绑定域名" prop="domain">
|
||||
<el-input v-model="form.domain" placeholder="请输入绑定域名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="租户状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
|
||||
:key="dict.value"
|
||||
:label="parseInt(dict.value)">
|
||||
{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { createTenant, updateTenant, deleteTenant, getTenant, getTenantPage, exportTenantExcel } from "@/api/system/tenant";
|
||||
import { CommonStatusEnum } from '@/utils/constants'
|
||||
import {getTenantPackageList} from "@/api/system/tenantPackage";
|
||||
import {
|
||||
createTenant,
|
||||
updateTenant,
|
||||
deleteTenant,
|
||||
getTenant,
|
||||
getTenantPage,
|
||||
exportTenantExcel,
|
||||
} from '@/api/system/tenant';
|
||||
import { CommonStatusEnum } from '@/utils/constants';
|
||||
import { getTenantPackageList } from '@/api/system/tenantPackage';
|
||||
|
||||
export default {
|
||||
name: "SystemTenant",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 租户列表
|
||||
list: [],
|
||||
// 租户套餐列表
|
||||
packageList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
contactName: null,
|
||||
contactMobile: null,
|
||||
status: undefined,
|
||||
createTime: []
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [{ required: true, message: "租户名不能为空", trigger: "blur" }],
|
||||
packageId: [{ required: true, message: "租户套餐不能为空", trigger: "blur" }],
|
||||
contactName: [{ required: true, message: "联系人不能为空", trigger: "blur" }],
|
||||
status: [{ required: true, message: "租户状态不能为空", trigger: "blur" }],
|
||||
accountCount: [{ required: true, message: "账号额度不能为空", trigger: "blur" }],
|
||||
expireTime: [{ required: true, message: "过期时间不能为空", trigger: "blur" }],
|
||||
domain: [{ required: true, message: "绑定域名不能为空", trigger: "blur" }],
|
||||
username: [{ required: true, message: "用户名称不能为空", trigger: "blur" }],
|
||||
password: [{ required: true, message: "用户密码不能为空", trigger: "blur" }],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
// 获得租户套餐列表
|
||||
getTenantPackageList().then(response => {
|
||||
this.packageList = response.data;
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
getTenantPage(this.queryParams).then(response => {
|
||||
this.list = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 取消按钮 */
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
packageId: undefined,
|
||||
contactName: undefined,
|
||||
contactMobile: undefined,
|
||||
accountCount: undefined,
|
||||
expireTime: undefined,
|
||||
domain: undefined,
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加租户";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id;
|
||||
getTenant(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改租户";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.form.id != null) {
|
||||
updateTenant(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
createTenant(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const id = row.id;
|
||||
this.$modal.confirm('是否确认删除租户编号为"' + id + '"的数据项?').then(function() {
|
||||
return deleteTenant(id);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = {...this.queryParams};
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
// 执行导出
|
||||
this.$modal.confirm('是否确认导出所有租户数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportTenantExcel(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '租户.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 套餐名格式化 */
|
||||
getPackageName(packageId) {
|
||||
for (const item of this.packageList) {
|
||||
if (item.id === packageId) {
|
||||
return item.name;
|
||||
}
|
||||
}
|
||||
return '未知套餐';
|
||||
}
|
||||
}
|
||||
name: 'SystemTenant',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 租户列表
|
||||
list: [],
|
||||
// 租户套餐列表
|
||||
packageList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
contactName: null,
|
||||
contactMobile: null,
|
||||
status: undefined,
|
||||
createTime: [],
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [{ required: true, message: '租户名不能为空', trigger: 'blur' }],
|
||||
packageId: [
|
||||
{ required: true, message: '租户套餐不能为空', trigger: 'blur' },
|
||||
],
|
||||
contactName: [
|
||||
{ required: true, message: '联系人不能为空', trigger: 'blur' },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '租户状态不能为空', trigger: 'blur' },
|
||||
],
|
||||
accountCount: [
|
||||
{ required: true, message: '账号额度不能为空', trigger: 'blur' },
|
||||
],
|
||||
expireTime: [
|
||||
{ required: true, message: '过期时间不能为空', trigger: 'blur' },
|
||||
],
|
||||
domain: [
|
||||
{ required: true, message: '绑定域名不能为空', trigger: 'blur' },
|
||||
],
|
||||
username: [
|
||||
{ required: true, message: '用户名称不能为空', trigger: 'blur' },
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: '用户密码不能为空', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
// 获得租户套餐列表
|
||||
getTenantPackageList().then((response) => {
|
||||
this.packageList = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
getTenantPage(this.queryParams).then((response) => {
|
||||
this.list = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 取消按钮 */
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
packageId: undefined,
|
||||
contactName: undefined,
|
||||
contactMobile: undefined,
|
||||
accountCount: undefined,
|
||||
expireTime: undefined,
|
||||
domain: undefined,
|
||||
status: CommonStatusEnum.ENABLE,
|
||||
};
|
||||
this.resetForm('form');
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm');
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.$nextTick(() => {
|
||||
this.open = true;
|
||||
this.title = '添加租户';
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id;
|
||||
getTenant(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = '修改租户';
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.form.id != null) {
|
||||
updateTenant(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
createTenant(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const id = row.id;
|
||||
this.$modal
|
||||
.confirm('是否确认删除租户编号为"' + id + '"的数据项?')
|
||||
.then(function () {
|
||||
return deleteTenant(id);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess('删除成功');
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.queryParams };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
// 执行导出
|
||||
this.$modal
|
||||
.confirm('是否确认导出所有租户数据项?')
|
||||
.then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportTenantExcel(params);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.excel(response, '租户.xls');
|
||||
this.exportLoading = false;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 套餐名格式化 */
|
||||
getPackageName(packageId) {
|
||||
for (const item of this.packageList) {
|
||||
if (item.id === packageId) {
|
||||
return item.name;
|
||||
}
|
||||
}
|
||||
return '未知套餐';
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user