Compare commits
70 Commits
92aaad5551
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a491fd75c3 | |||
| f6c665c8fa | |||
| 7059706e9b | |||
| d05e577d13 | |||
| 23a49fc297 | |||
| 81bef6a164 | |||
| 7b77ab0996 | |||
| 079818aa0f | |||
| 2897bc3f51 | |||
| 8e818b7430 | |||
| bfab2eea96 | |||
| 30f82750a5 | |||
| e3ee4f8b3e | |||
| e400907db9 | |||
| 43791e8ab6 | |||
| e2d502394c | |||
| d4b5d47dfc | |||
| 8af7570fe8 | |||
| 03eedebacd | |||
| 2252b561de | |||
| d8c071952c | |||
| 3bfb9d0f4d | |||
| 0d38c8877f | |||
| b0db03bf52 | |||
| 48d900355d | |||
| 534c9528bc | |||
| c466e5fbda | |||
| 5cc33e4ef6 | |||
| a667d99734 | |||
| 5b5e2ceb4f | |||
| f198ab6bd7 | |||
| c318e667cb | |||
| 00af708be9 | |||
| 34e0ab22e1 | |||
| 2b759f0000 | |||
| 7340260cb2 | |||
| 0744b3de01 | |||
| 39dd8470ac | |||
| c94a76e240 | |||
| 78107d72e1 | |||
| 691657e0b2 | |||
| d0cc0cb6b4 | |||
| 71dbf988bf | |||
| ba71d089ba | |||
| 8ab9e91dac | |||
| 189017be5c | |||
| d3809a3d9a | |||
| 279a99afbe | |||
| 78ec95c313 | |||
| b9b7aa8853 | |||
| d78eb88665 | |||
| 47fdc44ca7 | |||
| 1797c5c193 | |||
| 6d5394f565 | |||
| e5cea4a818 | |||
| 3b16ba0af4 | |||
| 51ef75d0a0 | |||
| 06f963e8f2 | |||
| b335935f9a | |||
| 234d787247 | |||
| 6901af9579 | |||
| 6ada2ffb43 | |||
| cf25e22b3e | |||
| 451094c070 | |||
| bbb777f273 | |||
| 7788434c8d | |||
| a7e53d89d8 | |||
| 03c8682225 | |||
| a83b0c2589 | |||
| 6047f5850e |
@@ -6,6 +6,6 @@ VITE_APP_ENV = 'development'
|
||||
|
||||
# 后台管理系统/开发环境
|
||||
# VITE_APP_BASE_API = 'http://192.168.1.112:8086'
|
||||
VITE_APP_BASE_API = 'http://192.168.1.5:8086'
|
||||
VITE_APP_BASE_API = 'http://192.168.1.5:8087'
|
||||
# VITE_APP_BASE_API = 'http://192.168.1.19:8086'
|
||||
# VITE_APP_BASE_API = 'http://192.168.1.251:8086'
|
||||
|
||||
@@ -8,7 +8,7 @@ VITE_APP_ENV = 'production'
|
||||
# 玉田地址
|
||||
# VITE_APP_BASE_API = 'http://192.168.1.192:8086'
|
||||
# 贾庵子
|
||||
VITE_APP_BASE_API = 'http://192.168.1.251:8086'
|
||||
VITE_APP_BASE_API = 'http://192.168.1.251:8087'
|
||||
|
||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||
VITE_BUILD_COMPRESS = gzip
|
||||
@@ -17,11 +17,18 @@ export function getScan(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 统计
|
||||
export function getTotalStatistics(data) {
|
||||
return request({
|
||||
url: '/MatchScan/statistics',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 开始匹配
|
||||
export function getMatch(data) {
|
||||
return request({
|
||||
url: '/AutoInventory/match',
|
||||
url: '/AutoInventory/matchPure',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -44,6 +51,15 @@ export function getScanResult(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 获取盘点结果 - 最新再用
|
||||
export function inventoryList(data) {
|
||||
return request({
|
||||
url: '/MatchScan/inventoryList',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取图表
|
||||
export function getChart(data) {
|
||||
|
||||
141
src/api/index.js
141
src/api/index.js
@@ -1,110 +1,69 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 入/出库数量
|
||||
export const getMonthCount = () => {
|
||||
import request from "@/utils/request";
|
||||
// 获取月统计、当前入库类型统计、物资类型统计接口
|
||||
export const getHomeState = (data) => {
|
||||
return request({
|
||||
url: '/stat/month/summary',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 预警
|
||||
export const getInventoryAge = () => {
|
||||
url: "/stat/home",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
// 入库类型统计 - 时间查询
|
||||
export const getInTypeByTime = (data) => {
|
||||
return request({
|
||||
url: '/stat/age',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
url: "/stat/inTypeByTime",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
// 出库类型统计 - 时间查询
|
||||
export const getOutTypeByTime = (data) => {
|
||||
return request({
|
||||
url: "/stat/outTypeByTime",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
};
|
||||
// 通知公告展示
|
||||
export const getNoticeList= () => {
|
||||
return request({
|
||||
url: "/system/notice/list",
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
// 库龄统计(库龄超过30/60天统计)
|
||||
// 预警 + 库龄统计(库龄超过30/60天统计)
|
||||
export const getAgeLong = () => {
|
||||
return request({
|
||||
url: '/stat/age/count',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
url: "/stat/stockAge/stat",
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
// 仓库使用率
|
||||
export const getInventoryReview = () => {
|
||||
return request({
|
||||
url: '/stat/warehouseScene',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
url: "/stat/warehouse/slot",
|
||||
method: "get",
|
||||
});
|
||||
};
|
||||
|
||||
// 待办事项(应到未到统计)
|
||||
export const getWaitIn = (params) => {
|
||||
export const getWait = (params) => {
|
||||
return request({
|
||||
url: '/stat/undelivered',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 待办事项(应出未出统计)
|
||||
export const getWaitOut = (params) => {
|
||||
return request({
|
||||
url: '/stat/age/gt30',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
url: "/stat/todo",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
// 当前入库类型统计(根据入库类型统计项目数,条目数,总金额)
|
||||
export const getInStorage = () => {
|
||||
return request({
|
||||
url: '/stat/type/summary',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 物资类型统计
|
||||
export const getGoodsType = () => {
|
||||
return request({
|
||||
url: '/stat/stock/wlType',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 县局统计(根据县局统计项目数,条目数,总金额)
|
||||
// export const getCounty = () => {
|
||||
// return request({
|
||||
// url: '/stat/county/summary',
|
||||
// method: 'get'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 入/出库指标统计(天级出入库统计)
|
||||
export const getDailyInventory = (params) => {
|
||||
return request({
|
||||
url: '/stat/week/daily',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
url: "/stat/week/daily",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
// 根据出库类型,自定义时间筛选统计入库情况
|
||||
export const getInventoryType = (params) => {
|
||||
return request({
|
||||
url: '/stat/type/range',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 根据入库类型,自定义时间筛选统计出库情况
|
||||
export const getOutInventoryType = (params) => {
|
||||
return request({
|
||||
url: '/stat/type/out/range',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// (每一种入库类型的统计)
|
||||
// export const getEveryInventory = () => {
|
||||
// return request({
|
||||
// url: '/stat/type/pie',
|
||||
// method: 'get'
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询库存单据列表
|
||||
export function listBill(query) {
|
||||
export function listBill(data) {
|
||||
return request({
|
||||
url: '/wisdom/bill/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ export function listStock(id) {
|
||||
})
|
||||
}
|
||||
|
||||
// 修改库存单据
|
||||
// 添加单条库存单据
|
||||
export function appendBill(data) {
|
||||
return request({
|
||||
url: '/wisdom/bill/append',
|
||||
@@ -44,6 +44,15 @@ export function appendBill(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 删除库存单据
|
||||
export function delBill(data) {
|
||||
return request({
|
||||
url: '/wisdom/bill/delete',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 移库
|
||||
export function moveRecord(data) {
|
||||
return request({
|
||||
@@ -71,6 +80,24 @@ export function backoutRecord(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 一键入库
|
||||
export function recordFinish(data) {
|
||||
return request({
|
||||
url: '/wisdom/record/finish',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 一键删除预入库
|
||||
export function recordRemove(data) {
|
||||
return request({
|
||||
url: '/wisdom/record/delete',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -97,12 +124,12 @@ export function backoutRecord(data) {
|
||||
|
||||
|
||||
// 删除库存单据
|
||||
export function delBill(id) {
|
||||
return request({
|
||||
url: '/wisdom/bill/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// export function delBill(id) {
|
||||
// return request({
|
||||
// url: '/wisdom/bill/' + id,
|
||||
// method: 'delete'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 查询库存单据详细
|
||||
// export function getBill(id) {
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
import request from '@/utils/request'
|
||||
//借料记录列表
|
||||
export function listOutbound(data) {
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 还料
|
||||
export function returnBill(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/borrow/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
url: "/wisdom/bill/borrow/return",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// 借料出库保存
|
||||
export function addOutbound(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/outStock',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 还料入库保存
|
||||
|
||||
export function returnSubmit(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/refund',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 新增借调查询项目号列表
|
||||
export function listStockByXm(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/list',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询列表数据
|
||||
export function listInrevoke(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function delStore(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/deleteByIds',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function storeFun(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/revertByIds',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -9,4 +9,12 @@ export function listRecord(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 撤销移库
|
||||
export function delMove(id) {
|
||||
return request({
|
||||
url: '/inventory/move/rollback/' + id,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,49 +1,97 @@
|
||||
import request from '@/utils/request'
|
||||
//出库记录列表
|
||||
export function listOutbound(data) {
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 新增出库查询
|
||||
export function addGetOutbound(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
url: "/wisdom/stock/listByBillNo",
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
// 出库保存
|
||||
|
||||
// 新增出库
|
||||
export function addOutbound(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/outStock',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
url: "/wisdom/bill/out/add",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
// 查询库存单据主列表
|
||||
export function listBill(data) {
|
||||
|
||||
// 一键出库
|
||||
export function recordFinish(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/bill/groups',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function picDetail(data){
|
||||
return request({
|
||||
url: '/photo/list?billNo='+data.billNo+'&photoType='+data.photoType,
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
//生成调度任务
|
||||
export function generateDispatch(data){
|
||||
return request({
|
||||
url: '/wisdom/dispatch/batchAdd',
|
||||
method: 'post',
|
||||
data: data
|
||||
url: '/wisdom/record/out/finish',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//左侧修改主单据
|
||||
export function editOutbound(data){
|
||||
// 撤销出库
|
||||
export function backoutRecord(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/updateByBillNoCk',
|
||||
method: 'post',
|
||||
data: data
|
||||
url: '/wisdom/record/out/rollback',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 一键删除预出库
|
||||
export function recordRemove(data) {
|
||||
return request({
|
||||
url: '/wisdom/record/out/delete',
|
||||
method: 'delete',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//出库记录列表
|
||||
export function listOutbound(data) {
|
||||
return request({
|
||||
url: "/wisdom/stock/list",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询库存单据主列表
|
||||
export function listBill(data) {
|
||||
return request({
|
||||
url: "/wisdom/stock/bill/groups",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
export function picDetail(data) {
|
||||
return request({
|
||||
url: "/photo/list?billNo=" + data.billNo + "&photoType=" + data.photoType,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
//生成调度任务
|
||||
export function generateDispatch(data) {
|
||||
return request({
|
||||
url: "/wisdom/dispatch/batchAdd",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
//左侧修改主单据
|
||||
export function editOutbound(data) {
|
||||
return request({
|
||||
url: "/wisdom/stock/updateByBillNoCk",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
// 查询列表数据
|
||||
export function listOutrevoke(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/list',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function delStore(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/deleteByIds',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function storeFun(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/revertByIds',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
@@ -1,26 +1,20 @@
|
||||
import request from '@/utils/request'
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询列表
|
||||
export function listStock(data) {
|
||||
return request({
|
||||
// url: '/wisdom/stock/page',
|
||||
// url: '/wisdom/stock/pageStatistics',
|
||||
// url: '/wisdom/stock/pageList',
|
||||
url: '/wisdom/record/list',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
url: "/wisdom/record/list",
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
}
|
||||
export function listSearch(data) {
|
||||
|
||||
// 查询统计
|
||||
export function getTotal(data) {
|
||||
return request({
|
||||
// url: '/wisdom/stock/page',
|
||||
url: '/wisdom/stock/pageStatistics',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getSumInfoI(data) {
|
||||
return request({
|
||||
url: '/stat/statistics',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
url: "/wisdom/record/statistics",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询库存单据主列表
|
||||
export function listBill(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/bill/groups',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//明细列表
|
||||
// 列表
|
||||
export function listStock(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/list',
|
||||
@@ -16,6 +8,91 @@ export function listStock(data) {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function editStock(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/update',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 统计
|
||||
export function getTotal(data) {
|
||||
return request({
|
||||
url: '/wisdom/stock/statistic',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function printTag(data){
|
||||
return request({
|
||||
url: '/pk/dat/batchAdd',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 查询库存单据主详细
|
||||
export function getStock(id) {
|
||||
@@ -132,13 +209,6 @@ export function picDetail(data){
|
||||
|
||||
})
|
||||
}
|
||||
export function printTag(data){
|
||||
return request({
|
||||
url: '/pk/dat/batchAdd',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function delPicF(PicId){
|
||||
return request({
|
||||
url: '/photo/deleteById?id='+PicId,
|
||||
|
||||
1
src/assets/icons/svg/inbound.svg
Normal file
1
src/assets/icons/svg/inbound.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770191940726" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2273" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M896 597.333333a42.666667 42.666667 0 0 1 42.666667 42.666667v170.666667a128 128 0 0 1-128 128H213.333333a128 128 0 0 1-128-128v-170.666667a42.666667 42.666667 0 1 1 85.333334 0v170.666667a42.666667 42.666667 0 0 0 42.666666 42.666666h597.333334a42.666667 42.666667 0 0 0 42.666666-42.666666v-170.666667a42.666667 42.666667 0 0 1 42.666667-42.666667zM512.853333 85.376a42.666667 42.666667 0 0 1 8.405334 0.981333l1.194666 0.298667a42.325333 42.325333 0 0 1 19.712 11.178667l213.333334 213.333333a42.666667 42.666667 0 1 1-60.330667 60.330667L554.666667 230.997333V640a42.666667 42.666667 0 1 1-85.333334 0V230.997333L328.832 371.498667a42.666667 42.666667 0 1 1-60.330667-60.330667l213.333334-213.333333c2.645333-2.645333 5.632-4.906667 8.874666-6.826667l1.877334-0.981333a42.368 42.368 0 0 1 8.405333-3.242667l2.133333-0.554667 1.408-0.213333A43.178667 43.178667 0 0 1 511.146667 85.333333L512 85.333333l0.853333 0.042667z" p-id="2274" fill="#409EFF"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
src/assets/icons/svg/outbound.svg
Normal file
1
src/assets/icons/svg/outbound.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770191913465" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2064" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M896 597.333333a42.666667 42.666667 0 0 1 42.666667 42.666667v170.666667a128 128 0 0 1-128 128H213.333333a128 128 0 0 1-128-128v-170.666667a42.666667 42.666667 0 1 1 85.333334 0v170.666667a42.666667 42.666667 0 0 0 42.666666 42.666666h597.333334a42.666667 42.666667 0 0 0 42.666666-42.666666v-170.666667a42.666667 42.666667 0 0 1 42.666667-42.666667zM512 85.333333a42.666667 42.666667 0 0 1 42.666667 42.666667v409.002667l140.501333-140.501334a42.666667 42.666667 0 1 1 60.330667 60.330667l-213.333334 213.333333a42.837333 42.837333 0 0 1-17.706666 10.666667l-2.645334 0.64-1.450666 0.341333-1.322667 0.170667A43.008 43.008 0 0 1 512 682.666667c-2.432 0-4.778667-0.298667-7.082667-0.682667-0.426667-0.042667-0.853333-0.085333-1.322666-0.213333l-1.450667-0.298667-2.645333-0.682667a42.496 42.496 0 0 1-17.664-10.624l-213.333334-213.333333a42.666667 42.666667 0 1 1 60.330667-60.330667L469.333333 537.002667V128a42.666667 42.666667 0 0 1 42.666667-42.666667z" p-id="2065" fill="#E6A23C"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/assets/images/inbound.png
Normal file
BIN
src/assets/images/inbound.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/assets/images/outbound.png
Normal file
BIN
src/assets/images/outbound.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
21
src/assets/styles/common.css
Normal file
21
src/assets/styles/common.css
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
:root {
|
||||
--mineTable-notFinish-bg-color: #c7ffa5;
|
||||
--mineTable-click-bg-color: #d2f0ff;
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
background-color: var(--mineTable-notFinish-bg-color) !important;
|
||||
}
|
||||
|
||||
.el-table__body tr.current-row>td.el-table__cell {
|
||||
background-color: var(--mineTable-click-bg-color) !important;
|
||||
}
|
||||
|
||||
/* :deep(.el-table__body tr.hover-row>td.el-table__cell){
|
||||
background-color: unset !important;
|
||||
}
|
||||
|
||||
.el-table {
|
||||
--el-table-row-hover-bg-color: transparent;
|
||||
} */
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="print-container">
|
||||
|
||||
<div class="header-section">
|
||||
<div class="main-title">{{ isRuKu ? '物资入库单' : billAllObj[0]?.isChuku == 1 ? '物资出库单' : '物资借料单' }}</div>
|
||||
<div class="main-title">{{ isRuKu ? '物资入库单' : billAllObj[0]?.bizType == 1 ? '物资出库单' : billAllObj[0]?.bizType == 2 ? '物资借料单' : '物资还料单' }}</div>
|
||||
</div>
|
||||
|
||||
<!-- 修改点:将原来的文本列表改为 表格形式 的基础信息 -->
|
||||
@@ -11,13 +11,13 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="label-td">{{isRuKu ? '入库类型:' : '出库类型:'}}</td>
|
||||
<td class="value-td">{{ isRuKu ? billAllObj[0]?.rkTypeName : billAllObj[0]?.ckTypeName }}</td>
|
||||
<td class="value-td">{{ billAllObj[0]?.operationTypeName }}</td>
|
||||
<td class="label-td">{{isRuKu ? '入库日期:' : '出库日期:'}}</td>
|
||||
<td class="value-td">{{ isRuKu ? parseTime(billAllObj[0]?.rkTime, '{y}-{m}-{d} {h}:{i}:{s}') : parseTime(billAllObj[0]?.lyTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</td>
|
||||
<td class="value-td">{{ parseTime(billAllObj[0]?.operationTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-td">单据号:</td>
|
||||
<td class="value-td">{{ isRuKu ? billAllObj[0]?.billNo : billAllObj[0]?.billNoCk }}</td>
|
||||
<td class="value-td">{{ billAllObj[0]?.billNo }}</td>
|
||||
<td class="label-td" v-if="isRuKu">供应商名称:</td>
|
||||
<td class="value-td" v-if="isRuKu">{{ billAllObj[0]?.gysMc }}</td>
|
||||
<td class="label-td" v-if="!isRuKu">施工队:</td>
|
||||
@@ -25,11 +25,11 @@
|
||||
</tr>
|
||||
<tr v-if="!isRuKu">
|
||||
<td class="label-td">项目编号:</td>
|
||||
<td class="value-td">{{ billAllObj[0]?.xmNo }}</td>
|
||||
<td class="value-td" colspan="3">{{ billAllObj[0]?.bizType == 1 ? xmNo :billAllObj[0]?.xmNo }}</td>
|
||||
</tr>
|
||||
<tr v-if="!isRuKu">
|
||||
<td class="label-td">项目描述:</td>
|
||||
<td class="value-td">{{ billAllObj[0]?.xmMs }}</td>
|
||||
<td class="value-td" colspan="3">{{ billAllObj[0]?.bizType == 1 ? xmMs : billAllObj[0]?.xmMs }}</td>
|
||||
</tr>
|
||||
<!-- 如需显示合计项数量,可加在这里,或者保留在下方 -->
|
||||
</tbody>
|
||||
@@ -73,13 +73,14 @@
|
||||
<table border="1" style="width: 100%; border-collapse: collapse; font-size: 12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>物料号</th>
|
||||
<th>物料描述</th>
|
||||
<th>计量单位</th>
|
||||
<th>数量</th>
|
||||
<th>库位码</th>
|
||||
<th>订单编号</th>
|
||||
<th v-if="isRuKu">项目编号</th>
|
||||
<th>项目编号</th>
|
||||
<th v-if="isRuKu">项目描述</th>
|
||||
<th>备注</th>
|
||||
<th>身份码</th>
|
||||
@@ -87,14 +88,15 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in billAllObj" :key="item.id">
|
||||
<tr v-for="(item, index) in billAllObj" :key="item.id">
|
||||
<td style="text-align: center;">{{ index + 1 }}</td>
|
||||
<td style="text-align: center;">{{ item.wlNo }}</td>
|
||||
<td style="text-align: center;">{{ item.wlMs }}</td>
|
||||
<td style="text-align: center;">{{ item.dw }}</td>
|
||||
<td style="text-align: center;">{{ item.realQty }}</td>
|
||||
<td style="text-align: center;">{{ item.pcode }}</td>
|
||||
<td style="text-align: center;">{{ item.sapNo }}</td>
|
||||
<td v-if="isRuKu" style="text-align: center;">{{ item.xmNo }}</td>
|
||||
<td style="text-align: center;">{{ item.xmNo }}</td>
|
||||
<td v-if="isRuKu" style="text-align: center;">{{ item.xmMs }}</td>
|
||||
<td style="text-align: center;">{{ item.remark }}</td>
|
||||
<td style="text-align: center;">{{ item.entityId }}</td>
|
||||
@@ -109,7 +111,7 @@
|
||||
<div class="sign-item">制单人:唐山公司</div>
|
||||
<div class="sign-item">理货员:</div>
|
||||
<div class="sign-item">仓库主管审核:</div>
|
||||
<div class="sign-item" v-if="!isRuKu">领料人:</div>
|
||||
<div class="sign-item" v-if="!isRuKu">{{ billAllObj[0]?.bizType == 3 ? '还料人:' : '领料人:' }}</div>
|
||||
</div>
|
||||
<div class="footer-sign-area" style="margin-top: 5px;">
|
||||
<div class="sign-item">打印时间:{{ parseTime(new Date().getTime(), '{y}-{m}-{d} {h}:{i}:{s}') }}</div>
|
||||
@@ -127,29 +129,33 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
function isChukuFun(isChuku){
|
||||
// scope.row.isChuku==0?"已入库":(scope.row.isChuku==1?"已出库":"审批中")
|
||||
if(isChuku == 0){
|
||||
return "已入库"
|
||||
} else if(isChuku == 1){
|
||||
return "已出库"
|
||||
}else if(isChuku == 3){
|
||||
return "借料出库"
|
||||
}else if(isChuku == 2){
|
||||
return "审批中"
|
||||
}else if(isChuku == 4){
|
||||
return "入库撤销"
|
||||
}else if(isChuku == 5){
|
||||
return "出库撤销"
|
||||
}
|
||||
}
|
||||
|
||||
const isRuKu = computed(() => {
|
||||
return props.billAllObj[0]?.isChuku == 0 || props.billAllObj[0]?.isChuku == 5;
|
||||
return props.billAllObj[0]?.bizType == 0;
|
||||
});
|
||||
|
||||
// 获取不同的项目编号
|
||||
const xmNo = computed(() => {
|
||||
const validXmMsValues = props.billAllObj
|
||||
.map(item => item.xmNo) // 提取所有 xmMs 属性值
|
||||
.filter(value => !!value); // 过滤掉 null/undefined/空字符串等假值
|
||||
// 3. 去重:得到所有不同的 xmMs 值
|
||||
const uniqueXmMs = [...new Set(validXmMsValues)];
|
||||
// 4. 核心逻辑:多个值用 + 拼接,单个值直接返回,无值返回空字符串
|
||||
return uniqueXmMs.length > 1 ? uniqueXmMs.join('、') : uniqueXmMs[0] || '';
|
||||
});
|
||||
|
||||
// 获取不同的项目描述
|
||||
const xmMs = computed(() => {
|
||||
const validXmMsValues = props.billAllObj
|
||||
.map(item => item.xmMs) // 提取所有 xmMs 属性值
|
||||
.filter(value => !!value); // 过滤掉 null/undefined/空字符串等假值
|
||||
// 3. 去重:得到所有不同的 xmMs 值
|
||||
const uniqueXmMs = [...new Set(validXmMsValues)];
|
||||
// 4. 核心逻辑:多个值用 + 拼接,单个值直接返回,无值返回空字符串
|
||||
return uniqueXmMs.length > 1 ? uniqueXmMs.join('、') : uniqueXmMs[0] || '';
|
||||
});
|
||||
|
||||
// 获取第一条数据作为头部基础信息来源
|
||||
const header = computed(() => (props.billAllObj && props.billAllObj.length > 0 ? props.billAllObj[0] : {}));
|
||||
|
||||
// 汇总逻辑
|
||||
const summaryList = computed(() => {
|
||||
@@ -158,7 +164,8 @@ const summaryList = computed(() => {
|
||||
props.billAllObj.forEach(item => {
|
||||
if (map.has(item.wlNo)) {
|
||||
const existing = map.get(item.wlNo);
|
||||
existing.totalQty = (parseFloat(existing.totalQty) + parseFloat(item.realQty));
|
||||
const total = (parseFloat(existing.totalQty)*100 *10000 + parseFloat(item.realQty)*100 *10000)
|
||||
existing.totalQty = total / ( 100 * 10000);
|
||||
} else {
|
||||
map.set(item.wlNo, {
|
||||
...item,
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="label-td">{{isRuKu ? '入库类型' : '出库类型'}}</td>
|
||||
<td class="value-td">{{ isRuKu ? billAllObj[0]?.operationTypeName : billAllObj[0]?.ckTypeName }}</td>
|
||||
<td class="value-td">{{ billAllObj[0]?.operationTypeName }}</td>
|
||||
<td class="label-td">{{isRuKu ? '入库日期' : '出库日期'}}</td>
|
||||
<td class="value-td">{{ isRuKu ? parseTime(billAllObj[0]?.operationTime, '{y}-{m}-{d} {h}:{i}:{s}') : parseTime(billAllObj[0]?.lyTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</td>
|
||||
<td class="value-td">{{ parseTime(billAllObj[0]?.operationTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label-td">订单编号</td>
|
||||
@@ -145,7 +145,8 @@ const summaryList = computed(() => {
|
||||
props.billAllObj.forEach(item => {
|
||||
if (map.has(item.wlNo)) {
|
||||
const existing = map.get(item.wlNo);
|
||||
existing.totalQty = (parseFloat(existing.totalQty) + parseFloat(item.realQty));
|
||||
const total = (parseFloat(existing.totalQty) * 100*10000+ parseFloat(item.realQty)* 100*10000)
|
||||
existing.totalQty = total / ( 100 * 10000);
|
||||
} else {
|
||||
map.set(item.wlNo, {
|
||||
...item,
|
||||
|
||||
@@ -2,6 +2,8 @@ import { createApp } from 'vue'
|
||||
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
import '@/assets/styles/common.css'
|
||||
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import 'element-plus/theme-chalk/dark/css-vars.css'
|
||||
@@ -27,6 +29,7 @@ import './permission' // permission control
|
||||
|
||||
import { useDict } from '@/utils/dict'
|
||||
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/manage'
|
||||
import { tableInfoRowClick } from '@/utils/tableHelper'
|
||||
|
||||
// 分页组件
|
||||
import Pagination from '@/components/Pagination'
|
||||
@@ -56,6 +59,7 @@ app.config.globalProperties.handleTree = handleTree
|
||||
app.config.globalProperties.addDateRange = addDateRange
|
||||
app.config.globalProperties.selectDictLabel = selectDictLabel
|
||||
app.config.globalProperties.selectDictLabels = selectDictLabels
|
||||
app.config.globalProperties.tableInfoRowClick = tableInfoRowClick
|
||||
|
||||
// 全局组件挂载
|
||||
app.component('DictTag', DictTag)
|
||||
|
||||
4
src/utils/tableHelper.js
Normal file
4
src/utils/tableHelper.js
Normal file
@@ -0,0 +1,4 @@
|
||||
export const tableInfoRowClick = (row, ref) => {
|
||||
console.log(row, ref);
|
||||
ref.setCurrentRow(row);
|
||||
};
|
||||
@@ -69,14 +69,47 @@
|
||||
<el-text v-show="status == 1">当前为未扫描到,但数据库里有的数据</el-text>
|
||||
<el-text v-show="status == 2">当前为已扫描到,但数据库里没有的数据</el-text>
|
||||
</div>
|
||||
<el-table :data="matchData" border empty-text="暂无数据" v-if="status == 0 || status == 1">
|
||||
<el-table-column prop="rkPcode" label="存放位置" />
|
||||
<el-table-column prop="realQty" label="数量" />
|
||||
<el-table-column prop="count" label="操作" class-name="small-padding fixed-width">
|
||||
<el-table :data="matchData" border empty-text="暂无数据" show-overflow-tooltip show-summary
|
||||
:summary-method="getSummaries" v-if="status == 0 || status == 1">
|
||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||
<el-table-column label="单据号" align="center" prop="billNo" width="180" />
|
||||
<el-table-column label="库存类型" align="center" prop="operationTypeName" width="150" />
|
||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="150" />
|
||||
<el-table-column label="项目号" align="center" prop="xmNo" width="150" />
|
||||
<el-table-column label="项目描述" align="center" prop="xmMs" width="150" />
|
||||
<el-table-column label="物料号" align="center" prop="wlNo" width="100" />
|
||||
<el-table-column label="物料描述" align="center" prop="wlMs" width="150" />
|
||||
<el-table-column label="供应商名称" align="center" prop="gysMc" width="150" />
|
||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
||||
<el-table-column label="总计" align="center" prop="totalAmount" />
|
||||
<el-table-column label="单位" align="center" prop="dw" />
|
||||
<el-table-column label="实际入库数量" align="center" prop="realQty" width="120" />
|
||||
<el-table-column label="库位码" align="center" prop="pcode" width="120" />
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="身份码" align="center" prop="entityId" width="150" />
|
||||
<el-table-column label="物资类型" align="center" prop="wlTypeName" />
|
||||
<el-table-column label="场景" align="center" prop="sceneName" width="150" />
|
||||
<el-table-column label="所属大库" align="center" prop="parentWarehouseName" width="150" />
|
||||
<el-table-column label="所属小库" align="center" prop="warehouseName" width="150" />
|
||||
<el-table-column label="入库类型" align="center" prop="operationTypeName" width="150" />
|
||||
<el-table-column label="入库时间" align="center" prop="operationTime" width="150" />
|
||||
<el-table-column label="还料时间" align="center" prop="returnTime" width="150">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.returnTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库龄" align="center" prop="stockAge" />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
||||
<el-table-column label="一次封样号" align="center" prop="fycde1" width="150" />
|
||||
<el-table-column label="二次封样号" align="center" prop="fycde2" width="150" />
|
||||
<!-- <el-table-column prop="count" label="操作" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<el-table :data="matchData" border empty-text="暂无数据" v-if="status == 2">
|
||||
@@ -106,7 +139,7 @@
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="taskView=false">关闭</el-button>
|
||||
<el-button @click="taskView = false">关闭</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -115,7 +148,7 @@
|
||||
|
||||
<script setup name="AutoInventory">
|
||||
import { ElLoading } from 'element-plus';
|
||||
import { getTaskCount, getScan, getMatch, getChart, stopScan, getScanResult, getStockList } from "@/api/Inventory/autoInventory"
|
||||
import { getTaskCount, getScan, getMatch, getChart, stopScan, getTotalStatistics, getStockList, inventoryList } from "@/api/Inventory/autoInventory"
|
||||
import { ref, reactive, onMounted, onBeforeUnmount, markRaw } from "vue";
|
||||
import avatar from "@/assets/images/avatar.jpg"
|
||||
import { useRoute } from 'vue-router';
|
||||
@@ -282,7 +315,7 @@ const getMatchData = () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
// 匹配结果
|
||||
const getResultList = () => {
|
||||
@@ -290,9 +323,15 @@ const getResultList = () => {
|
||||
pageNum: queryParams.value.pageNum,
|
||||
pageSize: queryParams.value.pageSize,
|
||||
status: status.value,
|
||||
taskId: taskId.value
|
||||
warehouseCode: deviceObj.value.warehouseCode,
|
||||
sceneId: deviceObj.value.sceneId,
|
||||
}
|
||||
getScanResult(obj).then(res => {
|
||||
if (status.value != 0) {
|
||||
matchData.value = null
|
||||
matchTotal.value = 0
|
||||
return;
|
||||
}
|
||||
inventoryList(obj).then(res => {
|
||||
matchData.value = res.rows
|
||||
matchTotal.value = res.total
|
||||
})
|
||||
@@ -390,13 +429,47 @@ if (deviceInfo) {
|
||||
});
|
||||
connectWebSocket(); // 组件加载时连接 WebSocket
|
||||
}
|
||||
|
||||
// 获取总计
|
||||
const totalMoney = ref(null)
|
||||
const pcodeCount = ref(null)
|
||||
const sumQty = ref(null)
|
||||
function getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) { // 第一列不进行合计操作,通常是序列号或选择框等非数值列。
|
||||
sums[index] = '总计'; // 这里可以设置为其他文字或空字符串。
|
||||
return;
|
||||
} else if (index === 2) { // 第二列是金额列,进行求和操作。
|
||||
sums[index] = '总金额:' + totalMoney.value;
|
||||
} else if (index === 3) {
|
||||
sums[index] = '共存于:' + pcodeCount.value + '个库位'
|
||||
} else if (index === 4) {
|
||||
sums[index] = '总数:' + sumQty.value
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
function getSumInfo() {
|
||||
//统计信息
|
||||
console.log(deviceObj.value,'deviceObj');
|
||||
let rkInfo = JSON.parse(JSON.stringify({
|
||||
warehouseCode: deviceObj.value.warehouseCode,
|
||||
sceneId: deviceObj.value.sceneId,
|
||||
}))
|
||||
getTotalStatistics(rkInfo).then(response => {
|
||||
totalMoney.value = response.data.totalAmount
|
||||
pcodeCount.value = response.data.locationCount
|
||||
sumQty.value = response.data.totalQuantity
|
||||
});
|
||||
}
|
||||
getSumInfo()
|
||||
// 使用 Websocket 发送消息
|
||||
const send = () => {
|
||||
let obj = {
|
||||
deviceId: deviceObj.value.deviceId,
|
||||
ip: deviceObj.value.ipAddress,
|
||||
port: deviceObj.value.port
|
||||
port: deviceObj.value.port
|
||||
}
|
||||
loadingInstance.close();
|
||||
isSend.value = true
|
||||
|
||||
@@ -407,8 +407,8 @@ function handleInventory(row) {
|
||||
}
|
||||
|
||||
/** 查看结果操作 */
|
||||
function handleHistory(row) {
|
||||
router.push({ path: "/Inventory/task/inventoryResult" , query: {"taskId": row.id} })
|
||||
function handleHistory(row) {
|
||||
router.push({ path: "/Inventory/task/inventoryResult" , query: {"taskId": row.id,'warehouseCode':row.warehouseCode,"sceneId":row.sceneId} })
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
|
||||
@@ -18,16 +18,49 @@
|
||||
|
||||
<el-tabs v-model="activeTabs" type="border-card" @tab-change="handleQueryInfo">
|
||||
<el-tab-pane v-for="item in statusList" :label="item.label" :name="item.value">
|
||||
<el-table :data="dialogData" border empty-text="暂无数据" v-if="dialogParams.status == 0 || dialogParams.status == 1">
|
||||
<el-table-column prop="rkPcode" label="存放位置" />
|
||||
<el-table-column prop="realQty" label="数量" />
|
||||
<el-table-column prop="count" label="操作" class-name="small-padding fixed-width">
|
||||
<el-table :data="dialogData" border empty-text="暂无数据" show-overflow-tooltip show-summary
|
||||
:summary-method="getSummaries" v-if="dialogParams.status == 0 || dialogParams.status == 1">
|
||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||
<el-table-column label="单据号" align="center" prop="billNo" width="180" />
|
||||
<el-table-column label="库存类型" align="center" prop="operationTypeName" width="150" />
|
||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="150" />
|
||||
<el-table-column label="项目号" align="center" prop="xmNo" width="150" />
|
||||
<el-table-column label="项目描述" align="center" prop="xmMs" width="150" />
|
||||
<el-table-column label="物料号" align="center" prop="wlNo" width="100" />
|
||||
<el-table-column label="物料描述" align="center" prop="wlMs" width="150" />
|
||||
<el-table-column label="供应商名称" align="center" prop="gysMc" width="150" />
|
||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
||||
<el-table-column label="总计" align="center" prop="totalAmount" />
|
||||
<el-table-column label="单位" align="center" prop="dw" />
|
||||
<el-table-column label="实际入库数量" align="center" prop="realQty" width="120" />
|
||||
<el-table-column label="库位码" align="center" prop="pcode" width="120" />
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="身份码" align="center" prop="entityId" width="150" />
|
||||
<el-table-column label="物资类型" align="center" prop="wlTypeName" />
|
||||
<el-table-column label="场景" align="center" prop="sceneName" width="150" />
|
||||
<el-table-column label="所属大库" align="center" prop="parentWarehouseName" width="150" />
|
||||
<el-table-column label="所属小库" align="center" prop="warehouseName" width="150" />
|
||||
<el-table-column label="入库类型" align="center" prop="operationTypeName" width="150" />
|
||||
<el-table-column label="入库时间" align="center" prop="operationTime" width="150" />
|
||||
<el-table-column label="还料时间" align="center" prop="returnTime" width="150">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.returnTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库龄" align="center" prop="stockAge" />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
||||
<el-table-column label="一次封样号" align="center" prop="fycde1" width="150" />
|
||||
<el-table-column label="二次封样号" align="center" prop="fycde2" width="150" />
|
||||
<!-- <el-table-column prop="count" label="操作" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
|
||||
<el-table :data="dialogData" border empty-text="暂无数据" v-if="dialogParams.status == 2">
|
||||
<el-table-column prop="rkPcode" label="存放位置" />
|
||||
</el-table>
|
||||
@@ -64,7 +97,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="InventoryResult">
|
||||
import { getScanResult, getStockList } from "@/api/Inventory/autoInventory";
|
||||
import { getStockList, getTotalStatistics, inventoryList } from "@/api/Inventory/autoInventory";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
@@ -91,13 +124,19 @@ const dialogParams = ref({
|
||||
status: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
taskId: ""
|
||||
warehouseCode: '',
|
||||
sceneId: '',
|
||||
})
|
||||
const dialogData = ref([])
|
||||
const dialogTotal = ref(0)
|
||||
|
||||
const getHistoryInfo = () => {
|
||||
getScanResult(dialogParams.value).then(res => {
|
||||
if(dialogParams.value.status!=0){
|
||||
dialogData.value =null
|
||||
dialogTotal.value = 0
|
||||
return;
|
||||
}
|
||||
inventoryList(dialogParams.value).then(res => {
|
||||
dialogData.value = res.rows
|
||||
dialogTotal.value = res.total
|
||||
})
|
||||
@@ -122,25 +161,59 @@ const chageDialogPage = (e) => {
|
||||
const taskView = ref(false)
|
||||
const viewData = ref([])
|
||||
const handleView = (row) => {
|
||||
// let obj = {
|
||||
// pageNum: 1,
|
||||
// pageSize: 100,
|
||||
// pcode: row.rkPcode
|
||||
// }
|
||||
getStockList(row.rkPcode).then(res => {
|
||||
console.log(res)
|
||||
viewData.value = res.data
|
||||
taskView.value = true
|
||||
})
|
||||
}
|
||||
|
||||
const totalMoney = ref(null)
|
||||
const pcodeCount = ref(null)
|
||||
const sumQty = ref(null)
|
||||
function getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) { // 第一列不进行合计操作,通常是序列号或选择框等非数值列。
|
||||
sums[index] = '总计'; // 这里可以设置为其他文字或空字符串。
|
||||
return;
|
||||
} else if (index === 2) { // 第二列是金额列,进行求和操作。
|
||||
sums[index] = '总金额:' + totalMoney.value;
|
||||
} else if (index === 3) {
|
||||
sums[index] = '共存于:' + pcodeCount.value + '个库位'
|
||||
} else if (index === 4) {
|
||||
sums[index] = '总数:' + sumQty.value
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
onMounted(() => {
|
||||
dialogParams.value.taskId = route.query.taskId
|
||||
// dialogParams.value.taskId = route.query.taskId
|
||||
dialogParams.value.warehouseCode = route.query.warehouseCode
|
||||
dialogParams.value.sceneId = route.query.sceneId
|
||||
dialogParams.value.pageNum = 1
|
||||
dialogParams.value.pageSize = 10
|
||||
getHistoryInfo()
|
||||
})
|
||||
// 获取总计
|
||||
|
||||
function getSumInfo() {
|
||||
//统计信息
|
||||
let rkInfo = JSON.parse(JSON.stringify({
|
||||
warehouseCode:route.query.warehouseCode,
|
||||
sceneId:route.query.sceneId,
|
||||
}))
|
||||
delete rkInfo.pageNum
|
||||
delete rkInfo.pageSize
|
||||
getTotalStatistics(rkInfo).then(response => {
|
||||
totalMoney.value = response.data.totalAmount
|
||||
pcodeCount.value = response.data.locationCount
|
||||
sumQty.value = response.data.totalQuantity
|
||||
});
|
||||
}
|
||||
getSumInfo()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@@ -1,98 +1,61 @@
|
||||
<template>
|
||||
<div class="dashboard app-container">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="3">
|
||||
<div class="boxNum" style="background: linear-gradient(to right bottom, #ec4786, #b955a4)">
|
||||
<div style="font-size: 18px;">月项目数(入库)</div>
|
||||
<div class="boxNum_icon">
|
||||
<el-icon size="24"><OfficeBuilding /></el-icon>
|
||||
<div>{{ countObj.inSummary.projectCount }}</div>
|
||||
<el-col :span="12">
|
||||
<div class="inOrOutBox" style="background-color: #FDF6E3;">
|
||||
<div class="inOrOutBox_left">
|
||||
<div style="font-size: 20px; font-weight:bold; color:#333333; ">月入库统计</div>
|
||||
<div class="itemBox">
|
||||
<div>
|
||||
<p style="font-size: 14px;color:#606266">项目数 </p>
|
||||
<p style="font-size: 20px; font-weight:500; ">{{ countObj.monthInCount }} </p>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 14px;color:#606266 ">条目数 </p>
|
||||
<p style="font-size: 20px;font-weight:500;">{{ countObj.monthInProjectCount }} </p>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 14px; color:#606266">总金额 </p>
|
||||
<p style="font-size: 20px; font-weight:500;">{{ countObj.monthInAmount }} </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inOrOutBox_icon">
|
||||
<img src="../assets/images/inbound.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="boxNum" style="background: linear-gradient(to right bottom, #865ec0, #5144b4);">
|
||||
<div style="font-size: 18px;">月条目数(入库)</div>
|
||||
<div class="boxNum_icon">
|
||||
<el-icon size="24"><OfficeBuilding /></el-icon>
|
||||
<div>{{ countObj.inSummary.itemCount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="boxNum" style="background: linear-gradient(to right bottom, #56cdf3, #719de3);">
|
||||
<div style="font-size: 18px;">月总金额(入库)</div>
|
||||
<div class="boxNum_icon">
|
||||
<el-icon size="24"><OfficeBuilding /></el-icon>
|
||||
<div>{{ countObj.inSummary.amountHt }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="boxNum" style="background: linear-gradient(to right bottom, #fcbc25, #f68057);">
|
||||
<div style="font-size: 18px;">月总数(入库)</div>
|
||||
<div class="boxNum_icon">
|
||||
<el-icon size="24"><OfficeBuilding /></el-icon>
|
||||
<div>{{ countObj.inSummary.totalQty }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="boxNum" style="background: linear-gradient(to right bottom, #ec4786, #b955a4)">
|
||||
<div style="font-size: 18px;">月项目数(出库)</div>
|
||||
<div class="boxNum_icon">
|
||||
<el-icon size="24"><OfficeBuilding /></el-icon>
|
||||
<div>{{ countObj.outSummary.projectCount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="boxNum" style="background: linear-gradient(to right bottom, #865ec0, #5144b4);">
|
||||
<div style="font-size: 18px;">月条目数(出库)</div>
|
||||
<div class="boxNum_icon">
|
||||
<el-icon size="24"><OfficeBuilding /></el-icon>
|
||||
<div>{{ countObj.outSummary.itemCount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="boxNum" style="background: linear-gradient(to right bottom, #56cdf3, #719de3);">
|
||||
<div style="font-size: 18px;">月总金额(出库)</div>
|
||||
<div class="boxNum_icon">
|
||||
<el-icon size="24"><OfficeBuilding /></el-icon>
|
||||
<div>{{ countObj.outSummary.amountHt }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="boxNum" style="background: linear-gradient(to right bottom, #fcbc25, #f68057);">
|
||||
<div style="font-size: 18px;">月总数(出库)</div>
|
||||
<div class="boxNum_icon">
|
||||
<el-icon size="24"><OfficeBuilding /></el-icon>
|
||||
<div>{{ countObj.outSummary.totalQty }}</div>
|
||||
|
||||
<el-col :span="12">
|
||||
<div class="inOrOutBox" style="background-color: #EBF5FF;">
|
||||
<div class="inOrOutBox_left">
|
||||
<div style="font-size: 20px; font-weight:bold;color:#333333 ">月出库统计</div>
|
||||
<div class="itemBox">
|
||||
<div>
|
||||
<p style="font-size: 14px;color:#606266 ">项目数 </p>
|
||||
<p style="font-size: 20px;font-weight:500; ">{{ countObj.monthOutCount }} </p>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 14px; color:#606266">条目数 </p>
|
||||
<p style="font-size: 20px; font-weight:500;">{{ countObj.monthOutProjectCount }} </p>
|
||||
</div>
|
||||
<div>
|
||||
<p style="font-size: 14px; color:#606266">总金额 </p>
|
||||
<p style="font-size: 20px; font-weight:500;">{{ countObj.monthOutAmount }} </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inOrOutBox_icon">
|
||||
<img src="../assets/images/outbound.png" alt="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24" style="margin-top: 20px;">
|
||||
<!-- <el-col :span="6">
|
||||
<div class="main">
|
||||
<div class="titleBox">
|
||||
<div class="line"></div>
|
||||
<div class="name">
|
||||
<div>仓库概览</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_progress" style="margin-top: 35px;">总库位100</div>
|
||||
<el-progress :show-text="false" :stroke-width="20" :percentage="70" />
|
||||
<div class="main_progress">已用库位100</div>
|
||||
<el-progress :show-text="false" :stroke-width="20" :percentage="70" />
|
||||
<div class="main_progress">可用库位100</div>
|
||||
<el-progress :show-text="false" :stroke-width="20" :percentage="70" />
|
||||
|
||||
</div>
|
||||
</el-col> -->
|
||||
|
||||
<el-col :span="8">
|
||||
<div class="main">
|
||||
<div class="titleBox">
|
||||
@@ -114,7 +77,9 @@
|
||||
<div class="line"></div>
|
||||
<div class="name" style="display: flex;align-items: center;justify-content: space-between;flex: 1;">
|
||||
<div>库龄统计</div>
|
||||
<el-icon style="cursor: pointer;" @click="downloadExcel"><Download /></el-icon>
|
||||
<el-icon style="cursor: pointer;" @click="downloadExcel">
|
||||
<Download />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="24" style="margin-top: 25px;height: 100%;">
|
||||
@@ -180,22 +145,21 @@
|
||||
<div style="font-size: 32px; font-family: PingFang SC-Medium;">9999</div>
|
||||
<div style="margin-top: 16px; font-family: PingFang SC-Regular;">待盘点</div>
|
||||
</div> -->
|
||||
<el-table :data="waitTableData" :header-row-style="handleCellStyle" style="margin-top: 20px;" >
|
||||
<el-table :data="waitTableData" :header-row-style="handleCellStyle" style="margin-top: 20px;">
|
||||
<el-table-column prop="type" label="类型" width="150" align="center">
|
||||
<template #default="scope">
|
||||
<span style="color:#ee6666;font-weight: 550;">{{scope.row.type}}</span>
|
||||
<span style="color:#ee6666;font-weight: 550;">{{ scope.row.type }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="situation" label="情况" /> -->
|
||||
<el-table-column prop="projectCount" label="项目数" align="center"/>
|
||||
<el-table-column prop="itemCount" label="条目数" align="center"/>
|
||||
<el-table-column prop="amountPlan" label="总金额" align="center"/>
|
||||
<el-table-column prop="totalQty" label="总数量" align="center"/>
|
||||
<el-table-column prop="projectCnt" label="项目数" align="center" />
|
||||
<el-table-column prop="totalAmt" label="总金额" align="center" />
|
||||
<el-table-column prop="totalQty" label="总数量" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
@@ -255,13 +219,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="echartsBox" style="overflow-y: auto;">
|
||||
<div v-for="(item,index) in noticeList" :key="index">
|
||||
<div v-for="(item, index) in noticeList" :key="index">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; margin-top: 13px">
|
||||
<div style="width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px;">{{ item.noticeTitle }}</div>
|
||||
<div style="color: #0288FF; font-size: 14px; cursor: pointer;" @click="goNotice(item.noticeId)">详情</div>
|
||||
<div
|
||||
style="width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px;">
|
||||
{{
|
||||
item.noticeTitle }}</div>
|
||||
<div style="color: #0288FF; font-size: 14px; cursor: pointer;" @click="goNotice(item.noticeId)">详情
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -274,16 +242,12 @@
|
||||
<div class="line"></div>
|
||||
<div class="name">
|
||||
<div>入库类型统计</div>
|
||||
<el-date-picker
|
||||
v-model="dateInventoryTypeObj"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="margin: 0 20px;"
|
||||
/>
|
||||
<el-button type="primary" @click="getInventoryTypeList">搜索</el-button>
|
||||
<div>
|
||||
<el-date-picker v-model="dateInventoryTypeObj" type="daterange" range-separator="至"
|
||||
start-placeholder="开始时间" end-placeholder="结束时间" value-format="YYYY-MM-DD" style="margin: 0 20px;" />
|
||||
<el-button type="primary" @click="getInventoryTypeList">搜索</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="echartsBox" style="margin-top: 20px;" id="echartsInventoryType"></div>
|
||||
@@ -295,16 +259,11 @@
|
||||
<div class="line"></div>
|
||||
<div class="name">
|
||||
<div>出库类型统计</div>
|
||||
<el-date-picker
|
||||
v-model="dateOutInventoryTypeObj"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="margin: 0 20px;"
|
||||
/>
|
||||
<el-button type="primary" @click="getOutInventoryTypeList">搜索</el-button>
|
||||
<div>
|
||||
<el-date-picker v-model="dateOutInventoryTypeObj" type="daterange" range-separator="至"
|
||||
start-placeholder="开始时间" end-placeholder="结束时间" value-format="YYYY-MM-DD" style="margin: 0 20px;" />
|
||||
<el-button type="primary" @click="getOutInventoryTypeList">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="echartsBox" style="margin-top: 20px;" id="echartsOutInventoryType"></div>
|
||||
@@ -312,22 +271,22 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog title="公告详情" v-model="open" width="780px" append-to-body @close="closeDialog">
|
||||
<el-form ref="noticeRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="内容">
|
||||
<editor v-model="noticeContent" :min-height="192" :readOnly="true" :showToolbar="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- <template #footer>
|
||||
<el-form ref="noticeRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="内容">
|
||||
<editor v-model="noticeContent" :min-height="192" :readOnly="true" :showToolbar="false" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- <template #footer>
|
||||
<div class="dialog-footer" >
|
||||
<el-button type="primary" @click="submitForm" :disabled="isDetail">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template> -->
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
|
||||
<!-- <el-row :gutter="24" style="margin-top: 20px;">
|
||||
<el-col :span="24" style="height: 400px;">
|
||||
@@ -390,7 +349,7 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -398,25 +357,43 @@
|
||||
<script setup>
|
||||
import * as echarts from 'echarts';
|
||||
import { onMounted } from "vue";
|
||||
import { getMonthCount, getWaitIn, getWaitOut, getInventoryAge, getAgeLong, getInventoryReview, getInStorage, getGoodsType, getDailyInventory, getInventoryType, getOutInventoryType } from '@/api/index'
|
||||
import { listNotice,getNotice } from "@/api/system/notice";
|
||||
import { getHomeState, getAgeLong, getWait, getInventoryReview, getOutTypeByTime, getInTypeByTime, getDailyInventory, getNoticeList } from '@/api/index'
|
||||
import { listNotice, getNotice } from "@/api/system/notice";
|
||||
import { parseTime } from '@/utils/manage'
|
||||
|
||||
const open = ref(false);
|
||||
const noticeContent = ref("")
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const a = (scope) => {
|
||||
console.log(scope)
|
||||
}
|
||||
|
||||
let countObj = ref({
|
||||
inSummary:{},
|
||||
outSummary:{},
|
||||
})
|
||||
const getMonthCountList = () => {
|
||||
getMonthCount().then(res => {
|
||||
countObj.value = res.data
|
||||
// 顶部月统计数据
|
||||
let countObj = ref({})
|
||||
let colorList = ref(['#00968F', '#0077a0', '#61cdbb'])
|
||||
|
||||
// 查询时间
|
||||
let startTime = parseTime(new Date(Date.now() - 30 * 24 * 60 * 60 * 1000), '{y}-{m}-{d}') // 14天前
|
||||
let endTime = parseTime(new Date(), '{y}-{m}-{d}') // 当前时间
|
||||
|
||||
// 获取月统计、当前入库类型统计、物资类型统计接口
|
||||
const getMonthCountList = (params) => {
|
||||
getHomeState(params).then(res => {
|
||||
// 月统计
|
||||
countObj.value = res.data?.kpi
|
||||
// 当前入库类型统计
|
||||
getChartInStorage(res.data?.currentInType, "echartsInStorage")
|
||||
//物资类型统计
|
||||
getChartGoodsType(res.data?.materialType)
|
||||
})
|
||||
}
|
||||
|
||||
// 预警 + 库龄统计
|
||||
const getAgeLongList = () => {
|
||||
getAgeLong().then(res => {
|
||||
let data1 = res.data.slice(0, 3)
|
||||
getChartInventoryAge(data1, "inventoryAgeEchatrs")
|
||||
let data2 = res.data.slice(3)
|
||||
getChartInventoryAge(data2, "warningEchatrs")
|
||||
})
|
||||
}
|
||||
|
||||
@@ -435,108 +412,50 @@ const getMonthCountList = () => {
|
||||
// // 其他默认样式
|
||||
// return { backgroundColor: '#FFFFFF', color: '#333333' };
|
||||
// };
|
||||
const handleCellStyle = ()=>{
|
||||
const handleCellStyle = () => {
|
||||
return { backgroundColor: '#f5f7fa' }
|
||||
}
|
||||
let waitTableData = ref([
|
||||
{
|
||||
type: '应到未到[部分未到]',
|
||||
situation: '部分未到',
|
||||
projectCount: '',
|
||||
itemCount: '',
|
||||
totalQty: '',
|
||||
amountPlan: ''
|
||||
},
|
||||
{
|
||||
type: '应到未到[全部未到]',
|
||||
situation: '全部未到',
|
||||
projectCount: '',
|
||||
itemCount: '',
|
||||
totalQty: '',
|
||||
amountPlan: ''
|
||||
},
|
||||
{
|
||||
type: '应出未出[全部未出]',
|
||||
situation: '全部未出',
|
||||
projectCount: '',
|
||||
itemCount: '',
|
||||
totalQty: '',
|
||||
amountPlan: ''
|
||||
}
|
||||
])
|
||||
|
||||
// 待办事项数据
|
||||
let waitTableData = ref([])
|
||||
const getWaitList = () => {
|
||||
getWaitIn().then(res => {
|
||||
waitTableData.value[0].projectCount = res.data.undelivered.projectCount
|
||||
waitTableData.value[0].itemCount = res.data.undelivered.itemCount
|
||||
waitTableData.value[0].totalQty = res.data.undelivered.totalQty
|
||||
waitTableData.value[0].amountPlan = res.data.undelivered.amountPlan.toFixed(2)
|
||||
waitTableData.value[1].projectCount = res.data.partialUndelivered.projectCount
|
||||
waitTableData.value[1].itemCount = res.data.partialUndelivered.itemCount
|
||||
waitTableData.value[1].totalQty = res.data.partialUndelivered.totalQty
|
||||
waitTableData.value[1].amountPlan = res.data.partialUndelivered.amountPlan.toFixed(2)
|
||||
})
|
||||
getWaitOut().then(res => {
|
||||
waitTableData.value[2].projectCount = res.data.projectCount
|
||||
waitTableData.value[2].itemCount = res.data.goodsCountTotal
|
||||
waitTableData.value[2].totalQty = res.data.sumQty
|
||||
waitTableData.value[2].amountPlan = res.data.sumAmount.toFixed(2)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
let startTime = parseTime(new Date(Date.now() - 30 * 24 * 60 * 60 * 1000), '{y}-{m}-{d}') // 14天前
|
||||
let endTime = parseTime(new Date(), '{y}-{m}-{d}') // 当前时间
|
||||
const getInventoryAgeList = () => {
|
||||
getInventoryAge().then(res => {
|
||||
getChartInventoryAge(res.data, "inventoryAgeEchatrs")
|
||||
})
|
||||
}
|
||||
|
||||
const getAgeLongList = () => {
|
||||
getAgeLong().then(res => {
|
||||
getChartInventoryAge(res.data, "warningEchatrs")
|
||||
getWait().then(res => {
|
||||
waitTableData.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
// 仓库使用率数据
|
||||
const getInventoryReviewList = () => {
|
||||
getInventoryReview().then(res => {
|
||||
getChartInventoryReview(res.data)
|
||||
})
|
||||
}
|
||||
|
||||
const getInStorageList = () => {
|
||||
getInStorage().then(res => {
|
||||
getChartInStorage(res.data, "echartsInStorage")
|
||||
})
|
||||
}
|
||||
|
||||
const getGoodsTypeList = () => {
|
||||
getGoodsType().then(res => {
|
||||
getChartGoodsType(res.data)
|
||||
})
|
||||
}
|
||||
|
||||
const dateInventoryTypeObj = ref([startTime, endTime])
|
||||
// 入库类型统计-时间搜索
|
||||
const dateInventoryTypeObj = ref([])
|
||||
const getInventoryTypeList = () => {
|
||||
let params = {
|
||||
start: dateInventoryTypeObj.value[0],
|
||||
end: dateInventoryTypeObj.value[1]
|
||||
startDate: dateInventoryTypeObj.value?.[0],
|
||||
endDate: dateInventoryTypeObj.value?.[1]
|
||||
}
|
||||
getInventoryType(params).then(res => {
|
||||
getInTypeByTime(params).then(res => {
|
||||
getChartInventoryType(res.data, "echartsInventoryType")
|
||||
})
|
||||
}
|
||||
|
||||
const dateOutInventoryTypeObj = ref([startTime, endTime])
|
||||
// 出库类型统计-时间搜索
|
||||
const dateOutInventoryTypeObj = ref([[]])
|
||||
const getOutInventoryTypeList = () => {
|
||||
let params = {
|
||||
start: dateOutInventoryTypeObj.value[0],
|
||||
end: dateOutInventoryTypeObj.value[1]
|
||||
startDate: dateOutInventoryTypeObj.value?.[0],
|
||||
endDate: dateOutInventoryTypeObj.value?.[1]
|
||||
}
|
||||
getOutInventoryType(params).then(res => {
|
||||
getOutTypeByTime(params).then(res => {
|
||||
getChartInventoryType(res.data, "echartsOutInventoryType")
|
||||
})
|
||||
}
|
||||
|
||||
// todo 已注释内容 - 出库指标统计/入库指标统计
|
||||
const getChartDailyInventory = (data, id) => {
|
||||
let xAxisData = []
|
||||
let projectData = []
|
||||
@@ -579,7 +498,7 @@ const getChartDailyInventory = (data, id) => {
|
||||
type: 'category',
|
||||
data: xAxisData,
|
||||
axisLabel: {
|
||||
rotate: 30,
|
||||
rotate: 30,
|
||||
},
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
@@ -658,6 +577,7 @@ const getChartDailyInventory = (data, id) => {
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
const dateDailyInventoryObj = ref([startTime, endTime])
|
||||
const getDailyInventoryList = () => {
|
||||
let params = {
|
||||
@@ -669,41 +589,22 @@ const getDailyInventoryList = () => {
|
||||
getChartDailyInventory(res.data.out, "echartsDailyOutInventory")
|
||||
})
|
||||
}
|
||||
//todo 注释内容完成
|
||||
|
||||
const noticeList = ref([
|
||||
// {
|
||||
// id: 1,
|
||||
// title: "本公司董事会及全体董事保证本公告内容不存在任何虚假记载、误导性陈述或者重大遗漏,并对其内容的真实性、准确性和完整性承担法律责任。",
|
||||
// },
|
||||
// {
|
||||
// id: 2,
|
||||
// title: "国内贸易指采购和销售均在境内。公司接到客户订单后,按照合同约定收取预收款,部分纸张业务客户预付定金10%,浆类业务客户无预付定金,棉纱及部分塑..."
|
||||
// },
|
||||
// {
|
||||
// id: 3,
|
||||
// title: "进出口贸易包括进口贸易(国外采购销售给国内客户)和出口贸易(国内采购销售给国外客户)。"
|
||||
// },
|
||||
// {
|
||||
// id: 4,
|
||||
// title: "进口贸易指自国外进口采购,于国内销售的贸易业务。公司接到客户订单后(棉纱及塑料粒子类客户预付定金一般约为5-10%,部分纸张及印刷设备代理类客户..."
|
||||
// },
|
||||
// {
|
||||
// id: 5,
|
||||
// title: "企业自第三方取得商品控制权后,通过提供重大的服务将该商品与其他商品整合成某组合产出转让给客户。"
|
||||
// }
|
||||
])
|
||||
|
||||
const getNoticeList = () => {
|
||||
listNotice().then(res => {
|
||||
// 通知公告列表
|
||||
const noticeList = ref([])
|
||||
const getNoticeListValue = () => {
|
||||
getNoticeList().then(res => {
|
||||
noticeList.value = res.rows;
|
||||
})
|
||||
}
|
||||
//通知公告详情
|
||||
const open = ref(false);
|
||||
const noticeContent = ref("")
|
||||
const goNotice = (noticeId) => {
|
||||
getNotice(noticeId).then(response => {
|
||||
noticeContent.value = response.data.noticeContent;
|
||||
open.value = true;
|
||||
|
||||
});
|
||||
// 张金波注释,不跳转到列表,只弹开详情
|
||||
// proxy.$router.push({
|
||||
@@ -711,28 +612,27 @@ const goNotice = (noticeId) => {
|
||||
// })
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
getMonthCountList()
|
||||
getWaitList()
|
||||
getInventoryAgeList()
|
||||
getInventoryReviewList()
|
||||
getInStorageList()
|
||||
getGoodsTypeList()
|
||||
getAgeLongList()
|
||||
getInventoryTypeList()
|
||||
getOutInventoryTypeList()
|
||||
getDailyInventoryList()
|
||||
getNoticeList()
|
||||
// 入库类型统计查询时间
|
||||
dateInventoryTypeObj.value = [startTime, endTime]
|
||||
// 出库类型统计查询时间
|
||||
dateOutInventoryTypeObj.value = [startTime, endTime]
|
||||
|
||||
getMonthCountList()// 获取月统计、当前入库类型统计、物资类型统计接口
|
||||
getAgeLongList()// 预警 + 库龄统计
|
||||
getWaitList()// 待办事项数据
|
||||
getInventoryReviewList()// 仓库使用率数据
|
||||
getInventoryTypeList()// 入库类型统计-时间搜索
|
||||
getOutInventoryTypeList()// 出库类型统计-时间搜索
|
||||
getNoticeListValue()// 通知公告列表
|
||||
});
|
||||
|
||||
const downloadExcel = () => {
|
||||
proxy.download('/stat/age/export', {}, `库龄统计_${new Date().getTime()}.xlsx`)
|
||||
proxy.download('/stat/stockAge/export30', {}, `库龄统计_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
|
||||
// 预警 + 库龄统计 图表
|
||||
const getChartInventoryAge = (data, id) => {
|
||||
let chartDom = document.getElementById(id);
|
||||
let myChart = echarts.init(chartDom);
|
||||
@@ -744,6 +644,7 @@ const getChartInventoryAge = (data, id) => {
|
||||
orient: 'vertical',
|
||||
left: 'left'
|
||||
},
|
||||
color: colorList.value,
|
||||
series: [
|
||||
{
|
||||
name: '库龄',
|
||||
@@ -761,17 +662,17 @@ const getChartInventoryAge = (data, id) => {
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
// 仓库使用率数据图表
|
||||
const getChartInventoryReview = (data) => {
|
||||
let xAxisData = []
|
||||
let totalData = []
|
||||
let usedData = []
|
||||
let freeData = []
|
||||
data.items.forEach(item => {
|
||||
xAxisData.push(item.warehouseName)
|
||||
totalData.push(item.totalPositions)
|
||||
usedData.push(item.usedPositions)
|
||||
freeData.push(item.freePositions)
|
||||
data.forEach(item => {
|
||||
xAxisData.push(item.cangkuName)
|
||||
totalData.push(item.totalSlot)
|
||||
usedData.push(item.usedSlot)
|
||||
freeData.push(item.unusedSlot)
|
||||
})
|
||||
var chartDom = document.getElementById('echartsInventoryReview');
|
||||
var myChart = echarts.init(chartDom);
|
||||
@@ -789,6 +690,7 @@ const getChartInventoryReview = (data) => {
|
||||
// bottom: '8%',
|
||||
},
|
||||
legend: {},
|
||||
color: colorList.value,
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
boundaryGap: [0, 0.01]
|
||||
@@ -797,7 +699,7 @@ const getChartInventoryReview = (data) => {
|
||||
type: 'category',
|
||||
data: xAxisData,
|
||||
axisLabel: {
|
||||
rotate: 30,
|
||||
rotate: 30,
|
||||
},
|
||||
},
|
||||
series: [
|
||||
@@ -819,19 +721,18 @@ const getChartInventoryReview = (data) => {
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
// 当前入库类型统计图表
|
||||
const getChartInStorage = (data, id) => {
|
||||
let xAxisData = []
|
||||
let projectData = []
|
||||
let totalData = []
|
||||
let itemData = []
|
||||
let priceData = []
|
||||
data.forEach(item => {
|
||||
xAxisData.push(item.groupName)
|
||||
projectData.push(item.projectCount)
|
||||
itemData.push(item.goodsCountTotal)
|
||||
totalData.push(item.sumQty)
|
||||
priceData.push(item.sumAmount)
|
||||
xAxisData.push(item.groupName)
|
||||
projectData.push(item.projectCount) //项目数
|
||||
totalData.push(item.totalQuantity) //总数量
|
||||
priceData.push(item.totalAmount)//总金额
|
||||
})
|
||||
var chartDom = document.getElementById(id);
|
||||
var myChart = echarts.init(chartDom);
|
||||
@@ -859,12 +760,13 @@ const getChartInStorage = (data, id) => {
|
||||
legend: {
|
||||
// data: ['项目数', '条目数', '总金额']
|
||||
},
|
||||
color: colorList.value,
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: xAxisData,
|
||||
axisLabel: {
|
||||
rotate: 30,
|
||||
rotate: 30,
|
||||
},
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
@@ -919,16 +821,6 @@ const getChartInStorage = (data, id) => {
|
||||
},
|
||||
data: projectData
|
||||
},
|
||||
{
|
||||
name: '条目数',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' 个';
|
||||
}
|
||||
},
|
||||
data: itemData
|
||||
},
|
||||
{
|
||||
name: '总数量',
|
||||
type: 'bar',
|
||||
@@ -953,19 +845,17 @@ const getChartInStorage = (data, id) => {
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
// 物资类型统计图表
|
||||
const getChartGoodsType = (data) => {
|
||||
let xAxisData = []
|
||||
let projectData = []
|
||||
let totalData = []
|
||||
let itemData = []
|
||||
let priceData = []
|
||||
data.forEach(item => {
|
||||
xAxisData.push(item.typeName)
|
||||
projectData.push(item.projectCount)
|
||||
totalData.push(item.totalQty)
|
||||
itemData.push(item.itemCount)
|
||||
priceData.push(item.amountHt)
|
||||
xAxisData.push(item.groupName)
|
||||
projectData.push(item.projectCount) //项目数
|
||||
totalData.push(item.totalQuantity) //总数量
|
||||
priceData.push(item.totalAmount)//总金额
|
||||
})
|
||||
var chartDom = document.getElementById("echartsGoodsType");
|
||||
var myChart = echarts.init(chartDom);
|
||||
@@ -993,12 +883,13 @@ const getChartGoodsType = (data) => {
|
||||
legend: {
|
||||
// data: ['项目数', '条目数', '总金额']
|
||||
},
|
||||
color: colorList.value,
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: xAxisData,
|
||||
axisLabel: {
|
||||
rotate: 30,
|
||||
rotate: 30,
|
||||
},
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
@@ -1053,16 +944,16 @@ const getChartGoodsType = (data) => {
|
||||
},
|
||||
data: projectData
|
||||
},
|
||||
{
|
||||
name: '条目数',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' 个';
|
||||
}
|
||||
},
|
||||
data: itemData
|
||||
},
|
||||
// {
|
||||
// name: '条目数',
|
||||
// type: 'bar',
|
||||
// tooltip: {
|
||||
// valueFormatter: function (value) {
|
||||
// return value + ' 个';
|
||||
// }
|
||||
// },
|
||||
// data: itemData
|
||||
// },
|
||||
{
|
||||
name: '总数量',
|
||||
type: 'bar',
|
||||
@@ -1087,7 +978,7 @@ const getChartGoodsType = (data) => {
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
// 入库类型统计/出库类型统计图表
|
||||
const getChartInventoryType = (data, id) => {
|
||||
let xAxisData = []
|
||||
let projectData = []
|
||||
@@ -1095,11 +986,10 @@ const getChartInventoryType = (data, id) => {
|
||||
let itemData = []
|
||||
let priceData = []
|
||||
data.forEach(item => {
|
||||
xAxisData.push(item.rkTypeName)
|
||||
projectData.push(item.projectCount)
|
||||
totalData.push(item.sumQty)
|
||||
itemData.push(item.goodsCountTotal)
|
||||
priceData.push(item.sumAmount)
|
||||
xAxisData.push(item.groupName)
|
||||
projectData.push(item.projectCount) //项目数
|
||||
totalData.push(item.totalQuantity) //总数量
|
||||
priceData.push(item.totalAmount)//总金额
|
||||
})
|
||||
var chartDom = document.getElementById(id);
|
||||
var myChart = echarts.init(chartDom);
|
||||
@@ -1124,6 +1014,7 @@ const getChartInventoryType = (data, id) => {
|
||||
grid: {
|
||||
// bottom: '8%',
|
||||
},
|
||||
color: colorList.value,
|
||||
legend: {
|
||||
// data: ['项目数', '条目数', '总金额']
|
||||
},
|
||||
@@ -1132,7 +1023,7 @@ const getChartInventoryType = (data, id) => {
|
||||
type: 'category',
|
||||
data: xAxisData,
|
||||
axisLabel: {
|
||||
rotate: 30,
|
||||
rotate: 30,
|
||||
},
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
@@ -1187,16 +1078,6 @@ const getChartInventoryType = (data, id) => {
|
||||
},
|
||||
data: projectData
|
||||
},
|
||||
{
|
||||
name: '条目数',
|
||||
type: 'bar',
|
||||
tooltip: {
|
||||
valueFormatter: function (value) {
|
||||
return value + ' 个';
|
||||
}
|
||||
},
|
||||
data: itemData
|
||||
},
|
||||
{
|
||||
name: '总数量',
|
||||
|
||||
@@ -1224,13 +1105,10 @@ const getChartInventoryType = (data, id) => {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dashboard{
|
||||
.dashboard {
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// bottom: 0;
|
||||
@@ -1240,8 +1118,37 @@ const getChartInventoryType = (data, id) => {
|
||||
// flex-direction: column;
|
||||
background-color: #F5F5F5;
|
||||
padding: 32rpx;
|
||||
.boxNum{
|
||||
height: 98px;
|
||||
|
||||
.itemBox {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.inOrOutBox {
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.inOrOutBox_left {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.inOrOutBox_icon {
|
||||
img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.boxNum {
|
||||
height: 100px;
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
color: #FFFFFF;
|
||||
@@ -1250,7 +1157,8 @@ const getChartInventoryType = (data, id) => {
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
padding: 0 20px;
|
||||
.boxNum_icon{
|
||||
|
||||
.boxNum_icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -1258,9 +1166,11 @@ const getChartInventoryType = (data, id) => {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
.titleBox{
|
||||
|
||||
.titleBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 6px;
|
||||
height: 15px;
|
||||
@@ -1268,10 +1178,13 @@ const getChartInventoryType = (data, id) => {
|
||||
border-radius: 12px 12px 12px 12px;
|
||||
transform: rotateX(360deg);
|
||||
}
|
||||
.name{
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
margin-left: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 28px;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
@@ -1283,29 +1196,33 @@ const getChartInventoryType = (data, id) => {
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
.main{
|
||||
|
||||
.main {
|
||||
background-color: #FFFFFF;
|
||||
padding: 20px;
|
||||
box-shadow: 0px 4px 12px 0px rgba(255, 223, 217, 0.2);
|
||||
border-radius: 6px;
|
||||
height: 360px;
|
||||
.main_progress{
|
||||
|
||||
.main_progress {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.main_box{
|
||||
|
||||
.main_box {
|
||||
width: 88%;
|
||||
height: 110px;
|
||||
cursor: pointer;
|
||||
margin-top: 25px;
|
||||
background:#E2F1FE;
|
||||
background: #E2F1FE;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.warningBox{
|
||||
|
||||
.warningBox {
|
||||
border-radius: 8px;
|
||||
border: #fecaca 1px solid;
|
||||
height: 100%;
|
||||
@@ -1317,14 +1234,16 @@ const getChartInventoryType = (data, id) => {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
.echartsMain{
|
||||
|
||||
.echartsMain {
|
||||
background-color: #FFFFFF;
|
||||
height: 100%;
|
||||
border-radius: 6px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.echartsBox{
|
||||
|
||||
.echartsBox {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
所属仓库:{{ deviceInfo.warehouseName || "暂无" }}
|
||||
</div>
|
||||
<div style="margin-top: 20px;">
|
||||
所属场景:{{ deviceInfo.sceneName || "暂无" }}
|
||||
所属场景:{{ sceneData.filter(x=>x.sceneCode==deviceInfo.sceneId).length ? sceneData.filter(x=>x.sceneCode==deviceInfo.sceneId)[0].sceneName : "暂无" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -207,7 +207,9 @@ const boundDevice = () => {
|
||||
if (ids.value.length > 1) {
|
||||
ElMessage({ message: '只能选择一个设备信息', type: 'error' })
|
||||
} else if (ids.value.length == 1) {
|
||||
let sceneName = sceneData.value.filter(x=>x.sceneCode== deviceObj.value.sceneId)[0].sceneName
|
||||
let obj = JSON.parse(JSON.stringify(deviceObj.value))
|
||||
obj.sceneName = sceneName
|
||||
deviceInfo.value = JSON.parse(JSON.stringify(obj))
|
||||
localStorage.setItem("deviceInfo", JSON.stringify(obj))
|
||||
deviceStatus.value = true
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<el-table v-loading="loading" :data="pcdedetailList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="库位编号" align="center" prop="pcode" />
|
||||
<el-table-column label="RFID" align="center" width="250" prop="encodedId" />
|
||||
<el-table-column label="所属场景" align="center" prop="sceneName" />
|
||||
<el-table-column label="所属大库" align="center" prop="parentWarehouseName" />
|
||||
<el-table-column label="所属小库" align="center" prop="warehouseName" />
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
/>
|
||||
|
||||
<!-- 添加或修改仓库信息对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-dialog :title="title" v-model="open" width="500px">
|
||||
<el-form ref="warehouseinfoRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="大库编码" prop="parentWarehouseCode">
|
||||
<el-input v-model="form.parentWarehouseCode" placeholder="请输入大库编码" />
|
||||
|
||||
@@ -177,6 +177,8 @@
|
||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="100"/>
|
||||
<el-table-column label="行号" align="center" prop="xh" />
|
||||
<el-table-column label="计划交货数量" align="center" prop="jhQty" width="120"/>
|
||||
<el-table-column label="实际入库数量" align="center" prop="realQty" width="120"/>
|
||||
<el-table-column label="待入库数量" align="center" prop="waitQty" width="120"/>
|
||||
<el-table-column label="合同数量" align="center" prop="htQty" />
|
||||
<el-table-column label="计量单位" align="center" prop="dw" />
|
||||
<el-table-column label="身份码" align="center" prop="entityId" width="150"/>
|
||||
@@ -292,7 +294,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同单价" prop="htDj">
|
||||
<el-input v-model="form.htDj" placeholder="请输入合同单价" />
|
||||
<el-input v-model="form.htDj" placeholder="请输入合同单价" @change="htDjChange($event,'htDj')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -307,7 +309,7 @@
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划交货数量" prop="jhQty">
|
||||
<el-input v-model="form.jhQty" placeholder="请输入计划交货数量" />
|
||||
<el-input v-model="form.jhQty" placeholder="请输入计划交货数量" @change="htDjChange($event,'jhQty')" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -530,6 +532,7 @@ function handleQuery() {
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
importTime.value=''
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
@@ -801,6 +804,30 @@ function handlePrint(){
|
||||
// Print.print('printMe');
|
||||
// showContent.value = false;
|
||||
}
|
||||
// 合同金额改变
|
||||
function htDjChange(e,name) {
|
||||
console.log(e,form.value,name,'e===>');
|
||||
if(e){
|
||||
const htDj = form.value?.htDj
|
||||
const jhQty = form.value?.jhQty
|
||||
const jhAmt = (Number(htDj) * Number(jhQty)* 100*10000) / ( 100*10000)
|
||||
console.log(jhAmt,'jhAmt==>');
|
||||
if(!(/^-?\d+(\.\d+)?$/.test(e))){
|
||||
if(name == 'htDj'){
|
||||
proxy.$modal.msgError("合同单价请输入数字");
|
||||
return;
|
||||
}
|
||||
if(name == 'jhQty'){
|
||||
proxy.$modal.msgError("计划交货数量请输入数字");
|
||||
return;
|
||||
}
|
||||
form.value.jhAmt=''
|
||||
}else{
|
||||
form.value.jhAmt=jhAmt
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
getList();
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,573 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<!-- <el-form-item label="县局" prop="xj">
|
||||
<el-input
|
||||
v-model="queryParams.xj"
|
||||
placeholder="请输入县局"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="项目号" prop="xmNo">
|
||||
<el-input
|
||||
v-model="queryParams.xmNo"
|
||||
placeholder="请输入项目号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目描述" prop="xmMs">
|
||||
<el-input
|
||||
v-model="queryParams.xmMs"
|
||||
placeholder="请输入项目描述"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料号" prop="wlNo">
|
||||
<el-input
|
||||
v-model="queryParams.wlNo"
|
||||
placeholder="请输入物料号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料描述" prop="wlMs">
|
||||
<el-input
|
||||
v-model="queryParams.wlMs"
|
||||
placeholder="请输入物料描述"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="供应商编码" prop="gysNo">
|
||||
<el-input
|
||||
v-model="queryParams.gysNo"
|
||||
placeholder="请输入供应商编码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="供应商名称" prop="gysMc">
|
||||
<el-input
|
||||
v-model="queryParams.gysMc"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['query:jh:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['query:jh:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['query:jh:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Upload"
|
||||
@click="handleImport"
|
||||
v-hasPermi="['query:jh:import']"
|
||||
>导入供应计划</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['query:jh:export']">导出供应计划</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Upload"
|
||||
@click="handlePrint"
|
||||
v-print="printViewInfo"
|
||||
>打印</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<!-- @selection-change="handleSelectionChange" -->
|
||||
<el-table v-loading="loading" :data="jhList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
<!-- <el-table-column label="县局" align="center" prop="xj" /> -->
|
||||
<el-table-column label="项目号" align="center" prop="xmNo" />
|
||||
<el-table-column label="项目描述" align="center" prop="xmMs" />
|
||||
<el-table-column label="物料号" align="center" prop="wlNo" />
|
||||
<el-table-column label="物料描述" align="center" prop="wlMs" />
|
||||
<el-table-column label="供应商编码" align="center" prop="gysNo" />
|
||||
<el-table-column label="供应商名称" align="center" prop="gysMc" />
|
||||
<el-table-column label="计划交货金额" align="center" prop="jhAmt" />
|
||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
||||
<el-table-column label="SAP订单编号" align="center" prop="sapNo" />
|
||||
<el-table-column label="行号" align="center" prop="xh" />
|
||||
<el-table-column label="计划交货数量" align="center" prop="jhQty" />
|
||||
<el-table-column label="合同数量" align="center" prop="htQty" />
|
||||
<el-table-column label="计量单位" align="center" prop="dw" />
|
||||
<!-- <el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="是否删除" align="center" prop="isDelete" /> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['query:jh:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['query:jh:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 打印 -->
|
||||
<div id="printMe" class="printMeBox" v-show="showContent">
|
||||
<div class="titleBox">
|
||||
<div>项目编号:{{ printList.length>0 ? printList[0].xmNo:"" }}</div>
|
||||
<div>项目描述:{{ printList.length>0 ? printList[0].xmMs:"" }}</div>
|
||||
<!-- <img :src="qrcodeDataURL" alt="二维码" /> -->
|
||||
|
||||
</div>
|
||||
<el-col :span="24" class="card-box">
|
||||
<!-- <el-collapse > -->
|
||||
|
||||
|
||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
||||
<table cellspacing="0" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="el-table__cell is-leaf"><div class="cell">订单号</div></th>
|
||||
<th class="el-table__cell is-leaf"><div class="cell">二维码</div></th>
|
||||
<th class="el-table__cell is-leaf"><div class="cell">供应商名称</div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in printList" :key="item.id">
|
||||
<td class="el-table__cell is-leaf"><div class="cell">{{ item.sapNo }}</div></td>
|
||||
<td class="el-table__cell is-leaf"><div class="cell" ><qrcode-vue :value="item.sapNo" :size="60" level="H"></qrcode-vue></div></td>
|
||||
<td class="el-table__cell is-leaf"><div class="cell" >{{ item.gysMc }}</div></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td class="el-table__cell is-leaf"><div class="cell">已用库位</div></td>
|
||||
<td class="el-table__cell is-leaf"><div class="cell" >89</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="el-table__cell is-leaf"><div class="cell">可用库位</div></td>
|
||||
<td class="el-table__cell is-leaf"><div class="cell" >20</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="el-table__cell is-leaf"><div class="cell">当前空闲率</div></td>
|
||||
<td class="el-table__cell is-leaf"><div class="cell" >20%</div></td>
|
||||
</tr> -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- </el-collapse> -->
|
||||
</el-col>
|
||||
</div>
|
||||
<!-- 添加或修改供应计划对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="jhRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="县局" prop="xj">
|
||||
<el-input v-model="form.xj" placeholder="请输入县局" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目号" prop="xmNo">
|
||||
<el-input v-model="form.xmNo" placeholder="请输入项目号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目描述" prop="xmMs">
|
||||
<el-input v-model="form.xmMs" placeholder="请输入项目描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料号" prop="wlNo">
|
||||
<el-input v-model="form.wlNo" placeholder="请输入物料号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料描述" prop="wlMs">
|
||||
<el-input v-model="form.wlMs" placeholder="请输入物料描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商编码" prop="gysNo">
|
||||
<el-input v-model="form.gysNo" placeholder="请输入供应商编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称" prop="gysMc">
|
||||
<el-input v-model="form.gysMc" placeholder="请输入供应商名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划交货金额" prop="jhAmt">
|
||||
<el-input v-model="form.jhAmt" placeholder="请输入计划交货金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同单价" prop="htDj">
|
||||
<el-input v-model="form.htDj" placeholder="请输入合同单价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="SAP订单编号" prop="sapNo">
|
||||
<el-input v-model="form.sapNo" placeholder="请输入SAP订单编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="行号" prop="xh">
|
||||
<el-input v-model="form.xh" placeholder="请输入行号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划交货数量" prop="jhQty">
|
||||
<el-input v-model="form.jhQty" placeholder="请输入计划交货数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同数量" prop="htQty">
|
||||
<el-input v-model="form.htQty" placeholder="请输入合同数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计量单位" prop="dw">
|
||||
<el-input v-model="form.dw" placeholder="请输入计量单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="是否删除" prop="isDelete">
|
||||
<el-input v-model="form.isDelete" placeholder="请输入是否删除" />
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 导入对话框 -->
|
||||
<el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
|
||||
<el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
|
||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip text-center">
|
||||
<!-- <div class="el-upload__tip">
|
||||
<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
|
||||
</div> -->
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<!-- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">下载模板</el-link> -->
|
||||
</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Jh">
|
||||
// import { getToken } from "@/utils/auth";
|
||||
// import { listJh, getJh, delJh, addJh, updateJh } from "@/api/query/jh";
|
||||
// //生成二维码
|
||||
// import QrcodeVue from 'qrcode.vue';
|
||||
|
||||
// const { proxy } = getCurrentInstance();
|
||||
|
||||
// const jhList = ref([]);
|
||||
// const open = ref(false);
|
||||
// const loading = ref(true);
|
||||
// const showSearch = ref(true);
|
||||
// const ids = ref([]);
|
||||
// const single = ref(true);
|
||||
// const multiple = ref(true);
|
||||
// const total = ref(0);
|
||||
// const title = ref("");
|
||||
// const printList = ref([]);
|
||||
// const showContent = ref(false); // 控制打印内容是否显示
|
||||
// // const qrcodeDataURL = ref("")
|
||||
// //文件上传--供应计划导入
|
||||
// const upload = reactive({
|
||||
// // 是否显示弹出层(用户导入)
|
||||
// open: false,
|
||||
// // 弹出层标题(用户导入)
|
||||
// title: "",
|
||||
// // 是否禁用上传
|
||||
// isUploading: false,
|
||||
// // 是否更新已经存在的用户数据
|
||||
// updateSupport: 0,
|
||||
// // 设置上传的请求头部
|
||||
// headers: { Authorization: "Bearer " + getToken() },
|
||||
// // 上传的地址
|
||||
// url: import.meta.env.VITE_APP_BASE_API + "/query/jh/import"
|
||||
// });
|
||||
|
||||
// const data = reactive({
|
||||
// form: {},
|
||||
// queryParams: {
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
// // xj: null,
|
||||
// xmNo: null, //项目号
|
||||
// xmMs: null, //项目描述
|
||||
// wlNo: null, //物料号
|
||||
// wlMs: null, //物料描述
|
||||
// // gysNo: null,
|
||||
// gysMc: null, //gysMc
|
||||
// // jhAmt: null,
|
||||
// // htDj: null,
|
||||
// // sapNo: null,
|
||||
// // xh: null,
|
||||
// // jhQty: null,
|
||||
// // htQty: null,
|
||||
// // dw: null,
|
||||
// // isDelete: null
|
||||
// },
|
||||
// rules: {
|
||||
// },
|
||||
// printViewInfo: {
|
||||
// id: "printMe", //打印区域的唯一的id属性
|
||||
// popTitle: '入库信息打印', // 页眉文字 (不设置时显示undifined)(页眉页脚可以在打印页面的更多设置的选项中取消勾选)
|
||||
|
||||
|
||||
// beforeOpenCallback () {
|
||||
// showContent.value = false;
|
||||
// }, // 开始打印之前的callback
|
||||
// openCallback () { }, // 调用打印时的callback
|
||||
// closeCallback () { }, // 关闭打印的callback(无法区分确认or取消)
|
||||
// clickMounted () { },
|
||||
|
||||
// standard: '',
|
||||
// extarCss: ''
|
||||
// },
|
||||
// // printOption: {
|
||||
// // id: 'printMe', // 打印元素的id 不需要携带#号
|
||||
// // popTitle: '员工信息' // 页眉标题 默认浏览器标题 空字符串时显示undefined 使用html语言
|
||||
// // },
|
||||
// });
|
||||
|
||||
// const { queryParams, form, rules,printViewInfo } = toRefs(data);
|
||||
|
||||
// /** 查询供应计划列表 */
|
||||
// function getList() {
|
||||
// loading.value = true;
|
||||
// listJh(queryParams.value).then(response => {
|
||||
// jhList.value = response.rows;
|
||||
// total.value = response.total;
|
||||
// loading.value = false;
|
||||
// });
|
||||
// }
|
||||
|
||||
// // 取消按钮
|
||||
// function cancel() {
|
||||
// open.value = false;
|
||||
// reset();
|
||||
// }
|
||||
|
||||
// // 表单重置
|
||||
// function reset() {
|
||||
// form.value = {
|
||||
// id: null,
|
||||
// xj: null,
|
||||
// xmNo: null,
|
||||
// xmMs: null,
|
||||
// wlNo: null,
|
||||
// wlMs: null,
|
||||
// gysNo: null,
|
||||
// gysMc: null,
|
||||
// jhAmt: null,
|
||||
// htDj: null,
|
||||
// sapNo: null,
|
||||
// xh: null,
|
||||
// jhQty: null,
|
||||
// htQty: null,
|
||||
// dw: null,
|
||||
// remark: null,
|
||||
// createBy: null,
|
||||
// createTime: null,
|
||||
// updateBy: null,
|
||||
// updateTime: null,
|
||||
// isDelete: null
|
||||
// };
|
||||
// proxy.resetForm("jhRef");
|
||||
// }
|
||||
|
||||
// /** 搜索按钮操作 */
|
||||
// function handleQuery() {
|
||||
// queryParams.value.pageNum = 1;
|
||||
// getList();
|
||||
// }
|
||||
|
||||
// /** 重置按钮操作 */
|
||||
// function resetQuery() {
|
||||
// proxy.resetForm("queryRef");
|
||||
// handleQuery();
|
||||
// }
|
||||
|
||||
// // 多选框选中数据
|
||||
// function handleSelectionChange(selection) {
|
||||
// // qrcodeDataURL.value = "101293361"
|
||||
// // console.log(selection)
|
||||
// // let sapNo = "101293360"
|
||||
// // let width = 200
|
||||
// // let height = 200
|
||||
// // let correctLevel = 'M'
|
||||
// // QRCode.toDataURL({
|
||||
// // sapNo,
|
||||
// // width,
|
||||
// // height,
|
||||
// // correctLevel
|
||||
// // }).then((url) => {
|
||||
// // qrcodeDataURL.value = url
|
||||
// // }).catch((error) => {
|
||||
// // console.error(error)
|
||||
// // })
|
||||
// // printList.value = selection.map(item=>({
|
||||
// // sapNo:item.sapNo,
|
||||
// // gysMc:item.gysMc,
|
||||
// // id:item.id
|
||||
// // }))
|
||||
|
||||
// ids.value = selection.map(item => item.id);
|
||||
// single.value = selection.length != 1;
|
||||
// multiple.value = !selection.length;
|
||||
// printList.value = selection
|
||||
// // let printListData =
|
||||
// // for(let i=0;i<selection.length;i++){
|
||||
// // let sapNo = selection[i].sapNo
|
||||
// // let width = 200
|
||||
// // let height = 200
|
||||
// // let correctLevel = 'M'
|
||||
// // QRCode.toDataURL({
|
||||
// // sapNo,
|
||||
// // width,
|
||||
// // height,
|
||||
// // correctLevel
|
||||
// // }).then((url) => {
|
||||
// // this.qrcodeDataURL = url
|
||||
// // }).catch((error) => {
|
||||
// // console.error(error)
|
||||
// // })
|
||||
// // }
|
||||
// }
|
||||
|
||||
// /** 新增按钮操作 */
|
||||
// function handleAdd() {
|
||||
// reset();
|
||||
// open.value = true;
|
||||
// title.value = "添加供应计划";
|
||||
// }
|
||||
|
||||
// /** 修改按钮操作 */
|
||||
// function handleUpdate(row) {
|
||||
// reset();
|
||||
// const _id = row.id || ids.value
|
||||
// getJh(_id).then(response => {
|
||||
// form.value = response.data;
|
||||
// open.value = true;
|
||||
// title.value = "修改供应计划";
|
||||
// });
|
||||
// }
|
||||
|
||||
// /** 提交按钮 */
|
||||
// function submitForm() {
|
||||
// proxy.$refs["jhRef"].validate(valid => {
|
||||
// if (valid) {
|
||||
// if (form.value.id != null) {
|
||||
// updateJh(form.value).then(response => {
|
||||
// proxy.$modal.msgSuccess("修改成功");
|
||||
// open.value = false;
|
||||
// getList();
|
||||
// });
|
||||
// } else {
|
||||
// addJh(form.value).then(response => {
|
||||
// proxy.$modal.msgSuccess("新增成功");
|
||||
// open.value = false;
|
||||
// getList();
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// /** 删除按钮操作 */
|
||||
// function handleDelete(row) {
|
||||
// const _ids = row.id || ids.value;
|
||||
// proxy.$modal.confirm('是否确认删除供应计划编号为"' + _ids + '"的数据项?').then(function() {
|
||||
// return delJh(_ids);
|
||||
// }).then(() => {
|
||||
// getList();
|
||||
// proxy.$modal.msgSuccess("删除成功");
|
||||
// }).catch(() => {});
|
||||
// }
|
||||
|
||||
// /** 导出按钮操作 */
|
||||
// function handleExport() {
|
||||
// proxy.download('query/jh/export', {
|
||||
// ...queryParams.value
|
||||
// }, `jh_${new Date().getTime()}.xlsx`)
|
||||
// }
|
||||
// function handleImport() {
|
||||
// upload.title = "供应计划导入";
|
||||
// upload.open = true;
|
||||
// };
|
||||
// /**文件上传中处理 */
|
||||
// const handleFileUploadProgress = (event, file, fileList) => {
|
||||
// upload.isUploading = true;
|
||||
// };
|
||||
|
||||
// /** 文件上传成功处理 */
|
||||
// const handleFileSuccess = (response, file, fileList) => {
|
||||
// upload.open = false;
|
||||
// upload.isUploading = false;
|
||||
// proxy.$refs["uploadRef"].handleRemove(file);
|
||||
// proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
|
||||
// getList();
|
||||
// };
|
||||
|
||||
// /** 提交上传文件 */
|
||||
// function submitFileForm() {
|
||||
// proxy.$refs["uploadRef"].submit();
|
||||
// };
|
||||
// // 打印
|
||||
// function handlePrint(){
|
||||
// showContent.value = true;
|
||||
// // setTimeout(() => {
|
||||
// // showContent.value = false;
|
||||
// // }, 300)
|
||||
// // Print.print('printMe');
|
||||
// // showContent.value = false;
|
||||
// }
|
||||
// getList();
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
.app-container{
|
||||
.printMeBox{
|
||||
|
||||
}
|
||||
}
|
||||
.titleBox{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@media print {
|
||||
@page {
|
||||
size: auto;
|
||||
margin: 10mm;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,651 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="90">
|
||||
<el-row >
|
||||
<el-col :span="7">
|
||||
<el-form-item label="入库时间" prop="rkTime">
|
||||
<!-- <el-date-picker
|
||||
v-model="rkTime"
|
||||
type="daterange"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
format="YYYY-MM-DD"
|
||||
/> -->
|
||||
<el-date-picker
|
||||
v-model="rkTime"
|
||||
type="datetimerange"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="项目号" prop="xmNo">
|
||||
<el-input
|
||||
v-model="queryParams.xmNo"
|
||||
placeholder="请输入项目号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="订单编号" prop="sapNo">
|
||||
<el-input
|
||||
v-model="queryParams.sapNo"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单据号" prop="billNo">
|
||||
<el-input
|
||||
v-model="queryParams.billNo"
|
||||
placeholder="请输入单据号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="库存状态" prop="isChuku">
|
||||
<el-select placeholder="请选择" clearable disabled>
|
||||
<el-option v-for="dict in storeStatusList" :key="dict.id" :label="dict.statusName" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
|
||||
<el-col :span="4">
|
||||
<el-form-item label="物资类型" prop="wlType">
|
||||
<el-select v-model="queryParams.wlType" placeholder="请选择物资类型" clearable >
|
||||
<el-option v-for="dict in wzTypeList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row >
|
||||
<el-col :span="7">
|
||||
<el-form-item label="项目描述" prop="xmMs">
|
||||
<el-input
|
||||
v-model="queryParams.xmMs"
|
||||
placeholder="请输入项目描述"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="物料号" prop="wlNo">
|
||||
<el-input
|
||||
v-model="queryParams.wlNo"
|
||||
placeholder="请输入物料号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="供应商编码" prop="gysNo">
|
||||
<el-input
|
||||
v-model="queryParams.gysNo"
|
||||
placeholder="请输入供应商编码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="库位码" prop="pcode">
|
||||
<el-input
|
||||
v-model="queryParams.pcode"
|
||||
placeholder="请输入库位码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="入库类型" prop="rkType">
|
||||
<el-select v-model="queryParams.rkType" placeholder="请选择入库类型" clearable >
|
||||
<el-option v-for="dict in storeTypeList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="供应商名称" prop="gysMc">
|
||||
<el-input
|
||||
v-model="queryParams.gysMc"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="所属仓库" prop="cangku">
|
||||
<el-select v-model="queryParams.cangku" placeholder="请选择仓库" clearable >
|
||||
<el-option v-for="dict in warehouseList" :key="dict.id" :label="dict.warehouseName" :value="dict.warehouseCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-form-item label="物料描述" prop="wlMs">
|
||||
<el-input
|
||||
v-model="queryParams.wlMs"
|
||||
placeholder="物料描述"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
@click="handleDel"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleStore"
|
||||
>一键入库</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="stockList" @selection-change="selectionChange" border show-overflow-tooltip>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键ID" align="center" prop="id" />-->
|
||||
<el-table-column label="单据号" align="center" prop="billNo" width="180"/>
|
||||
<el-table-column label="库存状态" align="center" width="100">
|
||||
<!-- scope.row.isChuku==0?"已入库":(scope.row.isChuku==1?"已出库":"审批中") -->
|
||||
<template #default="scope">
|
||||
<span>{{ isChukuFun(scope.row.isChuku) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目号" align="center" prop="xmNo" width="150"/>
|
||||
<el-table-column label="项目描述" align="center" prop="xmMs" width="150"/>
|
||||
<el-table-column label="物料号" align="center" prop="wlNo" width="100"/>
|
||||
<el-table-column label="物料描述" align="center" prop="wlMs" width="150"/>
|
||||
<el-table-column label="供应商编码" align="center" prop="gysNo" width="150"/>
|
||||
<el-table-column label="供应商名称" align="center" prop="gysMc" width="150"/>
|
||||
<el-table-column label="计划交货金额" align="center" prop="jhAmt" width="120"/>
|
||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="150"/>
|
||||
<!-- <el-table-column label="行号" align="center" prop="xh" /> -->
|
||||
<el-table-column label="计划交货数量" align="center" prop="jhQty" width="120"/>
|
||||
<!-- <el-table-column label="合同数量" align="center" prop="htQty" /> -->
|
||||
<el-table-column label="计量单位" align="center" prop="dw" />
|
||||
<el-table-column label="实际入库数量" align="center" prop="realQty" width="120"/>
|
||||
<el-table-column label="库位码" align="center" prop="pcode" width="120"/>
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="身份码" align="center" prop="entityId" width="150"/>
|
||||
<el-table-column label="入库类型" align="center" prop="rkTypeName" width="150"/>
|
||||
<el-table-column label="物资类型" align="center" prop="wlTypeName" />
|
||||
<el-table-column label="所属大库" align="center" prop="parentWarehouseName" width="150"/>
|
||||
<el-table-column label="所属小库" align="center" prop="warehouseName" width="150"/>
|
||||
<el-table-column label="入库时间" align="center" prop="rkTime" width="100">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.rkTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库龄" align="center" prop="stockAge" />
|
||||
<el-table-column label="理货员" align="center" prop="lihuoYName" />
|
||||
<!-- <el-table-column label="审核状态" align="center" prop="lihuoY" >
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.auditResult==0?"已入库":"已出库" }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="现场图片" align="center" v-if="isExamine==1">
|
||||
<template #default="scope">
|
||||
<el-image :src="scope.row.scenePhotoUrl" style="width:50px;height: 50px;"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="srcList"
|
||||
show-progress
|
||||
:initial-index="4"
|
||||
:preview-teleported="true"
|
||||
@click="preview(scope.row.scenePhotoUrl)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" width="150"/>
|
||||
<!-- <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="130">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">一键入库</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handleStockDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 图片预览 -->
|
||||
<el-dialog v-model="dialogVisible">
|
||||
<img w-full :src="dialogImageUrl" alt="Preview Image" />
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="inrevoke">
|
||||
// wisdomDelStock
|
||||
import { listInrevoke,delStore,storeFun} from "@/api/wisdom/inrevoke";
|
||||
import { getAudit} from "@/api/wisdom/stock";
|
||||
import {warehousingDict} from "@/api/information/warehousingtype"; //入库类型
|
||||
import {materialtypeDict} from "@/api/information/materialtype"; //物资类型
|
||||
import {warehouseDict} from "@/api/information/warehouseinfo"; //所属仓库
|
||||
import {personListDict} from "@/api/system/user"; //理货员
|
||||
import {getKwList} from "@/api/information/pcdedetail"; //库位下拉数据
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const stockList = ref([]);
|
||||
const open = ref(false);
|
||||
const openSwitch = ref(false); //移库
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const idEdit = ref(0);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const planLoading = ref(true);
|
||||
const planList = ref([]); //从供应计划中添加列表
|
||||
const checkPlanList = ref([]); //已选中的要入库的数据
|
||||
const storeTypeList = ref([]); //入库类型下拉数据
|
||||
const wzTypeList = ref([]); //物资类型下拉数据
|
||||
const warehouseList = ref([]); //所属仓库下拉数据
|
||||
const personList = ref([]); //理货员下拉数据
|
||||
const orderNum = ref("") //搜索条件:订单号
|
||||
const kwOptions = ref([]); //库位下拉
|
||||
const showContent = ref(false); // 控制打印内容是否显示
|
||||
const dateStr = ref("") //打印单据生成的日期
|
||||
const printList = ref([]) //要打印的数据列表
|
||||
const storeStatusList = ref([
|
||||
{id:0,statusName:"已入库"},
|
||||
{id:1,statusName:"已出库"}
|
||||
])
|
||||
const moveReason = ref("") //移库原因
|
||||
const rkTime = ref([])
|
||||
const isExamine = ref(0) //是否需要开启审核 1开启;0不开启
|
||||
const actionUrl = import.meta.env.VITE_APP_BASE_API+"/wisdom/signature/upload"
|
||||
const dialogImageUrl = ref('')
|
||||
const dialogVisible = ref(false)
|
||||
const srcList = ref([])
|
||||
const autoFill = ref(false) //是否自动填充备注
|
||||
const kzms = ref("")
|
||||
const ids = ref([])
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
storeData:{}, //入库数据
|
||||
switchData:[], //移库数据
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
isChuku:4,
|
||||
billNo:null,
|
||||
// rkTime: [],
|
||||
startTime:null,
|
||||
endTime:null,
|
||||
xmNo: null,
|
||||
sapNo: null,
|
||||
xmMs:"",
|
||||
wlNo:"",
|
||||
gysNo:"",
|
||||
pcode:"",
|
||||
rkType:"",
|
||||
gysMc:"",
|
||||
wlType:"", //物资类型
|
||||
cangku:"",
|
||||
wlMs:"",
|
||||
ids:[]
|
||||
},
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
const { queryParams, storeData,form,switchData} = toRefs(data);
|
||||
function isChukuFun(isChuku){
|
||||
// scope.row.isChuku==0?"已入库":(scope.row.isChuku==1?"已出库":"审批中")
|
||||
|
||||
if(isChuku == 0){
|
||||
return "已入库"
|
||||
} else if(isChuku == 1){
|
||||
return "已出库"
|
||||
}else if(isChuku == 3){
|
||||
return "借料出库"
|
||||
}else if(isChuku == 2){
|
||||
return "审批中"
|
||||
}else if(isChuku == 4){
|
||||
return "入库撤销"
|
||||
}else if(isChuku == 5){
|
||||
return "出库撤销"
|
||||
}
|
||||
}
|
||||
|
||||
function preview(url){
|
||||
srcList.value = [url]
|
||||
}
|
||||
//多选
|
||||
function selectionChange(selection){
|
||||
ids.value = selection.map(item => item.id)
|
||||
}
|
||||
//删除
|
||||
function handleDel(){
|
||||
if(ids.value.length==0){
|
||||
proxy.$modal.msgError("请勾选数据");
|
||||
return
|
||||
}
|
||||
// console.log(ids.value)
|
||||
// return
|
||||
delStore(ids.value).then(response=>{
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
})
|
||||
// console.log(ids.value)
|
||||
}
|
||||
//一键入库
|
||||
function handleStore(){
|
||||
if(ids.value.length==0){
|
||||
proxy.$modal.msgError("请勾选数据");
|
||||
return
|
||||
}
|
||||
storeFun(ids.value).then(response=>{
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//预览图片
|
||||
function handlePreview(uploadFile){
|
||||
// console.log(222222)
|
||||
// console.log(res)
|
||||
dialogImageUrl.value = uploadFile.response.url
|
||||
dialogVisible.value = true
|
||||
}
|
||||
function tableRowClassName({row, rowIndex}) {
|
||||
// console.log(row)
|
||||
// 根据每行的数据,判断isError来增加class属性
|
||||
if (row.isAdd) {
|
||||
return 'warning-row'
|
||||
}
|
||||
// else {
|
||||
// return 'success-row'
|
||||
// }
|
||||
return '';
|
||||
}
|
||||
/** 查询库存单据主列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listInrevoke(queryParams.value).then(response => {
|
||||
stockList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
//判断是否需要开启审核功能
|
||||
function isAudit(){
|
||||
// {configKey:"stock.audit.enabled"}
|
||||
getAudit().then(response=>{
|
||||
// console.log(2222222)
|
||||
// console.log(response.msg)
|
||||
isExamine.value = response.msg
|
||||
})
|
||||
}
|
||||
//库位字典
|
||||
function pcodeList(){
|
||||
getKwList().then(response=>{
|
||||
kwOptions.value = response.data
|
||||
})
|
||||
}
|
||||
//所属仓库
|
||||
function warehouseFun(){
|
||||
//所属仓库下拉数据
|
||||
warehouseDict().then(response=>{
|
||||
warehouseList.value = response.data
|
||||
})
|
||||
}
|
||||
//物资类型
|
||||
function materialFun(){
|
||||
//获取物资类型下拉数据
|
||||
materialtypeDict().then(response=>{
|
||||
wzTypeList.value = response.data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
planList.value = []
|
||||
storeData.value = {}
|
||||
proxy.resetForm("stockRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
|
||||
if(rkTime.value && rkTime.value.length>0){
|
||||
queryParams.value.startTime = rkTime.value[0]
|
||||
queryParams.value.endTime = rkTime.value[1]
|
||||
}else{
|
||||
queryParams.value.startTime = ""
|
||||
queryParams.value.endTime = ""
|
||||
}
|
||||
queryParams.value.pageNum = 1;
|
||||
if(printList.value.length>0){
|
||||
queryParams.value.ids = printList.value.map( item => item.id )
|
||||
}
|
||||
// console.log(queryParams.value)
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
rkTime.value = []
|
||||
// queryParams.value.startTime = ""
|
||||
// queryParams.value.endTime = ""
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加库存单据";
|
||||
//获取入库类型下拉数据
|
||||
warehousingDict().then(response=>{
|
||||
storeTypeList.value = response.data
|
||||
})
|
||||
//理货员下拉数据
|
||||
personListDict().then(response=>{
|
||||
personList.value = response.data
|
||||
})
|
||||
}
|
||||
function lhyList(){
|
||||
//理货员下拉数据
|
||||
personListDict().then(response=>{
|
||||
personList.value = response.data
|
||||
})
|
||||
}
|
||||
function rklxList(){
|
||||
//获取入库类型下拉数据
|
||||
warehousingDict().then(response=>{
|
||||
storeTypeList.value = response.data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// function selectKw(row){
|
||||
// console.log(row)
|
||||
// }
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
idEdit.value = row.id
|
||||
getStock(row.id).then(response => {
|
||||
let dataInfo = response.data
|
||||
dataInfo.isnew = true
|
||||
storeData.value.rkType = dataInfo.rkType
|
||||
storeData.value.wlType = dataInfo.wlType
|
||||
storeData.value.cangku = dataInfo.cangku
|
||||
storeData.value.lihuoY = parseInt(dataInfo.lihuoY)
|
||||
planList.value = [dataInfo]
|
||||
// form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改库存单据";
|
||||
});
|
||||
}
|
||||
function closeDialog(){
|
||||
idEdit.value = 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 撤销入库
|
||||
const handleStockDelete = (row) => {
|
||||
// dialogDelStock.value = true
|
||||
proxy.$modal.confirm('确定撤销吗?').then(function() {
|
||||
if(row.isChuku==0){
|
||||
let data = {
|
||||
id:row.id,
|
||||
realQty:row.realQty,
|
||||
gysJhId:row.gysJhId
|
||||
}
|
||||
return wisdomDelStock(data);
|
||||
}else if(row.isChuku==1){
|
||||
return ckDelStock(row.id)
|
||||
}
|
||||
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
const dialogDelStock = ref(false)
|
||||
const delStockFormRef = ref(null)
|
||||
const delStockForm = ref({
|
||||
billNo:''
|
||||
})
|
||||
const delStockRules = ref({
|
||||
billNo: [{ required: true, message: '请输入单据号', trigger: ['blur'] }],
|
||||
})
|
||||
const submitDelStock = () => {
|
||||
proxy.$refs["delStockFormRef"].validate(valid => {
|
||||
if (valid){
|
||||
wisdomDelStock(delStockForm.value.billNo).then(response=>{
|
||||
if(response.code==200){
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
//数据列表
|
||||
getList();
|
||||
dialogDelStock.value = false
|
||||
}else{
|
||||
proxy.$modal.msgError("操作失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const cancelDelStock = () => {
|
||||
dialogDelStock.value = false
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('wisdom/stock/export', {
|
||||
...queryParams.value
|
||||
}, `stock_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
//数据列表
|
||||
getList();
|
||||
//库位下拉数据
|
||||
pcodeList()
|
||||
//所属仓库
|
||||
warehouseFun()
|
||||
//物资类型
|
||||
materialFun()
|
||||
//是否开启审核
|
||||
isAudit()
|
||||
//入库类型下拉数据
|
||||
rklxList()
|
||||
//理货员下拉数据
|
||||
lhyList()
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-table .warning-row {
|
||||
--el-table-tr-bg-color: var(--el-color-warning-light-9);
|
||||
}
|
||||
.el-table .success-row {
|
||||
--el-table-tr-bg-color: var(--el-color-success-light-9);
|
||||
}
|
||||
.titleBox{
|
||||
text-align: center;
|
||||
}
|
||||
.topBox{
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
}
|
||||
.bottomBox{
|
||||
margin-top: 20px;
|
||||
}
|
||||
.oneLineBox{
|
||||
display: flex;
|
||||
}
|
||||
.everyBox{
|
||||
width: 30%;
|
||||
}
|
||||
.examine{
|
||||
margin-top: 20px;
|
||||
height: 100px;
|
||||
background-color: #ededed;
|
||||
padding: 20px 0 0 20px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -28,18 +28,19 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="recordList" border show-overflow-tooltip>
|
||||
<el-table v-loading="loading" :data="recordList" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" border show-overflow-tooltip>
|
||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||
<el-table-column label="物料描述" align="center" prop="wlMs" />
|
||||
<el-table-column label="供应商" align="center" prop="gysMc" />
|
||||
<el-table-column label="项目编号" align="center" prop="xmNo" />
|
||||
<el-table-column label="项目描述" align="center" prop="xmMs" />
|
||||
|
||||
<el-table-column label="移库数量" align="center" prop="realQty" />
|
||||
<el-table-column label="原仓库" align="center" prop="fromCangkuName" />
|
||||
<el-table-column label="原库位码" align="center" prop="fromPcode" />
|
||||
<el-table-column label="原托盘码" align="center" prop="fromTrayCode" />
|
||||
@@ -49,7 +50,18 @@
|
||||
<el-table-column label="身份码" align="center" prop="entityId" />
|
||||
<el-table-column label="移库人" align="center" prop="movedByName" />
|
||||
<el-table-column label="移库原因" align="center" prop="moveReason" />
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="80"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="delData(scope.row)"
|
||||
>撤销</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -60,218 +72,73 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改移库记录对话框 -->
|
||||
<!-- :visible.sync="open" -->
|
||||
<el-dialog :title="title" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="关联的库存单据ID" prop="rkId">
|
||||
<el-input v-model="form.rkId" placeholder="请输入关联的库存单据ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实物ID" prop="entityId">
|
||||
<el-input v-model="form.entityId" placeholder="请输入实物ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原仓库" prop="fromCangku">
|
||||
<el-input v-model="form.fromCangku" placeholder="请输入原仓库" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原库位码" prop="fromPcode">
|
||||
<el-input v-model="form.fromPcode" placeholder="请输入原库位码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原托盘码" prop="fromTrayCode">
|
||||
<el-input v-model="form.fromTrayCode" placeholder="请输入原托盘码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目标仓库" prop="toCangku">
|
||||
<el-input v-model="form.toCangku" placeholder="请输入目标仓库" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目标库位码" prop="toPcode">
|
||||
<el-input v-model="form.toPcode" placeholder="请输入目标库位码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="目标托盘码" prop="toTrayCode">
|
||||
<el-input v-model="form.toTrayCode" placeholder="请输入目标托盘码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="移库原因" prop="moveReason">
|
||||
<el-input v-model="form.moveReason" placeholder="请输入移库原因" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人" prop="movedBy">
|
||||
<el-input v-model="form.movedBy" placeholder="请输入操作人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作时间" prop="movedAt">
|
||||
<el-input v-model="form.movedAt" placeholder="请输入操作时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="逻辑删除标志" prop="isDelete">
|
||||
<el-input v-model="form.isDelete" placeholder="请输入逻辑删除标志" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- slot="footer" -->
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRecord } from "@/api/wisdom/move";
|
||||
<script setup name="Move">
|
||||
import { listRecord, delMove } from "@/api/wisdom/move";
|
||||
import {warehouseDict} from "@/api/information/warehouseinfo"; //所属仓库
|
||||
|
||||
export default {
|
||||
name: "move",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 移库记录表格数据
|
||||
recordList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
fromCangku: null,
|
||||
toCangku: null,
|
||||
xmNo:null
|
||||
},
|
||||
warehouseList:[], //所属仓库下拉数据
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
rkId: [
|
||||
{ required: true, message: "关联的库存单据ID不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.warehouseFun()
|
||||
},
|
||||
methods: {
|
||||
//所属仓库
|
||||
warehouseFun(){
|
||||
//所属仓库下拉数据
|
||||
warehouseDict().then(response=>{
|
||||
this.warehouseList = response.data
|
||||
})
|
||||
},
|
||||
/** 查询移库记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRecord(this.queryParams).then(response => {
|
||||
this.recordList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
rkId: null,
|
||||
entityId: null,
|
||||
fromCangku: null,
|
||||
fromPcode: null,
|
||||
fromTrayCode: null,
|
||||
toCangku: null,
|
||||
toPcode: null,
|
||||
toTrayCode: null,
|
||||
moveReason: null,
|
||||
movedBy: null,
|
||||
movedAt: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
isDelete: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加移库记录";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getRecord(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改移库记录";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateRecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除移库记录编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRecord(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('system/record/export', {
|
||||
// ...this.queryParams
|
||||
// }, `record_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
const proxy = getCurrentInstance().proxy;
|
||||
|
||||
// 显示搜索条件
|
||||
const showSearch = ref(true);
|
||||
|
||||
// 所属仓库下拉数据
|
||||
const warehouseList = ref([]);
|
||||
const warehouseFun = () =>{
|
||||
//所属仓库下拉数据
|
||||
warehouseDict().then(response=>{
|
||||
warehouseList.value = response.data
|
||||
})
|
||||
}
|
||||
warehouseFun()
|
||||
|
||||
/** 查询移库记录列表 */
|
||||
// 遮罩层
|
||||
const loading = ref(true);
|
||||
// 查询参数
|
||||
const queryParams = ref({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
fromCangku: null,
|
||||
toCangku: null,
|
||||
xmNo:null
|
||||
});
|
||||
// 总条数
|
||||
const total = ref(0);
|
||||
// 表格引用
|
||||
const infoTableRef = ref(null);
|
||||
// 移库记录表格数据
|
||||
const recordList = ref([]);
|
||||
const getList = () => {
|
||||
loading.value = true;
|
||||
listRecord(queryParams.value).then(response => {
|
||||
recordList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
getList();
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
proxy.resetForm("queryForm");
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
const delData = (row) => {
|
||||
proxy.$modal.confirm('确定撤销该条移库记录吗?').then(function() {
|
||||
return delMove(row.id);
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
</script>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,531 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" label-width="90">
|
||||
<el-row >
|
||||
<el-col :span="7">
|
||||
<el-form-item label="出库时间" prop="rkTime">
|
||||
<!-- <el-date-picker clearable
|
||||
v-model="queryParams.rkTime"
|
||||
type="date"
|
||||
style="width: 100%;"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="请选择出库时间">
|
||||
</el-date-picker> -->
|
||||
<el-date-picker
|
||||
v-model="rkTime"
|
||||
type="datetimerange"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="项目号" prop="xmNo">
|
||||
<el-input
|
||||
v-model="queryParams.xmNo"
|
||||
placeholder="请输入项目号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="订单编号" prop="sapNo">
|
||||
<el-input
|
||||
v-model="queryParams.sapNo"
|
||||
placeholder="请输入订单编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="单据号" prop="billNo">
|
||||
<el-input
|
||||
v-model="queryParams.billNo"
|
||||
placeholder="请输入单据号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="出库类型" prop="ckType">
|
||||
<el-select v-model="queryParams.ckType" placeholder="请选择出库类型" clearable >
|
||||
<el-option v-for="dict in storeTypeList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="所属仓库" prop="cangku">
|
||||
<el-select v-model="queryParams.cangku" placeholder="请选择仓库" clearable >
|
||||
<el-option v-for="dict in warehouseList" :key="dict.id" :label="dict.warehouseName" :value="dict.warehouseCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
<el-row >
|
||||
<el-col :span="7">
|
||||
<el-form-item label="项目描述" prop="xmMs">
|
||||
<el-input
|
||||
v-model="queryParams.xmMs"
|
||||
placeholder="请输入项目描述"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="物料号" prop="wlNo">
|
||||
<el-input
|
||||
v-model="queryParams.wlNo"
|
||||
placeholder="请输入物料号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="物资类型" prop="wlType">
|
||||
<el-select v-model="queryParams.wlType" placeholder="请选择物资类型" clearable >
|
||||
<el-option v-for="dict in wzlxList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="供应商编码" prop="gysNo">
|
||||
<el-input
|
||||
v-model="queryParams.gysNo"
|
||||
placeholder="请输入供应商编码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-form-item label="库位码" prop="pcode">
|
||||
<el-input
|
||||
v-model="queryParams.pcode"
|
||||
placeholder="请输入库位码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="物料描述" prop="wlMs">
|
||||
<el-input
|
||||
v-model="queryParams.wlMs"
|
||||
placeholder="请输入物料描述"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="供应商名称" prop="gysMc">
|
||||
<el-input
|
||||
v-model="queryParams.gysMc"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="所属仓库" prop="cangku">
|
||||
<el-select v-model="queryParams.cangku" placeholder="请选择仓库" clearable >
|
||||
<el-option v-for="dict in warehouseList" :key="dict.id" :label="dict.warehouseName" :value="dict.warehouseCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
@click="handleDel"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleStore"
|
||||
>一键出库</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="outboundList" @selection-change="selectionChange" border show-overflow-tooltip>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键ID" align="center" prop="id" />-->
|
||||
<el-table-column label="单据号" align="center" prop="billNo" width="180"/>
|
||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="150"/>
|
||||
<el-table-column label="项目号" align="center" prop="xmNo" width="150"/>
|
||||
<el-table-column label="项目描述" align="center" prop="xmMs" width="150"/>
|
||||
<el-table-column label="物料号" align="center" prop="wlNo" width="100"/>
|
||||
<el-table-column label="物料描述" align="center" prop="wlMs" width="150"/>
|
||||
<el-table-column label="供应商编码" align="center" prop="gysNo" width="150"/>
|
||||
<el-table-column label="供应商名称" align="center" prop="gysMc" width="150"/>
|
||||
<el-table-column label="计划交货金额" align="center" prop="jhAmt" width="120"/>
|
||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
||||
|
||||
<!-- <el-table-column label="行号" align="center" prop="xh" /> -->
|
||||
<el-table-column label="计划交货数量" align="center" prop="jhQty" width="120"/>
|
||||
<!-- <el-table-column label="合同数量" align="center" prop="htQty" /> -->
|
||||
<el-table-column label="计量单位" align="center" prop="dw" />
|
||||
<el-table-column label="实际出库数量" align="center" prop="realQty" width="120"/>
|
||||
<el-table-column label="所属大库" align="center" prop="parentWarehouseName" width="150"/>
|
||||
<el-table-column label="所属小库" align="center" prop="warehouseName" width="150"/>
|
||||
<el-table-column label="库位码" align="center" prop="pcode" width="120"/>
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="身份码" align="center" prop="entityId" width="150"/>
|
||||
<el-table-column label="出库类型" align="center" prop="ckTypeName" />
|
||||
<el-table-column label="物资类型" align="center" prop="wlTypeName" />
|
||||
<el-table-column label="出库时间" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.lyTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="库龄" align="center" prop="stockAge" /> -->
|
||||
<el-table-column label="理货员" align="center" prop="ckLihuoY" />
|
||||
<el-table-column label="现场图片" align="center" v-if="isExamine==1">
|
||||
<template #default="scope">
|
||||
<el-image :src="scope.row.scenePhotoUrl" style="width:50px;height: 50px;"
|
||||
:zoom-rate="1.2"
|
||||
:max-scale="7"
|
||||
:min-scale="0.2"
|
||||
:preview-src-list="srcList"
|
||||
show-progress
|
||||
:initial-index="4"
|
||||
:preview-teleported="true"
|
||||
@click="preview(scope.row.scenePhotoUrl)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="ckRemark" width="150"/>
|
||||
<!-- <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="130">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">出库</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handleStockDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
<!-- 图片预览 -->
|
||||
<el-dialog v-model="dialogVisible">
|
||||
<img w-full :src="dialogImageUrl" alt="Preview Image" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="outrevoke">
|
||||
import { listOutrevoke,delStore,storeFun} from "@/api/wisdom/outrevoke";
|
||||
import {listOuttype} from "@/api/information/outtype"; //出库类型
|
||||
import {listConstruction} from "@/api/information/construction"; //施工队
|
||||
import {warehouseDict} from "@/api/information/warehouseinfo"; //所属仓库
|
||||
import {materialtypeDict} from "@/api/information/materialtype"; //物资类型
|
||||
import {personListDict} from "@/api/system/user"; //理货员
|
||||
// import {getKwList} from "@/api/information/pcdedetail"; //库位下拉数据
|
||||
// import { Plus } from '@element-plus/icons-vue'
|
||||
import { getAudit} from "@/api/wisdom/stock";
|
||||
import { getToken } from "@/utils/auth";
|
||||
|
||||
|
||||
const headers = ref({
|
||||
Authorization: "Bearer " + getToken()
|
||||
});
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const outboundList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const planLoading = ref(true);
|
||||
const planList = ref([]); //从供应计划中添加列表
|
||||
const rkTime = ref([])
|
||||
const storeTypeList = ref([]); //出库类型下拉数据
|
||||
const wzTypeList = ref([]); //施工队下拉数据
|
||||
const wzlxList = ref([]) //物资类型下拉数据
|
||||
const warehouseList = ref([]) //所属仓库下拉数据
|
||||
const personList = ref([]); //理货员下拉数据
|
||||
const orderNum = ref("") //搜索条件:订单号
|
||||
const showContent = ref(false); // 控制打印内容是否显示
|
||||
const dateStr = ref("") //打印单据生成的日期
|
||||
const printList = ref([]) //要打印的数据列表
|
||||
const isExamine = ref(0) //是否需要开启审核 1开启;0不开启
|
||||
const actionUrl = import.meta.env.VITE_APP_BASE_API+"/wisdom/signature/upload"
|
||||
const dialogImageUrl = ref('')
|
||||
const dialogVisible = ref(false)
|
||||
const srcList = ref([])
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
storeData:{}, //出库数据
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
isChuku:5,
|
||||
// rkTime:"", //出库时间
|
||||
lyStartTime:null,
|
||||
lyEndTime:null,
|
||||
xmNo:"",
|
||||
sapNo:"",
|
||||
billNo:"",
|
||||
ids: [],
|
||||
xmMs:"",
|
||||
wlNo:"",
|
||||
gysNo:"",
|
||||
pcode:"",
|
||||
ckType:"",
|
||||
gysMc:"",
|
||||
wlMs:"",
|
||||
wlType:"",
|
||||
cangku:""
|
||||
},
|
||||
outQueryParams:{
|
||||
xmNo:"",
|
||||
wlNo:"",
|
||||
sapNo:"",
|
||||
wlMs:"",
|
||||
xmMs:"",
|
||||
pcode:"",
|
||||
wlType:"",
|
||||
cangku:"",
|
||||
gysMc:"",
|
||||
pageNum:1,
|
||||
pageSize:50,
|
||||
isChuku:0,
|
||||
},
|
||||
rules: {
|
||||
ckType: [{ required: true, message: "出库类型不能为空", trigger: "change" }],
|
||||
teamCode: [{ required: true, message: "施工队不能为空", trigger: "change" }],
|
||||
lyTime: [{ required: true, message: "领用时间不能为空", trigger: "change" }],
|
||||
ckLihuoY: [{ required: true, message: "理货员不能为空", trigger: "change" }]
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
const { queryParams, storeData, rules,form,outQueryParams } = toRefs(data);
|
||||
|
||||
//多选
|
||||
function selectionChange(selection){
|
||||
ids.value = selection.map(item => item.id)
|
||||
}
|
||||
//删除
|
||||
function handleDel(){
|
||||
if(ids.value.length==0){
|
||||
proxy.$modal.msgError("请勾选数据");
|
||||
return
|
||||
}
|
||||
// console.log(ids.value)
|
||||
// return
|
||||
delStore(ids.value).then(response=>{
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
})
|
||||
// console.log(ids.value)
|
||||
}
|
||||
//一键入库
|
||||
function handleStore(){
|
||||
if(ids.value.length==0){
|
||||
proxy.$modal.msgError("请勾选数据");
|
||||
return
|
||||
}
|
||||
storeFun(ids.value).then(response=>{
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
})
|
||||
}
|
||||
|
||||
function preview(url){
|
||||
srcList.value = [url]
|
||||
}
|
||||
//预览图片
|
||||
function handlePreview(uploadFile){
|
||||
// console.log(222222)
|
||||
// console.log(res)
|
||||
dialogImageUrl.value = uploadFile.response.url
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
|
||||
/** 查询库存单据主列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listOutrevoke(queryParams.value).then(response => {
|
||||
outboundList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
planList.value = []
|
||||
storeData.value = {}
|
||||
orderNum.value = ""
|
||||
proxy.resetForm("stockRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
if(rkTime.value && rkTime.value.length>0){
|
||||
queryParams.value.lyStartTime = rkTime.value[0]
|
||||
queryParams.value.lyEndTime = rkTime.value[1]
|
||||
}else{
|
||||
queryParams.value.lyStartTime = ""
|
||||
queryParams.value.lyEndTime = ""
|
||||
}
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryRef");
|
||||
rkTime.value = []
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加出库单据";
|
||||
//获取出库类型下拉数据
|
||||
listOuttype({pageNum:1,pageSize:50}).then(response=>{
|
||||
storeTypeList.value = response.rows
|
||||
})
|
||||
//获取施工队下拉数据
|
||||
listConstruction({pageNum:1,pageSize:50}).then(response=>{
|
||||
wzTypeList.value = response.rows
|
||||
})
|
||||
|
||||
//理货员下拉数据
|
||||
personListDict().then(response=>{
|
||||
personList.value = response.data
|
||||
})
|
||||
//物资类型下拉数据
|
||||
materialtypeDict().then(response=>{
|
||||
wzlxList.value = response.data
|
||||
})
|
||||
//所属仓库下拉数据
|
||||
warehouseDict().then(response=>{
|
||||
warehouseList.value = response.data
|
||||
})
|
||||
|
||||
}
|
||||
//物资类型下拉数据
|
||||
function wzTypeFun(){
|
||||
materialtypeDict().then(response=>{
|
||||
wzlxList.value = response.data
|
||||
})
|
||||
}
|
||||
//所属仓库下拉数据
|
||||
function cangkuFun(){
|
||||
warehouseDict().then(response=>{
|
||||
warehouseList.value = response.data
|
||||
})
|
||||
}
|
||||
function ckTypeFun(){
|
||||
listOuttype({pageNum:1,pageSize:50}).then(response=>{
|
||||
storeTypeList.value = response.rows
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//判断是否需要开启审核功能
|
||||
function isAudit(){
|
||||
// {configKey:"stock.audit.enabled"}
|
||||
getAudit().then(response=>{
|
||||
// console.log(2222222)
|
||||
// console.log(response.msg)
|
||||
isExamine.value = response.msg
|
||||
})
|
||||
}
|
||||
isAudit()
|
||||
getList();
|
||||
ckTypeFun()
|
||||
wzTypeFun()
|
||||
cangkuFun()
|
||||
</script>
|
||||
<style>
|
||||
.el-table .warning-row {
|
||||
--el-table-tr-bg-color: var(--el-color-warning-light-9);
|
||||
}
|
||||
.el-table .success-row {
|
||||
--el-table-tr-bg-color: var(--el-color-success-light-9);
|
||||
}
|
||||
.titleBox{
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.topBox{
|
||||
display: flex;
|
||||
}
|
||||
.topEveryBox{
|
||||
width: 30%;
|
||||
}
|
||||
.tableBox{
|
||||
margin-top: 10px;
|
||||
}
|
||||
.oneLineBox{
|
||||
display: flex;
|
||||
}
|
||||
.everyBox{
|
||||
width: 25%;
|
||||
}
|
||||
.bottomBox{
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="库存状态" prop="isChuku">
|
||||
<el-select v-model="queryParams.isChuku" placeholder="请选择" clearable>
|
||||
<el-form-item label="库存状态" prop="bizType">
|
||||
<el-select v-model="queryParams.bizType" placeholder="请选择" clearable>
|
||||
<el-option v-for="dict in storeStatusList" :key="dict.id" :label="dict.statusName" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -55,7 +55,7 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="所属仓库" prop="warehouseCode">
|
||||
<el-cascader v-model="warehouseCode" :options="warehouseOptions" placeholder="请选择所属仓库" style="width: 100%;"
|
||||
:props="{ children: 'children', label: 'warehouseName', value: 'warehouseCode' }" />
|
||||
:props="{ children: 'children', label: 'warehouseName', value: 'warehouseCode' }" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -71,7 +71,7 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="出库类型" prop="operationTypeCK">
|
||||
<el-select v-model="operationTypeCK" placeholder="请选择出库类型"
|
||||
@change="changeOperationType($event, 'operationTypeCK')" clearable>
|
||||
@change="changeOperationType($event, 'operationTypeCK')" clearable >
|
||||
<el-option v-for="dict in ckTypeList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -101,7 +101,13 @@
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="stockList" show-overflow-tooltip border :row-class-name="tableBillRowClassName">
|
||||
<el-table v-loading="loading" :data="stockList" show-overflow-tooltip border
|
||||
:row-class-name="tableBillRowClassName"
|
||||
ref="infoTableRef"
|
||||
highlight-current-row
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
@row-click="(row) => tableInfoRowClick(row, infoTableRef)">
|
||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||
<el-table-column label="操作类型" align="center" prop="bizType" width="100">
|
||||
<template #default="scope">
|
||||
@@ -113,6 +119,8 @@
|
||||
<el-table-column label="物料号" align="center" prop="wlNo" width="100" />
|
||||
<el-table-column label="物料描述" align="center" prop="wlMs" width="150" />
|
||||
<el-table-column label="单位" align="center" prop="dw" />
|
||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
||||
<el-table-column label="总计" align="center" prop="totalAmount" />
|
||||
<el-table-column label="数量" align="center" prop="realQty" width="120" />
|
||||
<el-table-column label="项目号" align="center" prop="xmNo" width="150" />
|
||||
<el-table-column label="项目描述" align="center" prop="xmMs" width="150" />
|
||||
@@ -136,7 +144,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Record">
|
||||
import { listStock } from "@/api/wisdom/record";
|
||||
import { listStock, getTotal } from "@/api/wisdom/record";
|
||||
import { listOuttype } from "@/api/information/outtype"; //出库类型
|
||||
import { warehouseAll } from "@/api/information/warehouseinfo"; //所属仓库
|
||||
import { materialtypeDict } from "@/api/information/materialtype"; //物资类型
|
||||
@@ -161,11 +169,12 @@ const storeStatusList = ref([
|
||||
{ id: '0', statusName: "已入库" },
|
||||
{ id: '1', statusName: "已出库" }
|
||||
])//库存状态
|
||||
|
||||
// 0入库,1出库,2借料出库,3还料入库
|
||||
const isChukuList = ref([
|
||||
{ value: '0', label: '入库', elTagType: "success", elTagClass: null },
|
||||
{ value: '1', label: '借料出库', elTagType: "warning", elTagClass: null },
|
||||
{ value: '3', label: '还料入库', elTagType: "warning", elTagClass: null },
|
||||
{ value: 0, label: "已入库", elTagType: "success", elTagClass: null },
|
||||
{ value: 1, label: "已出库", elTagType: "warning", elTagClass: null },
|
||||
{ value: 2, label: "借料出库", elTagType: "danger", elTagClass: null },
|
||||
{ value: 3, label: "已归还", elTagType: "primary", elTagClass: null },
|
||||
])
|
||||
|
||||
const data = reactive({
|
||||
@@ -174,7 +183,7 @@ const data = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
billNo: null,
|
||||
isChuku: null,
|
||||
bizType: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
xmNo: null,
|
||||
@@ -267,13 +276,15 @@ function handleExport() {
|
||||
//搜索按钮操作
|
||||
function handleQuery() {
|
||||
//所属仓库
|
||||
console.log(warehouseCode.value, optionTime, '====');
|
||||
console.log(operationTypeCK.value,operationTypeRK.value, '====');
|
||||
if (warehouseCode.value) {
|
||||
queryParams.value.cangku = warehouseCode.value[1]
|
||||
}
|
||||
//详细类型
|
||||
if (operationTypeCK.value || operationTypeRK.value) {
|
||||
if (operationTypeCK.value?.length > 0 || operationTypeRK.value?.length > 0) {
|
||||
queryParams.value.operationType = operationTypeRK.value || operationTypeCK.value
|
||||
}else{
|
||||
queryParams.value.operationType =''
|
||||
}
|
||||
//操作时间
|
||||
if (optionTime.value && optionTime.value.length > 0) {
|
||||
@@ -285,6 +296,7 @@ function handleQuery() {
|
||||
}
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
getSumInfo()
|
||||
}
|
||||
|
||||
// 重置按钮操作
|
||||
@@ -308,10 +320,10 @@ materialFun()
|
||||
//出、入库类型下拉数据
|
||||
rklxList()
|
||||
|
||||
const infoTableRef = ref(null);
|
||||
|
||||
// 显示预出库的状态
|
||||
const tableBillRowClassName = ({ row, rowIndex }) => {
|
||||
console.log('row===>',row);
|
||||
|
||||
if (row.execStatus == 0) {
|
||||
return 'success-row'
|
||||
}
|
||||
@@ -324,6 +336,44 @@ const dictTagData = () => {
|
||||
value: String(item.value)
|
||||
}));
|
||||
}
|
||||
|
||||
function getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
// console.log(columns)
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) { // 第一列不进行合计操作,通常是序列号或选择框等非数值列。
|
||||
sums[index] = '总计'; // 这里可以设置为其他文字或空字符串。
|
||||
return;
|
||||
} else if (index === 2) { // 第二列是金额列,进行求和操作。
|
||||
sums[index] = '总金额:' + totalMoney.value;
|
||||
// }else if(index === 2){
|
||||
// sums[index] = totalMoney.value
|
||||
} else if (index === 3) {
|
||||
sums[index] = '共存于:' + pcodeCount.value + '个库位'
|
||||
} else if (index === 4) {
|
||||
sums[index] = '总数:' + sumQty.value
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
// 获取总计
|
||||
const totalMoney = ref(null)
|
||||
const pcodeCount = ref(null)
|
||||
const sumQty = ref(null)
|
||||
function getSumInfo() {
|
||||
//统计信息
|
||||
let rkInfo = JSON.parse(JSON.stringify(queryParams.value))
|
||||
delete rkInfo.pageNum
|
||||
delete rkInfo.pageSize
|
||||
getTotal(rkInfo).then(response => {
|
||||
totalMoney.value = response.data.totalAmount
|
||||
pcodeCount.value = response.data.locationCount
|
||||
sumQty.value = response.data.totalQuantity
|
||||
});
|
||||
}
|
||||
getSumInfo()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -332,7 +382,7 @@ const dictTagData = () => {
|
||||
}
|
||||
.el-table {
|
||||
/* 核心:把 hover 背景色设为和默认行背景色一致 */
|
||||
--el-table-row-hover-bg-color: transparent;
|
||||
--el-table-row-hover-bg-color: transparent;
|
||||
/* 或设为和表格背景色相同(比如白色),更通用 */
|
||||
/* --el-table-row-hover-bg-color: #ffffff; */
|
||||
}
|
||||
|
||||
@@ -1,27 +1,19 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" v-show="showSearch" >
|
||||
<!-- <el-form-item label="所属仓库" prop="cangku">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.cangku"-->
|
||||
<!-- placeholder="请输入所属仓库"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-row :gutter="40">
|
||||
<el-col :span="5">
|
||||
<el-form-item label="还料时间" prop="returnTime">
|
||||
<el-date-picker
|
||||
v-model="returnTime"
|
||||
type="datetimerange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
clearable
|
||||
placeholder="请选择出库时间"
|
||||
format="YYYY/MM/DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
format="YYYY/MM/DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@@ -69,7 +61,7 @@
|
||||
|
||||
|
||||
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@@ -78,13 +70,13 @@
|
||||
v-print="printViewInfo"
|
||||
v-hasPermi="['wisdom:return:print']"
|
||||
>打印单据</el-button>
|
||||
</el-col> -->
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="outboundList" @selection-change="printSelectionChange" border show-overflow-tooltip>
|
||||
<el-table v-loading="loading" :data="outboundList" ref="infoTableRef" highlight-current-row @row-click="(row) => tableInfoRowClick(row, infoTableRef)" @selection-change="printSelectionChange" border show-overflow-tooltip>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键ID" align="center" prop="id" />-->
|
||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||
<el-table-column label="单据号" align="center" prop="billNo" width="180"/>
|
||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="150"/>
|
||||
<el-table-column label="项目号" align="center" prop="xmNo" width="150"/>
|
||||
@@ -108,7 +100,7 @@
|
||||
<el-table-column label="库位码" align="center" prop="pcode" width="120"/>
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="身份码" align="center" prop="entityId" width="150"/>
|
||||
<el-table-column label="类型" align="center" prop="rkTypeName" width="150"/>
|
||||
<el-table-column label="类型" align="center" prop="operationTypeName" width="150"/>
|
||||
<!-- <el-table-column label="物资类型" align="center" prop="wlTypeName" />-->
|
||||
<el-table-column label="借料时间" align="center" width="100">
|
||||
<template #default="scope">
|
||||
@@ -121,12 +113,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="理货员" align="center" prop="ckLihuoY" />
|
||||
<el-table-column label="备注" align="center" prop="ckRemark" width="200"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button v-show="scope.row.isBorrowed==1" link type="primary" icon="Edit" @click="handleReturn(scope.row)" v-hasPermi="['wisdom:stock:add']">还料</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="备注" align="center" prop="ckRemark" width="200"/> -->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@@ -138,219 +125,75 @@
|
||||
/>
|
||||
<!-- 打印 -->
|
||||
<div id="printMe" class="printMeBox" v-show="showContent">
|
||||
<div class="titleBox">物资还料单</div>
|
||||
<div class="topBox">
|
||||
<div class="topEveryBox">
|
||||
<span>类型:</span>
|
||||
<span>{{ printList.length>0 ? printList[0].rkTypeName :"" }}</span>
|
||||
</div>
|
||||
<div class="topEveryBox">
|
||||
<span>施工队:</span>
|
||||
<span>{{ printList.length>0?printList[0].teamName:"" }}</span>
|
||||
</div>
|
||||
<div class="topEveryBox">
|
||||
<span>单据号:</span>
|
||||
<span>{{ printList.length>0?printList[0].billNo: '' }}</span>
|
||||
</div>
|
||||
<div class="topEveryBox">
|
||||
<span>还料日期:</span>
|
||||
<span>{{ printList.length>0?parseTime(printList[0].returnTime, '{y}-{m}-{d}'):"" }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<span>项目名称:</span>
|
||||
<span>{{ printList.length>0?printList[0].xmMs:"" }}</span>
|
||||
</div>
|
||||
<div class="tableBox">
|
||||
<!-- <el-table :data="printList" style="width:100%;">
|
||||
<el-table-column label="物料号" prop="wlNo" width="100"/>
|
||||
<el-table-column label="物料描述" prop="wlMs" width="180"/>
|
||||
<el-table-column label="数量" prop="realQty" />
|
||||
<el-table-column label="计量单位" prop="dw" width="80"/>
|
||||
<el-table-column label="订单编号" prop="sapNo" width="100"/>
|
||||
<el-table-column label="库存地点" prop="cangkuName" />
|
||||
<el-table-column label="备注" prop="ckRemark" width="150"/>
|
||||
<el-table-column label="身份码" prop="entityId" width="200"/>
|
||||
</el-table> -->
|
||||
<table border="1" style="width: 100%; border-collapse: collapse; font-size: 12px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>物料号</th>
|
||||
<th>物料描述</th>
|
||||
<th>数量</th>
|
||||
<th>计量单位</th>
|
||||
<th>订单编号</th>
|
||||
<th>库存地点</th>
|
||||
<th>备注</th>
|
||||
<th>身份码</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in printList" :key="item.id">
|
||||
<td>{{ item.wlNo }}</td>
|
||||
<td>{{ item.wlMs }}</td>
|
||||
<td>{{ item.realQty }}</td>
|
||||
<td>{{ item.dw }}</td>
|
||||
<td>{{ item.sapNo }}</td>
|
||||
<td>{{ item.cangkuName }}</td>
|
||||
<td>{{ item.ckRemark }}</td>
|
||||
<td>{{ item.entityId }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="bottomBox">
|
||||
<div class="oneLineBox">
|
||||
<div class="everyBox">
|
||||
<span>制单人:</span>
|
||||
<span>唐山公司</span>
|
||||
</div>
|
||||
<div class="everyBox">
|
||||
<span>理货员:</span>
|
||||
|
||||
</div>
|
||||
<div class="everyBox">
|
||||
<span>仓库主管审核:</span>
|
||||
</div>
|
||||
<div class="everyBox">
|
||||
<span>还料人:</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="twoLineBox">
|
||||
<span>打印时间:</span>
|
||||
<span>{{ dateStr }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<printBill :billAllObj="printList" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="outbound">
|
||||
import { listOutbound} from "@/api/wisdom/return"; //列表
|
||||
import {listOuttype} from "@/api/information/outtype"; //出库类型
|
||||
import {listConstruction} from "@/api/information/construction"; //施工队
|
||||
// import {warehouseDict} from "@/api/information/warehouseinfo"; //所属仓库
|
||||
import {personListDict} from "@/api/system/user"; //理货员
|
||||
import {getKwList} from "@/api/information/pcdedetail"; //库位下拉数据
|
||||
// import { Plus } from '@element-plus/icons-vue'
|
||||
|
||||
import { listStock } from "@/api/wisdom/record";
|
||||
import printBill from "@/components/printBill/bill.vue";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const outboundList = ref([]);
|
||||
const open = ref(false);
|
||||
const returnOpen = ref(false)
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const planLoading = ref(true);
|
||||
const planList = ref([]); //从供应计划中添加列表
|
||||
|
||||
const storeTypeList = ref([]); //出库类型下拉数据
|
||||
const wzTypeList = ref([]); //施工队下拉数据
|
||||
|
||||
const personList = ref([]); //理货员下拉数据
|
||||
const orderNum = ref("") //搜索条件:订单号
|
||||
const showContent = ref(false); // 控制打印内容是否显示
|
||||
const dateStr = ref("") //打印单据生成的日期
|
||||
const printList = ref([]) //要打印的数据列表
|
||||
const kwOptions = ref([]); //库位下拉
|
||||
const returnTime = ref([]);
|
||||
const data = reactive({
|
||||
form: {},
|
||||
storeData:{
|
||||
ckType:"JLCK"
|
||||
}, //借料数据
|
||||
returnData:{
|
||||
originalId:null,
|
||||
pcode:"",
|
||||
rkType:"RK029" //入库类型:借料归还入库
|
||||
}, //还料数据
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
// isChuku:0, //入库,固定传0
|
||||
// rkType:"RK029", //入库类型:还料入库
|
||||
returnTime:"", //还料时间
|
||||
isBorrowed: "2",
|
||||
xmNo:"",
|
||||
sapNo:"",
|
||||
billNo:"",
|
||||
ids: []
|
||||
},
|
||||
outQueryParams:{
|
||||
xmNo:"",
|
||||
wlNo:"",
|
||||
sapNo:"",
|
||||
pageNum:1,
|
||||
pageSize:50,
|
||||
isChuku:0,
|
||||
},
|
||||
rules: {
|
||||
ckType: [{ required: true, message: "出库类型不能为空", trigger: "change" }],
|
||||
teamCode: [{ required: true, message: "施工队不能为空", trigger: "change" }],
|
||||
borrowTime: [{ required: true, message: "借用时间不能为空", trigger: "change" }],
|
||||
ckLihuoY: [{ required: true, message: "理货员不能为空", trigger: "change" }]
|
||||
},
|
||||
printViewInfo: {
|
||||
id: "printMe", //打印区域的唯一的id属性
|
||||
popTitle: '入库信息打印', // 页眉文字 (不设置时显示undifined)(页眉页脚可以在打印页面的更多设置的选项中取消勾选)
|
||||
|
||||
|
||||
beforeOpenCallback () {
|
||||
showContent.value = false;
|
||||
}, // 开始打印之前的callback
|
||||
openCallback () { }, // 调用打印时的callback
|
||||
closeCallback () { }, // 关闭打印的callback(无法区分确认or取消)
|
||||
clickMounted () { },
|
||||
|
||||
pageOrientation: 'portrait', // 打印方向,portrait-纵向,landscape-横向
|
||||
standard: '',
|
||||
extarCss: ''
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, storeData, rules,form,printViewInfo,outQueryParams,returnData } = toRefs(data);
|
||||
|
||||
const { queryParams, printViewInfo } = toRefs(data);
|
||||
|
||||
|
||||
const loading = ref(true);
|
||||
const outboundList = ref([]);
|
||||
const infoTableRef = ref(null);
|
||||
const total = ref(0);
|
||||
/** 查询库存单据主列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listOutbound(queryParams.value).then(response => {
|
||||
queryParams.value.bizType = 3
|
||||
listStock(queryParams.value).then(response => {
|
||||
outboundList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
planList.value = []
|
||||
storeData.value = {
|
||||
ckType:"JLCK"
|
||||
}
|
||||
orderNum.value = ""
|
||||
proxy.resetForm("stockRef");
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
if(returnTime.value && returnTime.value.length>0){
|
||||
queryParams.value.startTime = returnTime.value[0]
|
||||
queryParams.value.endTime = returnTime.value[1]
|
||||
queryParams.value.startDate = returnTime.value[0]
|
||||
queryParams.value.endDate = returnTime.value[1]
|
||||
}else{
|
||||
queryParams.value.startTime = ""
|
||||
queryParams.value.endTime = ""
|
||||
queryParams.value.startDate = ""
|
||||
queryParams.value.endDate = ""
|
||||
}
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
@@ -363,14 +206,9 @@
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
//出库 多选框选中数据
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map(info=>info.id)
|
||||
}
|
||||
//打印单据 多选框选中数据
|
||||
function printSelectionChange(selection){
|
||||
printList.value = selection
|
||||
queryParams.value.ids = selection.map(item => item.id)
|
||||
console.log(queryParams.value.ids)
|
||||
}
|
||||
//打印单据
|
||||
@@ -389,156 +227,7 @@
|
||||
dateStr.value = year+"-"+month+"-"+day+" "+hour+":"+minute+":"+second
|
||||
showContent.value = true
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加借料单据";
|
||||
//获取出库类型下拉数据
|
||||
listOuttype({pageNum:1,pageSize:50}).then(response=>{
|
||||
storeTypeList.value = response.rows
|
||||
})
|
||||
//获取施工队下拉数据
|
||||
listConstruction({pageNum:1,pageSize:50}).then(response=>{
|
||||
wzTypeList.value = response.rows
|
||||
})
|
||||
|
||||
//理货员下拉数据
|
||||
personListDict().then(response=>{
|
||||
personList.value = response.data
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
//查询库存中数据 搜索
|
||||
function searchPlan(){
|
||||
// if(!orderNum.value){
|
||||
// proxy.$modal.msgWarning("请输入项目编号或者订单号");
|
||||
// return
|
||||
// }
|
||||
//查库存
|
||||
// let params = {
|
||||
// pageNum:1,
|
||||
// pageSize:50,
|
||||
// isChuku:0,
|
||||
// // xmNo:orderNum.value
|
||||
// keyword:orderNum.value
|
||||
// }
|
||||
if(!outQueryParams.value.xmNo && !outQueryParams.value.wlNo && !outQueryParams.value.sapNo){
|
||||
proxy.$modal.msgWarning("查询条件不能为空");
|
||||
return
|
||||
}
|
||||
listOutbound(outQueryParams.value).then(response=>{
|
||||
|
||||
// let planData = response.rows
|
||||
if(response.rows.length==0){
|
||||
proxy.$modal.msgWarning("库存无数据");
|
||||
planList.value = []
|
||||
}else{
|
||||
planList.value = response.rows
|
||||
}
|
||||
// console.log(planData)
|
||||
|
||||
// planLoading.value = false
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
// function selectKw(row){
|
||||
// console.log(row)
|
||||
// }
|
||||
/** 修改按钮操作 */
|
||||
// function handleUpdate(row) {
|
||||
// reset();
|
||||
// const _id = row.id || ids.value
|
||||
// getStock(_id).then(response => {
|
||||
// form.value = response.data;
|
||||
// open.value = true;
|
||||
// title.value = "修改库存单据主";
|
||||
// });
|
||||
// }
|
||||
|
||||
/** 借料出库 提交按钮 */
|
||||
function submitForm() {
|
||||
|
||||
// console.log(submitData);return
|
||||
// // /pc/wisdom/stock/add
|
||||
// console.log(planList);return
|
||||
proxy.$refs["stockRef"].validate(valid => {
|
||||
|
||||
if (valid) {
|
||||
// if(planList.value.filter(x=>x.realQty=="").length>0){
|
||||
// proxy.$modal.msgError("入库数量不能为空");
|
||||
// return
|
||||
// }
|
||||
// console.log(ids.value)
|
||||
if(ids.value.length==0){
|
||||
proxy.$modal.msgError("请勾选数据");
|
||||
return
|
||||
}
|
||||
let dataList = planList.value.filter(x=>ids.value.includes(x.id)).map(info=>({
|
||||
id:info.id,
|
||||
ckRemark:info.ckRemark
|
||||
}))
|
||||
// console.log(3333)
|
||||
// return
|
||||
let submitData = {
|
||||
borrowTime:storeData.value.borrowTime, //借用时间
|
||||
returnTime:storeData.value.returnTime, // 归还时间
|
||||
teamCode:storeData.value.teamCode, //施工队
|
||||
ckType:storeData.value.ckType, //出库类型
|
||||
ckLihuoY:storeData.value.ckLihuoY, //理货员
|
||||
xmNoCk:storeData.value.xmNoCk?storeData.value.xmNoCk:"", //原本要出的项目号
|
||||
xmMsCk:storeData.value.xmMsCk?storeData.value.xmMsCk:"", //原本要出的项目描述
|
||||
// rkList:planList.value
|
||||
ckList:dataList
|
||||
}
|
||||
// console.log(submitData)
|
||||
// return
|
||||
addOutbound(submitData).then(response => {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
//打开还料弹框
|
||||
function handleReturn(row){
|
||||
console.log(row)
|
||||
returnData.value.pcode = row.pcode
|
||||
returnData.value.originalId = row.id
|
||||
returnOpen.value = true
|
||||
}
|
||||
//取消还料弹框
|
||||
function cancelReturn(){
|
||||
returnOpen.value = false
|
||||
}
|
||||
//还料保存
|
||||
function returnForm(){
|
||||
returnSubmit(returnData.value).then(response => {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
returnOpen.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
//库位字典
|
||||
function pcodeList(){
|
||||
getKwList().then(response=>{
|
||||
kwOptions.value = response.data
|
||||
})
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
// function handleDelete(row) {
|
||||
// const _ids = row.id || ids.value;
|
||||
// proxy.$modal.confirm('是否确认删除库存单据主编号为"' + _ids + '"的数据项?').then(function() {
|
||||
// return delStock(_ids);
|
||||
// }).then(() => {
|
||||
// getList();
|
||||
// proxy.$modal.msgSuccess("删除成功");
|
||||
// }).catch(() => {});
|
||||
// }
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
@@ -548,8 +237,6 @@ function pcodeList(){
|
||||
}
|
||||
|
||||
getList();
|
||||
//库位下拉数据
|
||||
pcodeList()
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.el-table .warning-row {
|
||||
|
||||
@@ -57,7 +57,14 @@
|
||||
<el-col :span="6">
|
||||
<el-form-item label="所属仓库" prop="warehouseCode">
|
||||
<el-cascader v-model="warehouseCode" :options="warehouseOptions" placeholder="请选择所属仓库" style="width: 100%;"
|
||||
:props="{ children: 'children', label: 'warehouseName', value: 'warehouseCode' }" />
|
||||
:props="{ children: 'children', label: 'warehouseName', value: 'warehouseCode' }" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="场景" prop="scene">
|
||||
<el-select v-model="queryParams.scene" placeholder="请选择场景" clearable>
|
||||
<el-option v-for="dict in sceneTypeList" :key="dict.sceneCode" :label="dict.sceneName" :value="dict.sceneCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -65,19 +72,22 @@
|
||||
<el-input v-model="queryParams.gysMc" placeholder="请输入供应商名称" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="物料描述" prop="wlMs">
|
||||
<el-input v-model="queryParams.wlMs" placeholder="请输入物料描述" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="入库时间" prop="optionTime">
|
||||
<el-date-picker v-model="optionTime" type="datetimerange" start-placeholder="开始时间" end-placeholder="结束时间"
|
||||
format="YYYY/MM/DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="searchBtn">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
@@ -85,6 +95,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@@ -106,6 +117,10 @@
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="stockList" show-overflow-tooltip show-summary :summary-method="getSummaries"
|
||||
ref="infoTableRef"
|
||||
highlight-current-row
|
||||
@row-click="(row) => tableInfoRowClick(row, infoTableRef)"
|
||||
@selection-change="printSelectionChange"
|
||||
border>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||
@@ -118,12 +133,14 @@
|
||||
<el-table-column label="物料描述" align="center" prop="wlMs" width="150" />
|
||||
<el-table-column label="供应商名称" align="center" prop="gysMc" width="150" />
|
||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
||||
<el-table-column label="总计" align="center" prop="totalAmount" />
|
||||
<el-table-column label="单位" align="center" prop="dw" />
|
||||
<el-table-column label="实际入库数量" align="center" prop="realQty" width="120" />
|
||||
<el-table-column label="库位码" align="center" prop="pcode" width="120" />
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="身份码" align="center" prop="entityId" width="150" />
|
||||
<el-table-column label="物资类型" align="center" prop="wlTypeName" />
|
||||
<el-table-column label="场景" align="center" prop="sceneName" width="150" />
|
||||
<el-table-column label="所属大库" align="center" prop="parentWarehouseName" width="150" />
|
||||
<el-table-column label="所属小库" align="center" prop="warehouseName" width="150" />
|
||||
<el-table-column label="入库类型" align="center" prop="operationTypeName" width="150" />
|
||||
@@ -221,8 +238,8 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="库存类型" prop="rkType">
|
||||
<el-select v-model="updateData.rkType" placeholder="请选择入库类型" clearable>
|
||||
<el-form-item label="库存类型" prop="operationType">
|
||||
<el-select v-model="updateData.operationType" placeholder="请选择入库类型" clearable>
|
||||
<el-option v-for="dict in storeTypeList" :key="dict.id" :label="dict.typeName" :value="dict.typeCode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -230,8 +247,8 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="入库时间" prop="rkTime">
|
||||
<el-date-picker style="width: 100%;" v-model="updateData.rkTime" type="datetime" />
|
||||
<el-form-item label="入库时间" prop="operationTime">
|
||||
<el-date-picker style="width: 100%;" v-model="updateData.operationTime" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss" type="datetime" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -243,29 +260,27 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="移库" v-model="openSwitch" append-to-body width="60%">
|
||||
|
||||
<el-form :model="switchData">
|
||||
|
||||
<el-dialog title="移库" v-model="openMove" append-to-body width="60%">
|
||||
<el-form :model="checkStockList">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="物料号">
|
||||
<el-input v-model="showData.wlNo" disabled />
|
||||
<el-input v-model="checkStockList[0].wlNo" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="项目号">
|
||||
<el-input v-model="showData.xmNo" disabled />
|
||||
<el-input v-model="checkStockList[0].xmNo" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="订单号">
|
||||
<el-input v-model="showData.sapNo" disabled />
|
||||
<el-input v-model="checkStockList[0].sapNo" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="项目描述">
|
||||
<el-input v-model="showData.xmMs" disabled />
|
||||
<el-input v-model="checkStockList[0].xmMs" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -275,10 +290,9 @@
|
||||
<el-input v-model="moveReason" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-table :data="switchData" height="400" style="width: 100%">
|
||||
<el-table :data="checkStockList" height="400" style="width: 100%">
|
||||
<el-table-column label="数量" align="center">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.realQty" placeholder="数量">
|
||||
@@ -287,7 +301,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" align="center">
|
||||
<template #default="scope">
|
||||
<el-cascader :options="warehouseOptions" v-model="scope.row.toCangku" @change="pcodeListNew"
|
||||
<el-cascader :options="warehouseOptions" v-model="scope.row.toCangku" @change="onChangeToCangku"
|
||||
:props="{ children: 'children', label: 'warehouseName', value: 'warehouseCode' }" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -321,50 +335,36 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="stockSearch">
|
||||
|
||||
import { moveHouse, printTag, listStock } from "@/api/wisdom/stock";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { updateStock } from "@/api/wisdom/inventorySearch";
|
||||
<script setup name="Stock">
|
||||
import { moveRecord } from "@/api/wisdom/bill";
|
||||
import { listStock, getTotal, editStock, printTag } from "@/api/wisdom/stock";
|
||||
import { warehousingDict } from "@/api/information/warehousingtype"; //入库类型
|
||||
import { materialtypeDict } from "@/api/information/materialtype"; //物资类型
|
||||
import { warehouseAll } from "@/api/information/warehouseinfo"; //所属仓库
|
||||
import { listScene } from "@/api/information/scene"; //所属仓库
|
||||
import { personListDict } from "@/api/system/user"; //理货员
|
||||
import { getKwList, getKwAllList } from "@/api/information/pcdedetail"; //库位下拉数据
|
||||
import { getKwAllList } from "@/api/information/pcdedetail"; //库位下拉数据
|
||||
import { parseTime } from '@/utils/manage'
|
||||
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const stockList = ref([]);
|
||||
|
||||
const openSwitch = ref(false); //移库
|
||||
const openUpdate = ref(false); //修改
|
||||
const loading = ref(true);
|
||||
|
||||
const showSearch = ref(true);
|
||||
|
||||
const total = ref(0);
|
||||
|
||||
const planList = ref([]); //从供应计划中添加列表
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const warehouseCode = ref(''); //所属仓库下拉数据
|
||||
|
||||
const printList = ref([]) //要打印的数据列表
|
||||
|
||||
const moveReason = ref("") //移库原因
|
||||
|
||||
const optionTime = ref([]) //入库时间
|
||||
const dialogImageUrl = ref('')
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
const totalMoney = ref(null)
|
||||
const pcodeCount = ref(null)
|
||||
const sumQty = ref(null)
|
||||
const showData = ref({})
|
||||
const updateData = ref({})
|
||||
|
||||
|
||||
const printNum = ref(1) //打印机编号
|
||||
const printNumList = ref([
|
||||
{ id: 1, statusName: "1" },
|
||||
@@ -373,9 +373,6 @@ const printNumList = ref([
|
||||
{ id: 4, statusName: "4" }
|
||||
])
|
||||
const data = reactive({
|
||||
form: {},
|
||||
storeData: {}, //入库数据
|
||||
switchData: [], //移库数据
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@@ -394,6 +391,7 @@ const data = reactive({
|
||||
cangku: "",
|
||||
wlMs: "",
|
||||
ids: [],
|
||||
remark: "",
|
||||
},
|
||||
rules: {
|
||||
wlType: [{ required: true, message: "物资类型不能为空", trigger: "change" }],
|
||||
@@ -407,13 +405,16 @@ const data = reactive({
|
||||
toCangku: [{ required: true, message: "目标仓库不能为空", trigger: "change" }],
|
||||
toPcode: [{ required: true, message: "目标存放位置不能为空", trigger: "change" }],
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
const { queryParams, storeData, rules, form, switchData } = toRefs(data);
|
||||
const { queryParams, rules } = toRefs(data);
|
||||
|
||||
|
||||
/** 查询库存单据主列表 */
|
||||
const stockList = ref([]);
|
||||
const infoTableRef = ref(null);
|
||||
const total = ref(0);
|
||||
const loading = ref(true);
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listStock(queryParams.value).then(response => {
|
||||
@@ -422,29 +423,29 @@ function getList() {
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
getList();
|
||||
|
||||
const printList = ref([]) //要打印的数据列表
|
||||
const printSelectionChange = (selection) => {
|
||||
printList.value = selection
|
||||
}
|
||||
|
||||
// 获取总计
|
||||
const totalMoney = ref(null)
|
||||
const pcodeCount = ref(null)
|
||||
const sumQty = ref(null)
|
||||
function getSumInfo() {
|
||||
//统计信息
|
||||
//getSumInfoI(queryParams.value).then(response => {
|
||||
// totalMoney.value = response.sumMoney
|
||||
//pcodeCount.value = response.pcdeCount
|
||||
//sumQty.value = response.sumQty
|
||||
//});
|
||||
}
|
||||
|
||||
|
||||
// 库位字典
|
||||
const kwOptions = ref([]);
|
||||
function pcodeList() {
|
||||
//getKwList().then(response=>{
|
||||
// kwOptions.value = response.data
|
||||
//})
|
||||
}
|
||||
function pcodeListNew(value) {
|
||||
getKwAllList(value[1]).then(response => {
|
||||
kwOptions.value = response.data
|
||||
})
|
||||
let rkInfo = JSON.parse(JSON.stringify(queryParams.value))
|
||||
delete rkInfo.pageNum
|
||||
delete rkInfo.pageSize
|
||||
getTotal(rkInfo).then(response => {
|
||||
totalMoney.value = response.data.totalAmount
|
||||
pcodeCount.value = response.data.locationCount
|
||||
sumQty.value = response.data.totalQuantity
|
||||
});
|
||||
}
|
||||
getSumInfo()
|
||||
|
||||
//所属仓库字典
|
||||
const warehouseOptions = ref([]);
|
||||
@@ -453,22 +454,33 @@ function warehouseFun() {
|
||||
warehouseOptions.value = response.data
|
||||
})
|
||||
}
|
||||
warehouseFun()
|
||||
|
||||
//物资类型典
|
||||
//物资类型
|
||||
const wzTypeList = ref([]);
|
||||
function materialFun() {
|
||||
materialtypeDict().then(response => {
|
||||
wzTypeList.value = response.data
|
||||
})
|
||||
}
|
||||
materialFun()
|
||||
//场景下拉
|
||||
const sceneTypeList = ref([]);
|
||||
function listSceneFun() {
|
||||
listScene().then(response => {
|
||||
sceneTypeList.value = response.rows
|
||||
})
|
||||
}
|
||||
listSceneFun()
|
||||
|
||||
//理货员典
|
||||
//理货员
|
||||
const personList = ref([]);
|
||||
function lhyList() {
|
||||
personListDict().then(response => {
|
||||
personList.value = response.data
|
||||
})
|
||||
}
|
||||
lhyList()
|
||||
|
||||
//入库类型典
|
||||
const storeTypeList = ref([]);
|
||||
@@ -477,6 +489,21 @@ function rklxList() {
|
||||
storeTypeList.value = response.data
|
||||
})
|
||||
}
|
||||
rklxList()
|
||||
|
||||
// 仓库下拉改变事件
|
||||
function onChangeToCangku (val){
|
||||
checkStockList.value[0].toPcode = ''
|
||||
pcodeList(val)
|
||||
}
|
||||
|
||||
// 库位字典
|
||||
const kwOptions = ref([]);
|
||||
function pcodeList(value) {
|
||||
getKwAllList(value[1]).then((response) => {
|
||||
kwOptions.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
@@ -509,6 +536,111 @@ function resetQuery() {
|
||||
handleQuery();
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('wisdom/stock/export', {
|
||||
...queryParams.value
|
||||
}, `库存记录_${parseTime(new Date().getTime(), '{y}年{m}月{d}日 {h}_{i}_{s}')}.xlsx`)
|
||||
}
|
||||
|
||||
// 移库弹框
|
||||
const openMove = ref(false); //移库
|
||||
const checkStockList = ref([]); //移库数据
|
||||
const moveReason = ref("") //移库原因
|
||||
// 移库弹框
|
||||
function handleStockYk(row) {
|
||||
checkStockList.value = JSON.parse(JSON.stringify([row]));
|
||||
moveReason.value = "";
|
||||
if (checkStockList.value.length != 1) {
|
||||
proxy.$modal.msgError("请勾选一条数据");
|
||||
return;
|
||||
}
|
||||
checkStockList.value[0].toCangku = [
|
||||
checkStockList.value[0].parentWarehouseCode,
|
||||
checkStockList.value[0].cangku,
|
||||
];
|
||||
checkStockList.value[0].toPcode = checkStockList.value[0].pcode;
|
||||
checkStockList.value[0].toTrayCode = checkStockList.value[0].trayCode;
|
||||
checkStockList.value[0].num = checkStockList.value[0].realQty;
|
||||
openMove.value = true;
|
||||
pcodeList([
|
||||
checkStockList.value[0].parentWarehouseCode,
|
||||
checkStockList.value[0].cangku,
|
||||
]);
|
||||
}
|
||||
// 移库提交
|
||||
function submitMoveForm() {
|
||||
if (checkStockList.value.filter((item) => item.realQty == 0).length > 0) {
|
||||
proxy.$modal.msgError("数量不能为空");
|
||||
return;
|
||||
}
|
||||
if (checkStockList.value.filter((item) => !item.toPcode).length > 0) {
|
||||
proxy.$modal.msgError("存放位置不能为空");
|
||||
return;
|
||||
}
|
||||
if (checkStockList.value.filter((item) => !item.toCangku).length > 0) {
|
||||
proxy.$modal.msgError("仓库不能为空");
|
||||
return;
|
||||
}
|
||||
// if (checkStockList.value[0].pcode == checkStockList.value[0].toPcode) {
|
||||
// proxy.$modal.msgError(
|
||||
// "不允许选择原来的库位【" + checkStockList.value[0].pcode + "】"
|
||||
// );
|
||||
// return;
|
||||
// }
|
||||
if (checkStockList.value[0].realQty > checkStockList.value[0].num) {
|
||||
proxy.$modal.msgError("移库数量不正确");
|
||||
return;
|
||||
}
|
||||
let arr = JSON.parse(JSON.stringify(checkStockList.value));
|
||||
arr[0].toCangku = arr[0].toCangku[1];
|
||||
let submitData = {
|
||||
fromRkId: checkStockList.value[0].id,
|
||||
moveReason: moveReason.value,
|
||||
targets: arr,
|
||||
};
|
||||
moveRecord(submitData).then((response) => {
|
||||
if (response.code == 200) {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
//数据列表
|
||||
getList();
|
||||
openMove.value = false;
|
||||
} else {
|
||||
proxy.$modal.msgError("操作失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
function cancelMove() {
|
||||
openMove.value = false
|
||||
}
|
||||
|
||||
// 修改弹框
|
||||
const openUpdate = ref(false); //修改
|
||||
const updateData = ref({})
|
||||
function handleUpdate(row) {
|
||||
openUpdate.value = true
|
||||
updateData.value = JSON.parse(JSON.stringify(row))
|
||||
}
|
||||
//修改提交
|
||||
function editForm() {
|
||||
proxy.$refs["updateRef"].validate(valid => {
|
||||
if (valid) {
|
||||
editStock(updateData.value).then(response => {
|
||||
if (response.code == 200) {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
openUpdate.value = false
|
||||
handleQuery()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//打印标签
|
||||
function handlePrintTag() {
|
||||
if (printList.value.length == 0) {
|
||||
@@ -519,7 +651,6 @@ function handlePrintTag() {
|
||||
proxy.$modal.msgError("请选择打印机编号");
|
||||
return
|
||||
}
|
||||
// let newArr = new Array();
|
||||
for (let i = 0; i < printList.value.length; i++) {
|
||||
printList.value[i].printer = printNum.value
|
||||
}
|
||||
@@ -552,137 +683,6 @@ function getSummaries(param) {
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
|
||||
// 移库弹框
|
||||
function handleStockYk(row) {
|
||||
showData.value = row
|
||||
switchData.value = []
|
||||
moveReason.value = ""
|
||||
openSwitch.value = true
|
||||
|
||||
const {
|
||||
realQty: realQty,
|
||||
pcode: toPcode,
|
||||
trayCode: toTrayCode,
|
||||
parentWarehouseCode: parentWarehouseCode,
|
||||
cangku: warehouseCode
|
||||
} = showData.value
|
||||
switchData.value[0] = {
|
||||
realQty,
|
||||
toPcode,
|
||||
toTrayCode,
|
||||
toCangku: [parentWarehouseCode, warehouseCode]
|
||||
}
|
||||
|
||||
}
|
||||
function handleUpdate(row) {
|
||||
openUpdate.value = true
|
||||
updateData.value = row
|
||||
|
||||
}
|
||||
//修改提交
|
||||
function editForm() {
|
||||
proxy.$refs["updateRef"].validate(valid => {
|
||||
if (valid) {
|
||||
// console.log(updateData.value)
|
||||
updateStock(updateData.value).then(response => {
|
||||
if (response.code == 200) {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
openUpdate.value = false
|
||||
handleQuery()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 移库提交
|
||||
function submitMoveForm() {
|
||||
if (switchData.value.length == 0) {
|
||||
proxy.$modal.msgError("请添加数据");
|
||||
return
|
||||
}
|
||||
if (switchData.value.filter(item => item.realQty == 0).length > 0) {
|
||||
proxy.$modal.msgError("数量不能为空");
|
||||
return
|
||||
}
|
||||
if (switchData.value.filter(item => !item.toPcode).length > 0) {
|
||||
proxy.$modal.msgError("存放位置不能为空");
|
||||
return
|
||||
}
|
||||
if (switchData.value.filter(item => !item.toCangku).length > 0) {
|
||||
proxy.$modal.msgError("仓库不能为空");
|
||||
return
|
||||
}
|
||||
// if(switchData.value.length==1 && printList.value[0].realQty==switchData.value[0].realQty && printList.value[0].pcode==switchData.value[0].toPcode && printList.value[0].cangku==switchData.value[0].toCangku){
|
||||
// proxy.$modal.msgError("请选择新的存放位置");
|
||||
// return
|
||||
// }
|
||||
// if(switchData.value.filter(x=>x.toPcode==printList.value[0].pcode).length>0){
|
||||
// proxy.$modal.msgError("不允许选择原来的库位【"+printList.value[0].pcode+"】");
|
||||
// return
|
||||
// }
|
||||
// let sumNum=0
|
||||
// for(let i=0;i<switchData.value.length;i++){
|
||||
// sumNum += Number(switchData.value[i].realQty)*1000
|
||||
// }
|
||||
// if(printList.value[0].realQty<sumNum/1000){
|
||||
// proxy.$modal.msgError("移库数量不正确");
|
||||
// return
|
||||
// }
|
||||
// console.log(switchData.value)
|
||||
// return
|
||||
let arr = JSON.parse(JSON.stringify(switchData.value))
|
||||
// console.log(arr)
|
||||
// return
|
||||
arr[0].toCangku = arr[0].toCangku[1]
|
||||
let submitData = {
|
||||
fromRkId: showData.value.id,
|
||||
moveReason: moveReason.value,
|
||||
targets: arr
|
||||
}
|
||||
moveHouse(submitData).then(response => {
|
||||
if (response.code == 200) {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
//数据列表
|
||||
// getList();
|
||||
handleQuery()
|
||||
openSwitch.value = false
|
||||
} else {
|
||||
proxy.$modal.msgError("操作失败");
|
||||
}
|
||||
|
||||
})
|
||||
// console.log(submitData)
|
||||
}
|
||||
function cancelMove() {
|
||||
openSwitch.value = false
|
||||
}
|
||||
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('wisdom/stock/export', {
|
||||
...queryParams.value
|
||||
}, `库存记录_${parseTime(new Date().getTime(), '{y}年{m}月{d}日 {h}_{i}_{s}')}.xlsx`)
|
||||
}
|
||||
|
||||
//统计信息
|
||||
getSumInfo()
|
||||
//数据列表
|
||||
getList();
|
||||
//库位字典
|
||||
pcodeList()
|
||||
//所属仓库
|
||||
warehouseFun()
|
||||
//物资类型
|
||||
materialFun()
|
||||
//理货员下拉数据
|
||||
lhyList()
|
||||
//入库类型下拉数据
|
||||
rklxList()
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.searchBtn {
|
||||
|
||||
Reference in New Issue
Block a user