diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue
index 61953f0e..b62f492c 100644
--- a/src/views/distribution/turndelivery/deliveryDiscuss.vue
+++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue
@@ -270,8 +270,9 @@
搜索
- {{ props.row[item.prop] ? props.row[item.prop] : '/' }}
+ {{
+ props.row[item.prop] ? props.row[item.prop] : '/'
+ }}
-
-
-
{
+ 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); //记录当前点击的订单
@@ -2988,14 +3101,19 @@ const SubmitCommercial = () => {
align-items: center;
justify-content: space-between;
width: 24%;
- .el-input {
+ .el-input {
margin-right: 4px;
}
button {
width: 100px;
}
}
+
.static-class {
- background-color: seagreen;
+ padding: 0 4px;
+ scroll-behavior: smooth;
+ background-color: #ff0000;
+ color: #fff;
}
+
diff --git a/src/views/warehouse/parcelList/distributionParcelList.vue b/src/views/warehouse/parcelList/distributionParcelList.vue
index 6ef4af25..a1cde114 100644
--- a/src/views/warehouse/parcelList/distributionParcelList.vue
+++ b/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,91 @@ 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: '已上架',
+ value: '20',
+ },
+ ],
+ fixed: false,
+ sortable: true,
},
{
- label: '配送车次',
- prop: 'dvehicleName',
- display: false,
- hide: true,
+ prop: 'orderPackageGroundingStatusName',
+ label: '上架状态',
+ type: 3,
+ values: '',
+ width: '130',
+ checkarr: [
+ {
+ label: '待上架',
+ value: '10',
+ },
+ {
+ label: '已上架',
+ value: '20',
+ },
+ ],
+ fixed: false,
+ sortable: true,
},
+
+
{
- label: '签收车次',
- prop: 'zvehicleName',
- display: false,
- hide: true,
+ prop: 'reservationCode',
+ label: '预约单编号',
+ type: 2,
+ values: '',
+ width: '130',
+ checkarr: [],
+ fixed: false,
+ sortable: true,
},
+
+
{
- prop: 'firsts',
- label: '一级品',
+ prop: 'noteNumber',
+ label: '配送车次号',
type: 2,
values: '',
width: '130',
@@ -346,9 +393,11 @@ export default {
fixed: false,
sortable: true,
},
+
+
{
- prop: 'second',
- label: '二级品',
+ prop: 'driverName',
+ label: '配送司机',
type: 2,
values: '',
width: '130',
@@ -356,9 +405,11 @@ export default {
fixed: false,
sortable: true,
},
+
+
{
- prop: 'thirdProduct',
- label: '三级品',
+ prop: 'scanTime',
+ label: '装车时间',
type: 2,
values: '',
width: '130',
@@ -366,20 +417,22 @@ export default {
fixed: false,
sortable: true,
},
+
+
{
- prop: 'materialCode',
- label: '物料编码',
+ prop: 'scanUser',
+ label: '实际装车人',
type: 2,
values: '',
- width: '150',
+ width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
- prop: 'orderPackageStockupStatusName',
- label: '备货状态',
- type: 3,
+ prop: 'signingTime',
+ label: '签收时间',
+ type: 2,
values: '',
width: '130',
checkarr: [],
@@ -387,9 +440,9 @@ export default {
sortable: true,
},
{
- prop: 'orderPackageStatusName',
- label: '包件状态',
- type: 3,
+ prop: 'signingUser',
+ label: '实际签收人',
+ type: 2,
values: '',
width: '130',
checkarr: [],
@@ -397,9 +450,9 @@ export default {
sortable: true,
},
{
- prop: 'orderPackageLoadingStatusName',
- label: '装车状态',
- type: 3,
+ prop: 'dvehicleName',
+ label: '配送车牌',
+ type: 2,
values: '',
width: '130',
checkarr: [],
@@ -407,75 +460,66 @@ export default {
sortable: true,
},
{
- prop: 'orderPackageReservationStatusName',
- label: '预约状态',
- type: 3,
+ prop: 'firsts',
+ label: '一级品',
+ type: 2,
values: '',
width: '130',
- checkarr: [
- {
- label: '待上架',
- value: '10',
- },
- {
- label: '已上架',
- value: '20',
- },
- ],
+ checkarr: [],
fixed: false,
sortable: true,
},
{
- prop: 'orderPackageGroundingStatusName',
- label: '上架状态',
- type: 3,
+ prop: 'second',
+ label: '二级品',
+ type: 2,
values: '',
width: '130',
- checkarr: [
- {
- label: '待上架',
- value: '10',
- },
- {
- label: '已上架',
- value: '20',
- },
- ],
+ checkarr: [],
fixed: false,
sortable: true,
},
- // {
- // prop: 'allocationMsg',
- // label: '货位信息',
- // type: 1,
- // values: '',
- // width: '180',
- // checkarr: [],
- // fixed: false,
- // sortable: true,
- // },
{
- prop: 'loadingTime',
- label: '装车时间',
- type: 1,
+ prop: 'thirdProduct',
+ label: '三级品',
+ type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
- head: false,
},
{
- prop: 'signingTime',
- label: '签收时间',
- type: 1,
+ prop: 'materialCode',
+ label: '物料编码',
+ type: 2,
values: '',
- width: '130',
+ width: '150',
checkarr: [],
fixed: false,
sortable: true,
- head: false,
},
+ {
+ prop: 'materialName',
+ label: '物料名称',
+ type: 2,
+ values: '',
+ width: '150',
+ checkarr: [],
+ fixed: false,
+ sortable: true,
+ },
+
+ // {
+ // prop: 'allocationMsg',
+ // label: '货位信息',
+ // type: 1,
+ // values: '',
+ // width: '180',
+ // checkarr: [],
+ // fixed: false,
+ // sortable: true,
+ // },
{
prop: 'goodsAllocation',
label: '货位信息',