|
|
@ -1,12 +1,30 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="customer-css"> |
|
|
<div class="customer-css"> |
|
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|
|
|
|
|
<el-form-item > |
|
|
|
|
|
<el-button type="primary" @click="searchTable()">查询</el-button> |
|
|
|
|
|
<el-button v-if="searchData.orderStatus === '待包装'" type="primary" @click="newPallet()">新增托</el-button> |
|
|
|
|
|
<el-button type="primary" @click="printPalletLabels()" :disabled="selectedPallets.length <= 0">打印</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
<div style="display: flex; align-items: center; margin-top: 1px; margin-left: 0px;"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<el-button type="primary" @click="searchTable()">查询</el-button> |
|
|
|
|
|
<el-button v-if="searchData.orderStatus === '待包装'" type="primary" @click="newPallet()">新增托</el-button> |
|
|
|
|
|
<el-button type="primary" @click="printPalletLabels()" :disabled="selectedPallets.length <= 0">打印</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<span style="margin-left: auto; font-size: 14px; display: flex; align-items: center;"> |
|
|
|
|
|
<span style="margin-right: 20px;"> |
|
|
|
|
|
<span style="color: #606266;">托数量:</span> |
|
|
|
|
|
<span style="color: rgb(38, 92, 147); font-weight: bold;">{{palletListStatistics.palletCount}}</span> |
|
|
|
|
|
</span> |
|
|
|
|
|
<span style="margin-right: 20px;"> |
|
|
|
|
|
<span style="color: #606266;">托箱标签张数:</span> |
|
|
|
|
|
<span style="color: rgb(38, 92, 147); font-weight: bold;">{{palletListStatistics.boxesCount}}</span> |
|
|
|
|
|
</span> |
|
|
|
|
|
<span style="margin-right: 20px;"> |
|
|
|
|
|
<span style="color: #606266;">托卷标签张数:</span> |
|
|
|
|
|
<span style="color: rgb(38, 92, 147); font-weight: bold;">{{palletListStatistics.rollCount}}</span> |
|
|
|
|
|
</span> |
|
|
|
|
|
<span> |
|
|
|
|
|
<span style="color: #606266;">物料总数:</span> |
|
|
|
|
|
<span style="color: rgb(38, 92, 147); font-weight: bold;">{{palletListStatistics.rollsQty}}</span> |
|
|
|
|
|
</span> |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
<el-table |
|
|
<el-table |
|
|
:data="dataList" |
|
|
:data="dataList" |
|
|
:height=searchData.height |
|
|
:height=searchData.height |
|
|
@ -392,6 +410,12 @@ export default { |
|
|
boxRollDetailList: [], |
|
|
boxRollDetailList: [], |
|
|
boxRollDetailLoading: false, |
|
|
boxRollDetailLoading: false, |
|
|
selectedPallets: [], // 选中的托盘列表 |
|
|
selectedPallets: [], // 选中的托盘列表 |
|
|
|
|
|
palletListStatistics: { |
|
|
|
|
|
palletCount: 0, // 托数量 |
|
|
|
|
|
boxesCount: 0, // 托箱标签张数 |
|
|
|
|
|
rollCount: 0, // 托卷标签张数 |
|
|
|
|
|
rollsQty: 0 // 物料总数 |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
@ -416,8 +440,26 @@ export default { |
|
|
//区分请求成功和失败的状况 |
|
|
//区分请求成功和失败的状况 |
|
|
if (data && data.code == 0) { |
|
|
if (data && data.code == 0) { |
|
|
this.dataList = data.rows |
|
|
this.dataList = data.rows |
|
|
|
|
|
// 更新统计数据 - 从列表第一条记录中获取 |
|
|
|
|
|
if (data.rows && data.rows.length > 0) { |
|
|
|
|
|
const firstRecord = data.rows[0] |
|
|
|
|
|
this.palletListStatistics.palletCount = firstRecord.palletCount || 0 |
|
|
|
|
|
this.palletListStatistics.boxesCount = firstRecord.boxesCount || 0 |
|
|
|
|
|
this.palletListStatistics.rollCount = firstRecord.rollCount || 0 |
|
|
|
|
|
this.palletListStatistics.rollsQty = firstRecord.rollsQty || 0 |
|
|
|
|
|
} else { |
|
|
|
|
|
this.palletListStatistics.palletCount = 0 |
|
|
|
|
|
this.palletListStatistics.boxesCount = 0 |
|
|
|
|
|
this.palletListStatistics.rollCount = 0 |
|
|
|
|
|
this.palletListStatistics.rollsQty = 0 |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.dataList = []; |
|
|
this.dataList = []; |
|
|
|
|
|
// 清空统计数据 |
|
|
|
|
|
this.palletListStatistics.palletCount = 0 |
|
|
|
|
|
this.palletListStatistics.boxesCount = 0 |
|
|
|
|
|
this.palletListStatistics.rollCount = 0 |
|
|
|
|
|
this.palletListStatistics.rollsQty = 0 |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|