Commit fca66d76 authored by wangqinghua's avatar wangqinghua

update

parent 536d5cd2
...@@ -19,7 +19,7 @@ export class FoodApplyPage { ...@@ -19,7 +19,7 @@ export class FoodApplyPage {
peopleCount: '', peopleCount: '',
standard: '', standard: '',
standardText: '请选择', standardText: '请选择',
amount: '请选择', amount: '',
remark: '', remark: '',
}; };
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<ng-container *ngIf="changeType == 2"> <ng-container *ngIf="changeType == 2">
<span float-end *ngIf="item.status == 1">已提交</span> <span float-end *ngIf="item.status == 1">已提交</span>
<span float-end *ngIf="item.status == 2">已审核</span> <span float-end *ngIf="item.status == 2">已审核</span>
<span float-end *ngIf="item.status == 2">已驳回</span> <span float-end *ngIf="item.status == 3">已驳回</span>
</ng-container> </ng-container>
</p> </p>
<p> <p>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<ion-icon style="font-size: 2rem" class="top-right-icon icon-fabu iconfont"></ion-icon> <ion-icon style="font-size: 2rem" class="top-right-icon icon-fabu iconfont"></ion-icon>
</button> </button>
</ion-buttons> </ion-buttons>
<ion-buttons end> <ion-buttons *ngIf="role.includes(11)" end>
<button ion-button icon-only (click)="goDeal()" class="toolbar-icon"> <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> <span style="font-size: 2.5rem" class="top-right-icon icon iconfont icon-shenhe"></span>
</button> </button>
......
import {Component, ViewChild} from '@angular/core'; import {Component, ViewChild} from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular'; import {IonicPage, NavController, NavParams} from 'ionic-angular';
import {CalendarComponent, CalendarComponentOptions} from "ion2-calendar"; import {CalendarComponent, CalendarComponentOptions} from "ion2-calendar";
import {monthCh, weekDay} from "../../../app/main"; import {monthCh, weekDay} from "../../../app/main";
import {AppGlobal} from "../../../service/http.service"; import {AppGlobal} from "../../../service/http.service";
...@@ -13,125 +13,127 @@ import {FoodDealPage} from "./food-deal/food-deal"; ...@@ -13,125 +13,127 @@ import {FoodDealPage} from "./food-deal/food-deal";
@IonicPage() @IonicPage()
@Component({ @Component({
selector: 'page-food', selector: 'page-food',
templateUrl: 'food.html', templateUrl: 'food.html',
}) })
export class FoodPage { export class FoodPage {
@ViewChild('calendar') calendar:CalendarComponent; @ViewChild('calendar') calendar: CalendarComponent;
date; date;
changeType = 1; changeType = 1;
options: CalendarComponentOptions = { options: CalendarComponentOptions = {
from: new Date(2000, 0, 1), from: new Date(2000, 0, 1),
monthFormat: 'YYYY 年 MM 月 ', monthFormat: 'YYYY 年 MM 月 ',
weekdays: weekDay, weekdays: weekDay,
monthPickerFormat: monthCh, monthPickerFormat: monthCh,
pickMode: 'single', pickMode: 'single',
color: 'danger' color: 'danger'
};
role = [];
mineInfo;
room;
applyList = [];
pageNumber = 1;
pageSize = AppGlobal.pageCount;
total;
isLoad = true;
constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public datePipe: DatePipe,
private commonSer: CommonService, private appMainSer: AppMainService) {
console.log(this.calendar);
}
ionViewDidEnter(){
this.myApply();
this.getApply();
}
ionViewDidLoad() {
this.date = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
//获取权限
this.appMainSer.role.subscribe(value => {
this.role = value;
}
);
//获取个人信息
this.appMainSer.mineInfo.subscribe(value => {
this.mineInfo = value;
})
}
//获取预定日程
getApply() {
const data = {'dateStr': this.date};
this.serveSer.mealsQueryByDate(data).subscribe(
(res) => {
this.room = res.data;
}
)
}
getDate(e) {
this.date = e;
this.getApply();
}
//我的预定
myApply() {
const data = {
P_pageNumber: this.pageNumber,
P_pageSize: this.pageSize,
}; };
this.serveSer.myBook(data).subscribe(
(res) => { role = [];
this.isLoad = false; mineInfo;
this.applyList = res.data.list; room;
this.total = res.data.total; applyList = [];
pageNumber = 1;
pageSize = AppGlobal.pageCount;
total;
isLoad = true;
constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, public datePipe: DatePipe,
private commonSer: CommonService, private appMainSer: AppMainService) {
console.log(this.calendar);
}
ionViewDidEnter() {
this.myApply();
this.getApply();
}
ionViewDidLoad() {
this.date = this.datePipe.transform(new Date(), 'yyyy-MM-dd');
//获取权限
this.appMainSer.role.subscribe(value => {
this.role = value;
}
);
//获取个人信息
this.appMainSer.mineInfo.subscribe(value => {
this.mineInfo = value;
})
}
//获取预定日程
getApply() {
const data = {'dateStr': this.date};
this.serveSer.mealsQueryByDate(data).subscribe(
(res) => {
this.room = res.data;
}
)
}
getDate(e) {
this.date = e;
this.getApply();
}
//我的预定
myApply() {
const data = {
P_pageNumber: this.pageNumber,
P_pageSize: this.pageSize,
};
this.serveSer.myBook(data).subscribe(
(res) => {
this.isLoad = false;
this.applyList = res.data.list;
this.total = res.data.total;
}
)
}
//取消预定
removeItem(item) {
this.serveSer.cancelMeals(item.id).subscribe(
(res) => {
if (res.errcode == 1000) {
this.commonSer.toast('取消预定成功');
this.myApply();
} else {
this.commonSer.toast(res.errmsg);
}
}
)
}
//审核
goDeal() {
this.navCtrl.push(FoodDealPage);
}
//改变
change(type) {
this.changeType = type;
if (this.changeType == 1) this.getApply();
if (this.changeType == 2) this.myApply();
}
//编辑申请
goApplyEdit(item) {
if (item.userName == this.mineInfo.username || (this.role.includes(1) && item.orgName == this.mineInfo.orgName)) {
this.navCtrl.push(FoodApplyPage, {id: item.id});
} }
) }
}
//新增申请
//取消预定 goApply() {
removeItem(item) { if (this.role.includes(1) || this.role.includes(11)) {
this.serveSer.cancelMeals(item.id).subscribe( this.navCtrl.push(FoodApplyPage);
(res) => {
if (res.errcode == 1000) {
this.commonSer.toast('取消预定成功');
this.myApply();
} else {
this.commonSer.toast(res.errmsg);
}
} }
) }
}
//审核
goDeal() {
this.navCtrl.push(FoodDealPage);
}
//改变
change(type) {
this.changeType = type;
if (this.changeType == 1) this.getApply();
if (this.changeType == 2) this.myApply();
}
//编辑申请
goApplyEdit(item) {
// if (this.role.includes(0)) return false; //普通人不可编辑
// if (this.role.includes(1) && item.orgName != this.mineInfo.orgName) return false; //内勤只能编辑本处室的
this.navCtrl.push(FoodApplyPage, {id: item.id});
}
//新增申请
goApply() {
this.navCtrl.push(FoodApplyPage);
}
} }
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</div> </div>
</ng-container> </ng-container>
</ion-col> </ion-col>
<ion-col (click)="choose(item)" class="goods-evaluation" col-3> <ion-col *ngIf="item.status == 3" (click)="choose(item)" class="goods-evaluation" col-3>
<span>评价</span> <span>评价</span>
</ion-col> </ion-col>
</ion-row> </ion-row>
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</div> </div>
</ng-container> </ng-container>
</ion-col> </ion-col>
<ion-col col-3> <ion-col col-3 class="take">
<span *ngIf="item.isDelivery == 0">正在备货...</span> <span *ngIf="item.isDelivery == 0">正在备货...</span>
<button *ngIf="item.isDelivery == 1" (click)="delivery(item)" small="true" ion-button <button *ngIf="item.isDelivery == 1" (click)="delivery(item)" small="true" ion-button
color="secondary">发放 color="secondary">发放
......
...@@ -7,25 +7,27 @@ page-goods-verify { ...@@ -7,25 +7,27 @@ page-goods-verify {
border-radius: 8px; border-radius: 8px;
box-shadow: -5px 0px 5px 1px #f2f2f2, 0px -5px 5px 1px #f2f2f2, 5px 0px 5px 1px #f2f2f2, 0px 5px 5px 1px #f2f2f2; box-shadow: -5px 0px 5px 1px #f2f2f2, 0px -5px 5px 1px #f2f2f2, 5px 0px 5px 1px #f2f2f2, 0px 5px 5px 1px #f2f2f2;
.orderTips{ .orderTips {
padding: 15px; padding: 15px;
background-color: #fff1f0; background-color: #fff1f0;
color: #e42417; color: #e42417;
border-top-right-radius: 8px; border-top-right-radius: 8px;
border-top-left-radius: 8px; border-top-left-radius: 8px;
font-size: 1.4rem; font-size: 1.4rem;
ion-checkbox{
ion-checkbox {
vertical-align: bottom; vertical-align: bottom;
margin-right: 5px; margin-right: 5px;
} }
} }
.goodsList{
.goodsList {
padding: 10px; padding: 10px;
border-bottom-right-radius: 8px; border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px; border-bottom-left-radius: 8px;
} }
.model{ .model {
padding: 5px 0; padding: 5px 0;
font-size: 1.4rem; font-size: 1.4rem;
} }
...@@ -123,7 +125,7 @@ page-goods-verify { ...@@ -123,7 +125,7 @@ page-goods-verify {
padding: 0 20px; padding: 0 20px;
} }
.duty{ .duty {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
...@@ -131,18 +133,21 @@ page-goods-verify { ...@@ -131,18 +133,21 @@ page-goods-verify {
height: 36px; height: 36px;
background-color: #fff; background-color: #fff;
} }
.duty div{
.duty div {
width: 50%; width: 50%;
text-align: center; text-align: center;
position: relative; position: relative;
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
} }
.duty-title{
.duty-title {
position: relative; position: relative;
color: #e42417; color: #e42417;
} }
.duty-title::after{
.duty-title::after {
content: ''; content: '';
position: absolute; position: absolute;
width: 100%; width: 100%;
...@@ -151,4 +156,12 @@ page-goods-verify { ...@@ -151,4 +156,12 @@ page-goods-verify {
bottom: -10px; bottom: -10px;
left: 0px; left: 0px;
} }
.take {
font-size: 1.4rem;
color: #666666;
display: flex;
justify-content: center;
align-items: center
}
} }
...@@ -139,6 +139,7 @@ export class MeetRoomPage { ...@@ -139,6 +139,7 @@ export class MeetRoomPage {
roomName: item.name, roomName: item.name,
equipmervice: item.equipmervice, equipmervice: item.equipmervice,
startTime: this.date + ' 9:00:00', startTime: this.date + ' 9:00:00',
accommodation:item.accommodation
}; };
} }
this.navCtrl.push(RoomApplyPage, {data: data}); this.navCtrl.push(RoomApplyPage, {data: data});
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
</span> </span>
</div> </div>
</div> </div>
<ion-label *ngIf="check.personList" class="check-tips">请选择参会人员</ion-label>
</div> </div>
<div class="item-box"> <div class="item-box">
<div class="left">设备:</div> <div class="left">设备:</div>
......
...@@ -95,6 +95,7 @@ export class RoomApplyPage { ...@@ -95,6 +95,7 @@ export class RoomApplyPage {
this.obj.startTime = this.datePipe.transform(data.startTime, 'yyyy-MM-ddTHH:mm'); this.obj.startTime = this.datePipe.transform(data.startTime, 'yyyy-MM-ddTHH:mm');
this.obj.roomId = data.roomId; this.obj.roomId = data.roomId;
this.obj.roomText = data.roomName; this.obj.roomText = data.roomName;
this.roomMax = `该会议室可容纳${data.accommodation}人`;
this.obj.equipmervice = data.equipmervice.split(','); this.obj.equipmervice = data.equipmervice.split(',');
this.getEquipmervice(this.obj.equipmervice); this.getEquipmervice(this.obj.equipmervice);
} else { } else {
......
...@@ -117,6 +117,7 @@ export class CarDealPage { ...@@ -117,6 +117,7 @@ export class CarDealPage {
} }
goDetail(item){ goDetail(item){
if(this.changeType == 2) return;
this.navCtrl.push(CarApplyPage,{id:item.id,type:'deal'}) this.navCtrl.push(CarApplyPage,{id:item.id,type:'deal'})
} }
......
...@@ -126,15 +126,19 @@ export class DriverPage { ...@@ -126,15 +126,19 @@ export class DriverPage {
//校验 //校验
let checkBool = false; let checkBool = false;
for (let i in data) {
if (!data[i]) { if (status == 2) {
checkBool = true; for (let i in data) {
this.checkOpObj[i] = true; if (!data[i]) {
} else { checkBool = true;
this.checkOpObj[i] = false; this.checkOpObj[i] = true;
} else {
this.checkOpObj[i] = false;
}
} }
} }
if (checkBool) { if (checkBool) {
this.commonSer.toast("请输入必填项!"); this.commonSer.toast("请输入必填项!");
return false; return false;
......
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