|
|
|
@ -4,34 +4,26 @@
|
|
|
|
|
<div style="width: 100%;position: relative">
|
|
|
|
|
<div style="width: 100%;text-align: center;line-height: 40px;font-size: 20px;font-weight: bold">大连船舶重工集团钢加有限公司</div>
|
|
|
|
|
<div style="width: 100%;text-align: center;line-height: 30px;font-size: 16px;font-weight: bold">配送交接单</div>
|
|
|
|
|
<div style="line-height: 20px">编号: {{ map.bh }}</div>
|
|
|
|
|
<div style="line-height: 20px">船号: {{ map.dcCh }}</div>
|
|
|
|
|
<div class="table-head">
|
|
|
|
|
<span style="width:4%;">序号</span>
|
|
|
|
|
<span style="width:11%;">船号</span>
|
|
|
|
|
<span style="width:9%;">批号</span>
|
|
|
|
|
<span style="width:13%;">托盘表号</span>
|
|
|
|
|
<span style="width:16%;">附件名称</span>
|
|
|
|
|
<span style="width:23.5%;">图号/规格</span>
|
|
|
|
|
<span style="width:9%;">批量</span>
|
|
|
|
|
<span style="width:23%;">图号</span>
|
|
|
|
|
<span style="width:22.5%;">物品名称</span>
|
|
|
|
|
<span style="width:23.5%;">规格</span>
|
|
|
|
|
<span style="width:7%;">材质</span>
|
|
|
|
|
<span style="width:4%;">数量</span>
|
|
|
|
|
<span style="width:10.1%;">入库地点</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="table-content" v-for="(item,index) in map.list">
|
|
|
|
|
<span style="width:4%;text-align: center;">{{ item.jhxh }}</span>
|
|
|
|
|
<span style="width:11%;text-align: center;">{{ item.czbh }}</span>
|
|
|
|
|
<span style="width:9%;text-align: center;">{{ item.ph }}</span>
|
|
|
|
|
<span style="width:13%;text-align: center;">{{ item.tpbh }}</span>
|
|
|
|
|
<span style="width:16%;text-align: center;">{{ item.wpmc }}</span>
|
|
|
|
|
<span style="width:4%;text-align: center;">{{ index+1 }}</span>
|
|
|
|
|
<span style="width:11%;text-align: center;">{{ item.dcCh }}</span>
|
|
|
|
|
<span style="width:9%;text-align: center;">{{ item.dcPl }}</span>
|
|
|
|
|
<span style="width:23%;text-align: center;">{{ item.dcTh }}</span>
|
|
|
|
|
<span style="width:22.5%;text-align: center;">{{ item.wpmc }}</span>
|
|
|
|
|
<span style="width:23.5%;text-align: center;">{{ item.wpgg }}</span>
|
|
|
|
|
<span style="width:7%;text-align: center;">{{ item.wpxh }}</span>
|
|
|
|
|
<span style="width:4%;text-align: center;">{{ item.pssl }}</span>
|
|
|
|
|
<span style="width:10.1%;text-align: center;">{{ item.ckh }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="table-foot" style="border:1px solid">
|
|
|
|
|
<span colspan="3" style="text-align: left;padding-left: 15px;border-right: 0">交货人: {{ map.psry }}</span>
|
|
|
|
|
<span colspan="3" style="text-align: right;margin-left: 100px">
|
|
|
|
|
<span style="margin-left: 25px">日 </span>
|
|
|
|
|
</span>
|
|
|
|
|
<span style="text-align: center"> 合计: </span>
|
|
|
|
|
<span style="text-align: center"> {{ map.count }}</span>
|
|
|
|
|
</div>
|
|
|
|
@ -41,7 +33,7 @@
|
|
|
|
|
<span style="margin-left: 30%">收货人:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="index>0&&((index+1)%2===0)" class="pageEnd"></div>
|
|
|
|
|
<div class="pageEnd"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
@ -59,33 +51,33 @@ export default {
|
|
|
|
|
show(_data){
|
|
|
|
|
//手动按行换页计算
|
|
|
|
|
//每页行数
|
|
|
|
|
const pageSize=7;
|
|
|
|
|
const pageSize=30;
|
|
|
|
|
const tmpData=[]
|
|
|
|
|
const groupData=this.group(_data,(item)=>{
|
|
|
|
|
return item.dcCh
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// for (const item of _data) {
|
|
|
|
|
// if (item.list.length>pageSize){
|
|
|
|
|
// const _arr=this.sliceToPage(item.list,pageSize);
|
|
|
|
|
// for (const _item of _arr) {
|
|
|
|
|
// const tmpItem=JSON.parse(JSON.stringify(item))
|
|
|
|
|
// tmpItem.list=_item
|
|
|
|
|
// const o=pageSize-_item.length
|
|
|
|
|
// for(let i=0;i<o;i++){
|
|
|
|
|
// _item.push({})
|
|
|
|
|
// }
|
|
|
|
|
// tmpData.push(tmpItem)
|
|
|
|
|
// }
|
|
|
|
|
// }else{
|
|
|
|
|
// const o=pageSize-item.list.length
|
|
|
|
|
// for(let i=0;i<o;i++){
|
|
|
|
|
// item.list.push({})
|
|
|
|
|
// }
|
|
|
|
|
// tmpData.push(item)
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
tmpData.push({})
|
|
|
|
|
Object.keys(groupData).forEach(key=>{
|
|
|
|
|
const item=groupData[key]
|
|
|
|
|
const map={
|
|
|
|
|
dcCh:key.replaceAll('"',''),
|
|
|
|
|
list:item,
|
|
|
|
|
count:item.length
|
|
|
|
|
}
|
|
|
|
|
tmpData.push(map)
|
|
|
|
|
})
|
|
|
|
|
this.data=tmpData
|
|
|
|
|
this.$emit('showPrintComp')
|
|
|
|
|
},
|
|
|
|
|
group(list, fn){
|
|
|
|
|
const groups = {};
|
|
|
|
|
list.forEach(function (o) {
|
|
|
|
|
const group = JSON.stringify(fn(o));
|
|
|
|
|
groups[group] = groups[group] || [];
|
|
|
|
|
groups[group].push(o);
|
|
|
|
|
});
|
|
|
|
|
return groups;
|
|
|
|
|
},
|
|
|
|
|
sliceToPage(data,len){
|
|
|
|
|
let index=0,_newArr=[]
|
|
|
|
|
while (index<data.length){
|
|
|
|
|