From b742f00aac8e1e1bb628232383c35e67f4a41e4e Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期五, 26 一月 2024 15:21:28 +0800
Subject: [PATCH] 1
---
WebTM/views/模治具管理/模治具管理/Gy_BarCodeBillList.html | 583 +++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 414 insertions(+), 169 deletions(-)
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
index 1da57ca..f7dfc01 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
@@ -1,23 +1,31 @@
锘�<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<title>鏉$爜妗f</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>鏉$爜妗f</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">
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
<script src="../../../layuiadmin/layui/layui.js"></script>
+ <script src="../../../layuiadmin/layui/layui.js"></script>
+ <script src="../../../layuiadmin/Scripts/json2.js"></script>
+ <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+ <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../../layuiadmin/PubCustom.js"></script>
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script src="../../../layuiadmin/HideButton.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
<style type="text/css">
input.layui-input.layui-unselect {
padding-right: 0;
}
- .layui-table-cell {
+ /* .layui-table-cell {
height: auto;
white-space: normal;
- }
+ } */
</style>
</head>
<body>
@@ -33,64 +41,64 @@
<span>鏇村</span>
</div>
</div>
- <!--<div class="layui-inline">
- <label class="layui-form-label">鍗曟嵁绫诲瀷</label>
+ <div class="layui-inline">
+ <label class="layui-form-label">鏉$爜缂栧彿</label>
<div class="layui-input-block">
- <select name="HBillType" id="HBillType">
- <option value="">鎵�鏈�</option>
- <option value="ZHXJ">涓嬫灦鎵捐揣鍗�</option>
- <option value="ZHSJ">涓婃灦褰掕繕鍗�</option>
- </select>
+ <input type="text" class="layui-input" name="HBarCode" id="HBarCode">
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鍗曟嵁鍙�</label>
+ <label class="layui-form-label">鐗╂枡鍚嶇О</label>
<div class="layui-input-block">
- <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
+ <input type="text" class="layui-input" name="HMaterName" id="HMaterName">
</div>
</div>
- <div class="layui-inline">
- <label class="layui-form-label">鍒跺崟浜�</label>
- <div class="layui-input-block">
- <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
- </div>
- </div>-->
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
- <!--<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>-->
- <!--<div class="layui-colla-content">
- <div class="layui-inline">
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+ <div class="layui-colla-content" style="padding: 0px; margin-left: 5%;">
+ <div class="layui-row" style="margin-top:10px;">
<div class="layui-inline">
- <span>鍏朵粬鏉′欢></span>
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
</div>
</div>
- <div class="layui-inline">
- <label class="layui-form-label">寮�濮嬫椂闂�</label>
- <div class="layui-input-block">
- <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">缁撴潫鏃堕棿</label>
- <div class="layui-input-block">
- <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
- </div>
- </div>
- </div>-->
+ </div>
</div>
</div>
<table class="" id="mainTable" lay-filter="mainTable"></table>
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
-
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-reload" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-view" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-print" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-Delete" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="set_HideColumn" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" id="btn-exit" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
</div>
</script>
</form>
@@ -98,16 +106,12 @@
</div>
</div>
</div>
- <script src="../../../layuiadmin/layui/layui.js"></script>
- <script src="../../../layuiadmin/Scripts/json2.js"></script>
- <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
- <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script>
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
var $ = layui.$
, admin = layui.admin
, layer = layui.layer
@@ -117,155 +121,396 @@
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ , soulTable = layui.soulTable
//鏌ヨ鏉′欢
var sWhere = "";
+ var option = [];
+ var titleData = ["鍗曟嵁ID", "HMaterID", "HDeptID", "HSupID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
- var option = {
- elem: '#mainTable'
- , toolbar: '#toolbarDemo'
- , height: 'full-50'
- , page: true
- , cellMinWidth: 90
- , limits: [50, 500, 5000, 20000]
- , limit: 50
- , cols: [[
- { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
- , { field: '鏉$爜绫诲瀷', title: '鏉$爜绫诲瀷', width: 160 }
- , { field: '鏉$爜缂栧彿', title: '鏉$爜缂栧彿', width: 160 }
- , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true }
- , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 200 }
- , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 200 }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 200 }
- , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 200 }
- , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 200 }
- , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
- , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200 }
- , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 160 }
- , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 160 }
- , { field: '鎵瑰彿', title: '鎵瑰彿', width: 160 }
- , { field: '鏁伴噺', title: '鏁伴噺', width: 200 }
- , { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�', width: 200 }
- , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
- , { field: 'HSupID', title: 'HSupID', width: 200, hide: true }
- , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 200 }
- , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 200 }
- , { field: '杩涙枡鏃ユ湡', title: '杩涙枡鏃ユ湡', width: 200 }
- , { field: '杩涙枡鏃ユ湡鍛�', title: '杩涙枡鏃ユ湡鍛�', width: 115 }
- , { field: '瀹㈡埛鍨嬪彿', title: '瀹㈡埛鍨嬪彿', width: 115 }
- , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 }
- , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
- , { field: '杞﹂棿', title: '杞﹂棿', width: 115 }
- , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡', width: 200 }
- , { field: '鎷栧彿', title: '鎷栧彿', width: 200 }
- , { field: '鎬绘墭鏁�', title: '鎬绘墭鏁�', width: 200 }
- , { field: '澶囨敞', title: '澶囨敞', width: 200 }
- , { field: '鍒朵綔浜�', title: '鍒朵綔浜�', width: 115 }
- , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200 }
- , { field: '鎵撳嵃娆℃暟', title: '鎵撳嵃娆℃暟', width: 200 }
- , { field: '浣滃簾鏍囪', title: '浣滃簾鏍囪', width: 200 }
- , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 115 }
- , { field: '鐢熶骇鍏ュ簱鏃ユ湡', title: '鐢熶骇鍏ュ簱鏃ユ湡', width: 200 }
- , { field: '閿�鍞嚭搴撴棩鏈�', title: '閿�鍞嚭搴撴棩鏈�', width: 200 }
- ]]
- };
- var index = layer.load(0);
- //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL() + '/Gy_BarCodeBillList/GetBarCodeBillList',
- type: "GET",
- data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
- success: function (data1) {
- if (data1.count == 1) {
- option.data = data1.data;
- table.render(option);
- layer.close(index);
- } else {
- layer.close(index);
- layer.alert(data1.code + data1.Message, { icon: 5 });
- }
- }, error: function () {
- layer.close(index);
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
- }
+ var HModName = "Gy_BarCodeBillList";
+ set_ClearBill();
+
+ //#region 澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable)', function (obj) {
+ switch (obj.event) {
+ //鍒楄缃�
+ case 'set_HideColumn': get_HideColumn();
+ break;
+ case 'btn-Delete':
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length == 0 || checkStatus.data.length > 300) {
+ layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁,涓旈�変腑琛屾暟涓嶈兘瓒呰繃300琛岋紒');
+ return;
+ }
+ var mainid = "";
+ var BarCode = "";
+ for (i = 0; i < data.length; i++) {
+ mainid += data[i].hmainid.toString() + ",";
+ BarCode += data[i].鏉$爜缂栧彿.toString() + ",";
+ }
+
+ mainid = mainid.substring(0, mainid.length - 1)
+ BarCode = BarCode.substring(0, BarCode.length - 1)
+
+ var oData = JSON.stringify(mainid) + ";" + sessionStorage["HUserName"] + ";" + JSON.stringify(BarCode);
+
+ //閫昏緫鍒犻櫎鏂规硶
+ layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "Gy_MaterialController/DeltetBarCodeBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "oData": oData },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ })
+ break;
+ case 'btn-print':
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length > 0) {
+ var rows = '';
+ for (var i = 0; i < data.length; i++) {
+ rows += data[i].HItemID.toString() + ',';
+ }
+ rows = rows.substring(rows.length - 1, 0);
+ layer.open({
+ type: 2
+ , area: ['50%', '50%']
+ , title: '鎵撳嵃妯$増閫夋嫨'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + rows + '&MyMsg=' + rows + '&Type=HGy_BarCodeBill', 'yes']
+ , resize: false
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨鏁版嵁鎵撳嵃锛�');
+ }
+ break;
+ //鍒锋柊
+ case 'btn-reload':
+ $("#HBarCode").val("");
+ $("#HMaterName").val("");
+ sWhere = "";
+ get_Display(sWhere);
+ break;
+ //閫�鍑烘寜閽�
+ case 'btn-exit': Pub_Close(2);
+ break;
+ //鎸夐挳璁剧疆
+ case 'set_HideButton':
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "鏉$爜涓绘。";
+ get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+ break;
+ };
});
- //閲嶇疆鎸夐挳
- //form.on('submit(btnReSearch)', function (data) {
- // $("#HBillType").val("");//鍗曟嵁绫诲瀷
- // $("#HBillNo").val("");//鍗曟嵁鍙�
- // $("#HSourceBillNo").val("");//婧愬崟鍙�
- // $("#HCreateBy").val("");//鍒跺崟浜�
- // $("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
- // $("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
- // $("#btnSearch").click();
- //});
+ //#region 閲嶇疆鎸夐挳
+ form.on('submit(btnReSearch)', function (data) {
+ $("#HBarCode").val("");
+ $("#HMaterName").val("");
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ form.render('select');
+ sWhere = "";
+ get_Display(sWhere);
+ });
+ //#endregion
- //鏌ヨ鎸夐挳
- form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
- //var HBillType = $("#HBillType").val();//鍗曟嵁绫诲瀷
- //var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
- //var HCreateBy = $("#HCreateBy").val();//鍒跺崟浜�
- //var BenginHCreateDate = $("#BenginHCreateDate").val();//寮�濮嬪埗鍗曟椂闂�
- //var EndHCreateDate = $("#EndHCreateDate").val();//缁撴潫鍒跺崟鏃堕棿
- //if (HBillNo) {
- // sWhere += " and HBillNo like '%" + HBillNo + "%'";
- //}
- //if (HCreateBy) {
- // sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
- //}
- //if (BenginHCreateDate) {
- // sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
- //}
- //if (EndHCreateDate) {
- // sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
- //}
+ //#region 鏌ヨ鎸夐挳
+ form.on('submit(btnSearch)', function (data) {
+ var HBarCode = $("#HBarCode").val();//寮�濮嬫棩鏈�
+ var HMaterName = $("#HMaterName").val();//缁撴潫鏃ユ湡
+ var ColName = $("#ColName").val();//澶嶉�夋
+ var Comparator = $("#Comparator").val()
+ var ColContent = $("#ColContent").val();
+
+ if (ColName != 0 && Comparator != 0) {
+ var com = "";
+ switch (Comparator) {
+ case "7":
+ com = "like'%" + ColContent + "%'";
+ break;
+ case "8":
+ com = "like'%" + ColContent + "'";
+ break;
+ case "9":
+ com = "like'" + ColContent + "%'";
+ break;
+ case "10":
+ com = "not like'%" + ColContent + "%'";
+ break;
+ default:
+ com = "" + Comparator + "'" + ColContent + "'";
+ break;
+ }
+ sWhere += " and " + ColName + " " + com;
+ }
+
+ if (HBarCode) {
+ sWhere += " and 鏉$爜缂栧彿 like '" + HBarCode + "'";
+ }
+ if (HMaterName) {
+ sWhere += " and 鐗╂枡鍚嶇О like'" + HMaterName + "'";
+ }
+ get_Display(sWhere);
+ sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ });
+ //#endregion
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ //鏌ヨ
+ get_Display(sWhere);
+ }
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-50'
+ , page: true
+ , cellMinWidth: 90
+ , limits: [50, 500, 5000, 20000,50000]
+ , limit: 50
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'hmainid', title: '鍗曟嵁ID', hide: true, sort: true }
+ , { field: '鏉$爜绫诲瀷', title: '鏉$爜绫诲瀷', width: 160, sort: true }
+ , { field: '鏉$爜缂栧彿', title: '鏉$爜缂栧彿', width: 160, sort: true }
+ , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true, sort: true }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 200, sort: true }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 250, sort: true }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 250, sort: true }
+ , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 200, sort: true }
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 200, sort: true }
+ , { field: '鐐夊彿', title: '鐐夊彿', width: 200, sort: true }
+ , { field: '閽㈠嵎鍙�', title: '閽㈠嵎鍙�', width: 200, sort: true }
+ , { field: '鏉$爜鐘舵��', title: '鏉$爜鐘舵��', width: 200, sort: true }
+ , { field: '鍘傚晢', title: '鍘傚晢', width: 200, sort: true }
+ , { field: '鎹嗗寘鍙�', title: '鎹嗗寘鍙�', width: 200, sort: true }
+ , { field: '鐢熶骇鏃ユ湡', title: '鐢熶骇鏃ユ湡', width: 200, templet: "<div>{{d.鐢熶骇鏃ユ湡 ==null ?'':layui.util.toDateString(d.鐢熶骇鏃ユ湡, 'yyyy-MM-dd HH:mm:ss}}</div>", sort: true }
+ , { field: '淇濊川鏈熻嚦', title: '淇濊川鏈熻嚦', width: 200, templet: "<div>{{d.淇濊川鏈熻嚦 ==null ?'':layui.util.toDateString(d.淇濊川鏈熻嚦, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200, sort: true }
+ , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 160, sort: true }
+ , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 160, sort: true }
+ , { field: '鎵瑰彿', title: '鎵瑰彿', width: 160, sort: true }
+ , { field: '鏁伴噺', title: '鏁伴噺', width: 200, sort: true }
+ , { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�', width: 200, sort: true }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200, sort: true }
+ , { field: 'HSupID', title: 'HSupID', width: 200, hide: true, sort: true }
+ , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 200, sort: true }
+ , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 200, sort: true }
+ , { field: '杩涙枡鏃ユ湡', title: '杩涙枡鏃ユ湡', width: 200, sort: true }
+ , { field: '杩涙枡鏃ユ湡鍛�', title: '杩涙枡鏃ユ湡鍛�', width: 115, sort: true }
+ , { field: '瀹㈡埛鍨嬪彿', title: '瀹㈡埛鍨嬪彿', width: 115, sort: true }
+ , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200, sort: true }
+ , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true }
+ , { field: '杞﹂棿', title: '杞﹂棿', width: 115, sort: true }
+ , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡', width: 200, sort: true }
+ , { field: '鎷栧彿', title: '鎷栧彿', width: 200, sort: true }
+ , { field: '鎬绘墭鏁�', title: '鎬绘墭鏁�', width: 200, sort: true }
+ , { field: '澶囨敞', title: '澶囨敞', width: 200, sort: true }
+ , { field: '鍒朵綔浜�', title: '鍒朵綔浜�', width: 115, sort: true }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: '鎵撳嵃娆℃暟', title: '鎵撳嵃娆℃暟', width: 200, sort: true }
+ , { field: '浣滃簾鏍囪', title: '浣滃簾鏍囪', width: 200, sort: true }
+ , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 115, sort: true }
+ , { field: '鐢熶骇鍏ュ簱鏃ユ湡', title: '鐢熶骇鍏ュ簱鏃ユ湡', width: 200, templet: "<div>{{d.鐢熶骇鍏ュ簱鏃ユ湡 ==null ?'':layui.util.toDateString(d.鐢熶骇鍏ュ簱鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ , { field: '閿�鍞嚭搴撴棩鏈�', title: '閿�鍞嚭搴撴棩鏈�', width: 200, templet: "<div>{{d.閿�鍞嚭搴撴棩鏈� ==null ?'':layui.util.toDateString(d.閿�鍞嚭搴撴棩鏈�, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
+ ]]
+ };
+
+ }
+
+ //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+ function get_Display(sWhere) {
var index = layer.load(0);
+ //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
$.ajax({
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL1() + '/Gy_BarCodeBillList/GetBarCodeBillList',
+ url: GetWEBURL() + '/Gy_BarCodeBillList/GetBarCodeBillList',
type: "GET",
- data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.count == 1) {
option.data = data1.data;
table.render(option);
layer.close(index);
- layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+
+ if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ ColFilter();
+ }
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "鏉$爜涓绘。";
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
} else {
layer.close(index);
layer.alert(data1.code + data1.Message, { icon: 5 });
}
}, error: function () {
layer.close(index);
- layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
- //璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
- sWhere = "";
- //$("#HBillType").val("");//鍗曟嵁绫诲瀷
- //$("#HBillNo").val("");//鍗曟嵁鍙�
- //$("#HSourceBillNo").val("");//婧愬崟鍙�
- //$("#HCreateBy").val("");//鍒跺崟浜�
- //$("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
- //$("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
- });
-
- //鐩戝惉琛屽弻鍑讳簨浠�
- table.on('rowDouble(mainTable)', function (obj) {
- layer.alert("鍙屽嚮浜嬩欢", { icon: 1 });
- });
+ DisPlay_HideColumn();
+ }
- //laydate.render({
- // elem: '#HDate'
- // , type: 'datetime'
- // , trigger: 'click'
- // , format:'yyyy-MM-dd HH:mm'
- //});
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["title"] + ",";
+ }
+
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //璁剧疆鍒楀
+ //if (data1.data[0].HColumnWidth != 0) {
+ // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+ //} else {
+ // option.cols[0][i + 1]["width"] = "";
+ //}
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ }
+
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ table.render(option);
+ } else {
+ table.render(option);
+ }
+
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "鏉$爜涓绘。";
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+
+ //鍒楁槑鏄剧ず涓嬫媺妗�
+ function ColFilter() {
+ var Organization = '<option value="0" selected="selected" ></option>';
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (option.cols[0][i].hide != true) {
+ Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+ }
+ }
+ $("#ColName").empty();
+ $("#ColName").append(Organization);
+ form.render('select');
+ }
//浠ヤ笂鏄痩ayui妯″潡
});
--
Gitblit v1.9.1