Browse Source

修复库存品打印

dev-xx
qb 11 months ago
parent
commit
ccadaf52f5
  1. 61
      src/views/distribution/inventory/distributionStockArticleFrom.vue
  2. 36
      src/views/distribution/inventory/distributionStockListDetails.vue

61
src/views/distribution/inventory/distributionStockArticleFrom.vue

@ -1,5 +1,5 @@
<template>
<basic-container>
<basic-container v-loading="loadingObj.pageLoading">
<div class="avue-crud">
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
@ -127,8 +127,8 @@ export default {
this.loading = true;
this.query.stockArticleId = this.$route.query.id;
this.query.conditions = '1';
this.query.isLoading=0;
this.query.isSigning=0;
this.query.isLoading = 0;
this.query.isSigning = 0;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
this.page.total = data.total;
@ -137,6 +137,9 @@ export default {
this.selectionClear();
});
}, 10),
loadingObj: {
pageLoading: false,
},
};
},
watch: {
@ -165,31 +168,39 @@ export default {
},
methods: {
async handleTrade() {
if (this.ids.length > 0) {
const flag = this.selectionList.every(val => val.materialId);
if (!flag) return this.$message.error('有订单物料信息未维护!!!');
try {
this.loadingObj.pageLoading = true;
console.log(this.$route);
if (this.ids.length > 0) {
const flag = this.selectionList.every(val => val.materialId);
if (!flag) return this.$message.error('有订单物料信息未维护!!!');
let res = await addStockRow({ ids: this.ids });
const { code, msg } = res.data;
if (code === 200) {
this.$message({
type: 'success',
message: msg,
});
//
this.$router.go(-1);
//
this.contextmenuFlag = false;
this.$store.commit('DEL_TAG_CURRENT');
console.log(this.$route);
let res = await addStockRow({ ids: this.ids });
const { code, msg } = res.data;
if (code === 200) {
this.$message({
type: 'success',
message: msg,
});
//
this.$router.go(-1);
//
this.contextmenuFlag = false;
this.$store.commit('DEL_TAG_CURRENT');
}
// console.log('>>>>===', a.data);
// if (a.data.success) {
// this.onLoad(this.page);
// }
} else {
this.$message.warning('请选择需要转的包件信息!!!');
}
// console.log('>>>>===', a.data);
// if (a.data.success) {
// this.onLoad(this.page);
// }
} else {
this.$message.warning('请选择需要转的包件信息!!!');
} catch (error) {
console.log('error :>> ', error);
} finally {
this.loadingObj.pageLoading = false;
}
},
//

36
src/views/distribution/inventory/distributionStockListDetails.vue

@ -1,6 +1,6 @@
<template>
<basic-container>
<div class="avue-crud">
<div class="avue-crud" v-loading="loadingObj.pageLoading">
<!-- <el-row v-if="!search" style="padding:6px 18px">-->
<!-- 查询模块 -->
<el-form :model="queryOwn" label-width="80px">
@ -617,6 +617,9 @@ export default {
data2: [],
data3: [],
leibiao: '',
loadingObj: {
pageLoading: false,
},
};
},
mounted() {
@ -628,7 +631,7 @@ export default {
// console.log(newVal, oldVal);
if (this.$route.path !== '/distribution/inventory/distributionStockListDetails') return;
this.activeName = 'library';
this.query = {}
this.query = {};
this.init();
},
deep: true,
@ -647,22 +650,23 @@ export default {
},
methods: {
//
handleInventoryQRCode(scope) {
const { row } = scope;
async handleInventoryQRCode({ row }) {
console.log('执行查看二维码------------>row:', row);
this.materialQRCode = row;
console.log('---------------->', row);
let qr = {
ids: row.id,
};
this.html = '';
showInventorySourcePackageCode(row.incomingBatch, row.parcelListId).then(res => {
// this.orderPackageCode = res.data
console.log(res.data);
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml);
});
this.dialogVisibleF = true;
try {
this.loadingObj.pageLoading = true;
let res = await showInventorySourcePackageCode(row.incomingBatch, row.parcelListId);
this.html = '';
const { code, data } = res.data;
if (code !== 200) return;
this.html = this.getHtmls(data.dataList, data.templateHtml);
this.dialogVisibleF = true;
} catch (error) {
console.log('error :>> ', error);
} finally {
this.loadingObj.pageLoading = false;
}
},
revokeFn(val) {
ElMessageBox.confirm('撤销物料会产生库存数量扣减,是否继续?', 'Warning', {

Loading…
Cancel
Save