diff --git a/pages.json b/pages.json
index ea9d67a..24ab83d 100644
--- a/pages.json
+++ b/pages.json
@@ -27,7 +27,7 @@
}
},
{
- "path" : "pages/ofm/booking",
+ "path" : "pages/ofm/booking_form",
"style" :
{
"navigationBarTitleText" : "会议室预约"
@@ -39,10 +39,11 @@
"navigationBarTitleText" : "会议室"
}
},{
- "path" : "pages/ofm/bookingRecord",
+ "path" : "pages/ofm/booking",
"style" :
{
- "navigationBarTitleText" : "预约记录"
+ "navigationBarTitleText" : "预约记录",
+ "enablePullDownRefresh": false
}
}
],
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 76dccf4..7ed6359 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -62,13 +62,13 @@
imageSrc:"",
currentDate: tool.getTodayDate(),
moduleList: [{
- navigate:'/pages/ofm/booking',
+ navigate:'/pages/ofm/booking_form?mode=add',
url: '/static/yuding.png',
text: '会议预定',
type: "primary",
},
{
- navigate:'/pages/ofm/bookingRecord',
+ navigate:'/pages/ofm/booking',
url: '/static/meetingRecord.png',
text: '预定记录',
type: "success"
diff --git a/pages/ofm/booking.vue b/pages/ofm/booking.vue
index f7bb64b..f0c0072 100644
--- a/pages/ofm/booking.vue
+++ b/pages/ofm/booking.vue
@@ -1,74 +1,14 @@
-
-
-
- 会议名称:
- {{form.title}}
-
-
-
- 会议室:
- {{form.mroom_name}}
-
- {{mroomList[index].name}}
-
-
-
- 参加人数:
- {{form.participant_count}}
-
-
-
- 参会领导:
- {{form.key_participants}}
-
-
-
- 预约时间:
- {{form.mdate}}
-
-
-
- 备注:
- {{form.note}}
-
-
-
-
-
- 凌晨:
-
-
-
-
-
-
-
- {{item.label}}
-
-
-
- {{item.label}}
-
-
-
+
+
+
+
+
+
+ 预约时间段;
+
+
@@ -76,249 +16,29 @@
export default {
data(){
return{
- index:0,
- totalCount:0,
- pickDate:'',
- mroomId:'',
- type:'',
- ticketId:null,
- showAm:false,
- bookingTitle:'',
- form:{
- id:'',
- note:'',
- title:'',
- mroom:'',
- mdate:'',
- slots:[],
- create_by_phone:'',
- key_participants:'',
- participant_count:'',
- belong_dept:uni.getStorageSync('userInfo').belong_dept
- },
- selectList:[],
- mroomList: [],
- transitions:[],
- //凌晨0-6点
- timesListAm:[
- {value:0,label:'00:00-00:30',isSelect:false,sloted:false},
- {value:1,label:'00:30-01:00',isSelect:false,sloted:false},
- {value:2,label:'01:00-01:30',isSelect:false,sloted:false},
- {value:3,label:'01:30-02:00',isSelect:false,sloted:false},
- {value:4,label:'02:00-02:30',isSelect:false,sloted:false},
- {value:5,label:'02:30-03:00',isSelect:false,sloted:false},
- {value:6,label:'03:00-03:30',isSelect:false,sloted:false},
- {value:7,label:'03:30-04:00',isSelect:false,sloted:false},
- {value:8,label:'04:00-04:30',isSelect:false,sloted:false},
- {value:9,label:'04:30-05:00',isSelect:false,sloted:false},
- {value:10,label:'05:00-05:30',isSelect:false,sloted:false},
- {value:11,label:'05:30-06:00',isSelect:false,sloted:false}
- ],
- timesListPm:[
- {value:12,label:'06:00-06:30',isSelect:false,sloted:false},
- {value:13,label:'06:30-07:00',isSelect:false,sloted:false},
- {value:14,label:'07:00-07:30',isSelect:false,sloted:false},
- {value:15,label:'07:30-08:00',isSelect:false,sloted:false},
- {value:16,label:'08:00-08:30',isSelect:false,sloted:false},
- {value:17,label:'08:30-09:00',isSelect:false,sloted:false},
- {value:18,label:'09:00-09:30',isSelect:false,sloted:false},
- {value:19,label:'09:30-10:00',isSelect:false,sloted:false},
- {value:20,label:'10:00-10:30',isSelect:false,sloted:false},
- {value:21,label:'10:30-11:00',isSelect:false,sloted:false},
- {value:22,label:'11:00-11:30',isSelect:false,sloted:false},
- {value:23,label:'11:30-12:00',isSelect:false,sloted:false},
- {value:24,label:'12:00-12:30',isSelect:false,sloted:false},
- {value:25,label:'12:30-13:00',isSelect:false,sloted:false},
- {value:26,label:'13:00-13:30',isSelect:false,sloted:false},
- {value:27,label:'13:30-14:00',isSelect:false,sloted:false},
- {value:28,label:'14:00-14:30',isSelect:false,sloted:false},
- {value:29,label:'14:30-15:00',isSelect:false,sloted:false},
- {value:30,label:'15:00-15:30',isSelect:false,sloted:false},
- {value:31,label:'15:30-16:00',isSelect:false,sloted:false},
- {value:32,label:'16:00-16:30',isSelect:false,sloted:false},
- {value:33,label:'16:30-17:00',isSelect:false,sloted:false},
- {value:34,label:'17:00-17:30',isSelect:false,sloted:false},
- {value:35,label:'17:30-18:00',isSelect:false,sloted:false},
- {value:36,label:'18:00-18:30',isSelect:false,sloted:false},
- {value:37,label:'18:30-19:00',isSelect:false,sloted:false},
- {value:38,label:'19:00-19:30',isSelect:false,sloted:false},
- {value:39,label:'19:30-20:00',isSelect:false,sloted:false},
- {value:40,label:'20:00-20:30',isSelect:false,sloted:false},
- {value:41,label:'20:30-21:00',isSelect:false,sloted:false},
- {value:42,label:'21:00-21:30',isSelect:false,sloted:false},
- {value:43,label:'21:30-22:00',isSelect:false,sloted:false},
- {value:44,label:'22:00-22:30',isSelect:false,sloted:false},
- {value:45,label:'22:30-23:00',isSelect:false,sloted:false},
- {value:46,label:'23:00-23:30',isSelect:false,sloted:false},
- {value:47,label:'23:30-24:00',isSelect:false,sloted:false}
- ]
+ page:1,
+ page_size:10,
+ dataList:[],
}
},
- onLoad(options) {
- let that = this;
- that.form.id='';
- that.selectList = [];
- that.mroomId = options.mroomId;
- that.getmRooms();
- if(options.item){
- let bookingItem = JSON.parse(options.item);
- that.form = Object.assign({},bookingItem);
- that.ticketId = that.form.ticket;
- that.getTransitions();
- }else{
- that.getTransitions();
- }
- if(options.slots){
- that.form.slots = [];
- let slots = options.slots.split(',');
- if(slots.length>0){
- slots.forEach(item=>{
- let slot = Number(item);
- that.form.slots.push(slot);
- if(slot<12){
- that.timesListAm[slot].isSelect = true;
- that.selectList.push(that.timesListAm[slot])
- }else{
- that.timesListPm[slot].isSelect = true;
- that.selectList.push(that.timesListPm[slot])
- }
- })
- that.totalCount = slots.length*0.5;
- }
- }
+ mounted() {
+ this.getlistData();
},
+ onPullDownRefresh() {
+ this.page = 1;
+ this.getlistData()
+ },
methods:{
- getTransitions(){
- let that = this;
- if(that.ticketId!==null){
- that.$api.getTransition(that.ticketId).then(res=>{
- that.transitions = res;
- })
- }else{
- that.$api.workflowInitkey('booking').then(res=>{
- that.transitions = res.transitions;
- that.workflow = res.workflow;
- })
- }
- },
- getmRooms(){
- let that = this;
- that.$api.getMroom({ page: 0}).then(res=>{
- that.mroomList = res;
- if(that.mroomId!==''&&res.length>0){
- that.form.mroom = res[0].id;
- res.forEach((item,index)=>{
- if(item.id==that.mroomId){
- that.index = index ;
- }
- })
- }else{
- that.index = null;
- }
- }).catch(e=>{})
- },
- showAmChange(){
- this.showAm = !this.showAm;
- },
- timeItemClickAm(index){
- if(this.timesListPm[index].sloted){
-
- }else{
- this.timesListAm[index].isSelect = !this.timesListAm[index].isSelect;
- this.clickItems();
- }
- },
- timeItemClickPm(index){
- if(this.timesListPm[index].sloted){
-
- }else{
- this.timesListPm[index].isSelect = !this.timesListPm[index].isSelect;
- this.clickItems();
- }
- },
- clickItems(){
- let that = this;
- that.selectList = [];
- let lists = [],slots=[];
- that.timesListAm.forEach(item=>{
- if(item.isSelect){
- lists.push(item)
- slots.push(item.value);
- }
- })
- that.timesListPm.forEach(item2=>{
- if(item2.isSelect){
- lists.push(item2)
- slots.push(item2.value);
- }
- })
- setTimeout(()=>{
- that.totalCount = slots.length*0.5;
- that.selectList = lists;
- that.form.slots = slots;
- },500)
- },
- //选择会议室和日期后查询有无预定
- bindPickerChange(e) {
- this.form.mroom = e.detail.value;
- this.index = e.detail.value;
- if(this.form.mdate!==''&&this.form.mdate!==null){
- this.getmRoomSlot();
- }
- },
- mdateChange(){
- if(this.form.mroom!==''&&this.form.mroom!==null){
- this.getmRoomSlot();
- }
- },
- getmRoomSlot(){
- let that = this;
- let form = {};
- form.page = 0;
- form.mroom = that.form.mroom;
- form.mdate = that.form.mdate;
- that.timesListAm.forEach(slot=>{
- slot.sloted = false;
- })
- that.timesListPm.forEach(slot=>{
- slot.sloted = false;
- })
- that.$api.bookingSlot(form).then(res=>{
- res.forEach(item=>{
- if(item.slot<12){
- that.timesListAm[item.slot].sloted = true;
- }else{
- that.timesListPm[item.slot].sloted = true;
- }
-
- })
+ itemClick(item){
+ uni.setStorageSync("currentBooking", item)
+ uni.navigateTo({
+ url:'/pages/ofm/booking_form?mode=show',
})
},
- //选择会议室和日期后查询有无预定
- submit(id){
+ getlistData(){
let that = this;
- if(that.form.id == "") {
- that.$api.bookingCreate(that.form).then(res=>{
- that.form.id = res.id;
- that.ticketSubmit(id,that.form.id)
- })
- }else{
- that.$api.bookingUpdate(that.form.id, that.form).then(res=>{
- that.ticketSubmit(id,that.form.id)
- })
- }
- },
- ticketSubmit(id,t_id){
- let that = this;
- let params = {};
- params.title = that.mroomList[that.index].name+'预约';
- params.workflow = that.workflow ;
- params.transition = id;
- params.ticket_data = {t_id:t_id};
- that.$api.ticketCreate(params).then(res=>{
- uni.navigateBack({
- delta: 1
- });
+ that.$api.bookingList({page:that.page,page_size:that.page_size}).then(res=>{
+ that.dataList = res.results;
})
},
},
@@ -331,100 +51,30 @@
padding: 0!important;
background-color: #ffffff;
}
- .topView{
- width: 100%;
- }
- .roomView,.dateView,.titleView{
- height: 35px;
+ .chat-custom-right {
+ flex: 1;
+ /* #ifndef APP-NVUE */
display: flex;
- padding: 10upx;
- line-height: 35px;
- margin-bottom: 10upx;
- box-sizing: border-box;
- background-color: #ffffff;
+ /* #endif */
+ flex-direction: column;
+ justify-content: space-between;
+ align-items: flex-end;
}
- .inputStyle{
- height: 35px;
- width: 560upx;
- padding: 0 10px;
- line-height: 35px;
- border-radius: 10upx;
- display: inline-block;
- box-sizing: border-box;
- border: 1px solid #e5e5e5;
- }
-
- .viewLabel{
- width: 160upx;
- font-size: 30upx;
- text-align: right;
- display: inline-block;
- }
- .iconsWrap{
- width: 40upx;
- height: 40upx;
- display: inline-block;
- line-height: 40upx;
- border-radius: 25upx;
- text-align: center;
- background-color: #74ddfc;
- border: 1px solid #74ddfc;
- }
- .pickerDom{
- height: 35px;
- width: 560upx;
- line-height: 35px;
- padding-left: 20upx;
- border-radius: 8upx;
- box-sizing: border-box;
- border: 1px solid #e5e5e5;
- }
- .timeView{
- width: 100%;
- padding: 10upx;
- box-sizing: border-box;
- }
- .amBlock{
- display: block;
- }
- .amBlockHide{
- display: none;
- }
- .timeBlock{
- width: 25%;
- padding: 6upx;
- height: 70upx;
- margin: 10upx 0;
- font-size: 28upx;
- line-height: 70upx;
- display: inline-block;
- box-sizing: border-box;
- }
- .timeItem{
- color: #666666;
- text-align: center;
- border-radius: 10upx;
- background-color: #b9f0cb;
- border: 1upx solid #eeeeee;
- }
- .timeItem.isSelected{
- background-color: #00a870;
- color: #fff;
- }
- .timeItem.isSloted{
- background-color: #fac275!important;
- color: #fff;
- }
- .footerView{
- box-sizing: border-box;
- width: 100%;
- padding:10px;
- background-color: #ffffff;
+
+ .chat-custom-text {
font-size: 12px;
- color: #666666;
+ color: #999;
}
- .buttonSure{
- margin-top: 10upx;
- margin-right: 10upx;
+ .uniListItem{
+ position: relative;
+ }
+ .stateIcon{
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: 1;
+ }
+ .yiwancheng{
+ color: #ff0000;
}
\ No newline at end of file
diff --git a/pages/ofm/bookingRecord.vue b/pages/ofm/bookingRecord.vue
deleted file mode 100644
index 3542a1b..0000000
--- a/pages/ofm/bookingRecord.vue
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
-
-
-
-
-
- 预约时间段;
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/ofm/booking_form.vue b/pages/ofm/booking_form.vue
new file mode 100644
index 0000000..a1263c8
--- /dev/null
+++ b/pages/ofm/booking_form.vue
@@ -0,0 +1,340 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{form.mdate}}
+
+
+
+
+
+ {{item}}
+
+
+
+
+ 凌晨:
+
+
+
+
+
+
+
+ {{item.label}}
+
+
+
+ {{item.label}}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file