wanglm %!s(int64=5) %!d(string=hai) anos
pai
achega
3be892e92d

+ 211 - 0
src/main/java/com/minpay/shouhuo/invCardManageAction.java

@@ -0,0 +1,211 @@
+package com.minpay.shouhuo;
+
+import com.minpay.common.bean.User;
+import com.minpay.common.format.IFormatService;
+import com.minpay.db.table.own.mapper.OrderManageMapper;
+import com.startup.minpay.frame.business.IMINAction;
+import com.startup.minpay.frame.business.res.MINActionResult;
+import com.startup.minpay.frame.constant.IMINBusinessConstant;
+import com.startup.minpay.frame.data.format.MINCopyFormat;
+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 java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 财务管理
+ * 
+ * @author wlm
+ */
+@MINComponent
+public class invCardManageAction implements IMINAction {
+
+	/**查询订单详情**/
+	public final static String SELECT_ORDER_DETAIL = "selectOrderDetail";
+
+	/**取货、作废**/
+	public final static String UPDATE_ORDER_STT = "updateOrderStt";
+
+	/**查询取货记录**/
+	public final static String SELECT_PICKUP_RECORD = "selectPickupRecord";
+
+	/**  收入统计 **/
+	public final static String SELECT_INCOME_STATISTICS = "selectIncomeStatistics";
+
+	/**
+	 * 收入统计
+	 * @param page
+	 * @param limit
+	 * @param session
+	 * @return
+	 * @throws Exception
+	 */
+	@MINAction(value = SELECT_INCOME_STATISTICS)
+	public MINActionResult selectIncomeStatistics (
+			@MINParam(key = "page", defaultValue = "1") int page,
+			@MINParam(key = "limit", defaultValue = "10") int limit,
+			MINSession session) throws Exception {
+		MINActionResult res = new MINActionResult();
+		User user = session.getUser();
+		MINRowBounds rows = new MINRowBounds(page, limit);
+		List<Map<String, String>> detailList = Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(OrderManageMapper.class).selectIncomeDetail(rows);
+
+		detailList = Service.lookup(IFormatService.class).formatDate(detailList, "newTime");
+		detailList = Service.lookup(IFormatService.class).formatCurrency(detailList, "sellWxSum", "sellZfSum", "" +
+				"sellMfSum", "allSell");
+		//返回数据
+		res.set(IMINBusinessConstant.F_PAGING_LAY, detailList);
+		res.set(IMINBusinessConstant.F_PAGING_COUNT, rows.getCount());
+		return res;
+	}
+
+	/**
+	 * 取货记录
+	 * @param machineNo
+	 * @param orderNo
+	 * @param pickUpDates
+	 * @param page
+	 * @param limit
+	 * @param session
+	 * @return
+	 * @throws Exception
+	 */
+	@MINAction(value = SELECT_PICKUP_RECORD)
+	public MINActionResult selectPickupRecord (
+			@MINParam(key = "machineNo") String machineNo,
+			@MINParam(key = "orderNo") String orderNo,
+			@MINParam(key = "pickUpDates") String pickUpDates,
+			@MINParam(key = "page", defaultValue = "1") int page,
+			@MINParam(key = "limit", defaultValue = "3") int limit,
+			MINSession session) throws Exception {
+		MINActionResult res = new MINActionResult();
+		User user = session.getUser();
+		Map<String, String> m = new HashMap<String, String>();
+		m.put("machineNo", machineNo);
+		m.put("orderNo", orderNo);
+		m.put("pickUpDates", pickUpDates);
+		MINRowBounds rows = new MINRowBounds(page, limit);
+		List<Map<String, String>> detailList = Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(OrderManageMapper.class).selectPickupRecord(m,rows);
+		detailList = new MINCopyFormat("{stt:'sttDesc'}").format(detailList);
+		detailList = Service.lookup(IFormatService.class).formatEnum(detailList,"{sttDesc:'PICKUP_STT'}");
+		//返回数据
+		res.set(IMINBusinessConstant.F_PAGING_LAY, detailList);
+		res.set(IMINBusinessConstant.F_PAGING_COUNT, rows.getCount());
+		return res;
+	}
+
+	/**
+	 * 查询订单详情
+	 * @param machineNo
+	 * @param pickUpCode
+	 * @param creatdDtes
+	 * @param pickUpDates
+	 * @param pickUpState
+	 * @param page
+	 * @param limit
+	 * @param session
+	 * @return
+	 * @throws Exception
+	 */
+	@MINAction(value = SELECT_ORDER_DETAIL)
+	public MINActionResult selectOrderDetail (
+			@MINParam(key = "machineNo") String machineNo,
+			@MINParam(key = "pickUpCode") String pickUpCode,
+			@MINParam(key = "creatdDtes") String creatdDtes,
+			@MINParam(key = "pickUpDates") String pickUpDates,
+			@MINParam(key = "pickUpState") String pickUpState,
+			@MINParam(key = "page", defaultValue = "1") int page,
+			@MINParam(key = "limit", defaultValue = "3") int limit,
+			MINSession session) throws Exception {
+		MINActionResult res = new MINActionResult();
+		User user = session.getUser();
+		Map<String, String> m = new HashMap<String, String>();
+		m.put("machineNo", machineNo);
+		m.put("pickUpCode", pickUpCode);
+		m.put("creatdDtes", creatdDtes);
+		m.put("pickUpDates", pickUpDates);
+		m.put("pickUpState", pickUpState);
+		MINRowBounds rows = new MINRowBounds(page, limit);
+		List<Map<String, String>> detailList = Service.lookup(IMINDataBaseService.class)
+				.getMybatisMapper(OrderManageMapper.class).selectOrderDetail(m,rows);
+		// 格式化数据
+		detailList = Service.lookup(IFormatService.class).formatDateTime(detailList, "pickUpTime");
+		detailList = Service.lookup(IFormatService.class).formatDateTime(detailList, "createTime");
+		detailList = new MINCopyFormat("{stt:'sttDesc'}").format(detailList);
+		detailList = Service.lookup(IFormatService.class).formatEnum(detailList,"{sttDesc:'PICKUP_STT'}");
+		//返回数据
+		res.set(IMINBusinessConstant.F_PAGING_LAY, detailList);
+		res.set(IMINBusinessConstant.F_PAGING_COUNT, rows.getMaxRows());
+		return res;
+	}
+
+
+
+	/**
+	 *
+	 * @param orderNo
+	 * @param deliveryNo
+	 * @param session
+	 * @return
+	 * @throws Exception
+	 */
+	@MINAction(value = UPDATE_ORDER_STT)
+	public MINActionResult updateOrderStt(
+			@MINParam ( key = "orderNo")String orderNo,
+			@MINParam ( key = "deliveryNo")String deliveryNo,
+			MINSession session) throws Exception{
+		MINActionResult res = new MINActionResult();
+		User user = session.getUser();
+		//获取售货机推送地址
+//		String url = Service.lookup(IPropertiesService.class)
+//				.getSystemProperties().get(user.getChannel() + "_GET_MACHINE_ADDRESS").getKey();
+//		String retUrl = Service.lookup(IPropertiesService.class)
+//				.getSystemProperties().get(user.getChannel() + "_RETURN_MACHINE_ADDRESS").getKey();
+//		//组装推送接口
+//		String sendUrl = url.concat("/VendingMachineAction/pushGoods").concat("?MINView=JSON");
+//		String returnUrl = retUrl.concat("/DeliveryAction/backDeliveryForMachine");
+//
+//		//组装传送参数
+//		//初始化查询条件
+//		Map<String,String> map = new HashMap<String,String>();
+//		map.put("deliveryNo", deliveryNo);//提货编号
+//		map.put("orderNo", orderNo);//订单编号
+//		//传入渠道验证
+//		map.put("channel", user.getChannel());
+//		List<Map<String,String>> list = Service.lookup(IMINDataBaseService.class)
+//				.getMybatisMapper(OrderManageMapper.class)
+//				.queryDeliverys(map);
+//		if(list != null && list.size() > 0){
+//			//SortedMap<Object, Object> mapNew = new TreeMap<Object, Object>();
+//			Map<String,String> mapNew = new HashMap<String,String>();
+//			mapNew.put("imeiAddr", list.get(0).get("equIMEI"));
+//			mapNew.put("cargoNo", list.get(0).get("cargoWay"));
+//			mapNew.put("deliveryNo", deliveryNo);
+//			mapNew.put("channel", user.getChannel());
+//			mapNew.put("returnUrl", returnUrl);
+//			mapNew.put("MINView", "JSON");
+//			JSONObject jsonOb = JSONObject.fromObject(mapNew);
+//			String str = jsonOb.toString();
+//			String passwardKey = Service.lookup(IPropertiesService.class)
+//					.getSystemProperties().get(user.getChannel() +"_TO_MACHINE_PASSWORD_KEY").getKey();
+//			//数据加密
+//			String	desDe = Base64.encode(DesUtils.getInstance().encrypt(Base64.encode(str).getBytes(),passwardKey.getBytes(),null));
+//			//调用通用通讯接口
+//			String results = HttpPostUtil.sendPostFormachine(sendUrl,desDe);
+//		}else{
+//			throw new MINBusinessException("没有提货信息!");
+//		}
+		return res;
+	}
+
+
+}

