qb 1 year ago
parent
commit
47a5258e4b
  1. 174
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  2. 264
      src/views/warehouse/parcelList/distributionParcelList.vue

174
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -270,8 +270,9 @@
<div class="el_multifunctional">
<el-input
v-model="multifunctional"
placeholder="请输入要搜索的值"
placeholder="请输入要搜索的值,多条件用英文逗号拼接"
clearable
@clear='soclear'
/>
<el-button type="primary" @click="SearchFu"
><el-icon><Plus /></el-icon></el-button
@ -319,14 +320,13 @@
align="center"
>
<template #default="props">
<span :class="props.row[item.prop]=='state'?'.static-class':''">{{ props.row[item.prop] ? props.row[item.prop] : '/' }}</span>
<span :id="props.row[item.prop]" :class="props.row[item.prop] == multifunctional && props.row[item.prop]? 'static-class' : ''">{{
props.row[item.prop] ? props.row[item.prop] : '/'
}}</span>
</template>
</el-table-column>
</template>
<template v-if="item.type === 2">
<el-table-column
v-if="item.head"
@ -871,8 +871,10 @@ const isZeroTable = ref([]); //零担表格
const comprehensive = ref(false); //,
const QuantityEntryStatus = ref(false); //
const TCzj = ref(); //
const soInpuState = ref(false); //
const statisticsList = ref([]); //
const inputValue = ref('number'); //
const dataInfoID = ref(); //ID
//
//
//
@ -1746,6 +1748,14 @@ function dataTabInfo() {
}
//
const AddInfo = () => {
if (soInpuState.value) {
ElMessage({
showClose: true,
message: '请先重置搜索框值',
type: 'warning',
});
return;
}
dataTmp.value = [];
console.log('提交前的参数', dataInfo.value);
console.log('提交前前临时存储', dataTmp.value);
@ -1872,9 +1882,134 @@ function removeDuplicates(arr) {
const ids = arr.map(obj => obj.id);
return arr.filter((item, index) => ids.indexOf(item.id) === index);
}
const soclear=()=>{
SearchFu()
}
// function scrollToElementWithPartialId(partialId) {
// //
// document.querySelectorAll('[id]').forEach(function(el) {
// el.style.backgroundColor = ''; //
// el.style.color = ''; //
// });
// // partialId
// const allElements = document.querySelectorAll(`[id*="${partialId}"]`);
// if (allElements.length > 0) {
// //
// const targetElement = allElements[0];
// //
// targetElement.style.backgroundColor = '#ff0000'; //
// targetElement.style.color = '#fff'; //
// //
// targetElement.scrollIntoView();
// }
// }
function scrollToElementWithinTableRow(partialIdString) {
//
const tableRows = document.querySelectorAll('tr');
tableRows.forEach(function(row) {
const cells = row.querySelectorAll('[id]');
cells.forEach(function(cell) {
cell.style.backgroundColor = '#ffffff'; //
cell.style.color = '#000'; //
});
});
//
const partialIds = partialIdString.split(',').map(id => id.trim());
// partialId
for (let row of tableRows) {
// partialIds
if (partialIds.every(partialId => row.querySelector(`[id*="${partialId}"]`))) {
//
const cells = row.querySelectorAll('[id]');
cells.forEach(function(cell) {
cell.style.backgroundColor = ''; //
cell.style.color = ''; //
});
//
row.scrollIntoView();
break; //
}
}
}
//
const SearchFu = () => {
if(multifunctional.value){
scrollToElementWithinTableRow(multifunctional.value)
}else{
document.querySelectorAll('[id]').forEach(function(el) {
el.style.backgroundColor = ''; //
el.style.color =''; //
});
}
return
if(multifunctional.value){
document.getElementById(multifunctional.value).scrollIntoView()
}
return
console.log(soInpuState.value, '当前搜索状态');
if (!multifunctional.value && !dataInfoTemp.value.length) {
soInpuState.value = false; //
ElMessage({
showClose: true,
message: '请输入搜索内容',
type: 'warning',
});
return;
}
if (!multifunctional.value && dataInfoTemp.value.length) {
//
soInpuState.value = false; //
dataInfo.value = JSON.parse(JSON.stringify(dataInfoTemp.value));
dataInfoTemp.value = [];
}
if (soInpuState.value) {
ElMessage({
showClose: true,
message: '请先重置数据',
type: 'warning',
});
return;
} else {
//
console.log('多功能搜索功能');
console.log(dataInfo.value, '当前订单');
dataInfoTemp.value = dataInfo.value; //
let temp = dataInfo.value.filter(item => {
return Object.values(item).some(val => {
if (typeof val === 'string') {
return val.includes(multifunctional.value);
}
return false;
});
});
console.log(temp, '搜索结果');
console.log(dataInfoTemp.value,'临时存储的值');
dataInfo.value = temp; //
soInpuState.value = false; //
}
// console.log(dataInfo.value, '');
};
//
const DeleteEvent = val => {
dataInfoID.value = val; //
if (dataInfoTemp.value.length) {
//
const index = dataInfoTemp.value.findIndex(item => item.id === val.id);
if (index !== -1) {
dataInfoTemp.value.splice(index, 1);
}
}
console.log(dataInfoID.value, '当前删除的数据');
//
const index = dataInfo.value.findIndex(item => item.id === val.id);
if (index !== -1) {
@ -1995,28 +2130,6 @@ const Entering = val => {
});
};
//
const SearchFu = () => {
console.log('多功能搜索功能');
console.log(dataInfo.value, '当前订单');
let st= dataInfo.value.filter(item => {
return Object.values(item).some(val => {
if (typeof val === 'string') {
return val.includes(multifunctional.value);
}
return false;
});
});
st.forEach(item=>{
item.state=true;
})
console.log(st, '搜索结果');
};
//
const QuantityEntry = val => {
dataId.value = findIndexById(val.id); //
@ -2995,7 +3108,12 @@ const SubmitCommercial = () => {
width: 100px;
}
}
.static-class {
background-color: seagreen;
padding: 0 4px;
scroll-behavior: smooth;
background-color: #ff0000;
color: #fff;
}
</style>

264
src/views/warehouse/parcelList/distributionParcelList.vue

@ -198,16 +198,37 @@ export default {
head: false,
},
{
prop: 'trainNumber',
label: '配送车次',
prop: 'orderCode',
label: '订单自编号',
type: 2,
values: '',
width: '200',
checkarr: [],
fixed: true,
sortable: true,
},
{
prop: 'orderPackageCode',
label: '包条码',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
fixed: true,
sortable: true,
head: false,
},
// {
// prop: 'trainNumber',
// label: '',
// type: 2,
// values: '',
// width: '150',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
// {
// prop: 'materialName',
// label: '',
// type: 2,
@ -240,7 +261,7 @@ export default {
},
{
prop: 'trainNumber',
label: '车次号',
label: '客户车次号',
type: 2,
values: '',
width: '130',
@ -248,16 +269,7 @@ export default {
fixed: false,
sortable: true,
},
{
prop: 'orderCode',
label: '订单自编号',
type: 2,
values: '',
width: '200',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'warehouseEntryTimeEnd',
label: '入库时间',
@ -268,17 +280,7 @@ export default {
fixed: false,
sortable: true,
},
{
prop: 'orderPackageCode',
label: '包条码',
type: 2,
values: '',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'conditionsType',
label: '包件类型',
@ -299,46 +301,79 @@ export default {
sortable: false,
head: false,
},
{
label: '预约单号',
prop: 'reservationCode',
display: false,
hide: true,
prop: 'orderPackageStockupStatusName',
label: '备货状态',
type: 3,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
label: '配送单号',
prop: 'noteNumber',
display: false,
hide: true,
prop: 'orderPackageStatusName',
label: '包件状态',
type: 3,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
label: '签收司机',
prop: 'driverName',
display: false,
hide: true,
prop: 'orderPackageLoadingStatusName',
label: '装车状态',
type: 3,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
label: '装车时间',
prop: 'scanTime',
display: false,
hide: true,
prop: 'orderPackageReservationStatusName',
label: '预约状态',
type: 3,
values: '',
width: '130',
checkarr: [
{
label: '待上架',
value: '10',
},
{
label: '配送车次',
prop: 'dvehicleName',
display: false,
hide: true,
label: '已上架',
value: '20',
},
],
fixed: false,
sortable: true,
},
{
prop: 'orderPackageGroundingStatusName',
label: '上架状态',
type: 3,
values: '',
width: '130',
checkarr: [
{
label: '待上架',
value: '10',
},
{
label: '签收车次',
prop: 'zvehicleName',
display: false,
hide: true,
label: '已上架',
value: '20',
},
],
fixed: false,
sortable: true,
},
{
prop: 'firsts',
label: '一级品',
prop: 'reservationCode',
label: '预约单编号',
type: 2,
values: '',
width: '130',
@ -346,9 +381,11 @@ export default {
fixed: false,
sortable: true,
},
{
prop: 'second',
label: '二级品',
prop: 'noteNumber',
label: '配送车次号',
type: 2,
values: '',
width: '130',
@ -356,9 +393,11 @@ export default {
fixed: false,
sortable: true,
},
{
prop: 'thirdProduct',
label: '三级品',
prop: 'driverName',
label: '配送司机',
type: 2,
values: '',
width: '130',
@ -366,20 +405,24 @@ export default {
fixed: false,
sortable: true,
},
{
prop: 'materialCode',
label: '物料编码',
prop: 'scanTime',
label: '装车时间',
type: 2,
values: '',
width: '150',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'orderPackageStockupStatusName',
label: '备货状态',
type: 3,
prop: 'scanUser',
label: '实际装车人',
type: 2,
values: '',
width: '130',
checkarr: [],
@ -387,9 +430,9 @@ export default {
sortable: true,
},
{
prop: 'orderPackageStatusName',
label: '包件状态',
type: 3,
prop: 'signingTime',
label: '签收时间',
type: 2,
values: '',
width: '130',
checkarr: [],
@ -397,9 +440,9 @@ export default {
sortable: true,
},
{
prop: 'orderPackageLoadingStatusName',
label: '装车状态',
type: 3,
prop: 'signingUser',
label: '实际签收人',
type: 2,
values: '',
width: '130',
checkarr: [],
@ -407,75 +450,76 @@ export default {
sortable: true,
},
{
prop: 'orderPackageReservationStatusName',
label: '预约状态',
type: 3,
prop: 'dvehicleName',
label: '配送车牌',
type: 2,
values: '',
width: '130',
checkarr: [
{
label: '待上架',
value: '10',
checkarr: [],
fixed: false,
sortable: true,
},
{
label: '已上架',
value: '20',
},
],
prop: 'firsts',
label: '一级品',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'orderPackageGroundingStatusName',
label: '上架状态',
type: 3,
prop: 'second',
label: '二级品',
type: 2,
values: '',
width: '130',
checkarr: [
{
label: '待上架',
value: '10',
checkarr: [],
fixed: false,
sortable: true,
},
{
label: '已上架',
value: '20',
},
],
prop: 'thirdProduct',
label: '三级品',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
// {
// prop: 'allocationMsg',
// label: '',
// type: 1,
// values: '',
// width: '180',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
{
prop: 'loadingTime',
label: '装车时间',
type: 1,
prop: 'materialCode',
label: '物料编码',
type: 2,
values: '',
width: '130',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
{
prop: 'signingTime',
label: '签收时间',
type: 1,
prop: 'materialName',
label: '物料名称',
type: 2,
values: '',
width: '130',
width: '150',
checkarr: [],
fixed: false,
sortable: true,
head: false,
},
// {
// prop: 'allocationMsg',
// label: '',
// type: 1,
// values: '',
// width: '180',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
{
prop: 'goodsAllocation',
label: '货位信息',

Loading…
Cancel
Save