This commit is contained in:
2026-02-10 09:30:30 +08:00
5 changed files with 28 additions and 98 deletions

View File

@@ -731,8 +731,8 @@
</el-table-column>
</el-table>
<pagination v-show="outTotal > 0" :total="outTotal" v-model:page="outQueryParams.pageNum"
v-model:limit="outQueryParams.pageSize" @pagination="searchPlan" />
<!-- <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">
@@ -1151,7 +1151,7 @@ const outQueryParams = ref({
cangku: "",
gysMc: "",
pageNum: 1,
pageSize: 50,
pageSize: 200,
remark: "",
});
const outTotal = ref(0);
@@ -1204,11 +1204,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
}
// 查看所有的出库数据

View File

@@ -281,7 +281,7 @@ function handleQuery() {
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
}
//操作时间

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();