This commit is contained in:
2026-03-06 09:09:48 +08:00
10 changed files with 370 additions and 57 deletions

View File

@@ -17,7 +17,14 @@ 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({
@@ -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

@@ -73,6 +73,7 @@
<table border="1" style="width: 100%; border-collapse: collapse; font-size: 12px;">
<thead>
<tr>
<th>序号</th>
<th>物料号</th>
<th>物料描述</th>
<th>计量单位</th>
@@ -87,7 +88,8 @@
</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>
@@ -151,7 +153,7 @@ const summaryList = computed(() => {
props.billAllObj.forEach(item => {
if (map.has(item.wlNo)) {
const existing = map.get(item.wlNo);
const total = (parseFloat(existing.totalQty) + parseFloat(item.realQty)) * 100*10000
const total = (parseFloat(existing.totalQty)*100 *10000 + parseFloat(item.realQty)*100 *10000)
existing.totalQty = total / ( 100 * 10000);
} else {
map.set(item.wlNo, {

View File

@@ -145,7 +145,7 @@ const summaryList = computed(() => {
props.billAllObj.forEach(item => {
if (map.has(item.wlNo)) {
const existing = map.get(item.wlNo);
const total = (parseFloat(existing.totalQty) + parseFloat(item.realQty)) * 100*10000
const total = (parseFloat(existing.totalQty) * 100*10000+ parseFloat(item.realQty)* 100*10000)
existing.totalQty = total / ( 100 * 10000);
} else {
map.set(item.wlNo, {

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

@@ -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
@@ -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,6 +895,88 @@ 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 = arr
}
// 查看所有的出库数据
const viewData = () => {
planList.value = JSON.parse(JSON.stringify(outTempData.value));
}
// 删除选中的出库数据
const deleteData = () => {
if (checkPlanList.value.length == 0) {
proxy.$modal.msgError("请勾选数据");
return;
}
proxy.$modal.confirm("确认删除选中的出库数据吗?").then(() => {
const ids = checkPlanList.value.map(item => item.id);
console.log(ids)
planList.value = planList.value.filter(item => {
// 无id的元素默认保留如果想删除无id的可改为 item?.id && !arr2Ids.has(item.id)
return !ids.includes(item?.id);
});
outTempData.value = planList.value
});
}
//新增入库 多选框选中数据
function handleSelectionChange(selection) {
checkPlanList.value = selection;
@@ -898,6 +995,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;
}
@@ -972,6 +1070,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) {
@@ -1801,4 +1903,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

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) {
queryParams.value.operationType = operationTypeRK.value || operationTypeCK.value
}else{
queryParams.value.operationType =''
}
//操作时间
if (optionTime.value && optionTime.value.length > 0) {

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;