+ 134 - 0
src/main/resources/com/minpay/db/table/own/mapper/OrderManageMapper.xml

@@ -0,0 +1,134 @@
+<?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.OrderManageMapper">
+
+	<select id="selectOrderDetail" resultType="hashmap" parameterType="java.util.Map">
+	    SELECT
+		d.VOI_ID  				"orderNo",
+		d.VOI_PRODUCT_ID 		"productId",
+		d.VOI_PRODUCT_NAME 		"productName",
+		p.VCI_NAME 				"userName",
+		d.VOI_EQUREL_ID 		"equrelId",
+		r.VCI_EQUIPMENT_ID 		"machineNo",
+		d.VOI_ORDER_AMT 		"orderAmt",
+		d.VOI_CREATE_TIME 		"createTime",
+		d.VOI_PICKUP_NO 		"pickupNo",
+		d.VOI_PICKUP_TIME 		"pickUpTime",
+		d.VOI_PICKUP_STT 		"stt"
+	    FROM vm_order_inf d, vm_pro_equ_rel r, vm_person_inf p
+		where d.VOI_EQUREL_ID = r.VCI_ID
+		and d.VOI_PERSON_ID = p.VCI_ID
+    	<if test="pickupNo != null and pickupNo != ''">
+			AND	 d.VOI_PICKUP_NO  = #{pickupNo,jdbcType=VARCHAR}
+		</if>
+		<if test="pickUpState != null and pickUpState != ''">
+			AND	 d.VOI_PICKUP_STT  = #{pickUpState,jdbcType=VARCHAR}
+		</if>
+		<if test="machineNo != null and machineNo != ''">
+			AND	 d.VCI_EQUIPMENT_ID  = #{machineNo,jdbcType=VARCHAR}
+		</if>
+		<if test="creatdDtes != null and creatdDtes != ''">
+			and substr(VOI_CREATE_TIME,1,8) between substr((#{creatdDtes, jdbcType=VARCHAR}),1,8)
+			and substr((#{creatdDtes, jdbcType=VARCHAR}),12,19)
+		</if>
+		<if test="pickUpDates != null and pickUpDates != ''">
+			and substr(VOI_PICKUP_TIME,1,8) between substr((#{pickUpDates, jdbcType=VARCHAR}),1,8)
+			and substr((#{pickUpDates, jdbcType=VARCHAR}),12,19)
+		</if>
+		and VCI_EXEIT_STATE = "00"
+		and VOI_STATE = "00"
+		and VCI_STATUS = "00"
+	</select>
+	<select id="selectPickupRecord" resultType="hashmap" parameterType="java.util.Map">
+		SELECT
+		oi.VOI_EQUIPMENT_ID 	"",
+		oi.VOI_ID 				"orderNo",
+		di.VDI_STATUS 			"stt",
+		oi.VOI_PICKUP_TIME 		"pickUpDates"
+		from vm_delivery_inf di, vm_order_details od, vm_order_inf oi
+		where di.VDI_ORD_DET_ID = od.VOD_DETAILS_ID
+		and VOD_ORDER_ID = oi.VOI_ID
+		<if test="machineNo != null and machineNo != ''">
+			AND	oi.VCI_EQUIPMENT_ID  = #{machineNo,jdbcType=VARCHAR}
+		</if>
+		<if test="orderNo != null and orderNo != ''">
+			AND	oi.VOI_ID  = #{orderNo,jdbcType=VARCHAR}
+		</if>
+		<if test="pickUpDates != null and pickUpDates != ''">
+			and substr(VOI_PICKUP_TIME,1,8) between substr((#{pickUpDates, jdbcType=VARCHAR}),1,8)
+			and substr((#{pickUpDates, jdbcType=VARCHAR}),12,19)
+		</if>
+	</select>
+
+	<select id="selectIncomeDetail" resultType="hashmap" parameterType="java.util.Map">
+		SELECT a.click_date newTime, IFNULL(c.sellCount,0) newCount,
+			IFNULL(c.sellWxSum, 0.00) sellWxSum, IFNULL(c.sellZfSum, 0.00) sellZfSum,
+			IFNULL(c.sellMfSum, 0.00) sellMfSum, IFNULL(c.sellWxSum, 0.00)+IFNULL(c.sellZfSum, 0.00) allSell
+		FROM (
+			SELECT CURDATE() AS click_date
+			UNION ALL
+			SELECT DATE_SUB(CURDATE(), INTERVAL 1 DAY) AS click_date
+			UNION ALL
+			SELECT DATE_SUB(CURDATE(), INTERVAL 2 DAY) AS click_date
+			UNION ALL
+			SELECT DATE_SUB(CURDATE(), INTERVAL 3 DAY) AS click_date
+			UNION ALL
+			SELECT DATE_SUB(CURDATE(), INTERVAL 4 DAY) AS click_date
+			UNION ALL
+			SELECT DATE_SUB(CURDATE(), INTERVAL 5 DAY) AS click_date
+			UNION ALL
+			SELECT DATE_SUB(CURDATE(), INTERVAL 6 DAY) AS click_date
+			) a
+			LEFT JOIN (
+				SELECT succTime sellTime, SUM(allCount) sellCount, SUM(wxSum) sellWxSum, SUM(zfSum) sellZfSum, SUM(mfSum) sellMfSum
+				FROM (
+					SELECT DATE(SUBSTR(PIF_SUCCTIME, 1, 8)) AS succTime, COUNT(1) allCount, SUM(PIF_TRXAMOUT) wxSum, '0' zfSum, '0' mfSum
+					FROM vm_payment_inf
+					WHERE PIF_STATUS = '1'
+					AND PIF_PAYTYPE IN ('91')
+					GROUP BY DATE(SUBSTR(PIF_SUCCTIME, 1, 8)), PIF_PAYTYPE
+					UNION ALL
+
+					SELECT DATE(SUBSTR(PIF_SUCCTIME, 1, 8)) AS succTime, COUNT(1) allCount, '0' wxSum, SUM(PIF_TRXAMOUT) zfSum, '0' mfSum
+					FROM vm_payment_inf
+					WHERE PIF_STATUS = '1'
+					AND PIF_PAYTYPE IN ('92')
+					GROUP BY DATE(SUBSTR(PIF_SUCCTIME, 1, 8)), PIF_PAYTYPE
+					UNION ALL
+
+					SELECT DATE(SUBSTR(PIF_SUCCTIME, 1, 8)) AS succTime, COUNT(1) allCount, '0' wxSum, '0' zfSum, SUM(PIF_ORDERAMOUT) mfSum
+					FROM vm_payment_inf
+					WHERE PIF_STATUS = '1'
+					AND PIF_PAYTYPE IN ('91', '92')
+					AND PIF_TRXAMOUT = '0'
+					GROUP BY DATE(SUBSTR(PIF_SUCCTIME, 1, 8)), PIF_PAYTYPE
+				) b
+				GROUP BY succTime
+		) c
+		ON a.click_date = c.sellTime
+	</select>
+
+	<select id="selectProductInfo" resultType="hashmap" parameterType="java.util.Map">
+		SELECT PRT_MASTER_MAP, PRT_NAME, PRT_CATEGORY_ID,
+	</select>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+</mapper>

+ 63 - 0
src/main/webapp/admin/incomeStatisticsManage/incomeStatistics.html

@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>收入统计</title>
+    <script src="../../js/min-loader-next.js"></script>
+</head>
+<body class="content">
+<div class="order-body">
+    <form class="layui-form"  action="javascript:void(0)"  id = "formName">
+        <div class="order-select back-border" id="content">
+        </div>
+    </form>
+
+</div>
+
+<div class="shadow-content" style="margin:1.5rem;">
+    <table id="incomeManage" lay-filter="tableFilter"></table>
+</div>
+
+
+<!--操作功能-->
+<script type="text/html" id="barDemo">
+</script>
+<script>
+	layui.use(['table','laydate','form'], function(){
+		var laydate = layui.laydate;
+		form = layui.form;
+	})
+
+	var table;
+	layui.use('table', function(){
+		table = layui.table;
+		table.render({
+			id : 'incomeManage'
+		    ,elem: '#incomeManage'
+		    ,limit:10
+		    ,url: 'invCardManageAction/selectIncomeStatistics' //数据接口
+		    ,method: 'post'
+		    ,where:{MINView:"JSON", token: 'sasasas'}
+		    ,page: true //开启分页
+		    ,cols: [[ //表头
+				{field: 'newTime',title: '日期',width:'15%'}
+		      	,{field: 'newCount', title: '支付次数', width:'10%', sort: true}
+				,{field: 'sellWxSum', title: '微信支付金额', width:'18%'}
+		      	,{field: 'sellZfSum', title: '支付宝支付金额', width:'18%'}
+		      	,{field: 'sellMfSum', title: '免费支付金额', width:'18%'}
+		      	,{field: 'allSell', title: '合计金额',width:'18%'}
+		    ]]
+		    ,done: function(res, curr, count){
+		        //如果是异步请求数据方式,res即为你接口返回的信息。
+		        console.log(res);
+		        //得到当前页码
+		        console.log(curr);
+		        //得到数据总量
+		        console.log(count);
+		      }
+		    ,even: true //开启隔行背景
+		  });
+	});
+</script>
+</body>
+</html>

+ 216 - 0
src/main/webapp/admin/invCardManage/invCardManage.html

@@ -0,0 +1,216 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>存货卡卷管理</title>
+    <script src="../../js/min-loader-next.js"></script>
+</head>
+<body class="content">
+<div class="order-body">
+    <div class="order-tiaojian back-gray">
+        <div class="tiaojian-part1" id = "conditions">
+            <div class="fl f12-gray4-op mt4">所选条件:</div>
+        </div>
+        <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" id = "addUser">添加</button>
+            <a href="#" id="toggle" class="top">收起</a>
+        </div>
+    </div>
+    <form class="layui-form"  action="javascript:void(0)"  id = "formName">
+        <div class="order-select back-border" id="content">
+            <div class="layui-inline">
+                <label class="f12-gray4">机台号 :</label>
+                <input type="tel" name="machineNo"  id ="machineNo" autocomplete="off" placeholder="请输入机台号" class="layui-input">
+            </div>
+            <div class="layui-inline">
+                <label class="f12-gray4">取货码:</label>
+                <input type="tel" name="pickUpCode"  id ="pickUpCode" 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>
+                <div  class=""  style="display:inline-block" id = 'pickUpState'></div>
+            </div>
+            <div class="layui-inline">
+                <label class="f12-gray4">创建日期:</label>
+                <input class="search-select" type="text"  id="creatdDtes" placeholder="日期(区间)"   readonly />
+            </div>
+            <div class="layui-inline">
+                <label class="f12-gray4">取货日期:</label>
+                <input class="search-select" type="text"  id="pickUpDates" placeholder="日期(区间)"   readonly />
+            </div>
+        </div>
+    </form>
+
+</div>
+
+<div class="shadow-content" style="margin:1.5rem;">
+    <table id="cardManage" lay-filter="tableFilter"></table>
+</div>
+
+
+<!--操作功能-->
+<script type="text/html" id="barDemo">
+    {{#  if(d.stt == '00'){ }}
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="doPickup">取货</a>
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="doTovoid">作废</a>
+    {{#  }; }}
+</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();
+	});
+	layui.use(['table','laydate','form'], function(){
+		var laydate = layui.laydate;
+		//日期范围
+		laydate.render({
+		    elem: '#creatdDtes'
+		   ,range: true
+		   ,format:'yyyyMMdd'
+		   ,done: function(value, date, endDate){
+    			  changeSelectCon(1,"dates",'date',value)
+  			}
+		});
+
+		laydate.render({
+		    elem: '#pickUpDates'
+		   ,range: true
+		   ,format:'yyyyMMdd'
+		   ,done: function(value, date, endDate){
+    			  changeSelectCon(1,"dates",'date',value)
+  			}
+		});
+		form = layui.form;
+		initSelect('pickUpState', "PICKUP_STT", "pickUpState", ' ', true);
+		form.on('select(pickUpState)', function(data){
+   			changeSelectCon(2, data.elem, "sel","pickUpState");
+   		});
+		form.render();
+	})
+
+	var table;
+	layui.use('table', function() {
+		table = layui.table;
+		table.render({
+			id : 'cardManage'
+		    ,elem: '#cardManage'
+		    ,limit:10
+		    ,url: 'invCardManageAction/selectOrderDetail' //数据接口
+		    ,method: 'post'
+		    ,where:{MINView:"JSON", token: 'sasasas'}
+		    ,page: true //开启分页
+		    ,cols: [[ //表头
+				{type:'numbers',title: '序号',width:'5%'}
+		      	,{field: 'orderNo', title: '订单号', width:'10%'}
+				,{field: 'productName', title: '商品信息', width:'12%'}
+		      	,{field: 'machineNo', title: '机台号', width:'12%'}
+		      	,{field: 'equrelId', title: '货道号', width:'15%'}
+		      	,{field: 'userName', title: '消费者信息',width:'15%'}
+		      	,{field: 'orderAmt', title: '支付金额',width:'15%'}
+		      	,{field: 'createTime', title: '创建时间',width:'8%'}
+		      	,{field: 'pickupNo', title: '取货码',width:'8%'}
+		      	,{field: 'pickUpTime', title: '取货时间', width: '25%',}
+		      	,{field: 'sttdesc', title: '状态',width:'8%'}
+		      	,{field: 'operate', title: '操作',width:'8%', toolbar: '#barDemo'}
+		    ]]
+		    ,done: function(res, curr, count){
+		        //如果是异步请求数据方式,res即为你接口返回的信息。
+		        console.log(res);
+		        //得到当前页码
+		        console.log(curr);
+		        //得到数据总量
+		        console.log(count);
+		      }
+		    ,even: true //开启隔行背景
+		  });
+
+		 // 监听工具条(操作)
+		 table.on('tool(tableFilter)', function(obj){ //注:tool是工具条事件名,tableFilter是table原始容器的属性 lay-filter="对应的值"
+			var data = obj.data; //获得当前行数据
+		    var layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
+		    var tr = obj.tr; //获得当前行 tr 的DOM对象
+		    var id = data.id;
+		    if(layEvent == 'doTovoid'){ //作废
+		    	layer.confirm('确定要作废订单吗?', function(index){
+					$.request({
+						action : '../../invCardManageAction/updateOrderStt',
+						data : {
+							orderNo : orderNo, //订单号
+							temp : "0" //操作0:作废,1:取货
+						},
+						success : function(data) {
+							 layer.alert('操作成功!', {
+									icon: 6,
+									title: "提示"
+							});
+						},
+						error : function(data) {
+							 layer.alert('操作失败!', {
+								icon: 5,
+								title: "提示"
+							});
+						}
+					});
+				});
+		    } else if(layEvent == 'doPickup'){ //取货
+		        layer.confirm('确定要取货吗?', function(index){
+					$.request({
+						action : '../../invCardManageAction/updateOrderStt',
+						data : {
+							orderNo : orderNo, //订单号
+							temp : "0" //操作0:作废,1:取货
+						},
+						success : function(data) {
+							 layer.alert('操作成功!', {
+									icon: 6,
+									title: "提示"
+							});
+						},
+						error : function(data) {
+							 layer.alert('操作失败!', {
+								icon: 5,
+								title: "提示"
+							});
+						}
+					});
+				});
+			}
+		});
+
+		var $ = layui.$, active = {
+ 		    reload: function(){
+ 		    	reLoadFun();
+ 		    }
+ 		    ,reset: function(){
+ 		    	$('#formName')[0].reset()
+ 		    }
+	 	};
+	});
+
+	function reLoadFun() {
+		var machineNo = $('#machineNo').val();
+    	var pickUpCode = $('#pickUpCode').val();
+    	var pickUpState = $("select[name='pickUpState']").val();
+    	var pickUpDates = $("#pickUpDates").val();
+    	var creatdDtes = $("#creatdDtes").val();
+         //执行重载
+     	table.reload('userManage', {
+	        page: {
+	          curr: 1 //重新从第 1 页开始
+	        }
+	        ,where: {
+	        	machineNo : machineNo,
+	        	pickUpCode : pickUpCode,
+	        	stt : state,
+	        	creatdDtes : creatdDtes,
+	        	pickUpDates : pickUpDates
+	        }
+      	});
+	}
+</script>
+</body>
+</html>

+ 126 - 0
src/main/webapp/admin/pickupRecordManage/pickupRecord.html

@@ -0,0 +1,126 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title>卡卷取货记录</title>
+    <script src="../../js/min-loader-next.js"></script>
+</head>
+<body class="content">
+<div class="order-body">
+    <div class="order-tiaojian back-gray">
+        <div class="tiaojian-part1" id = "conditions">
+            <div class="fl f12-gray4-op mt4">所选条件:</div>
+        </div>
+        <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" id = "addUser">添加</button>
+            <a href="#" id="toggle" class="top">收起</a>
+        </div>
+    </div>
+    <form class="layui-form"  action="javascript:void(0)"  id = "formName">
+        <div class="order-select back-border" id="content">
+            <div class="layui-inline">
+                <label class="f12-gray4">机台号 :</label>
+                <input type="tel" name="machineNo"  id ="machineNo" autocomplete="off" placeholder="请输入机台号" class="layui-input">
+            </div>
+            <div class="layui-inline">
+                <label class="f12-gray4">订单号:</label>
+                <input type="tel" name="orderNo"  id ="orderNo" 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 class="search-select" type="text"  id="pickUpDates" placeholder="日期(区间)"   readonly />
+            </div>
+        </div>
+    </form>
+
+</div>
+
+<div class="shadow-content" style="margin:1.5rem;">
+    <table id="recordManage" lay-filter="tableFilter"></table>
+</div>
+<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();
+	});
+	layui.use(['table','laydate','form'], function(){
+		var laydate = layui.laydate;
+		//日期范围
+		laydate.render({
+		    elem: '#pickUpDates'
+		   ,range: true
+		   ,format:'yyyyMMdd'
+		   ,done: function(value, date, endDate){
+    			  changeSelectCon(1,"dates",'date',value)
+  			}
+		});
+		form = layui.form;
+		form.render();
+	})
+
+	var table;
+	layui.use('table', function(){
+		table = layui.table;
+		table.render({
+			id : 'recordManage'
+		    ,elem: '#recordManage'
+		    ,limit:10
+		    ,url: 'invCardManageAction/selectPickupRecord' //数据接口
+		    ,method: 'post'
+		    ,where:{MINView:"JSON", token: 'sasasas'}
+		    ,page: true //开启分页
+		    ,cols: [[ //表头
+				{type:'numbers',title: '序号',width:'5%'}
+		      	,{field: 'machineNo', title: '机台号', width:'10%', sort: true}
+				,{field: 'orderNo', title: '订单号', width:'12%'}
+		      	,{field: 'sttdesc', title: '状态', width:'12%'}
+		      	,{field: 'pickUpTime', title: '取货时间', width:'15%'}
+		    ]]
+		    ,done: function(res, curr, count){
+		        //如果是异步请求数据方式,res即为你接口返回的信息。
+		        console.log(res);
+		        //得到当前页码
+		        console.log(curr);
+		        //得到数据总量
+		        console.log(count);
+		      }
+		    ,even: true //开启隔行背景
+		  });
+
+		var $ = layui.$, active = {
+ 		    reload: function(){
+ 		    	reLoadFun();
+ 		    }
+ 		    ,reset: function(){
+ 		    	$('#formName')[0].reset()
+ 		    }
+	 	};
+		$('.layui-btn').on('click', function(){
+		  	var type = $(this).data('type');
+		  	active[type] ? active[type].call(this) : '';
+		});
+	});
+
+	function reLoadFun() {
+		var machineNo = $('#machineNo').val();
+		var orderNo = $('#orderNo').val();
+    	var pickUpDates = $("#pickUpDates").val();
+         //执行重载
+     	table.reload('recordManage', {
+	        page: {
+	          curr: 1 //重新从第 1 页开始
+	        }
+	        ,where: {
+	        	machineNo : machineNo,
+	        	orderNo : orderNo,
+	        	pickUpDates : pickUpDates
+	        }
+      	});
+	}
+</script>
+</body>
+</html>