|
|
|
@ -89,25 +89,13 @@
|
|
|
|
|
<div class="tab-content tabcon1711" id="firstPartBaseInfo">
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l">公司类型:</td>
|
|
|
|
|
<td class="r">
|
|
|
|
|
<div class="input-list input-list-game search_label_rehab">
|
|
|
|
|
<select id="first_partner_type" name="first_partner_type" class="select_gallery">
|
|
|
|
|
<option value="">请选择甲方公司类型</option>
|
|
|
|
|
<option value="0">CP上游公司</option>
|
|
|
|
|
<option value="1">平台归属公司</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l">甲方:</td>
|
|
|
|
|
<td class="r">
|
|
|
|
|
<div class="input-list input-list-game search_label_rehab">
|
|
|
|
|
<select id="first_partner_id" name="partner_id" class="select_gallery">
|
|
|
|
|
<option value="">请选择合作公司</option>
|
|
|
|
|
</select>
|
|
|
|
|
<option value="{$data['first_party_info']['id']}" selected>{$data['first_part_company']}</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
@ -143,17 +131,13 @@
|
|
|
|
|
<div class="tab-content tabcon1711" id="secondPartBaseInfo">
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l"></td>
|
|
|
|
|
<td class="r"></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="l">乙方:</td>
|
|
|
|
|
<td class="r">
|
|
|
|
|
<div class="input-list input-list-game search_label_rehab">
|
|
|
|
|
<select id="second_partner_id" name="partner_id" class="select_gallery">
|
|
|
|
|
<option value="">请选择合作公司</option>
|
|
|
|
|
</select>
|
|
|
|
|
<option value="{$data['second_party_info']['id']}" selected>{$data['second_part_company']}</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
@ -189,13 +173,15 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div style="padding: 30px 0px 10px;display: block;height:30px;">
|
|
|
|
|
<div class="input-list input-list-server search_label_rehab">
|
|
|
|
|
<p style="font-size: 20px;font-weight: 600;">支付给:</p>
|
|
|
|
|
<p style="font-size: 20px;font-weight: 600;">支付给:<spen style="margin-left: 15px;font-size: 16px;">{$company}
|
|
|
|
|
</spen>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="input-list input-list-server search_label_rehab" style="margin-left: 20px;">
|
|
|
|
|
<!-- <div class="input-list input-list-server search_label_rehab" style="margin-left: 20px;">
|
|
|
|
|
<select id="statement_type" name="statement_type" class="select_gallery" style="width: 215px;">
|
|
|
|
|
<option value="">请选择合作公司</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="search_list" style="display: block;line-height: 30px;height: 10px;">
|
|
|
|
|
<div class="input-list input-list-server search_label_rehab">
|
|
|
|
@ -311,7 +297,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="search_list" style="display: flex;justify-content:flex-end;width:960px;">
|
|
|
|
|
<div class="input-list" style="margin-left: 30px;float: right;">
|
|
|
|
|
<a class="sch-btn" href="javascript:;" id="createStatement" style="width: 150px;">申请开票</a>
|
|
|
|
|
<a class="sch-btn" href="javascript:;" id="createStatement" style="width: 150px;">确认修改</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -452,7 +438,7 @@
|
|
|
|
|
EVENT.createStatement();
|
|
|
|
|
//获取账单信息
|
|
|
|
|
TPLSHOW.showStatementList(true);
|
|
|
|
|
// $("#first_partner_id").change();//默认甲方只能是我们公司
|
|
|
|
|
$("#first_partner_id").change();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
//基础类
|
|
|
|
@ -525,99 +511,97 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//数据类
|
|
|
|
|
var DATAOBJ = {
|
|
|
|
|
first_partner_type:false,
|
|
|
|
|
first_part_company:false,
|
|
|
|
|
second_part_company:false,
|
|
|
|
|
|
|
|
|
|
statement_type:false,
|
|
|
|
|
first_party_info:false,
|
|
|
|
|
second_party_info:false,
|
|
|
|
|
statement_info:{$data|json_encode=###,JSON_UNESCAPED_UNICODE},
|
|
|
|
|
statement_count:{$data_count|json_encode=###,JSON_UNESCAPED_UNICODE},
|
|
|
|
|
fine:0,
|
|
|
|
|
// statement_begin_time:false,
|
|
|
|
|
// statement_end_time:false,
|
|
|
|
|
statement_id:{$id}
|
|
|
|
|
}
|
|
|
|
|
var DATAOBJ = {$data|json_encode=###,JSON_UNESCAPED_UNICODE};
|
|
|
|
|
//事件类
|
|
|
|
|
var EVENT = {
|
|
|
|
|
changeCompany(){
|
|
|
|
|
$("#first_partner_type").on("change",function(){
|
|
|
|
|
var type = $(this).find("option:selected").val();
|
|
|
|
|
if(type == ''){
|
|
|
|
|
type=false;
|
|
|
|
|
}
|
|
|
|
|
DATAOBJ.first_partner_type = type;
|
|
|
|
|
//获取cp和内部公司
|
|
|
|
|
var url = "{:U('getCompanyList')}";
|
|
|
|
|
PUBLIC.postData(url,{id:DATAOBJ.statement_id},function(data){
|
|
|
|
|
var ptCompany = data.success.ptCompany;
|
|
|
|
|
var cpCompany = data.success.cpCompany;
|
|
|
|
|
var ptstr = '<option value="">请选择平台归属公司</option>';
|
|
|
|
|
|
|
|
|
|
for (var i in ptCompany) {
|
|
|
|
|
ptstr += "<option value='" + ptCompany[i].id + "'>" + ptCompany[i].partner + "</option>"
|
|
|
|
|
}
|
|
|
|
|
var cpstr = '<option value="">请选择合作公司</option>';
|
|
|
|
|
for (var i in cpCompany) {
|
|
|
|
|
cpstr += "<option value='" + cpCompany[i].id + "'>" + cpCompany[i].partner + "</option>"
|
|
|
|
|
}
|
|
|
|
|
//
|
|
|
|
|
if(type == 0){
|
|
|
|
|
$("#first_partner_id").html(cpstr);
|
|
|
|
|
$("#second_partner_id").html(ptstr);
|
|
|
|
|
}else{
|
|
|
|
|
$("#first_partner_id").html(ptstr);
|
|
|
|
|
$("#second_partner_id").html(cpstr);
|
|
|
|
|
}
|
|
|
|
|
$("#first_partner_id").select2();
|
|
|
|
|
$("#second_partner_id").select2();
|
|
|
|
|
//重置数据
|
|
|
|
|
|
|
|
|
|
DATAOBJ.first_part_company=false;
|
|
|
|
|
DATAOBJ.second_part_company=false;
|
|
|
|
|
TPLSHOW.pushStatementTypeOption();
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
$("#first_partner_id").on("change",function(){
|
|
|
|
|
//获取数据
|
|
|
|
|
var comid = $(this).find("option:selected").val();
|
|
|
|
|
//获取基础数据
|
|
|
|
|
var url = "{:U('getCpCompanyInfo')}";
|
|
|
|
|
var company_type;
|
|
|
|
|
if(DATAOBJ.first_partner_type == 0){
|
|
|
|
|
//CP上游公司
|
|
|
|
|
company_type = "cp";
|
|
|
|
|
}else{
|
|
|
|
|
company_type = "pt";
|
|
|
|
|
}
|
|
|
|
|
PUBLIC.postData(url,{company_id:comid,company_type:company_type},function(data){
|
|
|
|
|
DATAOBJ.first_part_company = data.success.partner;
|
|
|
|
|
DATAOBJ.first_party_info = data.success;
|
|
|
|
|
data.success.type = "first_party_info";
|
|
|
|
|
TPLSHOW.firstPartInfo(data.success);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
$("#second_partner_id").on("change",function(){
|
|
|
|
|
//获取数据
|
|
|
|
|
var comid = $(this).find("option:selected").val();
|
|
|
|
|
//获取基础数据
|
|
|
|
|
var url = "{:U('getCpCompanyInfo')}";
|
|
|
|
|
var company_type;
|
|
|
|
|
if(DATAOBJ.first_partner_type == 0){
|
|
|
|
|
//CP上游公司
|
|
|
|
|
company_type = "pt";
|
|
|
|
|
}else{
|
|
|
|
|
company_type = "cp";
|
|
|
|
|
}
|
|
|
|
|
PUBLIC.postData(url,{company_id:comid,company_type:company_type},function(data){
|
|
|
|
|
DATAOBJ.second_part_company = data.success.partner;
|
|
|
|
|
DATAOBJ.second_party_info = data.success;
|
|
|
|
|
data.success.type = "second_party_info";
|
|
|
|
|
TPLSHOW.secondPartInfo(data.success);
|
|
|
|
|
$("#first_partner_id").on("change", function () {
|
|
|
|
|
TPLSHOW.firstPartInfo(DATAOBJ.first_party_info);
|
|
|
|
|
TPLSHOW.secondPartInfo(DATAOBJ.second_party_info);
|
|
|
|
|
TPLSHOW.showPartPayInfo();
|
|
|
|
|
TPLSHOW.showStatementList(true);
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
// $("#first_partner_id").on("change", function () {
|
|
|
|
|
// TPLSHOW.secondPartInfo(DATAOBJ.second_party_info);
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $("#first_partner_type").on("change",function(){
|
|
|
|
|
// var type = $(this).find("option:selected").val();
|
|
|
|
|
// if(type == ''){
|
|
|
|
|
// type=false;
|
|
|
|
|
// }
|
|
|
|
|
// DATAOBJ.first_partner_type = type;
|
|
|
|
|
// //获取cp和内部公司
|
|
|
|
|
// var url = "{:U('getCompanyList')}";
|
|
|
|
|
// PUBLIC.postData(url,{id:DATAOBJ.statement_id},function(data){
|
|
|
|
|
// var ptCompany = data.success.ptCompany;
|
|
|
|
|
// var cpCompany = data.success.cpCompany;
|
|
|
|
|
// var ptstr = '<option value="">请选择平台归属公司</option>';
|
|
|
|
|
|
|
|
|
|
// for (var i in ptCompany) {
|
|
|
|
|
// ptstr += "<option value='" + ptCompany[i].id + "'>" + ptCompany[i].partner + "</option>"
|
|
|
|
|
// }
|
|
|
|
|
// var cpstr = '<option value="">请选择合作公司</option>';
|
|
|
|
|
// for (var i in cpCompany) {
|
|
|
|
|
// cpstr += "<option value='" + cpCompany[i].id + "'>" + cpCompany[i].partner + "</option>"
|
|
|
|
|
// }
|
|
|
|
|
// //
|
|
|
|
|
// if(type == 0){
|
|
|
|
|
// $("#first_partner_id").html(cpstr);
|
|
|
|
|
// $("#second_partner_id").html(ptstr);
|
|
|
|
|
// }else{
|
|
|
|
|
// $("#first_partner_id").html(ptstr);
|
|
|
|
|
// $("#second_partner_id").html(cpstr);
|
|
|
|
|
// }
|
|
|
|
|
// $("#first_partner_id").select2();
|
|
|
|
|
// $("#second_partner_id").select2();
|
|
|
|
|
// //重置数据
|
|
|
|
|
|
|
|
|
|
// DATAOBJ.first_part_company=false;
|
|
|
|
|
// DATAOBJ.second_part_company=false;
|
|
|
|
|
// TPLSHOW.pushStatementTypeOption();
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
// $("#first_partner_id").on("change",function(){
|
|
|
|
|
// //获取数据
|
|
|
|
|
// var comid = $(this).find("option:selected").val();
|
|
|
|
|
// //获取基础数据
|
|
|
|
|
// var url = "{:U('getCpCompanyInfo')}";
|
|
|
|
|
// var company_type;
|
|
|
|
|
// if(DATAOBJ.first_partner_type == 0){
|
|
|
|
|
// //CP上游公司
|
|
|
|
|
// company_type = "cp";
|
|
|
|
|
// }else{
|
|
|
|
|
// company_type = "pt";
|
|
|
|
|
// }
|
|
|
|
|
// PUBLIC.postData(url,{company_id:comid,company_type:company_type},function(data){
|
|
|
|
|
// DATAOBJ.first_part_company = data.success.partner;
|
|
|
|
|
// DATAOBJ.first_party_info = data.success;
|
|
|
|
|
// data.success.type = "first_party_info";
|
|
|
|
|
// TPLSHOW.firstPartInfo(data.success);
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
// $("#second_partner_id").on("change",function(){
|
|
|
|
|
// //获取数据
|
|
|
|
|
// var comid = $(this).find("option:selected").val();
|
|
|
|
|
// //获取基础数据
|
|
|
|
|
// var url = "{:U('getCpCompanyInfo')}";
|
|
|
|
|
// var company_type;
|
|
|
|
|
// if(DATAOBJ.first_partner_type == 0){
|
|
|
|
|
// //CP上游公司
|
|
|
|
|
// company_type = "pt";
|
|
|
|
|
// }else{
|
|
|
|
|
// company_type = "cp";
|
|
|
|
|
// }
|
|
|
|
|
// PUBLIC.postData(url,{company_id:comid,company_type:company_type},function(data){
|
|
|
|
|
// DATAOBJ.second_part_company = data.success.partner;
|
|
|
|
|
// DATAOBJ.second_party_info = data.success;
|
|
|
|
|
// data.success.type = "second_party_info";
|
|
|
|
|
// TPLSHOW.secondPartInfo(data.success);
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
//生成订单
|
|
|
|
|
// $("#getSpendStatement").on("click",function(){
|
|
|
|
|
// //获取开始结束时间
|
|
|
|
@ -690,7 +674,6 @@
|
|
|
|
|
// return flag;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
layer.load(2);
|
|
|
|
|
$("#createStatement").off("click");//自我解绑
|
|
|
|
|
PUBLIC.postData("{:U('doAddStatement')}",DATAOBJ,function(data){
|
|
|
|
@ -831,21 +814,21 @@
|
|
|
|
|
|
|
|
|
|
EVENT.normalchange();
|
|
|
|
|
|
|
|
|
|
DATAOBJ.statement_type = false;//重新选择
|
|
|
|
|
// TPLSHOW.showStatementList(false);
|
|
|
|
|
// DATAOBJ.statement_type = false;//重新选择
|
|
|
|
|
// // TPLSHOW.showStatementList(false);
|
|
|
|
|
|
|
|
|
|
if(DATAOBJ.first_part_company && DATAOBJ.second_part_company){
|
|
|
|
|
var str = "<option value=''>请选择合作公司</option><option value='0' selected>"+DATAOBJ.first_part_company+"</option>";
|
|
|
|
|
str += ("<option value='1' >"+DATAOBJ.second_part_company+"</option>");//默认支付给甲方
|
|
|
|
|
$("#statement_type").html(str);
|
|
|
|
|
EVENT.changeStatementType();
|
|
|
|
|
$("#statement_type").change();//默认支付给乙方
|
|
|
|
|
// TPLSHOW.showPartPayInfo();//查看底下是否有值
|
|
|
|
|
}else{
|
|
|
|
|
var str = "<option value=''>请选择合作公司</option>";
|
|
|
|
|
$("#statement_type").html(str);
|
|
|
|
|
EVENT.changeStatementType();
|
|
|
|
|
}
|
|
|
|
|
// if(DATAOBJ.first_part_company && DATAOBJ.second_part_company){
|
|
|
|
|
// var str = "<option value=''>请选择合作公司</option><option value='0' selected>"+DATAOBJ.first_part_company+"</option>";
|
|
|
|
|
// str += ("<option value='1' >"+DATAOBJ.second_part_company+"</option>");//默认支付给甲方
|
|
|
|
|
// $("#statement_type").html(str);
|
|
|
|
|
// EVENT.changeStatementType();
|
|
|
|
|
// $("#statement_type").change();//默认支付给乙方
|
|
|
|
|
// // TPLSHOW.showPartPayInfo();//查看底下是否有值
|
|
|
|
|
// }else{
|
|
|
|
|
// var str = "<option value=''>请选择合作公司</option>";
|
|
|
|
|
// $("#statement_type").html(str);
|
|
|
|
|
// EVENT.changeStatementType();
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
//支付信息显示
|
|
|
|
|
showPartPayInfo(){
|
|
|
|
|