From 038b792c328351ef501b0ab967f1ed2a43b35b03 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期四, 14 十月 2021 16:56:21 +0800
Subject: [PATCH] 分布式调入调出
---
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldMoveStockStepInBillList.html | 6
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldMoveStockStepInBill.html | 2
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldMoveStockStepOutBillList.html | 8
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldMoveStockStepOutBill.html | 313 ++++++++++++++++++++++++++++++++++++++-------------
4 files changed, 239 insertions(+), 90 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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepInBill.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepInBill.html"
index 0dfffc5..faa766e 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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepInBill.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepInBill.html"
@@ -400,7 +400,7 @@
});
}
- if (obj.event === 'HOtherOrgCode') //璋冨叆浠撳簱浠g爜
+ if (obj.event === 'HOtherOrgCode') //缁勭粐
{
//椤甸潰灞�-鑷畾涔�
layer.open({
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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepInBillList.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepInBillList.html"
index 462f924..6e782d4 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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepInBillList.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepInBillList.html"
@@ -174,7 +174,9 @@
, { field: 'Hunitid', title: 'Hunitid', width: 200, hide: true }
//, { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 125 }
//, { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 125 }
- , { field: '璋冩嫧绫诲瀷', title: '璋冩嫧绫诲瀷', width: 100, hide: true }
+ , { field: '璋冩嫧绫诲瀷', title: '璋冩嫧绫诲瀷', width: 100}
+ , { field: '璋冨叆缁勭粐', title: '璋冨叆缁勭粐', width: 125 }
+ , { field: '璋冨嚭缁勭粐', title: '璋冨嚭缁勭粐', width: 125 }
, { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
, { field: '璋冨叆浠撳簱浠g爜', title: '璋冨叆浠撳簱浠g爜', width: 125 }
, { field: '璋冨叆浠撳簱', title: '璋冨叆浠撳簱', width: 125 }
@@ -187,8 +189,6 @@
, { field: 'HSCSPID', title: 'HSCSPID', width: 200, hide: true }
, { field: '璋冨嚭浠撲綅浠g爜', title: '璋冨嚭浠撲綅浠g爜', width: 125, hide: true }
, { field: '璋冨嚭浠撲綅', title: '璋冨嚭浠撲綅', width: 125, hide: true }
- , { field: '璋冨叆缁勭粐', title: '璋冨叆缁勭粐', width: 125 }
- , { field: '璋冨嚭缁勭粐', title: '璋冨嚭缁勭粐', width: 125 }
, { field: '搴斿彂鏁伴噺', title: '搴斿彂鏁伴噺', width: 125 }
, { field: '瀹炲彂鏁伴噺', title: '瀹炲彂鏁伴噺', width: 125 }
, { field: '鍗曚环', title: '鍗曚环', width: 125 }
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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepOutBill.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepOutBill.html"
index c288cb9..97f188f 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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepOutBill.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepOutBill.html"
@@ -65,17 +65,19 @@
<div class="layui-inline">
<label class="layui-form-label">鍣ㄥ叿浠撳簱</label>
<div class="layui-input-inline">
- <input type="text" name="HWHName" id="HWHName" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="text" name="HWHName" id="HWHName" readonly class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="" style="float:left;width:150px;">
<button type="button" lay-submit="" class="layui-btn" lay-filter="WareHouse" style="width:40px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
</button>
</div>
</div>
+ </div>
+ <div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">棰嗘枡浜�</label>
<div class="layui-input-inline">
- <input type="text" name="HSecManagerName" id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="text" name="HSecManagerName" readonly id="HSecManagerName" class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value="" style="float:left;width:150px;">
<button type="button" lay-submit="" class="layui-btn" lay-filter="HSecManagerList" style="width:40px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
@@ -85,27 +87,34 @@
<div class="layui-inline">
<label class="layui-form-label">鍙戞枡浜�</label>
<div class="layui-input-inline">
- <input type="text" name="HKeeperName" id="HKeeperName" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="text" name="HKeeperName" id="HKeeperName" readonly class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="" style="float:left;width:150px;">
<button type="button" lay-submit="" class="layui-btn" lay-filter="HKeeperList" style="width:40px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
</button>
</div>
</div>
- </div>
- <div class="layui-form-item">
-
-
<div class="layui-inline">
<label class="layui-form-label">閮ㄩ棬</label>
<div class="layui-input-inline">
- <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="text" name="HDeptName" id="HDeptName" readonly class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HDeptID" id="HDeptID" 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>
</div>
</div>
+ <div class="layui-inline">
+ <label class="layui-form-label">璋冩嫧绫诲瀷</label>
+ <div class="layui-input-inline">
+ <select name="HStockStyle" lay-filter="aihao" id="HStockStyle">
+ <option value="鍚岀粍缁囪皟鎷�">鍚岀粍缁囪皟鎷�</option>
+ <option value="璺ㄧ粍缁囪皟鎷�">璺ㄧ粍缁囪皟鎷�</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ <div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">婧愬崟绫诲瀷</label>
<div class="layui-input-inline">
@@ -121,8 +130,6 @@
<input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:150px;">
</div>
</div>
- </div>
- <div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">鎽樿</label>
<div class="layui-input-inline">
@@ -223,17 +230,27 @@
, { field: 'HBatchNo', title: '鎵规', edit: 'text', width: 100 }
, { field: 'HDesignLife', title: '璁捐瀵垮懡', edit: 'text', width: 100 }
, { field: 'HLeaveLife', title: '鍓╀綑瀵垮懡', edit: 'text', width: 100 }
- , { field: 'HUseLife', title: '绱Н浣跨敤瀵垮懡', edit: 'text', width: 100 }
+ , { field: 'HUseLife', title: '绱浣跨敤瀵垮懡', edit: 'text', width: 120 }
, { field: 'HQtyMust', title: '搴斿彂鏁伴噺', edit: 'text', width: 100 }
, { field: 'HQty', title: '瀹炲彂鏁伴噺', edit: 'text', width: 100 }
, { field: 'HPrice', title: '鍗曚环', edit: 'text', width: 100 }
, { field: 'HMoney', title: '閲戦', edit: 'text', width: 100 }
+ , { field: 'HOtherOrgID', title: 'HOtherOrgID', width: 100, hide: true }
+ , { field: 'HStockOrgID', title: 'HStockOrgID', width: 100, hide: true }
+ , { field: 'HStockOrgCode', title: '璋冨叆缁勭粐浠g爜', edit: 'text', event: 'HStockOrgCode', width: 120 }
+ , { field: 'HStockOrgName', title: '璋冨叆缁勭粐', width: 100 }
, { field: 'HWHID', title: 'HWHID', edit: 'text', width: 100, hide: true }
- , { field: 'HWHCode', title: '鍙戞枡浠撳簱浠g爜', edit: 'text', event: 'HWHCode', width: 100 }
- , { field: 'HWHName', title: '鍙戞枡浠撳簱', edit: 'text', width: 100 }
+ , { field: 'HWHCode', title: '璋冨叆浠撳簱浠g爜', edit: 'text', event: 'HWHCode', width: 120 }
+ , { field: 'HWHName', title: '璋冨叆浠撳簱', width: 100 }
, { field: 'HSPID', title: 'HSPID', edit: 'text', width: 100, hide: true }
- , { field: 'HSPCode', title: '浠撲綅浠g爜', edit: 'text', event: 'HSPCode', width: 100 }
- , { field: 'HSPName', title: '浠撲綅', edit: 'text', width: 100 }
+ , { field: 'HSPCode', title: '璋冨叆浠撲綅浠g爜', edit: 'text', event: 'HSPCode', width: 120 }
+ , { field: 'HSPName', title: '璋冨叆浠撲綅', edit: 'text', width: 100 }
+ , { field: 'HSCWHID', title: 'HSCWHID', edit: 'text', width: 100, hide: true }
+ , { field: 'HSCWHCode', title: '璋冨嚭浠撳簱浠g爜', edit: 'text', event: 'HSCWHCode', width: 120 }
+ , { field: 'HSCWHName', title: '璋冨嚭浠撳簱', edit: 'text', width: 100 }
+ , { field: 'HSCSPID', title: 'HSPID', edit: 'text', width: 100, hide: true }
+ , { field: 'HSCSPCode', title: '璋冨嚭浠撲綅浠g爜', edit: 'text', event: 'HSCSPCode', width: 120 }
+ , { field: 'HSCSPName', title: '璋冨嚭浠撲綅', edit: 'text', width: 100 }
, { field: 'HRemark', title: '琛ㄤ綋澶囨敞', edit: 'text', width: 100 }
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
]]
@@ -242,7 +259,7 @@
//鍒ゆ柇鏄惁鏂板
if (OperationType == 1) {
//鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": " ", "HSQProcName": " ","HProcID":0, "HZRProcName": " ", "HMRBChecker": " ", "HRemark": " ", "HPSProcName": " ", "HCloseMan": " " }
- option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" }];
+ option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HOtherOrgID": sessionStorage["OrganizationID"], "HStockOrgID": 0, "HStockOrgCode": "", "HStockOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" }];
table.render(option);
}
else {
@@ -278,7 +295,7 @@
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;;
var AddRow = table.cache['mainTable'];
- var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" };
+ var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HOtherOrgID": sessionStorage["OrganizationID"], "HStockOrgID": 0, "HStockOrgCode": "", "HStockOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" };
switch (obj.event) {
case 'btn-AddLine':
//table.cache["mainTable"].push(AddRow[rows]);
@@ -373,9 +390,65 @@
}
});
}
-
- if (obj.event === 'HWHCode') //浠撳簱浠g爜
+ if (obj.event === 'HStockOrgCode') //缁勭粐
{
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '缁勭粐鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../../PublicPage/Organizations.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+ var HStockStyle = $("#HStockStyle").val();
+ if (HStockStyle == "璺ㄧ粍缁囪皟鎷�") //false 鍚岀粍缁� true 璺ㄧ粍缁� {
+ {
+ if (sessionStorage["OrganizationID"] == checkStatus.data[0].HItemID) {
+ layer.close(layer.index);
+ return layer.msg('璋冩嫧绫诲瀷涓鸿法缁勭粐璋冩嫧锛屽綋鍓嶇粍缁囷細' + sessionStorage["Organization"] + '璇烽�夋嫨鍏朵粬缁勭粐');
+ }
+ }
+ else {
+ if (sessionStorage["OrganizationID"] != checkStatus.data[0].HItemID) {
+ layer.close(layer.index);
+ return layer.msg('璋冩嫧绫诲瀷涓哄悓缁勭粐璋冩嫧锛岃閫夋嫨褰撳墠缁勭粐锛�' + sessionStorage["Organization"]);
+ }
+ }
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HStockOrgID: checkStatus.data[0].HItemID,
+ HStockOrgCode: checkStatus.data[0].HNumber,
+ HStockOrgName: checkStatus.data[0].HName,
+ });
+
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ }
+ });
+ }
+ if (obj.event === 'HWHCode') //璋冨叆浠撳簱浠g爜
+ {
+ var HStockOrgID = obj.data.HStockOrgID;
+ if (HStockOrgID == 0 || HStockOrgID == "") {
+ return layer.msg('璇烽�夋嫨璋冨叆缁勭粐');
+ }
//椤甸潰灞�-鑷畾涔�
layer.open({
type: 2,
@@ -385,7 +458,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes'],
+ content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID&HOrgID=' + HStockOrgID, 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -441,6 +514,90 @@
HSPID: checkStatus.data[0].HItemID,
HSPCode: checkStatus.data[0].HNumber,
HSPName: checkStatus.data[0].HName,
+ });
+
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ }
+ });
+ }
+ if (obj.event === 'HSCWHCode') //璋冨嚭浠撳簱浠g爜
+ {
+ var HOtherOrgID = obj.data.HOtherOrgID;
+ if (HOtherOrgID == 0 || HOtherOrgID == "") {
+ return layer.msg('璇烽�夋嫨璋冨嚭缁勭粐');
+ }
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '浠撳簱鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID&HOrgID=' + sessionStorage["OrganizationID"], 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HSCWHID: checkStatus.data[0].HItemID,
+ HSCWHCode: checkStatus.data[0].HNumber,
+ HSCWHName: checkStatus.data[0].HName,
+ });
+
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ }
+ });
+ }
+ if (obj.event === 'HSCSPCode') //璋冨嚭浠撲綅浠g爜
+ {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '浠撲綅鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../../PublicPage/WareLocationInformation.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HSCSPID: checkStatus.data[0].HItemID,
+ HSCSPCode: checkStatus.data[0].HNumber,
+ HSCSPName: checkStatus.data[0].HName,
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -581,8 +738,8 @@
"HBillNo": data.鍗曟嵁鍙�
, "HDate": formatDate(data.鏃ユ湡)
, "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
- , "HWHID": data.HWHID //浠撳簱ID
- , "HWHName": data.浠撳簱 //浠撳簱鍚嶇О
+ , "HWHID": data.HWHID1 //浠撳簱ID
+ , "HWHName": data.鍣ㄥ叿浠撳簱 //浠撳簱鍚嶇О
, "HSecManagerID": data.hsecmanagerid //楠屾敹鍛業D
, "HSecManagerName": data.棰嗘枡浜� //楠屾敹鍛樺悕绉�
, "HKeeperID": data.hkeeperid //淇濈鍛業D
@@ -593,6 +750,7 @@
, "XDH": "" //閫夊崟鍙�
, "HExplanation": data.鎽樿 //鎽樿
, "HRemark": data.琛ㄥご澶囨敞 //澶囨敞
+ , "HStockStyle": data.璋冩嫧绫诲瀷
});
} else {
@@ -800,18 +958,6 @@
}
});
-
-
-
-
-
-
- //form.on('submit(Cancel)', function () {
- // //sessionStorage["SourceFlag"] = false;
- // parent.location.href = "../../../views/index.html"
- // //window.close();//鍏抽棴褰撳墠椤�
- //})
-
function formatDate(date) {
var d = new Date(date),
month = '' + (d.getMonth() + 1),
@@ -830,8 +976,10 @@
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(table.cache['mainTable']);
var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"];
-
-
+ if (!AllowLoadData(sSubStr))//鏁版嵁楠岃瘉
+ {
+ return false;
+ }
$.ajax(
{
type: "POST",
@@ -934,62 +1082,61 @@
//$("#HQRName").val(obj[0].HName);
//$("#HItemID").val(obj[0].HItemID);
}
- function AllowLoadData(sSubStr) { //闈炵┖楠岃瘉
- //if ($("#HSourceBillNo").val() == '') {
- // layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
- // return false;
- //}
- if ($("#HDeptName").val() == '') {
- layer.msg("閮ㄩ棬娌℃湁閫夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ //闈炵┖楠岃瘉
+ function AllowLoadData(sSubStr) {
+ var HStockStyle = $("#HStockStyle").val();
+ var Result = true;
+ if ($("#HWHID").val() == '' || $("#HWHID").val() == null) {
+ layer.msg("鍣ㄥ叿浠撳簱涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
}
- if ($("#HSecManager").val() == '') {
- layer.msg("楠屾敹浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ if ($("#HSecManagerID").val() == '' || $("#HSecManagerID").val() == null) {
+ layer.msg("棰嗘枡浜轰笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
}
- if ($("#HKeeper").val() == '') {
- layer.msg("淇濈浜烘病鏈夐�夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ if ($("#HKeeperID").val() == '' || $("#HKeeperID").val() == null) {
+ layer.msg("鍙戞枡浜轰笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
}
- //if ($("#HWHNAME").val() == '') {
- // layer.msg("浠撳簱娌℃湁閫夋嫨!", { icon: 5 });
- // return false;
- //}
- if ($("#HBillNo").val() == '') {
- layer.msg("閿欒鐨勫崟鎹彿", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null) {
+ layer.msg("閮ㄩ棬涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
}
- if ($("#HInterID").val() == '') {
- layer.msg("閿欒鐨勫唴鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ if (typeof (sSubStr) == "undefined" || sSubStr == "") {
+ layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
}
- if (typeof (sSubStr) == "undefined") {
- layer.msg("娌℃湁鐗╂枡鏄庣粏璁板綍", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
- }
- if (!typeof (sSubStr) == "undefined") {
- //for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺
- // if (parseFloat(sSubStr[i].HQtyMust) > 0) {
- // if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust))
- // {
- // layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
- // return false;
- // }
- // }
- //}
- for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0
- if (parseFloat(sSubStr[i].HQty) > 0) {
- s = 1;
+ if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
+ sSubStr = JSON.parse(sSubStr);
+ for (var i = 0; i < sSubStr.length; i++) {
+ if (sSubStr[i].HMaterID == "") {
+ layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,鍣ㄥ叿淇℃伅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
}
- }
- if (s == 0) {
- layer.msg("浜у搧鍏ュ簱璁板綍鏈壂鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
+ if (sSubStr[i].HWHID == "") {
+ layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璋冨叆浠撳簱涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
+ if (sSubStr[i].HSCWHID == "") {
+ layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璋冨嚭浠撳簱涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
+ if (HStockStyle == "璺ㄧ粍缁囪皟鎷�" && sSubStr[i].HStockOrgID == sSubStr[i].HOtherOrgID) {
+ layer.msg("璋冩嫧绫诲瀷涓鸿法缁勭粐璋冩嫧锛屾槑缁嗚褰曠" + (i + 1) + "琛�,璋冨叆缁勭粐鍜屽綋鍓嶇粍缁囦竴鑷� !", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
+ if (HStockStyle == "鍚岀粍缁囪皟鎷�" && sSubStr[i].HStockOrgID != sSubStr[i].HOtherOrgID) {
+ layer.msg("璋冩嫧绫诲瀷涓哄悓缁勭粐璋冩嫧锛屾槑缁嗚褰曠" + (i + 1) + "琛�,璋冨叆缁勭粐鍜屽綋鍓嶇粍缁囦笉涓�鑷� !", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
}
}
else {
- return true;
+ return Result = true;
}
- }</script>
+ return Result;
+ }
+
+ </script>
</body>
</html>
\ No newline at end of file
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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepOutBillList.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepOutBillList.html"
index 0d59bab..761acc4 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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepOutBillList.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldMoveStockStepOutBillList.html"
@@ -153,9 +153,8 @@
, { field: '鏃ユ湡', title: '鏃ユ湡', width: 125, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 195 }
, { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 110 }
- //, { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
- //, { field: '浠撳簱浠g爜', title: '浠撳簱浠g爜', width: 125 }
- //, { field: '浠撳簱', title: '浠撳簱', width: 125 }
+ , { field: '鍣ㄥ叿浠撳簱浠g爜', title: '鍣ㄥ叿浠撳簱浠g爜', width: 125 }
+ , { field: '鍣ㄥ叿浠撳簱', title: '鍣ㄥ叿浠撳簱', width: 125 }
, { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true }
, { field: '棰嗘枡浜轰唬鐮�', title: '棰嗘枡浜轰唬鐮�', width: 180 }
, { field: '棰嗘枡浜�', title: '棰嗘枡浜�', width: 125 }
@@ -176,6 +175,9 @@
, { field: 'Hunitid', title: 'Hunitid', width: 200, hide: true }
//, { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 125 }
//, { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 125 }
+ , { field: '璋冩嫧绫诲瀷', title: '璋冩嫧绫诲瀷', width: 100 }
+ , { field: '璋冨叆缁勭粐', title: '璋冨叆缁勭粐', width: 125 }
+ , { field: '璋冨嚭缁勭粐', title: '璋冨嚭缁勭粐', width: 125 }
, { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
, { field: '璋冨叆浠撳簱浠g爜', title: '璋冨叆浠撳簱浠g爜', width: 125 }
, { field: '璋冨叆浠撳簱', title: '璋冨叆浠撳簱', width: 125 }
--
Gitblit v1.9.1