值机柜台优化
This commit is contained in:
@@ -19,36 +19,39 @@
|
|||||||
<div class="line-operator-right mb-3 col-xlg-4 col-mlg-4 col-xl-4 col-lg-1">
|
<div class="line-operator-right mb-3 col-xlg-4 col-mlg-4 col-xl-4 col-lg-1">
|
||||||
<!-- <button type="button" class="btn btn-info mr-3">值机柜台编辑</button>
|
<!-- <button type="button" class="btn btn-info mr-3">值机柜台编辑</button>
|
||||||
<button type="button" class="btn btn-info mr-3">打印</button> -->
|
<button type="button" class="btn btn-info mr-3">打印</button> -->
|
||||||
<button type="button" class="btn btn-info mr-3" (click)="clearFiter()">刷新</button>
|
<button type="button" class="btn btn-info mr-3">刷新</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="second-condition mb-3 row">
|
<div class="second-condition mb-3 row">
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">所属航站楼区域: </label>
|
<label for="terminalAreaCode">所属航站楼区域: </label>
|
||||||
<select class="form-control" [(ngModel)]="checkinDesks" (ngModelChange)="selectChange()" id="qy">
|
<select class="form-control" [(ngModel)]="filterItems.terminalAreaCode" (ngModelChange)="selectChange()" id="qy">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="GH">国内区域</option>
|
<option *ngFor="let items of checkinDesks" [value]="items.terminalAreaCode">{{items.terminalAreaCode}}</option>
|
||||||
|
<!-- <option value="GH">国内区域</option>
|
||||||
<option value="CH">国外区域</option>
|
<option value="CH">国外区域</option>
|
||||||
<option value="QH">其他区域</option>
|
<option value="QH">其他区域</option> -->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">值机岛: </label>
|
<label for="checkinGroupCode">值机岛: </label>
|
||||||
<select class="form-control" [(ngModel)]="checkinDesks" (ngModelChange)="selectChange()" id="zjd">
|
<select class="form-control" [(ngModel)]="filterItems.checkinGroupCode" (ngModelChange)="selectChange()" id="zjd">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="A">A岛</option>
|
<option *ngFor="let items of checkinDesks" [value]="items.checkinGroupCode">{{items.checkinGroupCode}}</option>
|
||||||
|
<!-- <option value="A">A岛</option>
|
||||||
<option value="B">B岛</option>
|
<option value="B">B岛</option>
|
||||||
<option value="C">C岛</option>
|
<option value="C">C岛</option> -->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-container mr-4">
|
<div class="input-container mr-4">
|
||||||
<label for="">行李传送带: </label>
|
<label for="chutCode">行李传送带: </label>
|
||||||
<select class="form-control" [(ngModel)]="checkinDesks" (ngModelChange)="selectChange()" id="xl">
|
<select class="form-control" [(ngModel)]="filterItems.chutCode" (ngModelChange)="selectChange()" id="xl">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="X">X行李</option>
|
<option *ngFor="let items of checkinDesks" [value]="items.chutCode">{{items.chutCode}}</option>
|
||||||
|
<!-- <option value="X">X行李</option>
|
||||||
<option value="Z">Z行李</option>
|
<option value="Z">Z行李</option>
|
||||||
<option value="Y">Y行李</option>
|
<option value="Y">Y行李</option> -->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +72,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let checkinDesk of checkinDesks;let i = index">
|
<tr *ngFor="let checkinDesk of render_data;let i = index">
|
||||||
<td>{{i+1}}</td>
|
<td>{{i+1}}</td>
|
||||||
<td>{{checkinDesk.checkindeskCode}}</td>
|
<td>{{checkinDesk.checkindeskCode}}</td>
|
||||||
<td>{{checkinDesk.checkindeskName}}</td>
|
<td>{{checkinDesk.checkindeskName}}</td>
|
||||||
|
|||||||
@@ -20,9 +20,17 @@ SEARCH = ''; //手动输入条件
|
|||||||
FLT_POS = 1; //过滤还是定位
|
FLT_POS = 1; //过滤还是定位
|
||||||
SEL_COL = ''; //选择列名
|
SEL_COL = ''; //选择列名
|
||||||
|
|
||||||
|
//下拉框
|
||||||
|
public filterItems = {
|
||||||
|
terminalAreaCode:'',
|
||||||
|
checkinGroupCode:'',
|
||||||
|
chutCode:'',
|
||||||
|
}
|
||||||
|
|
||||||
checkinDesks : Array<any>;
|
checkinDesks : Array<any>;
|
||||||
public row_state: any = { renderFlight: {} };
|
public row_state: any = { renderFlight: {} };
|
||||||
public render_data: Array<object> = []; //显示数据,即需要显示的数据
|
public render_data: Array<object> = []; //显示数据,即需要显示的数据
|
||||||
|
public return_data: Array<object> = []; //下拉框显示数据
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.checkinDesks = this.basicDataService.checkin_desk;
|
this.checkinDesks = this.basicDataService.checkin_desk;
|
||||||
this.basicDataService.checkin_desk_subject.subscribe(
|
this.basicDataService.checkin_desk_subject.subscribe(
|
||||||
@@ -42,114 +50,38 @@ ngOnInit() {
|
|||||||
tableCont.addEventListener('scroll',scrollHandle);
|
tableCont.addEventListener('scroll',scrollHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
//刷新
|
|
||||||
clearFiter(){
|
|
||||||
$("#inputerInfo").val(""); //清空过滤或查找定位文本框
|
|
||||||
$("#qy").val(""); //清空所属航站楼区域
|
|
||||||
$("#zjd").val(""); //清空值机岛
|
|
||||||
$("#xl").val(""); //清空行李传送带
|
|
||||||
this.ngOnInit();
|
|
||||||
}
|
|
||||||
//输入框回车事件
|
//输入框回车事件
|
||||||
inputEnter() {
|
inputEnter() {
|
||||||
if (this.FLT_POS === 1) {
|
if (this.FLT_POS === 1) {
|
||||||
this.selectChange()
|
this.inputFilter(this.checkinDesks)
|
||||||
} else {
|
} else {
|
||||||
this.selectChange()
|
this.inputFilter(this.checkinDesks)
|
||||||
this.inputPosition(this.render_data)
|
this.inputPosition(this.checkinDesks)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//下拉框选择筛选
|
//下拉框选择筛选
|
||||||
selectChange() {
|
selectChange() {
|
||||||
let filter_data = [];
|
this.return_data = this.checkinDesks.filter(item=>{
|
||||||
let filtercheckinDesks = this.render_data;
|
|
||||||
this.render_data.forEach(item => {
|
|
||||||
filter_data.push(Object.assign({}, item));
|
|
||||||
})
|
|
||||||
if (this.FLT_POS === 1) {
|
|
||||||
this.inputFilter(filter_data);
|
|
||||||
} else {
|
|
||||||
this.checkinDesks = filter_data;
|
|
||||||
this.row_state = this.checkinDesks.length > 0 ? this.checkinDesks[0] : { renderFlight: {} };
|
|
||||||
}
|
|
||||||
//下拉框筛选
|
|
||||||
filter_data = filter_data.filter(item => {
|
|
||||||
if (item) {
|
|
||||||
let is_satis = true;
|
let is_satis = true;
|
||||||
for (const key in filtercheckinDesks) {
|
for (const key in this.filterItems) {
|
||||||
if (filtercheckinDesks.hasOwnProperty(key) && filtercheckinDesks[key]) {
|
if (this.filterItems.hasOwnProperty(key) && this.filterItems[key]) {
|
||||||
if (item[key] === filtercheckinDesks[key]) {
|
if (item[key] === this.filterItems[key]) {
|
||||||
is_satis = true;
|
is_satis = true;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
is_satis = false;
|
is_satis = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return is_satis;
|
return is_satis;
|
||||||
} else if (item) {
|
|
||||||
let is_satis = true;
|
|
||||||
for (const key in filtercheckinDesks) {
|
|
||||||
if (filtercheckinDesks.hasOwnProperty(key) && filtercheckinDesks[key]) {
|
|
||||||
if (item[key] === filtercheckinDesks[key]) {
|
|
||||||
is_satis = true;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
is_satis = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return is_satis;
|
|
||||||
} else {
|
|
||||||
let pre_satis = true;
|
|
||||||
let rea_satis = true;
|
|
||||||
for (const key in filtercheckinDesks) {
|
|
||||||
if (filtercheckinDesks.hasOwnProperty(key) && filtercheckinDesks[key]) {
|
|
||||||
if (item[key] === filtercheckinDesks[key]) {
|
|
||||||
pre_satis = true;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
pre_satis = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (const key in filtercheckinDesks) {
|
|
||||||
if (filtercheckinDesks.hasOwnProperty(key) && filtercheckinDesks[key]) {
|
|
||||||
if (item[key] === filtercheckinDesks[key]) {
|
|
||||||
rea_satis = true;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
rea_satis = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pre_satis && !rea_satis) {
|
|
||||||
item = item;
|
|
||||||
return pre_satis;
|
|
||||||
} else if (!pre_satis && rea_satis) {
|
|
||||||
item = item;
|
|
||||||
return rea_satis;
|
|
||||||
} else if (pre_satis && rea_satis) {
|
|
||||||
return pre_satis && rea_satis;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
this.render_data = this.return_data;
|
||||||
|
}
|
||||||
|
|
||||||
//输入框筛选
|
//输入框筛选
|
||||||
inputFilter(filterData) {
|
inputFilter(filterData) {
|
||||||
if (this.SEARCH) {
|
if (this.SEARCH) {
|
||||||
if (this.SEL_COL) {
|
if (this.SEL_COL) {
|
||||||
let sel_col = this.SEL_COL;
|
let sel_col = this.SEL_COL;
|
||||||
@@ -197,14 +129,14 @@ selectChange() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.checkinDesks = filterData;
|
this.render_data = filterData;
|
||||||
this.row_state = this.checkinDesks.length > 0 ? this.checkinDesks[0] : { renderFlight: {} };
|
this.row_state = this.render_data.length > 0 ? this.render_data[0] : { renderFlight: {} };
|
||||||
}
|
}
|
||||||
|
|
||||||
positionArray: Array<any> = [];
|
positionArray: Array<any> = [];
|
||||||
positionArrayIndex: number = 0;
|
positionArrayIndex: number = 0;
|
||||||
//输入框定位
|
//输入框定位
|
||||||
inputPosition(filterData) {
|
inputPosition(filterData) {
|
||||||
let transArray = []
|
let transArray = []
|
||||||
if (this.SEL_COL) {
|
if (this.SEL_COL) {
|
||||||
let sel_col = this.SEL_COL;
|
let sel_col = this.SEL_COL;
|
||||||
|
|||||||
@@ -59,19 +59,19 @@ if (this.FLT_POS === 1) {
|
|||||||
|
|
||||||
//下拉框选择筛选
|
//下拉框选择筛选
|
||||||
selectChange() {
|
selectChange() {
|
||||||
let filter_data = [];
|
let filter_data = [];
|
||||||
let filtercheckinGroups = this.render_data;
|
let filtercheckinGroups = this.render_data;
|
||||||
this.render_data.forEach(item => {
|
this.render_data.forEach(item => {
|
||||||
filter_data.push(Object.assign({}, item));
|
filter_data.push(Object.assign({}, item));
|
||||||
})
|
})
|
||||||
if (this.FLT_POS === 1) {
|
if (this.FLT_POS === 1) {
|
||||||
this.inputFilter(filter_data);
|
this.inputFilter(filter_data);
|
||||||
} else {
|
} else {
|
||||||
this.checkinGroups = filter_data;
|
this.checkinGroups = filter_data;
|
||||||
this.row_state = this.checkinGroups.length > 0 ? this.checkinGroups[0] : { renderFlight: {} };
|
this.row_state = this.checkinGroups.length > 0 ? this.checkinGroups[0] : { renderFlight: {} };
|
||||||
}
|
}
|
||||||
//下拉框筛选
|
//下拉框筛选
|
||||||
filter_data = filter_data.filter(item => {
|
filter_data = filter_data.filter(item => {
|
||||||
if (item) {
|
if (item) {
|
||||||
let is_satis = true;
|
let is_satis = true;
|
||||||
for (const key in filtercheckinGroups) {
|
for (const key in filtercheckinGroups) {
|
||||||
@@ -142,12 +142,12 @@ filter_data = filter_data.filter(item => {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//输入框筛选
|
//输入框筛选
|
||||||
inputFilter(filterData) {
|
inputFilter(filterData) {
|
||||||
if (this.SEARCH) {
|
if (this.SEARCH) {
|
||||||
if (this.SEL_COL) {
|
if (this.SEL_COL) {
|
||||||
let sel_col = this.SEL_COL;
|
let sel_col = this.SEL_COL;
|
||||||
filterData = filterData.filter(item => {
|
filterData = filterData.filter(item => {
|
||||||
@@ -193,17 +193,17 @@ if (this.SEARCH) {
|
|||||||
return is_satis;
|
return is_satis;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.checkinGroups = filterData;
|
this.checkinGroups = filterData;
|
||||||
this.row_state = this.checkinGroups.length > 0 ? this.checkinGroups[0] : { renderFlight: {} };
|
this.row_state = this.checkinGroups.length > 0 ? this.checkinGroups[0] : { renderFlight: {} };
|
||||||
}
|
}
|
||||||
|
|
||||||
positionArray: Array<any> = [];
|
positionArray: Array<any> = [];
|
||||||
positionArrayIndex: number = 0;
|
positionArrayIndex: number = 0;
|
||||||
//输入框定位
|
//输入框定位
|
||||||
inputPosition(filterData) {
|
inputPosition(filterData) {
|
||||||
let transArray = []
|
let transArray = []
|
||||||
if (this.SEL_COL) {
|
if (this.SEL_COL) {
|
||||||
let sel_col = this.SEL_COL;
|
let sel_col = this.SEL_COL;
|
||||||
filterData.forEach(element => {
|
filterData.forEach(element => {
|
||||||
if (element[sel_col]) {
|
if (element[sel_col]) {
|
||||||
@@ -216,7 +216,7 @@ if (this.SEL_COL) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
filterData.forEach(element => {
|
filterData.forEach(element => {
|
||||||
for (const key in element) {
|
for (const key in element) {
|
||||||
if (element.hasOwnProperty(key)) {
|
if (element.hasOwnProperty(key)) {
|
||||||
@@ -241,9 +241,9 @@ if (this.SEL_COL) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transArray.length > 0) {
|
if (transArray.length > 0) {
|
||||||
if (transArray.toString() == this.positionArray.toString()) {
|
if (transArray.toString() == this.positionArray.toString()) {
|
||||||
this.positionArrayIndex++;
|
this.positionArrayIndex++;
|
||||||
if (this.positionArrayIndex === this.positionArray.length) {
|
if (this.positionArrayIndex === this.positionArray.length) {
|
||||||
@@ -255,8 +255,8 @@ if (transArray.length > 0) {
|
|||||||
this.positionArrayIndex = 0;
|
this.positionArrayIndex = 0;
|
||||||
this.row_state = this.positionArray[this.positionArrayIndex];
|
this.row_state = this.positionArray[this.positionArrayIndex];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alert('没有搜索到相关数据');
|
alert('没有搜索到相关数据');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user