From fc69a1e9655df3e8a01dc36ea2742c99f4a651ed Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 17 一月 2024 13:22:08 +0800
Subject: [PATCH] 特批申请单:数据校验 销售订单:维护页面增加字段 销售出库关联数量、销售出库未关联数量、生产关联数量、生产未关联数量
---
WebTM/views/采购管理/采购订单/Cg_POOrderBillList.html | 866 +++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 740 insertions(+), 126 deletions(-)
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html"
index b323663..b70cd05 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillList.html"
@@ -15,6 +15,8 @@
<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>
</head>
<body>
<div class="layui-fluid">
@@ -30,13 +32,22 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鍙戝竷鐘舵��</label>
+ <label class="layui-form-label">鍒嗛厤鐘舵��</label>
<div class="layui-input-block">
<select name="HStatus" lay-filter="HStatus" style="width:190px;">
- <option value="-1" selected="selected">鍏ㄩ儴</option>
- <option value="1">鏈垎閰�</option>
- <option value="2">宸插垎閰�</option>
- <option value="3">宸插彂甯�</option>
+ <option value="" selected="selected">鍏ㄩ儴</option>
+ <option value="鏈垎閰�">鏈垎閰�</option>
+ <option value="宸插垎閰�">宸插垎閰�</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鍙戝竷鐘舵��</label>
+ <div class="layui-input-block">
+ <select name="HStatus2" lay-filter="HStatus2" style="width:190px;">
+ <option value="" selected="selected">鍏ㄩ儴</option>
+ <option value="鏈彂甯�">鏈彂甯�</option>
+ <option value="宸插彂甯�">宸插彂甯�</option>
</select>
</div>
</div>
@@ -52,17 +63,27 @@
<input type="date" class="layui-input" id="HEndDate" style="width:190px;">
</div>
</div>
-
+ <div class="layui-inline">
+ <label class="layui-form-label">鍗曟嵁鍙�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HBillno2" id="HBillno2" style="width:190px;">
+ </div>
+ </div>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding:0 5px">閲嶆柊鍚屾</button>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">缁勭粐</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <select name="HOrgID" id="HOrgID" lay-verify="HOrgID">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </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">
- <div class="layui-inline">
- <span>鍏朵粬鏉′欢></span>
- </div>
- </div>
<div class="layui-inline">
<label class="layui-form-label">鍗曟嵁鍙�</label>
<div class="layui-input-block">
@@ -70,13 +91,119 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">渚涘簲鍟嗕俊鎭�</label>
- <div class="layui-input-inline">
- <input type="text" name="HSupName" id="HSupName" readonly class="layui-input" value="" style="float:left;width:150px;">
- <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="" style="float:left;width:150px;">
- <button type="button" lay-submit="" class="layui-btn" lay-filter="Department" style="width:40px;">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
- </button>
+ <label class="layui-form-label">涓氬姟鍛�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HEmpName" id="HEmpName" style="width:190px;">
+ </div>
+ </div>
+ <!--<div class="layui-inline">
+ <label class="layui-form-label">涓氬姟鍛�</label>
+ <div class="layui-input-block" style="width:190px;">
+ <select name="HEmpName" lay-filter="HEmpName" id="HEmpName">
+ <option value="">鍏ㄩ儴</option>
+ <option value="鏉庣編闇�">鏉庣編闇�</option>
+ <option value="寰愬阀涔�">寰愬阀涔�</option>
+ <option value="鏃舵枃浠�">鏃舵枃浠�</option>
+ <option value="姹熸闃�">姹熸闃�</option>
+ <option value="鏄撴柊绾�">鏄撴柊绾�</option>
+ </select>
+ </div>
+ </div>-->
+ <div class="layui-inline">
+ <label class="layui-form-label">鍗忓悓鐘舵��</label>
+ <div class="layui-input-block">
+ <select name="HXTStatus" lay-filter="HXTStatus" style="width:190px;">
+ <option value="" selected>鍏ㄩ儴</option>
+ <option value="鏈‘璁�">鏈‘璁�</option>
+ <option value="宸茬‘璁�">宸茬‘璁�</option>
+ </select>
+ </div>
+ </div>
+ <!--<div class="layui-inline">
+ <label class="layui-form-label">鍙嶉鐘舵��</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HXTFKStatus" id="HXTFKStatus" style="width:190px;">
+ </div>
+ </div>-->
+ <div class="layui-inline">
+ <label class="layui-form-label">鐗╂枡缂栫爜</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HMaterShortNumber" id="HMaterShortNumber" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鐗╂枡浠g爜</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鏃х墿鏂欑紪鐮�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HOldMaterNumber" id="HOldMaterNumber" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鐗╂枡鍚嶇О</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">渚涘簲鍟�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HSupName" id="HSupName" style="width:190px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鍙嶉鐘舵��</label>
+ <div class="layui-input-block" style="width:190px;">
+ <select name="HFeedback" lay-filter="HFeedback">
+ <option value="" selected>鍏ㄩ儴</option>
+ <option value="鎺ユ敹">鎺ユ敹</option>
+ <option value="澶囨枡">澶囨枡</option>
+ <option value="鐢熶骇">鐢熶骇</option>
+ <option value="鍙戣揣">鍙戣揣</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">瀹屾垚鐘舵��</label>
+ <div class="layui-input-block" style="width:190px;">
+ <select name="HFinishStatus" lay-filter="HFinishStatus">
+ <option value="" selected>鍏ㄩ儴</option>
+ <option value="鏈畬鎴�" selected>鏈畬鎴�</option>
+ <option value="宸插畬鎴�">宸插畬鎴�</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
+ <div class="layui-row" style="margin-top:5px">
+ <div class="layui-inline">
+ <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>
@@ -85,17 +212,25 @@
<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-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>-->
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fp"><i class="layui-icon layui-icon-tips"></i>鍒嗛厤</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fb"><i class="layui-icon layui-icon-tips"></i>鍙戝竷</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-yxj"><i class="layui-icon layui-icon-tips"></i>浼樺厛绾�</button>
-
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fp" id="fp"><i class="layui-icon layui-icon-tips"></i>鍒嗛厤</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-fb" id="fb"><i class="layui-icon layui-icon-tips"></i>鍙戝竷</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="back"><i class="layui-icon layui-icon-close-fill"></i>鎾ら攢</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-yxj" id="yxj"><i class="layui-icon layui-icon-tips"></i>浼樺厛绾�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view" id="view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="CheckBill"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="AbandonCheck"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close" id="Close"><i class="layui-icon layui-icon-radio"></i>鍏抽棴</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeClose" id="DeClose"><i class="layui-icon layui-icon-radio"></i>鍙嶅叧闂�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Drop" id="Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeDrop" id="DeDrop"><i class="layui-icon layui-icon-radio"></i>鍙嶄綔搴�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
</div>
</script>
</form>
@@ -108,7 +243,7 @@
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
//#region 鍏叡鍙橀噺
var $ = layui.$
, admin = layui.admin
@@ -119,18 +254,22 @@
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ , soulTable = layui.soulTable
//鏌ヨ鏉′欢
var sWhere = "";
var option = [];
var Name = "MouldProdInHouseCellWidth";
+ var HModName = "Cg_POOrderBillList";
+ //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ var titleData = ["hmainid","HBillType", "HSupID", "HPSStyleID", "HSSID", "HCurID", "HDeptID", "HManagerID", "HEmpID", "hsubid", "HMaterID", "HUnitID",
+ "HFeedback", "HPriority", "HUserID"];
//#endregion
//#region 杩涘叆椤甸潰鏃㈠姞杞�
- //鍒濆鍖栬〃鏍�
- set_InitGrid();
- //鍔犺浇鏁版嵁鍒扮綉鏍�
- get_Display(sWhere);
+ set_ClearBill();
//#endregion
+ //鑾峰彇缁勭粐
+ Organ();
//#region 鐐瑰嚮浜嬩欢鍖呮嫭on form浜嬩欢绛�
//澶村伐鍏锋爮浜嬩欢
@@ -154,7 +293,30 @@
//鍒锋柊
case 'get_Refresh': set_Refresh();
break;
-
+ //瀹℃牳鎸夐挳
+ case 'btn-Audit':
+ set_CheckBill(1);
+ break;
+ //鍙嶅鏍告寜閽�
+ case 'btn-DeAudit':
+ set_CheckBill(2);
+ break;
+ //鍏抽棴鎸夐挳 锛�1:鍏抽棴銆�2:鍙嶅叧闂級
+ case 'btn-Close':
+ set_CloseBill(1);
+ break;
+ //鍙嶅叧闂寜閽�
+ case 'btn-DeClose':
+ set_CloseBill(2);
+ break;
+ //浣滃簾鎸夐挳 锛�1:浣滃簾銆�2:鍙嶄綔搴燂級
+ case 'btn-Drop':
+ set_DropBill(1);
+ break;
+ //鍙嶄綔搴熸寜閽�
+ case 'btn-DeDrop':
+ set_DropBill(2);
+ break;
//閫�鍑�
case 'get_Exit': Pub_Close(2);
break;
@@ -167,18 +329,55 @@
//浼樺厛绾�
case 'btn-yxj': set_Yxj();
break;
+ case 'btn-back': set_Back();
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn': get_HideColumn();
+ break;
+ //鎸夐挳璁剧疆
+ case 'set_HideButton':
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "1102";
+ get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+ break;
};
});
+ //閲嶆柊鍚屾鎸夐挳
+ form.on('submit(btnResCnz)', function (data) {
+ set_ResCnz();
+ });
//閲嶇疆鎸夐挳
form.on('submit(btnReSearch)', function (data) {
set_ClearQuery();
});
+ //鑾峰彇缁勭粐
+ function Organ() {
+ //鑾峰彇鐧诲綍椤电粍缁囧垪
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Web/GetOrganizations",
+ success: function (result) {
+ var Organization = "";
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
+ }
+ $("#HOrgID").append(Organization);
+ $("#HOrgID").val(sessionStorage["OrganizationID"])
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+
//鏌ヨ鎸夐挳
form.on('submit(btnSearch)', function (data) {
- get_FastQuery(table, option);
+ get_FastQuery(table, option,2);
});
//琛ㄥご淇℃伅閮ㄩ棬寮圭獥
@@ -222,23 +421,67 @@
//#region 姝ら〉闈㈡墍鏈夋柟娉�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ //鐩存帴鎵ц鍒楄〃绛涢�� 鍔犺浇鏁版嵁鍒扮綉鏍�
+ get_FastQuery(table, option,1)
+ //鍔犺浇涓氬姟鍛�
+ //get_HEmpName();
+ //闅愯棌鍕鹃�夊瓧娈�
+ DisPlay_HideColumn();
+
+ //浠绘剰瀛楁杩囨护涓嬫媺妗嗗垵濮嬪寲
+ ColFilter();
+ }
//鍒濆鍖栬〃鏍�
function set_InitGrid() {
- $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+ $("#HBeginDate").val("2022-03-14");
$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
var columns = [
{ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' }
,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true }
, { field: '鏃ユ湡', title: '鏃ユ湡', width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 150 }
- , { field: 'HBillType', title: 'HBillType', hide: true }
- , { field: 'HSupID', title: 'HSupID', hide: true }
- , { field: '涓氬姟鐘舵��', title: '涓氬姟鐘舵��', width: 100 }
- , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 120}
- , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 100 }
- , { field: '涓氬姟鍛樹唬鐮�', title: '涓氬姟鍛樹唬鐮�', width: 100 }
+ , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 150 }
, { field: '涓氬姟鍛�', title: '涓氬姟鍛�', width: 100 }
- , { field: 'HPriority', title: 'HPriority', width: 100, hide: true }
+ //, { field: 'HBillType', title: 'HBillType', hide: true }
+ //, { field: 'HSupID', title: 'HSupID', hide: true }
+ //, { field: '涓氬姟鐘舵��', title: '涓氬姟鐘舵��', width: 100, hide: true }
+ , { field: '鍒嗛厤鐘舵��', title: '鍒嗛厤鐘舵��', width: 100 }
+ , { field: '鍙戝竷鐘舵��', title: '鍙戝竷鐘舵��', width: 100 }
+ , { field: '渚涘簲鍟嗗崗鍚岀姸鎬�', title: '渚涘簲鍟嗗崗鍚岀姸鎬�', width: 135 }/*鐗╂枡浠g爜锛岀墿鏂欏悕绉帮紝瑙勬牸鍨嬪彿锛屾壒鍙凤紝鏁伴噺锛屽崟浣嶏紝婧愬崟鍗曞彿*/
+ , { field: '鍙嶉鐘舵��', title: '渚涘簲鍟嗗弽棣堢姸鎬�', width: 135 }
+ , { field: '鐗╂枡缂栫爜', title: '鐗╂枡缂栫爜', width: 120 }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 130 }
+ , { field: '鏃х墿鏂欑紪鐮�', title: '鏃х墿鏂欑紪鐮�', width: 130 }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 130 }
+ , { field: '鏁伴噺', title: '璁㈠崟鏁伴噺', width: 100 }
+ , { field: '鎵撳嵃鏉$爜鏁伴噺', title: '鎵撳嵃鏉$爜鏁伴噺', width: 120 }
+ /* 瀹夌憺鏂板瀛楁 begin */
+ , { field: '鍙墦鍗版潯鐮佹暟閲�', title: '鍙墦鍗版潯鐮佹暟閲�', width: 120 }
+ /* 瀹夌憺鏂板瀛楁 end */
+ , { field: '鍏宠仈鏁伴噺', title: '宸插彂璐ф暟閲�', width: 120 }
+ , { field: '鏈叧鑱旀暟閲�', title: '鍙彂璐ф暟閲�', width: 120 }
+ /* 瀹夌憺鏂板瀛楁 begin */
+ , { field: '閫�鏂欐暟閲�', title: '閫�鏂欐暟閲�', width: 120 }
+ , { field: '瀹炴敹鏁伴噺', title: '瀹炴敹鏁伴噺', width: 120 }
+ , { field: '鍏ュ簱鏁伴噺', title: '鍏ュ簱鏁伴噺', width: 120 }
+ , { field: '鍓╀綑鍏ュ簱鏁伴噺', title: '鍓╀綑鍏ュ簱鏁伴噺', width: 120 }
+ , { field: '鍓╀綑鏀舵枡鏁伴噺', title: '鍓╀綑鏀舵枡鏁伴噺', width: 120 }
+ /* 瀹夌憺鏂板瀛楁 end */
+ , { field: '瀹屾垚鐘舵��', title: '瀹屾垚鐘舵��', width: 100 }
+ , { field: 'HUnitID', title: 'HUnitID', hide: true }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
+ //, { field: 'HUnitID', title: 'HUnitID', hide: true } 閲嶅
+ , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 120 }
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100 }
+ , { field: '鎵瑰彿', title: '鎵瑰彿', width: 100 }
+ , { field: '鏁伴噺', title: '鏁伴噺', width: 100 }
+ , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 100 }
+ //, { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 120, hide: true}
+ //, { field: '涓氬姟鍛樹唬鐮�', title: '涓氬姟鍛樹唬鐮�', width: 100, hide: true}
+ //, { field: 'HPriority', title: 'HPriority', width: 100, hide: true }
, { field: '浼樺厛绾�', title: '浼樺厛绾�', width: 100 }
, { field: '浜よ揣鍦扮偣', title: '浜よ揣鍦扮偣', width: 100}
, { field: 'HPSStyleID', title: 'HPSStyleID', hide: true }
@@ -263,21 +506,12 @@
, { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', width: 100}
, { field: 'hsubid', title: 'hsubid', hide: true }
, { field: 'HMaterID', title: 'HMaterID', hide: true }
- , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 100}
- , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 100}
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100}
- , { field: '鎵瑰彿', title: '鎵瑰彿', width: 100}
- , { field: 'HUnitID', title: 'HUnitID', hide: true }
- , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 120}
- , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100}
- , { field: '鏁伴噺', title: '鏁伴噺', width: 100}
, { field: '鍗曚环', title: '鍗曚环', width: 100}
, { field: '閲戦', title: '閲戦', width: 100}
, { field: '绋庣巼', title: '绋庣巼', width: 100}
, { field: '绋庨', title: '绋庨', width: 100}
, { field: '浠风◣鍚堣', title: '浠风◣鍚堣', width: 100}
, { field: '浜よ揣鏃ユ湡', title: '浜よ揣鏃ユ湡', width: 120, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.浜よ揣鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
- , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 100}
, { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�', width: 100}
, { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 100}
, { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 100}
@@ -298,12 +532,12 @@
, page: true
, cellMinWidth: 120
, totalRow: true
- , limit: 10
+ , limit: 500
, height: 'full-50'
, cols: [columns]
- , limits: [50, 500, 1000, 5000]
+ , limits: [500, 5000, 20000]
, done: function (res, curr, count) {
-
+ soulTable.render(this);
}
};
////璁剧疆鍒楀
@@ -319,31 +553,71 @@
}
//鍔犺浇缃戞牸
function get_Display(sWhere) {
- var wait = layer.load();//閬僵
- var HBeginDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
- var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
- if (HBeginDate) {
- sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HBeginDate + "'";
- }
- if (HEndDate) {
- sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HEndDate + "'";
- }
+ var ajaxLoad = layer.load();
$.ajax({
url: GetWEBURL() + '/Cg_POOrderBill/list',
type: "GET",
- data: { "sWhere": sWhere, "user": sessionStorage["HUserName"],},
+ data: { "sWhere": sWhere , "user": sessionStorage["HUserName"]},
success: function (data1) {
if (data1.count == 1) {
- DataList = data1.data;
- option.data = data1.data;
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+ }
+ }
+
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , cols: [col]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
table.render(option);
- layer.close(wait);
+
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+
+ //鍒锋柊鎸夐挳鏄剧ず
+ var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ var HBillType = "1102";
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+ layer.close(ajaxLoad);
+ //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
} else {
- layer.close(wait);
- layer.alert(data1.Message, { icon: 5 });
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
}
}, error: function () {
- layer.close(wait);
+ layer.close(ajaxLoad);
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
@@ -358,7 +632,7 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- content: '../妯℃不鍏蜂粨搴撶鐞�/Sc_MouldProdInBillEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1',
+ content: './Cg_POOrderBillEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1',
end: function () {
//鍒锋柊椤甸潰,
get_FastQuery(table, option);
@@ -378,12 +652,12 @@
layer.open({
type: 2
, area: ['100%', '100%']
- , title: '缂栬緫鍣ㄥ叿閲囪喘鍏ュ簱鍗�'
+ , title: '缂栬緫閲囪喘璁㈠崟'
, closeBtn: 1
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: '../妯℃不鍏蜂粨搴撶鐞�/Sc_MouldProdInBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
+ , content: './Cg_POOrderBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
, resize: false,
end: function () {
get_FastQuery(table, option);
@@ -407,8 +681,8 @@
var wait = layer.load();
$.ajax({
type: "GET",
- url: GetWEBURL() + "/Sc_MouldProdInBill/set_DeleteBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
+ url: GetWEBURL() + "/Cg_POOrderBill/DeltetCg_POOrderBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -461,7 +735,17 @@
function get_PrintReport() {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
- if (checkStatus.data.length === 1) {
+
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁鎵撳嵃锛�');
+ }
+ else {
+
+ var hmainid = [];
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ hmainid.push((data[i].hmainid * (10 ** 8)) + data[i].hsubid)
+ }
+
layer.open({
type: 2
, area: ['50%', '50%']
@@ -469,27 +753,23 @@
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdInBill', 'yes']
+ , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + hmainid.toString() + '&MyMsg=' + hmainid.toString() + '&Type=HPOOrderBill', 'yes']
, resize: false
})
}
- else {
- layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
- }
}
- //瀹℃牳
- function set_CheckBill() {
+ //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
+ function set_CheckBill(num) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
var InterID = data[0].hmainid.toString();
//閫昏緫瀹℃牳鏂规硶
- var wait = layer.load();
$.ajax({
type: "GET",
- url: GetWEBURL() + "/Sc_MouldProdInBill/set_CheckBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
+ url: GetWEBURL() + "/Cg_POOrderBill/AuditCg_POOrderBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -498,14 +778,13 @@
//鍏抽棴褰撳墠frame
layer.close(index);
//淇敼涓哄姛鍚庡埛鏂扮晫闈�
- get_FastQuery(table, option);
+ $("#btnSearch").trigger('click');
});
+
} else {
- layer.alert(result.Message, { icon: 5 });
+ layer.alert(result.code + result.Message, { icon: 5 });
}
- layer.close(wait);
}, error: function () {
- layer.close(wait);
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
@@ -514,18 +793,19 @@
layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
}
}
- //鍙嶅鏍�
- function set_AbandonCheck() {
+ //#endregion
+
+ //#region 鍙嶅叧闂�/鍏抽棴鏁版嵁
+ function set_CloseBill(num) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
var InterID = data[0].hmainid.toString();
//閫昏緫瀹℃牳鏂规硶
- var wait = layer.load();
$.ajax({
type: "GET",
- url: GetWEBURL() + "/Sc_MouldProdInBill/set_AbandonCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
+ url: GetWEBURL() + "/Cg_POOrderBill/CloseCg_POOrderBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] },
success: function (result) {
if (result.count == 1) {
layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -534,24 +814,58 @@
//鍏抽棴褰撳墠frame
layer.close(index);
//淇敼涓哄姛鍚庡埛鏂扮晫闈�
- get_FastQuery(table, option);
+ $("#btnSearch").trigger('click');
});
} else {
layer.alert(result.code + result.Message, { icon: 5 });
}
- layer.close(wait);
}, error: function () {
- layer.close(wait);
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
}
else {
- layer.msg('璇烽�夋嫨涓�琛屾暟鎹弽瀹℃牳锛�');
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
}
-
}
+ //#endregion
+
+ //#region 鍙嶄綔搴�/浣滃簾鏁版嵁
+ function set_DropBill(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Cg_POOrderBill/DropCg_POOrderBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "Type": num, "user": sessionStorage["HUserName"] },
+ 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);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹鏍革紒');
+ }
+ }
+ //#endregion
//鑾峰彇鍒楀
@@ -669,10 +983,7 @@
function set_CopyBill() {
}
- //鍏抽棴鍗曟嵁
- function set_CloseBill() {
- }
//鍙嶅叧闂崟鎹�
function set_CancelCloseBill() {
@@ -730,7 +1041,7 @@
data: { "Hmainid": hmainid, "HSupplierId": HSupplierId },
success: function (data1) {
if (data1.Message.indexOf("鎴愬姛") > 0) {
- layer.msg("鍙戝竷鎴愬姛", { time: 3 * 1000, icon: 1 }, function () {
+ layer.msg("鍒嗛厤鎴愬姛", { time: 3 * 1000, icon: 1 }, function () {
var index = layer.getFrameIndex(window.name);
//鍏抽棴褰撳墠frame
layer.close(index);
@@ -759,7 +1070,6 @@
}
-
//鍙戝竷
function set_Release() {
var hmainid = '';
@@ -785,6 +1095,45 @@
success: function (data1) {
if (data1.Message.indexOf("鎴愬姛") > 0) {
layer.msg("鍙戝竷鎴愬姛", { time: 1 * 1000, icon: 1 }, function () {
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+ } else {
+ layer.alert(data1.Message, { icon: 5 });
+ }
+ }, error: function (e) {
+ layer.alert(data1.Message, { icon: 5 });
+ }
+ });
+ }
+
+ //鎾ら攢
+ function set_Back() {
+ var hmainid = '';
+ var checkStatus = table.checkStatus('mainTable'),
+ data = checkStatus.data;
+ if (checkStatus.data.length == 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ for (var i = 0; i < data.length; i++) {
+ hmainid += data[i]["hmainid"] + ',';
+ if (data[i]["涓氬姟鐘舵��"] != "宸插彂甯�") {
+ return layer.msg('鍗曟嵁鍙凤細' + data[i]["鍗曟嵁鍙�"] + '鏈彂甯�');
+ }
+ if (data[i]["渚涘簲鍟嗗崗鍚岀姸鎬�"] != "鏈‘璁�") {
+ return layer.msg('鍗曟嵁鍙凤細' + data[i]["鍗曟嵁鍙�"] + '锛屼緵搴斿晢宸茬‘璁�');
+ }
+ }
+ hmainid = hmainid.substring(0, hmainid.length - 1)
+ $.ajax({
+ url: GetWEBURL() + '/Cg_POOrderBill/Back',
+ async: false,
+ type: "GET",
+ dataType: "json",
+ data: { "Hmainid": hmainid },
+ success: function (data1) {
+ if (data1.Message.indexOf("鎴愬姛") > 0) {
+ layer.msg("鎿嶄綔鎴愬姛", { time: 1 * 1000, icon: 1 }, function () {
//淇敼涓哄姛鍚庡埛鏂扮晫闈�
window.location.reload();
});
@@ -870,28 +1219,62 @@
}
//蹇�熻繃婊�
- function get_FastQuery(table, option) {
- var HStatus = $("select[name='HStatus']").val();//鐘舵��
+ function get_FastQuery(table, option,number) {
+ var HStatus = $("select[name='HStatus']").val();//
+ var HStatus2 = $("select[name='HStatus2']").val();//
var HBeginDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
var HBillNo = $("#HBillNo").val(); //鍗曟嵁鍙�
- var HSupID = $("#HSupID").val(); //渚涘簲鍟嗕俊鎭�
- if (HStatus) {
- switch (HStatus) {
- case '-1': //鍏ㄩ儴
- sWhere += "";
- break;
- case '1': //鏈垎閰�
- sWhere += " and 涓氬姟鐘舵��='鏈垎閰�'";
- break;
- case '2': //宸插鏍�
- sWhere += " and 涓氬姟鐘舵��='宸插垎閰�'";
- break;
- case '3': //宸插叧闂�
- sWhere += " and 涓氬姟鐘舵��='宸插彂甯�'";
- default:
+ var HEmpName = $("#HEmpName").val();
+ var HMaterNumber = $("#HMaterNumber").val();
+ var HMaterShortNumber = $("#HMaterShortNumber").val();
+ var HMaterName = $("#HMaterName").val();
+ var HXTStatus = $("select[name='HXTStatus']").val();
+ //var HXTFKStatus = $("#HXTFKStatus").val();
+ var HSupName = $("#HSupName").val();//渚涘簲鍟�
+ var HFeedback = $("select[name='HFeedback']").val(); //渚涘簲鍟嗗弽棣堢姸鎬�
+ var HFinishStatus = $("select[name='HFinishStatus']").val(); //瀹屾垚鐘舵��
+ var HOldMaterNumber = $("#HOldMaterNumber").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 (number == 1) {
+ HOrgID = sessionStorage["OrganizationID"];
+ }
+ else {
+ HOrgID = $("#HOrgID").val();//缁勭粐
+ }
+ if (HOldMaterNumber) {
+ sWhere += " and 鏃х墿鏂欑紪鐮� like '%" + HOldMaterNumber + "%'";
+ }
+ if (HStatus) {
+ sWhere += " and 鍒嗛厤鐘舵�� like '%" + HStatus + "%'";
+ }
+ if (HStatus2) {
+ sWhere += " and 鍙戝竷鐘舵�� like '%" + HStatus2 + "%'";
}
if (HBeginDate) {
sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HBeginDate + "'";
@@ -902,9 +1285,40 @@
if (HBillNo) {
sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
}
- if (HSupID) {
- sWhere += " and HSupID = '" + HSupID + "'";
+ if (HMaterShortNumber) {
+ sWhere += " and 鐗╂枡缂栫爜 like '%" + HMaterShortNumber + "%'";
}
+ if (HMaterNumber) {
+ sWhere += " and 鐗╂枡浠g爜 like '%" + HMaterNumber + "%'";
+ }
+ if (HMaterName) {
+ sWhere += " and 鐗╂枡鍚嶇О like '%" + HMaterName + "%'";
+ }
+ if (HEmpName) {
+ sWhere += " and 涓氬姟鍛� like '%" + HEmpName + "%'";
+ }
+ if (HXTStatus) {
+ sWhere += " and 渚涘簲鍟嗗崗鍚岀姸鎬� like '%" + HXTStatus + "%'";
+
+ }
+ //if (HXTFKStatus) {
+ // sWhere += " and 鍙嶉鐘舵�� like '%" + HXTFKStatus + "%'";
+
+ //}
+ if (HSupName) {
+ sWhere += " and 渚涘簲鍟� like '%" + HSupName + "%'";
+
+ }
+ if (HFeedback) {
+ sWhere += " and 鍙嶉鐘舵�� like '%" + HFeedback + "%'";
+
+ }
+ if (HFinishStatus) {
+ sWhere += " and 瀹屾垚鐘舵�� like '%" + HFinishStatus + "%'";
+
+ }
+ //娣诲姞鏌ヨ鏉′欢锛屾牴鎹綋鍓嶇櫥褰曠敤鎴峰叧鑱旇亴鍛樿繑鍥炴暟鎹�
+ //sWhere += " and HUserID =" + sessionStorage["Czybm"]
var index = layer.load(0);
get_Display(sWhere);
//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
@@ -916,17 +1330,217 @@
$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
$("#HBillNo").val("");
+ $("#HEmpName").val("");
+ $("#HMaterNumber").val("");
+ $("#HOldMaterNumber").val("");
+ $("#HMaterShortNumber").val("");
+ $("#HMaterName").val("");
$("#HSupName").val("");
- $("#HSupID").val("");
+ $("#HOrgID").val(sessionStorage["OrganizationID"]);
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ $("select[name='HFeedback']").val("");
+ form.render('select');
sWhere = "";
get_Display(sWhere);
}
+ //閲嶆柊鍚屾鎸夐挳
+ function set_ResCnz() {
+ var HBillno2 = $('#HBillno2').val();
+ $.ajax({
+ url: GetWEBURL() + '/Cg_POOrderBill/Cg_POOrderBillViewApi',
+ type: "GET",
+ data: { "BillNo": HBillno2,"BillType":1102 },
+ 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.close(wait);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
//#endregion
//鍒锋柊
function set_Refresh() {
$("#btnSearch").click();
}
+ //鑾峰彇涓氬姟鍛樻暟鎹�
+ function get_HEmpName() {
+ var HEmpName= '<option value="">鍏ㄩ儴</option>';
+ $.ajax({
+ type: "get",
+ url: GetWEBURL() + "/Web/GetEmployeeList_Json",
+ data: { "Employee": '', "HGroupID": 0},
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ HEmpName += '<option value="' + data[i].HName + '">' + data[i].HName + '</option>';
+ }
+ $("#HEmpName").append(HEmpName);
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ var contentUrl = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["title"] + ",";
+ }
+ var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+ var urlLen = urlStr.split('/');
+ for (var i = 0; i < urlLen.length - 4; i++) {
+ contentUrl += "../";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+ contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: [contentUrl, "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 = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = ["hmainid", "HBillType", "HSupID", "涓氬姟鐘舵��", "HUnitID", "渚涘簲鍟嗕唬鐮�", "涓氬姟鍛樹唬鐮�", "HPriority", "HPSStyleID", "HSSID", "HCurID", "HDeptID", "HManagerID", "HEmpID", "hsubid","HMaterID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ if(dataCol[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 = "1102";
+ Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
+
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+
+ //#region 浠绘剰瀛楁杩囨护锛氬垪鍚嶆樉绀轰笅鎷夋
+ 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');
+ }
+ //#endregion
+
+
//浠ヤ笂鏄痩ayui妯″潡
});
</script>
--
Gitblit v1.9.1