Commit 9b22a807 authored by wangqinghua's avatar wangqinghua

update

parent 78cf4bc3
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
#Wed Jul 31 13:18:41 CST 2019
#Sun Aug 04 18:44:56 CST 2019
/Users/ben/.gradle/caches/transforms-1/files-1.1/support-compat-27.1.0.aar/45a22bc138864dd211a4392ad5c08606/res/drawable-xhdpi-v4/notification_bg_normal.9.png=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/res/merged/release/drawable-xhdpi-v4_notification_bg_normal.9.png.flat
/Users/ben/.gradle/caches/transforms-1/files-1.1/support-compat-27.1.0.aar/45a22bc138864dd211a4392ad5c08606/res/drawable-hdpi-v4/notification_bg_low_pressed.9.png=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/res/merged/release/drawable-hdpi-v4_notification_bg_low_pressed.9.png.flat
/Users/ben/.gradle/caches/transforms-1/files-1.1/support-compat-27.1.0.aar/45a22bc138864dd211a4392ad5c08606/res/layout/notification_action_tombstone.xml=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/res/merged/release/layout_notification_action_tombstone.xml.flat
......
#Fri Aug 02 15:30:08 CST 2019
#Sun Aug 04 18:45:07 CST 2019
base.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dex/release/0
renamed.0=classes.dex
file.0=/Users/ben/gitLab-project/party-build-cloud/platforms/android/app/build/intermediates/transforms/dex/release/0/classes.dex
[{"name":"main","index":0,"scopes":["PROJECT","EXTERNAL_LIBRARIES","SUB_PROJECTS"],"types":["DEX"],"format":"DIRECTORY","present":true}]
\ No newline at end of file
[{"name":"main","index":0,"scopes":["EXTERNAL_LIBRARIES","PROJECT","SUB_PROJECTS"],"types":["DEX"],"format":"DIRECTORY","present":true}]
\ No newline at end of file
......@@ -176,7 +176,7 @@ document.getElementById(id).style.display = 'none';
<span class="mdl-layout-title">Lint Report: 1 error</span>
<div class="mdl-layout-spacer"></div>
<nav class="mdl-navigation mdl-layout--large-screen-only">
Check performed at Fri Aug 02 15:30:15 CST 2019 </nav>
Check performed at Sun Aug 04 18:45:09 CST 2019 </nav>
</div>
</header>
<div class="mdl-layout__drawer">
......
......@@ -208,6 +208,16 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios {
color: #999;
font-size: 2.5rem;
}
span.more{
position: absolute;
padding: 0 5px;
top: 2px;
right: 0;
font-size: 3.5rem;
color: #333;
background-color: #fff1f0;
z-index: 999999;
}
}
.news-content {
......@@ -217,7 +227,7 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios {
.tabs-parent {
position: relative;
font-size: 1.7rem;
font-size: 1.6rem;
white-space: nowrap;
background-color: #fff1f0;
padding: .5rem 0;
......@@ -243,7 +253,7 @@ ion-navbar .header-ios .toolbar-ios:last-child .toolbar-background-ios {
cursor: pointer;
height: 3rem;
line-height: 3rem;
width: calc(100% / 4);
width: 7rem;
display: inline-block;
color: #747378;
}
......
import {Injectable} from '@angular/core';import {BehaviorSubject, Subscription} from 'rxjs'; @Injectable()export class AppMainService { private roleSource:BehaviorSubject<any> = new BehaviorSubject([]); public role = this.roleSource.asObservable(); //权限赋值 public setRole(value: string){ this.roleSource.next(value); console.log(value); } }
\ No newline at end of file
import {Injectable} from '@angular/core';import {BehaviorSubject, Subscription} from 'rxjs'; @Injectable()export class AppMainService { private roleSource:BehaviorSubject<any> = new BehaviorSubject([]); public role = this.roleSource.asObservable(); private mineSource:BehaviorSubject<any> = new BehaviorSubject({}); public mineInfo = this.mineSource.asObservable(); //权限赋值 public setRole(value: string){ this.roleSource.next(value); console.log(value); } //个人信息 public setInfo(value: any){ this.mineSource.next(value); console.log(value); } }
\ No newline at end of file
......
<ion-content>
<div class="padding-20-10">
<ion-row>
<ion-col col-4 *ngFor="let item of list" (click)="choose = item">
<div class="item-style" [ngClass]="choose == item?'select':''">
{{item}}
<ion-col col-4 *ngFor="let item of list" (click)="chooseItem(item)">
<div class="item-style" [ngClass]="type == item.type?'select':''">
{{item.name}}
</div>
</ion-col>
</ion-row>
......
......@@ -8,7 +8,7 @@ filter {
}
.select{
background-color: #fdf8f2;
border: 1px solid #e42417;
border: 1px solid #fdf8f2;
color: #e42417;
}
}
......@@ -5,22 +5,32 @@ import {NavParams, ViewController} from "ionic-angular";
selector: 'filter',
templateUrl: 'filter.html'
})
/**
* list = [ { name:"xxx",type:"yyy" } ]
*/
export class FilterComponent {
list = [];
choose;
type;
constructor(private params: NavParams,
private viewCtrl: ViewController) {
this.list = this.params.get("list");
this.choose = this.params.get("choose");
this.type = this.params.get("type");
console.log(this.type);
}
dismiss() {
const data = {
choose:this.choose
chooseItem(item){
this.type = item.type;
this.choose = item;
}
this.viewCtrl.dismiss(data);
dismiss() {
this.viewCtrl.dismiss(this.choose);
}
}
......@@ -21,10 +21,6 @@
<label class="label2-2">离沪报备</label>
<img class="new-logo" *ngIf="hasNew.premanager == 1" src="./assets/imgs/new.png">
</div>
<div class="card" (click)="goDuty()">
<img src="./assets/imgs/home/icon-zbqk.png" alt="">
<label class="label2-2">值班情况</label>
</div>
<ng-container *ngIf="role.includes(1) || role.includes(5) || role.includes(2) || role.includes(3)">
<div class="card" (click)="goActivityTrack()">
<img src="./assets/imgs/home/icon-hdgz.png" alt="">
......
......@@ -102,11 +102,6 @@ export class MoreAppPage {
this.navCtrl.push("ReportTrackPage");
}
//值班情况
goDuty() {
this.navCtrl.push("DutyPage");
}
goToMySurvey() {
this.navCtrl.push('SurveryPage');
}
......
......@@ -36,8 +36,8 @@
<div class="type-div">
<div class="type-list">
<ng-container *ngFor="let item of typeList">
<div class="type" [ngStyle]="{'color':obj.type == item?'#e42417':''}" (click)="filterType(item)">
{{item}}
<div class="type" [ngStyle]="{'color':obj.type == item.type?'#e42417':''}" (click)="filterType(item)">
{{item.name}}
</div>
</ng-container>
</div>
......
......@@ -44,10 +44,10 @@ export class GoodsCollectPage {
constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, private modalCtrl: ModalController,
private commonSer: CommonService,private appMainSer:AppMainService) {
private commonSer: CommonService, private appMainSer: AppMainService) {
}
ionViewDidLoad(){
ionViewDidLoad() {
this.getList();
this.getTypeList();
//获取权限
......@@ -63,7 +63,7 @@ export class GoodsCollectPage {
}
filterType(item) {
this.obj.type = item;
this.obj.type = item.type;
this.getList();
}
......@@ -87,20 +87,26 @@ export class GoodsCollectPage {
getTypeList() {
this.serveSer.getTypeList().subscribe(
(res) => {
this.typeList = res.data;
this.typeList = res.data.map(e => {
const data = {
name: e,
type: e,
};
return data;
});
}
)
}
//打开过滤条件
fliter() {
let modal = this.modalCtrl.create(FilterComponent, {list: this.typeList, choose: this.obj.type}, {
let modal = this.modalCtrl.create(FilterComponent, {list: this.typeList, type: this.obj.type}, {
enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave'
});
modal.onDidDismiss(data => {
if (data) {
this.filterType(data.choose);
this.filterType(data);
}
});
modal.present();
......
......@@ -36,12 +36,15 @@
上午
</div>
<div class="morning-room">
<span (click)="goApplyEdit(item1)" *ngFor="let item1 of room?.morningUse">
<ng-container *ngFor="let item1 of room?.morningUse">
<span *ngIf="role.includes(9) || item1.userName == mineInfo?.username" (click)="goApplyEdit(item1)">
<span *ngIf="item1.startEnd == 1">9:00-10:00</span>
<span *ngIf="item1.startEnd == 2">10:00-11:00</span>
<span *ngIf="item1.startEnd == 3">11:00-12:00</span>
{{item1.userName}}
(已预定)
</span>
</ng-container>
</div>
</div>
<div class="afternoon">
......@@ -49,12 +52,15 @@
下午
</div>
<div class="morning-room">
<span (click)="goApplyEdit(item2)" *ngFor="let item2 of room?.afternoonUse">
<ng-container *ngFor="let item2 of room?.afternoonUse">
<span *ngIf="role.includes(9) || item2.userName == mineInfo?.username" (click)="goApplyEdit(item2)" >
<span *ngIf="item2.startEnd == 4">14:00-15:00</span>
<span *ngIf="item2.startEnd == 5">15:00-16:00</span>
<span *ngIf="item2.startEnd == 6">16:00-17:00</span>
{{item2.userName}}
(已预定)
</span>
</ng-container>
</div>
</div>
</div>
......
......@@ -8,6 +8,7 @@ import {DatePipe} from "@angular/common";
import {CommonService} from "../../../provide/common.service";
import {HairApplyPage} from "./hair-apply/hair-apply";
import {AppMainService} from "../../../app/app.service";
import {TabsService} from "../../tabs/tabs.service";
@IonicPage()
......@@ -37,12 +38,14 @@ export class HairCutPage {
total;
isLoad = true;
mineInfo; //登录人信息
constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public datePipe: DatePipe,
private serveSer: ServeService, public datePipe: DatePipe, private tabSer: TabsService,
private commonSer: CommonService, private appMainSer: AppMainService) {
}
ionViewDidEnter() {
ionViewDidLoad() {
const date = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
this.getApply(date);
this.myApply();
......@@ -52,6 +55,13 @@ export class HairCutPage {
this.role = value;
}
);
//获取个人信息
this.appMainSer.mineInfo.subscribe(value => {
this.mineInfo = value;
})
}
//获取预定日程
......@@ -105,6 +115,7 @@ export class HairCutPage {
//编辑申请
goApplyEdit(item) {
if (this.role.includes(9)) return false;
this.navCtrl.push(HairApplyPage, {id: item.id});
}
......
......@@ -2,12 +2,12 @@
<ion-navbar>
<ion-title>会议室预定</ion-title>
<ion-buttons end>
<button ion-button (click)="addOrder()">
<ion-buttons end *ngIf="role.includes(7) || role.includes(1)">
<button ion-button (click)="goApply()">
<ion-icon class="top-right-icon icon-fabu iconfont"></ion-icon>
</button>
</ion-buttons>
<ion-buttons end *ngIf="role.includes(1) || role.includes(6)">
<ion-buttons end *ngIf="role.includes(7)">
<button ion-button icon-only (click)="goDeal()" class="toolbar-icon">
<span style="font-size: 2.5rem" class="top-right-icon icon iconfont icon-shenhe"></span>
</button>
......
......@@ -29,6 +29,7 @@ export class MeetRoomPage {
};
role = [];
mineInfo;
room;
applyList = [];
......@@ -42,7 +43,7 @@ export class MeetRoomPage {
private commonSer: CommonService,private appMainSer:AppMainService) {
}
ionViewDidEnter() {
ionViewDidLoad() {
const date = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
this.getApply(date);
this.myApply();
......@@ -52,6 +53,11 @@ export class MeetRoomPage {
this.role = value;
}
);
//获取个人信息
this.appMainSer.mineInfo.subscribe(value => {
this.mineInfo = value;
})
}
//获取预定日程
......@@ -93,11 +99,6 @@ export class MeetRoomPage {
)
}
//新增预定
addOrder() {
this.navCtrl.push(RoomApplyPage);
}
//审核
goDeal(){
this.navCtrl.push(RoomDealPage);
......@@ -110,11 +111,15 @@ export class MeetRoomPage {
//编辑申请
goApplyEdit(item) {
if(this.role.includes(0)) return false; //普通人不可编辑
if(this.role.includes(1) && item.orgName != this.mineInfo.orgName) return false; //内勤只能编辑本处室的
this.navCtrl.push(RoomApplyPage, {id: item.applyId});
}
//新增申请
goApply() {
if(this.role.includes(0)) return false;
this.navCtrl.push(RoomApplyPage);
}
......
......@@ -11,7 +11,7 @@
<div class="padding-6">
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>用车时间:</ion-label>
<ion-datetime cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm"
<ion-datetime [disabled]="type == 'deal' " cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm"
pickerFormat="YYYY MM DD HH mm" placeholder="请选择"
[(ngModel)]="obj.startTime"></ion-datetime>
<ion-label class="right-arrow">
......@@ -21,29 +21,29 @@
</ion-item>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>还车时间:</ion-label>
<ion-datetime cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm"
<ion-datetime [disabled]="type == 'deal' " cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD HH:mm"
pickerFormat="YYYY MM DD HH mm" placeholder="请选择"
[(ngModel)]="obj.endTime"></ion-datetime>
<ion-label class="right-arrow">
<ion-icon name="arrow-forward"></ion-icon>
</ion-label>
<ion-label *ngIf="checkObj.endTime" class="check-tips">请选择开始时间</ion-label>
<ion-label *ngIf="checkObj.endTime" class="check-tips">请选择还车时间</ion-label>
</ion-item>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>用车人数:</ion-label>
<ion-input [(ngModel)]="obj.passengerCount" type="text" maxlength="20"
<ion-input [disabled]="type == 'deal' " [(ngModel)]="obj.passengerCount" type="text" maxlength="20"
[placeholder]="'请输入'"></ion-input>
<ion-label *ngIf="checkObj.passengerCount" class="check-tips">选择开始时间</ion-label>
<ion-label *ngIf="checkObj.passengerCount" class="check-tips">输入用车人数</ion-label>
</ion-item>
<div class="item-box">
<div class="left"><span class="color-red">*</span>使用人:
</div>
<div class="right">
<button color="danger" ion-button small (click)="choose()">选择</button>
<button *ngIf="type != 'deal' " style="margin-bottom: 10px" color="danger" ion-button small (click)="choose()">选择</button>
<div class="div-tag">
<span *ngFor="let item of personList;let i = index">
{{item.userName}}
<ion-icon (click)="removePerson(i)" name="close"></ion-icon>
<ion-icon *ngIf="type != 'deal' " (click)="removePerson(i)" name="close"></ion-icon>
</span>
</div>
</div>
......@@ -51,8 +51,8 @@
</div>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>用车事由:</ion-label>
<ion-label class="choose" (click)="chooseReason()">{{obj.useText}}</ion-label>
<ion-label class="right-arrow">
<ion-label class="choose" >{{obj.useText}}</ion-label>
<ion-label *ngIf="type != 'deal' " class="right-arrow" (click)="chooseReason()">
<ion-icon name="arrow-forward"></ion-icon>
</ion-label>
<ion-label *ngIf="checkObj.useReason" class="check-tips">请选择用车事由</ion-label>
......@@ -60,73 +60,14 @@
<div class="item-box">
<div class="left"><span class="color-red">*</span>起讫地点:</div>
<div class="right">
<ion-textarea [(ngModel)]="obj.fromTo"></ion-textarea>
<ion-textarea [disabled]="type == 'deal' " [(ngModel)]="obj.fromTo"></ion-textarea>
</div>
<ion-label *ngIf="checkObj.fromTo" class="check-tips">请输入起讫地点</ion-label>
</div>
</div>
<ng-container *ngIf="applyId && type == 'deal'">
<div class="padding-6">
<div class="item-box">
<div class="left"><span class="color-red">*</span>用车方式:</div>
<div class="right">
<ion-segment [(ngModel)]="opObj.isOwner">
<ion-segment-button value="1">
单位
</ion-segment-button>
<ion-segment-button value="0">
租赁
</ion-segment-button>
</ion-segment>
</div>
</div>
<ng-container *ngIf="opObj.isOwner == 1">
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>司机:</ion-label>
<ion-select [(ngModel)]="opObj.driverName" cancelText="取消" okText="确定" placeholder="请选择">
<ion-option *ngFor="let item of driverList" [value]="item.name">{{item.name}}</ion-option>
</ion-select>
<ion-label *ngIf="checkObj.startTime" class="check-tips">请选择开始时间</ion-label>
</ion-item>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>车牌号:</ion-label>
<ion-select [(ngModel)]="opObj.carNumber" cancelText="取消" okText="确定" placeholder="请选择">
<ion-option *ngFor="let item of carList"
[value]="item.carNumber">{{item.carNumber}}</ion-option>
</ion-select>
<ion-label *ngIf="checkObj.startTime" class="check-tips">请选择开始时间</ion-label>
</ion-item>
</ng-container>
<ng-container *ngIf="opObj.isOwner == 0">
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>公司名称:</ion-label>
<ion-input [(ngModel)]="opObj.carOrg" placeholder="请输入租赁公司名称" type="text"
maxlength="20"></ion-input>
<ion-label *ngIf="checkOpObj.carOrg" class="check-tips">请选择开始时间</ion-label>
</ion-item>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>司机姓名:</ion-label>
<ion-input [(ngModel)]="opObj.driverName" placeholder="请输入司机姓名" type="text"
maxlength="20"></ion-input>
<ion-label *ngIf="checkOpObj.driverName" class="check-tips">请输入司机姓名</ion-label>
</ion-item>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>联系电话:</ion-label>
<ion-input [(ngModel)]="opObj.mobile" placeholder="请输入联系电话" type="text" maxlength="20"></ion-input>
<ion-label *ngIf="checkOpObj.mobile" class="check-tips">请选择开始时间</ion-label>
</ion-item>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>车牌号:</ion-label>
<ion-input [(ngModel)]="opObj.carNumber" placeholder="请输入车牌号" type="text"
maxlength="20"></ion-input>
<ion-label *ngIf="checkOpObj.carNumber" class="check-tips">请选择开始时间</ion-label>
</ion-item>
</ng-container>
</div>
<button class="submit-btn submit" (click)="submitOp(2)">通过</button>
<button class="submit-btn submit" (click)="submitOp(3)">退回</button>
<page-driver [applyId]="applyId"></page-driver>
</ng-container>
<button *ngIf="!applyId || type == 'edit'" class="submit-btn submit" (click)="submit()">提交</button>
......
......@@ -5,6 +5,7 @@ page-car-apply {
font-weight: bold;
font-size: 1.4rem;
flex: none;
opacity: 1;
}
.item-ios.item-block .item-inner {
......@@ -73,8 +74,6 @@ page-car-apply {
padding: 11px 8px 11px 16px;
.div-tag {
padding: 10px 0;
span {
display: inline-block;
margin-right: 10px;
......
......@@ -31,23 +31,6 @@ export class CarApplyPage {
fromTo: false,
};
opObj = {
isOwner:<any> "1", //是否是内部车辆(1是,0否)
driverName: '',
carNumber: '',
carOrg: '',
mobile: '',
};
checkOpObj = {
driverName: false,
carNumber: false,
carOrg: false,
mobile: false,
};
carList = [];
driverList = [];
personList = [];
applyId; //是否编辑
type;
......@@ -61,9 +44,9 @@ export class CarApplyPage {
ionViewDidLoad() {
this.applyId = this.navParams.get('id');
this.type = this.navParams.get('type');
console.log(this.type);
if (this.applyId) {
this.meetDetail();
this.getList();
}
}
......@@ -91,20 +74,6 @@ export class CarApplyPage {
)
}
//会议室列表,部领导列表,处室列表
getList() {
this.serveSer.getCarList().subscribe(
(res) => {
this.carList = res.data;
}
);
this.serveSer.getDriverList().subscribe(
(res) => {
this.driverList = res.data;
}
);
}
//选择事由
chooseReason() {
const buttonsArr = [
......@@ -236,55 +205,4 @@ export class CarApplyPage {
});
}
//提交审核
submitOp(status) {
let data;
const data_company = {
applyId: this.applyId,
driverName: this.opObj.driverName,
carNumber: this.opObj.carNumber,
status: status,
isOwner: Number(this.opObj.isOwner)
};
const data_lease = {
applyId: this.applyId,
driverName: this.opObj.driverName,
carNumber: this.opObj.carNumber,
carOrg: this.opObj.carOrg,
mobile: this.opObj.mobile,
status: status,
isOwner: Number(this.opObj.isOwner)
};
data = this.opObj.isOwner == "1" ? data_company : data_lease;
//校验
let checkBool = false;
for (let i in data) {
if (!data[i]) {
checkBool = true;
this.checkOpObj[i] = true;
} else {
this.checkOpObj[i] = false;
}
}
if (checkBool){
this.commonSer.toast("请输入必填项!");
return false;
}
this.commonSer.alert('确认提交?',()=>{
this.serveSer.carOperate(data).subscribe(
(res) => {
if (res.errcode == 1000) {
this.commonSer.toast('审核成功');
this.navCtrl.pop();
} else {
this.commonSer.toast(res.errmsg);
}
}
)
});
}
}
<div class="padding-6">
<div class="item-box">
<div class="left"><span class="color-red">*</span>用车方式:</div>
<div class="right">
<ion-segment [(ngModel)]="opObj.isOwner">
<ion-segment-button value="1">
单位
</ion-segment-button>
<ion-segment-button value="0">
租赁
</ion-segment-button>
</ion-segment>
</div>
</div>
<ng-container *ngIf="opObj.isOwner == 1">
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>司机:</ion-label>
<ion-select [(ngModel)]="opObj.driverName" cancelText="取消" okText="确定" placeholder="请选择">
<ion-option *ngFor="let item of driverList" [value]="item.name">{{item.name}}</ion-option>
</ion-select>
<ion-label *ngIf="checkOpObj.driverName" class="check-tips">请选择司机</ion-label>
</ion-item>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>车牌号:</ion-label>
<ion-select [(ngModel)]="opObj.carNumber" cancelText="取消" okText="确定" placeholder="请选择">
<ion-option *ngFor="let item of carList"
[value]="item.carNumber">{{item.carNumber}}</ion-option>
</ion-select>
<ion-label *ngIf="checkOpObj.carNumber" class="check-tips">请选择车牌号</ion-label>
</ion-item>
</ng-container>
<ng-container *ngIf="opObj.isOwner == 0">
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>公司名称:</ion-label>
<ion-input [(ngModel)]="opObj.carOrg" placeholder="请输入租赁公司名称" type="text"
maxlength="20"></ion-input>
<ion-label *ngIf="checkOpObj.carOrg" class="check-tips">请选择开始时间</ion-label>
</ion-item>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>司机姓名:</ion-label>
<ion-input [(ngModel)]="opObj.driverName" placeholder="请输入司机姓名" type="text"
maxlength="20"></ion-input>
<ion-label *ngIf="checkOpObj.driverName" class="check-tips">请输入司机姓名</ion-label>
</ion-item>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>联系电话:</ion-label>
<ion-input [(ngModel)]="opObj.mobile" placeholder="请输入联系电话" type="text" maxlength="20"></ion-input>
<ion-label *ngIf="checkOpObj.mobile" class="check-tips">请选择开始时间</ion-label>
</ion-item>
<ion-item>
<ion-label class="item-left"><span class="color-red">*</span>车牌号:</ion-label>
<ion-input [(ngModel)]="opObj.carNumber" placeholder="请输入车牌号" type="text"
maxlength="20"></ion-input>
<ion-label *ngIf="checkOpObj.carNumber" class="check-tips">请选择开始时间</ion-label>
</ion-item>
</ng-container>
</div>
<button class="submit-btn submit" (click)="submitOp(2)">通过</button>
<button class="submit-btn submit" (click)="submitOp(3)">退回</button>
import {Component, Input} from '@angular/core';
import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {CommonService} from "../../../../provide/common.service";
import {ServeService} from "../../serve.service";
@Component({
selector: 'page-driver',
templateUrl: 'driver.html',
})
export class DriverPage {
@Input() applyId;
opObj = {
isOwner: <any>"1", //是否是内部车辆(1是,0否)
driverName: '',
carNumber: '',
carOrg: '',
mobile: '',
};
checkOpObj = {
driverName: false,
carNumber: false,
carOrg: false,
mobile: false,
};
carList = [];
driverList = [];
constructor(public navCtrl: NavController, public navParams: NavParams,
private commonSer: CommonService, private serveSer: ServeService) {
this.getList();
}
//车辆 司机
getList() {
this.serveSer.getCarList().subscribe(
(res) => {
this.carList = res.data;
}
);
this.serveSer.getDriverList().subscribe(
(res) => {
this.driverList = res.data;
}
);
}
//提交审核
submitOp(status) {
let data;
const data_company = {
applyId: this.applyId,
driverName: this.opObj.driverName,
carNumber: this.opObj.carNumber,
status: status,
isOwner: Number(this.opObj.isOwner)
};
const data_lease = {
applyId: this.applyId,
driverName: this.opObj.driverName,
carNumber: this.opObj.carNumber,
carOrg: this.opObj.carOrg,
mobile: this.opObj.mobile,
status: status,
isOwner: Number(this.opObj.isOwner)
};
data = this.opObj.isOwner == "1" ? data_company : data_lease;
//校验
let checkBool = false;
for (let i in data) {
if (!data[i]) {
checkBool = true;
this.checkOpObj[i] = true;
} else {
this.checkOpObj[i] = false;
}
}
if (checkBool) {
this.commonSer.toast("请输入必填项!");
return false;
}
this.commonSer.alert('确认提交?', () => {
this.serveSer.carOperate(data).subscribe(
(res) => {
if (res.errcode == 1000) {
this.commonSer.toast('审核成功');
this.navCtrl.pop();
} else {
this.commonSer.toast(res.errmsg);
}
}
)
});
}
}
......@@ -7,7 +7,7 @@
<ion-icon class="top-right-icon icon-fabu iconfont"></ion-icon>
</button>
</ion-buttons>
<ion-buttons end *ngIf="role.includes(1) || role.includes(6)">
<ion-buttons end *ngIf="role.includes(8) || role.includes(3)">
<button ion-button icon-only (click)="goDeal()" class="toolbar-icon">
<span style="font-size: 2.5rem" class="top-right-icon icon iconfont icon-shenhe"></span>
</button>
......@@ -36,7 +36,8 @@
<div class="room">
<div class="already">
<p>已审核</p>
<div *ngFor="let done of checkObj.checkedApplyList" class="morning">
<ng-container *ngFor="let done of checkObj.checkedApplyList">
<div *ngIf="role.includes(8) || mineInfo?.username == done.applicantName" class="morning">
<div>
申请部门:<span>{{done.orgName}}</span>
</div>
......@@ -47,10 +48,12 @@
</div>
<div>申请时间:<span>{{done.applyTime | date:"yyyy-MM-dd HH:mm"}}</span></div>
</div>
</ng-container>
</div>
<div class="notYet">
<p>待审核</p>
<div *ngFor="let no of checkObj.uncheckApplyist" class="morning">
<ng-container *ngFor="let no of checkObj.uncheckApplyist">
<div *ngIf="role.includes(8) || mineInfo?.username == done.applicantName" class="morning">
<div>
申请部门:<span>{{no.orgName}}</span>
</div>
......@@ -61,6 +64,7 @@
</div>
<div>申请时间:<span>{{no.applyTime | date:"yyyy-MM-dd HH:mm"}}</span></div>
</div>
</ng-container>
</div>
</div>
</ng-container>
......
......@@ -4,22 +4,24 @@ import {UseCarPage} from './use-car';
import {CarApplyPage} from "./car-apply/car-apply";
import {CalendarModule} from "ion2-calendar";
import {CarDealPage} from "./car-deal/car-deal";
import {DriverPage} from "./driver/driver";
@NgModule({
declarations: [
UseCarPage,
CarApplyPage,
CarDealPage,
DriverPage
],
imports: [
CalendarModule,
IonicPageModule.forChild(UseCarPage),
],
exports: [
],
exports: [],
entryComponents: [
CarApplyPage,
CarDealPage,
DriverPage
]
})
export class UseCarPageModule {
......
......@@ -32,6 +32,7 @@ export class UseCarPage {
room;
applyList = [];
role = [];
mineInfo;
pageNumber = 1;
pageSize = AppGlobal.pageCount;
......@@ -41,14 +42,14 @@ export class UseCarPage {
checkObj = {
checkedApplyList:[], //已审核
uncheckApplyist:[] //未审核
}
};
constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public datePipe: DatePipe,
private commonSer: CommonService, private appMainSer: AppMainService) {
}
ionViewDidEnter() {
ionViewDidLoad() {
const date = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
this.getApply(date);
this.myApply();
......@@ -58,6 +59,11 @@ export class UseCarPage {
this.role = value;
}
);
//获取个人信息
this.appMainSer.mineInfo.subscribe(value => {
this.mineInfo = value;
})
}
//获取预定日程
......
......@@ -56,18 +56,20 @@
<div class="fixed-toolbar parent-toolbar">
<div class="tabs-fixed ">
<div #scrollTab class="scroll-tab">
<ion-icon *ngIf="!toRight" class="icon-left" name="arrow-back"></ion-icon>
<ion-icon *ngIf="toRight" class="icon-right" name="arrow-forward"></ion-icon>
<div #newContentParent (scroll)="dragTo($event)" class="news-content parent">
<div #tabsParent class="tabs-parent parent">
<div #tabsChildren *ngFor="let item of tabsList;" (click)="changeParent(item)"
class="tabs-children">
<span #tabSpan
[style.color]="indexParent == item.indexParent ? '#e12724':''">{{item.name}}</span>
<span #tabSpan [style.color]="indexParent == item.indexParent ? '#e12724':''">
{{item.name}}
</span>
</div>
<span #tips id="tips"></span>
</div>
</div>
<span class="more" (click)="moreTab()">
<ion-icon name="list"></ion-icon>
</span>
</div>
</div>
</div>
......
import {Component, ElementRef, HostListener, NgZone, Renderer2, ViewChild} from '@angular/core';
import {Content, InfiniteScrollContent, IonicPage, NavController, NavParams, Slide, Slides} from 'ionic-angular';
import {
Content,
InfiniteScrollContent,
IonicPage,
ModalController,
NavController,
NavParams,
Slide,
Slides
} from 'ionic-angular';
import {SearchNewPage} from "../../home-pages/search-new/search-new";
import {TabsService} from "../tabs.service";
import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail";
......@@ -11,6 +20,7 @@ import {CommonService} from "../../../provide/common.service";
import {SwiperComponent} from "../../../components/swiper/swiper";
import {timer} from "rxjs/observable/timer";
import {Storage} from "@ionic/storage";
import {FilterComponent} from "../../../components/filter/filter";
declare let Swiper: any;
......@@ -223,7 +233,7 @@ export class DiscoverPage {
constructor(public navCtrl: NavController, public navParams: NavParams,
public commonSer: CommonService, public renderer: Renderer2,
public zone: NgZone, public storage: Storage,
public zone: NgZone, public storage: Storage,private modalCtrl: ModalController,
public tabsSer: TabsService, public emitSer: EmitService) {
// 接收发射过来的数据
this.emitSer.eventEmit.subscribe((value: any) => {
......@@ -241,7 +251,7 @@ export class DiscoverPage {
this.getBanner();
this.scrollHeight();
timer(20).subscribe(() => {
this.itemWidth = window.screen.width / 4;
this.itemWidth = '84';
this.spanWidth = this.tabSpan.nativeElement.offsetWidth; //文字宽度
this.changeParent(this.tabsList[0])
});
......@@ -590,6 +600,7 @@ export class DiscoverPage {
}
}
//加载视频
loadVideo(e) {
const scale = 0.8;
const canvas = document.createElement('canvas');
......@@ -607,5 +618,19 @@ export class DiscoverPage {
}
}
//多模块
moreTab(){
let modal = this.modalCtrl.create(FilterComponent, {list: this.tabsList, type: this.obj.plateType}, {
enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave'
});
modal.onDidDismiss(data => {
if (data) {
this.changeParent(data)
}
});
modal.present();
}
}
......@@ -90,8 +90,9 @@
</div>
<!--true 隐藏 false 显示-->
<div [hidden]="isScroll" class="scroll-tab">
<ion-icon *ngIf="!toRight" class="icon-left" name="arrow-back"></ion-icon>
<ion-icon *ngIf="toRight" class="icon-right" name="arrow-forward"></ion-icon>
<span class="more" (click)="moreTab()">
<ion-icon name="list"></ion-icon>
</span>
<div (scroll)="dragTo($event)" class="news-content parent">
<div #tabsParent class="tabs-parent parent">
<div *ngFor="let item of tabsList;let i = index" (click)="change(item)" class="tabs-children">
......@@ -103,8 +104,9 @@
</div>
<div [hidden]="!isScroll" class="scroll-tab">
<ion-icon *ngIf="!toRight" class="icon-left" name="arrow-back"></ion-icon>
<ion-icon *ngIf="toRight" class="icon-right" name="arrow-forward"></ion-icon>
<span class="more" (click)="moreTab()">
<ion-icon name="list"></ion-icon>
</span>
<!--固定 false -->
<div (scroll)="dragTo($event)" ion-fixed class="news-content ion-fixed parent">
<div class="tabs-parent parent">
......
import {Component, ElementRef, ViewChild, NgZone, Renderer2, Input, ViewChildren, QueryList} from '@angular/core';
import {NavController, IonicPage, Slides, Content, InfiniteScrollContent, FabList, FabContainer} from 'ionic-angular';
import {
NavController,
IonicPage,
Slides,
Content,
InfiniteScrollContent,
FabList,
FabContainer,
ModalController
} from 'ionic-angular';
import {Http, Response} from '@angular/http';
import {AppService, AppGlobal} from '../../../service/http.service';
import {Storage} from '@ionic/storage';
......@@ -10,6 +19,7 @@ import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail";
import {EmitService} from "../../../provide/emit.service";
import {DatePipe} from "@angular/common";
import {SwiperComponent} from "../../../components/swiper/swiper";
import {FilterComponent} from "../../../components/filter/filter";
declare let Swiper: any;
......@@ -84,7 +94,7 @@ export class HomePage {
constructor(public navCtrl: NavController, public datePipe: DatePipe,
public commonSer: CommonService, public emitSer: EmitService,
public zone: NgZone, public tabSer: TabsService,
public renderer: Renderer2,
public renderer: Renderer2, private modalCtrl: ModalController,
public appService: AppService, public http: Http, public storage: Storage,
public badge: Badge, public tabsSer: TabsService) {
// 接收发射过来的数据
......@@ -106,9 +116,7 @@ export class HomePage {
}
public dragTo(e) {
console.log(e)
if (e.target.scrollLeft > window.screen.width / 4 -4) {
if (e.target.scrollLeft > window.screen.width / 4 - 4) {
this.toRight = false;
} else {
this.toRight = true;
......@@ -128,7 +136,7 @@ export class HomePage {
ionViewDidLoad() {
this.getBanner();
this.itemWidth = window.screen.width / 4;
this.itemWidth = '84';
this.spanWidth = this.tabsParent.nativeElement.children[0].children[0].offsetWidth; //文字宽度
this.tips.nativeElement.style.width = this.spanWidth + 'px';
this.tips1.nativeElement.style.width = this.spanWidth + 'px';
......@@ -431,4 +439,18 @@ export class HomePage {
e.stopPropagation();
}
//多模块
moreTab() {
let modal = this.modalCtrl.create(FilterComponent, {list: this.tabsList, choose: this.plateType}, {
enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave'
});
modal.onDidDismiss(data => {
if (data) {
this.change(data)
}
});
modal.present();
}
}
<ion-header>
<ion-navbar>
<ion-title>一键通</ion-title>
<ion-title>行政后勤"一键通"</ion-title>
</ion-navbar>
</ion-header>
......@@ -31,41 +31,45 @@
</div>
</div>
<div (click)="goTo('LearningListPage')">
<div class="card">
<img src="./assets/imgs/home/icon-fkdj.png">
<label class="label2-2 more2-2">访客登记</label>
</div>
<!-- <div (click)="goTo('LearningListPage')">-->
<!-- <div class="card">-->
<!-- <img src="./assets/imgs/home/icon-fkdj.png">-->
<!-- <label class="label2-2 more2-2">访客登记</label>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div (click)="goTo('LearningListPage')">-->
<!-- <div class="card">-->
<!-- <img src="./assets/imgs/home/icon-yjbx.png">-->
<!-- <label class="label2-2 more2-2">一键保修</label>-->
<!-- </div>-->
</div>
<div (click)="goTo('LearningListPage')">
<div class="card">
<img src="./assets/imgs/home/icon-yjbx.png">
<label class="label2-2 more2-2">一键保修</label>
</div>
</div>
<!-- </div>-->
<div (click)="goTo('HairCutPage')">
<div class="card">
<img src="./assets/imgs/home/icon-yylf.png">
<label class="label2-2 more2-2">预约理发</label>
</div>
</div>
<div (click)="goTo('LearningListPage')">
<div (click)="goTo('DutyPage')">
<div class="card">
<img src="./assets/imgs/home/icon-ywzd.png">
<label class="label2-2 more2-2">业务制度</label>
</div>
<img src="./assets/imgs/home/icon-zbgl.png">
<label class="label2-2 more2-2">值班管理</label>
</div>
<div (click)="goTo('LearningListPage')">
<div class="card">
<img src="./assets/imgs/home/icon-zcgl.png">
<label class="label2-2 more2-2">资产管理</label>
</div>
<!-- <div (click)="goTo('LearningListPage')">-->
<!-- <div class="card">-->
<!-- <img src="./assets/imgs/home/icon-ywzd.png">-->
<!-- <label class="label2-2 more2-2">业务制度</label>-->
<!-- </div>-->
</div>
<!-- </div>-->
<!-- <div (click)="goTo('LearningListPage')">-->
<!-- <div class="card">-->
<!-- <img src="./assets/imgs/home/icon-zcgl.png">-->
<!-- <label class="label2-2 more2-2">资产管理</label>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</ion-content>
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import {AppMainService} from "../../../app/app.service";
import {TabsService} from "../tabs.service";
@IonicPage()
......@@ -9,11 +11,17 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular';
})
export class KeyPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {
constructor(public navCtrl: NavController, public navParams: NavParams,
private appMainSer:AppMainService,private tabSer:TabsService) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad KeyPage');
//获取当前登录人信息
this.tabSer.getUserIntegral().subscribe(
(res) => {
this.appMainSer.setInfo(res.data);
}
);
}
//前往
......
......@@ -15,7 +15,7 @@
</ion-header>
<ion-content>
<div #item3 class="item3 item-notice">
<img style="border-top-left-radius: 5px;border-top-right-radius: 5px" src="./assets/imgs/notice_bg.jpg" alt="">
<img (click)="goTo('KeyPage')" style="border-top-left-radius: 5px;border-top-right-radius: 5px" src="./assets/imgs/notice_bg.png" alt="">
<div class="item3-2" (click)="goToNotice()">
<ion-col col-2 class="card3">
<span *ngIf="hasNew.message == 1" class="img-tips"></span>
......
......@@ -30,13 +30,6 @@ export class TabsPage {
tabsIndex;
role: any;
key = {
root: KeyPage,
tabTitle: '',
tabIconOn: 'tab-key',
tabIconOff: 'tab-key',
index: 2
};
serve = {
root: ServePage,
tabTitle: '服务',
......@@ -78,7 +71,7 @@ export class TabsPage {
(res) => {
const mineInfo = res.data;
if (mineInfo.orgName != "退休人员") {
this.tabRoots.push(this.key, this.serve, this.mine);
this.tabRoots.push( this.serve, this.mine);
} else {
this.tabRoots.push(this.mine);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment