Compare commits
21 Commits
31bafae4aa
...
projects/s
| Author | SHA1 | Date | |
|---|---|---|---|
| 8226b45a03 | |||
| dde04cf93f | |||
| 63a67e58de | |||
| 48e9f70625 | |||
| f5f250cb16 | |||
| b6241fe7c4 | |||
| 94edd04a08 | |||
| b926559a7d | |||
| b2984ed4cf | |||
|
|
4ade2dfcdc | ||
|
|
852a3f17a0 | ||
| cba14b1f61 | |||
|
|
33c00785df | ||
|
|
d8acff21e3 | ||
|
|
c0a38c568f | ||
| be86cbd9b3 | |||
| 6a8a9ed28d | |||
| a2213f4f7e | |||
| 0e1e813dc2 | |||
| c9c8f82910 | |||
| d859ba62c8 |
6
.env.dev
@@ -12,8 +12,10 @@ ENV = 'development'
|
|||||||
VUE_APP_TITLE = 智能监控分析系统
|
VUE_APP_TITLE = 智能监控分析系统
|
||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'http://192.168.8.22:48080'
|
|
||||||
VUE_APP_BASE_API = 'http://172.16.33.65:48082'
|
VUE_APP_BASE_API = 'http://192.168.0.31:48080'
|
||||||
|
# VUE_APP_BASE_API = 'http://172.16.32.76:48080'
|
||||||
|
# VUE_APP_BASE_API = 'http://line.kszny.picaiba.com'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|||||||
72
src/api/areavisual/overview.js
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取区域列表
|
||||||
|
export function getAreaList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/page',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取区域空满数量
|
||||||
|
export function postAllAreaInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/region/lsit/count',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取指定库区库位信息
|
||||||
|
export function postAreaInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/list/region',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取区域总览
|
||||||
|
export function postAllAreaOverview(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/line/count',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除能源实时数据库plc相关
|
||||||
|
export function deleteEnergyPlc(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取关联表编码
|
||||||
|
export function getCode() {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/getCode',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得能源实时数据库plc相关分页
|
||||||
|
export function getEnergyPlcPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/page',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出能源实时数据库plc相关 Excel
|
||||||
|
export function exportEnergyPlcExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/export-excel',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
63
src/api/areavisual/record.js
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 获取出入库历史任务分页
|
||||||
|
export function getRecordPage(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task-history/page',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取巷道列表
|
||||||
|
export function getLaneList(params) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/lane/page',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新能源实时数据库plc相关
|
||||||
|
export function updateEnergyPlc(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除能源实时数据库plc相关
|
||||||
|
export function deleteEnergyPlc(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取关联表编码
|
||||||
|
export function getCode() {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/getCode',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得能源实时数据库plc相关分页
|
||||||
|
export function getEnergyPlcPage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/page',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出能源实时数据库plc相关 Excel
|
||||||
|
export function exportEnergyPlcExcel(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/energy-plc/export-excel',
|
||||||
|
method: 'get',
|
||||||
|
params: query,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
154
src/api/ssdl/product&recipe.js
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-17 09:25:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-28 09:29:14
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 获得原料分页
|
||||||
|
export function getProductPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得原料
|
||||||
|
export function getProduct(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除原料
|
||||||
|
export function deleteProduct(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新
|
||||||
|
export function updateProduct(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createProduct(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/material/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 获得工艺分页
|
||||||
|
export function getProcessPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/page/group/by',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得工艺点击展开表格
|
||||||
|
export function getProcessDetailPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/page/group/by/detail',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除工艺
|
||||||
|
export function deleteProcess(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 批量删除工艺
|
||||||
|
export function deleteProcessList(ids) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/delete-list?ids=' + ids,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 更新
|
||||||
|
export function updateProcess(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createProcess(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得工艺
|
||||||
|
export function getProcess(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 工艺设备原料分页
|
||||||
|
export function getProcessMaterialPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除工艺设备原料
|
||||||
|
export function deleteProcessMaterial(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/delete?id=' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新
|
||||||
|
export function updateProcessMaterial(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createProcessMaterial(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得工艺
|
||||||
|
export function getProcessMaterial(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/process-equipment-material/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得设备分页
|
||||||
|
export function getEquipmentPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/equipment/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
60
src/api/ssdl/taskList.js
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-17 09:25:12
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-18 15:42:19
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
// 获得任务分页
|
||||||
|
export function getTaskPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获得任务
|
||||||
|
export function getTask(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获得任务日志分页
|
||||||
|
export function getTaskLogPage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task-log/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新
|
||||||
|
export function updateTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据区域id获取该区域下的库位信息
|
||||||
|
export function getRegion(id) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/get-by-region-id?regionId=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建
|
||||||
|
export function createPCTask(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/job-main-task/pc-create-task',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
9
src/api/visualization/visualization.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function getLineEdgeLibraryList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/line-edge-library/list',
|
||||||
|
method: 'get',
|
||||||
|
params: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
BIN
src/assets/img/ABN.png
Normal file
|
After Width: | Height: | Size: 461 B |
BIN
src/assets/img/ABNScale.png
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
src/assets/img/DIS.png
Normal file
|
After Width: | Height: | Size: 312 B |
BIN
src/assets/img/DISScale.png
Normal file
|
After Width: | Height: | Size: 244 B |
BIN
src/assets/img/EP.png
Normal file
|
After Width: | Height: | Size: 137 B |
BIN
src/assets/img/EPScale.png
Normal file
|
After Width: | Height: | Size: 165 B |
BIN
src/assets/img/FP.png
Normal file
|
After Width: | Height: | Size: 139 B |
BIN
src/assets/img/FPScale.png
Normal file
|
After Width: | Height: | Size: 170 B |
BIN
src/assets/img/IDL.png
Normal file
|
After Width: | Height: | Size: 929 B |
BIN
src/assets/img/IDLScale.png
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
src/assets/img/IT.png
Normal file
|
After Width: | Height: | Size: 320 B |
BIN
src/assets/img/ITScale.png
Normal file
|
After Width: | Height: | Size: 261 B |
BIN
src/assets/img/LCK.png
Normal file
|
After Width: | Height: | Size: 416 B |
BIN
src/assets/img/LCKScale.png
Normal file
|
After Width: | Height: | Size: 305 B |
BIN
src/assets/img/OCC.png
Normal file
|
After Width: | Height: | Size: 325 B |
BIN
src/assets/img/OCCScale.png
Normal file
|
After Width: | Height: | Size: 259 B |
BIN
src/assets/img/RES.png
Normal file
|
After Width: | Height: | Size: 420 B |
BIN
src/assets/img/RESScale.png
Normal file
|
After Width: | Height: | Size: 321 B |
BIN
src/assets/img/Top1.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/img/Top2.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
src/assets/img/Top3.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
src/assets/img/Top4.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/assets/img/Top5.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
src/assets/img/agvCar.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
src/assets/img/agvItemBg.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
src/assets/img/alarmItemBg.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
src/assets/img/chargeBg.png
Normal file
|
After Width: | Height: | Size: 326 B |
BIN
src/assets/img/chargeCircle.png
Normal file
|
After Width: | Height: | Size: 622 B |
BIN
src/assets/img/cold-data-board-msg1.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/img/cold-data-board-msg2.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/img/home-bg.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
src/assets/img/home-progress-bg.png
Normal file
|
After Width: | Height: | Size: 936 B |
BIN
src/assets/img/leftTable.png
Normal file
|
After Width: | Height: | Size: 220 B |
BIN
src/assets/img/recycle.png
Normal file
|
After Width: | Height: | Size: 379 B |
BIN
src/assets/img/rightTable.png
Normal file
|
After Width: | Height: | Size: 355 B |
BIN
src/assets/img/runBg.png
Normal file
|
After Width: | Height: | Size: 325 B |
BIN
src/assets/img/runCircle.png
Normal file
|
After Width: | Height: | Size: 562 B |
BIN
src/assets/img/ssdlLeftTitle.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/ssdlTitle.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
src/assets/img/standbyCircle.png
Normal file
|
After Width: | Height: | Size: 611 B |
BIN
src/assets/img/threeDimensionalChartBg.png
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-08-24 11:19:43
|
* @Date: 2022-08-24 11:19:43
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-04-02 09:33:29
|
* @LastEditTime: 2025-11-28 09:35:03
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
@@ -16,7 +16,7 @@ export default {
|
|||||||
},
|
},
|
||||||
tableData: [], //table数据
|
tableData: [], //table数据
|
||||||
listQuery: { //分页
|
listQuery: { //分页
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
},
|
},
|
||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
this.$refs.addOrUpdate.init(val.data.id);
|
this.$refs.addOrUpdate.init(val.data.id);
|
||||||
});
|
});
|
||||||
} else if (val.type === "delete") {
|
} else if (val.type === "delete") {
|
||||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data)
|
||||||
} else {
|
} else {
|
||||||
this.otherMethods(val)
|
this.otherMethods(val)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
|
|||||||
NProgress.configure({ showSpinner: false })
|
NProgress.configure({ showSpinner: false })
|
||||||
|
|
||||||
// 增加三方登陆 update by 芋艿
|
// 增加三方登陆 update by 芋艿
|
||||||
const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
|
const whiteList = ['/login', '/social-login','screenbg', '/auth-redirect', '/bind', '/register', '/oauthLogin/gitee']
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
@@ -25,9 +25,9 @@ router.beforeEach((to, from, next) => {
|
|||||||
// 获取字典数据 add by 芋艿
|
// 获取字典数据 add by 芋艿
|
||||||
store.dispatch('dict/loadDictDatas')
|
store.dispatch('dict/loadDictDatas')
|
||||||
// 判断当前用户是否已拉取完 user_info 信息
|
// 判断当前用户是否已拉取完 user_info 信息
|
||||||
store.dispatch('GetInfo').then(() => {
|
store.dispatch('GetInfo').then(userInfo => {
|
||||||
isRelogin.show = false
|
isRelogin.show = false
|
||||||
store.dispatch('GenerateRoutes').then(accessRoutes => {
|
store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => {
|
||||||
// 根据 roles 权限生成可访问的路由表
|
// 根据 roles 权限生成可访问的路由表
|
||||||
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
router.addRoutes(accessRoutes) // 动态添加可访问路由表
|
||||||
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
|
||||||
|
|||||||
@@ -35,185 +35,236 @@ export const constantRoutes = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/redirect/:path(.*)',
|
path: '/redirect/:path(.*)',
|
||||||
component: (resolve) => require(['@/views/redirect'], resolve)
|
component: (resolve) => require(['@/views/redirect'], resolve),
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
component: (resolve) => require(['@/views/login'], resolve),
|
component: (resolve) => require(['@/views/login'], resolve),
|
||||||
hidden: true
|
// hidden: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/sso',
|
path: '/sso',
|
||||||
component: (resolve) => require(['@/views/sso'], resolve),
|
component: (resolve) => require(['@/views/sso'], resolve),
|
||||||
hidden: true
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/social-login',
|
path: '/social-login',
|
||||||
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
component: (resolve) => require(['@/views/socialLogin'], resolve),
|
||||||
hidden: true
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
component: (resolve) => require(['@/views/error/404'], resolve),
|
component: (resolve) => require(['@/views/error/404'], resolve),
|
||||||
hidden: true
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/401',
|
path: '/401',
|
||||||
component: (resolve) => require(['@/views/error/401'], resolve),
|
component: (resolve) => require(['@/views/error/401'], resolve),
|
||||||
hidden: true
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/print-design',
|
path: '/print-design',
|
||||||
component: (resolve) => require(['@/views/print/design'], resolve),
|
component: (resolve) => require(['@/views/print/design'], resolve),
|
||||||
hidden: true
|
hidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "",
|
path: '',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: "index",
|
redirect: 'index',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "index",
|
path: 'index',
|
||||||
component: (resolve) => require(["@/views/home/index"], resolve),
|
component: (resolve) => require(['@/views/home/index'], resolve),
|
||||||
name: "首页",
|
name: '首页',
|
||||||
meta: { title: "首页", icon: "dashboard", affix: true },
|
meta: { title: '首页', icon: 'dashboard', affix: true },
|
||||||
hidden: true
|
hidden: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/screenbg',
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "about" */ '@/views/productionVisualization/equipmentBoard'
|
||||||
|
),
|
||||||
|
name: 'screenbg',
|
||||||
|
meta: { title: '大屏', icon: 'chart' },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/user',
|
path: '/user',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
redirect: 'noredirect',
|
redirect: 'noredirect',
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'profile',
|
path: 'profile',
|
||||||
component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/system/user/profile/index'], resolve),
|
||||||
name: 'Profile',
|
name: 'Profile',
|
||||||
meta: { title: '个人中心', icon: 'user' }
|
meta: { title: '个人中心', icon: 'user' },
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
path: 'notify-message',
|
path: 'notify-message',
|
||||||
component: (resolve) => require(['@/views/system/notify/my/index'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/system/notify/my/index'], resolve),
|
||||||
name: 'MyNotifyMessage',
|
name: 'MyNotifyMessage',
|
||||||
meta: { title: '我的站内信', icon: 'message' },
|
meta: { title: '我的站内信', icon: 'message' },
|
||||||
}]
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/dict',
|
path: '/dict',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'type/data/:dictId(\\d+)',
|
path: 'type/data/:dictId(\\d+)',
|
||||||
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
component: (resolve) => require(['@/views/system/dict/data'], resolve),
|
||||||
name: 'SystemDictData',
|
name: 'SystemDictData',
|
||||||
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' }
|
meta: { title: '字典数据', icon: '', activeMenu: '/system/dict' },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/job',
|
path: '/job',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'log',
|
path: 'log',
|
||||||
component: (resolve) => require(['@/views/infra/job/log'], resolve),
|
component: (resolve) => require(['@/views/infra/job/log'], resolve),
|
||||||
name: 'InfraJobLog',
|
name: 'InfraJobLog',
|
||||||
meta: { title: '调度日志', activeMenu: '/infra/job' }
|
meta: { title: '调度日志', activeMenu: '/infra/job' },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
path: '/codegen',
|
path: '/codegen',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'edit/:tableId(\\d+)',
|
path: 'edit/:tableId(\\d+)',
|
||||||
component: (resolve) => require(['@/views/infra/codegen/editTable'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/infra/codegen/editTable'], resolve),
|
||||||
name: 'InfraCodegenEditTable',
|
name: 'InfraCodegenEditTable',
|
||||||
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' }
|
meta: { title: '修改生成配置', activeMenu: '/infra/codegen' },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/bpm',
|
path: '/bpm',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
redirect: 'noredirect',
|
redirect: 'noredirect',
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'oa/leave/create',
|
path: 'oa/leave/create',
|
||||||
component: (resolve) => require(['@/views/bpm/oa/leave/create'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/bpm/oa/leave/create'], resolve),
|
||||||
name: 'BpmOALeaveCreate',
|
name: 'BpmOALeaveCreate',
|
||||||
meta: { title: '发起 OA 请假', icon: 'form', activeMenu: '/bpm/oa/leave' }
|
meta: {
|
||||||
}, {
|
title: '发起 OA 请假',
|
||||||
|
icon: 'form',
|
||||||
|
activeMenu: '/bpm/oa/leave',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
path: 'oa/leave/detail',
|
path: 'oa/leave/detail',
|
||||||
component: (resolve) => require(['@/views/bpm/oa/leave/detail'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/bpm/oa/leave/detail'], resolve),
|
||||||
name: 'BpmOALeaveDetail',
|
name: 'BpmOALeaveDetail',
|
||||||
meta: { title: '查看 OA 请假', icon: 'view', activeMenu: '/bpm/oa/leave' }
|
meta: {
|
||||||
}
|
title: '查看 OA 请假',
|
||||||
]
|
icon: 'view',
|
||||||
|
activeMenu: '/bpm/oa/leave',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/bpm',
|
path: '/bpm',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'manager/form/edit',
|
path: 'manager/form/edit',
|
||||||
component: (resolve) => require(['@/views/bpm/form/formEditor'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/bpm/form/formEditor'], resolve),
|
||||||
name: 'BpmFormEditor',
|
name: 'BpmFormEditor',
|
||||||
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' }
|
meta: { title: '流程表单-编辑', activeMenu: '/bpm/manager/form' },
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
path: 'manager/definition',
|
path: 'manager/definition',
|
||||||
component: (resolve) => require(['@/views/bpm/definition/index'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/bpm/definition/index'], resolve),
|
||||||
name: 'BpmProcessDefinition',
|
name: 'BpmProcessDefinition',
|
||||||
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' }
|
meta: { title: '流程定义', activeMenu: '/bpm/manager/model' },
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
path: 'manager/model/design',
|
path: 'manager/model/design',
|
||||||
component: (resolve) => require(['@/views/bpm/model/modelEditor'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/bpm/model/modelEditor'], resolve),
|
||||||
name: 'BpmModelEditor',
|
name: 'BpmModelEditor',
|
||||||
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' }
|
meta: { title: '设计流程', activeMenu: '/bpm/manager/model' },
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
path: 'process-instance/create',
|
path: 'process-instance/create',
|
||||||
component: (resolve) => require(['@/views/bpm/processInstance/create'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/bpm/processInstance/create'], resolve),
|
||||||
name: 'BpmProcessInstanceCreate',
|
name: 'BpmProcessInstanceCreate',
|
||||||
meta: { title: '发起流程', activeMenu: '/bpm/task/my' }
|
meta: { title: '发起流程', activeMenu: '/bpm/task/my' },
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
path: 'process-instance/detail',
|
path: 'process-instance/detail',
|
||||||
component: (resolve) => require(['@/views/bpm/processInstance/detail'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/bpm/processInstance/detail'], resolve),
|
||||||
name: 'BpmProcessInstanceDetail',
|
name: 'BpmProcessInstanceDetail',
|
||||||
meta: { title: '流程详情', activeMenu: '/bpm/task/my' }
|
meta: { title: '流程详情', activeMenu: '/bpm/task/my' },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/property',
|
path: '/property',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'value/:propertyId(\\d+)',
|
path: 'value/:propertyId(\\d+)',
|
||||||
component: (resolve) => require(['@/views/mall/product/property/value'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/mall/product/property/value'], resolve),
|
||||||
name: 'ProductPropertyValue',
|
name: 'ProductPropertyValue',
|
||||||
meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' }
|
meta: {
|
||||||
}
|
title: '商品属性值',
|
||||||
]
|
icon: '',
|
||||||
|
activeMenu: '/product/property',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/spu',
|
path: '/spu',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'edit/:spuId(\\d+)',
|
path: 'edit/:spuId(\\d+)',
|
||||||
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/mall/product/spu/save'], resolve),
|
||||||
name: 'ProductSpuUpdate',
|
name: 'ProductSpuUpdate',
|
||||||
meta: { title: '修改商品', activeMenu: '/product/spu' }
|
meta: { title: '修改商品', activeMenu: '/product/spu' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'add',
|
path: 'add',
|
||||||
component: (resolve) => require(['@/views/mall/product/spu/save'], resolve),
|
component: (resolve) =>
|
||||||
|
require(['@/views/mall/product/spu/save'], resolve),
|
||||||
name: 'ProductSpuCreate',
|
name: 'ProductSpuCreate',
|
||||||
meta: { title: '添加商品', activeMenu: '/product/spu' }
|
meta: { title: '添加商品', activeMenu: '/product/spu' },
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/trade/order',
|
path: '/trade/order',
|
||||||
@@ -225,26 +276,29 @@ export const constantRoutes = [
|
|||||||
name: 'TradeOrderDetail',
|
name: 'TradeOrderDetail',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: { title: '订单详情' },
|
meta: { title: '订单详情' },
|
||||||
component: (resolve) => require(['@/views/mall/trade/order/detail'], resolve)
|
component: (resolve) =>
|
||||||
}
|
require(['@/views/mall/trade/order/detail'], resolve),
|
||||||
]
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/pay',
|
path: '/pay',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
children: [{
|
children: [
|
||||||
|
{
|
||||||
path: 'order/submit',
|
path: 'order/submit',
|
||||||
name: 'PayOrderSubmit',
|
name: 'PayOrderSubmit',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: {
|
meta: {
|
||||||
title: '收银台',
|
title: '收银台',
|
||||||
noCache: true
|
noCache: true,
|
||||||
},
|
},
|
||||||
component: (resolve) => require(['@/views/pay/order/submit'], resolve)
|
component: (resolve) => require(['@/views/pay/order/submit'], resolve),
|
||||||
}]
|
},
|
||||||
}
|
],
|
||||||
]
|
},
|
||||||
|
];
|
||||||
|
|
||||||
// 防止连续点击多次路由报错
|
// 防止连续点击多次路由报错
|
||||||
let routerPush = Router.prototype.push;
|
let routerPush = Router.prototype.push;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import {constantRoutes} from '@/router'
|
import {constantRoutes} from '@/router'
|
||||||
import {getRouters} from '@/api/menu'
|
|
||||||
import Layout from '@/layout/index'
|
import Layout from '@/layout/index'
|
||||||
import ParentView from '@/components/ParentView';
|
import ParentView from '@/components/ParentView';
|
||||||
import {toCamelCase} from "@/utils";
|
import {toCamelCase} from "@/utils";
|
||||||
@@ -27,13 +26,17 @@ const permission = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
// 生成路由
|
/**
|
||||||
GenerateRoutes({commit}) {
|
* 生成路由
|
||||||
|
*
|
||||||
|
* @param commit commit 函数
|
||||||
|
* @param menus 路由参数
|
||||||
|
*/
|
||||||
|
GenerateRoutes({commit}, menus) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
// 向后端请求路由数据(菜单)
|
// 将 menus 菜单,转换为 route 路由数组
|
||||||
getRouters().then(res => {
|
const sdata = JSON.parse(JSON.stringify(menus)) // 【重要】用于菜单中的数据
|
||||||
const sdata = JSON.parse(JSON.stringify(res.data)) // 【重要】用于菜单中的数据
|
const rdata = JSON.parse(JSON.stringify(menus)) // 用于最后添加到 Router 中的数据
|
||||||
const rdata = JSON.parse(JSON.stringify(res.data)) // 用于最后添加到 Router 中的数据
|
|
||||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||||
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
||||||
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
|
rewriteRoutes.push({path: '*', redirect: '/404', hidden: true})
|
||||||
@@ -43,7 +46,6 @@ const permission = {
|
|||||||
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
commit('SET_TOPBAR_ROUTES', sidebarRoutes)
|
||||||
resolve(rewriteRoutes)
|
resolve(rewriteRoutes)
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
125
src/views/areavisual/overview/components/ringChart.vue
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
:class="className"
|
||||||
|
:style="{ height: height, width: width, marginLeft: '10px' }" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
require('echarts/theme/macarons'); // echarts theme
|
||||||
|
import resize from '@/utils/chartMixins/resize';
|
||||||
|
|
||||||
|
const animationDuration = 1000;
|
||||||
|
export default {
|
||||||
|
mixins: [resize],
|
||||||
|
props: {
|
||||||
|
className: {
|
||||||
|
type: String,
|
||||||
|
default: 'chart',
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: '100%',
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: String,
|
||||||
|
default: '300px',
|
||||||
|
},
|
||||||
|
ringData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chart: null,
|
||||||
|
targetId: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
if (!this.chart) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.chart.dispose();
|
||||||
|
this.chart = null;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initChart() {
|
||||||
|
this.chart = echarts.init(this.$el, 'macarons');
|
||||||
|
const _this = this;
|
||||||
|
this.chart.setOption({
|
||||||
|
title: {
|
||||||
|
text: this.title
|
||||||
|
? '{space|}{tip|}{space|}{value|' + this.title + '}'
|
||||||
|
: '',
|
||||||
|
textStyle: {
|
||||||
|
rich: {
|
||||||
|
tip: {
|
||||||
|
width: 6,
|
||||||
|
height: 6,
|
||||||
|
borderRadius: 50,
|
||||||
|
backgroundColor: '#288AFF',
|
||||||
|
},
|
||||||
|
space: {
|
||||||
|
width: 8,
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
fontSize: 14,
|
||||||
|
color: 'black',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
color: ['#33B36B', '#3A8DFF', '#F59A23'],
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
axisPointer: {
|
||||||
|
type: 'cross',
|
||||||
|
crossStyle: {
|
||||||
|
color: '#999',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: ['当前满位', '当前空位', '在途'],
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
// name: '投入',
|
||||||
|
type: 'pie',
|
||||||
|
radius: '50%',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
name: '当前满位',
|
||||||
|
value: this.ringData.occupiedQuantity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '当前空位',
|
||||||
|
value: this.ringData.idleQuantity
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '在途',
|
||||||
|
value: this.ringData.transitQuantity
|
||||||
|
},
|
||||||
|
],
|
||||||
|
emphasis: {
|
||||||
|
itemStyle: {
|
||||||
|
shadowBlur: 10,
|
||||||
|
shadowOffsetX: 0,
|
||||||
|
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
262
src/views/areavisual/overview/index.vue
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row class="overview-container">
|
||||||
|
<el-col :span="4" class="overview-container-left">
|
||||||
|
<el-row style="font-size: 18px; font-weight: bold; line-height: 36px">库区选择</el-row>
|
||||||
|
<el-input
|
||||||
|
v-model="areaSearchForm.regionName"
|
||||||
|
placeholder="库区名称"
|
||||||
|
@blur="getArea"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
<el-tree
|
||||||
|
:data="areaList"
|
||||||
|
:node-key="'id'"
|
||||||
|
:props="{label: 'regionName'}"
|
||||||
|
@node-click="nodeClick"
|
||||||
|
/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="16" v-if="changeType === 0" class="overview-container-main">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8" class="allarea-box" v-for="item in allAreaList" :key="item.id">
|
||||||
|
<div class="areainfo-box">
|
||||||
|
<div class="areainfo-box-header">
|
||||||
|
{{ item.regionName }}
|
||||||
|
</div>
|
||||||
|
<div class="areainfo-box-line">
|
||||||
|
<div class="areainfo-box-line-item" :style="{width: `${(item.occupiedQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#33B36B'}"></div>
|
||||||
|
<div class="areainfo-box-line-item" :style="{width: `${(item.idleQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#3A8DFF'}"></div>
|
||||||
|
<div class="areainfo-box-line-item" :style="{width: `${(item.transitQuantity / (item.totalInventory + item.transitQuantity) * 100).toFixed(2)}%`, backgroundColor: '#F59A23'}"></div>
|
||||||
|
</div>
|
||||||
|
<el-row class="areainfo-box-info">
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p class="areainfo-box-info-item-count">{{item.totalInventory}}</p>
|
||||||
|
<p class="areainfo-box-info-item-title">库位总数</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p class="areainfo-box-info-item-count" style="color: #33B36B">{{item.occupiedQuantity}}</p>
|
||||||
|
<p class="areainfo-box-info-item-title">占</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p class="areainfo-box-info-item-count" style="color: #3A8DFF">{{item.idleQuantity}}</p>
|
||||||
|
<p class="areainfo-box-info-item-title">空</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="areainfo-box-info-item" :span="6">
|
||||||
|
<p class="areainfo-box-info-item-count" style="color: #F59A23">{{item.transitQuantity}}</p>
|
||||||
|
<p class="areainfo-box-info-item-title">在途</p>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4" v-if="changeType === 0" class="overview-container-right">
|
||||||
|
<el-tabs v-model="activeName" @tab-click="handleClickRight">
|
||||||
|
<el-tab-pane label="概览" name="first">
|
||||||
|
<el-row class="overview-container-right-alloverview">
|
||||||
|
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.totalInventory}}</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">库位总数</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.occupiedQuantity}}</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">当前满位</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.idleQuantity}}</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">当前空位</p>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="overview-container-right-alloverview-item" :span="8">
|
||||||
|
<p class="overview-container-right-alloverview-item-count">{{allAreaInfo.transitQuantity}}</p>
|
||||||
|
<p class="overview-container-right-alloverview-item-title">在途</p>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<ringChart :ring-data="allAreaInfo" ref="ringChart" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="在途任务" name="second">在途任务</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="20" v-if="changeType === 1" class="overview-container-main"></el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// import basicPage from '@/mixins/basic-page';
|
||||||
|
import ringChart from './components/ringChart.vue';
|
||||||
|
import { getAreaList, postAllAreaInfo, postAllAreaOverview, postAreaInfo } from '@/api/areavisual/overview';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'overview',
|
||||||
|
// mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
areaList: [
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
regionName: "全部库区"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
areaSearchForm: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 100,
|
||||||
|
regionName: ''
|
||||||
|
},
|
||||||
|
changeType: 0,
|
||||||
|
allAreaList: [],
|
||||||
|
allAreaInfo: {
|
||||||
|
totalInventory: 0,
|
||||||
|
occupiedQuantity: 0,
|
||||||
|
idleQuantity: 0,
|
||||||
|
transitQuantity: 0
|
||||||
|
},
|
||||||
|
areaInfo: [],
|
||||||
|
activeName: 'first'
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
ringChart
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
this.getArea()
|
||||||
|
this.getAllAreaInfo()
|
||||||
|
this.getAllAreaOverview()
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
activeName: (val) => {
|
||||||
|
if (val === 'first') {
|
||||||
|
this.getAllAreaOverview()
|
||||||
|
} else if (val === 'second') {
|
||||||
|
this.getNowTaskList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取库区列表
|
||||||
|
async getArea() {
|
||||||
|
const res = await getAreaList(this.areaSearchForm)
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.areaList = [
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
regionName: "全部库区"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
this.areaList.push(...(res.data.list))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 库区选择
|
||||||
|
nodeClick(data, node, components) {
|
||||||
|
if (data.id === 0) {
|
||||||
|
this.changeType = 0
|
||||||
|
this.activeName = 'first'
|
||||||
|
this.getAllAreaInfo()
|
||||||
|
} else {
|
||||||
|
this.changeType = 1
|
||||||
|
this.getAreaInfo(data.id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取全部库区概览信息
|
||||||
|
async getAllAreaInfo() {
|
||||||
|
const res = await postAllAreaInfo([])
|
||||||
|
console.log(res)
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.allAreaList = res.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取库区概览
|
||||||
|
async getAllAreaOverview() {
|
||||||
|
const res = await postAllAreaOverview([])
|
||||||
|
console.log(res)
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.allAreaInfo = res.data
|
||||||
|
this.$refs.ringChart.initChart();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取在途任务
|
||||||
|
async getNowTaskList() {},
|
||||||
|
// 获取单库区信息
|
||||||
|
async getAreaInfo (id) {
|
||||||
|
const res = await postAreaInfo({id})
|
||||||
|
console.log(res)
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
this.areaInfo = res.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 全部库区右侧分页点击
|
||||||
|
handleClickRight (tab, event) {
|
||||||
|
console.log(tab, event)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.overview-container {
|
||||||
|
max-height: calc(100vh - 120px - 8px);
|
||||||
|
overflow: scroll;
|
||||||
|
.overview-container-left {
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
.overview-container-main {
|
||||||
|
.allarea-box {
|
||||||
|
padding: 10px;
|
||||||
|
.areainfo-box {
|
||||||
|
border: 1px solid #bbb;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 10px;
|
||||||
|
.areainfo-box-header {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap; /* 禁止换行 */
|
||||||
|
overflow: hidden; /* 隐藏溢出内容 */
|
||||||
|
text-overflow: ellipsis; /* 溢出部分显示省略号 */
|
||||||
|
}
|
||||||
|
.areainfo-box-line {
|
||||||
|
width: 100%;
|
||||||
|
.areainfo-box-line-item {
|
||||||
|
height: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.areainfo-box-info {
|
||||||
|
.areainfo-box-info-item {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
.areainfo-box-info-item-count {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.overview-container-right {
|
||||||
|
.overview-container-right-alloverview {
|
||||||
|
.overview-container-right-alloverview-item {
|
||||||
|
text-align: center;
|
||||||
|
.overview-container-right-alloverview-item-count {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.el-tree-node__content {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
.el-tree-node__label {
|
||||||
|
display: block;
|
||||||
|
width: calc(100% - 24px);
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap; /* 禁止换行 */
|
||||||
|
overflow: hidden; /* 隐藏溢出内容 */
|
||||||
|
text-overflow: ellipsis; /* 溢出部分显示省略号 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
519
src/views/areavisual/record/components/RecordDrawer.vue
Normal file
@@ -0,0 +1,519 @@
|
|||||||
|
<!--
|
||||||
|
filename: EquipmentDrawer.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-08-22 14:38:56
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
:visible="visible"
|
||||||
|
:show-close="false"
|
||||||
|
:wrapper-closable="false"
|
||||||
|
class="drawer"
|
||||||
|
custom-class="mes-drawer"
|
||||||
|
size="60%"
|
||||||
|
@closed="$emit('destroy')">
|
||||||
|
<SmallTitle slot="title">
|
||||||
|
{{
|
||||||
|
mode.includes('detail')
|
||||||
|
? '详情'
|
||||||
|
: mode.includes('edit')
|
||||||
|
? '编辑'
|
||||||
|
: '新增'
|
||||||
|
}}
|
||||||
|
</SmallTitle>
|
||||||
|
|
||||||
|
<div class="drawer-body flex">
|
||||||
|
<div class="drawer-body__content">
|
||||||
|
<section v-for="(section, index) in sections" :key="section.key">
|
||||||
|
<SmallTitle v-if="index != 0">{{ section.name }}</SmallTitle>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="form-part"
|
||||||
|
v-if="section.key == 'base'"
|
||||||
|
style="margin-bottom: 32px">
|
||||||
|
<el-skeleton v-if="!showForm" animated />
|
||||||
|
<!-- <EquipmentInfoForm
|
||||||
|
key="drawer-dialog-form"
|
||||||
|
v-if="showForm"
|
||||||
|
:disabled="mode.includes('detail')"
|
||||||
|
:sync-filelist="syncFileListFlag"
|
||||||
|
v-model="form" /> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="section.key == 'attrs'" style="margin-top: 12px">
|
||||||
|
<base-table
|
||||||
|
v-loading="attrListLoading"
|
||||||
|
:table-props="section.props"
|
||||||
|
:page="attrQuery?.params.pageNo || 1"
|
||||||
|
:limit="attrQuery?.params.pageSize || 10"
|
||||||
|
:table-data="list"
|
||||||
|
:add-button-show="mode.includes('detail') ? null : '添加属性'"
|
||||||
|
@emitButtonClick="handleAddAttr"
|
||||||
|
@emitFun="handleEmitFun">
|
||||||
|
<method-btn
|
||||||
|
v-if="section.tableBtn"
|
||||||
|
slot="handleBtn"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleTableBtnClick" />
|
||||||
|
</base-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="attrQuery.params.pageNo"
|
||||||
|
:limit.sync="attrQuery.params.pageSize"
|
||||||
|
@pagination="getAttrList" />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="drawer-body__footer">
|
||||||
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
|
<el-button v-if="mode == 'detail'" type="primary" @click="toggleEdit">
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button v-else type="primary" @click="handleConfirm">确定</el-button>
|
||||||
|
<!-- sections的第二项必须是 属性列表 -->
|
||||||
|
<!-- <el-button
|
||||||
|
v-if="sections[1].allowAdd"
|
||||||
|
type="primary"
|
||||||
|
@click="handleAddAttr">
|
||||||
|
添加属性
|
||||||
|
</el-button> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
const SmallTitle = {
|
||||||
|
name: 'SmallTitle',
|
||||||
|
props: ['size'],
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
render: function (h) {
|
||||||
|
return h(
|
||||||
|
'span',
|
||||||
|
{
|
||||||
|
class: 'small-title',
|
||||||
|
style: {
|
||||||
|
fontSize: '18px',
|
||||||
|
lineHeight:
|
||||||
|
this.size == 'lg' ? '24px' : this.size == 'sm' ? '18px' : '20px',
|
||||||
|
fontWeight: 500,
|
||||||
|
fontFamily: '微软雅黑, Microsoft YaHei, Arial, Helvetica, sans-serif',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
this.$slots.default
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { SmallTitle },
|
||||||
|
props: ['sections', 'mode', 'dataId'], // dataId 作为一个通用的存放id的字段
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
showForm: false,
|
||||||
|
btnLoading: false,
|
||||||
|
total: 0,
|
||||||
|
form: {},
|
||||||
|
list: [],
|
||||||
|
attrTitle: '',
|
||||||
|
attrForm: {
|
||||||
|
id: null,
|
||||||
|
equipmentId: null,
|
||||||
|
name: '',
|
||||||
|
value: '',
|
||||||
|
},
|
||||||
|
attrFormVisible: false,
|
||||||
|
attrRows: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: true,
|
||||||
|
label: '属性名称',
|
||||||
|
prop: 'name',
|
||||||
|
rules: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: true,
|
||||||
|
label: '属性值',
|
||||||
|
prop: 'value',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
attrQuery: {
|
||||||
|
params: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
}, // 属性列表的请求
|
||||||
|
infoQuery: null, // 基本信息的请求
|
||||||
|
attrFormSubmitting: false,
|
||||||
|
attrListLoading: false,
|
||||||
|
syncFileListFlag: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
formRows() {
|
||||||
|
return this.sections[0].rows.map((row) => {
|
||||||
|
return row.map((col) => {
|
||||||
|
if (col.key == 'eq-pics') {
|
||||||
|
// 重置图片的位置
|
||||||
|
return {
|
||||||
|
...col,
|
||||||
|
bind: {
|
||||||
|
...col.bind,
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
left: 0,
|
||||||
|
right: 'unset',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...col,
|
||||||
|
bind: {
|
||||||
|
...col.bind,
|
||||||
|
// 详情 模式下,禁用各种输入
|
||||||
|
disabled: this.mode == 'detail',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
tableBtn() {
|
||||||
|
return this.mode == 'detail' ? [] : this.sections[1].tableBtn;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
for (const section of this.sections) {
|
||||||
|
// 请求具体信息
|
||||||
|
if ('url' in section) {
|
||||||
|
const query = {
|
||||||
|
url: section.url,
|
||||||
|
method: section.method || 'get',
|
||||||
|
params: section.queryParams || null,
|
||||||
|
data: section.data || null,
|
||||||
|
};
|
||||||
|
this.$axios(query).then(({ data }) => {
|
||||||
|
if (section.key == 'base') {
|
||||||
|
this.form = data;
|
||||||
|
// this.form = {
|
||||||
|
// code: 'gj',
|
||||||
|
// name: '下片机',
|
||||||
|
// enName: 'unload',
|
||||||
|
// abbr: '',
|
||||||
|
// equipmentTypeId: 21084,
|
||||||
|
// remark: '备注',
|
||||||
|
// id: '1712367395052384257',
|
||||||
|
// createTime: 1697095176000,
|
||||||
|
// enterTime: 0,
|
||||||
|
// productionTime: 0,
|
||||||
|
// files: [
|
||||||
|
// {
|
||||||
|
// fileName: '测试.xlsx',
|
||||||
|
// fileUrl: 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0108%2F0f0c6f30j00r5cle9000sc000hs00gtc.jpg&thumbnail=660x2147483647&quality=80&type=jpg',
|
||||||
|
// fileType: 1
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// fileName: '测试2.xlsx',
|
||||||
|
// fileUrl: 'https://nimg.ws.126.net/?url=http%3A%2F%2Fdingyue.ws.126.net%2F2022%2F0415%2F2cd23619j00racb96000kc000hs00hsc.jpg&thumbnail=660x2147483647&quality=80&type=jpg',
|
||||||
|
// fileType: 1
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// fileName: '测试3.xlsx',
|
||||||
|
// fileUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2F1fea91a0-d088-409e-b145-e0e61254b28b%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700031689&t=2e0fe7d1de7f54adff3007efe133d67c',
|
||||||
|
// fileType: 1
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// fileName: '测试4.xlsx',
|
||||||
|
// fileUrl: 'https://pics5.baidu.com/feed/b7003af33a87e950cdfb4b4546eed044faf2b40d.jpeg?token=1d7484cfe4b014dd201f8c8725cab945',
|
||||||
|
// fileType: 2
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// fileName: '测试5.xlsx',
|
||||||
|
// fileUrl: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fe3500876-9c46-4b70-8d37-4799520cdd13%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1700031689&t=4abc1df930e62730e5361a7d3765e0f2',
|
||||||
|
// fileType: 2
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// tvalue: 0,
|
||||||
|
// processingTime: 0,
|
||||||
|
// manufacturer: '',
|
||||||
|
// spec: '',
|
||||||
|
// description: '描述',
|
||||||
|
// };
|
||||||
|
this.showForm = true;
|
||||||
|
this.infoQuery = query;
|
||||||
|
} else if (section.key == 'attrs') {
|
||||||
|
this.attrQuery = query;
|
||||||
|
this.list = data.list;
|
||||||
|
this.total = data.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleTableBtnClick({ type, data }) {
|
||||||
|
switch (type) {
|
||||||
|
case 'edit':
|
||||||
|
this.handleEditAttr(data.id);
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
this.handleDeleteAttr(data.id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleConfirm() {
|
||||||
|
this.btnLoading = true;
|
||||||
|
this.syncFileListFlag = Math.random();
|
||||||
|
|
||||||
|
this.$nextTick(async () => {
|
||||||
|
const { code, data } = await this.$axios({
|
||||||
|
url: this.sections[0].urlUpdate,
|
||||||
|
method: 'put',
|
||||||
|
data: this.form,
|
||||||
|
});
|
||||||
|
if (code == 0) {
|
||||||
|
this.$modal.msgSuccess('更新成功');
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
}
|
||||||
|
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.handleCancel();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleEmitFun(val) {
|
||||||
|
console.log('handleEmitFun', val);
|
||||||
|
},
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
async getAttrList() {
|
||||||
|
this.attrListLoading = true;
|
||||||
|
const res = await this.$axios(this.attrQuery);
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.list = res.data.list;
|
||||||
|
this.total = res.data.total;
|
||||||
|
}
|
||||||
|
this.attrListLoading = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 保存表单
|
||||||
|
handleSave() {
|
||||||
|
this.$refs['form'][0].validate(async (valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const isEdit = this.mode == 'edit';
|
||||||
|
await this.$axios({
|
||||||
|
url: this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
|
||||||
|
method: isEdit ? 'put' : 'post',
|
||||||
|
data: this.form,
|
||||||
|
});
|
||||||
|
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleCancel() {
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 开启编辑
|
||||||
|
toggleEdit() {
|
||||||
|
this.$emit('update-mode', 'edit');
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新增属性
|
||||||
|
handleAddAttr() {
|
||||||
|
if (!this.dataId) return this.$message.warning('请先创建设备信息');
|
||||||
|
this.attrForm = {
|
||||||
|
id: null,
|
||||||
|
equipmentId: this.dataId,
|
||||||
|
name: '',
|
||||||
|
value: '',
|
||||||
|
};
|
||||||
|
this.attrTitle = '添加设备属性';
|
||||||
|
this.attrFormVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 编辑属性
|
||||||
|
async handleEditAttr(attrId) {
|
||||||
|
const res = await this.$axios({
|
||||||
|
url: this.sections[1].urlDetail,
|
||||||
|
method: 'get',
|
||||||
|
params: { id: attrId },
|
||||||
|
});
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.attrForm = res.data;
|
||||||
|
this.attrTitle = '编辑设备属性';
|
||||||
|
this.attrFormVisible = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除属性
|
||||||
|
handleDeleteAttr(attrId) {
|
||||||
|
this.$confirm('确定删除该属性?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
const res = await this.$axios({
|
||||||
|
url: this.sections[1].urlDelete,
|
||||||
|
method: 'delete',
|
||||||
|
params: { id: attrId },
|
||||||
|
});
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '删除成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getAttrList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 提交属性表
|
||||||
|
submitAttrForm() {
|
||||||
|
this.$refs['attrForm'].validate(async (valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const isEdit = this.attrForm.id != null;
|
||||||
|
this.attrFormSubmitting = true;
|
||||||
|
const res = await this.$axios({
|
||||||
|
url: isEdit
|
||||||
|
? this.sections[1].urlUpdate
|
||||||
|
: this.sections[1].urlCreate,
|
||||||
|
method: isEdit ? 'put' : 'post',
|
||||||
|
data: this.attrForm,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.closeAttrForm();
|
||||||
|
this.$message({
|
||||||
|
message: `${isEdit ? '更新' : '创建'}成功`,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getAttrList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.attrFormSubmitting = false;
|
||||||
|
} catch (err) {
|
||||||
|
this.$message({
|
||||||
|
message: err,
|
||||||
|
type: 'error',
|
||||||
|
duration: 1500,
|
||||||
|
});
|
||||||
|
this.attrFormSubmitting = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
closeAttrForm() {
|
||||||
|
this.attrFormVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
handleClick(raw) {
|
||||||
|
if (raw.type === 'delete') {
|
||||||
|
this.$confirm(
|
||||||
|
`确定对${
|
||||||
|
raw.data.name
|
||||||
|
? '[名称=' + raw.data.name + ']'
|
||||||
|
: '[序号=' + raw.data._pageIndex + ']'
|
||||||
|
}进行删除操作?`,
|
||||||
|
'提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
deleteProductAttr(raw.data.id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
} else {
|
||||||
|
this.addNew(raw.data.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.drawer >>> .el-drawer {
|
||||||
|
border-radius: 8px 0 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer >>> .el-drawer__header {
|
||||||
|
margin: 0;
|
||||||
|
padding: 32px 32px 24px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.small-title::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 4px;
|
||||||
|
height: 22px;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body__content {
|
||||||
|
flex: 1;
|
||||||
|
/* background: #eee; */
|
||||||
|
padding: 20px 30px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body__footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
277
src/views/areavisual/record/index.vue
Normal file
@@ -0,0 +1,277 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!-- 搜索工作栏 -->
|
||||||
|
<SearchBar
|
||||||
|
:formConfigs="searchBarFormConfig"
|
||||||
|
ref="search-bar"
|
||||||
|
isFold
|
||||||
|
@headBtnClick="handleSearchBarBtnClick" />
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<base-table
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="queryParams.pageNo"
|
||||||
|
:limit="queryParams.pageSize"
|
||||||
|
:table-data="list"
|
||||||
|
@emitFun="handleEmitFun">
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="120"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleTableBtnClick" />
|
||||||
|
</base-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList" />
|
||||||
|
|
||||||
|
<!-- 设备 详情 - 编辑 -->
|
||||||
|
<RecordDrawer
|
||||||
|
v-if="open"
|
||||||
|
ref="drawer"
|
||||||
|
:mode="editMode"
|
||||||
|
@update-mode="editMode = $event"
|
||||||
|
:data-id="form.id"
|
||||||
|
@refreshDataList="getList"
|
||||||
|
@cancel="cancelEdit"
|
||||||
|
@destroy="cancelEdit" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import moment from 'moment';
|
||||||
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
|
import RecordDrawer from './components/RecordDrawer';
|
||||||
|
import { getRecordPage, getLaneList } from '@/api/areavisual/record';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Equipment',
|
||||||
|
components: {
|
||||||
|
RecordDrawer,
|
||||||
|
},
|
||||||
|
mixins: [basicPageMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
searchBarKeys: ['name', 'code'],
|
||||||
|
// this.$auth.hasPermi(`base:equipment:update`)
|
||||||
|
tableBtn: [
|
||||||
|
{
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '详情'
|
||||||
|
}
|
||||||
|
].filter((v) => v),
|
||||||
|
tableProps: [
|
||||||
|
{
|
||||||
|
prop: 'recordCode',
|
||||||
|
label: '出/入库单编号',
|
||||||
|
fixed: true,
|
||||||
|
width: 180,
|
||||||
|
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||||
|
// showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'type',
|
||||||
|
label: '业务类型',
|
||||||
|
filter: (val) => val === 1 ? '出库' : '入库',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 180,
|
||||||
|
prop: 'recordTime',
|
||||||
|
label: '出/入库时间',
|
||||||
|
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss')
|
||||||
|
},
|
||||||
|
{ prop: 'recordArea', label: '出/入库库区' },
|
||||||
|
{ prop: 'recordLane', label: '出/入库巷道' },
|
||||||
|
{ prop: 'recordRegion', label: '出/入库库位号' },
|
||||||
|
{ prop: 'target', label: '搬运对象' },
|
||||||
|
{ prop: 'productName', label: '产品名称' },
|
||||||
|
{ prop: 'specification', label: '型号规格' },
|
||||||
|
{ prop: 'recordMan', label: '出/入库人' },
|
||||||
|
{ prop: 'remark', label: '备注' }
|
||||||
|
],
|
||||||
|
searchBarFormConfig: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '关键字',
|
||||||
|
placeholder: '请输入出/入库编码、产品名称、规格型号、库位号',
|
||||||
|
param: 'query',
|
||||||
|
width: 350
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '业务类型',
|
||||||
|
selectOptions: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name:'出库'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name:'入库'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
placeholder: '请选择业务类型',
|
||||||
|
param: 'type',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '出/入库巷道',
|
||||||
|
selectOptions: [],
|
||||||
|
placeholder: '请选择出/入库巷道',
|
||||||
|
param: 'recordLane',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '来源',
|
||||||
|
selectOptions: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name:'WMS'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name:'MES'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
placeholder: '请选择来源',
|
||||||
|
param: 'source',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '出/入库人',
|
||||||
|
selectOptions: [],
|
||||||
|
placeholder: '请选择出/入库人',
|
||||||
|
param: 'recordMan',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '出/入库时间',
|
||||||
|
placeholder: '请选择出/入库时间',
|
||||||
|
param: 'recordTime',
|
||||||
|
dateType: 'datetimerange',
|
||||||
|
rangeSeparator: '至'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '载具类型',
|
||||||
|
selectOptions: [
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
name:'AGV'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
name:'人工叉车'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
placeholder: '请选择载具类型',
|
||||||
|
param: 'vehicleType',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '查询',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '重置',
|
||||||
|
name: 'reset',
|
||||||
|
color: 'info',
|
||||||
|
}
|
||||||
|
],
|
||||||
|
editVisible: false,
|
||||||
|
editMode: 'detail', // 'edit', 'detail'
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
query: '',
|
||||||
|
type: '',
|
||||||
|
source: '',
|
||||||
|
recordLane: '',
|
||||||
|
recordMan: '',
|
||||||
|
recordTime: '',
|
||||||
|
vehicleType: ''
|
||||||
|
},
|
||||||
|
form: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getLane()
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
/** 查询列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
// 执行查询
|
||||||
|
getRecordPage(this.queryParams).then((response) => {
|
||||||
|
console.log(response)
|
||||||
|
this.list = response.data.list;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
async getLane() {
|
||||||
|
const res = await getLaneList({
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 100
|
||||||
|
})
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
console.log(res.data)
|
||||||
|
this.searchBarFormConfig[2].selectOptions = res.data.list.map(item => {
|
||||||
|
return { id: item.id, name: item.lane }
|
||||||
|
})
|
||||||
|
console.log(this.searchBarFormConfig)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 取消按钮 */
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
},
|
||||||
|
// /** 导出按钮操作 */
|
||||||
|
// handleExport() {
|
||||||
|
// // 处理查询参数
|
||||||
|
// let params = { ...this.queryParams };
|
||||||
|
// params.pageNo = undefined;
|
||||||
|
// params.pageSize = undefined;
|
||||||
|
// this.$modal
|
||||||
|
// .confirm('是否确认导出所有设备数据项?')
|
||||||
|
// .then(() => {
|
||||||
|
// this.exportLoading = true;
|
||||||
|
// return exportEquipmentExcel(params);
|
||||||
|
// })
|
||||||
|
// .then((response) => {
|
||||||
|
// this.$download.excel(response, '设备.xls');
|
||||||
|
// this.exportLoading = false;
|
||||||
|
// })
|
||||||
|
// .catch(() => {});
|
||||||
|
// },
|
||||||
|
handleTableBtnClick ({data, type}) {
|
||||||
|
switch (type) {
|
||||||
|
case 'detail':
|
||||||
|
this.viewDetail(data.id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查看详情
|
||||||
|
viewDetail(id) {
|
||||||
|
this.editMode = 'detail';
|
||||||
|
this.open = true;
|
||||||
|
this.form.id = id;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['drawer'].init();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
65
src/views/cost/components/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: $height;
|
||||||
|
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>
|
||||||
442
src/views/cost/components/add-or-updata.vue
Normal file
@@ -0,0 +1,442 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 15:07:24
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-07 15:35:14
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="circle-container">
|
||||||
|
<div v-for="(item, index) in dotArr" :key="index" class="circle-wrapper">
|
||||||
|
<div
|
||||||
|
class="circle"
|
||||||
|
:style="{
|
||||||
|
background: stepNum == index + 1 ? '#0B58FF' : '',
|
||||||
|
}">
|
||||||
|
{{ index + 1 }}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="circle-text"
|
||||||
|
:style="{
|
||||||
|
color: stepNum == index + 1 ? '#0B58FF' : '',
|
||||||
|
}">
|
||||||
|
{{ item.name }}
|
||||||
|
</div>
|
||||||
|
<!-- 圆点后面的虚线 -->
|
||||||
|
<div v-if="index < 2" class="connector" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="stepNum == 1">
|
||||||
|
<div class="topTip">
|
||||||
|
1.可选择库区、巷道,同批次创建任务搬运仅支持同一产品型号。
|
||||||
|
<br />
|
||||||
|
2.须在本页下方填写搬运数量,搬运数量仅支持双数,且数量≤当前可用库存总量。
|
||||||
|
</div>
|
||||||
|
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||||
|
步骤一:选择产品及起点
|
||||||
|
</small-title>
|
||||||
|
<el-form
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
ref="dataForm"
|
||||||
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-position="top"
|
||||||
|
label-width="80px">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="搬运对象" prop="val1">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.val1"
|
||||||
|
placeholder="请选择搬运对象">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" v-if="dataForm.val1 == 1">
|
||||||
|
<el-form-item label="产品名称" prop="val1">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.val2"
|
||||||
|
placeholder="请选择产品名称">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6" v-if="dataForm.val1 == 1">
|
||||||
|
<el-form-item label="规格型号" prop="val1">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.val2"
|
||||||
|
placeholder="请选择规格型号">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="搬运数量" prop="val4">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.val4"
|
||||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')">
|
||||||
|
<template slot="append">盘</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="起点信息" prop="val5">
|
||||||
|
<el-radio-group v-model="dataForm.val5">
|
||||||
|
<el-radio :label="1">按策略自动选择</el-radio>
|
||||||
|
<el-radio :label="2">指定起点</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div v-if="dataForm.val5 == 2" class="potBG-div">
|
||||||
|
<div>
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="10">
|
||||||
|
起点库区:
|
||||||
|
<el-select
|
||||||
|
style="width: 200px; margin-left: 10px"
|
||||||
|
v-model="startPot"
|
||||||
|
size="small"
|
||||||
|
placeholder="请选择起点库区">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options1"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="13" style="text-align: right; line-height: 36px">
|
||||||
|
<span
|
||||||
|
class="num1-startPot-status"
|
||||||
|
style="background-color: #5ab45a" />
|
||||||
|
可选
|
||||||
|
<span class="num1-startPot-status" />
|
||||||
|
不可选
|
||||||
|
<span
|
||||||
|
class="num1-startPot-status"
|
||||||
|
style="background-color: #e9b100" />
|
||||||
|
已选
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="potTitleBG">
|
||||||
|
<div v-for="item in Object.keys(startPotList)" :key="item">
|
||||||
|
<div class="potTitle">
|
||||||
|
{{ item }}
|
||||||
|
</div>
|
||||||
|
<div class="potList">
|
||||||
|
<div
|
||||||
|
class="pot"
|
||||||
|
v-for="sitem in startPotList[item]"
|
||||||
|
:key="sitem.id"
|
||||||
|
:style="{
|
||||||
|
backgroundColor: potBGcolor[sitem.status],
|
||||||
|
cursor: sitem.status > 0 ? 'pointer' : '',
|
||||||
|
}"
|
||||||
|
@click="sitem.status > 0 && setStartPot(sitem)"
|
||||||
|
:title="sitem.name">
|
||||||
|
{{ sitem.name }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
<div style="text-align: right">可用库存总量 <span style="color:#409EFF;font-size:16px">12</span> 盘</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="stepNum == 2">
|
||||||
|
<div class="topTip">
|
||||||
|
1.指定终点库位,下发后会锁定所属巷道仅本批次任务进入。
|
||||||
|
<br />
|
||||||
|
2.指定终点库位选位规则:仅可从巷道最里空对位选位。
|
||||||
|
<br />
|
||||||
|
3.只选择库区或巷道时,该方式下当前终点为候选位置,系统将根据策略与现场实际情况自动确定最终终点库位。
|
||||||
|
</div>
|
||||||
|
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||||
|
步骤二:选择终点
|
||||||
|
</small-title>
|
||||||
|
</div>
|
||||||
|
<div v-if="stepNum == 3">
|
||||||
|
<small-title style="margin: 16px 0" size="sm" :no-padding="true">
|
||||||
|
步骤三:预览与下发
|
||||||
|
</small-title>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import SmallTitle from './SmallTitle';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
SmallTitle,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dotArr: [
|
||||||
|
{
|
||||||
|
name: '选择起点',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '选择终点',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '预览下发',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
potBGcolor: ['', '#dafadc', '#f8f0c4'],
|
||||||
|
stepNum: 1, // 当前第几步
|
||||||
|
//第一步参数
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
val1: undefined,
|
||||||
|
val2: undefined,
|
||||||
|
val3: undefined,
|
||||||
|
val4: undefined,
|
||||||
|
val5: 1,
|
||||||
|
},
|
||||||
|
options1: [
|
||||||
|
{
|
||||||
|
label: '产品',
|
||||||
|
value: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '空盘',
|
||||||
|
value: 2,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
dataRule: {},
|
||||||
|
startPot: undefined, //起点库区选择的类型
|
||||||
|
startPotList: {
|
||||||
|
//起点库区List
|
||||||
|
G01: [
|
||||||
|
{
|
||||||
|
id: '001',
|
||||||
|
name: 'L001',
|
||||||
|
status: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '002',
|
||||||
|
name: 'R002',
|
||||||
|
status: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '003',
|
||||||
|
name: 'L003',
|
||||||
|
status: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '004',
|
||||||
|
name: 'R004',
|
||||||
|
status: 0,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
G02: [
|
||||||
|
{
|
||||||
|
id: '005',
|
||||||
|
name: 'L005',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '006',
|
||||||
|
name: 'R006',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '007',
|
||||||
|
name: 'L007',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '008',
|
||||||
|
name: 'R008',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(id) {
|
||||||
|
this.dataForm.id = id || undefined;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//上一步
|
||||||
|
upSubmit() {
|
||||||
|
if (this.stepNum == 2) {
|
||||||
|
this.stepNum -= 1;
|
||||||
|
this.$emit('setSN', this.stepNum);
|
||||||
|
} else if (this.stepNum == 3) {
|
||||||
|
this.stepNum -= 1;
|
||||||
|
this.$emit('setSN', this.stepNum);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//下一步
|
||||||
|
nextSubmit() {
|
||||||
|
if (this.stepNum == 1) {
|
||||||
|
this.stepNum += 1;
|
||||||
|
this.$emit('setSN', this.stepNum);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.stepNum == 2) {
|
||||||
|
this.stepNum += 1;
|
||||||
|
this.$emit('setSN', this.stepNum);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.stepNum == 3) {
|
||||||
|
this.stepNum = 1;
|
||||||
|
this.$emit('setSN', this.stepNum);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
cancelStep() {},
|
||||||
|
|
||||||
|
// 第一步方法
|
||||||
|
setStartPot(data) {
|
||||||
|
data.status = data.status == 1 ? 2 : 1;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.topTip {
|
||||||
|
background-color: #ebebeb;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 5px;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<!-- //库位点的样式 -->
|
||||||
|
<style scoped>
|
||||||
|
.potBG-div {
|
||||||
|
width: 100%;
|
||||||
|
margin: 10px;
|
||||||
|
border: 1px solid gainsboro;
|
||||||
|
box-shadow: 2px 2px 2px gainsboro, -1px -1px 3px gainsboro;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
.num1-startPot-status {
|
||||||
|
margin-left: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 14px;
|
||||||
|
height: 14px;
|
||||||
|
border: 1px solid gainsboro;
|
||||||
|
}
|
||||||
|
.potTitleBG {
|
||||||
|
margin-top: 10px;
|
||||||
|
overflow-x: auto;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.potTitle {
|
||||||
|
width: 82px;
|
||||||
|
background-color: rgb(169, 235, 249);
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-right: 5px;
|
||||||
|
text-align: center;
|
||||||
|
color: #000000;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.potList {
|
||||||
|
width: 82px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 40px 40px;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
.pot {
|
||||||
|
width: 40px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid gainsboro;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 5px 0;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- //序号圆点 -->
|
||||||
|
<style scoped>
|
||||||
|
.circle-container {
|
||||||
|
height: 110px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 20px;
|
||||||
|
width: 90%;
|
||||||
|
overflow-x: auto;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle-wrapper {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
width: 52px;
|
||||||
|
height: 52px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #8db1ff;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 31px;
|
||||||
|
color: #ffffff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.circle-text {
|
||||||
|
position: absolute;
|
||||||
|
top: 60px;
|
||||||
|
left: -15px;
|
||||||
|
color: #8db1ff;
|
||||||
|
width: 82px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 下半圆虚线边框 */
|
||||||
|
.circle::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
bottom: -6px; /* 2px边框 + 2px间隙 */
|
||||||
|
left: -4px;
|
||||||
|
right: -4px;
|
||||||
|
height: 30px; /* 半圆高度 */
|
||||||
|
border-radius: 0 0 60px 60px;
|
||||||
|
border: 1px dashed #0b58ff;
|
||||||
|
border-top: none;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.connector {
|
||||||
|
width: 160px; /* 计算连接线长度 */
|
||||||
|
height: 2px;
|
||||||
|
border-bottom: 1px dashed rgb(11, 88, 255, 1);
|
||||||
|
margin: 0 5px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
273
src/views/cost/components/detailDrawer.vue
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-07 17:01:51
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-07 22:31:17
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
:visible.sync="visible"
|
||||||
|
:with-header="false"
|
||||||
|
size="50%"
|
||||||
|
@close="closeD"
|
||||||
|
:show-close="false">
|
||||||
|
<div class="bgDiv1">
|
||||||
|
<el-row :gutter="20" style="margin-bottom: 15px">
|
||||||
|
<el-col :span="8" style="font-size: 20px; font-weight: 600">
|
||||||
|
TSK202510230001
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">满盘搬运(自动)</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
上次刷新:{{ parseTime(Date.now()) }}
|
||||||
|
<el-button type="text" @click="refresh">刷新</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">任务状态</el-col>
|
||||||
|
<el-col :span="8">优先级</el-col>
|
||||||
|
<el-col :span="8">执行车辆</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20" style="margin-bottom: 15px">
|
||||||
|
<el-col :span="8">
|
||||||
|
<span
|
||||||
|
:style="{ backgroundColor: statusColor[1].color }"
|
||||||
|
class="taskStatus">
|
||||||
|
{{ statusColor[1].label }}
|
||||||
|
</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">中</el-col>
|
||||||
|
<el-col :span="8">--</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">执行时长</el-col>
|
||||||
|
<el-col :span="8">创建人</el-col>
|
||||||
|
<el-col :span="8">创建时间</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">--</el-col>
|
||||||
|
<el-col :span="8">系统/张三</el-col>
|
||||||
|
<el-col :span="8">{{ parseTime(Date.now()) }}</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="bgDiv2">
|
||||||
|
<el-steps
|
||||||
|
:active="stepNum"
|
||||||
|
finish-status="success"
|
||||||
|
:process-status="stepStatus"
|
||||||
|
align-center>
|
||||||
|
<el-step title="待下发"></el-step>
|
||||||
|
<el-step title="待执行"></el-step>
|
||||||
|
<el-step title="执行中"></el-step>
|
||||||
|
<el-step title="已完成"></el-step>
|
||||||
|
</el-steps>
|
||||||
|
<div class="abnormal">任务异常:无效路径</div>
|
||||||
|
</div>
|
||||||
|
<div class="bgDiv3">
|
||||||
|
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||||
|
搬运对象
|
||||||
|
</small-title>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="pan-info">
|
||||||
|
<div class="pan-title">L盘</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="pan-info">
|
||||||
|
<div class="pan-title">R盘</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<div class="bgDiv4">
|
||||||
|
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||||
|
回收信息
|
||||||
|
</small-title>
|
||||||
|
<el-descriptions :column="2" size="medium" border>
|
||||||
|
<el-descriptions-item label="回收方式">他车回收</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="回收任务编号">
|
||||||
|
18100000000
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="回收库位">
|
||||||
|
CK-01-A05-L / R
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="执行车辆">AGV-06</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<div class="bgDiv5">
|
||||||
|
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||||
|
任务明细
|
||||||
|
</small-title>
|
||||||
|
<el-descriptions :column="2" size="medium" border>
|
||||||
|
<el-descriptions-item label="起点库位(L/R)">
|
||||||
|
CK-01-A05-L / R
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="终点库位(L/R)">
|
||||||
|
CC-02-B03-L/R (候选 )
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="起点策略">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="终点策略">入库策略</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="FMS任务号">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="车辆位置">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="电量">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="是否载货">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="创建方式">自动/人工</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="任务来源">
|
||||||
|
PDA/PC/系统
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="关联叫料单">--</el-descriptions-item>
|
||||||
|
<el-descriptions-item label=""></el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
<div class="bgDiv6">
|
||||||
|
<small-title style="margin: 0 0 8px 0" size="sm" :no-padding="true">
|
||||||
|
任务日志
|
||||||
|
</small-title>
|
||||||
|
<el-timeline style="padding: 0">
|
||||||
|
<el-timeline-item
|
||||||
|
v-for="(activity, index) in activities"
|
||||||
|
:key="index"
|
||||||
|
:type="activity.type"
|
||||||
|
:color="activity.color"
|
||||||
|
size="large"
|
||||||
|
hide-timestamp>
|
||||||
|
<span>{{ activity.content }}</span>
|
||||||
|
<span style="float: right">{{ activity.timestamp }}</span>
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
</div>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
|
||||||
|
<!-- 底部按钮 -->
|
||||||
|
<div class="drawer-body__footer">
|
||||||
|
<el-button @click="closeD">返 回</el-button>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import SmallTitle from './SmallTitle';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: '',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
statusColor: [
|
||||||
|
//bgDiv1的任务状态
|
||||||
|
{ label: '待下发', color: '#fa8c16' },
|
||||||
|
{ label: '待执行', color: '#1890ff' },
|
||||||
|
{ label: '执行中', color: '#1890ff' },
|
||||||
|
{ label: '已完成', color: '#52c41a' },
|
||||||
|
{ label: '暂停中', color: '#8c8c8c' },
|
||||||
|
{ label: '已终止', color: '#faad14' },
|
||||||
|
{ label: '异常', color: '#ff4d4f' },
|
||||||
|
{ label: '禁用', color: '#d9d9d9' },
|
||||||
|
],
|
||||||
|
//bgDiv2的步骤条
|
||||||
|
stepNum: 2,
|
||||||
|
stepStatus: 'finish',
|
||||||
|
//bgDiv6的时间线
|
||||||
|
|
||||||
|
activities: [
|
||||||
|
{
|
||||||
|
content: 'FMS | 卸货完成,任务完成',
|
||||||
|
timestamp: '2018-04-12 20:46',
|
||||||
|
type: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content: 'FMS | 取货完成',
|
||||||
|
timestamp: '2018-04-03 20:46',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content: 'FMS | 派车AGV-03,前往起点取货',
|
||||||
|
timestamp: '2018-04-03 20:46',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
content: '张三 | 任务扫码配对完成,进入待下发',
|
||||||
|
timestamp: '2018-04-03 20:46',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
SmallTitle,
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
init(val) {
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
//刷新
|
||||||
|
refresh() {},
|
||||||
|
closeD() {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('closeDrawer');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.bgDiv1 {
|
||||||
|
background-color: rgba(242, 242, 242, 0.5);
|
||||||
|
padding: 20px;
|
||||||
|
line-height: 25px;
|
||||||
|
font-size: 15px;
|
||||||
|
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||||
|
.taskStatus {
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 2px 5px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bgDiv2 {
|
||||||
|
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||||
|
padding: 18px 0;
|
||||||
|
.abnormal {
|
||||||
|
width: 80%;
|
||||||
|
margin: auto;
|
||||||
|
border-radius: 5px;
|
||||||
|
height: 40px;
|
||||||
|
font-size: 22px;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgba(217, 0, 27, 0.1);
|
||||||
|
color: rgba(217, 0, 27, 1);
|
||||||
|
border: 1px solid rgba(217, 0, 27, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bgDiv3 {
|
||||||
|
padding: 20px 20px 0;
|
||||||
|
.pan-info {
|
||||||
|
height: 350px;
|
||||||
|
border: 1px solid rgba(121, 121, 121, 0.8);
|
||||||
|
border-radius: 5px;
|
||||||
|
.pan-title {
|
||||||
|
background-color: rgba(242, 242, 242, 0.5);
|
||||||
|
height: 35px;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 35px;
|
||||||
|
padding: 0 20px;
|
||||||
|
border-bottom: 1px solid rgba(121, 121, 121, 0.5);
|
||||||
|
letter-spacing: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bgDiv4 {
|
||||||
|
padding: 20px 20px 0;
|
||||||
|
}
|
||||||
|
.bgDiv5 {
|
||||||
|
padding: 20px 20px 0;
|
||||||
|
}
|
||||||
|
.bgDiv6 {
|
||||||
|
padding: 20px 20px 0;
|
||||||
|
}
|
||||||
|
.drawer-body__footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 0 18px 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
65
src/views/cost/components/stopInStock.vue
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-11-08 17:44:05
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-08 18:13:25
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div>请选择要执行的终止方式,系统会根据选择进行处理</div>
|
||||||
|
<el-radio-group v-model="radio" class="stockRadioDiv">
|
||||||
|
<el-radio :label="1" border style="margin: 10px 0">
|
||||||
|
仅终止,稍后回收
|
||||||
|
<div style="font-weight: 400">
|
||||||
|
任务立即终止,车辆保持暂停,稍后可在任务列表中手动回收
|
||||||
|
</div>
|
||||||
|
</el-radio>
|
||||||
|
<el-radio :label="2" border style="margin: 10px 0">
|
||||||
|
终止,并立即回收
|
||||||
|
<div style="font-weight: 400">
|
||||||
|
任务立即终止立即,选择货物回收方式生成任务或更新卸货点
|
||||||
|
</div>
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div>
|
||||||
|
终止原因:
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="3"
|
||||||
|
style="margin: 10px 0"
|
||||||
|
placeholder="请输入终止原因"
|
||||||
|
v-model="textarea" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
radio: 1,
|
||||||
|
textarea: '',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(val) {},
|
||||||
|
submit() {
|
||||||
|
if(this.textarea){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.$message('请输入终止原因');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.stockRadioDiv >>> .el-radio--medium.is-bordered {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 70px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
32
src/views/cost/components/subSpan1.vue
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 16:18:41
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-06 15:19:24
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<span>
|
||||||
|
{{
|
||||||
|
(injectData.val2
|
||||||
|
? ['满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.val2]
|
||||||
|
: '-')
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
32
src/views/cost/components/subSpan2.vue
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 16:18:41
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-06 15:20:43
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<span>
|
||||||
|
{{
|
||||||
|
(injectData.val3
|
||||||
|
? ['待下发', '待执行', '执行中', '已完成', '暂停中', '已终止', '异常'][injectData.val3]
|
||||||
|
: '-')
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
57
src/views/cost/components/subSpan3.vue
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 16:18:41
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-06 15:37:02
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div style="display: flex; align-items: center">
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #e89b24;
|
||||||
|
color: #fff;
|
||||||
|
text-align:center;
|
||||||
|
line-height:16px
|
||||||
|
">
|
||||||
|
L
|
||||||
|
</div>
|
||||||
|
产品名称+产品规格
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center">
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #6a96ec;
|
||||||
|
color: #fff;
|
||||||
|
text-align:center;
|
||||||
|
line-height:16px
|
||||||
|
">
|
||||||
|
R
|
||||||
|
</div>
|
||||||
|
产品名称+产品规格
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
32
src/views/cost/components/subSpan4.vue
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2025-10-13 16:18:41
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-06 15:19:24
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<span>
|
||||||
|
{{
|
||||||
|
(injectData.val2
|
||||||
|
? ['满盘搬运', '空盘搬运', '备料搬运', '临时搬运'][injectData.val2]
|
||||||
|
: '-')
|
||||||
|
}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
23
src/views/cost/components/typeRule.vue
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-12-05 13:45:59
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2024-04-15 17:12:03
|
||||||
|
* @Description
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<span>{{ parseTime(injectData.startTime,'{y}年{m}月{d}日') + '-' + (parseTime(injectData.endTime)?parseTime(injectData.endTime,'{y}年{m}月{d}日'):'永久') }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: '',
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div style="background: #f2f4f9; height: 40px; width: 100%">
|
<!-- <div style="background: #f2f4f9; height: 40px; width: 100%">
|
||||||
<ButtonNav :menus="['按日期', '按规格']" @change="currentMenu">
|
<ButtonNav :menus="['按日期', '按规格']" @change="currentMenu">
|
||||||
<template v-slot:tab1>
|
<template v-slot:tab1>
|
||||||
<div>按日期</div>
|
<div>按日期</div>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<div>按规格</div>
|
<div>按规格</div>
|
||||||
</template>
|
</template>
|
||||||
</ButtonNav>
|
</ButtonNav>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="app-container energyOverlimitLog">
|
<div class="app-container energyOverlimitLog">
|
||||||
<div v-show="activeName === 'his'">
|
<div v-show="activeName === 'his'">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getNavDataList" />
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@@ -86,32 +86,36 @@ import ButtonNav from '@/components/ButtonNav';
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '日期',
|
label: '日期',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'originArea',
|
prop: 'originArea',
|
||||||
label: '原片下片面积',
|
label: '原片下片面积',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'deepArea',
|
prop: 'deepArea',
|
||||||
label: '深加工下片面积',
|
label: '深加工下片面积',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'originPrice',
|
prop: 'originPrice',
|
||||||
label: '原片成本/元',
|
label: '原片成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'deepPrice',
|
prop: 'deepPrice',
|
||||||
label: '深加工成本/元',
|
label: '深加工成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'price',
|
prop: 'price',
|
||||||
label: '总成本/元',
|
label: '总成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tableProps2 = [
|
const tableProps2 = [
|
||||||
@@ -244,19 +248,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.statisticType === 2) {
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年第{w}周');
|
|
||||||
}else{
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年{m}月{d}日');
|
|
||||||
}
|
|
||||||
this.formConfig2[0].startPlaceholder = '开始时间';
|
this.formConfig2[0].startPlaceholder = '开始时间';
|
||||||
this.formConfig2[0].endPlaceholder = '结束时间';
|
this.formConfig2[0].endPlaceholder = '结束时间';
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.bindObjectId = val.name || null;
|
this.listQuery.bindObjectId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
@@ -274,7 +271,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.bindObjectId = val.name || null;
|
this.listQuery.bindObjectId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
@@ -334,12 +331,19 @@ export default {
|
|||||||
this.otherMethods(val);
|
this.otherMethods(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getNavDataList(){
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
let exportURL, title;
|
let exportURL, title;
|
||||||
if (this.activeName === 'his') {
|
if (this.activeName === 'his') {
|
||||||
exportURL = exportCostSumExcel;
|
exportURL = exportCostSumExcel;
|
||||||
title = '总成本统计-按日期';
|
title = '总成本统计';
|
||||||
} else {
|
} else {
|
||||||
exportURL = exportRawStatisticsRealtimeExcel;
|
exportURL = exportRawStatisticsRealtimeExcel;
|
||||||
title = '总成本统计-按规格';
|
title = '总成本统计-按规格';
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export default {
|
|||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name||null;
|
this.listQuery.name = val.name||null;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name;
|
this.listQuery.name = val.name;
|
||||||
this.listQuery.recTime = val.searchTime;
|
this.listQuery.recTime = val.searchTime;
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getNavDataList" />
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@@ -86,24 +86,27 @@ import ButtonNav from '@/components/ButtonNav';
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '日期',
|
label: '日期',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'energyTypeName',
|
prop: 'energyTypeName',
|
||||||
label: '能源类型',
|
label: '能源类型',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'bindObjectName',
|
// prop: 'bindObjectName',
|
||||||
label: '监控对象',
|
// label: '监控对象',
|
||||||
filter: (val) => (val != null ? val : '--'),
|
// filter: (val) => (val != null ? val : '--'),
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
prop: 'meterName',
|
// prop: 'meterName',
|
||||||
label: '抄表名',
|
// label: '抄表名',
|
||||||
filter: (val) => (val != null ? val : '--'),
|
// filter: (val) => (val != null ? val : '--'),
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'quantity',
|
prop: 'quantity',
|
||||||
label: '累计使用量',
|
label: '累计使用量',
|
||||||
@@ -115,20 +118,24 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tableProps2 = [
|
const tableProps2 = [
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'energyTypeName',
|
prop: 'energyTypeName',
|
||||||
label: '能源类型',
|
label: '能源类型',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'bindObjectName',
|
// prop: 'bindObjectName',
|
||||||
label: '监控对象',
|
// label: '监控对象',
|
||||||
filter: (val) => (val != null ? val : '--'),
|
// filter: (val) => (val != null ? val : '--'),
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
prop: 'meter',
|
// prop: 'meter',
|
||||||
label: '抄表名',
|
// label: '抄表名',
|
||||||
filter: (val) => (val != null ? val : '--'),
|
// filter: (val) => (val != null ? val : '--'),
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'quantity',
|
prop: 'quantity',
|
||||||
label: '累计使用量',
|
label: '累计使用量',
|
||||||
@@ -207,13 +214,16 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间范围',
|
label: '时间范围',
|
||||||
dateType: 'daterange',
|
dateType: 'datetimerange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
|
defaultTime: ['08:30:00', '08:30:00'],
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
width: 350,
|
||||||
|
clearable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@@ -262,26 +272,18 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.statisticType === 2) {
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年第{w}周');
|
|
||||||
}else{
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年{m}月{d}日');
|
|
||||||
}
|
|
||||||
this.formConfig2[1].startPlaceholder = '开始时间';
|
|
||||||
this.formConfig2[1].endPlaceholder = '结束时间';
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.energyTypeId = val.name || null;
|
this.listQuery.energyTypeId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
: null;
|
: null;
|
||||||
if (this.activeName === 'his') {
|
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
} else {
|
} else {
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
@@ -292,13 +294,18 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.energyTypeId = val.name || null;
|
this.listQuery.energyTypeId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1]
|
||||||
|
: null;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
: null;
|
: null;
|
||||||
|
}
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -320,15 +327,26 @@ export default {
|
|||||||
const end = new Date();
|
const end = new Date();
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
|
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
|
||||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
|
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
|
||||||
this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
|
this.$nextTick(() => {
|
||||||
this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
|
this.$refs.searchBarForm2.formInline.searchTime = [
|
||||||
|
this.listQuery.startTime,
|
||||||
|
this.listQuery.endTime,
|
||||||
|
];
|
||||||
|
});
|
||||||
this.listQuery.name = null;
|
this.listQuery.name = null;
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getNavDataList(){
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取数据2列表
|
// 获取数据2列表
|
||||||
getDataList2() {
|
getDataList2() {
|
||||||
if (this.listQuery.startTime) {
|
if (this.listQuery.startTime) {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getNavDataList" />
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '日期',
|
label: '日期',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'otherCostName',
|
prop: 'otherCostName',
|
||||||
@@ -99,9 +102,14 @@ const tableProps = [
|
|||||||
prop: 'price',
|
prop: 'price',
|
||||||
label: '总价(元)',
|
label: '总价(元)',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tableProps2 = [
|
const tableProps2 = [
|
||||||
|
// {
|
||||||
|
// prop: 'remark',
|
||||||
|
// label: '备注',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'otherCostName',
|
prop: 'otherCostName',
|
||||||
label: '成本名称',
|
label: '成本名称',
|
||||||
@@ -110,6 +118,7 @@ const tableProps2 = [
|
|||||||
prop: 'price',
|
prop: 'price',
|
||||||
label: '总价(元)',
|
label: '总价(元)',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
export default {
|
export default {
|
||||||
@@ -182,13 +191,16 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间范围',
|
label: '时间范围',
|
||||||
dateType: 'daterange',
|
dateType: 'datetimerange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
|
defaultTime: ['08:30:00', '08:30:00'],
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
width: 350,
|
||||||
|
clearable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@@ -237,26 +249,20 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.statisticType === 2) {
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年第{w}周');
|
|
||||||
}else{
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年{m}月{d}日');
|
|
||||||
}
|
|
||||||
this.formConfig2[1].startPlaceholder = '开始时间';
|
|
||||||
this.formConfig2[1].endPlaceholder = '结束时间';
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name || null;
|
this.listQuery.name = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1]
|
||||||
: null;
|
: null;
|
||||||
if (this.activeName === 'his') {
|
if (this.activeName === 'his') {
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
|
: null;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
} else {
|
} else {
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
@@ -267,13 +273,18 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name || null;
|
this.listQuery.name = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1]
|
||||||
|
: null;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
: null;
|
: null;
|
||||||
|
}
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -295,15 +306,26 @@ export default {
|
|||||||
const end = new Date();
|
const end = new Date();
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
|
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
|
||||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
|
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
|
||||||
this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
|
this.$nextTick(() => {
|
||||||
this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
|
this.$refs.searchBarForm2.formInline.searchTime = [
|
||||||
|
this.listQuery.startTime,
|
||||||
|
this.listQuery.endTime,
|
||||||
|
];
|
||||||
|
});
|
||||||
this.listQuery.name = null;
|
this.listQuery.name = null;
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getNavDataList(){
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取数据2列表
|
// 获取数据2列表
|
||||||
getDataList2() {
|
getDataList2() {
|
||||||
getRawOthercostSunPage(this.listQuery).then((response) => {
|
getRawOthercostSunPage(this.listQuery).then((response) => {
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ const tableProps = [
|
|||||||
prop: 'price',
|
prop: 'price',
|
||||||
label: '成本金额',
|
label: '成本金额',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
@@ -161,7 +162,7 @@ export default {
|
|||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name||null;
|
this.listQuery.name = val.name||null;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
@@ -174,7 +175,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name||null;
|
this.listQuery.name = val.name||null;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
<span>
|
<span>
|
||||||
{{
|
{{
|
||||||
injectData.type == 1
|
injectData.type == 1
|
||||||
? `每天等价,${injectData.price}元`
|
? `每天等价,${Number(injectData.price)}元`
|
||||||
: injectData.type == 2
|
: injectData.type == 2
|
||||||
? `总价${injectData.price}元,年折旧率${injectData.ratio}%,折旧年限${injectData.timeLimit}年`
|
? `总价${Number(injectData.price)}元,年折旧率${injectData.ratio}%,折旧年限${injectData.timeLimit}年`
|
||||||
: '-'
|
: '-'
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getNavDataList" />
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@@ -85,9 +85,12 @@ import ButtonNav from '@/components/ButtonNav';
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '日期',
|
label: '日期',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'productionLineName',
|
prop: 'productionLineName',
|
||||||
@@ -100,22 +103,27 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'innum',
|
prop: 'innum',
|
||||||
label: '上片数量',
|
label: '上片数量',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'outnum',
|
prop: 'outnum',
|
||||||
label: '下片数量',
|
label: '下片数量',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'ratio',
|
prop: 'ratio',
|
||||||
label: '良品率',
|
label: '良品率',
|
||||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tableProps2 = [
|
const tableProps2 = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '日期',
|
label: '日期',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'productionLineName',
|
prop: 'productionLineName',
|
||||||
@@ -128,15 +136,17 @@ const tableProps2 = [
|
|||||||
{
|
{
|
||||||
prop: 'innum',
|
prop: 'innum',
|
||||||
label: '进片数量',
|
label: '进片数量',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'outnum',
|
prop: 'outnum',
|
||||||
label: '出片数量',
|
label: '出片数量',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'ratio',
|
prop: 'ratio',
|
||||||
label: '良品率',
|
label: '良品率',
|
||||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
export default {
|
export default {
|
||||||
@@ -170,13 +180,15 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间范围',
|
label: '时间范围',
|
||||||
dateType: 'daterange',
|
dateType: 'datetimerange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
|
defaultTime: ['08:30:00', '08:30:00'],
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
width: 350,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@@ -225,22 +237,15 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.statisticType === 2) {
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年第{w}周');
|
|
||||||
}else{
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年{m}月{d}日');
|
|
||||||
}
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.productionLineId = val.name || null;
|
this.listQuery.productionLineId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1]
|
||||||
: null;
|
: null;
|
||||||
if (this.activeName === 'his') {
|
if (this.activeName === 'his') {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
@@ -253,12 +258,12 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.productionLineId = val.name || null;
|
this.listQuery.productionLineId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1]
|
||||||
: null;
|
: null;
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
break;
|
break;
|
||||||
@@ -309,10 +314,20 @@ export default {
|
|||||||
this.otherMethods(val);
|
this.otherMethods(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getNavDataList(){
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
successSubmit() {
|
successSubmit() {
|
||||||
this.handleCancel();
|
this.handleCancel();
|
||||||
const val = this.activeName === 'his' ? '产线良品率' : 'now';
|
if (this.activeName === 'his') {
|
||||||
this.currentMenu(val);
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getNavDataList" />
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '时间',
|
label: '时间',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'bindObjectName',
|
prop: 'bindObjectName',
|
||||||
@@ -102,33 +105,42 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'inCount',
|
prop: 'inCount',
|
||||||
label: '上片数量',
|
label: '上片数量',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'outCount',
|
prop: 'outCount',
|
||||||
label: '下片数量',
|
label: '下片数量',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'ratio',
|
prop: 'ratio',
|
||||||
label: '良品率',
|
label: '良品率',
|
||||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costSum',
|
prop: 'costSum',
|
||||||
label: '深加工成本/元',
|
label: '深加工成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costPiece',
|
prop: 'costPiece',
|
||||||
label: '单片成本/元',
|
label: '单片成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costArea',
|
prop: 'costArea',
|
||||||
label: '每平米成本/元',
|
label: '每平米成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tableProps2 = [
|
const tableProps2 = [
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'bindObjectName',
|
prop: 'bindObjectName',
|
||||||
label: '产线',
|
label: '产线',
|
||||||
@@ -140,30 +152,35 @@ const tableProps2 = [
|
|||||||
{
|
{
|
||||||
prop: 'inCount',
|
prop: 'inCount',
|
||||||
label: '上片数量',
|
label: '上片数量',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'outCount',
|
prop: 'outCount',
|
||||||
label: '下片数量',
|
label: '下片数量',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'ratio',
|
prop: 'ratio',
|
||||||
label: '良品率',
|
label: '良品率',
|
||||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costSum',
|
prop: 'costSum',
|
||||||
label: '深加工成本/元',
|
label: '深加工成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costPiece',
|
prop: 'costPiece',
|
||||||
label: '单片成本/元',
|
label: '单片成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costArea',
|
prop: 'costArea',
|
||||||
label: '每平米成本/元',
|
label: '每平米成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
export default {
|
export default {
|
||||||
@@ -225,13 +242,16 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间范围',
|
label: '时间范围',
|
||||||
dateType: 'daterange',
|
dateType: 'datetimerange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
|
defaultTime: ['08:30:00', '08:30:00'],
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
width: 350,
|
||||||
|
clearable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@@ -288,26 +308,20 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.statisticType === 2) {
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年第{w}周');
|
|
||||||
}else{
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年{m}月{d}日');
|
|
||||||
}
|
|
||||||
this.formConfig2[0].startPlaceholder = '开始时间';
|
|
||||||
this.formConfig2[0].endPlaceholder = '结束时间';
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.bindObjectId = val.name || null;
|
this.listQuery.bindObjectId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1]
|
||||||
: null;
|
: null;
|
||||||
if (this.activeName === 'his') {
|
if (this.activeName === 'his') {
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
|
: null;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
} else {
|
} else {
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
@@ -318,13 +332,18 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.bindObjectId = val.name || null;
|
this.listQuery.bindObjectId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1]
|
||||||
|
: null;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
: null;
|
: null;
|
||||||
|
}
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -346,15 +365,26 @@ export default {
|
|||||||
const end = new Date();
|
const end = new Date();
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
|
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
|
||||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
|
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
|
||||||
this.formConfig2[0].startPlaceholder = parseTime(start).substr(0, 10);
|
this.$nextTick(() => {
|
||||||
this.formConfig2[0].endPlaceholder = parseTime(end).substr(0, 10);
|
this.$refs.searchBarForm2.formInline.searchTime = [
|
||||||
|
this.listQuery.startTime,
|
||||||
|
this.listQuery.endTime,
|
||||||
|
];
|
||||||
|
});
|
||||||
this.listQuery.name = null;
|
this.listQuery.name = null;
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getNavDataList(){
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取数据2列表
|
// 获取数据2列表
|
||||||
getDataList2() {
|
getDataList2() {
|
||||||
if (this.listQuery.startTime) {
|
if (this.listQuery.startTime) {
|
||||||
|
|||||||
45
src/views/cost/index.vue
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<div class="home-page">
|
||||||
|
<div
|
||||||
|
class="main-footer"
|
||||||
|
style="
|
||||||
|
color: #c7c7c7;
|
||||||
|
user-select: none;
|
||||||
|
font-size: 14px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
height: 30px;
|
||||||
|
display: grid;
|
||||||
|
place-content: center;
|
||||||
|
">
|
||||||
|
© 中建材智能自动化研究院有限公司
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Home',
|
||||||
|
mixins: [],
|
||||||
|
components: {},
|
||||||
|
computed: {},
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<style lang="scss">
|
||||||
|
</style>
|
||||||
199
src/views/cost/indexDetail.vue
Normal file
@@ -0,0 +1,199 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<search-bar
|
||||||
|
:formConfigs="formConfig"
|
||||||
|
ref="searchBarForm"
|
||||||
|
@headBtnClick="buttonClick" />
|
||||||
|
<base-table
|
||||||
|
:table-props="tableProps1"
|
||||||
|
:page="1"
|
||||||
|
:limit="100"
|
||||||
|
:table-data="tableData1"></base-table>
|
||||||
|
<base-table
|
||||||
|
:table-props="tableProps2"
|
||||||
|
:page="1"
|
||||||
|
:limit="100"
|
||||||
|
:table-data="tableData2"></base-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getDetailData } from '@/api/cost/allCost';
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
|
const tableProps1 = [
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
label: '成本项目-原片',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'f1',
|
||||||
|
label: '本期领用',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
prop: 'quantity',
|
||||||
|
label: '数量',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'price',
|
||||||
|
label: '单价',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'sumPrice',
|
||||||
|
label: '金额',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'sprice',
|
||||||
|
label: '单位成本',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const tableProps2 = [
|
||||||
|
{
|
||||||
|
prop: 'name',
|
||||||
|
label: '成本项目-加工',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'quantity',
|
||||||
|
label: '耗用数量',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'price',
|
||||||
|
label: '平均耗用单价',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'sumPrice',
|
||||||
|
label: '总成本',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'sprice',
|
||||||
|
label: '综合单位成本',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableProps1,
|
||||||
|
tableData1: [],
|
||||||
|
tableProps2,
|
||||||
|
tableData2: [],
|
||||||
|
listQuery: {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNo: 1,
|
||||||
|
statisticType: 1,
|
||||||
|
},
|
||||||
|
activeName: '日',
|
||||||
|
startTime:
|
||||||
|
moment(new Date()).subtract(1, 'days').format('YYYY-MM-DD') +
|
||||||
|
' 00:00:00',
|
||||||
|
endTime:
|
||||||
|
moment(new Date()).subtract(-1, 'days').format('YYYY-MM-DD') +
|
||||||
|
' 00:00:00',
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '维度',
|
||||||
|
selectOptions: [
|
||||||
|
{ id: 1, name: '日' },
|
||||||
|
{ id: 2, name: '周' },
|
||||||
|
{ id: 3, name: '月' },
|
||||||
|
{ id: 4, name: '年' },
|
||||||
|
],
|
||||||
|
param: 'statisticType',
|
||||||
|
defaultSelect: 1, // 默认值,
|
||||||
|
clearable: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// 日期选择
|
||||||
|
type: 'datePicker',
|
||||||
|
// label: '日期',
|
||||||
|
dateType: 'date',
|
||||||
|
placeholder: '选择日期',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
valueFormat: 'yyyy-MM-dd',
|
||||||
|
param: 'timeday',
|
||||||
|
clearable: false,
|
||||||
|
pickerOptions: {
|
||||||
|
disabledDate(time) {
|
||||||
|
return (time.getTime()+ 3600 * 1000 * 24) > Date.now();
|
||||||
|
},
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
text: '今天',
|
||||||
|
onClick(picker) {
|
||||||
|
picker.$emit('pick', new Date());
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '昨天',
|
||||||
|
onClick(picker) {
|
||||||
|
const date = new Date();
|
||||||
|
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
||||||
|
picker.$emit('pick', date);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '一周前',
|
||||||
|
onClick(picker) {
|
||||||
|
const date = new Date();
|
||||||
|
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
|
picker.$emit('pick', date);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '搜索',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'separate',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '返回首页',
|
||||||
|
name: 'back',
|
||||||
|
color: 'warning',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
mounted() {
|
||||||
|
this.listQuery.startTime = this.startTime;
|
||||||
|
this.$refs.searchBarForm.formInline.timeday = this.startTime.substr(0, 10)
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList() {
|
||||||
|
getDetailData(this.listQuery).then((response) => {
|
||||||
|
this.tableData1 = response.data.odata;
|
||||||
|
this.tableData2 = response.data.ddata;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
console.log(val.timeday)
|
||||||
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
|
this.listQuery.startTime = val.timeday
|
||||||
|
? val.timeday + ' 00:00:00'
|
||||||
|
: null;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'back':
|
||||||
|
this.$router.go(-1)
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -77,7 +77,7 @@ export default {
|
|||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name||null;
|
this.listQuery.name = val.name||null;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
@@ -90,7 +90,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name;
|
this.listQuery.name = val.name;
|
||||||
this.listQuery.recTime = val.searchTime;
|
this.listQuery.recTime = val.searchTime;
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getNavDataList" />
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@@ -86,24 +86,27 @@ import ButtonNav from '@/components/ButtonNav';
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '日期',
|
label: '日期',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'energyTypeName',
|
prop: 'energyTypeName',
|
||||||
label: '能源类型',
|
label: '能源类型',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'bindObjectName',
|
// prop: 'bindObjectName',
|
||||||
label: '监控对象',
|
// label: '监控对象',
|
||||||
filter: (val) => (val != null ? val : '--'),
|
// filter: (val) => (val != null ? val : '--'),
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
prop: 'meterName',
|
// prop: 'meterName',
|
||||||
label: '抄表名',
|
// label: '抄表名',
|
||||||
filter: (val) => (val != null ? val : '--'),
|
// filter: (val) => (val != null ? val : '--'),
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'quantity',
|
prop: 'quantity',
|
||||||
label: '累计使用量',
|
label: '累计使用量',
|
||||||
@@ -115,20 +118,24 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tableProps2 = [
|
const tableProps2 = [
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'energyTypeName',
|
prop: 'energyTypeName',
|
||||||
label: '能源类型',
|
label: '能源类型',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'bindObjectName',
|
// prop: 'bindObjectName',
|
||||||
label: '监控对象',
|
// label: '监控对象',
|
||||||
filter: (val) => (val != null ? val : '--'),
|
// filter: (val) => (val != null ? val : '--'),
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
prop: 'meter',
|
// prop: 'meter',
|
||||||
label: '抄表名',
|
// label: '抄表名',
|
||||||
filter: (val) => (val != null ? val : '--'),
|
// filter: (val) => (val != null ? val : '--'),
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'quantity',
|
prop: 'quantity',
|
||||||
label: '累计使用量',
|
label: '累计使用量',
|
||||||
@@ -207,13 +214,16 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间范围',
|
label: '时间范围',
|
||||||
dateType: 'daterange',
|
dateType: 'datetimerange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
|
defaultTime: ['08:30:00', '08:30:00'],
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
width: 350,
|
||||||
|
clearable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@@ -237,10 +247,11 @@ export default {
|
|||||||
activeName: 'his',
|
activeName: 'his',
|
||||||
tableProps,
|
tableProps,
|
||||||
tableProps2,
|
tableProps2,
|
||||||
tableBtn: [{
|
tableBtn: [
|
||||||
|
{
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
}
|
},
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableData2: [],
|
tableData2: [],
|
||||||
@@ -262,26 +273,18 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.statisticType === 2) {
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年第{w}周');
|
|
||||||
}else{
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年{m}月{d}日');
|
|
||||||
}
|
|
||||||
this.formConfig2[1].startPlaceholder = '开始时间';
|
|
||||||
this.formConfig2[1].endPlaceholder = '结束时间';
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.energyTypeId = val.name || null;
|
this.listQuery.energyTypeId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
: null;
|
: null;
|
||||||
if (this.activeName === 'his') {
|
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
} else {
|
} else {
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
@@ -292,13 +295,16 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.energyTypeId = val.name || null;
|
this.listQuery.energyTypeId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
: null;
|
: null;
|
||||||
|
}
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -320,15 +326,26 @@ export default {
|
|||||||
const end = new Date();
|
const end = new Date();
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
|
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
|
||||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
|
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
|
||||||
this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
|
this.$nextTick(() => {
|
||||||
this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
|
this.$refs.searchBarForm2.formInline.searchTime = [
|
||||||
|
this.listQuery.startTime,
|
||||||
|
this.listQuery.endTime,
|
||||||
|
];
|
||||||
|
});
|
||||||
this.listQuery.name = null;
|
this.listQuery.name = null;
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getNavDataList() {
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取数据2列表
|
// 获取数据2列表
|
||||||
getDataList2() {
|
getDataList2() {
|
||||||
if (this.listQuery.startTime) {
|
if (this.listQuery.startTime) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-09-05 15:34:28
|
* @LastEditTime: 2024-12-27 09:18:43
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
placeholder="请输入原料名称" />
|
placeholder="请输入原料名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="单价" prop="matPrice">
|
<el-form-item label="单价" prop="matPrice">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.matPrice"
|
v-model="dataForm.matPrice"
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
placeholder="请输入单价" />
|
placeholder="请输入单价" />
|
||||||
(元/吨)
|
(元/吨)
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="累计用量" prop="quantity">
|
<el-form-item label="累计用量" prop="quantity">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
|||||||
35
src/views/cost/raw/costMaterial/changeStatus.vue
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<template>
|
||||||
|
<el-switch
|
||||||
|
@change="changeStatus"
|
||||||
|
size="small"
|
||||||
|
v-model="list.enabled"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"></el-switch>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updateGroup } from '@/api/group/groupSetting';
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
injectData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: this.injectData,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
changeStatus(val) {
|
||||||
|
const data = { ...this.injectData, enabled: val };
|
||||||
|
updateGroup(data).then((res) => {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.$emit('emitData');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getNavDataList" />
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '日期',
|
label: '日期',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'materialName',
|
prop: 'materialName',
|
||||||
@@ -97,13 +100,13 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'quantity',
|
prop: 'quantity',
|
||||||
label: '累计使用量(吨)',
|
label: '累计使用量(千克)',
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'matPrice',
|
|
||||||
label: '单价(元/吨)',
|
|
||||||
align: 'right',
|
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// prop: 'matPrice',
|
||||||
|
// label: '单价(元/千克)',
|
||||||
|
// align: 'right',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'price',
|
prop: 'price',
|
||||||
label: '总价(元)',
|
label: '总价(元)',
|
||||||
@@ -111,6 +114,10 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tableProps2 = [
|
const tableProps2 = [
|
||||||
|
// {
|
||||||
|
// prop: 'remark',
|
||||||
|
// label: '备注',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'materialName',
|
prop: 'materialName',
|
||||||
label: '原料名称',
|
label: '原料名称',
|
||||||
@@ -123,13 +130,13 @@ const tableProps2 = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'quantity',
|
prop: 'quantity',
|
||||||
label: '累计使用量(吨)',
|
label: '累计使用量(千克)',
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'materialPrice',
|
|
||||||
label: '单价(元/吨)',
|
|
||||||
align: 'right',
|
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// prop: 'materialPrice',
|
||||||
|
// label: '单价(元/千克)',
|
||||||
|
// align: 'right',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'price',
|
prop: 'price',
|
||||||
label: '总价(元)',
|
label: '总价(元)',
|
||||||
@@ -204,13 +211,16 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间范围',
|
label: '时间范围',
|
||||||
dateType: 'daterange',
|
dateType: 'datetimerange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
|
defaultTime: ['08:30:00', '08:30:00'],
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
width: 350,
|
||||||
|
clearable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@@ -234,10 +244,11 @@ export default {
|
|||||||
activeName: 'his',
|
activeName: 'his',
|
||||||
tableProps,
|
tableProps,
|
||||||
tableProps2,
|
tableProps2,
|
||||||
tableBtn: [{
|
tableBtn: [
|
||||||
|
{
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
}
|
},
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableData2: [],
|
tableData2: [],
|
||||||
@@ -259,26 +270,20 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.statisticType === 2) {
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年第{w}周');
|
|
||||||
}else{
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年{m}月{d}日');
|
|
||||||
}
|
|
||||||
this.formConfig2[1].startPlaceholder = '开始时间';
|
|
||||||
this.formConfig2[1].endPlaceholder = '结束时间';
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.materialId = val.name || null;
|
this.listQuery.materialId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1]
|
||||||
: null;
|
: null;
|
||||||
if (this.activeName === 'his') {
|
if (this.activeName === 'his') {
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
|
: null;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
} else {
|
} else {
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
@@ -289,13 +294,18 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.materialId = val.name || null;
|
this.listQuery.materialId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1]
|
||||||
|
: null;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
: null;
|
: null;
|
||||||
|
}
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -317,15 +327,26 @@ export default {
|
|||||||
const end = new Date();
|
const end = new Date();
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
|
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
|
||||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
|
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
|
||||||
this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10);
|
this.$nextTick(() => {
|
||||||
this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10);
|
this.$refs.searchBarForm2.formInline.searchTime = [
|
||||||
|
this.listQuery.startTime,
|
||||||
|
this.listQuery.endTime,
|
||||||
|
];
|
||||||
|
});
|
||||||
this.listQuery.name = null;
|
this.listQuery.name = null;
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getNavDataList() {
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取数据2列表
|
// 获取数据2列表
|
||||||
getDataList2() {
|
getDataList2() {
|
||||||
if (this.listQuery.startTime) {
|
if (this.listQuery.startTime) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-09-05 15:33:16
|
* @LastEditTime: 2025-06-13 10:59:54
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -15,7 +15,9 @@
|
|||||||
label-width="80px">
|
label-width="80px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="产线" prop="bindObjectName">
|
<el-form-item
|
||||||
|
:label="activeName === 'his' ? '产线' : '工段'"
|
||||||
|
prop="bindObjectName">
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="dataForm.bindObjectName"
|
v-model="dataForm.bindObjectName"
|
||||||
@@ -33,7 +35,7 @@
|
|||||||
placeholder="选择所属日期"></el-date-picker>
|
placeholder="选择所属日期"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="activeName === 'his'">
|
||||||
<el-form-item label="厚度" prop="thick">
|
<el-form-item label="厚度" prop="thick">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:min="0"
|
:min="0"
|
||||||
@@ -43,7 +45,7 @@
|
|||||||
placeholder="请输入厚度" />
|
placeholder="请输入厚度" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="activeName === 'his'">
|
||||||
<el-form-item label="在线速度" prop="speed">
|
<el-form-item label="在线速度" prop="speed">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:min="0"
|
:min="0"
|
||||||
@@ -53,7 +55,7 @@
|
|||||||
placeholder="请输入在线速度" />
|
placeholder="请输入在线速度" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12" v-if="activeName === 'his'">
|
||||||
<el-form-item label="掰边宽度" prop="width">
|
<el-form-item label="掰边宽度" prop="width">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:min="0"
|
:min="0"
|
||||||
@@ -64,25 +66,27 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="拉引量" prop="inArea">
|
<el-form-item
|
||||||
|
:label="activeName === 'his' ? '拉引量' : '进片数'"
|
||||||
|
prop="inArea">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:min="0"
|
:min="0"
|
||||||
style="width: 85%"
|
style="width: 85%"
|
||||||
v-model="dataForm.inArea"
|
v-model="dataForm.inArea"
|
||||||
clearable
|
clearable />
|
||||||
placeholder="请输入拉引量" />
|
{{ activeName === 'his' ? '(m²)' : '片' }}
|
||||||
(m²)
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="下片面积" prop="outArea">
|
<el-form-item
|
||||||
|
:label="activeName === 'his' ? '下片面积' : '出片数'"
|
||||||
|
prop="outArea">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:min="0"
|
:min="0"
|
||||||
style="width: 85%"
|
style="width: 85%"
|
||||||
v-model="dataForm.outArea"
|
v-model="dataForm.outArea"
|
||||||
clearable
|
clearable />
|
||||||
placeholder="请输入下片面积" />
|
{{ activeName === 'his' ? '(m²)' : '片' }}
|
||||||
(m²)
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -129,10 +133,12 @@ export default {
|
|||||||
recTime: undefined,
|
recTime: undefined,
|
||||||
},
|
},
|
||||||
dataRule: {},
|
dataRule: {},
|
||||||
|
activeName: 'his',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(val, statisticType) {
|
init(val, statisticType, activeName) {
|
||||||
|
this.activeName = activeName;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['dataForm'].resetFields();
|
this.$refs['dataForm'].resetFields();
|
||||||
@@ -148,17 +154,22 @@ export default {
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const udata = {
|
let udata = {
|
||||||
id: this.dataForm.id,
|
id: this.dataForm.id,
|
||||||
statisticType: this.dataForm.statisticType,
|
statisticType: this.dataForm.statisticType,
|
||||||
modifyThick: this.dataForm.thick,
|
|
||||||
modifySpeed: this.dataForm.speed,
|
|
||||||
modifyWidth: this.dataForm.width,
|
|
||||||
modifyInArea: this.dataForm.inArea,
|
modifyInArea: this.dataForm.inArea,
|
||||||
modifyOutArea: this.dataForm.outArea,
|
modifyOutArea: this.dataForm.outArea,
|
||||||
modifyRatio:
|
modifyRatio:
|
||||||
this.dataForm.ratio >= 0 ? this.dataForm.ratio / 100 : '',
|
this.dataForm.ratio >= 0 ? this.dataForm.ratio / 100 : '',
|
||||||
};
|
};
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
udata = {
|
||||||
|
...udata,
|
||||||
|
modifyThick: this.dataForm.thick,
|
||||||
|
modifySpeed: this.dataForm.speed,
|
||||||
|
modifyWidth: this.dataForm.width,
|
||||||
|
};
|
||||||
|
}
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
this.urlOptions.updateURL(udata).then((response) => {
|
this.urlOptions.updateURL(udata).then((response) => {
|
||||||
this.$modal.msgSuccess('修改成功');
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
|||||||
@@ -1,11 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
|
<div style="background: #f2f4f9; height: 40px; width: 100%">
|
||||||
|
<ButtonNav :menus="['产线良品率', '工段良品率']" @change="currentMenu">
|
||||||
|
<template v-slot:tab1>
|
||||||
|
<div>产线良品率</div>
|
||||||
|
</template>
|
||||||
|
<template v-slot:tab2>
|
||||||
|
<div>工段良品率</div>
|
||||||
|
</template>
|
||||||
|
</ButtonNav>
|
||||||
|
</div>
|
||||||
<div class="app-container energyOverlimitLog">
|
<div class="app-container energyOverlimitLog">
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<search-bar
|
<search-bar
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
|
<div v-if="activeName === 'his'">
|
||||||
<base-table
|
<base-table
|
||||||
:page="listQuery.pageNo"
|
:page="listQuery.pageNo"
|
||||||
:limit="listQuery.pageSize"
|
:limit="listQuery.pageSize"
|
||||||
@@ -20,11 +31,28 @@
|
|||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick" />
|
@clickBtn="handleClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
|
</div>
|
||||||
|
<div v-if="activeName === 'now'">
|
||||||
|
<base-table
|
||||||
|
:page="listQuery.pageNo"
|
||||||
|
:limit="listQuery.pageSize"
|
||||||
|
:table-props="tableProps2"
|
||||||
|
:table-data="tableData2"
|
||||||
|
:max-height="tableH">
|
||||||
|
<method-btn
|
||||||
|
v-if="tableBtn.length"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="80"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick" />
|
||||||
|
</base-table>
|
||||||
|
</div>
|
||||||
<pagination
|
<pagination
|
||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getNavDataList" />
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@@ -38,22 +66,34 @@
|
|||||||
@refreshDataList="successSubmit"></add-or-update>
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AddOrUpdate from './add-or-updata';
|
import AddOrUpdate from './add-or-updata';
|
||||||
import basicPage from '@/mixins/basic-page';
|
import basicPage from '@/mixins/basic-page';
|
||||||
import { getLinePage } from '@/api/base/productionLine';
|
import { getLinePage } from '@/api/base/productionLine';
|
||||||
import { getcostOriginRatioHisPage,exportcostOriginRatioHisExcel } from '@/api/cost/costOriginRatioHis';
|
import {
|
||||||
|
getcostOriginRatioHisPage,
|
||||||
|
getcostOriginWSRatioHisPage,
|
||||||
|
exportcostOriginWSRatioHisExcel,
|
||||||
|
exportcostOriginRatioHisExcel,
|
||||||
|
} from '@/api/cost/costOriginRatioHis';
|
||||||
import { parseTime } from '@/filter/code-filter';
|
import { parseTime } from '@/filter/code-filter';
|
||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||||
|
import ButtonNav from '@/components/ButtonNav';
|
||||||
|
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '日期',
|
label: '日期',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
|
||||||
width:130,
|
width:130,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'bindObjectName',
|
prop: 'bindObjectName',
|
||||||
label: '产线',
|
label: '产线',
|
||||||
@@ -62,27 +102,67 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'thick',
|
prop: 'thick',
|
||||||
label: '厚度',
|
label: '厚度',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(1) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'speed',
|
prop: 'speed',
|
||||||
label: '在线速度',
|
label: '在线速度',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'width',
|
prop: 'width',
|
||||||
label: '掰边宽度',
|
label: '掰边宽度',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inArea',
|
prop: 'inArea',
|
||||||
label: '拉引量/m²',
|
label: '拉引量/m²',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'outArea',
|
prop: 'outArea',
|
||||||
label: '下片面积/m²',
|
label: '下片面积/m²',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'ratio',
|
prop: 'ratio',
|
||||||
label: '良品率',
|
label: '良品率',
|
||||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const tableProps2 = [
|
||||||
|
{
|
||||||
|
prop: 'time',
|
||||||
|
label: '日期',
|
||||||
|
width:130,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'bindObjectName',
|
||||||
|
label: '工段',
|
||||||
|
width:145,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'spec',
|
||||||
|
label: '规格',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'inArea',
|
||||||
|
label: '进片数',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'outArea',
|
||||||
|
label: '出片数',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'ratio',
|
||||||
|
label: '良品率',
|
||||||
|
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
export default {
|
export default {
|
||||||
@@ -116,13 +196,15 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间范围',
|
label: '时间范围',
|
||||||
dateType: 'daterange',
|
dateType: 'datetimerange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
|
defaultTime: ['08:30:00', '08:30:00'],
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
width: 350,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@@ -143,23 +225,27 @@ export default {
|
|||||||
listQuery: {
|
listQuery: {
|
||||||
statisticType: 1,
|
statisticType: 1,
|
||||||
},
|
},
|
||||||
|
activeName: 'his',
|
||||||
tableProps,
|
tableProps,
|
||||||
|
tableProps2,
|
||||||
tableBtn: [{
|
tableBtn: [{
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
}
|
}
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
tableData2: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate,
|
AddOrUpdate,
|
||||||
|
ButtonNav,
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const params ={
|
const params ={
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
pdType: 1
|
pdType: 0
|
||||||
}
|
}
|
||||||
getLinePage(params).then((response) => {
|
getLinePage(params).then((response) => {
|
||||||
this.formConfig[1].selectOptions = response.data.list;
|
this.formConfig[1].selectOptions = response.data.list;
|
||||||
@@ -167,36 +253,33 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.statisticType === 2) {
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年第{w}周');
|
|
||||||
}else{
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年{m}月{d}日');
|
|
||||||
}
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.bindObjectId = val.name || null;
|
this.listQuery.bindObjectId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1]
|
||||||
: null;
|
: null;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'add':
|
case 'add':
|
||||||
this.addOrUpdateHandle();
|
this.addOrUpdateHandle();
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.bindObjectId = val.name || null;
|
this.listQuery.bindObjectId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1]
|
||||||
: null;
|
: null;
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
break;
|
break;
|
||||||
@@ -204,23 +287,74 @@ export default {
|
|||||||
console.log(val);
|
console.log(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
currentMenu(val) {
|
||||||
|
this.activeName = val === '产线良品率' ? 'his' : 'now';
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery.bindObjectId = null;
|
||||||
|
this.listQuery.startTime = null;
|
||||||
|
this.listQuery.endTime = null;
|
||||||
|
this.listQuery.statisticType = 1;
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery.bindObjectId = null;
|
||||||
|
this.listQuery.startTime = null;
|
||||||
|
this.listQuery.endTime = null;
|
||||||
|
this.listQuery.statisticType = 1;
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取数据2列表
|
||||||
|
getDataList2() {
|
||||||
|
getcostOriginWSRatioHisPage(this.listQuery).then((response) => {
|
||||||
|
this.tableData2 = response.data.list;
|
||||||
|
this.listQuery.total = response.data.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
//tableBtn点击
|
//tableBtn点击
|
||||||
handleClick(val) {
|
handleClick(val) {
|
||||||
if (val.type === 'edit') {
|
if (val.type === 'edit') {
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.addOrEditTitle = '编辑';
|
this.addOrEditTitle = '编辑';
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addOrUpdate.init(val.data, this.listQuery.statisticType);
|
this.$refs.addOrUpdate.init(
|
||||||
|
val.data,
|
||||||
|
this.listQuery.statisticType,
|
||||||
|
this.activeName
|
||||||
|
);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.otherMethods(val);
|
this.otherMethods(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getNavDataList(){
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
successSubmit() {
|
||||||
|
this.handleCancel();
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
let exportURL, title;
|
let exportURL, title;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
exportURL = exportcostOriginRatioHisExcel;
|
exportURL = exportcostOriginRatioHisExcel;
|
||||||
title = '原片成本-原片良品率';
|
title = '原片-产线良品率';
|
||||||
|
} else {
|
||||||
|
exportURL = exportcostOriginWSRatioHisExcel;
|
||||||
|
title = '原片-工段良品率';
|
||||||
|
}
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.listQuery };
|
let params = { ...this.listQuery };
|
||||||
params.pageNo = undefined;
|
params.pageNo = undefined;
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getNavDataList" />
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '日期',
|
label: '日期',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'otherCostName',
|
prop: 'otherCostName',
|
||||||
@@ -102,6 +105,10 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tableProps2 = [
|
const tableProps2 = [
|
||||||
|
// {
|
||||||
|
// prop: 'remark',
|
||||||
|
// label: '备注',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
prop: 'otherCostName',
|
prop: 'otherCostName',
|
||||||
label: '成本名称',
|
label: '成本名称',
|
||||||
@@ -182,13 +189,16 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间范围',
|
label: '时间范围',
|
||||||
dateType: 'daterange',
|
dateType: 'datetimerange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
|
defaultTime: ['08:30:00', '08:30:00'],
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
width: 350,
|
||||||
|
clearable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@@ -237,24 +247,20 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.statisticType === 2) {
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年第{w}周');
|
|
||||||
}else{
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年{m}月{d}日');
|
|
||||||
}
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name || null;
|
this.listQuery.name = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1]
|
||||||
: null;
|
: null;
|
||||||
if (this.activeName === 'his') {
|
if (this.activeName === 'his') {
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
|
: null;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
} else {
|
} else {
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
@@ -265,13 +271,18 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name || null;
|
this.listQuery.name = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1]
|
||||||
|
: null;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
: null;
|
: null;
|
||||||
|
}
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -297,6 +308,13 @@ export default {
|
|||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getNavDataList(){
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取数据2列表
|
// 获取数据2列表
|
||||||
getDataList2() {
|
getDataList2() {
|
||||||
getRawOthercostSunPage(this.listQuery).then((response) => {
|
getRawOthercostSunPage(this.listQuery).then((response) => {
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ const tableProps = [
|
|||||||
prop: 'price',
|
prop: 'price',
|
||||||
label: '成本金额',
|
label: '成本金额',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
@@ -161,7 +162,7 @@ export default {
|
|||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name||null;
|
this.listQuery.name = val.name||null;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
@@ -174,7 +175,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.name = val.name||null;
|
this.listQuery.name = val.name||null;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-12-05 13:45:59
|
* @Date: 2023-12-05 13:45:59
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2024-04-15 17:12:03
|
* @LastEditTime: 2024-12-25 16:20:38
|
||||||
* @Description
|
* @Description
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -10,9 +10,9 @@
|
|||||||
<span>
|
<span>
|
||||||
{{
|
{{
|
||||||
injectData.type == 1
|
injectData.type == 1
|
||||||
? `每天等价,${injectData.price}元`
|
? `每天等价,${Number(injectData.price)}元`
|
||||||
: injectData.type == 2
|
: injectData.type == 2
|
||||||
? `总价${injectData.price}元,年折旧率${injectData.ratio}%,折旧年限${injectData.timeLimit}年`
|
? `总价${Number(injectData.price)}元,年折旧率${injectData.ratio}%,折旧年限${injectData.timeLimit}年`
|
||||||
: '-'
|
: '-'
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" />
|
@pagination="getNavDataList" />
|
||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="addOrEditTitle"
|
:dialogTitle="addOrEditTitle"
|
||||||
:dialogVisible="addOrUpdateVisible"
|
:dialogVisible="addOrUpdateVisible"
|
||||||
@@ -87,9 +87,12 @@ import ButtonNav from '@/components/ButtonNav';
|
|||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'recTime',
|
prop: 'time',
|
||||||
label: '时间',
|
label: '时间',
|
||||||
filter: (val) => parseTime(val, '{y}年{m}月{d}日'),
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'bindObjectName',
|
prop: 'bindObjectName',
|
||||||
@@ -98,32 +101,41 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'thick',
|
prop: 'thick',
|
||||||
label: '厚度',
|
label: '厚度',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(1) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inArea',
|
prop: 'inArea',
|
||||||
label: '拉引量/m²',
|
label: '拉引量/m²',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'outArea',
|
prop: 'outArea',
|
||||||
label: '下片面积/m²',
|
label: '下片面积/m²',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'ratio',
|
prop: 'ratio',
|
||||||
label: '良品率',
|
label: '良品率',
|
||||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costSum',
|
prop: 'costSum',
|
||||||
label: '原片成本/元',
|
label: '原片成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costArea',
|
prop: 'costArea',
|
||||||
label: '每平米成本/元',
|
label: '每平米成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tableProps2 = [
|
const tableProps2 = [
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'bindObjectName',
|
prop: 'bindObjectName',
|
||||||
label: '产线',
|
label: '产线',
|
||||||
@@ -135,34 +147,40 @@ const tableProps2 = [
|
|||||||
{
|
{
|
||||||
prop: 'inArea',
|
prop: 'inArea',
|
||||||
label: '拉引量/m²',
|
label: '拉引量/m²',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'outArea',
|
prop: 'outArea',
|
||||||
label: '下片面积/m²',
|
label: '下片面积/m²',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'outCount',
|
prop: 'outCount',
|
||||||
label: '下片数量',
|
label: '下片数量',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'ratio',
|
prop: 'ratio',
|
||||||
label: '良品率',
|
label: '良品率',
|
||||||
filter: (val) => (val ? val * 100 + '%' : '-'),
|
filter: (val) => (val ? Number(val * 100).toFixed(2) + '%' : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costSum',
|
prop: 'costSum',
|
||||||
label: '原片成本/元',
|
label: '原片成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costPiece',
|
prop: 'costPiece',
|
||||||
label: '单片成本/元',
|
label: '单片成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'costArea',
|
prop: 'costArea',
|
||||||
label: '每平米成本/元',
|
label: '每平米成本/元',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
|
filter: (val) => (val != null ? Number(val).toFixed(2) : '-'),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
export default {
|
export default {
|
||||||
@@ -224,13 +242,16 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间范围',
|
label: '时间范围',
|
||||||
dateType: 'daterange',
|
dateType: 'datetimerange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
|
defaultTime: ['08:30:00', '08:30:00'],
|
||||||
param: 'searchTime',
|
param: 'searchTime',
|
||||||
|
width: 350,
|
||||||
|
clearable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@@ -287,26 +308,20 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
if (val.statisticType === 2) {
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年第{w}周');
|
|
||||||
}else{
|
|
||||||
this.tableProps[0].filter = (val) =>
|
|
||||||
parseTime(val, '{y}年{m}月{d}日');
|
|
||||||
}
|
|
||||||
this.formConfig2[0].startPlaceholder = '开始时间';
|
|
||||||
this.formConfig2[0].endPlaceholder = '结束时间';
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.bindObjectId = val.name || null;
|
this.listQuery.bindObjectId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1]
|
||||||
: null;
|
: null;
|
||||||
if (this.activeName === 'his') {
|
if (this.activeName === 'his') {
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
|
: null;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
} else {
|
} else {
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
@@ -317,13 +332,18 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 20;
|
||||||
this.listQuery.bindObjectId = val.name || null;
|
this.listQuery.bindObjectId = val.name || null;
|
||||||
this.listQuery.statisticType = val.statisticType || 1;
|
this.listQuery.statisticType = val.statisticType || 1;
|
||||||
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
|
||||||
|
this.listQuery.endTime = val.searchTime
|
||||||
|
? val.searchTime[1]
|
||||||
|
: null;
|
||||||
|
if (this.activeName === 'his') {
|
||||||
this.listQuery.endTime = val.searchTime
|
this.listQuery.endTime = val.searchTime
|
||||||
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
? val.searchTime[1].substr(0, 10) + ' 23:59:59'
|
||||||
: null;
|
: null;
|
||||||
|
}
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -345,15 +365,26 @@ export default {
|
|||||||
const end = new Date();
|
const end = new Date();
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00';
|
this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00';
|
||||||
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59';
|
this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00';
|
||||||
this.formConfig2[0].startPlaceholder = parseTime(start).substr(0, 10);
|
this.$nextTick(() => {
|
||||||
this.formConfig2[0].endPlaceholder = parseTime(end).substr(0, 10);
|
this.$refs.searchBarForm2.formInline.searchTime = [
|
||||||
|
this.listQuery.startTime,
|
||||||
|
this.listQuery.endTime,
|
||||||
|
];
|
||||||
|
});
|
||||||
this.listQuery.name = null;
|
this.listQuery.name = null;
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.getDataList2();
|
this.getDataList2();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getNavDataList(){
|
||||||
|
if (this.activeName === 'his') {
|
||||||
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.getDataList2();
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取数据2列表
|
// 获取数据2列表
|
||||||
getDataList2() {
|
getDataList2() {
|
||||||
if (this.listQuery.startTime) {
|
if (this.listQuery.startTime) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-11 14:27:37
|
* @Date: 2025-10-11 14:27:37
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-15 16:47:28
|
* @LastEditTime: 2025-10-29 17:12:04
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -12,6 +12,9 @@
|
|||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
<base-table
|
<base-table
|
||||||
|
ref="groupTableRef"
|
||||||
|
:id="'groupTableSelectRef'"
|
||||||
|
row-key="id"
|
||||||
:selectWidth="55"
|
:selectWidth="55"
|
||||||
@selection-change="selectChange"
|
@selection-change="selectChange"
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
@@ -46,6 +49,7 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
label: '备注',
|
label: '备注',
|
||||||
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -84,21 +88,51 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
},
|
},
|
||||||
selectedList: [],
|
selectedList: [],
|
||||||
deptId: undefined
|
selectedArr: [], //已选的班组,从父组件传过来的
|
||||||
|
deptId: undefined,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
init(id){
|
init(id, tableData) {
|
||||||
this.deptId = id
|
this.deptId = id;
|
||||||
this.getDataList()
|
this.selectedArr = tableData || [];
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.getDataList();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getDataList() {
|
getDataList() {
|
||||||
this.urlOptions
|
this.urlOptions.getDataListURL(this.deptId).then((response) => {
|
||||||
.getDataListURL(this.deptId)
|
|
||||||
.then((response) => {
|
|
||||||
this.tableData = response.data;
|
this.tableData = response.data;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.selectedArr.length > 0) {
|
||||||
|
this.setSelectedRows();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
setSelectedRows() {
|
||||||
|
const table = this.$refs.groupTableRef.$children[0];
|
||||||
|
|
||||||
|
// 先清空选择
|
||||||
|
table.clearSelection();
|
||||||
|
|
||||||
|
this.selectedArr.forEach((item) => {
|
||||||
|
const rowInTable = this.tableData.find((i) => i.id === item.id);
|
||||||
|
if (rowInTable) {
|
||||||
|
//这里一定要用table.tableData,这样才是指向同一个数组
|
||||||
|
this.$set(table.store.states, 'selection', [
|
||||||
|
...table.store.states.selection,
|
||||||
|
table.tableData.find((i) => i.id === item.id),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 强制更新视图
|
||||||
|
this.$nextTick(() => {
|
||||||
|
table.$forceUpdate();
|
||||||
|
this.$forceUpdate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
@@ -115,9 +149,25 @@ export default {
|
|||||||
selectChange(val) {
|
selectChange(val) {
|
||||||
this.selectedList = val;
|
this.selectedList = val;
|
||||||
},
|
},
|
||||||
|
// 判断两个数组是否有重复的 id
|
||||||
|
hasDuplicateIds(arr1, arr2) {
|
||||||
|
const idSet = new Set(arr1.map((item) => item.id));
|
||||||
|
return arr2.some((item) => idSet.has(item.id));
|
||||||
|
},
|
||||||
|
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
if (this.selectedList && this.selectedList.length > 0) {
|
if (this.selectedList && this.selectedList.length > 0) {
|
||||||
|
const haveData = this.hasDuplicateIds(
|
||||||
|
this.selectedArr,
|
||||||
|
this.selectedList
|
||||||
|
);
|
||||||
|
if (haveData) {
|
||||||
|
this.$message('请不要重复添加数组');
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.$emit('refreshTableData', this.selectedList);
|
this.$emit('refreshTableData', this.selectedList);
|
||||||
|
} else if (this.selectedArr.length > 0) {
|
||||||
|
this.$message('请不要重复添加数组');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-13 15:07:24
|
* @Date: 2025-10-13 15:07:24
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-24 09:19:17
|
* @LastEditTime: 2025-10-29 15:28:52
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6" v-if="dataForm.shiftType>1">
|
||||||
<el-form-item label="同班次连排" prop="shiftSustainedNum">
|
<el-form-item label="同班次连排" prop="shiftSustainedNum">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.shiftSustainedNum"
|
v-model="dataForm.shiftSustainedNum"
|
||||||
@@ -289,6 +289,7 @@
|
|||||||
:dialogVisible="addOrUpdateVisible1"
|
:dialogVisible="addOrUpdateVisible1"
|
||||||
@cancel="cancel1"
|
@cancel="cancel1"
|
||||||
@confirm="handleConfirm1"
|
@confirm="handleConfirm1"
|
||||||
|
:before-close="cancel1"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
append-to-body
|
append-to-body
|
||||||
width="40%">
|
width="40%">
|
||||||
@@ -301,6 +302,7 @@
|
|||||||
:dialogVisible="addOrUpdateVisible2"
|
:dialogVisible="addOrUpdateVisible2"
|
||||||
@cancel="cancel2"
|
@cancel="cancel2"
|
||||||
@confirm="handleConfirm2"
|
@confirm="handleConfirm2"
|
||||||
|
:before-close="cancel2"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
append-to-body
|
append-to-body
|
||||||
width="40%">
|
width="40%">
|
||||||
@@ -313,6 +315,7 @@
|
|||||||
:dialogVisible="addOrUpdateVisible3"
|
:dialogVisible="addOrUpdateVisible3"
|
||||||
@cancel="cancel3"
|
@cancel="cancel3"
|
||||||
@confirm="handleConfirm3"
|
@confirm="handleConfirm3"
|
||||||
|
:before-close="cancel3"
|
||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
append-to-body
|
append-to-body
|
||||||
width="50%">
|
width="50%">
|
||||||
@@ -391,6 +394,7 @@ const tableProps2 = [
|
|||||||
{
|
{
|
||||||
prop: 'lineName',
|
prop: 'lineName',
|
||||||
label: '产线及工段',
|
label: '产线及工段',
|
||||||
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -510,6 +514,16 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'bind',
|
type: 'bind',
|
||||||
btnName: '绑定产线',
|
btnName: '绑定产线',
|
||||||
|
showParam: {
|
||||||
|
type: '&',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
type: 'equal',
|
||||||
|
name: 'isProduction',
|
||||||
|
value: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
@@ -640,6 +654,12 @@ export default {
|
|||||||
this.$message('部门不能为空');
|
this.$message('部门不能为空');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const compareDate = this.compareDates(this.dataForm.startDay,this.dataForm.endDay)
|
||||||
|
|
||||||
|
if (compareDate > 0 ) {
|
||||||
|
this.$message('开始时间不能大于结束时间');
|
||||||
|
return;
|
||||||
|
}
|
||||||
createStepOne(this.dataForm).then((res) => {
|
createStepOne(this.dataForm).then((res) => {
|
||||||
if (!this.dataForm.id) {
|
if (!this.dataForm.id) {
|
||||||
this.dataForm.id = res.data;
|
this.dataForm.id = res.data;
|
||||||
@@ -754,6 +774,19 @@ export default {
|
|||||||
setDataForm() {
|
setDataForm() {
|
||||||
this.$refs.deptSelect.setID(this.dataForm.deptId);
|
this.$refs.deptSelect.setID(this.dataForm.deptId);
|
||||||
},
|
},
|
||||||
|
//比较时间,开始时间在结束时间前
|
||||||
|
compareDates(date1, date2) {
|
||||||
|
const d1 = date1;
|
||||||
|
const d2 = date2;
|
||||||
|
|
||||||
|
if (d1 === d2) {
|
||||||
|
return 0; // 日期相等
|
||||||
|
} else if (d1 < d2) {
|
||||||
|
return -1; // date1 在 date2 之前
|
||||||
|
} else {
|
||||||
|
return 1; // date1 在 date2 之后
|
||||||
|
}
|
||||||
|
},
|
||||||
//第二步
|
//第二步
|
||||||
//设置第二部班次
|
//设置第二部班次
|
||||||
setTWOclass() {
|
setTWOclass() {
|
||||||
@@ -830,7 +863,7 @@ export default {
|
|||||||
addNewGroup() {
|
addNewGroup() {
|
||||||
this.addOrUpdateVisible2 = true;
|
this.addOrUpdateVisible2 = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.addGroupRef.init(this.dataForm.deptId);
|
this.$refs.addGroupRef.init(this.dataForm.deptId,this.tableData2);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel1() {
|
cancel1() {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-16 16:37:40
|
* @LastEditTime: 2025-10-30 10:47:09
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -47,6 +47,10 @@ export default {
|
|||||||
this.fromData.forEach((item) => {
|
this.fromData.forEach((item) => {
|
||||||
item.productionLineId = 0;
|
item.productionLineId = 0;
|
||||||
});
|
});
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.toData = val.bindLineTree || [];
|
||||||
|
this.getFilterLeftData(this.fromData, this.toData); //编辑时组件有bug,左边相同数据不消失
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 监听穿梭框组件添加
|
// 监听穿梭框组件添加
|
||||||
@@ -59,6 +63,22 @@ export default {
|
|||||||
console.log('fromData:', fromData);
|
console.log('fromData:', fromData);
|
||||||
console.log('toData:', toData);
|
console.log('toData:', toData);
|
||||||
},
|
},
|
||||||
|
/** 消除组件左边与右边选中数据相同项 */
|
||||||
|
// 处理过滤数据
|
||||||
|
getFilterLeftData(data, selData) {
|
||||||
|
for (let i = data.length - 1; i >= 0; i--) {
|
||||||
|
for (let j = selData.length - 1; j >= 0; j--) {
|
||||||
|
if (data[i] && data[i].id === selData[j].id) {
|
||||||
|
// 当id相等可以删除的情况 即:没有子级可以删除;
|
||||||
|
if (!data[i].children || data[i].children.length == 0) {
|
||||||
|
data.splice(i, 1);
|
||||||
|
} else {
|
||||||
|
this.getFilterLeftData(data[i].children, selData[j].children);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$emit('refreshTableData', this._pageIndex, this.toData);
|
this.$emit('refreshTableData', this._pageIndex, this.toData);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-11 14:27:37
|
* @Date: 2025-10-11 14:27:37
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-23 16:31:41
|
* @LastEditTime: 2025-10-29 14:50:16
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -59,12 +59,14 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
|
v-hasPermi="['base:group-scheduling-plan:query']"
|
||||||
@click="buttonClick({ btnName: 'search' })">
|
@click="buttonClick({ btnName: 'search' })">
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span class="separateStyle"></span>
|
<span class="separateStyle"
|
||||||
|
v-hasPermi="['base:group-scheduling-plan:query']"></span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button size="small" @click="buttonClick({ btnName: 'reset' })">
|
<el-button size="small" @click="buttonClick({ btnName: 'reset' })">
|
||||||
@@ -72,13 +74,15 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span class="separateStyle"></span>
|
<span class="separateStyle"
|
||||||
|
v-hasPermi="['base:group-scheduling-plan:create']"></span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
size="small"
|
size="small"
|
||||||
:plain="true"
|
:plain="true"
|
||||||
|
v-hasPermi="['base:group-scheduling-plan:create']"
|
||||||
@click="buttonClick({ btnName: 'add' })">
|
@click="buttonClick({ btnName: 'add' })">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -264,6 +268,7 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
|
this.$auth.hasPermi('base:group-scheduling-plan:update')?
|
||||||
{
|
{
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
@@ -277,7 +282,8 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
}:undefined,
|
||||||
|
this.$auth.hasPermi('base:group-scheduling-plan:delete')?
|
||||||
{
|
{
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除',
|
btnName: '删除',
|
||||||
@@ -291,7 +297,8 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
}:undefined,
|
||||||
|
this.$auth.hasPermi('base:group-scheduling-plan:query')?
|
||||||
{
|
{
|
||||||
type: 'detail',
|
type: 'detail',
|
||||||
btnName: '查看',
|
btnName: '查看',
|
||||||
@@ -305,7 +312,8 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
}:undefined,
|
||||||
|
this.$auth.hasPermi('base:group-scheduling-plan:delete')?
|
||||||
{
|
{
|
||||||
type: 'cancel',
|
type: 'cancel',
|
||||||
btnName: '作废',
|
btnName: '作废',
|
||||||
@@ -319,7 +327,8 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
}:undefined,
|
||||||
|
this.$auth.hasPermi('base:group-holiday:update')?
|
||||||
{
|
{
|
||||||
type: 'sync',
|
type: 'sync',
|
||||||
btnName: '同步节假日',
|
btnName: '同步节假日',
|
||||||
@@ -332,17 +341,18 @@ export default {
|
|||||||
value: 2,
|
value: 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'updateFlag',
|
type: 'equal',
|
||||||
name: 'status',
|
name: 'updateFlag',
|
||||||
value: true,
|
value: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
}:undefined,
|
||||||
|
this.$auth.hasPermi('base:group-scheduling-plan:create')?
|
||||||
{
|
{
|
||||||
type: 'copy',
|
type: 'copy',
|
||||||
btnName: '复制',
|
btnName: '复制',
|
||||||
},
|
}:undefined,
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
options: [
|
options: [
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-13 15:44:18
|
* @LastEditTime: 2025-10-29 14:47:33
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="部门">
|
<el-form-item label="部门">
|
||||||
<dept-select
|
<dept-select
|
||||||
style="width: 200px"
|
style="width: 100%"
|
||||||
ref="deptSelect"
|
ref="deptSelect"
|
||||||
@DeptId="setDeptId"></dept-select>
|
@DeptId="setDeptId"></dept-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -41,8 +41,10 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="组长" prop="leaderId">
|
<el-form-item label="组长" prop="leaderId">
|
||||||
<el-select
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
v-model="dataForm.leaderId"
|
v-model="dataForm.leaderId"
|
||||||
@change="setLeaderName"
|
@change="setLeaderName"
|
||||||
|
filterable
|
||||||
placeholder="请选择组长">
|
placeholder="请选择组长">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in leaderArr"
|
v-for="item in leaderArr"
|
||||||
@@ -57,12 +59,14 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.leaderPhone"
|
v-model="dataForm.leaderPhone"
|
||||||
clearable
|
clearable
|
||||||
|
maxlength="11"
|
||||||
placeholder="请输入组长电话" />
|
placeholder="请输入组长电话" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="班组人数" prop="num">
|
<el-form-item label="班组人数" prop="num">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
style="width: 100%"
|
||||||
v-model="dataForm.num"
|
v-model="dataForm.num"
|
||||||
:step="1"
|
:step="1"
|
||||||
:min="0"
|
:min="0"
|
||||||
@@ -72,6 +76,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="生产班组" prop="isProduction">
|
<el-form-item label="生产班组" prop="isProduction">
|
||||||
<el-select
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
v-model="dataForm.isProduction"
|
v-model="dataForm.isProduction"
|
||||||
placeholder="请选择是否为生产班组">
|
placeholder="请选择是否为生产班组">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -157,6 +162,13 @@ export default {
|
|||||||
isProduction: [
|
isProduction: [
|
||||||
{ required: true, message: '生产班组不能为空', trigger: 'change' },
|
{ required: true, message: '生产班组不能为空', trigger: 'change' },
|
||||||
],
|
],
|
||||||
|
leaderPhone: [
|
||||||
|
{
|
||||||
|
pattern: /^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/,
|
||||||
|
message: "请输入正确的手机号码",
|
||||||
|
trigger: "blur"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2025-10-11 14:27:37
|
* @Date: 2025-10-11 14:27:37
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-24 09:11:11
|
* @LastEditTime: 2025-10-29 14:44:41
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -45,12 +45,15 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
|
v-hasPermi="['base:group-team:query']"
|
||||||
@click="buttonClick({ btnName: 'search' })">
|
@click="buttonClick({ btnName: 'search' })">
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span class="separateStyle"></span>
|
<span
|
||||||
|
class="separateStyle"
|
||||||
|
v-hasPermi="['base:group-team:query']"></span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button size="small" @click="buttonClick({ btnName: 'reset' })">
|
<el-button size="small" @click="buttonClick({ btnName: 'reset' })">
|
||||||
@@ -58,13 +61,16 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span class="separateStyle"></span>
|
<span
|
||||||
|
class="separateStyle"
|
||||||
|
v-hasPermi="['base:group-team:create']"></span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
size="small"
|
size="small"
|
||||||
:plain="true"
|
:plain="true"
|
||||||
|
v-hasPermi="['base:group-team:create']"
|
||||||
@click="buttonClick({ btnName: 'add' })">
|
@click="buttonClick({ btnName: 'add' })">
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -118,16 +124,16 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '班组编号',
|
label: '班组编号',
|
||||||
width: 140,
|
width: 210,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '班组名称',
|
label: '班组名称',
|
||||||
width: 100,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'deptName',
|
prop: 'deptName',
|
||||||
label: '所属部门',
|
label: '所属部门',
|
||||||
|
width: 110,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'leaderName',
|
prop: 'leaderName',
|
||||||
@@ -136,6 +142,7 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'leaderPhone',
|
prop: 'leaderPhone',
|
||||||
label: '组长电话',
|
label: '组长电话',
|
||||||
|
width: 110,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'num',
|
prop: 'num',
|
||||||
@@ -145,12 +152,15 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'isProduction',
|
prop: 'isProduction',
|
||||||
label: '是否生产班组',
|
label: '是否生产班组',
|
||||||
filter: val=>{return val?'是':'否'},
|
filter: (val) => {
|
||||||
|
return val ? '是' : '否';
|
||||||
|
},
|
||||||
width: 110,
|
width: 110,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
label: '备注',
|
label: '备注',
|
||||||
|
showOverflowtooltip: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
@@ -175,10 +185,12 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
{
|
this.$auth.hasPermi('base:group-team:update')
|
||||||
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
},
|
}
|
||||||
|
: undefined,
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
formInline: {
|
formInline: {
|
||||||
@@ -232,8 +244,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setDeptId(val) {
|
setDeptId(val) {
|
||||||
this.formInline.deptId = val
|
this.formInline.deptId = val;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2024-07-01 14:54:06
|
* @Date: 2024-07-01 14:54:06
|
||||||
* @LastEditors: zwq
|
* @LastEditors: zwq
|
||||||
* @LastEditTime: 2025-10-23 13:52:52
|
* @LastEditTime: 2025-10-27 10:18:54
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -46,10 +46,14 @@
|
|||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="margin-right: 10px"
|
style="margin-right: 10px"
|
||||||
|
v-hasPermi="['base:group-holiday:create']"
|
||||||
@click="addHoliday">
|
@click="addHoliday">
|
||||||
新增节假日
|
新增节假日
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="small" @click="holidayLog">
|
<el-button
|
||||||
|
size="small"
|
||||||
|
v-hasPermi="['base:group-holiday-log:query']"
|
||||||
|
@click="holidayLog">
|
||||||
节假日变更记录
|
节假日变更记录
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -73,7 +77,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="startDay = new Date(),getHolidayPage()">
|
@click="(startDay = new Date()), getHolidayPage()">
|
||||||
跳转到今天
|
跳转到今天
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -203,6 +207,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="btnTextStyle"
|
class="btnTextStyle"
|
||||||
|
v-hasPermi="['base:group-holiday:update']"
|
||||||
@click="editHoliday">
|
@click="editHoliday">
|
||||||
修改
|
修改
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -210,6 +215,7 @@
|
|||||||
v-if="detail"
|
v-if="detail"
|
||||||
class="btnTextStyle"
|
class="btnTextStyle"
|
||||||
size="small"
|
size="small"
|
||||||
|
v-hasPermi="['base:group-holiday:delete']"
|
||||||
@click="deleteHoliday">
|
@click="deleteHoliday">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
background: #26b9de;
|
background: #26b9de;
|
||||||
"></span>
|
"></span>
|
||||||
智能监控分析系统
|
上上电缆
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<video
|
<video
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
line-height: 54px;
|
line-height: 54px;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
">
|
">
|
||||||
智能监控分析系统
|
上上电缆
|
||||||
</h3>
|
</h3>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
@@ -284,7 +284,7 @@ export default {
|
|||||||
mobile: '',
|
mobile: '',
|
||||||
mobileCode: '',
|
mobileCode: '',
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
tenantName: '技术中心',
|
tenantName: '芋道源码',
|
||||||
},
|
},
|
||||||
scene: 21,
|
scene: 21,
|
||||||
|
|
||||||
|
|||||||
81
src/views/product&recipe/product/add-or-updata.vue
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2021-11-18 14:16:25
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-28 14:38:31
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
ref="dataForm"
|
||||||
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-width="80px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料编码" prop="materialCode">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.materialCode"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料编码" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料型号" prop="materialName">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.materialName"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料型号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料规格" prop="material">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.material"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入物料规格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicAdd from '@/mixins/basic-add';
|
||||||
|
import { createProduct, updateProduct,getProduct } from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicAdd],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
createURL: createProduct,
|
||||||
|
updateURL: updateProduct,
|
||||||
|
infoURL: getProduct,
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
material: undefined,
|
||||||
|
materialName: undefined,
|
||||||
|
materialCode: undefined,
|
||||||
|
},
|
||||||
|
typeArr: [],
|
||||||
|
dataRule: {
|
||||||
|
materialCode: [
|
||||||
|
{ required: true, message: '物料编码不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
materialName: [
|
||||||
|
{ required: true, message: '物料型号不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
material: [
|
||||||
|
{ required: true, message: '规格不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
199
src/views/product&recipe/product/index.vue
Normal file
@@ -0,0 +1,199 @@
|
|||||||
|
<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"
|
||||||
|
@emitFun="getDataList">
|
||||||
|
<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" />
|
||||||
|
<base-dialog
|
||||||
|
:dialogTitle="addOrEditTitle"
|
||||||
|
:dialogVisible="addOrUpdateVisible"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
:before-close="handleCancel"
|
||||||
|
width="50%">
|
||||||
|
<add-or-update
|
||||||
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
</base-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import AddOrUpdate from './add-or-updata';
|
||||||
|
import basicPage from '@/mixins/basic-page';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
import { deleteProduct, getProductPage } from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'materialCode',
|
||||||
|
label: '物料编码',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'materialName',
|
||||||
|
label: '物料型号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'material',
|
||||||
|
label: '规格',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'creator',
|
||||||
|
label: '创建人',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'createTime',
|
||||||
|
label: '创建时间',
|
||||||
|
filter: parseTime,
|
||||||
|
width: 150,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getProductPage,
|
||||||
|
deleteURL: deleteProduct,
|
||||||
|
},
|
||||||
|
tableProps,
|
||||||
|
tableBtn: [
|
||||||
|
{
|
||||||
|
type: 'edit',
|
||||||
|
btnName: '编辑',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'delete',
|
||||||
|
btnName: '删除',
|
||||||
|
},
|
||||||
|
].filter((v) => v),
|
||||||
|
tableData: [],
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '型号',
|
||||||
|
placeholder: '型号',
|
||||||
|
param: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '编码',
|
||||||
|
placeholder: '编码',
|
||||||
|
param: 'code',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '搜索',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: 'separate',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'button',
|
||||||
|
// btnName: '重置',
|
||||||
|
// name: 'reset',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
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 = 20;
|
||||||
|
this.listQuery.materialName = val.name;
|
||||||
|
this.listQuery.materialCode = val.code;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'reset':
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery = {
|
||||||
|
pageSize: 20,
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteHandle(id, name, index,data) {
|
||||||
|
this.$confirm(`是否确认删除${'物料型号为 ' + data.materialName + ' '}的数据项?`, "系统提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
65
src/views/product&recipe/recipe/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>
|
||||||
357
src/views/product&recipe/recipe/add-or-updata.vue
Normal file
@@ -0,0 +1,357 @@
|
|||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
:visible.sync="visible"
|
||||||
|
:show-close="false"
|
||||||
|
:wrapper-closable="false"
|
||||||
|
class="drawer"
|
||||||
|
size="60%">
|
||||||
|
<small-title slot="title" :no-padding="true">
|
||||||
|
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
|
</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="8">
|
||||||
|
<el-form-item label="配方规格" prop="processSize">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.processSize"
|
||||||
|
clearable
|
||||||
|
:disabled="isdetail"
|
||||||
|
placeholder="请输入配方规格" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="配方型号" prop="processName">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.processName"
|
||||||
|
clearable
|
||||||
|
:disabled="isdetail"
|
||||||
|
placeholder="请输入配方型号" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="配方描述" prop="processDesc">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.processDesc"
|
||||||
|
clearable
|
||||||
|
:disabled="isdetail"
|
||||||
|
placeholder="请输入配方描述" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<small-title
|
||||||
|
style="margin: 16px 0; padding-left: 8px"
|
||||||
|
:no-padding="true"
|
||||||
|
v-if="dataForm.processName && dataForm.processSize">
|
||||||
|
物料属性列表
|
||||||
|
</small-title>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="attr-list"
|
||||||
|
v-if="dataForm.processName && dataForm.processSize">
|
||||||
|
<base-table
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="listQuery.pageNo"
|
||||||
|
:limit="listQuery.pageSize"
|
||||||
|
:add-button-show="
|
||||||
|
productAttributeList.length > 3 || isdetail ? null : '添加属性'
|
||||||
|
"
|
||||||
|
@emitButtonClick="addNew()"
|
||||||
|
:table-data="productAttributeList">
|
||||||
|
<method-btn
|
||||||
|
v-if="!isdetail"
|
||||||
|
slot="handleBtn"
|
||||||
|
:width="120"
|
||||||
|
label="操作"
|
||||||
|
:method-list="tableBtn"
|
||||||
|
@clickBtn="handleClick" />
|
||||||
|
</base-table>
|
||||||
|
<pagination
|
||||||
|
v-show="listQuery.total > 0"
|
||||||
|
:total="listQuery.total"
|
||||||
|
:page.sync="listQuery.pageNo"
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
:page-sizes="[5, 10, 15]"
|
||||||
|
@pagination="getList" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="drawer-body__footer">
|
||||||
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
|
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button v-else type="primary" @click="dataFormSubmit()">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<product-attr-add
|
||||||
|
v-if="addOrUpdateVisible"
|
||||||
|
ref="addOrUpdate"
|
||||||
|
@refreshDataList="getList" />
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
updateProcess,
|
||||||
|
createProcess,
|
||||||
|
getProcess,
|
||||||
|
getProcessDetailPage,
|
||||||
|
deleteProcess,
|
||||||
|
} from '@/api/ssdl/product&recipe';
|
||||||
|
import productAttrAdd from './attr-add';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
import SmallTitle from './SmallTitle';
|
||||||
|
|
||||||
|
const tableBtn = [
|
||||||
|
{
|
||||||
|
type: 'edit',
|
||||||
|
btnName: '编辑',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'delete',
|
||||||
|
btnName: '删除',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'createTime',
|
||||||
|
label: '添加时间',
|
||||||
|
filter: parseTime,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'materialName',
|
||||||
|
label: '物料型号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'material',
|
||||||
|
label: '物料规格',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'materialNumber',
|
||||||
|
label: '物料数量',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { productAttrAdd, SmallTitle },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
addOrUpdateVisible: false,
|
||||||
|
tableBtn,
|
||||||
|
tableProps,
|
||||||
|
productAttributeList: [],
|
||||||
|
dataForm: {
|
||||||
|
id: null,
|
||||||
|
processName: '', // 配方型号
|
||||||
|
processSize: '', // 配方规格
|
||||||
|
processDesc: '', // 配方描述
|
||||||
|
},
|
||||||
|
listQuery: {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
|
dataRule: {
|
||||||
|
processSize: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '配方规格不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
processName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '配方型号不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
isdetail: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
initData() {
|
||||||
|
this.productAttributeList.splice(0);
|
||||||
|
this.listQuery.total = 0;
|
||||||
|
},
|
||||||
|
init(id, isdetail) {
|
||||||
|
this.initData();
|
||||||
|
this.isdetail = isdetail || false;
|
||||||
|
this.dataForm.id = id || null;
|
||||||
|
this.visible = true;
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields();
|
||||||
|
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
// 获取物料详情
|
||||||
|
getProcess(id).then((response) => {
|
||||||
|
this.dataForm = response.data;
|
||||||
|
// 获取物料的属性列表
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
// 获取物料的属性列表
|
||||||
|
getProcessDetailPage({
|
||||||
|
processName: this.dataForm.processName,
|
||||||
|
processSize: this.dataForm.processSize,
|
||||||
|
pageSize: 100,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
}).then((response) => {
|
||||||
|
this.productAttributeList = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleClick(raw) {
|
||||||
|
if (raw.type === 'delete') {
|
||||||
|
this.$confirm(
|
||||||
|
`确定对${
|
||||||
|
raw.data.name
|
||||||
|
? '[名称=' + raw.data.name + ']'
|
||||||
|
: '[序号=' + raw.data._pageIndex + ']'
|
||||||
|
}进行删除操作?`,
|
||||||
|
'提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
deleteProcess(raw.data.id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
} else {
|
||||||
|
this.addNew(raw.data.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (
|
||||||
|
!this.productAttributeList ||
|
||||||
|
!(this.productAttributeList.length > 0)
|
||||||
|
) {
|
||||||
|
this.$modal.msg('物料属性不能为空');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.productAttributeList.forEach((item) => {
|
||||||
|
item.processName = this.dataForm.processName;
|
||||||
|
item.processSize = this.dataForm.processSize;
|
||||||
|
item.processDesc = this.dataForm.processDesc;
|
||||||
|
});
|
||||||
|
// 修改的提交
|
||||||
|
updateProcess(this.productAttributeList).then((response) => {
|
||||||
|
this.$modal.msgSuccess('提交成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
// 添加的提交
|
||||||
|
createProcess(this.productAttributeList).then((response) => {
|
||||||
|
this.$modal.msgSuccess('新增成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goEdit() {
|
||||||
|
this.isdetail = false;
|
||||||
|
},
|
||||||
|
// 新增 / 修改
|
||||||
|
addNew(id) {
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(id, this.dataForm);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goback() {
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
this.visible = false;
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.drawer >>> .el-drawer {
|
||||||
|
border-radius: 8px 0 0 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer >>> .el-form-item__label {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer >>> .el-drawer__header {
|
||||||
|
margin: 0;
|
||||||
|
padding: 32px 32px 24px;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
}
|
||||||
|
.drawer >>> .el-drawer__body {
|
||||||
|
flex: 1;
|
||||||
|
height: 1px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer >>> .content {
|
||||||
|
padding: 30px 24px;
|
||||||
|
flex: 1;
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body__footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
184
src/views/product&recipe/recipe/attr-add.vue
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="visible"
|
||||||
|
:width="'35%'"
|
||||||
|
:append-to-body="true"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
class="dialog">
|
||||||
|
<template #title>
|
||||||
|
<slot name="title">
|
||||||
|
<div class="titleStyle">
|
||||||
|
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-form
|
||||||
|
ref="dataForm"
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
label-width="100px"
|
||||||
|
@keyup.enter.native="dataFormSubmit()">
|
||||||
|
<!-- <el-form-item label="设备" prop="equipmentId">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.equipmentId"
|
||||||
|
@change="setEquipment"
|
||||||
|
placeholder="请选择设备">
|
||||||
|
<el-option
|
||||||
|
v-for="item in equipmentArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.equipmentName"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="物料" prop="materialId">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="dataForm.materialId"
|
||||||
|
filterable
|
||||||
|
@change="setMaterial"
|
||||||
|
placeholder="请选择物料">
|
||||||
|
<el-option
|
||||||
|
v-for="item in productArr"
|
||||||
|
:key="item.id"
|
||||||
|
:label="
|
||||||
|
item.materialCode + '-' + item.materialName + '-' + item.material
|
||||||
|
"
|
||||||
|
:value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数量" prop="materialNumber">
|
||||||
|
<el-input-number
|
||||||
|
v-model="dataForm.materialNumber"
|
||||||
|
:step="1"
|
||||||
|
step-strictly
|
||||||
|
:min="0"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row style="text-align: right">
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getProductPage,
|
||||||
|
createProcess,
|
||||||
|
getProcess,
|
||||||
|
updateProcess,
|
||||||
|
} from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
dataForm: {
|
||||||
|
id: 0,
|
||||||
|
processId: '', // 配方id
|
||||||
|
processName: '', // 配方型号
|
||||||
|
processSize: '', // 配方规格
|
||||||
|
processDesc: '', // 配方描述
|
||||||
|
materialId: '',
|
||||||
|
material: '',
|
||||||
|
materialName: '',
|
||||||
|
materialNumber: '',
|
||||||
|
},
|
||||||
|
productArr: [],
|
||||||
|
equipmentArr: [],
|
||||||
|
dataRule: {
|
||||||
|
materialId: [
|
||||||
|
{ required: true, message: '物料不能为空', trigger: 'change' },
|
||||||
|
],
|
||||||
|
materialNumber: [
|
||||||
|
{ required: true, message: '数量不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
init(id,data) {
|
||||||
|
this.dataForm.id = id || '';
|
||||||
|
this.dataForm.processId = data.id || '';
|
||||||
|
this.dataForm.processName = data.processName || '';
|
||||||
|
this.dataForm.processSize = data.processSize || '';
|
||||||
|
this.dataForm.processDesc = data.processDesc || '';
|
||||||
|
this.visible = true;
|
||||||
|
getProductPage({ pageNo: 1, pageSize: 100 }).then((res) => {
|
||||||
|
this.productArr = res.data.list;
|
||||||
|
});
|
||||||
|
// getEquipmentPage({ pageNo: 1, pageSize: 100 }).then((res) => {
|
||||||
|
// this.equipmentArr = res.data.list;
|
||||||
|
// });
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields();
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
getProcess(this.dataForm.id).then((res) => {
|
||||||
|
this.dataForm = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
setMaterial() {
|
||||||
|
const data = this.productArr.find(
|
||||||
|
(i) => i.id === this.dataForm.materialId
|
||||||
|
);
|
||||||
|
this.dataForm.materialName = data.materialName;
|
||||||
|
this.dataForm.material = data.material;
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// 修改的提交
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
updateProcess([{
|
||||||
|
...this.dataForm,
|
||||||
|
}]).then((response) => {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 添加的提交
|
||||||
|
createProcess([{
|
||||||
|
...this.dataForm,
|
||||||
|
}]).then((response) => {
|
||||||
|
this.$modal.msgSuccess('新增成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.dialog >>> .el-dialog__body {
|
||||||
|
padding: 30px 24px;
|
||||||
|
}
|
||||||
|
.dialog >>> .el-dialog__header {
|
||||||
|
font-size: 16px;
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 13px 24px;
|
||||||
|
border-bottom: 1px solid #e9e9e9;
|
||||||
|
}
|
||||||
|
.dialog >>> .el-dialog__header .titleStyle::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
258
src/views/product&recipe/recipe/index.vue
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-08-01 14:55:51
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-28 14:34:11
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<search-bar
|
||||||
|
:formConfigs="formConfig"
|
||||||
|
ref="searchBarForm"
|
||||||
|
@headBtnClick="buttonClick" />
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
:header-cell-style="{
|
||||||
|
background: '#F2F4F9',
|
||||||
|
color: '#606266',
|
||||||
|
}"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
ref="dataList">
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<product
|
||||||
|
:processName="scope.row.processName"
|
||||||
|
:processSize="scope.row.processSize"></product>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="processName" label="配方型号" />
|
||||||
|
<el-table-column prop="processSize" label="配方规格" />
|
||||||
|
<el-table-column prop="processDesc" 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="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleClick({ data: { ...scope.row }, type: 'edit' })">
|
||||||
|
<span class="iconfont icon-edit primary-color"></span>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleClick({ data: { ...scope.row }, type: 'delete' })">
|
||||||
|
<span class="iconfont icon-delete" style="color: #f56c6c"></span>
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleClick({ data: { ...scope.row }, type: 'detail' })">
|
||||||
|
<span class="iconfont icon-detail primary-color"></span>
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-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 AddOrUpdate from './add-or-updata';
|
||||||
|
import product from './product-mini';
|
||||||
|
import basicPage from '@/mixins/basic-page';
|
||||||
|
import { parseTime } from '@/filter/code-filter';
|
||||||
|
import {
|
||||||
|
deleteProcessList,
|
||||||
|
getProcessPage,
|
||||||
|
getProcessDetailPage,
|
||||||
|
} from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getProcessPage,
|
||||||
|
deleteURL: deleteProcessList,
|
||||||
|
},
|
||||||
|
tableBtn: [
|
||||||
|
{
|
||||||
|
type: 'edit',
|
||||||
|
btnName: '编辑',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'delete',
|
||||||
|
btnName: '删除',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '详情',
|
||||||
|
},
|
||||||
|
].filter((v) => v),
|
||||||
|
tableData: [],
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '配方型号',
|
||||||
|
placeholder: '配方型号',
|
||||||
|
param: 'val1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
label: '配方规格',
|
||||||
|
placeholder: '配方规格',
|
||||||
|
param: 'val2',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: 'input',
|
||||||
|
// label: '物料型号',
|
||||||
|
// placeholder: '物料型号',
|
||||||
|
// param: 'val3',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'input',
|
||||||
|
// label: '物料编码',
|
||||||
|
// placeholder: '物料编码',
|
||||||
|
// param: 'val4',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '搜索',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: 'separate',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: 'button',
|
||||||
|
// btnName: '重置',
|
||||||
|
// name: 'reset',
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
type: 'separate',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '新增',
|
||||||
|
name: 'add',
|
||||||
|
color: 'success',
|
||||||
|
plain: true,
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// type: 'separate',
|
||||||
|
// type: this.$auth.hasPermi('base:product:create') ? 'separate' : '',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// type: this.$auth.hasPermi('base:product:export') ? 'button' : '',
|
||||||
|
// btnName: '导出',
|
||||||
|
// name: 'export',
|
||||||
|
// color: 'warning',
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate,
|
||||||
|
product,
|
||||||
|
},
|
||||||
|
created() {},
|
||||||
|
methods: {
|
||||||
|
buttonClick(val) {
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.listQuery.pageNo = 1;
|
||||||
|
this.listQuery.pageSize = 20;
|
||||||
|
this.listQuery.processName = val.val1 || null;
|
||||||
|
this.listQuery.processSize = val.val2 || null;
|
||||||
|
// this.listQuery.materialName = val.val3 || null;
|
||||||
|
// this.listQuery.materialCode = val.val4 || null;
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
case 'reset':
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery = {
|
||||||
|
pageSize: 20,
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
otherMethods(val) {
|
||||||
|
this.addOrUpdateVisible = true;
|
||||||
|
this.addOrEditTitle = '详情';
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init(val.data.id, true);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteHandle(id, name, index, data) {
|
||||||
|
this.$confirm(
|
||||||
|
`是否确认删除${'配方型号为 ' + data.processName + ' '}的数据项?`,
|
||||||
|
'系统提示',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
// 获取物料的属性列表
|
||||||
|
getProcessDetailPage({
|
||||||
|
processName: data.processName,
|
||||||
|
processSize: data.processSize,
|
||||||
|
pageSize: 100,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
}).then((response) => {
|
||||||
|
const ids = response.data.map((i) => i.id);
|
||||||
|
this.urlOptions.deleteURL(ids).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.app-container .el-table .el-table__cell {
|
||||||
|
padding: 0;
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
85
src/views/product&recipe/recipe/product-mini.vue
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2023-08-24 14:47:58
|
||||||
|
* @LastEditors: zwq
|
||||||
|
* @LastEditTime: 2025-11-28 10:06:06
|
||||||
|
* @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 '@/filter/code-filter';
|
||||||
|
import { getProcessDetailPage } from '@/api/ssdl/product&recipe';
|
||||||
|
|
||||||
|
const tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'materialName',
|
||||||
|
label: '物料型号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'material',
|
||||||
|
label: '物料规格',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'materialNumber',
|
||||||
|
label: '物料数量',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicPage],
|
||||||
|
props: {
|
||||||
|
processSize: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
processName: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getProcessDetailPage,
|
||||||
|
},
|
||||||
|
tableProps,
|
||||||
|
tableData: [],
|
||||||
|
listQuery: {
|
||||||
|
processName: this.processName,
|
||||||
|
processSize: this.processSize,
|
||||||
|
pageSize: 100,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList() {
|
||||||
|
this.dataListLoading = true;
|
||||||
|
this.urlOptions.getDataListURL(this.listQuery).then(response => {
|
||||||
|
this.tableData = response.data;
|
||||||
|
this.listQuery.total = response.data.total;
|
||||||
|
this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||