Browse Source

新增查看包件二维码

fix_bug_pro20231227
qb 1 year ago
parent
commit
5bab09f7dc
  1. 147
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue
  2. 18
      src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue
  3. 39
      src/views/distribution/inventory/distributionStockArticleFrom.vue

147
src/views/distribution/deliverylist/distributionDeliveryListedt.vue

@ -218,7 +218,9 @@
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps"> </template>
<template #default="slotProps">
<el-text size="small" @click="handleQRCode(slotProps.scope.row)">查看二维码</el-text>
</template>
</tablecmt>
<!-- <div class="avue-crud__pagination" style="width: 100%"> -->
@ -235,6 +237,32 @@
:total="packpage.total"
>
</el-pagination>
<!--
v-model:current-page="currentPage4"
v-model:page-size="pageSize4"
:page-sizes="[100, 200, 300, 400]"
:small="small"
:disabled="disabled"
:background="background"
layout="total, sizes, prev, pager, next, jumper"
:total="400"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
-->
<!-- <el-pagination
align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
</el-pagination> -->
<!-- </div> -->
</el-tab-pane>
@ -545,6 +573,22 @@
</div>
</div>
</el-dialog>
<el-dialog
title="二维码"
:visible.sync="dialogVisibleF"
width="780px"
v-model="dialogVisibleF"
>
<div>
<div v-html="html"></div>
</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 @click="dialogVisibleF = false"> </el-button>
</span>
</el-dialog>
</div>
</basic-container>
</template>
@ -562,6 +606,7 @@ import {
getpackdetail,
getinventorydetail,
} from '@/api/distribution/distributionDeliveryList';
import { showOrderPackgeCode } from '@/api/distribution/distributionStockArticle';
import { update as updatesign, getOneclickq } from '@/api/distribution/distributionSignfor';
import option from '@/option/basic/basicPdarecords';
import { mapGetters } from 'vuex';
@ -585,6 +630,7 @@ export default {
dialogVisibleC: false,
dialogVisibleD: false,
dialogVisibleE: false,
dialogVisibleF: false,
deliveryId: null,
Routid: null,
TCloading: false, //
@ -1214,6 +1260,17 @@ export default {
},
],
wrapoptioncolumn: [
{
prop: '',
label: '复选框',
type: 0,
values: '',
width: '55',
checkarr: [],
fixed: true,
sortable: true,
head: false,
},
{
prop: 'waybillNumber',
label: '运单号',
@ -1510,6 +1567,16 @@ export default {
sortable: true,
head: false,
},
{
prop: '',
label: '操作',
type: 6,
values: '',
width: '200',
checkarr: [],
fixed: 'right',
sortable: false,
},
],
inventoryoptioncolumn: [
{
@ -1794,6 +1861,28 @@ export default {
pageSize: 30,
total: 40,
},
//
wpage: {
currentPage: 1,
pageSize: 30,
total: 40,
},
//
packpage: {
currentPage: 1,
pageSize: 30,
total: 40,
},
ordpage: {
currentPage: 1,
pageSize: 30,
total: 40,
},
inventorypage: {
currentPage: 1,
pageSize: 30,
total: 40,
},
//
form: {},
//
@ -2541,28 +2630,6 @@ export default {
},
],
},
//
wpage: {
currentPage: 1,
pageSize: 30,
total: 40,
},
//
packpage: {
currentPage: 1,
pageSize: 30,
total: 40,
},
ordpage: {
currentPage: 1,
pageSize: 30,
total: 40,
},
inventorypage: {
currentPage: 1,
pageSize: 30,
total: 40,
},
//
data: [],
//
@ -2730,6 +2797,40 @@ export default {
this.page.currentPage = 1;
this.onLoad(this.page);
},
inputsc() {},
timesc() {},
btnsc() {},
selectsc() {},
/**
* 查看二维码
* @param {*} row
*/
handleQRCode(row) {
// this.title = ''
// this.view = true;
// this.box = true;
this.materialQRCode = row;
let qr = {
ids: row.id,
};
showOrderPackgeCode(qr).then(res => {
// this.orderPackageCode = res.data
console.log(res.data);
this.html = '';
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml);
});
this.dialogVisibleF = true;
},
/**
* 打印
*/
printTemplate() {
const orderNodeList = document.querySelectorAll('.el-dialog__body>div>div>div');
print(orderNodeList);
},
handleSubmit() {
this.$refs.form.validate(valid => {
if (valid) {

18
src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue

@ -1186,14 +1186,23 @@ export default {
// , 退
if (!isReturn) return;
//
// ,
if (this.selectionList.length === 1) {
console.log('111>>>>>>>>>>>>>>', this.selectionList[0]);
return this.$router.push(
'/distribution/inventory/distributionStockArticleFrom?id=' + this.selectionList[0].id
);
}
//
const res = await getListOwn(this.page.currentPage, this.page.pageSize, {
stockArticleIds: ids.join(','),
parcelType: '2',
});
// console.log("",res.data.data.records);
lost = res.data.data.records.every(val => {
console.log('val.materialId :>> ', val.materialId);
if (!val.materialId) return false;
return true;
});
@ -1205,13 +1214,6 @@ export default {
);
}
if (this.selectionList.length === 1) {
console.log('111>>>>>>>>>>>>>>', this.selectionList[0]);
return this.$router.push(
'/distribution/inventory/distributionStockArticleFrom?id=' + this.selectionList[0].id
);
}
this.getSock();
},
getSock() {

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

@ -131,8 +131,8 @@ export default {
},
watch: {
//
$route:{
handler(to, form){
$route: {
handler(to, form) {
console.log('to :>> ', to);
console.log('form :>> ', form);
this.init();
@ -140,8 +140,8 @@ export default {
this.onLoad(this.page);
},
deep: true,
immediate: true
}
immediate: true,
},
},
computed: {
...mapGetters(['permission']),
@ -155,19 +155,21 @@ export default {
},
methods: {
async handleTrade() {
if (this.ids.length > 0) {
console.log(this.$route)
const flag = this.selectionList.every(val => val.materialId);
if (!flag) return this.$message.error('有订单物料信息未维护!!!');
console.log(this.$route);
let res = await addStockRow({ids: this.ids});
const {code, msg} = res.data
if(code === 200){
let res = await addStockRow({ ids: this.ids });
const { code, msg } = res.data;
if (code === 200) {
this.$message({
type: 'success',
message: msg
})
message: msg,
});
//
this.$router.go (-1)
this.$router.go(-1);
//
this.contextmenuFlag = false;
this.$store.commit('DEL_TAG_CURRENT');
@ -211,6 +213,8 @@ export default {
this.onLoad(this.page);
},
handleSubmit() {
if (this.selectionList.length === 0) return this.$message.error('最少选择一条数据');
if (!this.form.id) {
add(this.form).then(() => {
this.box = false;
@ -298,6 +302,17 @@ export default {
selectionChange(list) {
this.selectionList = list;
console.log('<><><><><==', list);
lost = list.forEach(val => {
console.log('val.materialId :>> ', val.materialId);
if (!val.materialId) {
this.$message({
type: 'error',
message: `订单${val.orderCode}信息不完整,请完善包件信息!如没有请维护物料信息,在选择!!`,
});
return false;
}
return true;
});
},
selectionClear() {
this.selectionList = [];

Loading…
Cancel
Save