From a5e8fb4e50f285538ad6800d5abdb66ea367db00 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 14 一月 2026 10:59:42 +0800
Subject: [PATCH] 添康获取多车间订单排产;小卫彩盒SN校验标题调整;过站解绑列表添加日期区间过滤;香囊标签打印,添加暂停打印,继续打印功能
---
WebTM/views/车间管理/产线/MES_ProductionLinePackagingList.html | 526 ++++++++++++++++++++++++++++++++--------------------------
1 files changed, 288 insertions(+), 238 deletions(-)
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\344\272\247\347\272\277/MES_ProductionLinePackagingList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\344\272\247\347\272\277/MES_ProductionLinePackagingList.html"
index 0c54204..d8d09d9 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\344\272\247\347\272\277/MES_ProductionLinePackagingList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\344\272\247\347\272\277/MES_ProductionLinePackagingList.html"
@@ -8,8 +8,13 @@
<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/grwebapp.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/MESLanguage.js"></script>
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
<style>
.layui-form-select .layui-input {
padding-right: 0px;
@@ -26,29 +31,36 @@
<div class="layui-colla-item">
<div class="layui-colla-title layui-inline">
<div class="layui-inline">
- <span>鏇村</span>
+ <span id="BT_GD">鏇村</span>
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鍞竴鏉$爜</label>
+ <label class="layui-form-label" id="BT_HBarCode_Pack">鍞竴鏉$爜</label>
<div class="layui-input-block">
<input type="text" class="layui-input" name="HBarCode_Pack" id="HBarCode_Pack">
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鍗曟嵁鍙�</label>
+ <label class="layui-form-label" id="BT_HBillNo">鍗曟嵁鍙�</label>
<div class="layui-input-block">
<input type="text" class="layui-input" name="鍗曟嵁鍙�" id="鍗曟嵁鍙�">
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鏉$爜绫诲瀷</label>
+ <label class="layui-form-label" id="BT_HBardcodeType">鏉$爜绫诲瀷</label>
<div class="layui-input-block">
- <!--<input type="text" class="layui-input" name="tmlx" id="tmlx">-->
<select name=" tmlx" id="tmlx">
<option value="">鍏ㄩ儴</option>
<option value="娴佽浆鍗″彿">娴佽浆鍗″彿</option>
<option value="闀洉鏉$爜">闀洉鏉$爜</option>
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;" id="BT_HOrgName">缁勭粐鍚嶇О</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <select name="HOrgID" id="HOrgID" lay-verify="HOrgID" class="ForFilteringSchemes">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
</select>
</div>
</div>
@@ -58,53 +70,51 @@
<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-row" style="margin-top: 5px; margin-left: 4%;">
<div class="layui-inline">
- <span>鍏朵粬鏉′欢></span>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">鐢熶骇浠诲姟鍗�</label>
- <div class="layui-input-block">
- <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">鍒跺崟浜�</label>
- <div class="layui-input-block">
- <input type="text" class="layui-input" name="HMaker" id="HMaker">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">鏉$爜</label>
- <div class="layui-input-block">
- <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">鏃ユ湡闂撮殧</label>
- <div class="layui-input-block">
- <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
- </select>
- </div>
- </div>
- <div class="layui-row" style="padding: 10px 0; margin-left: 4%;">
- <div class="layui-inline">
- <label class="layui-form-label">鏃ユ湡</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 75px;">
+ <label class="layui-form-label" id="BT_HBillNo">鐢熶骇浠诲姟鍗�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">-</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 75px;">
+ <label class="layui-form-label" id="BT_HMaker">鍒跺崟浜�</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HMaker" id="HMaker">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" id="BT_HICMOBillNo">鏉$爜</label>
+ <div class="layui-input-block">
+ <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo">
</div>
</div>
</div>
<div class="layui-row" style="margin-top: 5px; margin-left: 4%;">
<div class="layui-inline">
- <label class="layui-form-label">杩囨护</label>
+ <label class="layui-form-label" id="BT_HInitTimeCycle">鏃ユ湡闂撮殧</label>
+ <div class="layui-input-block">
+ <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" id="BT_HBeginDate">寮�濮嬫棩鏈�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="date" class="layui-input" lay-verify="HBeginDate" name="HBeginDate" id="HBeginDate" style="padding-left: 75px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="date" class="layui-input" lay-verify="HEndDate" name="HEndDate" id="HEndDate" style="padding-left: 75px;">
+ </div>
+ </div>
+ </div>
+
+ <div class="layui-row" style="margin-top: 5px; margin-left: 4%;">
+ <div class="layui-inline">
+ <label class="layui-form-label" id="BT_ColName">杩囨护</label>
<div class="layui-input-block">
<select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
</select>
@@ -131,7 +141,7 @@
</div>
<div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
<div class="layui-inline">
- <label class="layui-form-label">杩囨护</label>
+ <label class="layui-form-label" id="BT_ColName1">杩囨护</label>
<div class="layui-input-block">
<select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
</select>
@@ -159,7 +169,7 @@
<div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
<div class="layui-inline">
- <label class="layui-form-label">杩囨护</label>
+ <label class="layui-form-label" id="BT_ColName2">杩囨护</label>
<div class="layui-input-block">
<select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
</select>
@@ -185,32 +195,6 @@
</div>
</div>
</div>
-
- <!--<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">
- <input type="text" class="layui-input" name="hname" id="hname">
- </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="hnumber" id="hnumber">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">瑙勬牸鍨嬪彿</label>
- <div class="layui-input-block">
- <input type="text" class="layui-input" name="hmodel" id="hmodel">
- </div>
- </div>
- </div>-->
</div>
</div>
<table class="layui-form-item" id="mainTable" lay-filter="mainTable"></table>
@@ -222,8 +206,14 @@
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="Print1" id="Print1">
<i class="layui-icon layui-icon-file"></i>鏅彶鐗规墦鍗�
</button>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="WhiteSave" id="WhiteSave">
+ <i class="layui-icon layui-icon-file"></i>鐧芥爣鐢熸垚
+ </button>
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="BtnDel" id="BtnDel">
<i class="layui-icon layui-icon-file"></i>鍒犻櫎
+ </button>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="BtnGX" id="BtnGX">
+ <i class="layui-icon layui-icon-file"></i>鏁版嵁鏇存柊
</button>
</div>
</script>
@@ -232,10 +222,8 @@
</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/webConfig2.js"></script>
+
+
<script>
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
@@ -253,19 +241,22 @@
, util = layui.util;
//var sWhere = " 浜у搧浠g爜 = 'BX0002'";
var sWhere = "";
+ var HModName = "MES_ProductionLinePackagingList";
+ initFunction(1, HModName, sessionStorage["HTranSlate"]);
+ form.render('select');
var option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
- ,height: 'full-50'
+ , height: 'full-50'
, page: true
, limit: 50
, limits: [50, 500, 5000, 20000]
, cols: [[
- {type:'radio'}
+ { type: 'radio' }
, { field: 'HInterID', title: 'ID', sort: true, width: 100 }
, { field: '椤圭洰鍙�', title: '椤圭洰鍙�', sort: true, width: 100 }
- ,{ field: '鍞竴鏉$爜', title: '鍞竴鏉$爜', sort: true, width: 170 }
+ , { field: '鍞竴鏉$爜', title: '鍞竴鏉$爜', sort: true, width: 170 }
//, { field: '鎵爜鏃ユ湡', title: '鎵爜鏃ユ湡', sort: true, width: 200, templet: "<div>{{layui.util.toDateString(this.鎵爜鏃ユ湡, 'yyyy-MM-dd')}}</div> " }
, {
field: '鎵爜鏃ユ湡', title: '鍖呰鏃ユ湡', sort: true, width: 110, templet: function (d) {
@@ -305,80 +296,37 @@
}
};
+ table.render(option);
- //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
- layer.load(3);
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL1() + '/LEMS/MES_ProductionLinePackagingList_Json',
- type: "GET",
- data: { "sWhere": sWhere },
- success: function (data1) {
- if (data1.count == 1) {
- option.data = data1.data;
- table.render(option);
- if ($("#HInitTimeCycle").val() == 0 && $("#HInitTimeCycle").val() == "") {
- setSelect_HInitTimeCycle();
- }
-
- if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
- ColFilter();
- }
- layer.closeAll("loading");
- } else {
- layer.closeAll("loading");
- layer.alert(data1.code + data1.Message, { icon: 5 });
- }
- }, error: function () {
- layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
- }
- });
- //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉
- form.on('select(HInitTimeCycle)', function (data) {
- var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ set_ClearBill();
+
+
+
+ // 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栫粍缁�
+ Organ();
+ //鍒濆鍖栨棩鏈熼棿闅斻�佸紑濮嬫棩鏈熴�佺粨鏉熸棩鏈�
+ setSelect_HInitTimeCycle();
//鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
if (HInitTimeCycle != -1) {
$('#HBeginDate').prop('disabled', true);
$('#HEndDate').prop('disabled', true);
-
- $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
- $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
-
- //鎵ц鏌ヨ鏂规硶
- $("#btnSearch").click;
} else {
$('#HBeginDate').prop('disabled', false);
$('#HEndDate').prop('disabled', false);
}
- });
- //閲嶇疆鎸夐挳
- form.on('submit(btnReSearch)', function (data) {
- var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
- $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));//寮�濮嬫棩鏈�
- $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//缁撴潫鏃ユ湡
- $("#HBarCode_Pack").val("");//鍞竴鏉$爜
- $("#HICMOBillNo").val("");//鏉$爜
- $("#tmlx").val("");//鏉$爜绫诲瀷
- $("#HBillNo").val("");//鐢熶骇浠诲姟鍗曞崟鍙�
- $("#HMaker").val("");//鏁伴噺鍒跺崟浜�
- $("#鍗曟嵁鍙�").val("");//鍗曟嵁鍙�
- $("#ColContent").val("");
- $("#ColName").val("0");
- $("#Comparator").val("0");
- $("#ColContent1").val("");
- $("#ColName1").val("0");
- $("#Comparator1").val("0");
- $("#ColContent2").val("");
- $("#ColName2").val("0");
- $("#Comparator2").val("0");
+ //鏍规嵁鏃ユ湡闂撮殧璁剧疆寮�濮嬫椂闂翠笌缁撴潫鏃堕棿
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+ //鏌ヨ
+ get_FastQuery();
+ }
- form.render('select');
- $("#btnSearch").click();
- });
-
- //鏌ヨ鎸夐挳
- form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
+ //蹇�熸煡璇�
+ function get_FastQuery() {
var HBarCode_Pack = $("#HBarCode_Pack").val();//鍞竴鏉$爜
var HICMOBillNo = $("#HICMOBillNo").val();//鏉$爜
var tmlx = $("#tmlx").val();//鏉$爜绫诲瀷
@@ -387,16 +335,17 @@
var 鍗曟嵁鍙� = $("#鍗曟嵁鍙�").val();//鏁伴噺鍒跺崟浜�
var HBeginDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
+
var ColName = $("#ColName").val();//澶嶉�夋
var Comparator = $("#Comparator").val()
var ColContent = $("#ColContent").val();
-
var ColName1 = $("#ColName1").val();//澶嶉�夋
var Comparator1 = $("#Comparator1").val()
var ColContent1 = $("#ColContent1").val();
var ColName2 = $("#ColName2").val();//澶嶉�夋
var Comparator2 = $("#Comparator2").val()
var ColContent2 = $("#ColContent2").val();
+
if (ColName != 0 && Comparator != 0) {
var com = "";
switch (Comparator) {
@@ -417,7 +366,8 @@
break;
}
sWhere += " and " + ColName + " " + com;
- } if (ColName1 != 0 && Comparator1 != 0) {
+ }
+ if (ColName1 != 0 && Comparator1 != 0) {
var com1 = "";
switch (Comparator1) {
case "7":
@@ -479,15 +429,23 @@
sWhere += " and 鍗曟嵁鍙� like '%" + 鍗曟嵁鍙� + "%'";
}
if (HBeginDate != "") {
- sWhere += " and 鍒跺崟鏃ユ湡 >= '" + HBeginDate + "'";
+ sWhere += " and convert(varchar(10),鍒跺崟鏃ユ湡,120) >= '" + HBeginDate + "'";
}
if (HEndDate != "") {
- sWhere += " and 鍒跺崟鏃ユ湡 <= '" + HEndDate + "'";
+ sWhere += " and convert(varchar(10),鍒跺崟鏃ユ湡,120) <= '" + HEndDate + "'";
}
+ sWhere += getOrgIDByUser();//鐢ㄦ埛鍏宠仈缁勭粐鏌ヨ杩囨护
+
+
+ get_Display(sWhere);
+ sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
+
+ function get_Display(sWhere) {
$.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL1() + '/LEMS/MES_ProductionLinePackagingList_Json',
+ url: GetWEBURL() + '/LEMS/MES_ProductionLinePackagingList_Json',
type: "GET",
+ async: false,
data: { "sWhere": sWhere },
success: function (data1) {
if (data1.count == 1) {
@@ -497,99 +455,117 @@
if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
ColFilter();
}
- layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ layer.alert(get_MessageError("[0000-1-037]鏌ヨ鎴愬姛", sessionStorage["HTranSlate"]), { icon: 1 });
} else {
option.data = [];
table.render(option);
- layer.alert(data1.code + data1.Message, { icon: 5 });
+ layer.alert(get_MessageError(data1.code + data1.Message, sessionStorage["HTranSlate"]), { icon: 5 });
}
}, error: function () {
- layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+ layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
}
});
- sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ initFunction(1, HModName, sessionStorage["HTranSlate"]);
+ }
+
+
+
+ //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉
+ form.on('select(HInitTimeCycle)', function (data) {
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+ if (HInitTimeCycle != -1) {
+ $('#HBeginDate').prop('disabled', true);
+ $('#HEndDate').prop('disabled', true);
+
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+ //鎵ц鏌ヨ鏂规硶
+ $("#btnSearch").click;
+ } else {
+ $('#HBeginDate').prop('disabled', false);
+ $('#HEndDate').prop('disabled', false);
+ }
+ });
+
+ //閲嶇疆鎸夐挳
+ form.on('submit(btnReSearch)', function (data) {
+ $("#HOrgID").val(sessionStorage["Organization"])
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));//寮�濮嬫棩鏈�
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//缁撴潫鏃ユ湡
+ $("#HBarCode_Pack").val("");//鍞竴鏉$爜
+ $("#HICMOBillNo").val("");//鏉$爜
+ $("#tmlx").val("");//鏉$爜绫诲瀷
+ $("#HBillNo").val("");//鐢熶骇浠诲姟鍗曞崟鍙�
+ $("#HMaker").val("");//鏁伴噺鍒跺崟浜�
+ $("#鍗曟嵁鍙�").val("");//鍗曟嵁鍙�
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ $("#ColContent1").val("");
+ $("#ColName1").val("0");
+ $("#Comparator1").val("0");
+ $("#ColContent2").val("");
+ $("#ColName2").val("0");
+ $("#Comparator2").val("0");
+
+ form.render('select');
+ $("#btnSearch").click();
+ });
+
+ //鏌ヨ鎸夐挳
+ form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
+ get_FastQuery();
+
});
//鑾峰彇閫変腑琛屾暟鎹�
table.on('row(mainTable)', function (obj) {
//鏍囨敞閫変腑鏍峰紡
obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
});
-
- //鎵撳嵃
- //form.on('submit(Print)', function (obj) {//閫�鍑�
- // var checkStatus = table.checkStatus("mainTable"); //鑾峰彇閫変腑琛岀姸鎬�
- // var linterid = checkStatus.data[0].HInterID;
- // ////鎵撳紑鎵撳嵃妯℃澘
- // ////var linterid = $("#HInterID").val();
- // ////var linterid = "28973";
- // //var Type = "HBarCodePrint";
- // //var OpenTmp = "鍖呰鍗曠墿鏂欐爣璇嗗崱(缃戦〉鐗�)";
- // ////var ReportViewer = document.getElementById("ReportViewer");
- // //window.open("../../views/BaseSet/HBarPlanPrint.html?linterid=" + linterid.toString() + "&Type=" + Type.toString() + "&OpenTmp=" + OpenTmp.toString());
+
+ //鐧芥爣鐢熸垚淇濆瓨
+ form.on('submit(WhiteSave)', function (obj) {//閫�鍑�
+ var checkStatus = table.checkStatus("mainTable"); //鑾峰彇閫変腑琛岀姸鎬�
+ if (checkStatus.data.length == 1) {
+ var HBarCode_Pack = checkStatus.data[0].鍞竴鏉$爜;
+ layer.open({ //浣跨敤 layer鐨刼pen鎵撳紑寮瑰嚭 灞�
+ type: 2 //琛ㄧず寮瑰嚭灞傜殑鍐呭鏄竴涓� iframe
+ , area: ['100%', '100%']
+ , title: '鐧芥爣鎵撳嵃' //璁剧疆寮瑰嚭灞傜殑鍚嶅瓧鍜屽彉閲�
+ , closeBtn: 1//鏄剧ず鍏抽棴鎸夐挳
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../../杞﹂棿绠$悊/浜х嚎/MES_WhiteLabelGeneration.html?OperationType=1&HBarCode_Pack=' + HBarCode_Pack //璁剧疆 iframe 鐨� URL锛孶RL 涓寘鍚簡鏌ヨ鍙傛暟锛屾潵璋冪敤鎵�闇�瑕佺殑鍊�
+ , resize: false, //鏄惁鍏佽鐢ㄦ埛璋冩暣寮瑰嚭澶у皬
+ })
+ } else {
+ layer.msg(get_MessageError("[3748-2-006]璇烽�夋嫨涓�琛岃繘琛岀櫧鏍囩敓鎴�!", sessionStorage["HTranSlate"]));
+ }
+ });
- // var sWhere = "select a.HBarCode_White HBarCode_White,temp.HSupPartName HSupPartName,temp.HSupBarCodeNumber MFGPartNumber,temp.HCountryType CountryofOrigin,(select REPLACE(item, 'Q', '') from split(a.HBarCode_White, ':') where id = 6) Quantity, temp.HGrossWeight GrossWeight, temp.HPARTNAME PartName , (select item from split(a.HBarCode_White, ':') where id = 2) ContentLabelID , temp.HSupNumber Supplier, REPLACE(convert(varchar(10), GETDATE(), 20), '-', '') + ' ' + convert(varchar(5), GETDATE(), 24) MFGDate , REPLACE(convert(varchar(10), GETDATE(), 20), '-', '') SupplierLotCode , (select REPLACE(item, 'P', '') from split(a.HBarCode_White, ':') where id = 4) BBM from Sc_PackUnionBillMain a left join Gy_Material m on a.HMaterID = m.HItemID left join Sc_PackUnionBillBarCode_temp temp on m.HNumber = temp.HMaterNumber where a.HInterID=" + linterid;
-
- // $.ajax({
- // type: "GET",
- // url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- // async: true,
- // data: { "sWhere": sWhere },
- // success: function (data) {
- // if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-
- // if (data.data.length != 0) {
- // var dataPrint = [];
- // dataPrint.push(data.data[0]
- // //{ "浜у搧鍚嶇О": data.data[0]["浜у搧鍚嶇О"], "鏉$爜缂栧彿": data.data[0]["鏉$爜缂栧彿"], "鏁伴噺": data.data[0]["鏁伴噺"], "鏃ユ湡": data.data[0]["鏃ユ湡"], "鐢熶骇浠诲姟鍗�": data.data[0]["鐢熶骇浠诲姟鍗�"], "娴佽浆鍗$紪鍙�": data.data[0]["娴佽浆鍗$紪鍙�"], "鑷畾涔夊瓧娈�": data.data[0]["鑷畾涔夊瓧娈�"], "椤圭洰缂栧彿": data.data[0]["椤圭洰缂栧彿"] }
- // );
-
- // var Customer = {
- // "Table": dataPrint
- // }
-
- // var args = {
- // type: "print",
- // showOptionDlg: false, //濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
- // report: urlAddRandomNo("../../grf/鐧芥爣鎵撳嵃.grf"),
- // data: Customer
- // };
- // //var args = {
- // // report: urlAddRandomNo("../../views/grf/鍖呰鍗曠墿鏂欐爣璇嗗崱(缃戦〉鐗�).grf"),
- // // data: Customer
- // //};
- // webapp_ws_ajax_run(args);
- // } else {
- // layer.msg("鏌ユ棤鏁版嵁!");
- // }
-
- // }
- // else {
- // layer.msg(data.Message, { icon: 5 });
- // }
- // layer.closeAll("loading");
- // },
- // error: function (err) {
- // layer.msg("閿欒:" + err, { icon: 5 });
- // }
- // })
-
- //});
-
-
+ //鏂帿灏旀墦鍗�
form.on('submit(Print)', function (obj) {//閫�鍑�
var checkStatus = table.checkStatus("mainTable"); //鑾峰彇閫変腑琛岀姸鎬�
var linterid = checkStatus.data[0].HInterID;
- ////鎵撳紑鎵撳嵃妯℃澘
- ////var linterid = $("#HInterID").val();
- ////var linterid = "28973";
- var Type = "HBarCodePrint";
- var OpenTmp = "鐧芥爣鎵撳嵃1";
- //var ReportViewer = document.getElementById("ReportViewer");
- window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + linterid.toString() + "&Type=" + Type.toString() + "&OpenTmp=" + OpenTmp.toString());
+ var HOrgID = $("#HOrgID").val();
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '鎵撳嵃妯$増閫夋嫨'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid='+ linterid.toString() + '|' + HOrgID + '&MyMsg=&Type=' + HModName, 'yes']
+ , resize: false
+ })
});
- //鎵撳嵃鎸夐挳
+ //鎵撳嵃鎸夐挳 鏅彶鐗规墦鍗�
form.on('submit(Print1)', function (obj) {//閫�鍑�
var checkStatus = table.checkStatus("mainTable"); //鑾峰彇閫変腑琛岀姸鎬�
var linterid = checkStatus.data[0].HInterID;
@@ -600,7 +576,7 @@
$.ajax({
type: "GET",
url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- async: true,
+ async: false,
data: { "sWhere": sWhere },
success: function (data) {
if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -626,17 +602,17 @@
//};
webapp_ws_ajax_run(args);
} else {
- layer.msg("鏌ユ棤鏁版嵁!");
+ layer.msg(get_MessageError("[0000-1-045]鏌ユ棤鏁版嵁!", sessionStorage["HTranSlate"]));
}
}
else {
- layer.msg(data.Message, { icon: 5 });
+ layer.msg(get_MessageError(data.Message, sessionStorage["HTranSlate"]), { icon: 5 });
}
layer.closeAll("loading");
},
error: function (err) {
- layer.msg("閿欒:" + err, { icon: 5 });
+ layer.msg(get_MessageError("閿欒:" + err, sessionStorage["HTranSlate"]), { icon: 5 });
}
})
@@ -648,27 +624,58 @@
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
var HInterID = data[0].HInterID.toString();
- layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+ layer.confirm(get_MessageError("[0000-1-003]纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", sessionStorage["HTranSlate"]), { title: get_MessageError("[0000-2-009]鍒犻櫎纭", sessionStorage["HTranSlate"])}, function (index) {
$.ajax({
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
url: GetWEBURL1() + '/LEMS/DelMES_ProductionLinePackagingList',
type: "GET",
+ async: false,
data: { "HInterID": HInterID },
success: function (data1) {
if (data1.count == 1) {
- layer.msg(data1.Message);
+ layer.msg(get_MessageError(data1.Message, sessionStorage["HTranSlate"]));
} else {
- layer.alert(data1.code + data1.Message, { icon: 5 });
+ layer.alert(get_MessageError(data1.code + data1.Message, sessionStorage["HTranSlate"]), { icon: 5 });
}
}, error: function () {
- layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+ layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
}
});
})
} else {
- layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+ layer.msg(get_MessageError('[0000-1-014]璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒', sessionStorage["HTranSlate"]));
}
});
+
+
+ //鏇存柊
+ form.on('submit(BtnGX)', function (data) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var HInterID = data[0].HInterID.toString();
+ var HRemark = "鏃�";
+ $.ajax({
+ url: GetWEBURL1() + '/LEMS/SaveToSc_PackUnionBillSub_Back',
+ type: "GET",
+ async: false,
+ data: { "HInterID": HInterID, "HRemark": HRemark },
+ success: function (data1) {
+ if (data1.count == 1) {
+ layer.msg(get_MessageError(data1.Message, sessionStorage["HTranSlate"]));
+ } else {
+ layer.alert(get_MessageError(data1.code + data1.Message, sessionStorage["HTranSlate"]), { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert(get_MessageError("[0000-1-002]鎺ュ彛璇锋眰澶辫触!", sessionStorage["HTranSlate"]), { icon: 5 });
+ }
+ });
+ } else {
+ layer.msg(get_MessageError('[0000-1-020]璇烽�夋嫨涓�琛屾暟鎹洿鏂帮紒', sessionStorage["HTranSlate"]));
+ }
+ });
+
+
//#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃
function setSelect_HInitTimeCycle() {
var valueList = [0, 1, 2, 3, 4, 5, 6, 29]; //valuelist鏁扮粍鍖呭惈涓庢椂闂寸浉鍏崇殑鏁存暟鍊�
@@ -680,12 +687,13 @@
}
$("#HInitTimeCycle").empty(); //浣跨敤jquery鐨別mpty鏂规硶娓呯┖HInitTimeCycle_ArrayList <select>鍏冪礌鐨勫��
- $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList); //浣跨敤append鏂规硶鏋勫缓涔嬪墠HInitTimeCycle_ArrayList瀛楃涓� 鐨勫唴瀹逛紶鍏InitTimeCycle
+ $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList); //浣跨敤append鏂规硶鏋勫缓涔嬪墠HInitTimeCycle_ArrayList瀛楃涓� 鐨勫唴瀹逛紶鍏InitTimeCycle
form.render('select'); //璋冪敤 閲嶆柊娓叉煋select鍏冪礌
- $("#HInitTimeCycle").val("29"); //浣跨敤jQuery鐨剉al()鏂规硶灏嗕笅鎷夊垪琛ㄧ殑閫変腑鍊艰缃负"29 锛屼笖鏄剧ず銆婅繎涓夋檪澶┿��
+ $("#HInitTimeCycle").val("1"); //浣跨敤jQuery鐨剉al()鏂规硶灏嗕笅鎷夊垪琛ㄧ殑閫変腑鍊艰缃负"29 锛屼笖鏄剧ず銆婅繎涓夋檪澶┿��
}
//#endregion
+
//#region 鍒楁槑鏄剧ず涓嬫媺妗�
function ColFilter() {
var Organization = '<option value="0" selected="selected" ></option>';
@@ -703,13 +711,55 @@
form.render('select');
}
//#endregion
- //laydate.render({
- // elem: '#HDate'
- // , type: 'datetime'
- // , trigger: 'click'
- // , format:'yyyy-MM-dd HH:mm'
- //});
+ //鑾峰彇缁勭粐
+ function Organ() {
+ //鑾峰彇鐧诲綍椤电粍缁囧垪
+ $.ajax({
+ type: "get",
+ async: false,
+ 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].Name + '">' + data[i].Name + '</option>';
+ }
+ $("#HOrgID").append(Organization);
+ $("#HOrgID").val(sessionStorage["Organization"])
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+
+
+ //#region 鏍规嵁鐢ㄦ埛鑾峰彇鐢ㄦ埛鍏宠仈缁勭粐鐨勮繃婊ゆ潯浠�
+ function getOrgIDByUser() {
+ var res = "";
+ $.ajax({
+ type: "GET",
+ async: false,
+ url: GetWEBURL() + "/Xt_User/getOrgIDListByUser", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚� 浼犲弬 缁勭粐蹇呴』鏄垪琛ㄥご閮ㄦ煡璇㈢殑缁勭粐 涓嶈兘浣跨敤鐢ㄦ埛榛樿
+ data: { "UserID": sessionStorage["Czybm"], "UserName": sessionStorage["HUserName"], HOrgID: $("#HOrgID").val() },
+ success: function (result) {
+ if (result.count == 1) {
+ if (result.data[0].sWhere == "1") {
+ res = " and 鐢熶骇缁勭粐 = '" + $("#HOrgID").val() + "'";
+ } else {
+ res = result.data[0].sWhere;
+ }
+ }
+ }, error: function (err) {
+ res = " and 1 = 0";
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ return res;
+ }
+ //#endregion
//浠ヤ笂鏄痩ayui妯″潡
});
--
Gitblit v1.9.1