From 5d26d2c9a08df41149e97d88ae0f2041aeb3f5c2 Mon Sep 17 00:00:00 2001
From: xzg <4727863@qq.com>
Date: Tue, 26 Dec 2023 14:14:18 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../turndelivery/deliveryDiscuss.vue | 203 +++++++++++++---
.../parcelList/distributionParcelList.vue | 220 ++++++++----------
2 files changed, 277 insertions(+), 146 deletions(-)
diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue
index 61953f0e..a12f01a8 100644
--- a/src/views/distribution/turndelivery/deliveryDiscuss.vue
+++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue
@@ -272,6 +272,7 @@
v-model="multifunctional"
placeholder="请输入要搜索的值"
clearable
+ @clear='soclear'
/>
搜索
+
+
+
+
+
+
+
+ 查看
+
+
+
+
+
- {{ props.row[item.prop] ? props.row[item.prop] : '/' }}
+ {{
+ props.row[item.prop] ? props.row[item.prop] : '/'
+ }}
-
-
-
{
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ return [start, end];
+ },
+ },
+ {
+ text: '最近一个月',
+ value: () => {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ return [start, end];
+ },
+ },
+ {
+ text: '最近三个月',
+ value: () => {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+ return [start, end];
+ },
+ },
+ ],
+ /** 时间选择器数据 */
+ stockupDate: [],
+ /** 列表 */
+ columnList,
+ /** 列表数据 */
+ data: [{}],
+ /** 页面loading */
+ loadingObj: {
+ /** 列表加载loading */
+ list: false,
+ packageListLoading: false,
+ },
+ /** 列表复选框选中的数据 */
+ selectionList: [],
+ /** 是否显示设置表格 */
+ drawerShow: false,
+ /** 分页参数 */
+ page: {
+ currentPage: 1,
+ pageSize: 50,
+ total: 0,
+ },
+});
+
+const {
+ search,
+ query,
+ shortcuts,
+ stockupDate,
+ data,
+ loadingObj,
+ selectionList,
+ drawerShow,
+ page,
+ trickleLoadingPage,
+ zeroAdditionalRecordingInfo,
+ popUpShow,
+ recorddata,
+} = toRefs(details);
+const dataInfoID = ref(); //点击删除保存当前ID
// 司机选择信息
// 车辆选项
// 备货人员
@@ -1746,6 +1844,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 +1978,72 @@ function removeDuplicates(arr) {
const ids = arr.map(obj => obj.id);
return arr.filter((item, index) => ids.indexOf(item.id) === index);
}
+const soclear=()=>{
+
+ SearchFu()
+}
+// 编辑多功能搜索
+const SearchFu = () => {
+ 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 +2164,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,7 +3135,7 @@ const SubmitCommercial = () => {
align-items: center;
justify-content: space-between;
width: 24%;
- .el-input {
+ .el-input {
margin-right: 4px;
}
button {
diff --git a/src/views/warehouse/parcelList/distributionParcelList.vue b/src/views/warehouse/parcelList/distributionParcelList.vue
index 6ef4af25..0891ab3c 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,9 +269,10 @@ export default {
fixed: false,
sortable: true,
},
+
{
- prop: 'orderCode',
- label: '订单自编号',
+ prop: 'warehouseEntryTimeEnd',
+ label: '入库时间',
type: 2,
values: '',
width: '200',
@@ -258,62 +280,109 @@ export default {
fixed: false,
sortable: true,
},
+
{
- prop: 'warehouseEntryTimeEnd',
- label: '入库时间',
- type: 2,
+ prop: 'conditionsType',
+ label: '包件类型',
+ type: 3,
values: '',
- width: '200',
+ width: '130',
+ checkarr: [
+ {
+ label: '定制品',
+ value: '1',
+ },
+ {
+ label: '库存品',
+ value: '2',
+ },
+ ],
+ fixed: false,
+ sortable: false,
+ head: false,
+ },
+ {
+ prop: 'orderPackageStockupStatusName',
+ label: '备货状态',
+ type: 3,
+ values: '',
+ width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
- prop: 'orderPackageCode',
- label: '包条码',
- type: 2,
+ prop: 'orderPackageStatusName',
+ label: '包件状态',
+ type: 3,
values: '',
- width: '150',
+ width: '130',
checkarr: [],
fixed: false,
sortable: true,
- head: false,
},
{
- prop: 'conditionsType',
- label: '包件类型',
+ prop: 'orderPackageLoadingStatusName',
+ label: '装车状态',
+ type: 3,
+ values: '',
+ width: '130',
+ checkarr: [],
+ fixed: false,
+ sortable: true,
+ },
+ {
+ prop: 'orderPackageReservationStatusName',
+ label: '预约状态',
type: 3,
values: '',
width: '130',
checkarr: [
{
- label: '定制品',
- value: '1',
+ label: '待上架',
+ value: '10',
},
{
- label: '库存品',
- value: '2',
+ label: '已上架',
+ value: '20',
},
],
fixed: false,
- sortable: false,
- head: false,
+ sortable: true,
},
-
{
- label: '预约单号',
+ prop: 'orderPackageGroundingStatusName',
+ label: '上架状态',
+ type: 3,
+ values: '',
+ width: '130',
+ checkarr: [
+ {
+ label: '待上架',
+ value: '10',
+ },
+ {
+ label: '已上架',
+ value: '20',
+ },
+ ],
+ fixed: false,
+ sortable: true,
+ },
+ {
+ label: '预约单编号',
prop: 'reservationCode',
display: false,
hide: true,
},
{
- label: '配送单号',
+ label: '配送车次号',
prop: 'noteNumber',
display: false,
hide: true,
},
{
- label: '签收司机',
+ label: '配送司机',
prop: 'driverName',
display: false,
hide: true,
@@ -325,17 +394,11 @@ export default {
hide: true,
},
{
- label: '配送车次',
+ label: '配送车牌',
prop: 'dvehicleName',
display: false,
hide: true,
},
- {
- label: '签收车次',
- prop: 'zvehicleName',
- display: false,
- hide: true,
- },
{
prop: 'firsts',
label: '一级品',
@@ -377,73 +440,16 @@ export default {
sortable: true,
},
{
- prop: 'orderPackageStockupStatusName',
- label: '备货状态',
- type: 3,
- values: '',
- width: '130',
- checkarr: [],
- fixed: false,
- sortable: true,
- },
- {
- prop: 'orderPackageStatusName',
- label: '包件状态',
- type: 3,
- values: '',
- width: '130',
- checkarr: [],
- fixed: false,
- sortable: true,
- },
- {
- prop: 'orderPackageLoadingStatusName',
- label: '装车状态',
- type: 3,
+ prop: 'materialName',
+ label: '物料名称',
+ type: 2,
values: '',
- width: '130',
+ width: '150',
checkarr: [],
fixed: false,
sortable: true,
},
- {
- prop: 'orderPackageReservationStatusName',
- label: '预约状态',
- type: 3,
- values: '',
- width: '130',
- checkarr: [
- {
- label: '待上架',
- value: '10',
- },
- {
- label: '已上架',
- value: '20',
- },
- ],
- fixed: false,
- sortable: true,
- },
- {
- prop: 'orderPackageGroundingStatusName',
- label: '上架状态',
- type: 3,
- values: '',
- width: '130',
- checkarr: [
- {
- label: '待上架',
- value: '10',
- },
- {
- label: '已上架',
- value: '20',
- },
- ],
- fixed: false,
- sortable: true,
- },
+
// {
// prop: 'allocationMsg',
// label: '货位信息',
@@ -454,28 +460,6 @@ export default {
// fixed: false,
// sortable: true,
// },
- {
- prop: 'loadingTime',
- label: '装车时间',
- type: 1,
- values: '',
- width: '130',
- checkarr: [],
- fixed: false,
- sortable: true,
- head: false,
- },
- {
- prop: 'signingTime',
- label: '签收时间',
- type: 1,
- values: '',
- width: '130',
- checkarr: [],
- fixed: false,
- sortable: true,
- head: false,
- },
{
prop: 'goodsAllocation',
label: '货位信息',