From ad9929c872435731736ca4a0b555faa41fedca4b Mon Sep 17 00:00:00 2001
From: xzg <4727863@qq.com>
Date: Fri, 7 Jun 2024 17:45:02 +0800
Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=8F=90=E5=A2=9E=E5=8A=A0=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../inventory/distrilbutionBillLading.vue | 140 +++++++++++-------
.../inventory/distrilbutionBillLadingView.vue | 37 ++++-
2 files changed, 122 insertions(+), 55 deletions(-)
diff --git a/src/views/distribution/inventory/distrilbutionBillLading.vue b/src/views/distribution/inventory/distrilbutionBillLading.vue
index 24621a63..d0bc7435 100644
--- a/src/views/distribution/inventory/distrilbutionBillLading.vue
+++ b/src/views/distribution/inventory/distrilbutionBillLading.vue
@@ -668,6 +668,7 @@ export default {
PackageCheckList:[],//包件勾选的数据
tabletit: '', //记录当前点击的标题栏
multifunctional: '', //编辑订单搜索
+ PackageState:[],//包件字典
dialogImg: false,
Imgurl: undefined,
Selfpickuploading: false, //页面加载
@@ -1753,7 +1754,7 @@ export default {
{
label: '创建时间',
prop: 'createTime',
- type: 4,
+ type: 1,
values: '',
width: '180',
checkarr: [],
@@ -1764,7 +1765,7 @@ export default {
{
label: '仓库',
prop: 'warehouse',
- type: 2,
+ type: 1,
values: '',
width: '150',
checkarr: [],
@@ -1775,7 +1776,7 @@ export default {
{
label: '包条码',
prop: 'orderPackageCode',
- type: 2,
+ type: 1,
values: '',
width: '150',
checkarr: [],
@@ -1786,7 +1787,7 @@ export default {
{
label: '货位信息',
prop: 'goodsAllocation',
- type: 2,
+ type: 1,
values: '',
width: '150',
checkarr: [],
@@ -1797,7 +1798,7 @@ export default {
{
label: '所在托盘',
prop: 'pallet',
- type: 2,
+ type: 1,
values: '',
width: '150',
checkarr: [],
@@ -1805,10 +1806,22 @@ export default {
sortable: true,
head: false,
},
+ {
+ label: '包件状态',
+ prop: 'orderPackageStatus',
+ type: 1,
+ values: '',
+ width: '150',
+ checkarr: [],
+ fixed: false,
+ sortable: true,
+ head: false,
+ },
+
{
label: '一级品',
prop: 'firsts',
- type: 2,
+ type: 1,
values: '',
width: '150',
checkarr: [],
@@ -1819,7 +1832,7 @@ export default {
{
label: '二级品',
prop: 'second',
- type: 2,
+ type:1,
values: '',
width: '150',
checkarr: [],
@@ -1830,7 +1843,7 @@ export default {
{
label: '三级品',
prop: 'thirdProduct',
- type: 2,
+ type: 1,
values: '',
width: '150',
checkarr: [],
@@ -1841,7 +1854,7 @@ export default {
{
label: '物料',
prop: 'materialName',
- type: 2,
+ type: 1,
values: '',
width: '150',
checkarr: [],
@@ -1863,7 +1876,7 @@ export default {
{
label: '车次号',
prop: 'trainNumber',
- type: 2,
+ type: 1,
values: '',
width: '150',
checkarr: [],
@@ -2453,6 +2466,16 @@ export default {
console.log('res :>> ', res);
console.log(res.data.data.records, '获取到的包件');
const data = res.data.data;
+ if(res.data.code ==200){
+ if(res.data && res.data.data.records?.length){
+ console.log(this.PackageState,'包件状态');
+ res.data.data.records.forEach(item=>{
+ if(item.orderPackageStatus){
+ item.orderPackageStatus= this.PackageState.find(res=>res.dictKey == item.orderPackageStatus).dictValue
+ }
+ })
+ }
+ }
this.order.total = data.total;
this.order.orderDetails = data.records;
const _node = await document.querySelector('.orderChooseTable');
@@ -2462,15 +2485,15 @@ export default {
console.log(this.order.orderDetails,'当前列表的参数');
console.log(this.PackageCheckList,'当前勾选参数集合【去重过】');
//全部勾选的数据
-let uncheckedIds = this.Unchecked.map(item => item.id);
-// 过滤掉 _aa 中未勾选的项
-this.PackageCheckList = this.PackageCheckList.filter(a => !uncheckedIds.includes(a.id));
-let _check =await this.order.orderDetails.filter(({ id }) => new Set(this.PackageCheckList.map(({ id }) => id)).has(id));
-console.log(this.order.selectList,'当前勾选的LIST');
-console.log(this.order.orderDetails,'当前获得数据LIST');
-console.log(this.PackageCheckList,'所有勾选的LIST');
-console.log(_check,'筛选出来的参数');
- if(_check.length){
+ let uncheckedIds = this.Unchecked.map(item => item.id);
+ // 过滤掉 _aa 中未勾选的项
+ this.PackageCheckList = this.PackageCheckList.filter(a => !uncheckedIds.includes(a.id));
+ let _check =await this.order.orderDetails.filter(({ id }) => new Set(this.PackageCheckList.map(({ id }) => id)).has(id));
+ console.log(this.order.selectList,'当前勾选的LIST');
+ console.log(this.order.orderDetails,'当前获得数据LIST');
+ console.log(this.PackageCheckList,'所有勾选的LIST');
+ console.log(_check,'筛选出来的参数');
+ if(_check.length){
this.$refs.orderChooseTable.handleCheckSelect(_check);
}else{
this.$refs.orderChooseTable.handleCheckSelect(data.records);
@@ -2507,9 +2530,20 @@ console.log(_check,'筛选出来的参数');
...params,
...this.order.query,
}).then(async res => {
+ console.log(res,'当前包件列表');
if(res.data.code !=200){
return
}
+ if(res.data.code ==200){
+ if(res.data && res.data.data.records?.length){
+ console.log(this.PackageState,'包件状态');
+ res.data.data.records.forEach(item=>{
+ if(item.orderPackageStatus){
+ item.orderPackageStatus= this.PackageState.find(res=>res.dictKey == item.orderPackageStatus).dictValue
+ }
+ })
+ }
+ }
console.log('res :>> ', res);
const data = res.data.data;
this.order.total = data.total || 0;
@@ -2533,14 +2567,10 @@ console.log(_check,'筛选出来的参数');
let matchedItems = this.order.orderDetails.filter(item => _dataList.includes(item.id));
this.$refs.orderChooseTable.handleCheckSelect(matchedItems);
}
-
// 深拷贝数据
console.log('this.order.selectList :>> ', this.order.selectList);
row.originalList = JSON.parse(JSON.stringify(this.order.selectList));
this.order.orderChooseLoading = false;
-
-
-
}).catch((error)=>{
console.log(error,'error');
this.order.orderChooseLoading = false;
@@ -2589,35 +2619,35 @@ console.log(_check,'筛选出来的参数');
console.log(this.CheckId,'原本数据');
console.log(this.order.selectList,'当前勾选的数据');
console.log(this.order.orderDetails,'全部数据');
-// 找出新增数据对象
-let addedData = this.order.selectList.filter(item => !this.CheckId.includes(item.id));
-let addedObjects = this.order.orderDetails.filter(item => addedData.map(data => data.id).includes(item.id));
-if(addedObjects && addedObjects.length){
- this.dataList.find(val => val.id === this.orderChooseId).billPackageEntityList=[]
- this.dataList.find(val => val.id === this.orderChooseId).billPackageEntityList = addedObjects.map(item => {
- return {
- parceListId: item.id,
- stockArticleId: item.stockArticleId,
- packetBarCode: item.orderPackageCode,
- };
- });
-}
+ // 找出新增数据对象
+ let addedData = this.order.selectList.filter(item => !this.CheckId.includes(item.id));
+ let addedObjects = this.order.orderDetails.filter(item => addedData.map(data => data.id).includes(item.id));
+ if(addedObjects && addedObjects.length){
+ this.dataList.find(val => val.id === this.orderChooseId).billPackageEntityList=[]
+ this.dataList.find(val => val.id === this.orderChooseId).billPackageEntityList = addedObjects.map(item => {
+ return {
+ parceListId: item.id,
+ stockArticleId: item.stockArticleId,
+ packetBarCode: item.orderPackageCode,
+ };
+ });
+ }
-// 找出删除数据对象
-let deletedData = this.CheckId.filter(id => !this.order.selectList.find(item => item.id === id));
-let deletedObjects = this.order.orderDetails.filter(item => deletedData.includes(item.id));
-if(deletedObjects && deletedObjects.length){
- this.dataList.find(val => val.id === this.orderChooseId).unBillPackageEntityList=[]
- this.dataList.find(val => val.id === this.orderChooseId).unBillPackageEntityList = deletedObjects.map(item => {
- return {
- parceListId: item.id,
- stockArticleId: item.stockArticleId,
- packetBarCode: item.orderPackageCode,
- };
- });
-}
-console.log('新增的数据对象:', addedObjects);
-console.log('删除的数据对象:', deletedObjects);
+ // 找出删除数据对象
+ let deletedData = this.CheckId.filter(id => !this.order.selectList.find(item => item.id === id));
+ let deletedObjects = this.order.orderDetails.filter(item => deletedData.includes(item.id));
+ if(deletedObjects && deletedObjects.length){
+ this.dataList.find(val => val.id === this.orderChooseId).unBillPackageEntityList=[]
+ this.dataList.find(val => val.id === this.orderChooseId).unBillPackageEntityList = deletedObjects.map(item => {
+ return {
+ parceListId: item.id,
+ stockArticleId: item.stockArticleId,
+ packetBarCode: item.orderPackageCode,
+ };
+ });
+ }
+ console.log('新增的数据对象:', addedObjects);
+ console.log('删除的数据对象:', deletedObjects);
this.dialogChooseOrderVisible = false;
console.log( this.dataList.find(val => val.id === this.orderChooseId),' this.dataList.find(val => val.id === this.orderChooseId)筛选出来的');
@@ -2710,6 +2740,14 @@ console.log('删除的数据对象:', deletedObjects);
//单位
this.logpmUnit = res.data.data;
});
+ // 包件状态
+ getDictionaryBiz('order_package_status').then(res => {
+ //单位
+ console.log(res,'包件状态');
+ if(res.data.code == 200){
+ this.PackageState = res.data.data || [];
+ }
+ });
getDictionaryBiz('order_status').then(res => {
this.deliveryOrderStatus = res.data.data;
this.$functions.checkcColumnList('orderStatusName', this.columnList).checkarr =
diff --git a/src/views/distribution/inventory/distrilbutionBillLadingView.vue b/src/views/distribution/inventory/distrilbutionBillLadingView.vue
index d3f11a68..6d2aa931 100644
--- a/src/views/distribution/inventory/distrilbutionBillLadingView.vue
+++ b/src/views/distribution/inventory/distrilbutionBillLadingView.vue
@@ -14,16 +14,16 @@