Browse Source

异常包件二维码修复

dev-xx
马远东 5 months ago
parent
commit
463391c057
  1. 8
      src/api/distribution/distributionDeliveryList.js
  2. 4
      src/option/basicdata/basicdataVehicleInfo.js
  3. 29
      src/option/distribution/DeliveryExceptionReview.js
  4. 126
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue

8
src/api/distribution/distributionDeliveryList.js

@ -370,6 +370,14 @@ export const $_showInventoryPackgeCode = params => {
params,
});
};
// 异常库存品查看二维码
export const $_showInventoryPackgeCodes = params => {
return request({
url: '/api/logpm-distribution/distributionStockList/showInventoryPackgeCodes',
method: 'get',
params,
});
};
// 驳回
export const $_loadingAbnormalPackageListTurnDown = params => {

4
src/option/basicdata/basicdataVehicleInfo.js

@ -15,9 +15,9 @@ export const columnList = [
fixed: true,
},
{
prop: 'vehicleModelName',
prop: 'vehicleModel',
label: '车辆类型',
type: 3,
type: 2,
values: '',
width: '150',
checkarr: [],

29
src/option/distribution/DeliveryExceptionReview.js

@ -49,7 +49,6 @@ export const AbnormalReview = [
head: false,
},
{
prop: 'orderCode',
label: '订单自编号',
@ -72,6 +71,30 @@ export const AbnormalReview = [
sortable: false,
head: false,
},
{
prop: 'goodsTypeName',
label: '货物类型',
type: 3,
values: '',
width: '100',
checkarr: [
{
label: '订制品',
value: '订制品',
},
{
label: '库存品',
value: '库存品',
},
{
label: '零担',
value: '零担',
},
],
fixed: false,
sortable: false,
head: false,
},
{
prop: 'materialName',
label: '物料名称',
@ -84,7 +107,6 @@ export const AbnormalReview = [
head: false,
},
// {
// prop: 'warehouse',
// label: '仓库',
@ -238,7 +260,7 @@ export const AbnormalReview = [
// checkarr: [],
// fixed: 'right',
// sortable: false,
// },
// {
@ -426,7 +448,6 @@ export const AbnormalReview = [
fixed: false,
sortable: false,
head: false,
},
{

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

@ -778,9 +778,10 @@
:loading="AbnormalReviewloading"
@inputTxt="inputscReservationPackage"
@timeCheck="timescReservationPackage"
@selectCheck="selectscReservationPackage"
@selectCheck="selectAbnormalpackage"
ref="YcwtableBox"
@selection="selectionChange"
:isselectfun="ProhibitSelection"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label == '操作'">
@ -801,17 +802,18 @@
</el-text>
<el-text
@click="Canceldelivery(slotProps.scope.row)"
v-if="slotProps.scope.row.abnormalTypeName == '装车异常'"
>取消</el-text
>
@click="Canceldelivery(slotProps.scope.row)"
v-if="slotProps.scope.row.abnormalTypeName == '装车异常'"
>取消</el-text
>
</div>
<el-text
@click="abnormalViewQRcode(2, slotProps.scope.row)"
style="margin-left: 10px"
type="primary"
text
v-if="slotProps.scope.row.packageCode"
>
查看二维码
</el-text>
@ -894,6 +896,7 @@ import {
printBatch,
$_deliveryZeroPackage,
$_showInventoryPackgeCode,
$_showInventoryPackgeCodes,
$_loadingAbnormalPackageListTurnDown,
$_retentionScan,
$_cancelLoadingAbnormal,
@ -954,6 +957,7 @@ export default {
],
dialogViReject: false, //
RejectRow: {}, //
selectAbnormalpackageList: [], //list
yesOrNo: false,
accessControl: '',
html: '',
@ -3263,32 +3267,25 @@ export default {
},
methods: {
async abnormalViewQRcode(index, row) {
let qr = {};
if (index == 1) {
if (!this.selectionList.length) {
ElMessage({
message: `请勾选要查看二维码的数据`,
type: 'warning',
});
return;
}
qr.ids = this.selectionList.map(res => res.packageId).join(',');
} else {
qr.ids = row.packageId;
}
console.log(row, 'row');
try {
if (index == 1 && !this.checkSelection()) return;
const qr = {};
let res = '';
if (index == 1) {
res = await this.handleIndexOne();
} else {
res = await this.handleNotIndexOne(row);
}
this.AbnormalReviewloading = true;
this.html = '';
const res = await showOrderPackgeCode(qr);
const { code, data } = res.data;
if (code !== 200) return;
if (res.data.code !== 200) return;
for (let i = 0; i < data.moldList.length; i++) {
const element = data.moldList[i];
this.html += element;
}
this.html = res.data.data.moldList.join('');
this.isShowPrint = true; //
} catch (error) {
console.log('error :>> ', error);
@ -3296,6 +3293,51 @@ export default {
this.AbnormalReviewloading = false;
}
},
checkSelection() {
if (!this.selectionList.length) {
ElMessage({
message: '请勾选要查看二维码的数据',
type: 'warning',
});
return false;
}
if (!this.isUniformType()) {
ElMessage({
message: '请勾选同一种类型的数据',
type: 'warning',
});
return false;
}
return true;
},
isUniformType() {
const type = this.selectionList[0].goodsTypeName;
return this.selectionList.every(item => item.goodsTypeName === type);
},
async handleIndexOne() {
const qr = {};
if (this.selectionList[0].goodsTypeName === '订制品') {
qr.ids = this.selectionList.map(res => res.packageId).join(',');
return await showOrderPackgeCode(qr);
} else {
qr.orderPackgeCodes = this.selectionList.map(res => res.packageCode).join(',');
return await $_showInventoryPackgeCodes(qr);
}
},
async handleNotIndexOne(row) {
const qr = {};
if (row.goodsTypeName === '库存品') {
qr.orderPackgeCodes = row.packageCode;
return await $_showInventoryPackgeCodes(qr);
} else {
qr.ids = row.packageId;
return await showOrderPackgeCode(qr);
}
},
//
viewAbnormalLoading(scope) {
console.log(this.$refs.YcwtableBox, '2');
@ -3304,6 +3346,7 @@ export default {
this.AbnormalReviewloading = true; //
console.log(scope, 'scope');
this.abnormalBox = true;
this.AbnormalReview.forEach(item => (item.values = ''));
$_newLoadingAbnormalPackageListDetail(scope.signId)
.then(res => {
console.log(res, '异常审核查询');
@ -3320,6 +3363,7 @@ export default {
}
});
this.AbnormalReviewData = res.data.data;
this.selectAbnormalpackageList = res.data.data; //
})
.catch(res => {
console.log(res, '关闭加载效果');
@ -3702,6 +3746,26 @@ export default {
}
this.getWrapdetails(this.page);
},
//
selectAbnormalpackage(index, row) {
console.log(index, row);
console.log(index, 'indexxx');
if (!index) {
this.AbnormalReviewData = this.selectAbnormalpackageList;
} else {
this.AbnormalReviewData = this.selectAbnormalpackageList.filter(
item => item[row.prop] == row.values
);
}
},
ProhibitSelection(val, index) {
if (val.packageCode) {
return true;
} else {
return false;
}
},
selectscReservationInventoryPackage(index, row) {
console.log(index, row);
if (row.prop === 'stockSignfoStatusName') {
@ -3758,7 +3822,6 @@ export default {
// };
this.html = '';
const res = await showInventoryPackgeCode(row.reservationId, row.id);
const { code, data } = res.data;
if (code !== 200) return;
// this.orderPackageCode = res.data
@ -3860,12 +3923,15 @@ export default {
BatchcancellationAll() {
if (!this.selectionList.length) {
ElMessage({
message: '请勾选要取消的数据,【审核状态】必须为待审核,斌且【异常类型】状态只能为装车异常',
message:
'请勾选要取消的数据,【审核状态】必须为待审核,斌且【异常类型】状态只能为装车异常',
type: 'warning',
});
return;
}
let _state = this.selectionList.every(item => item.auditingStatusName =='待审核' && item.abnormalTypeName == '装车异常' );
let _state = this.selectionList.every(
item => item.auditingStatusName == '待审核' && item.abnormalTypeName == '装车异常'
);
console.log(_state);
if (!_state) {
ElMessage({

Loading…
Cancel
Save