Bladeren bron

Revert "订单查询"

xubh 5 jaren geleden
bovenliggende
commit
a1f844fcfd

+ 0 - 12
src/main/java/com/minpay/db/table/own/mapper/ShOrderMapper.java

@@ -1,12 +0,0 @@
-package com.minpay.db.table.own.mapper;
-
-import com.startup.minpay.frame.jdbc.IMINMybatisEntityMapper;
-import com.startup.minpay.frame.jdbc.MINRowBounds;
-
-import java.util.List;
-import java.util.Map;
-
-public interface ShOrderMapper extends  IMINMybatisEntityMapper{
-	//查询订单列表
-	List<Map<String, String>> queryOrder(Map<String, String> map, MINRowBounds row);
-}

+ 0 - 101
src/main/java/com/minpay/shouhuo/ShOrderManageAction.java

@@ -1,101 +0,0 @@
-package com.minpay.shouhuo;
-
-import com.minpay.common.bean.User;
-import com.minpay.common.constant.Constant;
-import com.minpay.common.format.IFormatService;
-import com.minpay.common.service.ILogService;
-import com.minpay.common.service.IPublicService;
-import com.minpay.common.util.RegexUtil;
-import com.minpay.db.table.mapper.VmRechargeRuleMapper;
-import com.minpay.db.table.model.VmRechargeRule;
-import com.minpay.db.table.model.VmRechargeRuleExample;
-import com.minpay.db.table.own.mapper.OrderInfMapper;
-import com.minpay.db.table.own.mapper.ShOrderMapper;
-import com.mysql.jdbc.StringUtils;
-import com.startup.minpay.frame.business.IMINAction;
-import com.startup.minpay.frame.business.MINHttpServletRequestContext;
-import com.startup.minpay.frame.business.res.MINActionResult;
-import com.startup.minpay.frame.constant.IMINBusinessConstant;
-import com.startup.minpay.frame.constant.IMINTransactionEnum;
-import com.startup.minpay.frame.data.format.MINCopyFormat;
-import com.startup.minpay.frame.exception.MINBusinessException;
-import com.startup.minpay.frame.jdbc.MINRowBounds;
-import com.startup.minpay.frame.service.base.IMINDataBaseService;
-import com.startup.minpay.frame.service.base.Service;
-import com.startup.minpay.frame.session.MINSession;
-import com.startup.minpay.frame.target.MINAction;
-import com.startup.minpay.frame.target.MINComponent;
-import com.startup.minpay.frame.target.MINParam;
-import com.startup.minpay.frame.target.MINValidator;
-import com.startup.minpay.util.DateTime;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 订单管理
- * @author xbh
- *
- */
-@MINComponent
-public class ShOrderManageAction implements IMINAction {
-	public final static String	QUERY_ORDER				= "queryOrder";
-
-	/**
-	 *查询订单
-	 * @param session
-	 * @param page
-	 * @param limit
-	 * @param equipmentId	机器编号
-	 * @param equipmentName	机器名称
-	 * @param freightwayId	货道编号
-	 * @param payMode		支付方式
-	 * @param dates			日期(区间)
-	 * @param playerId		玩家id
-	 * @param state			状态
-	 * @param fapRequest
-	 * @return
-	 * @throws MINBusinessException
-	 */
-	@MINAction(value = QUERY_ORDER)
-	public MINActionResult queryOrder(
-			MINSession session,
-			@MINParam(key = "page", defaultValue = "1") int page,
-			@MINParam(key = "limit", defaultValue = "3") int limit,
-			@MINParam(key = "equipmentId") String equipmentId,
-			@MINParam(key = "equipmentName") String equipmentName,
-			@MINParam(key = "freightwayId") String freightwayId,
-			@MINParam(key = "payMode") String payMode,
-			@MINParam(key = "dates") String dates,
-			@MINParam(key = "playerId") String playerId,
-			@MINParam(key = "state") String state,
-			@MINParam(key = "orderNo") String orderNo,
-			MINHttpServletRequestContext fapRequest
-			) throws MINBusinessException {
-		MINActionResult res = new MINActionResult();
-		MINRowBounds rows = new MINRowBounds(page, limit);
-		// 创建查询条件
-		Map<String, String> p = new HashMap<String, String>();
-		p.put("equipmentId",equipmentId);
-		p.put("equipmentName",equipmentName);
-		p.put("freightwayId",freightwayId);
-		p.put("payMode",payMode);
-		p.put("playerId",playerId);
-		p.put("state",state);
-		p.put("dates", dates);
-		p.put("orderNo", orderNo);
-		// 查询OrderInfMapper.xml
-		List<Map<String, String>> ls = Service.lookup(IMINDataBaseService.class).getMybatisMapper(ShOrderMapper.class).queryOrder(p,rows);
-		// 格式化
-		ls = Service.lookup(IFormatService.class).formatDateTime(ls, "createTime");
-		ls = new MINCopyFormat("{isDraw:'isDrawdesc',payMode:'payModedesc'}").format(ls);
-		ls = Service.lookup(IFormatService.class).formatEnum(ls, "{isDrawdesc:'IS_DRAW',payModedesc:'PAY_TYPE'}");
-		// 设置返回值
-		res.set(IMINBusinessConstant.F_PAGING_LAY, ls);
-		res.set(IMINBusinessConstant.F_PAGING_COUNT, rows.getCount());
-		return res;
-	}
-
-
-}

