Commit 9d6a84d2 authored by huhaiqing's avatar huhaiqing

总计跟容量字段信息补全

parent 8f900fd0
......@@ -5,19 +5,29 @@
<el-row class="number-area">
<p class="label-font">自编号:</p>
<p class="label-font">{{selfNo}}</p>
<el-input v-model="labelNo" placeholder="请输入标签号"></el-input>
<el-input v-model="labelNo"
placeholder="请输入标签号"></el-input>
<div>
<el-button type="primary" @click="modifyBatchUnload">批量输入</el-button>
<el-button type="primary" @click="modifyAllUnload">一键卸柜</el-button>
<el-button type="primary"
@click="modifyBatchUnload">批量输入</el-button>
<el-button type="primary"
@click="modifyAllUnload">一键卸柜</el-button>
</div>
</el-row>
<!-- 当前部分 -->
<el-row class="number-area">
<p class="label-font">当前部分:</p>
<el-select placeholder="请选择" v-model="sectionId" @change="sectionChange">
<el-option key="0" label="全部" value="0"></el-option>
<el-option v-for="item in sectionList" :key="item.id" :label="item.title" :value="item.id"></el-option>
<el-select placeholder="请选择"
v-model="sectionId"
@change="sectionChange">
<el-option key="0"
label="全部"
value="0"></el-option>
<el-option v-for="item in sectionList"
:key="item.id"
:label="item.title"
:value="item.id"></el-option>
</el-select>
<p>
{{getSectionInfo}}
......@@ -26,32 +36,58 @@
<!-- 表格 -->
<el-row class="table-area">
<el-table v-loading="loading" :data="pageData.sectionOrderList" border>
<el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column label="订单号" align="center" prop="orderNo">
<el-table v-loading="loading"
:data="pageData.sectionOrderList"
border>
<el-table-column label="序号"
type="index"
align="center"
width="50" />
<el-table-column label="订单号"
align="center"
prop="orderNo">
<template slot-scope="scope">
<a href="javascript:void(0);" class="order-href">{{ scope.row.orderNo }}</a>
<a href="javascript:void(0);"
class="order-href">{{ scope.row.orderNo }}</a>
</template>
</el-table-column>
<el-table-column label="商品信息" align="center" prop="goodsList">
<el-table-column label="商品信息"
align="center"
prop="goodsList">
<template slot-scope="scope">
<section class="table-goodList">
<div v-for="(item, index) in scope.row.goodsList" :key="index" class="goodList-div">
<div v-for="(item, index) in scope.row.goodsList"
:key="index"
class="goodList-div">
<p>{{index+1}}{{item.prodTitleZh}}</p>
</div>
</section>
</template>
</el-table-column>
<el-table-column label="实装箱数" align="center" prop="installNum" />
<el-table-column label="卸柜箱数" align="center" prop="unloadNum" />
<el-table-column label="清关状态" align="center" prop="">
<el-table-column label="实装箱数"
align="center"
prop="installNum" />
<el-table-column label="卸柜箱数"
align="center"
prop="unloadNum" />
<el-table-column label="清关状态"
align="center"
prop="">
<template slot-scope="scope">{{clearStatus(scope.row)}}</template>
</el-table-column>
<el-table-column label="体积" align="center" prop="volume" />
<el-table-column label="重量" align="center" prop="weight" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="体积"
align="center"
prop="volume" />
<el-table-column label="重量"
align="center"
prop="weight" />
<el-table-column label="操作"
align="center"
class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="danger" size="small" @click="openError(scope.row)">异常</el-button>
<el-button type="danger"
size="small"
@click="openError(scope.row)">异常</el-button>
</template>
</el-table-column>
</el-table>
......@@ -62,10 +98,7 @@
<div class="label-font">
<p>
<span>总计:</span>
<span>无返回</span>
<!-- <span>{{pageData.totalStatistics ? pageData.totalStatistics.num : 0}}箱</span>
<span>{{pageData.totalStatistics ? pageData.totalStatistics.volume : 0}}m3</span>
<span>{{pageData.totalStatistics ? pageData.totalStatistics.weight : 0}}kg</span> -->
<span>{{getTotlContent(pageData.totalStatistics)}}</span>
</p>
</div>
<div class="label-font">
......@@ -77,12 +110,21 @@
</el-row>
<el-row>
<el-button type="success" @click="onSubmit">卸柜完成</el-button>
<el-button type="success"
@click="onSubmit">卸柜完成</el-button>
</el-row>
<!-- 对话框 -->
<el-dialog custom-class="shipping-dialog" title="异常" :visible.sync="dialogVisible" width="600px" :modal-append-to-body=false append-to-body>
<unloadingError v-if="dialogVisible" @closeDialog="closeDialog" v-bind="$attrs" :currRow="currRow" />
<el-dialog custom-class="shipping-dialog"
title="异常"
:visible.sync="dialogVisible"
width="600px"
:modal-append-to-body=false
append-to-body>
<unloadingError v-if="dialogVisible"
@closeDialog="closeDialog"
v-bind="$attrs"
:currRow="currRow" />
</el-dialog>
</div>
</template>
......
......@@ -933,6 +933,33 @@ function getTotlContent(total, keys = ["num", "volume", "weight"]) {
return content.join(" ");
}
function getCapacity(capacity) {
return `${capacity?.name ?? ""}柜型 ${capacity?.volume ?? 0}m³ ${
capacity?.weight ?? 0
}kg`;
}
function sumStatistics(val) {
let count = { num: 0, volume: 0, weight: 0 };
if (Array.isArray(val)) {
val.forEach((item) => {
const { secStatistics } = item;
if (secStatistics) {
if (!Number.isNaN(Number(secStatistics.num))) {
count.num = count.num + Number(secStatistics.num);
}
if (!Number.isNaN(Number(secStatistics.volume))) {
count.volume = count.volume + Number(secStatistics.volume);
}
if (!Number.isNaN(Number(secStatistics.weight))) {
count.weight = count.weight + Number(secStatistics.weight);
}
}
});
}
return getTotlContent(count);
}
export const fileTypes = [
"doc",
"xls",
......@@ -976,5 +1003,7 @@ export {
formatNumberString,
formatDate,
getTotlContent,
getCapacity,
sumStatistics,
serviceMsg,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment