Browse Source

修改库存品打印

fix_bug_pro20231227
caoyizhong 1 year ago
parent
commit
d950a5539e
  1. 15
      src/api/distribution/disStockListDetail.js
  2. 265
      src/views/distribution/stockup/distributionStockupDetails.vue

15
src/api/distribution/disStockListDetail.js

@ -22,6 +22,21 @@ export const getDisStockList = (params) => {
})
}
/**
* 库存品打印模板
* @param params
* @returns {AxiosPromise}
*/
export const getPrintDetail = (params) => {
return request({
url: '/api/logpm-distribution/disStockListDetail/getPrintDetail',
method: 'get',
params: {
...params,
}
})
}
export const getDetail = (id) => {
return request({
url: '/api/logpm-distribution/disStockListDetail/detail',

265
src/views/distribution/stockup/distributionStockupDetails.vue

@ -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();
},

Loading…
Cancel
Save