Compare commits
32 Commits
00af708be9
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a491fd75c3 | |||
| f6c665c8fa | |||
| 7059706e9b | |||
| d05e577d13 | |||
| 23a49fc297 | |||
| 81bef6a164 | |||
| 7b77ab0996 | |||
| 079818aa0f | |||
| 2897bc3f51 | |||
| 8e818b7430 | |||
| bfab2eea96 | |||
| 30f82750a5 | |||
| e3ee4f8b3e | |||
| e400907db9 | |||
| 43791e8ab6 | |||
| e2d502394c | |||
| d4b5d47dfc | |||
| 8af7570fe8 | |||
| 03eedebacd | |||
| 2252b561de | |||
| d8c071952c | |||
| 3bfb9d0f4d | |||
| 0d38c8877f | |||
| b0db03bf52 | |||
| 48d900355d | |||
| 534c9528bc | |||
| c466e5fbda | |||
| 5cc33e4ef6 | |||
| a667d99734 | |||
| 5b5e2ceb4f | |||
| f198ab6bd7 | |||
| c318e667cb |
@@ -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) {
|
||||
|
||||
@@ -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({
|
||||
|
||||
1
src/assets/icons/svg/inbound.svg
Normal file
1
src/assets/icons/svg/inbound.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770191940726" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2273" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M896 597.333333a42.666667 42.666667 0 0 1 42.666667 42.666667v170.666667a128 128 0 0 1-128 128H213.333333a128 128 0 0 1-128-128v-170.666667a42.666667 42.666667 0 1 1 85.333334 0v170.666667a42.666667 42.666667 0 0 0 42.666666 42.666666h597.333334a42.666667 42.666667 0 0 0 42.666666-42.666666v-170.666667a42.666667 42.666667 0 0 1 42.666667-42.666667zM512.853333 85.376a42.666667 42.666667 0 0 1 8.405334 0.981333l1.194666 0.298667a42.325333 42.325333 0 0 1 19.712 11.178667l213.333334 213.333333a42.666667 42.666667 0 1 1-60.330667 60.330667L554.666667 230.997333V640a42.666667 42.666667 0 1 1-85.333334 0V230.997333L328.832 371.498667a42.666667 42.666667 0 1 1-60.330667-60.330667l213.333334-213.333333c2.645333-2.645333 5.632-4.906667 8.874666-6.826667l1.877334-0.981333a42.368 42.368 0 0 1 8.405333-3.242667l2.133333-0.554667 1.408-0.213333A43.178667 43.178667 0 0 1 511.146667 85.333333L512 85.333333l0.853333 0.042667z" p-id="2274" fill="#409EFF"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
src/assets/icons/svg/outbound.svg
Normal file
1
src/assets/icons/svg/outbound.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1770191913465" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2064" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M896 597.333333a42.666667 42.666667 0 0 1 42.666667 42.666667v170.666667a128 128 0 0 1-128 128H213.333333a128 128 0 0 1-128-128v-170.666667a42.666667 42.666667 0 1 1 85.333334 0v170.666667a42.666667 42.666667 0 0 0 42.666666 42.666666h597.333334a42.666667 42.666667 0 0 0 42.666666-42.666666v-170.666667a42.666667 42.666667 0 0 1 42.666667-42.666667zM512 85.333333a42.666667 42.666667 0 0 1 42.666667 42.666667v409.002667l140.501333-140.501334a42.666667 42.666667 0 1 1 60.330667 60.330667l-213.333334 213.333333a42.837333 42.837333 0 0 1-17.706666 10.666667l-2.645334 0.64-1.450666 0.341333-1.322667 0.170667A43.008 43.008 0 0 1 512 682.666667c-2.432 0-4.778667-0.298667-7.082667-0.682667-0.426667-0.042667-0.853333-0.085333-1.322666-0.213333l-1.450667-0.298667-2.645333-0.682667a42.496 42.496 0 0 1-17.664-10.624l-213.333334-213.333333a42.666667 42.666667 0 1 1 60.330667-60.330667L469.333333 537.002667V128a42.666667 42.666667 0 0 1 42.666667-42.666667z" p-id="2065" fill="#E6A23C"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/assets/images/inbound.png
Normal file
BIN
src/assets/images/inbound.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/assets/images/outbound.png
Normal file
BIN
src/assets/images/outbound.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
@@ -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,7 +429,41 @@ 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 = {
|
||||
|
||||
@@ -408,7 +408,7 @@ function handleInventory(row) {
|
||||
|
||||
/** 查看结果操作 */
|
||||
function handleHistory(row) {
|
||||
router.push({ path: "/Inventory/task/inventoryResult" , query: {"taskId": row.id} })
|
||||
router.push({ path: "/Inventory/task/inventoryResult" , query: {"taskId": row.id,'warehouseCode':row.warehouseCode,"sceneId":row.sceneId} })
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
|
||||
@@ -18,14 +18,47 @@
|
||||
|
||||
<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">
|
||||
@@ -64,7 +97,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="InventoryResult">
|
||||
import { getScanResult, getStockList } from "@/api/Inventory/autoInventory";
|
||||
import { getStockList, getTotalStatistics, inventoryList } from "@/api/Inventory/autoInventory";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
@@ -91,13 +124,19 @@ const dialogParams = ref({
|
||||
status: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
taskId: ""
|
||||
warehouseCode: '',
|
||||
sceneId: '',
|
||||
})
|
||||
const dialogData = ref([])
|
||||
const dialogTotal = ref(0)
|
||||
|
||||
const getHistoryInfo = () => {
|
||||
getScanResult(dialogParams.value).then(res => {
|
||||
if(dialogParams.value.status!=0){
|
||||
dialogData.value =null
|
||||
dialogTotal.value = 0
|
||||
return;
|
||||
}
|
||||
inventoryList(dialogParams.value).then(res => {
|
||||
dialogData.value = res.rows
|
||||
dialogTotal.value = res.total
|
||||
})
|
||||
@@ -122,25 +161,59 @@ const chageDialogPage = (e) => {
|
||||
const taskView = ref(false)
|
||||
const viewData = ref([])
|
||||
const handleView = (row) => {
|
||||
// let obj = {
|
||||
// pageNum: 1,
|
||||
// pageSize: 100,
|
||||
// pcode: row.rkPcode
|
||||
// }
|
||||
getStockList(row.rkPcode).then(res => {
|
||||
console.log(res)
|
||||
viewData.value = res.data
|
||||
taskView.value = true
|
||||
})
|
||||
}
|
||||
|
||||
const totalMoney = ref(null)
|
||||
const pcodeCount = ref(null)
|
||||
const sumQty = ref(null)
|
||||
function getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) { // 第一列不进行合计操作,通常是序列号或选择框等非数值列。
|
||||
sums[index] = '总计'; // 这里可以设置为其他文字或空字符串。
|
||||
return;
|
||||
} else if (index === 2) { // 第二列是金额列,进行求和操作。
|
||||
sums[index] = '总金额:' + totalMoney.value;
|
||||
} else if (index === 3) {
|
||||
sums[index] = '共存于:' + pcodeCount.value + '个库位'
|
||||
} else if (index === 4) {
|
||||
sums[index] = '总数:' + sumQty.value
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
onMounted(() => {
|
||||
dialogParams.value.taskId = route.query.taskId
|
||||
// dialogParams.value.taskId = route.query.taskId
|
||||
dialogParams.value.warehouseCode = route.query.warehouseCode
|
||||
dialogParams.value.sceneId = route.query.sceneId
|
||||
dialogParams.value.pageNum = 1
|
||||
dialogParams.value.pageSize = 10
|
||||
getHistoryInfo()
|
||||
})
|
||||
// 获取总计
|
||||
|
||||
function getSumInfo() {
|
||||
//统计信息
|
||||
let rkInfo = JSON.parse(JSON.stringify({
|
||||
warehouseCode:route.query.warehouseCode,
|
||||
sceneId:route.query.sceneId,
|
||||
}))
|
||||
delete rkInfo.pageNum
|
||||
delete rkInfo.pageSize
|
||||
getTotalStatistics(rkInfo).then(response => {
|
||||
totalMoney.value = response.data.totalAmount
|
||||
pcodeCount.value = response.data.locationCount
|
||||
sumQty.value = response.data.totalQuantity
|
||||
});
|
||||
}
|
||||
getSumInfo()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@@ -1,110 +1,61 @@
|
||||
<template>
|
||||
<div class="dashboard app-container">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4">
|
||||
<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.monthInCount }}</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="4">
|
||||
<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.monthInProjectCount }}</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-col :span="4">
|
||||
<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.monthInAmount }}</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="4">
|
||||
<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.monthOutCount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<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.monthOutProjectCount }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<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.monthOutAmount }}</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>
|
||||
</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">
|
||||
@@ -291,9 +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>
|
||||
@@ -305,9 +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>
|
||||
@@ -1163,6 +1119,34 @@ const getChartInventoryType = (data, id) => {
|
||||
background-color: #F5F5F5;
|
||||
padding: 32rpx;
|
||||
|
||||
.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%;
|
||||
@@ -1196,9 +1180,11 @@ const getChartInventoryType = (data, id) => {
|
||||
}
|
||||
|
||||
.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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -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.js(crypto 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)
|
||||
@@ -1789,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>
|
||||
|
||||
@@ -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,
|
||||
@@ -1148,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);
|
||||
@@ -1158,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;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1199,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
|
||||
}
|
||||
|
||||
// 查看所有的出库数据
|
||||
@@ -1637,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;
|
||||
}
|
||||
// 提交调度任务
|
||||
@@ -1648,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,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user