Compare commits

..

34 Commits

Author SHA1 Message Date
a491fd75c3 优化 2026-03-06 16:53:11 +08:00
f6c665c8fa 添加从供应计划累加的功能 2026-03-06 14:48:18 +08:00
7059706e9b 修改调度任务判断逻辑 2026-03-06 10:31:49 +08:00
d05e577d13 Merge branch 'main' of http://47.100.212.83:3000/yangzifeng/shzg_projectManage 2026-03-06 10:11:28 +08:00
23a49fc297 优化出库管理的打印单据 2026-03-06 09:47:55 +08:00
81bef6a164 Merge branch 'main' of http://47.100.212.83:3000/yangzifeng/shzg_projectManage 2026-03-06 09:09:48 +08:00
7b77ab0996 优化添加至入库的逻辑 2026-03-03 15:19:02 +08:00
zx
079818aa0f 修改盘点正常的列表 2026-02-28 09:35:39 +08:00
zx
2897bc3f51 修改库存页面查询条件 2026-02-25 16:15:47 +08:00
zx
8e818b7430 修改打印单据总计求和方法 2026-02-24 15:23:09 +08:00
zx
bfab2eea96 Merge branch 'main' of http://47.100.212.83:3000/yangzifeng/shzg_projectManage 2026-02-13 10:21:25 +08:00
zx
30f82750a5 出入库查询修改 2026-02-13 10:21:04 +08:00
e3ee4f8b3e 修改移库的提示 2026-02-13 10:11:19 +08:00
e400907db9 修改配送状态 2026-02-13 09:43:42 +08:00
43791e8ab6 修改库存查询打印的报错 2026-02-13 08:17:01 +08:00
e2d502394c 优化 2026-02-12 15:22:50 +08:00
zx
d4b5d47dfc 出库单增加序号 2026-02-12 11:16:06 +08:00
8af7570fe8 Merge branch 'main' of http://47.100.212.83:3000/yangzifeng/shzg_projectManage 2026-02-11 09:35:24 +08:00
03eedebacd 调度 2026-02-11 09:35:22 +08:00
zx
2252b561de 修改打印单据总计求和方法 2026-02-11 09:34:37 +08:00
zx
d8c071952c 供应计划修改数量同步修改总金额 2026-02-10 11:18:23 +08:00
zx
3bfb9d0f4d 供应计划修改数量同步修改总金额 2026-02-10 11:01:26 +08:00
0d38c8877f 修改打印出库单 2026-02-10 09:31:09 +08:00
b0db03bf52 Merge branch 'main' of http://47.100.212.83:3000/yangzifeng/shzg_projectManage 2026-02-10 09:30:30 +08:00
48d900355d 1 2026-02-10 09:30:27 +08:00
zx
534c9528bc 出入库查询修复 2026-02-06 16:09:30 +08:00
c466e5fbda 修改自动盘点匹配的接口,添加还料打印单据 2026-02-06 11:27:17 +08:00
5cc33e4ef6 优化添加至出库 2026-02-05 17:04:00 +08:00
a667d99734 新增出库添加分页 2026-02-05 10:37:44 +08:00
5b5e2ceb4f 修改新增出库查询的列表 2026-02-05 10:29:58 +08:00
f198ab6bd7 解决新增入库选择库位时卡死问题 2026-02-05 10:09:37 +08:00
zx
c318e667cb 首页样式调整 2026-02-05 08:30:36 +08:00
zx
00af708be9 解决冲突 2026-02-04 15:29:14 +08:00
zx
34e0ab22e1 首页修改 2026-02-04 15:28:28 +08:00
19 changed files with 821 additions and 564 deletions

View File

@@ -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) {

View File

@@ -1,78 +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'
})
}
url: "/stat/home",
method: "post",
data: data,
});
};
// 入库类型统计 - 时间查询
export const getInTypeByTime = (data) => {
return request({
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天统计)
export const getAgeLong = () => {
return request({
url: '/stat/stockAge/stat',
method: 'get'
})
}
url: "/stat/stockAge/stat",
method: "get",
});
};
// 仓库使用率
export const getInventoryReview = () => {
return request({
url: '/stat/warehouse/slot',
method: 'get'
})
}
url: "/stat/warehouse/slot",
method: "get",
});
};
// 待办事项(应到未到统计)
export const getWait = (params) => {
return request({
url: '/stat/todo',
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 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
})
}

