284 lines
9.8 KiB
HTML
284 lines
9.8 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<title>权限管理-账户流水</title>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
|
||
<meta http-equiv="Cache" content="no-cache">
|
||
<meta http-equiv="Pragma" content="no-cache">
|
||
<meta http-equiv="Cache-Control" content="no-cache">
|
||
<meta http-equiv="Expires" content="0">
|
||
<link rel="stylesheet" type="text/css" href="css/style.css?__HTML_VERSION__=6">
|
||
<link rel="stylesheet" href="./libs/bootstrap/bootstrap.min.css?__HTML_VERSION__=3">
|
||
<link rel="stylesheet" href="js/datetimepicker/bootstrap-datetimepicker.min.css?__HTML_VERSION__=3">
|
||
</head>
|
||
<body class="bg_hui">
|
||
<div class="count_full" id="salesRecordSubmit" v-show="!isLoading" style="display: none">
|
||
<header class="header header-pos-fix">
|
||
<div onclick="history.back(-1)">
|
||
<img src="img/fahui.png" class="img">
|
||
<span class="text_wen">返回</span>
|
||
</div>
|
||
</header>
|
||
<div style="width: 100%;height: 45px;display: block;"></div>
|
||
<section class="buju">
|
||
<div class="chongka" id="fengwan">
|
||
<div class="rowh he" style="border-bottom: 1px solid #e5e5e5;">
|
||
<span class="name">账户ID:</span>
|
||
<input type="number" placeholder="请输入账户ID" class="input" autofocus v-model="queryInfo.queryID">
|
||
<a href="javascript:;" class="btn btn-blue chaxun" @click="loadMore(false)">查询</a>
|
||
</div>
|
||
<div class="rowh he">
|
||
<div class="ck_jiru">
|
||
<div class="cha_time" style="height: 50px;width: 100%;">
|
||
<div style="width: 100%;text-align: center;">
|
||
<input type="text" id="form_datetime_start" class="form_datetime_start shijian_input" placeholder="选择开始时间"
|
||
readonly>
|
||
<input type="text" id="form_datetime_end" class="form_datetime_end shijian_input" placeholder="选择截止时间"
|
||
readonly>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="chongka" style="margin-top: 40px;">
|
||
<div class="rowh he checkbox" style="margin-bottom: 0px;display:none;">
|
||
<label for="thrid" style=" margin-bottom: 10px;">
|
||
<input id="thrid" type="radio" name="salesRecordType" value="0" checked="" v-model="queryInfo.type"> 房卡
|
||
</label>
|
||
<label for="fouth" style=" margin-bottom: 10px;">
|
||
<input id="fouth" type="radio" name="salesRecordType" value="1" v-model="queryInfo.type"> {{lang.starName}}
|
||
</label>
|
||
</div>
|
||
<div class="rowh he checkbox">
|
||
<label for="thrid2">
|
||
<input id="thrid2" type="radio" name="salesRecordClass" value="0" checked="" v-model="queryInfo.clas"> 转入
|
||
</label>
|
||
<label for="fouth2">
|
||
<input id="fouth2" type="radio" name="salesRecordClass" value="1" v-model="queryInfo.clas"> 转出
|
||
</label>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<table class="ckjr_table">
|
||
<tbody>
|
||
<tr v-for="(x,i) in dailiDetail" :key="i">
|
||
<td class="text-center">
|
||
<img :src="x.avatar" class="header">
|
||
</td>
|
||
<td>
|
||
<p v-text="x.salesid"></p>
|
||
<p v-text="x.nickname"></p>
|
||
<template v-if="queryInfo.type === '0'">
|
||
<p>电话:<span v-text="x.tel"></span></p>
|
||
<p>微信:<span v-text="x.wechat"></span></p>
|
||
</template>
|
||
</td>
|
||
<td>
|
||
<p>数量:<span v-text="x.amount"></span></p>
|
||
<p>时间:<span v-text="x.time.substr(5,11)"></span></p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
<tfoot v-show="loadStateMsg"><tr class="text-center"><td colspan="3">{{loadStateMsg}}</td></tr></tfoot>
|
||
</table>
|
||
</section>
|
||
</div>
|
||
|
||
<script src="./libs/jquery.min.js?__HTML_VERSION__=3"></script>
|
||
<script src="./libs/bootstrap/bootstrap.min.js?__HTML_VERSION__=3"></script>
|
||
<script src="./libs/vue.min.js?__HTML_VERSION__=3"></script>
|
||
<script src="js/datetimepicker/bootstrap-datetimepicker.min.js?__HTML_VERSION__=3"></script>
|
||
<script src="./lang/lang.js?__HTML_VERSION__=14"></script>
|
||
<script src="./js/function.js?__HTML_VERSION__=18"></script>
|
||
<script src="./libs/layer_mobile/layer.js?__HTML_VERSION__=3"></script>
|
||
<script src="./components/home-nav.js?__HTML_VERSION__=12"></script>
|
||
<script>
|
||
var vm = new Vue(
|
||
{
|
||
el: "#salesRecordSubmit",
|
||
components: {
|
||
'home-nav': homeNav
|
||
},
|
||
data: {
|
||
isLoading: true,
|
||
loadState: 1, // 0-禁止加载 1-可以加载,加载暂停 2-加载中 3-加载异常
|
||
loadStateMsg: '',
|
||
pageIndex: 0, // 页码
|
||
lang: {},
|
||
myInfo: {},
|
||
urlParam: {},
|
||
dailiDetail: [],
|
||
queryInfo: {
|
||
queryID: '',
|
||
type: 0, //0、查询房卡,1、查询星星
|
||
clas: 0
|
||
}
|
||
},
|
||
methods: {
|
||
goHome: function () {
|
||
window.location.href = 'index.html?agentid=' + this.urlParam.agentid + '&channelid=' + this.urlParam.channelid+'&__HTML_VERSION__=3';
|
||
},
|
||
loadMore: function (flag) {
|
||
var that = this;
|
||
if ((!flag && this.loadState !== 2)|| this.loadState === 1) {
|
||
this.loadState = 2;
|
||
this.loadStateMsg = '加载中...';
|
||
if (!flag)
|
||
this.dailiDetail = [];
|
||
|
||
var begintime = $("#form_datetime_start").val();
|
||
var endtime = $("#form_datetime_end").val();
|
||
|
||
if (begintime > endtime) {
|
||
$.alert("开始时间大于结束时间");
|
||
return;
|
||
}
|
||
|
||
var funcName = '';
|
||
if (parseInt(this.queryInfo.clas) === 0) {
|
||
funcName = 'agent.agent.salesCardStarRecord';
|
||
} else {
|
||
funcName = 'agent.agent.salesCardStarDeduct';
|
||
}
|
||
|
||
|
||
setTimeout(function () {
|
||
if (flag)
|
||
that.pageIndex++;
|
||
else
|
||
that.pageIndex = 1;
|
||
|
||
that.loadState = 2;
|
||
|
||
$.api(
|
||
funcName,
|
||
{
|
||
agentid: that.urlParam.agentid,
|
||
channelid: that.urlParam.channelid,
|
||
salesid: that.myInfo.salesid,
|
||
queryid: that.queryInfo.queryID,
|
||
begintime: begintime,
|
||
endtime: endtime,
|
||
type: that.queryInfo.type,
|
||
page_index: that.pageIndex
|
||
},
|
||
function (res) {
|
||
var target = res.record;
|
||
var listLength = target.length;
|
||
if (listLength > 0) {
|
||
that.dailiDetail = that.dailiDetail.concat(target);
|
||
that.loadState = 1;
|
||
}
|
||
|
||
if (listLength < parseInt(res.page_size)) {
|
||
that.loadState = 3;
|
||
that.loadStateMsg = '暂无记录';
|
||
}
|
||
}
|
||
);
|
||
}, 500);
|
||
}
|
||
},
|
||
sales_record: function () {
|
||
var begintime = $("#form_datetime_start").val();
|
||
var endtime = $("#form_datetime_end").val();
|
||
|
||
if (begintime > endtime) {
|
||
$.alert("开始时间大于结束时间");
|
||
return;
|
||
}
|
||
|
||
var param = {
|
||
agentid: this.urlParam.agentid,
|
||
channelid: this.urlParam.channelid,
|
||
salesid: this.myInfo.salesid,
|
||
queryid: this.queryInfo.queryID,
|
||
begintime: begintime,
|
||
endtime: endtime,
|
||
type: this.queryInfo.type
|
||
};
|
||
|
||
if (parseInt(this.queryInfo.clas) === 0) {
|
||
$.api(
|
||
'agent.agent.salesCardStarRecord',
|
||
param,
|
||
function (res) {
|
||
if (res.record.length > 0)
|
||
this.dailiDetail = res.record;
|
||
else {
|
||
this.dailiDetail = [];
|
||
$.alert('暂无记录');
|
||
}
|
||
}.bind(this), 1
|
||
);
|
||
}
|
||
else {
|
||
$.api(
|
||
'agent.agent.salesCardStarDeduct',
|
||
param,
|
||
function (res) {
|
||
if (res.record.length > 0)
|
||
this.dailiDetail = res.record;
|
||
else {
|
||
this.dailiDetail = [];
|
||
$.alert('暂无记录');
|
||
}
|
||
}.bind(this), 1
|
||
);
|
||
}
|
||
}
|
||
},
|
||
created: function () {
|
||
var that = this;
|
||
var $doc = $(document);
|
||
var $win = $(window);
|
||
|
||
window.addEventListener('scroll', function () {
|
||
var docHeight = $doc.height();
|
||
var winHeight = $win.height();
|
||
var scrHeight = $doc.scrollTop();
|
||
|
||
//console.log(docHeight, winHeight, scrHeight);
|
||
if (( docHeight > winHeight ) && scrHeight >= (docHeight - winHeight)) {
|
||
that.loadMore(true);
|
||
}
|
||
});
|
||
|
||
|
||
this.urlParam = $.getQueryObj();
|
||
this.lang = lang[this.urlParam.agentid] ? lang[this.urlParam.agentid] : lang.default;
|
||
|
||
$.getUserInfo(function (r) {
|
||
this.myInfo = r;
|
||
this.isLoading = false;
|
||
}.bind(this));
|
||
|
||
}
|
||
});
|
||
/*时间选择*/
|
||
$(".form_datetime_start").datetimepicker({
|
||
format: 'yyyy-mm-dd',
|
||
weekStart: 1,
|
||
autoclose: true,
|
||
startView: 2,
|
||
minView: 2,
|
||
forceParse: false,
|
||
language: 'zh-CN',
|
||
todayBtn: true
|
||
});
|
||
$(".form_datetime_end").datetimepicker({
|
||
format: 'yyyy-mm-dd',
|
||
weekStart: 1,
|
||
autoclose: true,
|
||
startView: 2,
|
||
minView: 2,
|
||
forceParse: false,
|
||
language: 'zh-CN',
|
||
todayBtn: true
|
||
})
|
||
</script>
|
||
</body>
|
||
</html> |