<?php require '/inc/odbc.php';?>
|
<?php require '/inc/function.php';?>
|
<?php
|
if(isDepartment("0302")==0){
|
header("Location: /");
|
exit;
|
}
|
|
$searchTXT=empty($_REQUEST['searchTXT'])==true ? "" : addslashes($_REQUEST['searchTXT']);
|
$orderby=empty($_REQUEST['orderby'])==true ? "" : addslashes($_REQUEST['orderby']);
|
$OrdDateType=empty($_REQUEST['OrdDateType'])==true ? "7" : addslashes($_REQUEST['OrdDateType']);
|
$OrdDateStart=empty($_REQUEST['OrdDateStart'])==true ? "" : addslashes($_REQUEST['OrdDateStart']);
|
$OrdDateEnd=empty($_REQUEST['OrdDateEnd'])==true ? "" : addslashes($_REQUEST['OrdDateEnd']);
|
$AuditStatus=empty($_REQUEST['AuditStatus'])==true ? "0" : addslashes($_REQUEST['AuditStatus']);
|
|
$InvoiceType=empty($_REQUEST['InvoiceType'])==true ? "0" : addslashes($_REQUEST['InvoiceType']);
|
$page=empty($_REQUEST['page'])==true ? 1 : $_REQUEST['page']; //当前页数
|
|
$OrdDateTypeName="";
|
if ($OrdDateType=="-1") {
|
if ($OrdDateStart=="" and $OrdDateEnd=="") {
|
$OrdDateStart=date("Y-m-d");
|
$OrdDateEnd=date("Y-m-d");
|
}
|
elseif ($OrdDateStart!="" and $OrdDateEnd=="") {
|
$OrdDateEnd=$OrdDateStart;
|
}
|
elseif ($OrdDateStart=="" and $OrdDateEnd!="") {
|
$OrdDateStart=$OrdDateEnd;
|
}
|
If ($OrdDateStart>$OrdDateEnd) {
|
$OrdDateStart1=$OrdDateStart;
|
$OrdDateStart=$OrdDateEnd;
|
$OrdDateEnd=$OrdDateStart1;
|
}
|
If ($OrdDateStart==$OrdDateEnd) {
|
$OrdDateTypeName=$OrdDateStart;
|
$OrdDateTypeName1=$OrdDateTypeName;
|
}
|
Else {
|
$OrdDateTypeName=$OrdDateStart." 至 ".$OrdDateEnd;
|
$OrdDateTypeName1="时间段 ".$OrdDateTypeName;
|
}
|
$SqlOrdDateType=" between '".$OrdDateStart."' and '".$OrdDateEnd." 23:59:59'";
|
}Else {
|
$sql = "select top 1 vID,vtext,vOrder2 from dictionary where vType>=1 and vtitle='OrdDateType' and vID=".$OrdDateType ;
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
if (sqlsrv_rows_affected($data)!=0) {
|
while($rs = sqlsrv_fetch_array( $data, SQLSRV_FETCH_ASSOC) ) {
|
$OrdDateTypeName = $rs['vtext'];
|
$OrdDateTypeName1 = $OrdDateTypeName;
|
$SqlOrdDateType = $rs['vOrder2'];
|
}
|
} else {
|
$OrdDateType="4";
|
$OrdDateTypeName="本月";
|
$OrdDateTypeName1=$OrdDateTypeName;
|
$SqlOrdDateType="between DATEADD(mm,DATEDIFF(mm,0,getdate()),0) and dateadd(ms,-3,DATEADD(mm,DATEDIFF(m,0,getdate())+1,0))";
|
|
}
|
}
|
|
}
|
|
//各种返回信息
|
$SystemMessageTXT="";
|
$SystemMessageType=empty($_REQUEST['SystemMessageType'])==true ? "" : $_REQUEST['SystemMessageType'];
|
$SMT=empty($_REQUEST['SMT'])==true ? "" : $_REQUEST['SMT'];
|
if ($SystemMessageType!="") {
|
if ($SMT=="1") {
|
$SystemMessageTXT="保存成功";
|
}elseif ($SMT=="2") {
|
$SystemMessageTXT="参数错误";
|
}
|
}
|
|
//时间段列表
|
$OrdDateTypes=array();
|
$sql = "select vID,vtext from dictionary where vType>=1 and vtitle='OrdDateType' order by vOrder" ;
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
$i=0;
|
while($rs = sqlsrv_fetch_array( $data, SQLSRV_FETCH_ASSOC) ) {
|
$OrdDateTypes[$i]=array($rs['vID'],$rs['vtext']);
|
$i++;
|
}
|
}
|
|
//发票处理状态
|
$AuditStatusName="全部";
|
$AuditStatusArray=array();
|
$AuditStatusArray[0]=array(-1,"全部");
|
$sql = "select vID,vtext from dictionary where vType>=1 and vtitle='AuditStatus' order by vOrder" ;
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
$i=1;
|
while($rs = sqlsrv_fetch_array( $data, SQLSRV_FETCH_ASSOC) ) {
|
$AuditStatusArray[$i]=array($rs['vID'],$rs['vtext']);
|
if (strval($rs['vID'])==$AuditStatus){$AuditStatusName = $rs['vtext'];}
|
$i++;
|
}
|
}
|
|
//分公司名称列表
|
$UnitNameListArray=array();
|
$sql = "select ServiceBranch,case when UnitShort='微信小程序' then '广州' else UnitShort END as UnitShort from IntroducerUnitData where ServiceBranch<>'' and UnitID<>32" ;
|
$data = sqlsrv_query($conn,$sql);
|
if($data == true){
|
$i=1;
|
while($rs = sqlsrv_fetch_array( $data, SQLSRV_FETCH_ASSOC) ) {
|
$UnitNameListArray[$i]=array($rs['ServiceBranch'],$rs['UnitShort']);
|
$i++;
|
}
|
}
|
|
//默认显示字段
|
$Report_Name = "用户积分提现管理";
|
|
$page_URL_noDate="h_menu1_1=2&searchTXT=".$searchTXT."&orderby=".$orderby."&InvoiceType=".$InvoiceType."&AuditStatus=".$AuditStatus."&OrdDateType=".$OrdDateType."&OrdDateStart=".$OrdDateStart."&OrdDateEnd=".$OrdDateEnd;
|
$page_URL="h_menu1_1=2&searchTXT=".$searchTXT."&orderby=".$orderby."&InvoiceType=".$InvoiceType."&AuditStatus=".$AuditStatus."&OrdDateType=".$OrdDateType."&OrdDateStart=".$OrdDateStart."&OrdDateEnd=".$OrdDateEnd;
|
|
?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
<head>
|
<title><?php echo $LindemanAdmin?></title>
|
<?php require '/inc/ccs.php';?>
|
<!-- DataTables -->
|
<link rel="stylesheet" type="text/css" href="/js/media/css/jquery.dataTables.css">
|
<script type="text/javascript" charset="utf8" src="/js/media/js/jquery.js"></script>
|
<script type="text/javascript" charset="utf8" src="/js/media/js/jquery.dataTables.js"></script>
|
<style type="text/css">
|
#content div.box table td {
|
border-right: 1px solid #cdcdcd;
|
text-align: center;
|
}
|
</style>
|
</head>
|
<body onkeydown="xKeyEvent(event)">
|
<?php require 'menu_header.php';?>
|
<!-- content -->
|
<div id="content">
|
<?php require 'Dispatch_menu_left.php';?>
|
<!-- content / right -->
|
<div id="right">
|
<!-- table -->
|
<div class="box">
|
<!-- box / title -->
|
<div class="title">
|
<h5><?php if($searchTXT!=""){echo $Report_Name." ".$searchTXT;} else {echo $Report_Name;} ?></h5>
|
<ul class="links">
|
<!--
|
<li><a onclick="javascript:JS_CarGasAdd();">新建</a></li>
|
<li><a href="UserPoints_List_Excel.php?<?php echo $page_URL;?>">导出</a></li>
|
-->
|
<li>
|
<?php
|
//下拉菜单设定
|
$DownMenuName="处理状态"; //菜单名称
|
$DownMenuNameID="AuditStatus"; //菜单ID
|
$DownMenuArray=$AuditStatusArray; //菜单数组
|
$DownMenuOldName=$AuditStatusName; //默认值名称
|
$DownMenuOldID=$AuditStatus //默认值ID
|
?>
|
<div class="search">
|
<div name="DownMenu_container" id="<?php echo $DownMenuNameID?>_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_DownMenu('<?php echo $DownMenuNameID?>')">
|
<span class="select-content" style="width: 46px;"><?php echo $DownMenuName.":".$DownMenuOldName?></span><span class="arrow" id="<?php echo $DownMenuNameID?>_arrow" name="DownMenu_arrow"></span>
|
</div>
|
<div name="DownMenu_list" id="<?php echo $DownMenuNameID?>_list" class="select-list scroll-pane" style="overflow: hidden; position: absolute; background-color: white; width: 90px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 69px;">
|
<div class="jspContainer" style="width: 90px;">
|
<div style="padding: 0px; top: 0px; width: 90px;">
|
<?php for($i=0;$i<count($DownMenuArray);$i++) {?>
|
<span title="<?php echo $DownMenuArray[$i][1]?>" name="DownMenu_<?php echo $DownMenuNameID?>" onmouseover="JS_DownMenuMouseover('<?php echo $DownMenuNameID?>',<?php echo $i?>)" onclick="JS_DownMenuJump('<?php echo "?".$page_URL?>','<?php echo $DownMenuOldID?>','<?php echo $DownMenuNameID?>','<?php echo $DownMenuArray[$i][0]?>')" class="list-option<?php if ($DownMenuArray[$i][0]==$DownMenuOldID){echo " option";}?>"><?php echo $DownMenuArray[$i][1]?></span>
|
<?php }?>
|
</div>
|
</div>
|
</div>
|
</div>
|
</li>
|
<li>
|
<div class="search">
|
<div id="Date_container" class="select-container" style="overflow: hidden;cursor:pointer" onclick="JS_OrdDateType()">
|
<span class="select-content" style="width: 46px;">期间:<?php echo $OrdDateTypeName?></span><span class="arrow" id="Date_arrow"></span>
|
</div>
|
<div id="Date_list" class="select-list scroll-pane" style="overflow: hidden; position: absolute; background-color: white; width: 65px; display: none;background-position: initial initial; background-repeat: initial initial;margin-left: 35px;">
|
<div class="jspContainer" style="width: 63px;">
|
<div style="padding: 0px; top: 0px; width: 63px;">
|
<?php for($i=0;$i<count($OrdDateTypes);$i++) {?>
|
<span title="<?php echo $OrdDateTypes[$i][1]?>" onmouseover="JS_OrdDateTypeMouseover('OrdDateType_<?php echo $OrdDateTypes[$i][0]?>')" onclick="JS_OrdDateTypeJump('<?php echo $OrdDateTypes[$i][0]?>')" id="OrdDateType_<?php echo $OrdDateTypes[$i][0]?>" class="list-option<?php if ($OrdDateTypes[$i][0]==$OrdDateType){echo " option";}?>"><?php echo $OrdDateTypes[$i][1]?></span>
|
<?php }?>
|
<span title="自定义" onmouseover="JS_OrdDateTypeMouseover('OrdDateType_0')" onclick="JS_OrdDateTypeCreateOpen()" id="OrdDateType_0" name="OrdDateType" class="list-option">自定义</span>
|
</div>
|
</div>
|
</div>
|
</div>
|
</li>
|
<div class="dialogJ dialogJfix dialogJshadow" id="OrdDateTypeCreate" style="width: 440px;right: 80px; top: 150px;height:80px ;display:none;z-index: 100;">
|
<div class="dialogJtitle">
|
<a href="javascript:JS_OrdDateTypeCreateClose();" class="dialogJclose" title="关闭本窗口"> </a>
|
<span class="dialogJtxt" id="EditPhotoTXT">请选择时间段</span>
|
</div>
|
<div class="dialogJcontent" style="margin-left: 5px;margin-right:5px;">
|
<div class="input" style="float:left;margin-top: 10px;margin-left: 5px;" id="two-inputs">
|
期间:
|
<input type="text" id="OrdDateStart" name="OrdDateStart" class="date" style="width:138px;" value="<?php echo $OrdDateStart?>">
|
至
|
<input type="text" id="OrdDateEnd" name="OrdDateEnd" class="date" style="width:138px;" value="<?php echo $OrdDateEnd?>">
|
<input type="button" class="dialogJbtn first-child" onclick="JS_OrdDateJump()" value="查询">
|
</div>
|
</div>
|
</div>
|
<!--时间选择js liang------------->
|
<link rel="stylesheet" href="css/daterangepicker.css">
|
<script src="js/moment.min.js"></script>
|
<script src="js/jquery.daterangepicker.js"></script>
|
<script>
|
$(function()
|
{
|
$('#two-inputs').dateRangePicker(
|
{
|
separator : ' to ',
|
getValue: function()
|
{
|
if ($('#OrdDateStart').val() && $('#OrdDateEnd').val() )
|
return $('#OrdDateStart').val() + ' to ' + $('#OrdDateEnd').val();
|
else
|
return '';
|
},
|
setValue: function(s,s1,s2)
|
{
|
$('#OrdDateStart').val(s1);
|
$('#OrdDateEnd').val(s2);
|
}
|
|
});
|
});
|
</script>
|
<!--时间选择js liang------------->
|
<script type="text/javascript">
|
//时间表列显示下拉菜单
|
function JS_OrdDateType(){
|
if (Date_container.className!="select-container select-container-show-list"){
|
Date_container.className="select-container select-container-show-list";
|
Date_arrow.className="arrow arrow-up";
|
Date_list.style.display="block";
|
OrdClass_container.className="select-container";
|
OrdClass_arrow.className="arrow";
|
OrdClass_list.style.display="none";
|
OrdDateTypeCreate.style.display="none";
|
}
|
else {
|
Date_container.className="select-container";
|
Date_arrow.className="arrow";
|
Date_list.style.display="none";
|
}
|
}
|
//时间表列指针移动到下拉菜单
|
function JS_OrdDateTypeMouseover(id){
|
var d=document.getElementById(id);
|
<?php for($i=0;$i<count($OrdDateTypes);$i++) {?>
|
document.getElementById("OrdDateType_<?php echo $OrdDateTypes[$i][0]?>").className="list-option";
|
<?php }?>
|
document.getElementById("OrdDateType_0").className="list-option";
|
d.className="list-option option";
|
}
|
//自定义时间-打开窗口
|
function JS_OrdDateTypeCreateOpen()
|
{
|
JS_OrdDateType();
|
OrdDateTypeCreate.style.display="block";
|
}
|
//自定义时间-关闭窗口
|
function JS_OrdDateTypeCreateClose()
|
{
|
JS_OrdDateType();
|
OrdDateTypeCreate.style.display="none";
|
}
|
//自定义时间-确定时间
|
function JS_OrdDateTypeCreateSave()
|
{
|
document.getElementById('ServiceOrdTraStreet').value=document.getElementById('Duration').value;
|
document.getElementById('ServiceOrdTraEnd').value=document.getElementById('ServiceOrdTraEnd').value;
|
document.getElementById('ServiceOrdTraStreetCoo').value=results.sw.point.lng + ','+ results.sw.point.lat; //起点坐标
|
document.getElementById('ServiceOrdTraEndCoo').value=results.Lu.point.lng + ','+ results.Lu.point.lat; //起点坐标
|
}
|
//时间类表列转跳
|
function JS_OrdDateJump(id){
|
var OrdDateStart=document.getElementById("OrdDateStart").value;
|
var OrdDateEnd=document.getElementById("OrdDateEnd").value;
|
//var searchTXT=document.getElementById("searchTXT").value;
|
window.location.href='UserPoints_List.php?<?php echo $page_URL_noDate?>&OrdDateType=-1&OrdDateStart='+OrdDateStart+'&OrdDateEnd='+OrdDateEnd;
|
}
|
//自定义时间转跳
|
function JS_OrdDateTypeJump(id){
|
//var searchTXT=document.getElementById("searchTXT").value;
|
window.location.href='UserPoints_List.php?<?php echo $page_URL_noDate?>&OrdDateType='+id;
|
}
|
|
//时间表列转跳
|
function JS_OrdClassTypeJump(id){
|
//var searchTXT=document.getElementById("searchTXT").value;
|
window.location.href='UserPoints_List.php?<?php echo $page_URL_noDate?>&OrdClassList='+id;
|
}
|
|
</script>
|
<script LANGUAGE="javascript">
|
|
//新建字典-关闭上传窗口
|
function JS_CarCreateClose()
|
{
|
CarCreate.style.display="none";
|
}
|
function JS_InvoiceType(){
|
InvoiceType = document.form2.InvoiceType.value;
|
if(InvoiceType=='2') {
|
InvoiceCompanyAddDiv.style.display="none";
|
InvoiceCompanyBankDiv.style.display="none";
|
Invoice_strAddDiv.style.display="none";
|
Invoice_strEmailDiv.style.display="block";
|
Invoice_strNameTXT.innerHTML="接收人<font color='#ff0000'>*</font>:";
|
Invoice_strPhoneTXT.innerHTML="接收短信电话<font color='#ff0000'>*</font>:";
|
}else if (InvoiceType=='3') {
|
InvoiceCompanyAddDiv.style.display="none";
|
InvoiceCompanyBankDiv.style.display="none";
|
Invoice_strAddDiv.style.display="block";
|
Invoice_strEmailDiv.style.display="none";
|
Invoice_strNameTXT.innerHTML="收件人<font color='#ff0000'>*</font>:";
|
Invoice_strPhoneTXT.innerHTML="收件人电话<font color='#ff0000'>*</font>:";
|
}else if (InvoiceType=='4') {
|
InvoiceCompanyAddDiv.style.display="block";
|
InvoiceCompanyBankDiv.style.display="block";
|
Invoice_strAddDiv.style.display="block";
|
Invoice_strEmailDiv.style.display="none";
|
Invoice_strNameTXT.innerHTML="收件人<font color='#ff0000'>*</font>:";
|
Invoice_strPhoneTXT.innerHTML="收件人电话<font color='#ff0000'>*</font>:";
|
}
|
}
|
//新建字典-保存
|
function JS_CarCreateSave()
|
{
|
InvoiceType=document.form2.InvoiceType.value;
|
InvoiceMoney=document.form2.InvoiceMoney.value;
|
InvoiceName=document.form2.InvoiceName.value;
|
InvoiceCompanyID=document.form2.InvoiceCompanyID.value;
|
Invoice_strAdd=document.form2.Invoice_strAdd.value;
|
Invoice_strName=document.form2.Invoice_strName.value;
|
Invoice_strPhone=document.form2.Invoice_strPhone.value;
|
Invoice_strEmail=document.form2.Invoice_strEmail.value;
|
if (InvoiceMoney==''){alert("请填写开票金额!");return false;}
|
if (InvoiceName==''){alert("请填写发票抬头!");return false;}
|
if (InvoiceName.indexOf("公司")>=0 && InvoiceCompanyID==''){alert("请填写纳税识别号!");return false;}
|
if (InvoiceType=='2'){
|
if (Invoice_strEmail==''){alert("请填写电子邮箱!");return false;}
|
if (Invoice_strPhone==''){alert("请填写接收短信电话!");return false;}
|
}else if (InvoiceType=='3'){
|
if (Invoice_strPhone==''){alert("请填写收件人电话!");return false;}
|
if (Invoice_strName==''){alert("请填写收件人!");return false;}
|
if (Invoice_strAdd==''){alert("请填写邮寄地址!");return false;}
|
}
|
form2.submit();
|
}
|
//受理单调单查询
|
function JS_ServiceOrdSearch()
|
{
|
ServiceOrdNo=document.form2.ServiceOrdNo.value;
|
window.HiddenFrame.location.replace('Search_ServiceOrd.gds?Invoice=1&ServiceOrdNo='+ServiceOrdNo);
|
}
|
//显示车牌号
|
function JS_PaidMoneyData(ServiceOrdID,ServiceOrdPtName,InvoiceMoney)
|
{
|
|
if (ServiceOrdID=='')
|
{
|
document.form2.ServiceOrdID.value=0;
|
alert("服务单号错误!!");
|
}
|
else
|
{
|
if (InvoiceMoney==0){
|
document.getElementById('ErrorsTXT').innerHTML = '已有开票记录,禁止重复申请!!';
|
//JS_CarGasAdd();
|
}else{
|
document.form2.ServiceOrdID.value=ServiceOrdID;
|
document.getElementById('InvoiceMoney').value = InvoiceMoney;
|
document.getElementById('ServiceOrdNo').className = 'valid';
|
document.getElementById('ServiceOrdNo').readOnly=true;
|
document.getElementById('AuditMakeout').className = '';
|
document.getElementById('AuditMakeout').readOnly=false;
|
document.getElementById('InvoiceMoney').className = '';
|
document.getElementById('InvoiceMoney').readOnly=false;
|
document.getElementById('InvoiceNo').className = '';
|
document.getElementById('InvoiceNo').readOnly=false;
|
document.getElementById('InvoiceName').value = ServiceOrdPtName;
|
document.getElementById('InvoiceName').className='';
|
document.getElementById('InvoiceName').readOnly=false;
|
document.getElementById('InvoiceMakeout').className = '';
|
document.getElementById('InvoiceMakeout').readOnly=false;
|
document.getElementById('InvoiceCompanyPhone').className = '';
|
document.getElementById('InvoiceCompanyPhone').readOnly=false;
|
document.getElementById('InvoiceCompanyID').className = '';
|
document.getElementById('InvoiceCompanyID').readOnly=false;
|
document.getElementById('InvoiceCompanyAdd').className = '';
|
document.getElementById('InvoiceCompanyAdd').readOnly=false;
|
document.getElementById('InvoiceCompanyBank').className = '';
|
document.getElementById('InvoiceCompanyBank').readOnly=false;
|
document.getElementById('InvoiceCompanyBankNo').className = '';
|
document.getElementById('InvoiceCompanyBankNo').readOnly=false;
|
document.getElementById('InvoiceZipCode').className = '';
|
document.getElementById('InvoiceZipCode').readOnly=false;
|
document.getElementById('Invoice_strAdd').className = '';
|
document.getElementById('Invoice_strAdd').readOnly=false;
|
document.getElementById('Invoice_strEmail').className = '';
|
document.getElementById('Invoice_strEmail').readOnly=false;
|
document.getElementById('Invoice_strName').className = '';
|
document.getElementById('Invoice_strName').readOnly=false;
|
document.getElementById('Invoice_strPhone').className = '';
|
document.getElementById('Invoice_strPhone').readOnly=false;
|
}
|
}
|
}
|
//新建单据信息
|
function JS_CarGasAdd()
|
{
|
CarCreate.style.display='block';
|
document.getElementById('EditPhotoTXT').innerHTML = '新建发票申请';
|
document.getElementById('ErrorsTXT').innerHTML = '';
|
document.form2.admin_save.value='13';
|
document.form2.ServiceOrdID.value=0;
|
document.form2.InvoiceID.value=0;
|
document.getElementById('ServiceOrdNo').value = '';
|
document.getElementById('ServiceOrdNo').className = '';
|
document.getElementById('ServiceOrdNo').readOnly=false;
|
document.getElementById('AuditMakeout').value = '';
|
document.getElementById('AuditMakeout').className = 'valid';
|
document.getElementById('AuditMakeout').readOnly=true;
|
document.getElementById('InvoiceMoney').value = '';
|
document.getElementById('InvoiceMoney').className = 'valid';
|
document.getElementById('InvoiceMoney').readOnly=true;
|
document.getElementById('InvoiceNo').value = '';
|
document.getElementById('InvoiceNo').className = 'valid';
|
document.getElementById('InvoiceNo').readOnly=true;
|
document.getElementById('InvoiceName').value = '';
|
document.getElementById('InvoiceName').className = 'valid';
|
document.getElementById('InvoiceName').readOnly=true;
|
document.getElementById('InvoiceMakeout').value = '';
|
document.getElementById('InvoiceMakeout').className = 'valid';
|
document.getElementById('InvoiceMakeout').readOnly=true;
|
|
document.getElementById('InvoiceCompanyPhone').value = '';
|
document.getElementById('InvoiceCompanyPhone').className = 'valid';
|
document.getElementById('InvoiceCompanyPhone').readOnly=true;
|
document.getElementById('InvoiceCompanyID').value = '';
|
document.getElementById('InvoiceCompanyID').className = 'valid';
|
document.getElementById('InvoiceCompanyID').readOnly=true;
|
document.getElementById('InvoiceCompanyAdd').value = '';
|
document.getElementById('InvoiceCompanyAdd').className = 'valid';
|
document.getElementById('InvoiceCompanyAdd').readOnly=true;
|
document.getElementById('InvoiceCompanyBank').value = '';
|
document.getElementById('InvoiceCompanyBank').className = 'valid';
|
document.getElementById('InvoiceCompanyBank').readOnly=true;
|
document.getElementById('InvoiceCompanyBankNo').value = '';
|
document.getElementById('InvoiceCompanyBankNo').className = 'valid';
|
document.getElementById('InvoiceCompanyBankNo').readOnly=true;
|
document.getElementById('InvoiceZipCode').value = '';
|
document.getElementById('InvoiceZipCode').className = 'valid';
|
document.getElementById('InvoiceZipCode').readOnly=true;
|
document.getElementById('Invoice_strAdd').value = '';
|
document.getElementById('Invoice_strAdd').className = 'valid';
|
document.getElementById('Invoice_strAdd').readOnly=true;
|
document.getElementById('Invoice_strEmail').value = '';
|
document.getElementById('Invoice_strEmail').className = 'valid';
|
document.getElementById('Invoice_strEmail').readOnly=true;
|
document.getElementById('Invoice_strName').value = '';
|
document.getElementById('Invoice_strName').className = 'valid';
|
document.getElementById('Invoice_strName').readOnly=true;
|
document.getElementById('Invoice_strPhone').value = '';
|
document.getElementById('Invoice_strPhone').className = 'valid';
|
document.getElementById('Invoice_strPhone').readOnly=true;
|
|
document.getElementById('ApplicationTime').innerHTML = '';
|
document.getElementById('AuditTime').innerHTML = '';
|
document.getElementById('AuditOAID').innerHTML = '';
|
$("#AuditStatus").val(0);
|
$("#InvoiceType").val(2);
|
document.form2.ServiceOrdNo.value='';
|
JS_InvoiceType();
|
}
|
|
//显示修改单据信息
|
function JS_InvoiceEdit(InvoiceID,ServiceOrdID,ServiceOrdNo,InvoiceName,InvoiceMakeout,InvoiceCompanyPhone,InvoiceCompanyID,InvoiceCompanyAdd,InvoiceCompanyBank,InvoiceCompanyBankNo,InvoiceZipCode,Invoice_strAdd,Invoice_strEmail,Invoice_strName,Invoice_strPhone,AuditMakeout,InvoiceMoney,InvoiceNo,ApplicationTime,AuditTime,AuditOAID,AuditStatus,InvoiceType,InvoiceURL,EleCloud_ZTDM,EleCloud_ZTXX,EleCloud_Time)
|
{
|
CarCreate.style.display='block';
|
document.getElementById('EditPhotoTXT').innerHTML = '发票申请信息';
|
document.form2.admin_save.value='13';
|
document.form2.ServiceOrdID.value=ServiceOrdID;
|
document.form2.InvoiceID.value=InvoiceID;
|
document.getElementById('ServiceOrdNo').value = ServiceOrdNo;
|
document.getElementById('ServiceOrdNo').className = 'valid';
|
document.getElementById('ServiceOrdNo').readOnly=true;
|
document.getElementById('AuditMakeout').value = AuditMakeout;
|
document.getElementById('AuditMakeout').className = '';
|
document.getElementById('AuditMakeout').readOnly=false;
|
document.getElementById('InvoiceMoney').value = InvoiceMoney;
|
document.getElementById('InvoiceMoney').className = '';
|
document.getElementById('InvoiceMoney').readOnly=false;
|
document.getElementById('InvoiceNo').value = InvoiceNo;
|
document.getElementById('InvoiceNo').className = '';
|
document.getElementById('InvoiceNo').readOnly=false;
|
document.getElementById('InvoiceName').value = InvoiceName;
|
document.getElementById('InvoiceName').className = '';
|
document.getElementById('InvoiceName').readOnly=false;
|
document.getElementById('InvoiceMakeout').value = InvoiceMakeout;
|
document.getElementById('InvoiceMakeout').className = '';
|
document.getElementById('InvoiceMakeout').readOnly=false;
|
|
document.getElementById('InvoiceCompanyPhone').value = InvoiceCompanyPhone;
|
document.getElementById('InvoiceCompanyPhone').className = '';
|
document.getElementById('InvoiceCompanyPhone').readOnly=false;
|
document.getElementById('InvoiceCompanyID').value = InvoiceCompanyID;
|
document.getElementById('InvoiceCompanyID').className = '';
|
document.getElementById('InvoiceCompanyID').readOnly=false;
|
document.getElementById('InvoiceCompanyAdd').value = InvoiceCompanyAdd;
|
document.getElementById('InvoiceCompanyAdd').className = '';
|
document.getElementById('InvoiceCompanyAdd').readOnly=false;
|
document.getElementById('InvoiceCompanyBank').value = InvoiceCompanyBank;
|
document.getElementById('InvoiceCompanyBank').className = '';
|
document.getElementById('InvoiceCompanyBank').readOnly=false;
|
document.getElementById('InvoiceCompanyBankNo').value = InvoiceCompanyBankNo;
|
document.getElementById('InvoiceCompanyBankNo').className = '';
|
document.getElementById('InvoiceCompanyBankNo').readOnly=false;
|
document.getElementById('InvoiceZipCode').value = InvoiceZipCode;
|
document.getElementById('InvoiceZipCode').className = '';
|
document.getElementById('InvoiceZipCode').readOnly=false;
|
document.getElementById('Invoice_strAdd').value = Invoice_strAdd;
|
document.getElementById('Invoice_strAdd').className = '';
|
document.getElementById('Invoice_strAdd').readOnly=false;
|
document.getElementById('Invoice_strEmail').value = Invoice_strEmail;
|
document.getElementById('Invoice_strEmail').className = '';
|
document.getElementById('Invoice_strEmail').readOnly=false;
|
document.getElementById('Invoice_strName').value = Invoice_strName;
|
document.getElementById('Invoice_strName').className = '';
|
document.getElementById('Invoice_strName').readOnly=false;
|
document.getElementById('Invoice_strPhone').value = Invoice_strPhone;
|
document.getElementById('Invoice_strPhone').className = '';
|
document.getElementById('Invoice_strPhone').readOnly=false;
|
|
document.getElementById('ApplicationTime').innerHTML = ApplicationTime;
|
document.getElementById('AuditTime').innerHTML = AuditTime;
|
document.getElementById('AuditOAID').innerHTML = AuditOAID;
|
$("#AuditStatus").val(AuditStatus);
|
$("#InvoiceType").val(InvoiceType);
|
document.form2.ServiceOrdNo.value=ServiceOrdNo;
|
JS_InvoiceType();
|
}
|
</script>
|
|
<div class="dialogJ dialogJfix dialogJshadow" id="CarCreate" style="width:800px; right: 300px; top: 80px;display:none;">
|
|
<div class="dialogJtitle">
|
<a href="javascript:JS_CarCreateClose();" class="dialogJclose" title="关闭本窗口"> </a>
|
<span class="dialogJtxt" id="EditPhotoTXT">发票申请信息</span>
|
</div>
|
<form id="form2" name="form2" action="admin_save.php" method="post">
|
<input name="admin_save" type="hidden" value="13">
|
<input name="searchTXT" type="hidden" value="<?php echo $searchTXT?>">
|
<input name="ServiceOrdID" type="hidden" value="">
|
<input name="InvoiceID" type="hidden" value="0">
|
<input name="page" type="hidden" value="<?php echo $page?>">
|
<div class="dialogJcontent">
|
<div class="dialogJbody" id="dialogJbody">
|
<div class="modify-album-name">
|
<span>服务单号:</span>
|
<input id="ServiceOrdNo" name="ServiceOrdNo" type="text" value="" style="width: 165px;" maxlength="99/"><input type="button" style="text-indent:initial;" class="dialogJbtn first-child" onclick="JS_ServiceOrdSearch()" value="调用"> <input type="button" style="text-indent:initial;" class="dialogJbtn first-child" onclick="JS_CarGasAdd()" value="重置"> <span class="dialogJtxt" id="ErrorsTXT" style="color: #ef0303;"></span>
|
</div>
|
<div class="modify-album-name">
|
<span>处理状态:</span>
|
<select id="AuditStatus" name="AuditStatus" style="padding: 5px 0 5px 8px;">
|
<?php for($i=0;$i<count($AuditStatusArray);$i++) {?>
|
<option value="<?php echo $AuditStatusArray[$i][0]?>"><?php echo $AuditStatusArray[$i][1]?></option>
|
<?php }?>
|
</select>
|
<span>处理日期:</span>
|
<span id="AuditTime"></span>
|
<span>处理人员:</span>
|
<span id="AuditOAID"></span>
|
</div>
|
<div class="modify-album-name">
|
<span>处理备注:</span>
|
<input id="AuditMakeout" name="AuditMakeout" type="text" value="" maxlength="99/" style="width: 400px;" readonly="true" class="valid">
|
</div>
|
<div class="modify-album-name">
|
<span>发票号码:</span>
|
<input id="InvoiceNo" name="InvoiceNo" type="text" value="" maxlength="99/" style="width: 400px;" readonly="true" class="valid">
|
</div>
|
<div class="modify-album-name">
|
<span>发票类型:</span>
|
<select id="InvoiceType" name="InvoiceType" onchange="JS_InvoiceType();" style="padding: 5px 0 5px 8px;">
|
<option value="1">不开发票</option>
|
<option value="2">电子发票</option>
|
<option value="3">增值税普票</option>
|
<option value="4">增值税专票</option>
|
</select>
|
<span>开票金额<font color="#ff0000">*</font>:</span>
|
<input id="InvoiceMoney" name="InvoiceMoney" type="text" value="" maxlength="99/" style="width: 100px;" readonly="true" class="valid">
|
<span>申请日期:</span>
|
<span id="ApplicationTime"></span>
|
</div>
|
<div class="modify-album-name">
|
<span>发票抬头<font color="#ff0000">*</font>:</span>
|
<input id="InvoiceName" name="InvoiceName" type="text" value="" maxlength="99/" style="width: 400px;" readonly="true" class="valid">
|
</div>
|
<div class="modify-album-name">
|
<span>发票备注:</span>
|
<input id="InvoiceMakeout" name="InvoiceMakeout" type="text" value="" maxlength="99/" style="width: 400px;" readonly="true" class="valid">
|
</div>
|
<div class="modify-album-name">
|
<span>纳税识别号:</span>
|
<input id="InvoiceCompanyID" name="InvoiceCompanyID" type="text" value="" maxlength="99/" style="width: 388px;" readonly="true" class="valid">
|
</div>
|
<div class="modify-album-name" id="InvoiceCompanyAddDiv" style="display:none;">
|
<span>企业注册地址:</span>
|
<input id="InvoiceCompanyAdd" name="InvoiceCompanyAdd" type="text" value="" maxlength="99/" style="width: 300px;" readonly="true" class="valid">
|
<span>企业电话:</span>
|
<input id="InvoiceCompanyPhone" name="InvoiceCompanyPhone" type="text" value="" maxlength="99/" style="width: 200px;" readonly="true" class="valid">
|
</div>
|
<div class="modify-album-name" id="InvoiceCompanyBankDiv" style="display:none;">
|
<span>企业开户银行:</span>
|
<input id="InvoiceCompanyBank" name="InvoiceCompanyBank" type="text" value="" maxlength="99/" style="width: 200px;" readonly="true" class="valid">
|
<span>企业银行账号:</span>
|
<input id="InvoiceCompanyBankNo" name="InvoiceCompanyBankNo" type="text" value="" maxlength="99/" style="width: 276px;" readonly="true" class="valid">
|
</div>
|
<div class="modify-album-name" id="Invoice_strAddDiv" style="display:none;">
|
<span>邮寄地址:</span>
|
<input id="Invoice_strAdd" name="Invoice_strAdd" type="text" value="" maxlength="99/" style="width: 448px;" readonly="true" class="valid">
|
<span>邮编:</span>
|
<input id="InvoiceZipCode" name="InvoiceZipCode" type="text" value="" maxlength="99/" style="width: 100px;" readonly="true" class="valid">
|
</div>
|
<div class="modify-album-name" id="Invoice_strEmailDiv">
|
<span>接收电子邮箱<font color="#ff0000">*</font>:</span>
|
<input id="Invoice_strEmail" name="Invoice_strEmail" type="text" value="" maxlength="99/" style="width: 200px;" readonly="true" class="valid">若无邮箱,请填写“无”
|
</div>
|
<div class="modify-album-name">
|
<span id="Invoice_strNameTXT">联系人<font color="#ff0000">*</font>:</span>
|
<input id="Invoice_strName" name="Invoice_strName" type="text" value="" maxlength="99/" style="width: 200px;" readonly="true" class="valid">
|
<span id="Invoice_strPhoneTXT">联系电话<font color="#ff0000">*</font>:</span>
|
<input id="Invoice_strPhone" name="Invoice_strPhone" type="text" value="" maxlength="99/" style="width: 200px;" readonly="true" class="valid">
|
</div>
|
</div>
|
</div>
|
</form>
|
<div class="dialogJanswers" style="padding: 30px 20px 13px 18px;">
|
<input type="button" class="dialogJbtn first-child" onclick="JS_CarCreateSave()" value="确定">
|
<input type="button" class="dialogJbtn" onclick="JS_CarCreateClose()" value="取消">
|
</div>
|
</div>
|
|
<div class="search">
|
<form action="?" method="post">
|
<div class="input">
|
<input type="text" id="searchTXT" name="searchTXT" value="<?php echo $searchTXT?>" />
|
</div>
|
|
<div class="button">
|
<input type="submit" name="submit" value="搜索" />
|
</div>
|
</form>
|
</div>
|
</ul>
|
</div>
|
<!-- end box / title -->
|
<?php
|
//分页信息
|
$page=empty($_REQUEST['page'])==true ? 1 : $_REQUEST['page']; //当前页数
|
$page=empty($draw)==true ? $page : $draw; //当前页数
|
$page_size = 20; //每页显示数量
|
$total_page=0; //总页数
|
$total_records=0; //总记录数
|
//查询条件
|
$searchSql="";
|
$searchTXT=empty($searchTXT)==true ? "" : $searchTXT;
|
if (strlen($searchTXT)==14 and !is_numeric(substr($searchTXT,0,2)) And is_numeric(substr($searchTXT,2,8)) And is_numeric(substr($searchTXT,-3)) And substr($searchTXT,10,1)=="-"){
|
$searchSql=" and ((ServiceOrdClass='".substr($searchTXT,0,2)."' and CONVERT(VARCHAR(10),ServiceOrd_CC_Time,120)=CONVERT(VARCHAR(10),'".substr($searchTXT,2,4)."-".substr($searchTXT,6,2)."-".substr($searchTXT,8,2)."',120) and Right('00'+convert(varchar(3),ServiceOrdNo),3)='".substr($searchTXT,-3)."') or ServiceOrdID in (select ServiceOrdIDDt from DispatchOrd where DispatchOrdClass='".substr($searchTXT,0,2)."' and CONVERT(VARCHAR(10),DispatchOrd_NS_Time,120)=CONVERT(VARCHAR(10),'".substr($searchTXT,2,4)."-".substr($searchTXT,6,2)."-".substr($searchTXT,8,2)."',120) and Right('00'+convert(varchar(3),DispatchOrdNo),3)='".substr($searchTXT,-3)."')) ";
|
}elseif ($searchTXT!=""){
|
$searchSql=" and (InvoiceName like '%$searchTXT%' or InvoiceNo='$searchTXT') ";
|
}elseif ($AuditStatus!=-1) {
|
$searchSql=" and Points_State=$AuditStatus ";
|
$searchSql = $searchSql." and Points_Time ".$SqlOrdDateType;
|
}else{
|
$searchSql=" and Points_State<>4 ";
|
$searchSql = $searchSql." and Points_Time ".$SqlOrdDateType;
|
}
|
//$searchSql = $searchSql." and ApplicationTime ".$SqlOrdDateType;
|
$orderby=empty($orderby)==true ? "" : $orderby;
|
If (strrpos($orderby," desc")>1){
|
$orderbydesc="";
|
$descTXT="↓";
|
}else{
|
$orderbydesc=" desc";
|
$descTXT="↑";
|
}
|
|
If ($orderby=="") {
|
$orderby="OutHosp|InHosp desc,OutHospPrice|InHospPrice desc";
|
$descTXT="↓";
|
}
|
//echo $OrdClassListSql;
|
|
//查询开始
|
$InvoiceType=empty($InvoiceType)==true ? "1" : $InvoiceType;
|
//按调度单统计
|
//SQL查询条件
|
$sqlWhere=" from UserPoints,UserData where UserID=ToUserID and Points_Type=4".$searchSql;
|
//组成计算总页数SQL
|
$total_sql = "select Pid $sqlWhere";
|
//组成显示结果SQL
|
$Result_sql = "select Pid,UserID,Points_Score=abs(Points_Score),Points_Type,Points_Time=CONVERT(nvarchar(20),Points_Time,120),Points_State,Points_Value1,Points_Value2,Points_Value3,UserName,UserPhone,UserNickName,AuditTime=CONVERT(nvarchar(20),AuditTime,120),AuditOAID,AuditMakeout,row_number() over (order by Points_Time desc) n $sqlWhere";
|
//附加结果SQL
|
$Additional_sql = "";
|
|
//计算总页数
|
$data = sqlsrv_query( $conn, $total_sql, array(), array( "Scrollable" => 'keyset' ));
|
$total_records=sqlsrv_num_rows($data); //总行数
|
$total_page=ceil($total_records/$page_size); //总页数
|
//避免page小于0或大于总页数
|
$page=$page<=0?1:$page;
|
$page=$page>$total_page?$total_page:$page;
|
//计算开始和结束行数
|
$pageStart = ($page-1)*$page_size;
|
$pageEnd = $pageStart+$page_size;
|
$sqlPage = " where sqlData.n > $pageStart and sqlData.n <= $pageEnd " ;
|
|
$sql = "select * $Additional_sql from ($Result_sql) sqlData ".$sqlPage." order by sqlData.n" ;
|
//echo $sql;exit;
|
$data = sqlsrv_query($conn,$sql);
|
if (sqlsrv_rows_affected($data)==0) {
|
$SystemMessageType=2;
|
$SystemMessageTXT="数据库中相关无数据!";
|
}
|
?>
|
<?php require '/inc/SystemMessages.php';?>
|
<div class="table" style="overflow:auto">
|
<form id="form1" name="form1" action="" method="post">
|
<input name="admin_save" type="hidden" value="13">
|
<input name="Car_Check" type="hidden" value="">
|
<input name="searchTXT" type="hidden" value="<%=searchTXT%>">
|
<input name="page" type="hidden" value="<%=acc1%>">
|
<table>
|
<thead>
|
<tr style="white-space: nowrap;">
|
<th>积分流水号</th>
|
<th>用户姓名</th>
|
<th>用户电话</th>
|
<th>申请时间</th>
|
<th>提现金额</th>
|
<th>提现方式</th>
|
<th>提现备注</th>
|
<th>处理状态</th>
|
<th>处理人</th>
|
<th>处理时间</th>
|
<th class="last">处理备注</th>
|
</tr>
|
</thead>
|
<tbody>
|
<?php
|
$i=1;
|
while($rs = sqlsrv_fetch_array( $data, SQLSRV_FETCH_ASSOC) ) {
|
$i++;
|
$Pid = $rs['Pid']; //积分流水号
|
$UserID = $rs['UserID']; //用户ID
|
$Points_Score = floor($rs['Points_Score']); //提现金额
|
$Points_Type = $rs['Points_Type']; //积分类型
|
|
$Points_Time = $rs['Points_Time']; //申请时间
|
$Points_State = $rs['Points_State']; //处理状态
|
$Points_Value1 = $rs['Points_Value1']; //提现方式
|
$Points_Value2 = $rs['Points_Value2']; //提现备注
|
$Points_Value3 = $rs['Points_Value3']; //处理状态(中文)
|
|
$UserName = $rs['UserName']; //用户姓名
|
$UserPhone = $rs['UserPhone'];//用户电话
|
$UserNickName = $rs['UserNickName'];//用户微信名称
|
$AuditTime = $rs['AuditTime']; //处理时间
|
$AuditOAID = $rs['AuditOAID']; //处理人
|
$AuditMakeout = $rs['AuditMakeout']; //处理备注
|
|
$AuditOAName=empty($AuditOAID)==true ? "--" : OAUser($AuditOAID,"UserName");
|
?>
|
|
<tr style="white-space: nowrap;">
|
<td class="category category2"><?php echo $Pid?></td>
|
<td class="category category2"><?php echo $UserName?></td>
|
<td class="category category2"><?php echo $UserPhone?></td>
|
<td class="category category2"><?php echo $Points_Time?></td>
|
<td class="category category2"><?php echo $Points_Score?></td>
|
<td class="category category2"><?php echo $Points_Value1?></td>
|
<td class="category category2"><?php echo $Points_Value2?></td>
|
<td class="category category2"><?php echo $Points_Value3?></td>
|
<td class="category category2"><?php echo $AuditTime?></td>
|
<td class="category category2"><?php echo $AuditOAName?></td>
|
<td class="category category2 last"><?php echo $AuditMakeout?></td>
|
</tr>
|
<?php }?>
|
<?php
|
$classHtml="";
|
for($j=$i;$j<=20;$j++) {
|
echo "<tr>";
|
echo "<td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td class='last'> </td>";
|
echo "</tr>";
|
}
|
?>
|
</tbody>
|
</table>
|
<!-- 分页 -->
|
<?php if ($total_records>=1) {?>
|
<div class="pagination pagination-left">
|
<div class="results">
|
<?php
|
$ShowingLeast = ($page-1)*$page_size+1;
|
$ShowingMax = $page_size*$page;
|
if ($ShowingMax>$total_records) {$ShowingMax=$total_records;}
|
?>
|
<span><?php echo "显示 $ShowingLeast-$ShowingMax of $total_records";?></span>
|
</div>
|
<?php if ($total_page>1) {?>
|
<ul class="pager">
|
<?php
|
if ($page==1) {
|
echo "<li class=\"disabled\">« 上页</li>";
|
}else{
|
echo "<li><a href=\"?page=".($page-1)."&".$page_URL."\">« 上页</a></li>";
|
}
|
|
$acc4=0;
|
for($i=1;$i<=$total_page;$i++) {
|
if ($i==$page) {echo "<li class=\"current\">$i</li>";}
|
elseif ($i<=3 or $i>($total_page-3) ) {echo "<li><a href=\"?page=$i&$page_URL\">$i</a></li>";}
|
elseif ($acc4==0){echo "<li class=\"separator\">...</li>";$acc4=$i<$page ? 1 : 2;}
|
elseif ($acc4==1 and $i>$page+3){echo "<li class=\"separator\">...</li>";$acc4=2;}
|
elseif ($acc4==1 and $i>=$page-3){echo "<li><a href=\"?page=$i&$page_URL\">$i</a></li>";}
|
}
|
|
if ($page>=$total_page) {
|
echo "<li class=\"disabled\">下页 »</li>";
|
}else{
|
echo "<li><a href=\"?page=".($page+1)."&".$page_URL."\">下页 »</a></li>";
|
}
|
?>
|
</ul>
|
<?php }?>
|
</div>
|
<?php }?>
|
<!-- end 分页 -->
|
</div>
|
</div>
|
<!-- end table -->
|
|
|
|
</div>
|
<!-- end content / right -->
|
</div>
|
<!-- end content -->
|
<!--#include FILE="vicgame.asp"-->
|
<IFRAME id="HiddenFrame" name="HiddenFrame" WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=#ffffff></IFRAME>
|
</body>
|
</html>
|