|
@@ -231,14 +231,10 @@
|
|
|
<li class="row-list nofloat">支付方式:{{.T.res.pay_way}}</li>
|
|
|
<li class="row-list nofloat">下单时间:{{.T.res.create_time}}</li>
|
|
|
<li class="row-list nofloat">支付时间:{{.T.res.pay_time}}</li>
|
|
|
- {{if .T.transaction_id}}
|
|
|
- <li class="row-list nofloat">支付单号:{{.T.transaction_id}}</li>
|
|
|
- {{end}}
|
|
|
{{else}}
|
|
|
<li class="row-list nofloat">支付方式:-</li>
|
|
|
<li class="row-list nofloat">下单时间:{{.T.res.create_time}}</li>
|
|
|
<li class="row-list nofloat">支付时间:-</li>
|
|
|
- <li class="row-list nofloat">{{.T.res.pay_way}}支付单号:-</li>
|
|
|
{{end}}
|
|
|
{{end}}
|
|
|
</ul>
|
|
@@ -310,7 +306,7 @@
|
|
|
<div class="apply apply_reason">申请原因:</div>
|
|
|
</div>
|
|
|
<div class="apply_infos">
|
|
|
- <div class="applys apply_names" id="apply_name">{{session "loginName"}}</div>
|
|
|
+ <div class="applys apply_names" id="apply_name"></div>
|
|
|
<div class="applys apply_times" id="apply_refund_time"></div>
|
|
|
<textarea class="applys apply_reasons" placeholder="请输入申请原因" id="applyReason"></textarea>
|
|
|
</div>
|
|
@@ -381,6 +377,12 @@
|
|
|
$(".right").children().hide();
|
|
|
$(".right-three").show();
|
|
|
})
|
|
|
+ var loginName = {{session "nickName"}}
|
|
|
+ if(loginName !== null && loginName !== ""&& loginName !== undefined){
|
|
|
+ $("#apply_name").text(loginName);
|
|
|
+ }else{
|
|
|
+ $("#apply_name").text("企明星管理员");
|
|
|
+ }
|
|
|
|
|
|
$("#apply_refund_time").text(formatDate(new Date().getTime(), true))
|
|
|
var invoice = {{.T.res.invoice}};
|
|
@@ -388,13 +390,13 @@
|
|
|
var orderStatus = {{.T.res.order_status}};
|
|
|
var applyHtml = "";
|
|
|
var lineHtml = "";
|
|
|
- console.log({{.T.res}})
|
|
|
var applyName = {{.T.res.apply_refund_name}}
|
|
|
var applyTime = {{.T.res.apply_refund_time}}
|
|
|
var applyReason = {{.T.res.apply_refund_reason}}
|
|
|
var applybill_type = {{.T.res.applybill_type}};
|
|
|
var applybill_company = {{.T.res.applybill_company}};
|
|
|
var applybill_taxnum = {{.T.res.applybill_taxnum}};
|
|
|
+ var orderCode = {{.T.res.order_code}};
|
|
|
if(invoice !== null){
|
|
|
var applyType = invoice[0].invoice_type;
|
|
|
var taxpayer_identnum = invoice[0].taxpayer_identnum
|
|
@@ -411,7 +413,14 @@
|
|
|
}else{
|
|
|
if(applyStatus === "已申请"){
|
|
|
lineHtml += `<li class="row-list nofloat">开具时间:${formatDate(invoice[0].billing_time *1000)}</li>
|
|
|
- <li class="row-list nofloat">发票:<a target="_blank" href="${invoice[0].url}">查看详情</a></li>`
|
|
|
+ <li class="row-list nofloat">发票:<a target="_blank" href="${invoice[0].url}">查看详情</a></li>
|
|
|
+ `
|
|
|
+ var redObj = JSON.parse(invoice[0].red)
|
|
|
+ if(redObj !== null && redObj !== "" && redObj !== undefined){
|
|
|
+ lineHtml += `<li class="row-list nofloat">红票开具时间:${formatDate(redObj.billing_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">红票:<a target="_blank" href="${redObj.url}">查看详情</a></li>`
|
|
|
+ }
|
|
|
+
|
|
|
if(applyType === "个人"){
|
|
|
|
|
|
applyHtml += `
|
|
@@ -443,37 +452,79 @@
|
|
|
if(invoice.length == 2){
|
|
|
var applyHtmls = "";
|
|
|
if(invoice[1].invoice_type === "个人"){
|
|
|
- applyHtmls += `
|
|
|
- <div class="bd clearfix">
|
|
|
- <ul class="row first">
|
|
|
- <li class="row-list nofloat">申请时间:${formatDate(invoice[1].create_time *1000)}</li>
|
|
|
- <li class="row-list nofloat">申请状态:发票开具</li>
|
|
|
- <li class="row-list nofloat">发票类型:普通发票(电子发票)</li>
|
|
|
- <li class="row-list nofloat">发票抬头:个人</li>
|
|
|
- </ul>
|
|
|
- <div class="line" style="margin-left: 20px;float: left;width: 1px;height: 155px;background: #ddd;margin-top: 20px;"></div>
|
|
|
- <ul class="row second" style="margin-top:20px !important;">
|
|
|
- <li class="row-list nofloat">开具时间:${formatDate(invoice[1].billing_time *1000)}</li>
|
|
|
- <li class="row-list nofloat">发票:<a target="_blank" href="${invoice[1].url}">查看详情</a></li>
|
|
|
- </ul>
|
|
|
- </div>`
|
|
|
+ var redObj = JSON.parse(invoice[1].red)
|
|
|
+ if(redObj !== null && redObj !== "" && redObj !== undefined){
|
|
|
+ applyHtmls += `
|
|
|
+ <div class="bd clearfix">
|
|
|
+ <ul class="row first">
|
|
|
+ <li class="row-list nofloat">换开时间:${formatDate(invoice[1].create_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">申请状态:发票开具</li>
|
|
|
+ <li class="row-list nofloat">发票类型:普通发票(电子发票)</li>
|
|
|
+ <li class="row-list nofloat">发票抬头:个人</li>
|
|
|
+ </ul>
|
|
|
+ <div class="line" style="margin-left: 20px;float: left;width: 1px;height: 155px;background: #ddd;margin-top: 20px;"></div>
|
|
|
+ <ul class="row second" style="margin-top:20px !important;">
|
|
|
+ <li class="row-list nofloat">开具时间:${formatDate(invoice[1].billing_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">发票:<a target="_blank" href="${invoice[1].url}">查看详情</a></li>
|
|
|
+ <li class="row-list nofloat">红票开具时间:${formatDate(redObj.billing_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">红票:<a target="_blank" href="${redObj.url}">查看详情</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>`
|
|
|
+ }else{
|
|
|
+ applyHtmls += `
|
|
|
+ <div class="bd clearfix">
|
|
|
+ <ul class="row first">
|
|
|
+ <li class="row-list nofloat">换开时间:${formatDate(invoice[1].create_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">申请状态:发票开具</li>
|
|
|
+ <li class="row-list nofloat">发票类型:普通发票(电子发票)</li>
|
|
|
+ <li class="row-list nofloat">发票抬头:个人</li>
|
|
|
+ </ul>
|
|
|
+ <div class="line" style="margin-left: 20px;float: left;width: 1px;height: 155px;background: #ddd;margin-top: 20px;"></div>
|
|
|
+ <ul class="row second" style="margin-top:20px !important;">
|
|
|
+ <li class="row-list nofloat">开具时间:${formatDate(invoice[1].billing_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">发票:<a target="_blank" href="${invoice[1].url}">查看详情</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>`
|
|
|
+ }
|
|
|
}else{
|
|
|
- applyHtmls += `
|
|
|
- <div class="bd clearfix">
|
|
|
- <ul class="row first">
|
|
|
- <li class="row-list nofloat">申请时间:${formatDate(invoice[1].create_time *1000)}</li>
|
|
|
- <li class="row-list nofloat">申请状态:发票开具</li>
|
|
|
- <li class="row-list nofloat">发票类型:普通发票(电子发票)</li>
|
|
|
- <li class="row-list nofloat">发票抬头:单位</li>
|
|
|
- <li class="row-list nofloat">单位名称:${invoice[1].company_name}</li>
|
|
|
- <li class="row-list nofloat">纳税人识别号:${invoice[1].taxpayer_identnum}</li>
|
|
|
- </ul>
|
|
|
- <div class="line" style="margin-left: 20px;float: left;width: 1px;height: 155px;background: #ddd;margin-top: 20px;"></div>
|
|
|
- <ul class="row second" style="margin-top:20px !important;">
|
|
|
- <li class="row-list nofloat">开具时间:${formatDate(invoice[1].billing_time *1000)}</li>
|
|
|
- <li class="row-list nofloat">发票:<a target="_blank" href="${invoice[1].url}">查看详情</a></li>
|
|
|
- </ul>
|
|
|
- </div>`
|
|
|
+ var redObj = JSON.parse(invoice[1].red)
|
|
|
+ if(redObj !== null && redObj !== "" && redObj !== undefined){
|
|
|
+ applyHtmls += `
|
|
|
+ <div class="bd clearfix">
|
|
|
+ <ul class="row first">
|
|
|
+ <li class="row-list nofloat">换开时间:${formatDate(invoice[1].create_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">申请状态:发票开具</li>
|
|
|
+ <li class="row-list nofloat">发票类型:普通发票(电子发票)</li>
|
|
|
+ <li class="row-list nofloat">发票抬头:单位</li>
|
|
|
+ <li class="row-list nofloat">单位名称:${invoice[1].company_name}</li>
|
|
|
+ <li class="row-list nofloat">纳税人识别号:${invoice[1].taxpayer_identnum}</li>
|
|
|
+ </ul>
|
|
|
+ <div class="line" style="margin-left: 20px;float: left;width: 1px;height: 155px;background: #ddd;margin-top: 20px;"></div>
|
|
|
+ <ul class="row second" style="margin-top:20px !important;">
|
|
|
+ <li class="row-list nofloat">开具时间:${formatDate(invoice[1].billing_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">发票:<a target="_blank" href="${invoice[1].url}">查看详情</a></li>
|
|
|
+ <li class="row-list nofloat">红票开具时间:${formatDate(redObj.billing_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">红票:<a target="_blank" href="${redObj.url}">查看详情</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>`
|
|
|
+ }else{
|
|
|
+ applyHtmls += `
|
|
|
+ <div class="bd clearfix">
|
|
|
+ <ul class="row first">
|
|
|
+ <li class="row-list nofloat">换开时间:${formatDate(invoice[1].create_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">申请状态:发票开具</li>
|
|
|
+ <li class="row-list nofloat">发票类型:普通发票(电子发票)</li>
|
|
|
+ <li class="row-list nofloat">发票抬头:单位</li>
|
|
|
+ <li class="row-list nofloat">单位名称:${invoice[1].company_name}</li>
|
|
|
+ <li class="row-list nofloat">纳税人识别号:${invoice[1].taxpayer_identnum}</li>
|
|
|
+ </ul>
|
|
|
+ <div class="line" style="margin-left: 20px;float: left;width: 1px;height: 155px;background: #ddd;margin-top: 20px;"></div>
|
|
|
+ <ul class="row second" style="margin-top:20px !important;">
|
|
|
+ <li class="row-list nofloat">开具时间:${formatDate(invoice[1].billing_time *1000)}</li>
|
|
|
+ <li class="row-list nofloat">发票:<a target="_blank" href="${invoice[1].url}">查看详情</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>`
|
|
|
+ }
|
|
|
}
|
|
|
$(".invoice").append(applyHtmls);
|
|
|
}
|
|
@@ -515,7 +566,6 @@
|
|
|
if(applyName !== null && applyName !== "" && applyName !== undefined){
|
|
|
$("#apply_names").text(applyName);
|
|
|
$("#apply_refund_times").text(formatDate(applyTime*1000, true));
|
|
|
- console.log(applyReason)
|
|
|
$("#applyReasons").text(applyReason);
|
|
|
$(".refund_success").show();
|
|
|
$(".refund_info").show();
|
|
@@ -538,8 +588,7 @@
|
|
|
"applyTime": applyTime,
|
|
|
"applyReason": applyReason
|
|
|
}
|
|
|
- console.log(param);
|
|
|
- var url = "/manage/refund/"+ {{.T.res.order_code}};
|
|
|
+ var url = "/manage/refund/"+ orderCode;
|
|
|
$.post(url,param,function(r){
|
|
|
if(r.success){
|
|
|
location.reload();
|
|
@@ -551,6 +600,10 @@
|
|
|
$(".isrefund").hide();
|
|
|
})
|
|
|
|
|
|
+ $(".select_qx").on("click", function(){
|
|
|
+ location.reload();
|
|
|
+ })
|
|
|
+
|
|
|
function formatDate(date,hms) {
|
|
|
if(date ===null || date==="" || date === 0){
|
|
|
return "-"
|