|
|
|
@ -249,7 +249,7 @@
|
|
|
|
|
</div> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
<el-tab-pane label="库存品" name="enter"> |
|
|
|
|
<el-button type="primary" text icon="el-icon-view" >批量打印</el-button> |
|
|
|
|
<el-text type="primary" text icon="el-icon-view" @click="handleBatchDetail('2')">批量打印</el-text> |
|
|
|
|
<el-table |
|
|
|
|
ref="table" |
|
|
|
|
v-loading="loading" |
|
|
|
@ -259,6 +259,12 @@
|
|
|
|
|
style="width: 100%" |
|
|
|
|
:border="option.border" |
|
|
|
|
> |
|
|
|
|
<el-table-column |
|
|
|
|
type="selection" |
|
|
|
|
v-if="option.selection" |
|
|
|
|
width="55" |
|
|
|
|
align="center" |
|
|
|
|
></el-table-column> |
|
|
|
|
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column> |
|
|
|
|
<el-table-column |
|
|
|
|
v-if="option.index" |
|
|
|
@ -342,12 +348,41 @@
|
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog title="包条码" :visible.sync="dialogPack" width="780px" v-model="dialogPack"> |
|
|
|
|
<div > |
|
|
|
|
<span>lmy 666</span> |
|
|
|
|
<el-text type="primary" icon="el-icon-view" @click="handleBatchDetail('1')">批量打印</el-text> |
|
|
|
|
|
|
|
|
|
<tablecmt |
|
|
|
|
:columnList="columnInventoryBatch" |
|
|
|
|
:tableData="packageCodeList" |
|
|
|
|
:loading="loading" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
|
|
|
|
|
<el-text type="primary" text icon="el-icon-view" @click="handlePrintDetail(slotProps.scope.row)">打印</el-text> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
|
|
|
|
|
|
<div class="avue-crud__pagination" style="width:100%"> |
|
|
|
|
<!-- 分页模块 --> |
|
|
|
|
<el-pagination align="right" |
|
|
|
|
background |
|
|
|
|
@size-change="sizeChange" |
|
|
|
|
@current-change="currentChange" |
|
|
|
|
:current-page="page2.currentPage" |
|
|
|
|
:page-sizes="[30, 50,80, 120]" |
|
|
|
|
:page-size="page2.pageSize" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="page2.total"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<!-- <el-button type="primary" @click="ddd">导 出</el-button>--> |
|
|
|
|
<el-button type="primary" @click="printTemplate">打 印</el-button> |
|
|
|
|
<!-- <el-button type="primary" @click="printTemplate">打 印</el-button>--> |
|
|
|
|
<el-button type="primary" @click="dialogPack = false">确 定</el-button> |
|
|
|
|
<el-button @click="dialogPack = false">取 消</el-button> |
|
|
|
|
</span> |
|
|
|
@ -419,20 +454,110 @@ import option from '@/option/distribution/distributionStockup';
|
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
|
|
|
import { getParcelListOwn, getParcelListOwnSelf } from '@/api/distribution/distributionParcelList'; |
|
|
|
|
import { getDisStockList } from '@/api/distribution/disStockListDetail' |
|
|
|
|
import { getDisStockList, getPrintDetail } from '@/api/distribution/disStockListDetail'; |
|
|
|
|
import { stockUp } from '@/api/basicdata/basicdataGoodsArea'; |
|
|
|
|
import { getStockDetail } from '@/api/distribution/distributionStock'; |
|
|
|
|
import { getStockTemplate, showOrderPackgeCode } from '@/api/distribution/distributionStockArticle'; |
|
|
|
|
import { getLodop } from '@/utils/LodopFuncs'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
html: null, // 页面包条码内容 |
|
|
|
|
html: '', // 页面包条码内容 |
|
|
|
|
dialogVisible: false, //二维码控制 |
|
|
|
|
dialogPack: false, //包件控制 |
|
|
|
|
height: 0, |
|
|
|
|
activeName: 'reservation', |
|
|
|
|
packageCodeList: [], |
|
|
|
|
columnInventoryBatch:[ |
|
|
|
|
{ |
|
|
|
|
prop: '', |
|
|
|
|
label: '序号', |
|
|
|
|
type: 0, |
|
|
|
|
values: '', |
|
|
|
|
width: 55, |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'sku', |
|
|
|
|
label: 'SKU', |
|
|
|
|
type: 1, |
|
|
|
|
values: '', |
|
|
|
|
width: '150', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: true, |
|
|
|
|
sortable: true, |
|
|
|
|
head: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'orderCode', |
|
|
|
|
label: '订单编号', |
|
|
|
|
type: 1, |
|
|
|
|
values: '', |
|
|
|
|
width: '150', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
sortable: true, |
|
|
|
|
head: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'descriptionGoods', |
|
|
|
|
label: '物料名称', |
|
|
|
|
type: 1, |
|
|
|
|
values: '', |
|
|
|
|
width: '150', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
sortable: true, |
|
|
|
|
head: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'cargoUnit', |
|
|
|
|
label: '单位', |
|
|
|
|
type: 1, |
|
|
|
|
values: '', |
|
|
|
|
width: '100', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
sortable: true, |
|
|
|
|
head: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'stockPackageCode', |
|
|
|
|
label: '包条码', |
|
|
|
|
type: 1, |
|
|
|
|
values: '', |
|
|
|
|
width: '150', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
sortable: true, |
|
|
|
|
head: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'brandName', |
|
|
|
|
label: '品牌', |
|
|
|
|
type: 1, |
|
|
|
|
values: '', |
|
|
|
|
width: '150', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: false, |
|
|
|
|
sortable: true, |
|
|
|
|
head: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: '', |
|
|
|
|
label: '操作', |
|
|
|
|
type: 6, |
|
|
|
|
values: '', |
|
|
|
|
width: '230', |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: 'right', |
|
|
|
|
hide: true, |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
// 弹框标题 |
|
|
|
|
title: '', |
|
|
|
|
// 是否展示弹框 |
|
|
|
@ -535,20 +660,169 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//查询库存包件明细 |
|
|
|
|
showdrawer(value){ |
|
|
|
|
this.drawerShow=value |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
* 弹窗的勾选回调,用于更改头部数组 |
|
|
|
|
* 固定搭配,只需要更换 columnList |
|
|
|
|
*/ |
|
|
|
|
setnewcolum(newarr, headarr,type) { |
|
|
|
|
// console.log(newarr,'+++++++++++') |
|
|
|
|
if(type==1){ |
|
|
|
|
this.columnList = newarr; |
|
|
|
|
this.$functions.setStorage(window.location.pathname+'checkList', headarr); |
|
|
|
|
}else if(type==2){ |
|
|
|
|
this.columnList = newarr; |
|
|
|
|
this.$functions.setStorage(window.location.pathname+'flexList', headarr); |
|
|
|
|
}else if(type==3){ |
|
|
|
|
this.columnList = newarr; |
|
|
|
|
this.$functions.setStorage(window.location.pathname+'sortlist', headarr); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
selectionsc(value) { |
|
|
|
|
console.log(value); |
|
|
|
|
}, |
|
|
|
|
delectsolt(scope) { |
|
|
|
|
const { row } = scope; |
|
|
|
|
console.log(row); |
|
|
|
|
}, |
|
|
|
|
editsolt(scope) { |
|
|
|
|
const { row } = scope; |
|
|
|
|
console.log(row); |
|
|
|
|
}, |
|
|
|
|
btnsc(index, row) { |
|
|
|
|
console.log(index, row); |
|
|
|
|
}, |
|
|
|
|
selectsc(index, row) { |
|
|
|
|
console.log(index, row); |
|
|
|
|
// if(row.prop =='typeServiceName'){ |
|
|
|
|
// this.query['typeService'] = index; |
|
|
|
|
// }else if(row.prop =='stockupStatusName'){ |
|
|
|
|
// this.query["stockupStatus"] = index; |
|
|
|
|
// }else if(row.prop =='assignStatusName'){ |
|
|
|
|
// this.query["assignStatus"] = index; |
|
|
|
|
// }else{ |
|
|
|
|
// this.query[row.prop] = index; |
|
|
|
|
// } |
|
|
|
|
// // this.query[row.prop] = index; |
|
|
|
|
// this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
timesc(index, row) { |
|
|
|
|
console.log(index, row); |
|
|
|
|
if (!!index){ |
|
|
|
|
index = dayjs(index).format('YYYY-MM-DD'); |
|
|
|
|
} |
|
|
|
|
this.query[row.prop] = index |
|
|
|
|
if (!index){ |
|
|
|
|
delete this.query[row.prop] |
|
|
|
|
} |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
inputsc(index, row) { |
|
|
|
|
console.log(index, row); |
|
|
|
|
/* if(row.prop =='typeServiceName'){ |
|
|
|
|
this.query['typeService'] = index; |
|
|
|
|
}else if(row.prop =='stockupStatusName'){ |
|
|
|
|
this.query["stockupStatus"] = index; |
|
|
|
|
}else if(row.prop =='assignStatusName'){ |
|
|
|
|
this.query["assignStatus"] = index; |
|
|
|
|
}else{ |
|
|
|
|
this.query[row.prop] = index; |
|
|
|
|
}*/ |
|
|
|
|
this.query[row.prop] = index; |
|
|
|
|
|
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
//批量打印 |
|
|
|
|
handleBatchDetail(type){ |
|
|
|
|
console.log("selectionList",this.selectionList); |
|
|
|
|
if(this.selectionList.length == 0){ |
|
|
|
|
this.$message.warning("至少选择一条数据!!") |
|
|
|
|
return ; |
|
|
|
|
} |
|
|
|
|
if(type== '1'){ |
|
|
|
|
//包条码批量 |
|
|
|
|
let checkcode=[] |
|
|
|
|
this.selectionList.map(item=>{ |
|
|
|
|
console.log("item>>>",item); |
|
|
|
|
checkcode.push(item.id) |
|
|
|
|
}) |
|
|
|
|
let qr = { |
|
|
|
|
ids: checkcode.join(','), |
|
|
|
|
type: "2" |
|
|
|
|
}; |
|
|
|
|
getPrintDetail(qr).then( res =>{ |
|
|
|
|
console.log(",./"); |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
this.html='' |
|
|
|
|
this.html=this.getHtmls(res.data.data.dataList,res.data.data.templateHtml) |
|
|
|
|
}) |
|
|
|
|
}else if(type== '2'){ |
|
|
|
|
//包条码批量 |
|
|
|
|
let myMap = []; |
|
|
|
|
this.selectionList.map(item=>{ |
|
|
|
|
if(!!item.stocklist){ |
|
|
|
|
myMap.push(item.stocklist); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
let qr = { |
|
|
|
|
ids: myMap.join(","), |
|
|
|
|
type: "3" |
|
|
|
|
}; |
|
|
|
|
console.log("><><>>",qr); |
|
|
|
|
//库存品订单批量 |
|
|
|
|
getPrintDetail(qr).then( res =>{ |
|
|
|
|
// console.log(",./"); |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
this.html='' |
|
|
|
|
this.html=this.getHtmls(res.data.data.dataList,res.data.data.templateHtml) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//单独打印 |
|
|
|
|
handlePrintDetail(row){ |
|
|
|
|
console.log("单个答应》》》",row); |
|
|
|
|
row.type = "1"; |
|
|
|
|
getPrintDetail(row).then( res =>{ |
|
|
|
|
console.log(",./"); |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
this.html='' |
|
|
|
|
this.html=this.getHtmls(res.data.data.dataList,res.data.data.templateHtml) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
onDetail(row){ |
|
|
|
|
// |
|
|
|
|
this.selectionList = []; |
|
|
|
|
console.log("row>><><><",row); |
|
|
|
|
this.dialogPack = true; |
|
|
|
|
console.log("row>>>",row); |
|
|
|
|
//查询信息 |
|
|
|
|
let po = { |
|
|
|
|
stockListId: row.stockListId, |
|
|
|
|
reservationId: row.billLadingId, |
|
|
|
|
reservationId: row.reservationId, |
|
|
|
|
} |
|
|
|
|
let s =[]; |
|
|
|
|
getDisStockList(po).then( res =>{ |
|
|
|
|
console.log("res>>>>库存包件码",res.data.data); |
|
|
|
|
res.data.data.forEach(i => { |
|
|
|
|
if(!!i){ |
|
|
|
|
let a = {}; |
|
|
|
|
a.sku = i.sku; |
|
|
|
|
a.id = i.id; |
|
|
|
|
a.orderCode = i.orderCode; |
|
|
|
|
a.descriptionGoods = i.descriptionGoods; |
|
|
|
|
a.cargoUnit = i.cargoUnit; |
|
|
|
|
a.stockPackageCode = i.stockPackageCode; |
|
|
|
|
a.brandName = i.brandName; |
|
|
|
|
a.stockListId = i.stockListId; |
|
|
|
|
a.reservationId = i.reservationId; |
|
|
|
|
s.push(a); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.packageCodeList = s; |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//打印 |
|
|
|
|
printTemplate() { |
|
|
|
|