+ 0 - 67
src/main/resources/com/minpay/db/table/own/mapper/ShOrderMapper.xml

@@ -1,67 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.minpay.db.table.own.mapper.ShOrderMapper">
-	<select id="queryOrder" resultType="hashmap" parameterType="java.lang.String">
-		select
-		VOI_ID		"id",
-		VOI_CHANNEL	"channel",
-		VOI_PERSON_ID		"personId",
-		VOI_EQUIPMENT_ID	"equipmentId",
-		VOI_ORDER_AMT		"orderAmt",
-		VOI_STATE			"state",
-		VOI_RECORD_ID		"recordId",
-		VOI_PAY_ORDERNO		"payOrderno",
-		VOI_REMARKS			"remarks",
-		VOI_PAY_TYPE		"payType",
-		VOI_NUMBER			"number",
-		VOI_PRO_TYPE		"proType",
-		VOI_IS_DRAW			"isDraw",
-		VOI_IS_USED			"isUsed",
-		VOI_PRO_STATE		"proState",
-		VOI_DRAW_PRICE		"drawPrice",
-		VOI_CREATE_USER		"createUser",
-		VOI_CREATE_TIME		"createTime",
-		VOI_MODIFY_USER		"modifyUser",
-		VOI_MODIFY_TIME		"modifyTime",
-		VOI_BRANCHID		"branchid",
-		VOI_PAY_MODE	    "payMode",
-		VOI_PRODUCT_NAME	"productName",
-		VOI_PRODUCT_ID		"productId",
-		VOI_EQUREL_ID		"equrelId",
-		b.VCI_NAME  		"personName",
-		c.VEQ_NAME    		"equipmentName",
-		d.PRT_MASTER_MAP	"productImg"
-		FROM
-			vm_order_inf a LEFT JOIN vm_person_inf b on a.VOI_PERSON_ID = b.VCI_ID
-			LEFT JOIN  vm_equipment_inf c on a.VOI_EQUIPMENT_ID = c.VEQ_ID
-			LEFT JOIN  vm_product_inf d on a.VOI_PRODUCT_ID = d.PRT_ID
-		WHERE 1=1 and a.VOI_OPERATION = '0'
-		<if test="dates!=null and dates != ''">
-			and substr(a.VOI_CREATE_TIME,1,8) between substr((#{dates,jdbcType=VARCHAR}),1,8)
-			and substr((#{dates,jdbcType=VARCHAR}),12,19)
-		</if>
-		<if test="equipmentId != null and equipmentId != ''">
-			and a.VOI_EQUIPMENT_ID = #{equipmentId,jdbcType=VARCHAR}
-		</if>
-		<if test="equipmentName != null and equipmentName != ''">
-			and c.VEQ_NAME like CONCAT('%', #{equipmentName,jdbcType=VARCHAR}, '%')
-		</if>
-		<if test="freightwayId != null and freightwayId != ''">
-			and a.VOI_EQUREL_ID = #{freightwayId,jdbcType=VARCHAR}
-		</if>
-		<if test="payMode != null and payMode != ''">
-			and a.VOI_PAY_MODE = #{payMode,jdbcType=VARCHAR}
-		</if>
-		<if test="playerId != null and playerId != ''">
-			and a.VOI_PERSON_ID = #{playerId,jdbcType=VARCHAR}
-		</if>
-		<if test="state != null and state != ''">
-			and a.VOI_IS_DRAW = #{state,jdbcType=VARCHAR}
-		</if>
-		<if test="orderNo != null and orderNo != ''">
-			and a.VOI_ID = #{orderNo,jdbcType=VARCHAR}
-		</if>
-		order by  a.VOI_CREATE_TIME desc
-	</select>
-
-</mapper>

File diff suppressed because it is too large
+ 1342 - 74
src/main/webapp/admin/orderManage/details.html


+ 103 - 69
src/main/webapp/admin/orderManage/orderManage.html

@@ -3,7 +3,7 @@
 
 <head>
 	<meta charset="utf-8">
-	<title>订单管理</title>
+	<title>融资订单查询</title>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@@ -18,45 +18,28 @@
 			<div class="tiaojian-part2 fr demoTable">
 				<button class="layui-btn order-bnt1"  data-type="reload" >搜索</button>
 				<button class="layui-btn  order-bnt2" data-type="reset">重置</button>
+				<button class="layui-btn order-bnt2" data-type="export">数据导出</button>
 				<a href="#" id="toggle" class="top">收起</a>
 			</div>
 		</div>
 		<form class="layui-form"  action="javascript:void(0)"  id = "orderForm">
 			<div class="order-select back-border" id="content">
-
 				<div class="layui-inline">
 					<label class="f12-gray4">订单编号:</label>
-					<input onchange = "changeSelectCon(0,this,'inp')" class="search-select" type="tel" name="orderNo"  id ="orderNo" lay-verify="orderNo"  autocomplete="off" placeholder="请输入订单编号" class="y-left-input">
+					<input onchange = "changeSelectCon(0,this,'inp')" class="search-select" type="tel" name="orderNo"  id ="orderNo" lay-verify="orderNo"  autocomplete="off" placeholder="请输入融资订单编号" class="y-left-input">
 				</div>
 				<div class="layui-inline">
-					<label class="f12-gray4">创建时间:</label>
+					<label class="f12-gray4">日期:</label>
 					<input  class="search-select" type="text"  id="dates" placeholder="日期(区间)"   readonly />
 				</div>
 				<div class="layui-inline">
 					<label class="f12-gray4">状态:</label>
 					<div  class=""  style="display:inline-block" id = 'state'></div>
 				</div>
-
-				<div class="layui-inline">
-					<label class="f12-gray4">机台号:</label>
-					<input onchange = "changeSelectCon(3,this,'inp')"   class="search-select" type="tel" name="equipmentId"  id ="equipmentId" lay-verify="equipmentId"  autocomplete="off" placeholder="请输入机器号" class="layui-input">
-				</div>
 				<div class="d-dashed" style="margin: 10px 0;"></div>
 				<div class="layui-inline">
-					<label class="f12-gray4">机器名称:</label>
-					<input onchange = "changeSelectCon(4,this,'inp')"   class="search-select" type="tel" name="equipmentName"  id ="equipmentName" lay-verify="equipmentName"  autocomplete="off" placeholder="请输入机器名称" class="layui-input">
-				</div>
-				<div class="layui-inline">
-					<label class="f12-gray4">货道号:</label>
-					<input onchange = "changeSelectCon(5,this,'inp')"   class="search-select" type="tel" name="freightwayId"  id ="freightwayId" lay-verify="freightwayId"  autocomplete="off" placeholder="请输入货道号" class="layui-input">
-				</div>
-				<div class="layui-inline">
-					<label class="f12-gray4">支付方式:</label>
-					<div  class=""  style="display:inline-block" id = 'payMode'></div>
-				</div>
-				<div class="layui-inline">
-					<label class="f12-gray4">玩家ID:</label>
-					<input onchange = "changeSelectCon(7,this,'inp')"   class="search-select" type="tel" name="personId"  id ="personId" lay-verify="personId"  autocomplete="off" placeholder="请输入玩家ID" class="layui-input">
+					<label class="f12-gray4">企业名称:</label>
+					<input onchange = "changeSelectCon(3,this,'inp')"   class="search-select" type="tel" name="corName"  id ="corName" lay-verify="corName"  autocomplete="off" placeholder="请输入企业名称" class="layui-input">
 				</div>
 			</div>
 		</form>
@@ -71,12 +54,29 @@
 <script type="text/html" id="barDemo">
 		<a class="layui-btn layui-btn-xs" lay-event="look">订单详情</a>
    	</script>
+   	<script type="text/html" id="productName">
+		<div class="layui-table-cell laytable-cell-1-orderno" onclick="productName({{d.orderno}})" >
+			{{#  if(isEmpty(d.productName)){ }}
+				无数据
+			{{#  }else { }}
+				{{d.productName}}
+			{{#  }}}
+		</div>
+   	</script>
+   	
 <script>
 	$("#toggle").click(function() {
 		$(this).html($("#content").is(":hidden") ? "收起" + "<i class='iconfont up iconSelect_drop-down'/></i>" : "展开" +
 			"<i class='iconfont up iconSelect_drop-down'/></i>");
 		$("#content").slideToggle();
 	});
+	var mainOrderState = getTempVal("mainOrderState");
+	// 首页跳转数据
+	if (isEmpty(mainOrderState)) {
+		mainOrderState = " ";
+	} else {
+		setTempVal("mainOrderState"," ");
+	}
 	layui.use(['table','laydate','form'], function(){
 		var laydate = layui.laydate;
 		//日期范围
@@ -89,15 +89,14 @@
   			  }
 		});
 		form = layui.form;
-		initSelect('state', "IS_DRAW", "state", '', true);
-		initSelect('payMode', "PAY_TYPE", "payMode", '', true);
+		initSelect('state', "ORDER_STT", "state", mainOrderState, true);
+		if (mainOrderState != " ") {
+			changeSelectCon(2, $("select[name='state']"), "sel");
+		}
 		form.on('select(state)', function(data){
-			changeSelectCon(2, data.elem, "sel","state");
-		});
-		form.on('select(payMode)', function(data){
-			changeSelectCon(6, data.elem, "sel","payMode");
-		});
-		form.render();
+   			changeSelectCon(2, data.elem, "sel");
+   		}); 
+		 form.render();
 	});
      var table;
       layui.use('table', function(){
@@ -108,23 +107,34 @@
 		    ,elem: '#orderManage'
 		    ,limit:10
 		   // ,height: 315
-		     ,url: 'ShOrderManageAction/queryOrder' //数据接口
+		     ,url: 'OrderManageAction/queryOrder' //数据接口
 		    ,method: 'post'
-		    ,where:{MINView:"JSON"}
+		    ,where:{MINView:"JSON",allFlag:"1",state:mainOrderState.trim()}
 		    ,page: true //开启分页
 		    ,cols: [[ //表头
 		      {field:'num', title: '序号',width:'5%', type:'numbers', fixed: true, align: 'center'}
-		      ,{field: 'id', title: '订单编号', width:'10%', sort: true, fixed: 'left'}
-		      ,{field: 'productName', title: '产品信息', width:'12%'}
-		      ,{field: 'equipmentId', title: '机器号', width:'8%'}
-			  ,{field: 'equipmentName', title: '机器名称', width:'8%'}
-			  ,{field: 'equrelId', title: '货道编号', width:'8%'}
-			  ,{field: 'personId', title: '玩家ID', width:'8%'}
-			  ,{field: 'personName', title: '消费者信息', width:'8%'}
-			  ,{field: 'isDrawdesc', title: '状态', width:'8%'}
-			  ,{field: 'payModedesc', title: '支付类型', width:'8%'}
-			  ,{field: 'orderAmt', title: '订单价格', width:'8%'}
-		      ,{field: 'createTime', title: '创建时间', width: '14%'}
+		      ,{field: 'orderno', title: '融资订单编号', width:'10%', sort: true, fixed: 'left'}
+		      ,{field: 'productName', title: '产品信息', width:'12%',templet: '#productName'}
+		      //,{field: 'productNum', title: '货品数量', width:'8%'}
+		      ,{field: 'apprivePassDate', title: '审批通过日期', width: '14%'}
+		      ,{field: 'companyName', title: '企业名称', width: '14%'}
+		      ,{field: 'term', title: '期限(天)', width: '8%', }
+		      ,{
+		    	  field: 'expiredDate', 
+		    	  title: '到期日', 
+		    	  width: '14%',
+		    	  templet:function(d){
+		    		  if(d.term > 90 && typeof(d.expiredDate) != "undefined"){
+		    			  return d.expiredDate.substring(0,10); 
+		    		  } else if(typeof(d.expiredDate) != "undefined"){
+		    			  return d.expiredDate;
+		    		  } else {
+		    			  return "";
+		    		  }
+		    	  }
+	    	  }
+		      ,{field: 'sttDesc', title: '状态', width: '10%', sort: true}
+		      ,{field: 'overdueState', title: '宽限期', width: '8%', sort: true}
 		      ,{field: 'operate', title: '操作', width: '14%', toolbar: '#barDemo',fixed: 'right'}
 		    ]]
 		    ,done: function(res, curr, count){
@@ -177,6 +187,9 @@
 	   		    	$('#orderForm')[0].reset();
 	   		    	$("#conditions").html('<div class="fl f12-gray4-op mt4">所选条件:</div>');
 	   		    }
+				,export : function(){
+					exportExcel();
+				}
 	 	};
 		$('.layui-btn').on('click', function(){
 		  var type = $(this).data('type');
@@ -186,11 +199,46 @@
 	 });
    	function lookDetail(data) {
      		// 寄存当前数据
-		layui.sessionData("ROW_DATA", {key:"NOW_ROW", value : data});
-		openMainTabPage('101006-01', '订单详情', 'orderManage/details.html', '', '101006', loadAA);
+		layui.sessionData("ROW_DATA", {key:"NOW_ROW", value : data.orderno});
+		openMainTabPage('215003-02', '订单详情', 'orderManage/details.html', '', '020001', loadAA);
+  		/* layer.open({
+  		      type: 2,
+  		      title: '查看订单详情',
+  		      shadeClose: true,
+  		      shade:0.6,
+  		      area: ['85%', '85%'],
+  		      content: 'detail.html'
+  		}); */
    	}
 	
-
+	//产品
+	function productName(orderno) {
+		var data ={};
+		data.orderno = orderno;
+		// 寄存当前数据
+		layui.sessionData("ROW_DATA", {key:"NOW_ROW", value:data});
+		layer.open({
+		      type: 2,
+		      title: '产品列表',
+		      shadeClose: true,
+		      shade:0.6,
+		      area: ['45%', '45%'],
+		      content: 'productList.html'
+		});
+	}
+	
+	function exportExcel(){
+		//状态
+   	 	var state = $("#state").find("option:selected").val();
+   		//时间
+   		var dates = $("#dates").val();
+   		//订单号
+   		var orderNo = $("#orderNo").val();
+   		//企业名称
+   		var corName = $("#corName").val();
+   		window.open(encodeURI("../../OrderManageAction/exportExcel?orderNo="+orderNo+"&corName="+corName+"&state="+state+"&dates="+dates));
+	}
+	
 	function loadAA() {
 		//状态
    	 	var state = $("#state").find("option:selected").val();
@@ -198,12 +246,9 @@
    		var dates = $("#dates").val();
    		//订单号
    		var orderNo = $("#orderNo").val();
-
-   		var equipmentId = $("#equipmentId").val();
-		var equipmentName = $("#equipmentName").val();
-		var freightwayId = $("#freightwayId").val();
-		var payMode = $("#payMode").find("option:selected").val();
-		var playerId = $("#personId").val();
+   		//企业名称
+   		var corName = $("#corName").val();
+   	
         //执行重载
 	    table.reload('orderManage', {
 	        page: {
@@ -213,16 +258,12 @@
 	        	orderNo : orderNo,
 	        	state : state,
 	        	dates : dates,
-				equipmentId : equipmentId,
-				equipmentName : equipmentName,
-				freightwayId : freightwayId,
-				payMode : payMode,
-				playerId : playerId
+	        	corName : corName,
+	        	allFlag:"1"
 	        }
 	     });
 	}
 	function changeSelectCon(index, t, type, dateValue){
-   		debugger;
 		if (type == "date") {
 			if (isEmpty(dateValue)) {
 				$("#search" + index).remove();
@@ -253,7 +294,7 @@
 			}
 		}
 	}
-	var array = new Array('订单编号','创建时间','状态','机台号','机器名称','货道号','支付方式','玩家ID');
+	var array = new Array('订单编号','日期','状态','企业名称');
 	function getSelectConHtml(index, t, type,dateValue){
 		var name;
 		var value;
@@ -264,13 +305,7 @@
 			value = dateValue;
 		}
 		if(type == "sel"){
-			if(index == '2'){
-				value = $("#state").find("option:selected").text();
-			}
-			if(index == '6'){
-				value = $("#payMode").find("option:selected").text();
-			}
-
+			value = $("#state").find("option:selected").text();
 		}
 		if (type == "date") {
 			name = $("#"+t).attr("id");
@@ -288,8 +323,7 @@
 	}
 	function removeSearch(t) {
 		if ($(t).attr("name") == 'subjects') {
-			initSelect('state', "IS_DRAW", "state", ' ', true);
-			initSelect('payMode', "PAY_TYPE", "payMode", ' ', true);
+			initSelect('state', "ORDER_STT", "state", ' ', true);
 			form.render();
 			$(t).remove();
 		} else {