|
|
|
@ -82,7 +82,7 @@
|
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<el-text type="primary" text icon="el-icon-view" v-if="!slotProps.scope.row.stockupStatus" @click="handleStockUp(slotProps.scope.row,'2')">备货</el-text> |
|
|
|
|
<el-text type="primary" text icon="el-icon-view" v-if="!slotProps.scope?.row?.stockupStatus" @click="handleStockUp(slotProps.scope.row,'2')">备货</el-text> |
|
|
|
|
<el-button type="primary" text icon="el-icon-view" @click="handleQRCode(row)">查看包条码</el-button> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
@ -103,7 +103,10 @@
|
|
|
|
|
</div> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
<el-tab-pane label="库存品" name="enter"> |
|
|
|
|
<tablecmt |
|
|
|
|
|
|
|
|
|
<el-text type="primary" text icon="el-icon-view" @click="handleBatchDetail('2')">批量打印</el-text> |
|
|
|
|
|
|
|
|
|
<tablecmt |
|
|
|
|
:columnList="columnListarrs.columnInventory" |
|
|
|
|
:tableData="data2" |
|
|
|
|
:loading="loading" |
|
|
|
@ -112,8 +115,9 @@
|
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
|
|
|
|
|
<el-text type="primary" text icon="el-icon-view" @click="handleDetail(slotProps.scope.row)">明细</el-text> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
@ -136,13 +140,47 @@
|
|
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
<el-dialog title="包条码" :visible.sync="dialogPack" width="780px" v-model="dialogPack"> |
|
|
|
|
<div > |
|
|
|
|
<span>lmy 666</span> |
|
|
|
|
<el-dialog title="包条码" :visible.sync="dialogPack" width="1050px" v-model="dialogPack"> |
|
|
|
|
|
|
|
|
|
<el-text type="primary" icon="el-icon-view" @click="handleBatchDetail('1')">批量打印</el-text> |
|
|
|
|
|
|
|
|
|
<tablecmt |
|
|
|
|
:columnList="columnListarrs.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> |
|
|
|
|
|
|
|
|
|
<!-- <div v-for="item in packageCodeList">--> |
|
|
|
|
<!-- <span>{{item}}</span>--> |
|
|
|
|
<!-- </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> |
|
|
|
@ -250,6 +288,7 @@ import { getStockDetail } from '@/api/distribution/distributionStock';
|
|
|
|
|
import { getStockTemplate, showOrderPackgeCode } from '@/api/distribution/distributionStockArticle'; |
|
|
|
|
import { getLodop } from '@/utils/LodopFuncs'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
import { getDisStockList,getPrintDetail } from '@/api/distribution/disStockListDetail'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data () { |
|
|
|
@ -581,6 +620,15 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
columnInventory:[ |
|
|
|
|
{ |
|
|
|
|
prop: '', |
|
|
|
|
label: '序号', |
|
|
|
|
type: 0, |
|
|
|
|
values: '', |
|
|
|
|
width: 55, |
|
|
|
|
checkarr: [], |
|
|
|
|
fixed: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
prop: 'sku', |
|
|
|
|
label: 'SKU', |
|
|
|
@ -713,6 +761,94 @@ export default {
|
|
|
|
|
hide: true, |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
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, |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
height: 0, |
|
|
|
@ -785,6 +921,7 @@ export default {
|
|
|
|
|
trade:false, // 商 |
|
|
|
|
municipal:true, // 市 |
|
|
|
|
taker:true, // 自提 |
|
|
|
|
packageCodeList: [], // 自提 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted () { |
|
|
|
@ -820,11 +957,88 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//批量打印 |
|
|
|
|
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=>{ |
|
|
|
|
checkcode.push(item.id) |
|
|
|
|
}) |
|
|
|
|
let qr = { |
|
|
|
|
ids: checkcode.join(','), |
|
|
|
|
type: "2" |
|
|
|
|
}; |
|
|
|
|
getPrintDetail(qr).then( res =>{ |
|
|
|
|
console.log(",./"); |
|
|
|
|
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.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.html='' |
|
|
|
|
this.html=this.getHtmls(res.data.data.dataList,res.data.data.templateHtml) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//查看库存品明细 |
|
|
|
|
handleDetail(row){ |
|
|
|
|
console.log("row>><><><",row); |
|
|
|
|
this.dialogPack = true; |
|
|
|
|
|
|
|
|
|
//查询信息 |
|
|
|
|
let po = { |
|
|
|
|
stockListId: row.stockListId, |
|
|
|
|
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.orderCode = i.orderCode; |
|
|
|
|
a.descriptionGoods = i.descriptionGoods; |
|
|
|
|
a.cargoUnit = i.cargoUnit; |
|
|
|
|
a.stockPackageCode = i.stockPackageCode; |
|
|
|
|
a.brandName = i.brandName; |
|
|
|
|
s.push(a); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.packageCodeList = s; |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
showdrawer(value){ |
|
|
|
|
this.drawerShow=value |
|
|
|
@ -1307,21 +1521,30 @@ export default {
|
|
|
|
|
//查询包件列表 |
|
|
|
|
async getStockUpParcelsList(page){ |
|
|
|
|
let a = await getParcelListOwn(page.currentPage,page.pageSize,{id :this.$route.query.id}); |
|
|
|
|
console.log("包件...",a.data); |
|
|
|
|
const data = a.data.data; |
|
|
|
|
this.data1 = data.records; |
|
|
|
|
if(this.data1.length > 0){ |
|
|
|
|
this.data1.forEach(i =>{ |
|
|
|
|
if(!i.stockupStatus){ |
|
|
|
|
i.stockupStatusName = "待备货"; |
|
|
|
|
this.isStockUp = true; |
|
|
|
|
}else{ |
|
|
|
|
i.stockupStatusName = "已备货"; |
|
|
|
|
// console.log("包件...",a.data.data); |
|
|
|
|
const data = a.data.data; |
|
|
|
|
if(data.records.length > 0){ |
|
|
|
|
// console.log("数据》《》《",data.records[0]); |
|
|
|
|
if(!!data.records[0]){ |
|
|
|
|
this.data1 = data.records; |
|
|
|
|
// console.log("数据》《》《》",this.data1); |
|
|
|
|
if(this.data1[0] != null ){ |
|
|
|
|
this.data1.forEach(i =>{ |
|
|
|
|
if(i != null ){ |
|
|
|
|
console.log("><><><>>>",i); |
|
|
|
|
if(!i.stockupStatus){ |
|
|
|
|
i.stockupStatusName = "待备货"; |
|
|
|
|
this.isStockUp = true; |
|
|
|
|
}else{ |
|
|
|
|
i.stockupStatusName = "已备货"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.page1.total = a.data.data.total; |
|
|
|
|
this.page1.total = a.data.data.total; |
|
|
|
|
} |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}, |
|
|
|
|