From 361ef22b987b45d97b88198b5c5370affbdaa434 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 24 十月 2024 15:09:02 +0800
Subject: [PATCH] 班组职员清单复制
---
WebTM/views/验收入库/外购入库/Kf_POStockInBackBill_Add_Up.html | 613 ++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 449 insertions(+), 164 deletions(-)
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
index 7b83378..7842b4a 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
@@ -171,119 +171,118 @@
</button>
</div>
</div>
- <div class="layui-col-xs4 layui-inline">
- <label class="layui-form-label">璐熻矗浜�</label>
- <div class="layui-input-inline">
- <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;">
- <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value=0 style="float:left;width:150px;">
- <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" 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-row">
-
- <div class="layui-col-xs7 layui-inline">
- <label class="layui-form-label">鎽樿</label>
- <div class="layui-input-block">
- <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off">
- </div>
+ <div class="layui-col-xs4 layui-inline">
+ <label class="layui-form-label">璐熻矗浜�</label>
+ <div class="layui-input-inline">
+ <input type="text" name="HManagerName" id="HManagerName" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value=0 style="float:left;width:150px;">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="HManagerList" style="width:40px;">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+ </button>
</div>
</div>
- <div class="layui-row">
- <div class="layui-col-xs7 layui-inline">
- <label class="layui-form-label">澶囨敞</label>
- <div class="layui-input-block">
- <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off">
- </div>
+
+
+ </div>
+ <div class="layui-row">
+
+ <div class="layui-col-xs7 layui-inline">
+ <label class="layui-form-label">鎽樿</label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="HExplanation" id="HExplanation" autocomplete="off">
</div>
</div>
- <div class="layui-row">
- <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>
+ <div class="layui-row">
+ <div class="layui-col-xs7 layui-inline">
+ <label class="layui-form-label">澶囨敞</label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="HRemark" id="HRemark" autocomplete="off">
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <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>
</div>
</div>
+ </div>
- <!--鍒跺崟淇℃伅-->
- <div class="layui-tab-item">
- <div class="layui-form-item">
- <div class="layui-row">
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">鍒跺崟浜�</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">瀹℃牳浜�</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">鍏抽棴浜�</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
- </div>
+ <!--鍒跺崟淇℃伅-->
+ <div class="layui-tab-item">
+ <div class="layui-form-item">
+ <div class="layui-row">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鍒跺崟浜�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
</div>
</div>
- <div class="layui-row">
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">淇敼浜�</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">浣滃簾浜�</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HDeleteMan " id="HDeleteMan " style="background-color:#efefef4d;" readonly>
- </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">瀹℃牳浜�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
</div>
</div>
- <div class="layui-row">
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">鍒跺崟鏃ユ湡</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
- </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鍏抽棴浜�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
</div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">瀹℃牳鏃ユ湡</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
- </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鍒跺崟鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
</div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
- </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">瀹℃牳鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
</div>
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">淇敼鏃ユ湡</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
- </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鍏抽棴鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
</div>
- <div class="layui-row">
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 85px;">浣滃簾鏃ユ湡</label>
- <div class="layui-input-block" style="margin-left: 120px;">
- <input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
- </div>
- </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">淇敼浜�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">浣滃簾浜�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ </div>
+ <div class="layui-row">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">淇敼鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">浣滃簾鏃ユ湡</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
</div>
</div>
</div>
@@ -297,6 +296,8 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Inventory" id="get_Inventory"><i class="layui-icon layui-icon-form"></i>搴撳瓨鏌ヨ</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>鍑哄叆搴撹褰曟煡璇�</button>
</div>
</script>
<script type="text/html" id="xuhao">
@@ -334,7 +335,7 @@
var allVal;
//#endregion
-
+ var HModName = "Kf_POStockInBackBill_Add_Up"
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -481,6 +482,12 @@
"HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
};
switch (obj.event) {
+ //搴撳瓨鏌ヨ
+ case 'get_Inventory': get_Inventory();
+ break;
+ //鍑哄叆搴撹褰曟煡璇�
+ case 'get_InOutSum': get_InOutSum();
+ break;
case 'btn-AddLine':
table.cache["mainTable"].push(NewRow);
option.data = table.cache["mainTable"];
@@ -507,10 +514,10 @@
//checkRefresh();
}
break;
- ////鍒楄缃�
- //case 'set_HideColumn':
- // get_HideColumn();
- // break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
@@ -590,7 +597,11 @@
//鏁板�兼牸寮忔牎楠屽伐鍏�
var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
var temp = "";
-
+ console.log(obj)
+ var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+ var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"]; //鏁伴噺绮惧害
+ var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"]; //鍗曚环绮惧害
+ var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"]; //閲戦绮惧害
// 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
var oldText = $(this).prev().text();
var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
@@ -617,7 +628,9 @@
var HQty = value * 1; //鏁伴噺
var HPrice = obj.data.HPrice * 1; //鍗曚环
var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
-
+ HQty = Number(HQty.toFixed(HQtyDec));
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
@@ -626,7 +639,7 @@
, HPrice: HPrice
, HMoney: HMoney
});
- /* table.render(option);*/
+ table.render(option);
break;
case "HPrice": //鍗曚环
//鏁版嵁鏍煎紡鏍¢獙
@@ -646,7 +659,9 @@
var HQty = obj.data.HQty * 1; //鏁伴噺
var HPrice = value * 1;
var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
-
+ HQty = Number(HQty.toFixed(HQtyDec));
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
@@ -654,6 +669,7 @@
, HPrice: HPrice
, HMoney: HMoney
});
+ table.render(option)
break;
case "HMoney": //閲戦
//鏁版嵁鏍煎紡鏍¢獙
@@ -663,7 +679,7 @@
obj.update({
HMoney: oldText
});
- /* table.render(option);*/
+ table.render(option);
layer.msg("閲戦璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!");
return;
@@ -672,8 +688,10 @@
//鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
var HQty = obj.data.HQty * 1; //鏁伴噺
var HMoney = value * 1;
- var HPrice = (HMoney / HQty).toFixed(2); //鍗曚环=閲戦/鏁伴噺
-
+ var HPrice = Number((HMoney / HQty).toFixed(2)); //鍗曚环=閲戦/鏁伴噺
+ HQty = Number(HQty.toFixed(HQtyDec));
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
@@ -681,8 +699,9 @@
, HPrice: HPrice
, HMoney: HMoney
});
- break;
table.render(option);
+ break;
+
default:
}
});
@@ -692,7 +711,55 @@
//#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
-
+ //#region 搴撳瓨鏌ヨ
+ function get_Inventory() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1 && data[0].HMaterID != 0) {
+ var HMaterID = data[0].HMaterID.toString();
+ //寮圭獥鏂规硶
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '搴撳瓨鏌ヨ鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../浠撳瓨绠$悊/鏉$爜鎶ヨ〃/Kf_ICinventoryQueryReport.html?Type=1&HMaterID=' + HMaterID, 'yes']
+ , btn: ['鍙栨秷']
+ , btn1: function (index, layero) {
+ layer.close(index);
+ }
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾湁鐗╂枡鏁版嵁鏌ヨ锛�');
+ }
+ }
+ //#endregion
+ //#region 鍑哄叆搴撹褰曟煡璇�
+ function get_InOutSum() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1 && data[0].HMaterID != 0) {
+ var HMaterID = data[0].HMaterID.toString();
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鍑哄叆搴撹褰曞垪琛�'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../浠撳瓨绠$悊/鏉$爜鎶ヨ〃/Kf_StockInOutSumQueryReport.html?Type=1&HMaterID=' + HMaterID, 'yes']
+ , btn: ['鍙栨秷']
+ , btn1: function (index, layero) {
+ layer.close(index);
+ }
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾湁鐗╂枡鏁版嵁鏌ヨ锛�');
+ }
+ }
+ //#endregion
//#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
function get_LoginIs() {
if (sessionStorage.login != "login") {
@@ -731,10 +798,10 @@
, totalRow: true
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', width: 100}
- , { type: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100}
+ , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
, { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }//婧愬崟绫诲瀷
- , { type: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }//婧愬崟瀛愬唴鐮�
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
@@ -759,6 +826,7 @@
option.data = [];
table.render(option);
+ DisPlay_HideColumn();
}
//#region 鍔犺浇琛ㄥご
@@ -801,11 +869,11 @@
, "HMaker": data.鍒跺崟浜�
, "HChecker": data.瀹℃牳浜�
, "HCloseMan": data.鍏抽棴浜�
- , "HMakeDate": data.鍒跺崟鏃ユ湡
- , "HCheckDate": data.瀹℃牳鏃ユ湡
- , "HCloseDate": data.鍏抽棴鏃ユ湡
- , "HUpDateDate": data.淇敼鏃ユ湡
- , "HDeleteDate": data.浣滃簾鏃ユ湡
+ , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Pub_Format(data.鍒跺崟鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
+ , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Pub_Format(data.瀹℃牳鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
+ , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Pub_Format(data.鍏抽棴鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
+ , "HUpDateDate": data.淇敼鏃ユ湡 == null ? "" : Pub_Format(data.淇敼鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
+ , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Pub_Format(data.浣滃簾鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
});
//瀛愯〃 璧嬪��
@@ -1256,7 +1324,31 @@
, btn2: function (index, layero) { }
})
}
-
+ //#region 鏍规嵁鐗╂枡ID鑾峰彇绮惧害
+ function getDecByMaterID(HMaterID) {
+ var resultData = {};
+ $.ajax({ // 寮傛璇锋眰
+ url: GetWEBURL() + "Gy_Material/getDecByID", //璇锋眰鍦板潃
+ async: false, //鏄惁寮�鍚紓姝�
+ type: "GET", //璇锋眰绫诲瀷
+ data: { //瀹氫箟鍙戦�佸埌鏈嶅姟鍣ㄧ殑鏁版嵁
+ "HMaterID": HMaterID // 灏唄materid浣滀负璇锋眰鍙傛暟鍙戦��
+ },
+ success: function (result) { // 褰撹姹傛垚鍔熸椂锛屾墽琛岃繖涓嚱鏁�
+ if (result.code == 1) { // 濡傛灉鏈嶅姟鍣ㄨ繑鍥炵殑鏁版嵁涓殑`code瀛楁绛変簬1锛岃繖鍙兘琛ㄧず瀹℃牳鎿嶄綔鎴愬姛鎵ц
+ var data = result.data; //澹版槑data鍙橀噺锛屽苟灏嗗叾璧嬪�间负result瀵硅薄涓殑data灞炴��
+ resultData = data[0]; //灏哾ata鏁扮粍锛堟垨绫绘暟缁勫璞★級鐨勭涓�涓厓绱犺祴鍊肩粰鍙橀噺resultData
+ }
+ //else {
+ // layer.alert(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' }); //result.msg瀵硅薄锛屾彁绀哄脊绐� 绫诲瀷涓�5锛� 鎸夐挳锛屽拰鎸夐挳鐨勫悕绉颁负閫�鍑� 鏃堕棿 涓�100绉掞紝浠ュ強鍋忕Щ閲忥紙`offset: 't'
+ //}
+ }, error: function () {
+ layer.alert("鍙戠敓閿欒!", { icon: 5 }); //鎻愮ず寮圭獥 鍙戠敓閿欒 锛岃绀烘爣蹇椾负5鐨�
+ }
+ });
+ return resultData;
+ }
+ //#endregion
//#region 鍙嶅鏍�/瀹℃牳鏁版嵁
function set_CheckBill(num) {
@@ -1310,47 +1402,46 @@
//if (checkStatus.data.length != 1) {
// return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
//}
+ OptionData = checkStatus.data[0]; //鎶婇�変腑鏁版嵁鐨勭涓�鏉¤祴鍊肩粰OptionData鍙橀噺
+ if (checkStatus.data.length > 1) {
+ var rowIndex = $(obj.tr).attr("data-index") * 1;
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ if (rowIndex + i >= option.data.length) {
+ var NewRow = {
+ "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
+ "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
+ "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
+ "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+ "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
+ };
+ table.cache["mainTable"].push(NewRow);
+ option.data = table.cache["mainTable"];
- var rowIndex = $(obj.tr).attr("data-index") * 1;
- for (var i = 0; i < checkStatus.data.length; i++) {
- if (rowIndex + i >= option.data.length) {
- var NewRow = {
- "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
- "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
- "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
- "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
- "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
- };
+ table.render(option);
+ }
- table.cache["mainTable"].push(NewRow);
- option.data = table.cache["mainTable"];
-
- table.render(option);
+ var HMaterID = checkStatus.data[i].HItemID;
+ var resultData = getMaterialByMaterID(HMaterID);
+ option.data[rowIndex + i].HMaterID = resultData.HMaterID;
+ option.data[rowIndex + i].鐗╂枡浠g爜 = resultData.HMaterNumber;
+ option.data[rowIndex + i].鐗╂枡鍚嶇О = resultData.HMaterName;
+ option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
+ option.data[rowIndex + i].HUnitID = resultData.HUnitID;
+ option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
+ ////鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ //obj.update({
+ // "HMaterID": checkStatus.data[0].HItemID
+ // , "鐗╂枡浠g爜": checkStatus.data[0].HNumber
+ // , "鐗╂枡鍚嶇О": checkStatus.data[0].HName
+ // , "瑙勬牸鍨嬪彿": checkStatus.data[0].HModel
+ // , "HUnitID": checkStatus.data[0].HUnitID
+ // , "璁¢噺鍗曚綅": checkStatus.data[0].HUnitName
+ //})
+ //layer.close(index);//鍏抽棴寮圭獥
}
-
-
-
- var HMaterID = checkStatus.data[i].HItemID;
- var resultData = getMaterialByMaterID(HMaterID);
- option.data[rowIndex + i].HMaterID = resultData.HMaterID;
- option.data[rowIndex + i].鐗╂枡浠g爜 = resultData.HMaterNumber;
- option.data[rowIndex + i].鐗╂枡鍚嶇О = resultData.HMaterName;
- option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
- option.data[rowIndex + i].HUnitID = resultData.HUnitID;
- option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
- ////鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
- //obj.update({
- // "HMaterID": checkStatus.data[0].HItemID
- // , "鐗╂枡浠g爜": checkStatus.data[0].HNumber
- // , "鐗╂枡鍚嶇О": checkStatus.data[0].HName
- // , "瑙勬牸鍨嬪彿": checkStatus.data[0].HModel
- // , "HUnitID": checkStatus.data[0].HUnitID
- // , "璁¢噺鍗曚綅": checkStatus.data[0].HUnitName
- //})
- //layer.close(index);//鍏抽棴寮圭獥
+ table.render(option);
}
- table.render(option);
layer.closeAll();
//layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -1359,14 +1450,14 @@
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
- obj.update({
- "HMaterID" :OptionData.HMaterID
- ,"鐗╂枡浠g爜" : OptionData.鐗╂枡浠g爜
- , "鐗╂枡鍚嶇О" :OptionData.鐗╂枡鍚嶇О
- ,"瑙勬牸鍨嬪彿" : OptionData.瑙勬牸鍨嬪彿
- ,"HUnitID" :OptionData.HUnitID
- ,"璁¢噺鍗曚綅" : OptionData.璁¢噺鍗曚綅鍚嶇О
- })
+ obj.update({
+ "HMaterID": OptionData.HItemID
+ , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+ , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+ , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+ , "HUnitID": OptionData.HUnitID
+ , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+ })
}
});
}
@@ -1475,8 +1566,91 @@
}
})
}
+ obj.event = "";
+ return false;
}
})
+
+ //鍙屽嚮
+ $('.layui-table-box tbody td[data-field="鐗╂枡浠g爜"]').off('dblclick').on('dblclick', function () {
+ var HOrgID = $("#HOrgID").val();
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "鐗╂枡鍒楄〃" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["90%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2&HOrgID=' + HOrgID, 'yes']
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鎸夐挳涓� 鐨勫洖璋�
+ var iframeWindow = window["layui-layer-iframe" + index];//鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
+
+ //if (checkStatus.data.length != 1) {
+ // return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+ //}
+ OptionData = checkStatus.data[0]; //鎶婇�変腑鏁版嵁鐨勭涓�鏉¤祴鍊肩粰OptionData鍙橀噺
+ if (checkStatus.data.length > 1) {
+ var rowIndex = $(obj.tr).attr("data-index") * 1;
+ for (var i = 0; i < checkStatus.data.length; i++) {
+ if (rowIndex + i >= option.data.length) {
+ var NewRow = {
+ "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
+ "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鏀舵枡浠撳簱": "",
+ "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
+ "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+ "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
+ };
+
+ table.cache["mainTable"].push(NewRow);
+ option.data = table.cache["mainTable"];
+
+ table.render(option);
+ }
+
+ var HMaterID = checkStatus.data[i].HItemID;
+ var resultData = getMaterialByMaterID(HMaterID);
+ option.data[rowIndex + i].HMaterID = resultData.HMaterID;
+ option.data[rowIndex + i].鐗╂枡浠g爜 = resultData.HMaterNumber;
+ option.data[rowIndex + i].鐗╂枡鍚嶇О = resultData.HMaterName;
+ option.data[rowIndex + i].瑙勬牸鍨嬪彿 = resultData.HMaterModel;
+ option.data[rowIndex + i].HUnitID = resultData.HUnitID;
+ option.data[rowIndex + i].璁¢噺鍗曚綅 = resultData.HUnitName;
+ ////鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ //obj.update({
+ // "HMaterID": checkStatus.data[0].HItemID
+ // , "鐗╂枡浠g爜": checkStatus.data[0].HNumber
+ // , "鐗╂枡鍚嶇О": checkStatus.data[0].HName
+ // , "瑙勬牸鍨嬪彿": checkStatus.data[0].HModel
+ // , "HUnitID": checkStatus.data[0].HUnitID
+ // , "璁¢噺鍗曚綅": checkStatus.data[0].HUnitName
+ //})
+ //layer.close(index);//鍏抽棴寮圭獥
+ }
+ table.render(option);
+ }
+ layer.closeAll();
+ //layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+ obj.update({
+ "HMaterID": OptionData.HItemID
+ , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+ , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+ , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+ , "HUnitID": OptionData.HUnitID
+ , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+ })
+ }
+ });
+ });
}
//琛屽唴浜嬩欢
@@ -1502,7 +1676,7 @@
})
switch (type) {
case '1105':
- return { url: "../../閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBackBillList.html", name: data[0]["HName"] };
+ return { url: "../../閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Cg_POInStockBackBillList.html", name: data[0]["HName"] };
break;
}
@@ -1513,7 +1687,7 @@
var HOrgID = $("#HOrgID").val();
var url = "";
if ($("#HSourceBillType").val() == "1105") {
- url = "../../閲囪喘绠$悊/鏀舵枡閫氱煡鍗�/Cg_POInStockBackBillList.html?openType=2&HOrgID=" + HOrgID;
+ url = "../../閲囪喘绠$悊/閫�鏂欓�氱煡鍗�/Cg_POInStockBackBillList.html?openType=2&HOrgID=" + HOrgID;
} else {
return layer.msg('褰撳墠涓嶆敮鎸佽婧愬崟閫夋嫨锛侊紒');
}
@@ -1693,7 +1867,118 @@
}
//#endregion
//#endregion
+ //#region 鍒楄缃�
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+ var colTitleName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colTitleName += 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 + '&colTitleName = ' + colTitleName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ 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 (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 (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ 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;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ }
+ //鍙栨秷鍐荤粨鍒�
+ 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);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+ //#endregion
//浠ヤ笂鏄痩ayui妯″潡
});
--
Gitblit v1.9.1