Commit b007a325 authored by huhaiqing's avatar huhaiqing

装柜功能开发

parent 656ca06f
...@@ -426,6 +426,25 @@ export function createGoods(data) { ...@@ -426,6 +426,25 @@ export function createGoods(data) {
/***************************** 预装 end **********************************/ /***************************** 预装 end **********************************/
/***************************** 装柜 start **********************************/
/**
* 获得装柜部分列表
*
* @export
* @param {*} params
* @return {*}
*/
export function loadSecGoodsList(params) {
return request({
url: "/ecw/box-preload-goods/loadSecGoodsList",
method: "get",
params,
});
}
/***************************** 装柜 end **********************************/
/** /**
* 服务提示消息回调 * 服务提示消息回调
* *
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
</el-form> </el-form>
<!-- 开始装柜 --> <!-- 开始装柜 -->
<el-dialog title="开始装柜" :visible.sync="dialogVisible" fullscreen :modal-append-to-body=false append-to-body destroy-on-close> <el-dialog title="开始装柜" :visible.sync="dialogVisible" fullscreen :modal-append-to-body=false append-to-body>
<startPacking /> <startPacking v-bind="$attrs" v-if="dialogVisible" />
</el-dialog> </el-dialog>
<!-- 操作 --> <!-- 操作 -->
......
...@@ -4,25 +4,27 @@ ...@@ -4,25 +4,27 @@
<el-row class="content-area"> <el-row class="content-area">
<!-- 左侧 --> <!-- 左侧 -->
<el-col :span="6" class="left-area"> <el-col :span="4" class="left-area">
<el-row v-for="item in testData" :key="item.key" class="title-info"> <el-row v-for="item in listData" :key="item.id" class="title-info" :class="item.id === tableData.id ? 'selected' : ''">
<div> <div @click="partClick(item)">
<p>{{item.title}}</p> <p>{{item.title}}</p>
</div> </div>
<div> <div>
<p>111</p> <template v-if="item.secStatistics">
<p>111</p> <p>{{item.secStatistics.num}}</p>
<p>111</p> <p>{{item.secStatistics.volume}}</p>
<p>{{item.secStatistics.weight}}Kg</p>
</template>
</div> </div>
</el-row> </el-row>
</el-col> </el-col>
<!-- 右侧 --> <!-- 右侧 -->
<el-col :span="18" class="right-area"> <el-col :span="20" class="right-area">
<!-- 操作 --> <!-- 操作 -->
<el-row class="table-title"> <el-row class="table-title">
<div>当前装柜:第一部分</div> <div>当前装柜:{{tableData.title}}</div>
<div> <div>
<el-input v-model="qrCode" placeholder="请输入二维码/条码编号"></el-input> <el-input v-model="qrCode" placeholder="请输入二维码/条码编号"></el-input>
<el-button type="primary">确定</el-button> <el-button type="primary">确定</el-button>
...@@ -33,19 +35,48 @@ ...@@ -33,19 +35,48 @@
</el-row> </el-row>
<!-- 表格 --> <!-- 表格 -->
<el-row> <el-row class="table-content">
<el-table v-loading="loading" :data="listData"> <el-table v-loading="loading" :data="tableData.sectionOrderList">
<el-table-column label="序号" type="index" width="50" /> <el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column label="订单号" align="center" prop="selfNo"> <el-table-column label="订单号" align="center" prop="orderId">
<template slot-scope="scope">
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.orderId }}</a>
</template>
</el-table-column>
<el-table-column label="货物信息" align="center" prop="goodsList">
<template slot-scope="scope">
<section class="table-goodList">
<div v-for="item in scope.row.goodsList" :key="item.orderId" class="goodList-div">
<p>品名:{{item.prodTitleZh}}</p>
<p>
品牌:【
<dict-tag :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" :value="item.productRecord" />
</p>
<p>其他:<span>{{item.num}}</span><span>{{item.volume}}</span><span>{{item.weight}}Kg</span></p>
</div>
</section>
</template>
</el-table-column>
<el-table-column label="计划箱数" align="center" prop="num">
<template slot-scope="scope">
{{ scope.row.num }}
</template>
</el-table-column>
<el-table-column label="实装箱数" align="center" prop="installNum">
<template slot-scope="scope"> <template slot-scope="scope">
<a href="javascript:void(0);" class="order-href" @click="orderClick(scope.row)">{{ scope.row.selfNo }}</a> {{ scope.row.installNum }}
</template>
</el-table-column>
<el-table-column label="体积" align="center" prop="volume">
<template slot-scope="scope">
{{ scope.row.volume }}
</template>
</el-table-column>
<el-table-column label="重量" align="center" prop="weight">
<template slot-scope="scope">
{{ scope.row.weight }} Kg
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="货物信息" align="center" prop="cubNo" />
<el-table-column label="计划箱数" align="center" prop="cabinetId" />
<el-table-column label="实装箱数" align="center" prop="transportType" />
<el-table-column label="体积" align="center" prop="squareNumber" />
<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" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="small">移出</el-button> <el-button type="primary" size="small">移出</el-button>
...@@ -61,9 +92,8 @@ ...@@ -61,9 +92,8 @@
<!-- 统计 --> <!-- 统计 -->
<el-row> <el-row>
<el-col :span="6" class="totle-info"> <el-col :span="6" class="totle-info">
<div> <div class="count-info">
<p>总计:</p> <p>总计:<span>{{sumData.count.num}}箱</span><span>{{sumData.count.volume}}m³</span><span>{{sumData.count.weight}}Kg</span></p>
<p>111</p>
</div> </div>
<div> <div>
<p>容量:</p> <p>容量:</p>
...@@ -159,43 +189,32 @@ ...@@ -159,43 +189,32 @@
<script> <script>
import supplementOrder from "./supplementOrder.vue"; import supplementOrder from "./supplementOrder.vue";
import { loadSecGoodsList } from "@/api/ecw/boxSea";
/** /**
* 开始装柜 * 开始装柜
*/ */
export default { export default {
name: "startPacking", name: "startPacking",
inheritAttrs: false,
components: { components: {
supplementOrder, supplementOrder,
}, },
props: {
shipmentObj: Object,
},
data() { data() {
return { return {
// laoding // laoding
loading: false, loading: false,
// 二维码/条码编号
qrCode: "",
// 表格数据 // 表格数据
listData: [ listData: [],
{ // 表格数据
selfNo: "111aaa", tableData: {},
cubNo: "11111111111111111111111111", // 统计数据
}, sumData: {
{ count: { num: 0, volume: 0, weight: 0 },
selfNo: "111aaa", },
cubNo: "11111111111111111111111111",
},
],
// 左侧数据
testData: [
{
key: 1,
title: "第一部分",
},
{
key: 2,
title: "第二部分",
},
],
// 弹窗配置 // 弹窗配置
dialogConfig: { dialogConfig: {
title: "", title: "",
...@@ -204,6 +223,8 @@ export default { ...@@ -204,6 +223,8 @@ export default {
type: "", type: "",
fullscreen: false, fullscreen: false,
}, },
// 二维码/条码编号
qrCode: "",
// 批量输入 // 批量输入
batchObj: {}, batchObj: {},
// 批量纠错(订单号) // 批量纠错(订单号)
...@@ -222,7 +243,25 @@ export default { ...@@ -222,7 +243,25 @@ export default {
}, },
}; };
}, },
created() {
this.getLoadSecGoodsList();
},
methods: { methods: {
/* 装柜部分列表 */
getLoadSecGoodsList() {
loadSecGoodsList({ shipmentId: this.shipmentObj.id }).then((res) => {
const { data = [] } = res;
this.listData = data.map((item, index) => {
return {
...item,
title: `第${++index}部分`,
};
});
if (this.listData.length) {
this.tableData = this.listData[0];
}
});
},
/** 点击事件统一入口 */ /** 点击事件统一入口 */
handlerClick(type, title) { handlerClick(type, title) {
this.shwoDialog({ type, title }); this.shwoDialog({ type, title });
...@@ -261,12 +300,41 @@ export default { ...@@ -261,12 +300,41 @@ export default {
} }
}); });
}, },
/* 部分点击 */
partClick(item) {
console.log(item);
this.tableData = item;
},
},
watch: {
listData(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);
}
}
});
}
this.$set(this.sumData, "count", count);
},
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.startPacking { .startPacking {
display: flex;
flex-direction: column;
p { p {
margin: 0; margin: 0;
} }
...@@ -276,7 +344,15 @@ export default { ...@@ -276,7 +344,15 @@ export default {
border-right: 3px solid #e6ebf5; border-right: 3px solid #e6ebf5;
padding-right: 10px; padding-right: 10px;
.title-info { .title-info {
height: 100px; height: 80px;
&.selected {
> div:first-child {
background-color: #4f9cdd;
color: #fff;
}
}
> div:first-child { > div:first-child {
font-size: 16px; font-size: 16px;
background-color: #f2f2f2; background-color: #f2f2f2;
...@@ -309,8 +385,27 @@ export default { ...@@ -309,8 +385,27 @@ export default {
} }
} }
} }
.order-href { .table-content {
color: #4f9cdd; .table-goodList {
.goodList-div {
border-bottom: 1px solid #e6ebf5;
> p {
text-align: left;
}
> p:last-child {
> span {
margin-right: 5px;
}
}
}
> div:last-child {
border-bottom: none;
}
}
.el-table {
color: red;
}
} }
} }
} }
...@@ -321,6 +416,11 @@ export default { ...@@ -321,6 +416,11 @@ export default {
display: flex; display: flex;
margin-bottom: 5px; margin-bottom: 5px;
} }
.count-info {
> p > span {
margin-right: 5px;
}
}
} }
.button-area { .button-area {
text-align: center; text-align: center;
......
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