Browse Source

Merge branch 'dev2.6' of ssh://192.168.3.207:10022/qmx/qfw into dev2.6

wcj 6 năm trước cách đây
mục cha
commit
c7b55c5b34

+ 3 - 2
core/src/qfw/manage/dataExport.go

@@ -41,9 +41,9 @@ func (d *DataExport) DataDetail(order_code string) error {
 	//申请发票
 	applybill_status := util.IntAll((*res)["applybill_status"])
 	if applybill_status == 1 {
-		(*res)["applybill_status"] = "已开票"
+		(*res)["applybill_status"] = "已申请"
 	} else if applybill_status == 0 {
-		(*res)["applybill_status"] = "未开票"
+		(*res)["applybill_status"] = "未申请"
 	}
 	//0个人 1单位
 	applybill_type := util.IntAll((*res)["applybill_type"])
@@ -77,6 +77,7 @@ func (d *DataExport) DataDetail(order_code string) error {
 			}
 		} else {
 			(*res)["order_status"] = "未支付"
+			(*res)["service_status"] = "-"
 		}
 	}
 	//下载链接

+ 3 - 3
core/src/qfw/manage/dataExportOrder.go

@@ -49,9 +49,9 @@ func (d *DataExportOrder) Pageing() {
 		var y, n int64 = 1, 0
 		//申请发票
 		if v["applybill_status"] == y {
-			v["applybill_status"] = "已开票"
-		} else if v["applybill_status"] == n {
-			v["applybill_status"] = "未开票"
+			v["applybill_status"] = "已申请"
+		} else if v["applybill_status"] == n || v["applybill_status"] == nil {
+			v["applybill_status"] = "未申请"
 		}
 		//数据发送状态
 		if v["service_status"] == y {

+ 5 - 5
core/src/web/staticres/dataexport/dataExport.css

@@ -11,15 +11,15 @@
 .right .title span { width: 36px; height: 1px; background: #333333; display: inline-block; vertical-align: middle; }
 .right .order_info .hd, .right .download_link .hd, .right .filter .hd { height: 34px; line-height: 34px; background: #f7f8fa; padding-left: 120px; font-size: 14px; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }
 .right .order_info .bd, .right .download_link .bd, .right .filter .bd { padding: 0 120px; background: #fff; }
-.right .order_info .bd .line, .right .download_link .bd .line, .right .filter .bd .line { float: left; width: 1px; height: 150px; background: #ddd; margin-top: 20px; }
+.right .order_info .bd .line, .right .download_link .bd .line, .right .filter .bd .line { float: left; width: 1px; height: 155px; background: #ddd; margin-top: 20px; }
 .right .order_info .bd .row, .right .download_link .bd .row, .right .filter .bd .row { float: left; padding: 0px 30px 30px 30px; }
 .right .order_info .bd .row .row-list, .right .download_link .bd .row .row-list, .right .filter .bd .row .row-list { line-height: 1.8; font-size: 14px;  }
-.right .order_info .bd .first, .right .download_link .bd .first, .right .filter .bd .first { padding-left: 0; width: 37%; }
-.right .order_info .bd .second, .right .download_link .bd .second, .right .filter .bd .second { width: 35%; }
-.right .order_info .bd .third, .right .download_link .bd .third, .right .filter .bd .third { width: 33%; }
+.right .order_info .bd .first, .right .download_link .bd .first, .right .filter .bd .first { padding-left: 14px; width: 37%; }
+.right .order_info .bd .second, .right .download_link .bd .second, .right .filter .bd .second { width: 30%; }
+.right .order_info .bd .third, .right .download_link .bd .third, .right .filter .bd .third { width: 38%; }
 .right .order_info .bd .link, .right .download_link .bd .link, .right .filter .bd .link { height: 56px; line-height: 56px; font-size: 14px; }
 .right .order_info .bd .link:hover, .right .download_link .bd .link:hover, .right .filter .bd .link:hover { color: #f00; }
-.right .order_info .bd .filter_cont, .right .download_link .bd .filter_cont, .right .filter .bd .filter_cont { padding: 20px 0 60px 0; }
+.right .order_info .bd .filter_cont, .right .download_link .bd .filter_cont, .right .filter .bd .filter_cont { padding: 20px 0 60px 0;margin-left: -2px }
 .right .order_info .bd .filter_cont .filter-list, .right .download_link .bd .filter_cont .filter-list, .right .filter .bd .filter_cont .filter-list { width: 100%; margin-bottom: 10px; font-size: 14px; }
 .right .order_info .bd .filter_cont .filter-list label, .right .download_link .bd .filter_cont .filter-list label, .right .filter .bd .filter_cont .filter-list label { float: left; width: 70px; }
 .right .order_info .bd .filter_cont .filter-list .ul, .right .download_link .bd .filter_cont .filter-list .ul, .right .filter .bd .filter_cont .filter-list .ul { float: left; }

+ 21 - 6
core/src/web/templates/manage/dataExport.html

@@ -35,17 +35,25 @@
 				<!-- 订单信息 -->
 				<div class="order_info" >
 					<div class="hd">订单信息</div>
-					<div class="bd clearfix" >
+					<div class="bd clearfix" style="padding-right: 65px;">
 						<ul class="row first"  style="margin-top:20px  !important;">
 							<li class="row-list nofloat">支付状态:{{.T.res.order_status}}</li>
 							<li class="row-list nofloat">数据发送状态:{{.T.res.service_status}}</li>
 							<li class="row-list nofloat">订单编号:{{.T.res.order_code}}</li>
-							<li class="row-list nofloat">购买时间:{{.T.res.pay_time}}</li>
-							<li class="row-list nofloat">产品类型:{{.T.res.product_type}}</li>
+							<li class="row-list nofloat">下单时间:{{.T.res.create_time}}</li>
+							{{if .T.res.order_status}}
+							{{if eq .T.res.order_status "已支付"}}
+							<li class="row-list nofloat">支付时间:{{.T.res.pay_time}}</li>
 							<li class="row-list nofloat">微信支付单号:{{.T.wxpay.transaction_id}}</li>
+							{{else}}
+							<li class="row-list nofloat">支付时间:-</li>
+							<li class="row-list nofloat">微信支付单号:-</li>
+							{{end}}
+							{{end}}
 						</ul>
 						<div class="line"></div>
 						<ul class="row second"  style="margin-top:20px  !important;">
+							<li class="row-list nofloat">产品类型:{{.T.res.product_type}}</li>
 							<li class="row-list nofloat">数据规格:{{.T.res.data_spec}}</li>
 							<li class="row-list nofloat">数量:{{.T.res.data_count}}条</li>
 							<li class="row-list nofloat">价格:{{.T.res.order_money}}元</li>
@@ -53,9 +61,15 @@
 							<li class="row-list nofloat">手机号:{{.T.res.user_phone}}</li>
 						</ul>
 						<div class="line"></div>
-						<ul class="row third"  style="margin-top:20px  !important;">
+						<ul class="row third"  style="margin-top:20px  !important;padding-right: 0px;">	
+							{{if .T.res.order_status}}
+							{{if eq .T.res.order_status "未支付"}}
+							<li class="row-list nofloat">发票类型:-</li>
+							<li class="row-list nofloat">发票内容:-</li>
+							<li class="row-list nofloat">发票抬头:-</li>
+							{{else}}
 							{{if .T.res.applybill_status}}
-							{{if eq .T.res.applybill_status "已开票"}}
+							{{if eq .T.res.applybill_status "已申请"}}
 							<li class="row-list nofloat">发票状态:{{.T.res.applybill_status}}</li>
 							<li class="row-list nofloat">发票类型:普通发票(电子发票)</li>
 							<li class="row-list nofloat">发票内容:明细</li>
@@ -76,6 +90,8 @@
 							<li class="row-list nofloat">纳税人识别号:{{.T.res.applybill_taxnum}}</li>
 							{{end}}
 							{{end}}
+							{{end}}
+							{{end}}
 						</ul>
 					</div>
 				</div>
@@ -211,5 +227,4 @@
 		</div>
 		{{include "/common/bottom.html"}}
 	</body>
-	
 </html>

+ 68 - 59
core/src/web/templates/manage/dataExportOrder.html

@@ -1,7 +1,9 @@
+
 <html>
 <head>
 <title>审核用户</title>
 {{include "/common/inc.html"}}
+<script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js"></script>
 <script src="/js/qfwtable.js"></script>
 <style type="text/css">
 #dataExportOrder{
@@ -75,82 +77,89 @@ background-color:#18CC7D;
 <script>
 $(function(){
 	$("#audit").datatable({
-	   perPage: 10
-	  ,showPagination:true
-	  ,checkbox:"" //check radio
-	  ,checkboxHeader:false
-	  ,idField:"_id"
-	  ,classname:"table-hover"
-	  ,css:{"height":"450px"}
-	  //,post:{"name":"ee"}
-	  ,buttons: ['<div style="width:50%;margin:5px" class="input-group pull-right" id="search"><input type="text" id="searchtext" value=""  data-original-title="Search" class="form-control" placeholder="请输入订单编号"><span class="input-group-btn"><button class="btn btn-success" onclick="SearchContent()" data-original-title="Search" id="searchtip" type="button" style="height:38px;">检索</button></span></div><div style="margin:5px;" class="controls pull-right"><select class="form-control" id="select2" ><option value="">  数据发送状态  </option><option  value="1">  发送成功</option><option value="0">  发送失败 </option></select></div><div style="margin:5px;" class="controls pull-right"><select class="form-control" id="select1"><option value="">  订单状态  </option><option value="1">  已支付 </option><option value="0">  未支付 </option></select></div>']
-	  , url: '/manage/dataExport/p'
-	  , columns: [
-			{
-	            title: "序号", field: "index"	
-	        },
-	        {
-	            title: "订单编号", field: "order_code"
-				,callback:function(ct,cd,val,k,m){
-					if(ct["order_code"]){
-					return "<a href='/manage/dataExport/dataDetail/"+ct["order_code"]+"' style='color:#4e5051;text-decoration:none'>"+   ct["order_code"]+"</a>"
-					}
-				}	
-	        },
-			{
-	            title: "购买时间",field: "pay_time"
-	        },
-			{
-	            title: "数据规格", field: "data_spec"
-	        },
-			{
-	            title: "价格", field: "order_money"
-				,callback:function(ct,cd,val,k,m){
-					if(ct["order_money"]){
-					return 	ct["order_money"]/100+"元"
+		   perPage: 10
+		  ,showPagination:true
+		  ,checkbox:"" //check radio
+		  ,checkboxHeader:false
+		  ,idField:"_id"
+		  ,classname:"table-hover"
+		  ,css:{"height":"450px"}
+		  //,post:{"name":"ee"}
+		  ,buttons: ['<div style="width:50%;margin:5px" class="input-group pull-right" id="search"><input type="text" id="searchtext" value=""  data-original-title="Search" class="form-control" placeholder="请输入订单编号"><span class="input-group-btn"><button class="btn btn-success" onclick="SearchContent()" data-original-title="Search" id="searchtip" type="button" style="height:38px;">检索</button></span></div><div style="margin:5px;" class="controls pull-right"><select class="form-control" id="select2" ><option value="">  数据发送状态  </option><option  value="1">  发送成功</option><option value="0">  发送失败 </option></select></div><div style="margin:5px;" class="controls pull-right"><select class="form-control" id="select1"><option value="">  订单状态  </option><option value="1">  已支付 </option><option value="0">  未支付 </option></select></div>']
+		  , url: '/manage/dataExport/p'
+		  , columns: [
+				{
+		            title: "序号", field: "index"	
+		        },
+		        {
+		            title: "订单编号", field: "order_code"
+					,callback:function(ct,cd,val,k,m){
+						if(ct["order_code"]){
+						return "<a onclick='redirect(\""+ct["order_code"]+"\")' style='color:#4e5051;text-decoration:none'>"+   ct["order_code"]+"</a>"
+						}
+					}	
+		        },
+				{
+		            title: "购买时间",field: "pay_time"
+		        },
+				{
+		            title: "数据规格", field: "data_spec"
+		        },
+				{
+		            title: "价格", field: "order_money"
+					,callback:function(ct,cd,val,k,m){
+						if(ct["order_money"]){
+						return 	ct["order_money"]/100+"元"
+						}
 					}
-				}
-	        },
-			{
-	            title: "支付状态", field: "order_status"
-	        },
-			{
-	            title: "发票状态", field: "applybill_status"
-	        },
-			{
-	            title: "下载链接", field: "download_url"
-				,callback:function(ct,cd,val,k,m){
-					if(ct["download_url"]){
-					return "<a href='"+ct["download_url"]+"' title='"+ct["download_url"]+"'>"+   ct["download_url"]+"</a>"	
+		        },
+				{
+		            title: "支付状态", field: "order_status"
+		        },
+				{
+		            title: "发票状态", field: "applybill_status"
+		        },
+				{
+		            title: "下载链接", field: "download_url"
+					,callback:function(ct,cd,val,k,m){
+						if(ct["download_url"]){
+						return "<a href='"+ct["download_url"]+"' title='"+ct["download_url"]+"'>"+   ct["download_url"]+"</a>"	
+						}
 					}
-				}
-	        },
-			{
-	            title: "数据发送状态", field: "service_status"
-	        }
-	    ]
-	});
+		        },
+				{
+		            title: "数据发送状态", field: "service_status"
+		        }
+		    ]
+		});
+
 	$("select").change(function(){
+	//$("body").on("change","select",function(){
 		//选择已支付,才能选择是否发送成功
 		if($("#select1").val()=="0"){
 			$("#select2").val("").attr("disabled","disabled");
 		}else{
 			$("#select2").removeAttr("disabled","disabled");
 		}
-		
-		var find=$("#audit").data("datatable")
+		var find=$("#audit").data("datatable");
 		if(!find.options.opost) find.options.opost=find.options.post||{};
 		find.options.post=$.extend(find.options.opost,{strSel1:$("#select1").val(),strSel2:$("#select2").val()});
-		find.options.currentPage=1
+		find.options.currentPage=1;
 		find.render();
 	});
-	
 });
+
+//点击跳转新页面
+function redirect(code){
+	//sessionStorage.setItem("contentHtml",$("#content").prop("outerHTML"));
+	window.open("/manage/dataExport/dataDetail/"+code);
+}
+//
 function SearchContent(){
-	var find=$("#audit").data("datatable")
+	var find=$("#audit").data("datatable");
 	if(!find.options.opost) find.options.opost=find.options.post||{};
 	find.options.post=$.extend(find.options.opost,{query:$("#searchtext").val()});
-	find.options.currentPage=1
+	find.options.currentPage=1;
 	find.render();
 }
 </script>