Browse Source

新增配载查询

dev-xx
qb 6 months ago
parent
commit
4e9eb5e4f2
  1. 17
      src/option/distribution/addVehicleStowage.js
  2. 193
      src/views/distribution/artery/AddVehicleStowage.vue

17
src/option/distribution/addVehicleStowage.js

@ -207,7 +207,7 @@ export const columnList = [
{
prop: 'destinationWarehouseName',
label: '目的站',
type: 2,
type: 1,
values: '',
width: '130',
checkarr: [],
@ -469,7 +469,7 @@ export const newColumnList = [
{
prop: 'destinationWarehouseName',
label: '目的站',
type: 2,
type: 1,
values: '',
width: '130',
checkarr: [],
@ -488,6 +488,17 @@ export const newColumnList = [
sortable: true,
isshowSummary: false,
},
{
prop: 'shipperName',
label: '发货人',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
isshowSummary: false,
},
{
prop: 'consignee',
label: '收货单位',
@ -509,7 +520,7 @@ export const newColumnList = [
sortable: true,
},
{
prop: 'productName',
prop: 'goodsName',
label: '品类名称',
type: 2,
values: '',

193
src/views/distribution/artery/AddVehicleStowage.vue

@ -316,7 +316,7 @@
<el-form inline label-width="80px" :model="details.oldQuery" class="el-fr-d">
<el-form-item label="关键词" style="width: 100%" class="el-times">
<el-input
v-model.trim="query.orderCode"
v-model.trim="query.keyWords"
placeholder="请输入运单/发货人/收货人/收货单位"
clearable
></el-input>
@ -324,10 +324,10 @@
<el-form-item label="目的网点" class="el-times">
<el-select
v-model="details.query.destinationWarehouseName"
v-model="details.query.destinationWarehouseIds"
class="w100"
clearable
placeholder="请选择目的"
placeholder="请选择目的网点"
filterable
multiple
>
@ -341,19 +341,31 @@
</el-form-item>
<el-form-item label="到站" class="el-times">
<el-input v-model="query.destination" clearable></el-input>
<el-input
v-model="query.destination"
placeholder="请输入到站"
clearable
></el-input>
</el-form-item>
<el-form-item label="品类名称" class="el-times">
<el-input v-model="query.goodsName" clearable></el-input>
<el-input
v-model="query.goodsName"
placeholder="请输入品类名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="备注" class="el-times">
<el-input v-model="query.remark" clearable></el-input>
<el-input v-model="query.remark" placeholder="请输入备注" clearable></el-input>
</el-form-item>
<el-form-item label="托盘码" class="el-times">
<el-input v-model="query.taryName" clearable></el-input>
<el-input
v-model="query.taryName"
placeholder="请输入托盘码"
clearable
></el-input>
</el-form-item>
<el-form-item label="开单时间" class="el-times">
@ -456,24 +468,64 @@
:model="details.newQuery"
class="el-fr-d"
>
<el-form-item label="关键词" class="el-times">
<el-input></el-input>
<el-form-item label="关键词" style="width: 100%" class="el-times">
<el-input
v-model.trim="item.query.keyWords"
placeholder="请输入运单/发货人/收货人/收货单位"
clearable
></el-input>
</el-form-item>
<el-form-item label="目的网点" class="el-times">
<el-input></el-input>
<el-select
v-model="item.selectQuery.destinationWarehouseName"
class="w100"
clearable
placeholder="请选择目的网点"
filterable
multiple
>
<el-option
v-for="value in details.warehouseOption"
:key="value.dictValue"
:label="value.dictValue"
:value="value.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="到站" class="el-times">
<el-input></el-input>
<el-input
v-model="item.query.destination"
placeholder="请输入到站"
clearable
></el-input>
</el-form-item>
<el-form-item label="目标品类" class="el-times">
<el-input></el-input>
<el-form-item label="品类名称" class="el-times">
<el-input
v-model="item.query.goodsName"
placeholder="请输入品类名称"
clearable
></el-input>
</el-form-item>
<el-form-item label="备注" class="el-times">
<el-input></el-input>
<el-input
v-model="item.query.remark"
placeholder="请输入备注"
clearable
></el-input>
</el-form-item>
<el-form-item label="托盘码" class="el-times">
<el-input></el-input>
<el-input
v-model="item.query.taryName"
placeholder="请输入托盘码"
clearable
></el-input>
</el-form-item>
<el-form-item label="开单时间" class="el-times">
<el-date-picker
v-model="item.timeQuery.createTimeArr"
@ -1084,6 +1136,9 @@ const initOriginWarehouseOrder = debounce(async (params = {}) => {
isTransfer: 0,
};
if (!submitData.destinationWarehouseIds || submitData.destinationWarehouseIds.length === 0)
delete submitData.destinationWarehouseIds;
for (const key in submitData) {
const value = submitData[key];
if (!value && value !== false && value !== 0) delete submitData[key];
@ -1197,6 +1252,8 @@ const onLoad = async () => {
query: {},
//
timeQuery: {},
//
selectQuery: {},
//
selectionList: [],
//
@ -1230,21 +1287,65 @@ const onLoad = async () => {
},
/** 筛选数据 */
itemFilterData() {
if (Object.keys(this.query).length === 0 && Object.keys(this.timeQuery).length === 0)
if (
Object.keys(this.query).length === 0 &&
Object.keys(this.timeQuery).length === 0 &&
Object.keys(this.selectQuery).length === 0
)
return (this.renderData = this.lineCarsOrderList);
const _deepQuery = { ...this.query };
for (const key in this._deepQuery) {
const value = this._deepQuery[key];
if (getObjType(value) !== 'string') continue;
if (value === '') delete this._deepQuery[key];
_deepQuery[key] = new RegExp('^' + value);
}
let _filterArr = [];
for (let i = 0; i < this.lineCarsOrderList.length; i++) {
const value = this.lineCarsOrderList[i];
let _flag = true;
for (let key in this.query) {
if (!this.query[key].test(value[key])) _flag = false;
//
for (let key in _deepQuery) {
if (!_deepQuery[key].test(value[key])) _flag = false;
if (key === 'keyWords' && !_flag) {
const _RegKeyWords = _deepQuery.keyWords;
if (
!_RegKeyWords.test(value.waybillNo) ||
!_RegKeyWords.test(value.shipperName) ||
!_RegKeyWords.test(value.consigneeName) ||
!_RegKeyWords.test(value.consignee)
)
_flag = false;
}
if (!_flag) break;
}
if (!_flag) continue;
//
for (let key in this.selectQuery) {
const _item = this.selectQuery[key];
//
if (getObjType(_item) === 'string') {
if (_item !== value[key]) _flag = false;
} else if (getObjType(_item) === 'array') {
if (!_item.includes(value[key])) _flag = false;
}
if (!_flag) break;
}
if (!_flag) continue;
//
for (let key in this.timeQuery) {
const item = this.timeQuery[key];
console.log('item :>> ', item);
@ -1267,6 +1368,7 @@ const onLoad = async () => {
/** 清空搜索的值 */
itemClearQuery() {
this.query = {};
this.selectQuery = {};
this.timeQuery = {};
handleClearTableQuery(this.newColumnList);
this.itemFilterData();
@ -1586,6 +1688,8 @@ const handleAddNode = async (index: number) => {
index: index + 1,
//
query: {},
//
selectQuery: {},
//
timeQuery: {},
//
@ -1621,21 +1725,67 @@ const handleAddNode = async (index: number) => {
},
/** 筛选数据 */
itemFilterData() {
if (Object.keys(this.query).length === 0 && Object.keys(this.timeQuery).length === 0)
if (
Object.keys(this.query).length === 0 &&
Object.keys(this.timeQuery).length === 0 &&
Object.keys(this.selectQuery).length === 0
)
return (this.renderData = this.lineCarsOrderList);
const _deepQuery = { ...this.query };
for (const key in _deepQuery) {
const value = _deepQuery[key];
if (getObjType(value) !== 'string') continue;
if (value === '') delete this._deepQuery[key];
_deepQuery[key] = new RegExp('^' + value);
}
let _filterArr = [];
for (let i = 0; i < this.lineCarsOrderList.length; i++) {
const value = this.lineCarsOrderList[i];
let _flag = true;
for (let key in this.query) {
if (!this.query[key].test(value[key])) _flag = false;
//
for (let key in _deepQuery) {
console.log('_deepQuery[key] :>> ', _deepQuery[key]);
if (key === 'keyWords' && _flag) {
const _RegKeyWords = _deepQuery.keyWords;
if (
_RegKeyWords.test(value.waybillNo) ||
_RegKeyWords.test(value.shipperName) ||
_RegKeyWords.test(value.consigneeName) ||
_RegKeyWords.test(value.consignee)
)
continue;
}
if (!_deepQuery[key].test(value[key])) _flag = false;
if (!_flag) break;
}
if (!_flag) continue;
//
for (let key in this.selectQuery) {
const _item = this.selectQuery[key];
//
if (getObjType(_item) === 'string' && _item) {
console.log('222 :>> ', 222);
if (_item !== value[key]) _flag = false;
} else if (getObjType(_item) === 'array' && _item.length > 0) {
console.log('123 :>> ', 123);
if (!_item.includes(value[key])) _flag = false;
}
if (!_flag) break;
}
if (!_flag) continue;
//
for (let key in this.timeQuery) {
const item = this.timeQuery[key];
console.log('item :>> ', item);
@ -1658,6 +1808,7 @@ const handleAddNode = async (index: number) => {
/** 清空搜索的值 */
itemClearQuery() {
this.query = {};
this.selectQuery = {};
this.timeQuery = {};
handleClearTableQuery(this.newColumnList);
this.itemFilterData();

Loading…
Cancel
Save