Commit 08ba7d4f authored by 邓春圆's avatar 邓春圆

调仓状态调整,bug修复

parent f04e0b36
...@@ -18,7 +18,12 @@ ...@@ -18,7 +18,12 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('填单货物属性')"> <el-table-column :label="$t('填单货物属性')">
<template v-slot="{row}"> <template v-slot="{row}">
<div>{{$t('品牌')}}:无</div><div>{{$t('箱数')}}{{row.num}}</div><div>{{$t('体积')}}{{ row.volume }}</div><div>{{$t('重量')}}{{row.weight}}Kg</div> <div>{{$t('品牌')}}{{(brandList.find(item => item.id == row.brand) || {}).titleZh}} <span v-if="!row.brand">
{{$t('')}}
</span> </div>
<div>{{$t('箱数')}}{{row.num}}</div>
<div>{{$t('体积')}}{{ row.volume }}m³</div>
<div>{{$t('重量')}}{{row.weight}}Kg</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('入库货物属性')"> <el-table-column :label="$t('入库货物属性')">
...@@ -26,13 +31,18 @@ ...@@ -26,13 +31,18 @@
<div v-for="(item,index) in row.orderWarehouseInBackItemDoList" :key="index"> <div v-for="(item,index) in row.orderWarehouseInBackItemDoList" :key="index">
<div>{{$t('规格')}}{{item.boxGauge.split('*').map(item =>`${item}cm`).join('*')}}</div> <div>{{$t('规格')}}{{item.boxGauge.split('*').map(item =>`${item}cm`).join('*')}}</div>
<div> <div>
<div>{{$t('品牌')}}{{(brandList.find(item => item.id == row.brand) || {}).titleZh}}
<div>{{$t('品牌')}}{{(brandList.find(item => item.id == row.brand) || {}).titleZh}}</div> <span v-if="!row.brand">
{{$t('')}}
</span></div>
<div>{{$t('箱数')}}{{item.cartonsNum}}</div> <div>{{$t('箱数')}}{{item.cartonsNum}}</div>
<div>{{$t('体积')}}{{item.volume}} CMB</div> <div>{{$t('体积')}}{{item.volume}} CMB</div>
<div>{{$t('重量')}}{{item.weight}}KG</div> <div>{{$t('重量')}}{{item.weight}}KG</div>
</div> </div>
</div> </div>
<p v-if="row.orderWarehouseInBackItemDoList.length === 0">
{{$t('暂无货物入库信息')}}
</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('最后操作时间')"> <el-table-column :label="$t('最后操作时间')">
...@@ -42,7 +52,7 @@ ...@@ -42,7 +52,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('状态')"> <el-table-column :label="$t('状态')">
<template v-slot="{row}"> <template v-slot="{row}">
{{calculationStatus(row.cartonsNumDiff)}} {{calculationStatus(row)}}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -265,13 +275,19 @@ export default { ...@@ -265,13 +275,19 @@ export default {
}, },
calculationStatus(){ calculationStatus(){
return (val)=>{ return (val)=>{
if(val > 0){ let des = ''
return `${this.$t('多')}${val}${this.$t('箱')}` switch (val.diffType) {
}else if(val < 0){ case 2 :
return `${this.$t('少')}${Math.abs(val)}${this.$t('箱')}` des = `${this.$t('多了')}${val.cartonsNumDiff}${this.$t('箱')}`
}else { break
return this.$t('准确到齐') case 3 :
des = `${this.$t('少了')}${val.cartonsNumDiff}${this.$t('箱')}`
break
case 4 :
des = this.$t('准确到齐')
break
} }
return des
} }
} }
}, },
...@@ -373,11 +389,13 @@ export default { ...@@ -373,11 +389,13 @@ export default {
volume += Number(i.volume) volume += Number(i.volume)
num += Number(i.num) num += Number(i.num)
weight += Number(i.weight) weight += Number(i.weight)
if(i.orderWarehouseInBackItemDoList){
i.orderWarehouseInBackItemDoList.forEach(m => { i.orderWarehouseInBackItemDoList.forEach(m => {
Wvolume += Number(m.volume || 0) Wvolume += Number(m.volume || 0)
Wnum += Number(m.cartonsNum || 0) Wnum += Number(m.cartonsNum || 0)
Wweight += Number(m.weight || 0) Wweight += Number(m.weight || 0)
}) })
}
}) })
let text = `${this.$t('下单统计')}:${num}${this.$t('箱')} ${volume.toFixed(2)}m³ ${weight.toFixed(2)}Kg` let text = `${this.$t('下单统计')}:${num}${this.$t('箱')} ${volume.toFixed(2)}m³ ${weight.toFixed(2)}Kg`
let text2 =` ${this.$t('入仓统计')}:${Wnum}${this.$t('箱')} ${Wvolume.toFixed(2)}m³ ${Wweight.toFixed(2)}Kg` let text2 =` ${this.$t('入仓统计')}:${Wnum}${this.$t('箱')} ${Wvolume.toFixed(2)}m³ ${Wweight.toFixed(2)}Kg`
......
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