You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
364 lines
15 KiB
HTML
364 lines
15 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta charset="UTF-8">
|
|
<title></title>
|
|
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
|
|
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
|
|
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
|
|
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
|
|
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
|
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
|
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
|
|
|
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
|
|
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
|
<script type="text/javascript" src="__STATIC__/layer3/layer.js"></script>
|
|
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
|
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"
|
|
charset="UTF-8"></script>
|
|
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
|
|
</head>
|
|
<style>
|
|
html {
|
|
min-width: 100%;
|
|
}
|
|
|
|
body {
|
|
padding: 0px 10px 150px;
|
|
/* width: 960px; */
|
|
margin: auto;
|
|
|
|
}
|
|
|
|
.tabcon1711 table {
|
|
width: 480px;
|
|
}
|
|
|
|
table {
|
|
|
|
margin: auto;
|
|
}
|
|
|
|
.hidebox {
|
|
display: none;
|
|
}
|
|
|
|
.r {
|
|
width: 300px;
|
|
}
|
|
|
|
.l {
|
|
width: 180px;
|
|
}
|
|
|
|
.select2-container--default .select2-selection--single {
|
|
color: #000;
|
|
resize: none;
|
|
border-width: 1px;
|
|
border-style: solid;
|
|
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
|
box-shadow: 0px 3px 3px #F7F8F9 inset;
|
|
height: 35px;
|
|
height: 28px;
|
|
border-radius: 3px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
|
line-height: 35px;
|
|
line-height: 28px;
|
|
}
|
|
|
|
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
|
height: 26px;
|
|
}
|
|
|
|
.select2-container--default .select2-search--dropdown .select2-search__field {
|
|
height: 26px;
|
|
line-height: 26px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.select2-results__option[aria-selected] {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.input-list,
|
|
.i_list {
|
|
float: left;
|
|
margin: 0;
|
|
}
|
|
</style>
|
|
|
|
<body>
|
|
<!-- <div style="width: 100%;line-height: 100px;font-size: 25px;font-weight: 600;text-align: center;">
|
|
海南万盟天下科技有限公司
|
|
</div> -->
|
|
|
|
<div class="data_list box_mt" style="margin-top: 20px;">
|
|
<div class="">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th style="border-right: solid 1px #b6cad2;">序号</th>
|
|
<th style="border-right: solid 1px #b6cad2;">合作公司</th>
|
|
<th style="border-right: solid 1px #b6cad2;">是否支付宝打款</th>
|
|
|
|
<th style="border-right: solid 1px #b6cad2;">户名</th>
|
|
<th style="border-right: solid 1px #b6cad2;">帐号</th>
|
|
<th style="border-right: solid 1px #b6cad2;">开户行</th>
|
|
|
|
<th style="border-right: solid 1px #b6cad2;">关联结算汇总单订单号</th>
|
|
<th style="border-right: solid 1px #b6cad2;">结算金额(元)</th>
|
|
<th style="border-right: solid 1px #b6cad2;">备注</th>
|
|
<th style="border-right: solid 1px #b6cad2;">操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="statementShow">
|
|
<foreach name="CompanyInfo" item="vo" >
|
|
<if condition="$vo['pay_status'] neq 1">
|
|
<tr>
|
|
<td>{$key-0+1}</td>
|
|
<td>{$vo.company_name}</td>
|
|
<if condition="$vo['is_payment'] eq 1">
|
|
<td>是</td>
|
|
<td><input type="text" class="txt paymentset" data-id="{$vo.id}" name="ali_user" value="{$vo.company_info.ali_user}" placeholder="支付宝真实名称"></td>
|
|
<td><input type="text" class="txt paymentset" data-id="{$vo.id}" name="ali_account" value="{$vo.company_info.ali_account}" placeholder="支付宝账号"></td>
|
|
<td></td>
|
|
<else />
|
|
<td>否</td>
|
|
<td><input type="text" class="txt paymentset" data-id="{$vo.id}" name="payee_name" value="{$vo.company_info.payee_name}" placeholder="银行帐户名"></td>
|
|
<td><input type="text" class="txt paymentset" data-id="{$vo.id}" name="bank_account" value="{$vo.company_info.bank_account}" placeholder="银行帐号"></td>
|
|
<td><input type="text" class="txt paymentset" data-id="{$vo.id}" name="opening_bank" value="{$vo.company_info.opening_bank}" placeholder="开户行"></td>
|
|
</if>
|
|
|
|
<td>{$vo.statement_num}</td>
|
|
<td>{$vo.statement_money}</td>
|
|
<td><input type="text" class="txt paymentset" data-id="{$vo.id}" name="remark" value="{$vo.remark}" placeholder="备注"></td>
|
|
<td><a class="add_one" href="#">新增</a></td>
|
|
</tr>
|
|
<else />
|
|
<tr>
|
|
<td>{$key-0+1}</td>
|
|
<td>{$vo.company_name}</td>
|
|
|
|
<if condition="$vo['is_payment'] eq 1">
|
|
<td>是</td>
|
|
<td>{$vo.company_info.ali_user}</td>
|
|
<td>{$vo.company_info.ali_account}</td>
|
|
<td></td>
|
|
<else />
|
|
<td>否</td>
|
|
<td>{$vo.company_info.payee_name}</td>
|
|
<td>{$vo.company_info.bank_account}</td>
|
|
<td>{$vo.company_info.opening_bank}</td>
|
|
</if>
|
|
<td>{$vo.statement_num}</td>
|
|
<td>{$vo.statement_money}</td>
|
|
<td>{$vo.remark}</td>
|
|
<td><a class="add_one" href="#">新增</a></td>
|
|
</tr>
|
|
</if>
|
|
|
|
</foreach>
|
|
<tr id="sum">
|
|
<td colspan="2">合计:</td>
|
|
<td colspan="8"><span>结算总金额:{$all_money}</span><span style="margin-left: 20px">剩余打款金额:</span><span class="surplusAmount">{$surplur_amount}</span></td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="search_list" style="display:flex;justify-content:flex-end;width:100%;margin-top: 30px;">
|
|
<div class="input-list" style="margin-left: 30px;float: right;">
|
|
<a class="sch-btn" href="javascript:;" id="setPayment" style="width: 150px;">确认提交</a>
|
|
</div>
|
|
</div>
|
|
<div style="display: none">
|
|
<table>
|
|
<thead>
|
|
</thead>
|
|
<tbody id="add_item">
|
|
<foreach name="CompanyInfo" item="vo" >
|
|
<if condition="$vo['pay_status'] neq 1">
|
|
<tr>
|
|
<td class="index_num">2</td>
|
|
<td>{$vo.company_name}</td>
|
|
<if condition="$vo['is_payment'] eq 1">
|
|
<td>是</td>
|
|
<td><input type="text" class="txt paymentset" data-id="{$vo.id}" name="ali_user" value="{$vo.company_info.ali_user}" placeholder="支付宝真实名称"></td>
|
|
<td><input type="text" class="txt paymentset" data-id="{$vo.id}" name="ali_account" value="{$vo.company_info.ali_account}" placeholder="支付宝账号"></td>
|
|
<td></td>
|
|
<else />
|
|
<td>否</td>
|
|
<td><input data-index_num="2" type="text" class="txt paymentset" data-id="{$vo.id}" name="payee_name" value="{$vo.company_info.payee_name}" placeholder="银行帐户名"></td>
|
|
<td><input data-index_num="2" type="text" class="txt paymentset" data-id="{$vo.id}" name="bank_account" value="{$vo.company_info.bank_account}" placeholder="银行帐号"></td>
|
|
<td><input data-index_num="2" type="text" class="txt paymentset" data-id="{$vo.id}" name="opening_bank" value="{$vo.company_info.opening_bank}" placeholder="开户行"></td>
|
|
</if>
|
|
|
|
<td>{$vo.statement_num}</td>
|
|
<td><input data-index_num="2" value="0" style="width: 80px;" type="number" onblur="if(value<0) value=0" data-id="{$vo.id}" name="unpay_amount" class="unpay_amount"></td>
|
|
<td><input data-index_num="2" type="text" class="txt paymentset unPayRemark" data-id="{$vo.id}" name="remark" value="" placeholder="备注"></td>
|
|
<td><a class="del" href="#">删除</a></td>
|
|
</tr>
|
|
</if>
|
|
|
|
</foreach>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
<script>
|
|
$("#setPayment").on("click",function(){
|
|
var sendObj = {};
|
|
var url = "{:U('editPartPayment')}";
|
|
|
|
var tip = false;
|
|
|
|
$("input[name='ali_user'],input[name='ali_account'],input[name='remark'],input[name='payee_name'],input[name='bank_account'],input[name='opening_bank'],input[name='unpay_amount']").map(function(index,elem) {
|
|
var index_num = $(elem).data("index_num");
|
|
|
|
var id = $(elem).data("id");
|
|
var e = $(elem).attr("name");
|
|
var v = $(elem).val();
|
|
|
|
if (!index_num) {
|
|
if(id in sendObj){
|
|
sendObj[id][e] = v;
|
|
}else{
|
|
sendObj[id] = {};
|
|
sendObj[id][e] = v;
|
|
}
|
|
} else {
|
|
|
|
var parent = $(elem).parent().parent().parent().attr('id');
|
|
|
|
if (parent!="add_item") {
|
|
|
|
if (e == 'unpay_amount') {
|
|
|
|
if (parseFloat(v) == 0) {
|
|
tip = true;
|
|
}
|
|
}
|
|
|
|
if(index_num+id in sendObj){
|
|
if (!(e in sendObj[index_num+id])) {
|
|
sendObj[index_num+id][e] = v;
|
|
}
|
|
}else{
|
|
sendObj[index_num+id] = {};
|
|
sendObj[index_num+id][e] = v;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
if (tip == true) {
|
|
layer.msg("<font style='color:white'>剩余支付金额不能小于等于0</font>");
|
|
return false;
|
|
}
|
|
|
|
layer.confirm("若支付宝账号及真实姓名不全的公司,将无法进行打款。请认真核对,点击取消返回",{title:false}, function(index){
|
|
$.ajax({
|
|
type: "POST",
|
|
url: url,
|
|
dataType: 'json',
|
|
async: false,
|
|
data: {info:sendObj},
|
|
success:function(data){
|
|
layer.close(index);
|
|
if(data.status==1){
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
setTimeout(function(){
|
|
window.parent.reload();
|
|
},1000);
|
|
}else{
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
});
|
|
|
|
$(".add_one").on("click",function(){
|
|
// $(this).parent().parent().html();
|
|
$("#sum").before($("#add_item").html());
|
|
var index_num = parseInt($("#add_item").find(".index_num").text());
|
|
|
|
$("#add_item").find(".index_num").text(index_num+1);
|
|
$("#add_item").find(".unpay_amount").attr("data-index_num",index_num+1);
|
|
$("#add_item").find(".unPayRemark").attr("data-index_num",index_num+1);
|
|
|
|
$("#add_item").find("[name=payee_name]").attr("data-index_num",index_num+1);
|
|
$("#add_item").find("[name=bank_account]").attr("data-index_num",index_num+1);
|
|
$("#add_item").find("[name=opening_bank]").attr("data-index_num",index_num+1);
|
|
|
|
addDel();
|
|
unPayAmount();
|
|
});
|
|
//删除事件
|
|
function addDel() {
|
|
$(".del").off("click");
|
|
$(".del").on("click",function() {
|
|
$(this).parent().parent().remove();
|
|
unPayAmountDetail();
|
|
});
|
|
}
|
|
//计算剩余打款金额
|
|
function unPayAmount() {
|
|
$(".unpay_amount").off("blur");
|
|
$(".unpay_amount").on("blur",function () {
|
|
unPayAmountDetail();
|
|
});
|
|
}
|
|
|
|
var surplur_amount = "{$surplur_amount}";
|
|
function unPayAmountDetail() {
|
|
var value = 0;
|
|
|
|
$(".unpay_amount").map(function(index,elem) {
|
|
|
|
value += parseFloat($(elem).val());
|
|
|
|
}).get();
|
|
|
|
$(".surplusAmount").text((surplur_amount - value).toFixed(2));
|
|
}
|
|
|
|
function cancelPoolAjax(opurl,senddata){
|
|
//执行
|
|
$.ajax({
|
|
type: "POST",
|
|
url: opurl,
|
|
dataType: 'json',
|
|
async: false,
|
|
data: senddata,
|
|
success:function(data){
|
|
if(data.status==1){
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
setTimeout(function(){
|
|
window.location.reload();
|
|
},1500);
|
|
}else{
|
|
layer.msg("<font style='color:white'>" + data.info + "</font>");
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html> |