View File

@@ -1,5 +1,14 @@
import request from "@/utils/request";
// 新增出库查询
export function addGetOutbound(data) {
return request({
url: "/wisdom/stock/listByBillNo",
method: "get",
params: data,
});
}
// 新增出库
export function addOutbound(data) {
return request({

View 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

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -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>
<!-- 修改点将原来的文本列表改为 表格形式 的基础信息 -->
@@ -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,

View File

@@ -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,

View File

@@ -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

View File

@@ -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} })
}
/** 导出按钮操作 */

View File

@@ -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>

View File

@@ -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,21 +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="projectCnt" label="项目数" align="center"/>
<el-table-column prop="totalAmt" 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>
@@ -254,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>
@@ -273,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>
@@ -294,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>
@@ -311,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;">
@@ -389,7 +349,7 @@
</div>
</el-col>
</el-row> -->
</div>
</template>
@@ -397,41 +357,45 @@
<script setup>
import * as echarts from 'echarts';
import { onMounted } from "vue";
import { getMonthCount, getAgeLong, getWait, 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 getAgeLongList = () => {
getAgeLong().then(res => {
let data1 = res.data.slice(0, 3)
getChartInventoryAge(data1, "inventoryAgeEchatrs")
let data2 = res.data.slice(3)
getChartInventoryAge(data2, "warningEchatrs")
// 获取月统计、当前入库类型统计、物资类型统计接口
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")
})
}
// 自定义单元格样式
// const handleCellStyle = ({ row, column, rowIndex, columnIndex }) => {
@@ -448,80 +412,50 @@ const getAgeLongList = () => {
// // 其他默认样式
// 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 = () => {
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 = []
@@ -564,7 +498,7 @@ const getChartDailyInventory = (data, id) => {
type: 'category',
data: xAxisData,
axisLabel: {
rotate: 30,
rotate: 30,
},
axisPointer: {
type: 'shadow'
@@ -643,6 +577,7 @@ const getChartDailyInventory = (data, id) => {
]
});
}
const dateDailyInventoryObj = ref([startTime, endTime])
const getDailyInventoryList = () => {
let params = {
@@ -654,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({
@@ -696,20 +612,19 @@ const goNotice = (noticeId) => {
// })
}
onMounted(() => {
// getMonthCountList()
getAgeLongList()
getWaitList()
getInventoryReviewList()
// getInStorageList()
// getGoodsTypeList()
// getInventoryTypeList()
// getOutInventoryTypeList()
// getDailyInventoryList()
// getNoticeList()
// 入库类型统计查询时间
dateInventoryTypeObj.value = [startTime, endTime]
// 出库类型统计查询时间
dateOutInventoryTypeObj.value = [startTime, endTime]
getMonthCountList()// 获取月统计、当前入库类型统计、物资类型统计接口
getAgeLongList()// 预警 + 库龄统计
getWaitList()// 待办事项数据
getInventoryReviewList()// 仓库使用率数据
getInventoryTypeList()// 入库类型统计-时间搜索
getOutInventoryTypeList()// 出库类型统计-时间搜索
getNoticeListValue()// 通知公告列表
});
const downloadExcel = () => {
@@ -717,6 +632,7 @@ const downloadExcel = () => {
}
// 预警 + 库龄统计 图表
const getChartInventoryAge = (data, id) => {
let chartDom = document.getElementById(id);
let myChart = echarts.init(chartDom);
@@ -728,6 +644,7 @@ const getChartInventoryAge = (data, id) => {
orient: 'vertical',
left: 'left'
},
color: colorList.value,
series: [
{
name: '库龄',
@@ -745,7 +662,7 @@ const getChartInventoryAge = (data, id) => {
]
});
}
// 仓库使用率数据图表
const getChartInventoryReview = (data) => {
let xAxisData = []
let totalData = []
@@ -773,6 +690,7 @@ const getChartInventoryReview = (data) => {
// bottom: '8%',
},
legend: {},
color: colorList.value,
yAxis: {
type: 'value',
boundaryGap: [0, 0.01]
@@ -781,7 +699,7 @@ const getChartInventoryReview = (data) => {
type: 'category',
data: xAxisData,
axisLabel: {
rotate: 30,
rotate: 30,
},
},
series: [
@@ -803,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);
@@ -843,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'
@@ -903,16 +821,6 @@ const getChartInStorage = (data, id) => {
},
data: projectData
},
{
name: '条目数',
type: 'bar',
tooltip: {
valueFormatter: function (value) {
return value + ' 个';
}
},
data: itemData
},
{
name: '总数量',
type: 'bar',
@@ -937,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);
@@ -977,12 +883,13 @@ const getChartGoodsType = (data) => {
legend: {
// data: ['项目数', '条目数', '总金额']
},
color: colorList.value,
xAxis: [
{
type: 'category',
data: xAxisData,
axisLabel: {
rotate: 30,
rotate: 30,
},
axisPointer: {
type: 'shadow'
@@ -1037,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',
@@ -1071,7 +978,7 @@ const getChartGoodsType = (data) => {
]
});
}
// 入库类型统计/出库类型统计图表
const getChartInventoryType = (data, id) => {
let xAxisData = []
let projectData = []
@@ -1079,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);
@@ -1108,6 +1014,7 @@ const getChartInventoryType = (data, id) => {
grid: {
// bottom: '8%',
},
color: colorList.value,
legend: {
// data: ['项目数', '条目数', '总金额']
},
@@ -1116,7 +1023,7 @@ const getChartInventoryType = (data, id) => {
type: 'category',
data: xAxisData,
axisLabel: {
rotate: 30,
rotate: 30,
},
axisPointer: {
type: 'shadow'
@@ -1171,16 +1078,6 @@ const getChartInventoryType = (data, id) => {
},
data: projectData
},
{
name: '条目数',
type: 'bar',
tooltip: {
valueFormatter: function (value) {
return value + ' 个';
}
},
data: itemData
},
{
name: '总数量',
@@ -1208,13 +1105,10 @@ const getChartInventoryType = (data, id) => {
}
</script>
<style scoped lang="scss">
.dashboard{
.dashboard {
// position: absolute;
// top: 0;
// bottom: 0;
@@ -1224,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;
@@ -1234,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;
@@ -1242,9 +1166,11 @@ const getChartInventoryType = (data, id) => {
margin-top: 10px;
}
}
.titleBox{
.titleBox {
display: flex;
align-items: center;
.line {
width: 6px;
height: 15px;
@@ -1252,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;
@@ -1267,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%;
@@ -1301,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;
}
}

View File

@@ -294,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">
@@ -309,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">
@@ -804,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>

View File

@@ -307,10 +307,24 @@
<el-button type="primary" @click="addLineFun" :disabled="idEdit != 0">添加</el-button>
</el-col>
</el-row>
<el-table :data="planList" height="400" style="width: 100%" show-overflow-tooltip
<div class="addBox">
<div style="display: flex;align-items: center;">
<div class="addData" @click="addData">
<el-icon style="margin-right: 10px;" size="20"><FolderAdd /></el-icon>
添加至入库
</div>
<div @click="viewData" style="color: #000;text-decoration: underline;margin-left: 5px;">[已添加{{ outTempData.length }}条库存]</div>
<!-- <div @click="viewData" style="color: red;text-decoration: underline;font-weight: bold;">[凭证重复入库或项目已关闭请点击查看]</div> -->
</div>
<div v-show="outTempData.length > 0 && planList.length === outTempData.length" @click="deleteData" style="display: flex;align-items: center;color: var(--el-color-primary);">
<el-icon><delete /></el-icon>
<span>删除</span>
</div>
</div>
<el-table :data="planList" height="400" style="width: 100%" show-overflow-tooltip border
:row-class-name="tableRowClassName" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="30" align="center" />
<el-table-column label="序号" align="center" type="index" width="50" />
<el-table-column label="序号" align="center" type="index" width="70" />
<el-table-column label="状态" align="center" prop="status" width="100" v-if="idEdit == 0">
<template #default="scoped">
<el-tag :type="scoped.row.status == 1
@@ -356,7 +370,7 @@
<el-table-column label="库位" align="center" width="150">
<template #default="scope">
<el-select v-model="scope.row.pcode" clearable @change="changePcode" filterable placeholder="请选择库位">
<el-option v-for="(item, index) in kwOptions" :key="index" :label="item.pcode" :value="item.pcode" />
<el-option v-for="item in kwOptions" :key="item.pcode" :label="item.pcode" :value="item.pcode" />
</el-select>
</template>
</el-table-column>
@@ -638,7 +652,7 @@ import { Plus } from "@element-plus/icons-vue";
import bill from "@/components/storageBill/bill.vue";
import printBill from "@/components/printBill/bill.vue";
import { ref } from "vue";
import { parseTime } from '@/utils/manage';
const headers = ref({
Authorization: "Bearer " + getToken(),
});
@@ -666,7 +680,7 @@ const printNumList = ref([
{ id: 3, statusName: "3" },
{ id: 4, statusName: "4" },
]);
const printNum = ref(0); //打印机编号
const printNum = ref(1); //打印机编号
const moveReason = ref(""); //移库原因
const operationTime = ref([]);
const actionUrl =
@@ -860,6 +874,7 @@ function handleAdd(single) {
isSingle.value = single;
reset();
open.value = true;
outTempData.value = []
title.value = "添加库存单据";
}
@@ -880,8 +895,105 @@ const statusList = ref([
{ value: 2, label: "部分入库" },
]);
const checkPlanList = ref([]); //已选中的要入库的数据
// 点击添加至入库
const outTempData = ref([]);
function addData() {
if (checkPlanList.value.length == 0) {
proxy.$modal.msgError("请勾选数据");
return;
}
let data = outTempData.value.concat(checkPlanList.value);
// let arr = []; // 去重后的最终数组
// let duplicateSapNos = ''; // 存储重复数据的sapNo
// let invalidQtySapNos = ''; // 存储入库数量有误的sapNo
// const uniqueKeys = new Set(); // 用于存储唯一的组合键 (id+pcode+realQty)
// // 遍历数组,先校验数量合法性,再判断唯一性
// data.forEach(item => {
// // 1. 校验realQty是否大于0处理空值/非数字情况)
// const realQty = Number(item.realQty);
// if (isNaN(realQty) || realQty <= 0) {
// // 避免同一个sapNo重复添加到提示中
// if (!invalidQtySapNos.includes(item.sapNo)) {
// invalidQtySapNos += item.sapNo + ',';
// }
// return; // 数量不合法,直接跳过后续唯一性判断
// }
// // 2. 生成唯一标识组合键
// const uniqueKey = `${item.id}_${item.pcode}_${realQty}`;
// // 3. 检查组合键是否已存在
// if (uniqueKeys.has(uniqueKey)) {
// // 存在重复拼接sapNo去重避免重复拼接
// if (!duplicateSapNos.includes(item.sapNo)) {
// duplicateSapNos += item.sapNo + ',';
// }
// } else {
// // 不存在重复,加入结果数组并记录组合键
// arr.push(item);
// uniqueKeys.add(uniqueKey);
// }
// console.log(uniqueKeys)
// });
// // 处理入库数量有误的提示
// if (invalidQtySapNos) {
// invalidQtySapNos = invalidQtySapNos.slice(0, -1); // 去掉最后一个逗号
// proxy.$modal.msgError(`入库数量有误:${invalidQtySapNos}入库数量需大于0`);
// return
// }
// // 处理重复数据的提示
// if (duplicateSapNos) {
// duplicateSapNos = duplicateSapNos.slice(0, -1); // 去掉最后一个逗号
// proxy.$modal.msgError(`存在重复数据:${duplicateSapNos}`);
// }
outTempData.value = data
}
const generateSimpleUniqueStr = () => {
if (typeof crypto !== 'undefined' && crypto.randomUUID) {
return crypto.randomUUID();
}
// 兼容旧版浏览器/Node.jscrypto API 降级)
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
(c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))).toString(16)
);
}
// 查看所有的出库数据
const viewData = () => {
let arr = JSON.parse(JSON.stringify(outTempData.value));
planList.value = arr.map(item => ({
...item,
uniqueId: generateSimpleUniqueStr() // 新增随机唯一值
}));
}
// 删除选中的出库数据
const deleteData = () => {
if (checkPlanList.value.length == 0) {
proxy.$modal.msgError("请勾选数据");
return;
}
proxy.$modal.confirm("确认删除选中的出库数据吗?").then(() => {
const uniqueIds = checkPlanList.value.map(item => item.uniqueId);
console.log(uniqueIds)
planList.value = planList.value.filter(item => {
// 无id的元素默认保留如果想删除无id的可改为 item?.id && !arr2Ids.has(item.id)
return !uniqueIds.includes(item?.uniqueId);
});
outTempData.value = planList.value
});
}
//新增入库 多选框选中数据
function handleSelectionChange(selection) {
function handleSelectionChange(selection, $event) {
checkPlanList.value = selection;
}
@@ -898,6 +1010,7 @@ function searchPlan() {
for (let i = 0; i < planData.length; i++) {
planData[i].realQty = planData[i].waitQty;
planData[i].gysJhId = planData[i].id;
planData[i].pcode = "";
if (autoFill.value && kzms.value != "") {
planData[i].remark = kzms.value;
}
@@ -910,7 +1023,7 @@ function searchPlan() {
proxy.$modal.msgWarning("暂无数据");
return;
}
planList.value = planData;
planList.value = planList.value.concat(planData);
});
}
@@ -947,10 +1060,11 @@ function addLineFun() {
// 选择库位修改库位数组
const changePcode = (e) => {
let index = kwOptions.value.findIndex((item) => item.pcode == e);
kwOptions.value.splice(index, 1);
kwOptions.value.unshift({ pcode: e });
console.log(e, index);
if (e) {
let index = kwOptions.value.findIndex((item) => item.pcode == e);
kwOptions.value.splice(index, 1);
kwOptions.value.unshift({ pcode: e });
}
}
//添加数量
@@ -971,6 +1085,10 @@ function addNum(row) {
/** 确定入库按钮 */
function submitForm() {
if (outTempData.value.length !== planList.value.length) {
proxy.$modal.msgError("请查看勾选数据");
return;
}
proxy.$refs["stockRef"].validate((valid) => {
if (valid) {
if (checkPlanList.value.length == 0) {
@@ -1313,6 +1431,7 @@ function handleUpdate(row) {
];
pcodeList(storeData.value.warehouseCode);
open.value = true;
outTempData.value = []
title.value = "修改库存单据";
}
// 取消按钮
@@ -1460,6 +1579,11 @@ function handleDispatch() {
proxy.$modal.msgError("请勾选数据");
return;
}
let isDiaodu = checkStockList.value.some((item) => item.execStatus == 0);
if(isDiaodu){
proxy.$modal.msgWarning("预入库数据不能生成调度任务");
return;
}
dispatchOpen.value = true;
}
// 提交调度任务
@@ -1470,7 +1594,7 @@ function submitDispatch() {
return;
}
let data;
if (billStatus.value == "rk") {
data = checkStockList.value.map((item) => ({
sourceName: "V01-010101",
targetName: item.pcode,
@@ -1480,17 +1604,28 @@ function submitDispatch() {
num: 1,
dispatchMode: resource.value,
}));
} else if (billStatus.value == "ck") {
data = checkStockList.value.map((item) => ({
sourceName: item.pcode,
targetName: "V01-010101",
taskTypeName: "下架",
taskType: 1,
mid: item.wlNo,
num: 1,
dispatchMode: resource.value,
}));
}
// if (billStatus.value == "rk") {
// data = checkStockList.value.map((item) => ({
// sourceName: "V01-010101",
// targetName: item.pcode,
// taskTypeName: "上架",
// taskType: 0,
// mid: item.wlNo,
// num: 1,
// dispatchMode: resource.value,
// }));
// } else if (billStatus.value == "ck") {
// data = checkStockList.value.map((item) => ({
// sourceName: item.pcode,
// targetName: "V01-010101",
// taskTypeName: "下架",
// taskType: 1,
// mid: item.wlNo,
// num: 1,
// dispatchMode: resource.value,
// }));
// }
//调用生成调度任务接口
generateDispatch(data).then((response) => {
// console.log(11111)
@@ -1668,7 +1803,8 @@ function handleExport() {
proxy.download(
"wisdom/record/export",
obj,
`stock_${new Date().getTime()}.xlsx`
`入库管理_${parseTime(new Date().getTime(), '{y}年{m}月{d}日 {h}_{i}_{s}')}.xlsx`
);
}
//打印单据
@@ -1788,4 +1924,20 @@ isAudit();
display: flex;
justify-content: flex-end;
}
.addBox{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
cursor: pointer;
.addData {
display: flex;
align-items: center;
color: var(--el-text-color-regular);
font-weight: bold;
}
}
</style>

View File

@@ -113,8 +113,9 @@
>否</span
>
<span v-else-if="scope.row.isDelivery === '1'">是</span>
<span v-else-if="scope.row.isDelivery === '2'">配送</span>
<span v-else-if="scope.row.isDelivery === '3'">配送完成</span>
<span v-else-if="scope.row.isDelivery === '2'">配送</span>
<span v-else-if="scope.row.isDelivery === '3'">配送</span>
<span v-else-if="scope.row.isDelivery === '4'">配送完成</span>
</template>
</el-table-column>
<el-table-column
@@ -730,6 +731,9 @@
</template>
</el-table-column>
</el-table>
<!-- <pagination v-show="outTotal > 0" :total="outTotal" v-model:page="outQueryParams.pageNum"
v-model:limit="outQueryParams.pageSize" @pagination="searchPlan" /> -->
<!-- 审批模块 暂时注释-->
<div class="examine" v-show="isExamine == 1">
<el-row :gutter="20">
@@ -937,9 +941,9 @@ import {
updateBill,
updateRecord,
} from "@/api/wisdom/bill";
import { listStock } from "@/api/wisdom/stock";
import {
addGetOutbound,
addOutbound,
recordFinish,
backoutRecord,
@@ -959,7 +963,8 @@ import { getToken } from "@/utils/auth";
import bill from "@/components/storageBill/bill.vue";
import printBill from "@/components/printBill/bill.vue";
import { ref } from "vue";
import { pl } from "element-plus/es/locales.mjs";
import { parseTime } from '@/utils/manage';
const headers = ref({
Authorization: "Bearer " + getToken(),
});
@@ -1147,9 +1152,10 @@ const outQueryParams = ref({
cangku: "",
gysMc: "",
pageNum: 1,
pageSize: 50,
pageSize: 200,
remark: "",
});
const outTotal = ref(0);
//查询库存中数据 搜索
const planList = ref([]);
const addTableRef = ref(null);
@@ -1157,13 +1163,14 @@ function searchPlan() {
if (outQueryParams.value.cangku.length > 0) {
outQueryParams.value.cangku = outQueryParams.value.cangku[1];
}
listStock(outQueryParams.value).then((response) => {
addGetOutbound(outQueryParams.value).then((response) => {
if (response.rows.length == 0) {
proxy.$modal.msgWarning("库存无数据");
planList.value = [];
} else {
planList.value = response.rows;
}
outTotal.value = response.total;
});
}
@@ -1198,11 +1205,22 @@ function addOutBoundData() {
return;
}
let data = outBoundData.value.concat(checkOutList.value);
const map = new Map();
// 遍历数组Map的键为id值值为数组元素自动覆盖重复键
data.forEach(item => map.set(item.id, item));
// 把Map的值转为数组保留最后一次出现的重复项
outBoundData.value = Array.from(map.values());
let arr = []
let spaNoTotal = ''
const idList = []; // 用于统计每个id出现的次数
// 第一步遍历数组统计id出现次数
data.forEach(item => {
if (idList.includes(item.id)) {
spaNoTotal += item.sapNo + ','
} else {
arr.push(item)
idList.push(item.id);
}
});
if (spaNoTotal) {
proxy.$modal.msgError("存在重复数据" + spaNoTotal);
}
outBoundData.value = arr
}
// 查看所有的出库数据
@@ -1287,7 +1305,7 @@ function handleExport() {
proxy.download(
"wisdom/record/export",
obj,
`stock_${new Date().getTime()}.xlsx`
`出库管理_${parseTime(new Date().getTime(), '{y}年{m}月{d}日 {h}_{i}_{s}')}.xlsx`
);
}
@@ -1636,6 +1654,12 @@ function handleDispatch() {
proxy.$modal.msgError("请勾选数据");
return;
}
let isDiaodu = checkStockList.value.some((item) => item.execStatus == 0);
if(isDiaodu){
proxy.$modal.msgWarning("预出库数据不能生成调度任务");
return;
}
dispatchOpen.value = true;
}
// 提交调度任务
@@ -1647,7 +1671,8 @@ function submitDispatch() {
//调用生成调度任务接口
const data = checkStockList.value.map((item) => ({
sourceName: item.pcode,
targetName: "V01-230101",
// targetName: "V01-230101",
targetName: "V01-010101",
taskTypeName: "下架",
taskType: 1,
mid: item.wlNo,

View File

@@ -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>
@@ -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>
@@ -183,7 +183,7 @@ const data = reactive({
pageNum: 1,
pageSize: 10,
billNo: null,
isChuku: null,
bizType: null,
startTime: null,
endTime: null,
xmNo: null,
@@ -276,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.length > 0 || operationTypeRK.value.length > 0) {
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) {

View File

@@ -61,7 +61,7 @@
<!-- <el-col :span="1.5">
<el-col :span="1.5">
<el-button
type="success"
plain
@@ -70,7 +70,7 @@
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>
@@ -125,95 +125,14 @@
/>
<!-- 打印 -->
<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 { listStock } from "@/api/wisdom/record";
import printBill from "@/components/printBill/bill.vue";
const { proxy } = getCurrentInstance();

View File

@@ -60,24 +60,34 @@
: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">
<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="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">
@@ -109,6 +120,7 @@
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" />
@@ -128,6 +140,7 @@
<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" />
@@ -328,6 +341,7 @@ import { listStock, getTotal, editStock, printTag } from "@/api/wisdom/
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 { getKwAllList } from "@/api/information/pcdedetail"; //库位下拉数据
import { parseTime } from '@/utils/manage'
@@ -342,7 +356,7 @@ const showSearch = ref(true);
const warehouseCode = ref(''); //所属仓库下拉数据
const printList = ref([]) //要打印的数据列表
const optionTime = ref([]) //入库时间
@@ -377,6 +391,7 @@ const data = reactive({
cangku: "",
wlMs: "",
ids: [],
remark: "",
},
rules: {
wlType: [{ required: true, message: "物资类型不能为空", trigger: "change" }],
@@ -410,6 +425,11 @@ function getList() {
}
getList();
const printList = ref([]) //要打印的数据列表
const printSelectionChange = (selection) => {
printList.value = selection
}
// 获取总计
const totalMoney = ref(null)
const pcodeCount = ref(null)
@@ -444,6 +464,14 @@ function materialFun() {
})
}
materialFun()
//场景下拉
const sceneTypeList = ref([]);
function listSceneFun() {
listScene().then(response => {
sceneTypeList.value = response.rows
})
}
listSceneFun()
//理货员
const personList = ref([]);
@@ -554,12 +582,12 @@ function submitMoveForm() {
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].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;