|
@@ -27,170 +27,193 @@
|
|
|
<label class="f12-gray4">订单号:</label>
|
|
|
<input type="tel" name="orderNo" id ="orderNo" onchange = "changeSelectCon(1,this,'inp')" placeholder="请输入订单号" class="search-select">
|
|
|
</div>
|
|
|
+ <div class="layui-inline">
|
|
|
+ <label class="f12-gray4">用户ID:</label>
|
|
|
+ <input type="tel" name="vciId" id ="vciId" onchange = "changeSelectCon(1,this,'inp')" placeholder="请输入用户ID" class="search-select">
|
|
|
+ </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 class="layui-inline">
|
|
|
+ <label class="f12-gray4">货道编号:</label>
|
|
|
+ <input type="tel" name="equrelId" id ="equrelId" onchange = "changeSelectCon(1,this,'inp')" placeholder="请输入货道编号" class="search-select">
|
|
|
+ </div>
|
|
|
+ <div class="layui-inline">
|
|
|
+ <label class="f12-gray4">取货码:</label>
|
|
|
+ <input type="tel" name="pickupNo" id ="pickupNo" onchange = "changeSelectCon(1,this,'inp')" placeholder="请输入取货码" class="search-select">
|
|
|
+ </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(3,"pickUpDates",'date',value)
|
|
|
- }
|
|
|
- });
|
|
|
- form = layui.form;
|
|
|
- form.render();
|
|
|
- })
|
|
|
+ <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(3,"pickUpDates",'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 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: 'vciId', title: '用户ID', width:'12%'}
|
|
|
+ ,{field: 'orderNo', title: '订单号', width:'12%'}
|
|
|
+ ,{field: 'equrelId', title: '货道号', width:'15%'}
|
|
|
+ ,{field: 'machineNo', title: '机台号', width:'10%', sort: true}
|
|
|
+ ,{field: 'pickupNo', title: '取货码',width:'8%'}
|
|
|
+ ,{field: 'productName', title: '商品信息', width:'12%'}
|
|
|
+ ,{field: 'sallPrice', 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) : '';
|
|
|
- });
|
|
|
- });
|
|
|
+ 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
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- function changeSelectCon(index, t, type, dateValue){
|
|
|
- if (type == "date") {
|
|
|
- if (isEmpty(dateValue)) {
|
|
|
- $("#search" + index).remove();
|
|
|
- } else {
|
|
|
- $("#search" + index).remove();
|
|
|
- if (isEmpty($("#search" + index).attr("name"))) {
|
|
|
- $("#conditions").append(getSelectConHtml(index, t, type,dateValue));
|
|
|
- }
|
|
|
- }
|
|
|
- } else if (type == 'inp') {
|
|
|
- if (isEmpty($(t).val())) {
|
|
|
- $("#search" + index).remove();
|
|
|
- } else {
|
|
|
- $("#search" + index).remove();
|
|
|
- if (isEmpty($("#search" + index).attr("name"))) {
|
|
|
- $("#conditions").append(getSelectConHtml(index, t, type));
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (isEmpty($(t).val())) {
|
|
|
- $("#search" + index).remove();
|
|
|
- } else {
|
|
|
- $("#search" + index).remove();
|
|
|
- if (isEmpty($("#search" + index).attr("name"))) {
|
|
|
- $(t).attr("id",dateValue);
|
|
|
- $("#conditions").append(getSelectConHtml(index, t, type,dateValue));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- var array = new Array('机台号','订单号','取货时间');
|
|
|
- function getSelectConHtml(index, t, type,dateValue){
|
|
|
- var name;
|
|
|
- var value;
|
|
|
- if(type == "inp"){
|
|
|
- value = t.value.substr(0,5)+"..";
|
|
|
- }
|
|
|
- if (type == "date") {
|
|
|
- value = dateValue;
|
|
|
- }
|
|
|
- if(type == "sel" && dateValue =="state"){
|
|
|
- value = $("#state").find("option:selected").text();
|
|
|
- }
|
|
|
- if(type == "sel" && dateValue =="roleid"){
|
|
|
- value = $("#roleid").find("option:selected").text();
|
|
|
- }
|
|
|
- if (type == "date") {
|
|
|
- name = $("#"+t).attr("id");
|
|
|
- } else {
|
|
|
- name = $(t).attr("id");
|
|
|
- }
|
|
|
- var html = '<div class="fl xuanzhong-active" id = "search' + index + '" name = "' + name + '" onclick = "removeSearch(this)">' +
|
|
|
- '<div class="fl">' + array[index] + '</div>' +
|
|
|
- ':<i class="iconfont">'+value+'</i>' +
|
|
|
- '<svg class="icon" aria-hidden="true">' +
|
|
|
- '<use xlink:href="#iconicon_close1"></use>' +
|
|
|
- '</svg>' +
|
|
|
- '</div>';
|
|
|
- return html;
|
|
|
- }
|
|
|
- function removeSearch(t) {
|
|
|
- if ($(t).attr("name") == 'state') {
|
|
|
- initSelect('state', "IM_USER_STATE", "state", ' ', true);
|
|
|
- form.render();
|
|
|
- $(t).remove();
|
|
|
- } else {
|
|
|
- $("#"+$(t).attr("name")).val('');
|
|
|
- $(t).remove();
|
|
|
- }
|
|
|
- }
|
|
|
-</script>
|
|
|
+ function reLoadFun() {
|
|
|
+ var machineNo = $('#machineNo').val();
|
|
|
+ var orderNo = $('#orderNo').val();
|
|
|
+ var pickUpDates = $("#pickUpDates").val();
|
|
|
+ var equrelId = $('#equrelId').val();
|
|
|
+ var vciId = $('#vciId').val();
|
|
|
+ var pickupNo = $("#pickupNo").val();
|
|
|
+ //执行重载
|
|
|
+ table.reload('recordManage', {
|
|
|
+ page: {
|
|
|
+ curr: 1 //重新从第 1 页开始
|
|
|
+ }
|
|
|
+ ,where: {
|
|
|
+ machineNo : machineNo,
|
|
|
+ orderNo : orderNo,
|
|
|
+ pickUpDates : pickUpDates,
|
|
|
+ equrelId : equrelId,
|
|
|
+ vciId : vciId,
|
|
|
+ pickupNo : pickupNo
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function changeSelectCon(index, t, type, dateValue){
|
|
|
+ if (type == "date") {
|
|
|
+ if (isEmpty(dateValue)) {
|
|
|
+ $("#search" + index).remove();
|
|
|
+ } else {
|
|
|
+ $("#search" + index).remove();
|
|
|
+ if (isEmpty($("#search" + index).attr("name"))) {
|
|
|
+ $("#conditions").append(getSelectConHtml(index, t, type,dateValue));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (type == 'inp') {
|
|
|
+ if (isEmpty($(t).val())) {
|
|
|
+ $("#search" + index).remove();
|
|
|
+ } else {
|
|
|
+ $("#search" + index).remove();
|
|
|
+ if (isEmpty($("#search" + index).attr("name"))) {
|
|
|
+ $("#conditions").append(getSelectConHtml(index, t, type));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (isEmpty($(t).val())) {
|
|
|
+ $("#search" + index).remove();
|
|
|
+ } else {
|
|
|
+ $("#search" + index).remove();
|
|
|
+ if (isEmpty($("#search" + index).attr("name"))) {
|
|
|
+ $(t).attr("id",dateValue);
|
|
|
+ $("#conditions").append(getSelectConHtml(index, t, type,dateValue));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var array = new Array('机台号','订单号','取货时间');
|
|
|
+ function getSelectConHtml(index, t, type,dateValue){
|
|
|
+ var name;
|
|
|
+ var value;
|
|
|
+ if(type == "inp"){
|
|
|
+ value = t.value.substr(0,5)+"..";
|
|
|
+ }
|
|
|
+ if (type == "date") {
|
|
|
+ value = dateValue;
|
|
|
+ }
|
|
|
+ if(type == "sel" && dateValue =="state"){
|
|
|
+ value = $("#state").find("option:selected").text();
|
|
|
+ }
|
|
|
+ if(type == "sel" && dateValue =="roleid"){
|
|
|
+ value = $("#roleid").find("option:selected").text();
|
|
|
+ }
|
|
|
+ if (type == "date") {
|
|
|
+ name = $("#"+t).attr("id");
|
|
|
+ } else {
|
|
|
+ name = $(t).attr("id");
|
|
|
+ }
|
|
|
+ var html = '<div class="fl xuanzhong-active" id = "search' + index + '" name = "' + name + '" onclick = "removeSearch(this)">' +
|
|
|
+ '<div class="fl">' + array[index] + '</div>' +
|
|
|
+ ':<i class="iconfont">'+value+'</i>' +
|
|
|
+ '<svg class="icon" aria-hidden="true">' +
|
|
|
+ '<use xlink:href="#iconicon_close1"></use>' +
|
|
|
+ '</svg>' +
|
|
|
+ '</div>';
|
|
|
+ return html;
|
|
|
+ }
|
|
|
+ function removeSearch(t) {
|
|
|
+ if ($(t).attr("name") == 'state') {
|
|
|
+ initSelect('state', "IM_USER_STATE", "state", ' ', true);
|
|
|
+ form.render();
|
|
|
+ $(t).remove();
|
|
|
+ } else {
|
|
|
+ $("#"+$(t).attr("name")).val('');
|
|
|
+ $(t).remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ <table id="recordManage" lay-filter="tableFilter"></table>
|
|
|
+</div>
|
|
|
</body>
|
|
|
</html>
|