Commit 588a8dfc authored by 黄奎's avatar 黄奎

页面修改

parent 4c2fb3dd
......@@ -3,39 +3,31 @@
<div class="query-box">
<ul class="user_time_picker">
<li>
<span>
<em>{{$t('hotel.hotel_StartDate')}}</em>
<el-date-picker type="date" v-model="msg.StartDate" :picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd" placeholder></el-date-picker>
</span>
<span>
<em>{{$t('hotel.hotel_StartDate')}}</em>
<el-date-picker type="date" v-model="msg.StartDate" :picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd" placeholder></el-date-picker>
</span>
</li>
<li>
<span>
<em>{{$t('hotel.hotel_EndDate')}}</em>
<el-date-picker type="date" v-model="msg.EndDate" :picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd" placeholder></el-date-picker>
</span>
<span>
<em>{{$t('hotel.hotel_EndDate')}}</em>
<el-date-picker type="date" v-model="msg.EndDate" :picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd" placeholder></el-date-picker>
</span>
</li>
<li>
<span>
<em>供应商</em>
<el-select
filterable
v-model="msg.Supplier"
>
<el-option :label="$t('system.ph_buxian')" :value="0"></el-option>
<el-option v-for="(item,index) in SupplierList" :key="index" :label="item.Name" :value="item.ID">
</el-option>
<el-select filterable v-model="msg.Supplier">
<el-option :label="$t('system.ph_buxian')" :value="0"></el-option>
<el-option v-for="(item,index) in SupplierList" :key="index" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</span>
</li>
<li>
<input
type="button"
class="hollowFixedBtn"
value="查询"
@click="getSearch()"
> &nbsp;
<input type="button" class="hollowFixedBtn" value="查询" @click="getSearch()"> &nbsp;
<input type="button" class="normalBtn" value="下载">
</li>
</ul>
......@@ -43,29 +35,25 @@
<div class="clearfix"></div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>做账主体</th>
<th width="300">团号</th>
<th>单号</th>
<th>日元</th>
<th>人民币</th>
<th width="300">手配定团号</th>
<th>泊数</th>
<th>单价(日元)</th>
<th>小计</th>
<th width="170">做账主体</th>
<th width="170">团号</th>
<th width="150">手配定团号</th>
<th width="170">单价(日元)</th>
<th>泊数/日期</th>
<th width="170">小计</th>
</tr>
<tbody v-for="(item,index) in dataList" :key="index">
<template v-for="(subItem,subIndex) in item.SubList">
<tr :key="subIndex">
<td>{{subItem.OutBranchName}}</td>
<td v-if="subIndex==0" :rowspan="item.SubList.length">{{item.TCIDS}}</td>
<td>{{subItem.TCNUM}}</td>
<td>{{subItem.UnitPrice}}</td>
<td>{{subItem.UnitPrice}}</td>
<td v-if="subIndex==0" :rowspan="item.SubList.length">{{item.DMCNum}}</td>
<td>{{subItem.DayCount}}</td>
<td>{{subItem.UnitPrice}}</td>
<td>{{subItem.GuestNum}}</td>
</tr>
<tr :key="subIndex">
<td>{{subItem.OutBranchName}}</td>
<td>{{subItem.TCNUM}}({{subItem.TCID}})</td>
<td v-if="subIndex==0" :rowspan="item.SubList.length">{{item.DMCNum}}</td>
<td>{{subItem.UnitPrice}}</td>
<td>{{subItem.DayCount}}<br/>
{{subItem.UseTime}}
</td>
<td>{{subItem.SubtotalMoney}}</td>
</tr>
</template>
</tbody>
</table>
......@@ -73,118 +61,112 @@
<i class="iconfont icon-kong"></i>
<p>{{$t("active.ld_noData")}}</p>
</div>
<el-pagination
background
@current-change="handleCurrentChange"
v-if="dataList.length>0"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size="msg.PageSize"
:total="total"
></el-pagination>
</div>
<el-pagination background @current-change="handleCurrentChange" v-if="dataList.length>0"
:current-page.sync="currentPage" layout="total,prev, pager, next, jumper" :page-size="msg.PageSize"
:total="total"></el-pagination>
</div>
</template>
<script>
export default {
data() {
return {
export default {
data() {
return {
//请求
msg: {
StartDate:"2020-01-01",
EndDate:"2020-02-29",
Supplier:30,
PageIndex:1,
PageSize:15,
StartDate: "2020-01-01",
EndDate: "2020-01-31",
Supplier: 30,
PageIndex: 1,
PageSize: 15,
},
loading:false,
loading: false,
currentPage: 1,
total:0,
dataList:[],
total: 0,
dataList: [],
//供应商
SupplierList:[],
SupplierList: [],
pickerBeginDateBefore: {
disabledDate: time => {
disabledDate: time => {
if (this.msg.EndDate == null) {
return false;
} else {
let endTime = new Date(this.msg.EndDate)
return endTime.getTime() < time.getTime()
}
return false;
} else {
let endTime = new Date(this.msg.EndDate)
return endTime.getTime() < time.getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.msg.StartDate)
return startTime.getTime() >= time.getTime()
}
disabledDate: time => {
let startTime = new Date(this.msg.StartDate)
return startTime.getTime() >= time.getTime()
}
},
}
},
mounted() {
}
},
mounted() {
this.initSupplier();
this.getList();
},
filters: {
},
methods: {
//点击查询
getSearch(){
var isA,isB,isC
if(this.msg.Supplier==0){
this.Error('请选择供应商');
isA=false
}else{
isA=true;
},
filters: {},
methods: {
//点击查询
getSearch() {
var isA, isB, isC
if (this.msg.Supplier == 0) {
this.Error('请选择供应商');
isA = false
} else {
isA = true;
}
if(this.msg.StartDate==''||this.msg.StartDate==null){
this.Error('请选择开始日期');
isB=false
}else{
isB=true;
if (this.msg.StartDate == '' || this.msg.StartDate == null) {
this.Error('请选择开始日期');
isB = false
} else {
isB = true;
}
if(this.msg.EndDate==''||this.msg.EndDate==null){
this.Error('请选择结束日期');
isC=false
}else{
isC=true;
if (this.msg.EndDate == '' || this.msg.EndDate == null) {
this.Error('请选择结束日期');
isC = false
} else {
isC = true;
}
if(isA&&isB&&isC){
this.getList();
if (isA && isB && isC) {
this.getList();
}
},
//获取数据
getList() {
this.loading = true;
this.apipost(
'dmcstatistics_get_GetDmcSupplierHotelPageListService',this.msg,
},
//获取数据
getList() {
this.loading = true;
this.apipost(
'dmcstatistics_get_GetDmcSupplierHotelPageListService', this.msg,
res => {
this.loading=false;
this.loading = false;
if (res.data.resultCode == 1) {
console.log(res,'resss');
this.dataList=res.data.data.pageData;
this.total = res.data.data.count
}else{
this.Error(res.data.message);
console.log(res.data.data.pageData, 'resss');
this.dataList = res.data.data.pageData;
this.total = res.data.data.count
} else {
this.Error(res.data.message);
}
},
err => {}
)
},
handleCurrentChange(val) {
this.msg.PageIndex = val;
this.getList();
},
// 获取供应商
initSupplier() {
},
handleCurrentChange(val) {
this.msg.PageIndex = val;
this.getList();
},
// 获取供应商
initSupplier() {
this.apipost("supplier_post_GetAllList", {
Type: 1
Type: 1
}, res => {
if (res.data.resultCode === 1) {
if (res.data.resultCode === 1) {
this.SupplierList = res.data.data;
}
}
}, err => {});
},
}
};
</script>
\ No newline at end of file
},
}
};
</script>
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