From be8b558b89a89deb3aa871fc2ddaacb7fb2197bd Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 16 十月 2023 09:25:14 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/仓存管理/条码生成/Gy_BarCodeBill.html | 237 +++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 190 insertions(+), 47 deletions(-)
diff --git "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill.html" "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill.html"
index 1750c4f..e7ce3e2 100644
--- "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill.html"
+++ "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Gy_BarCodeBill.html"
@@ -87,12 +87,10 @@
<option value="3">閲囪喘璁㈠崟</option>
<option value="4">鏀舵枡閫氱煡鍗�</option>
<option value="5">濮斿璁㈠崟</option>
- <option value="6">閫�璐ч�氱煡鍗�</option>
- <option value="7">鍏朵粬鍏ュ簱鍗�</option>
- <option value="8">鐩存帴璋冩嫧鍗�</option>
- <option value="9">閲囪喘閫�鏂欏崟</option>
- <option value="10">鐢熶骇閫�鏂欏崟</option>
- <option value="11">缁勮鎷嗗嵏鍗�</option>
+ <option value="6">鐢熶骇鍏ュ簱鍗�</option>
+ <option value="7">閲囪喘鍏ュ簱鍗�</option>
+ <option value="8">閿�鍞��璐у崟</option>
+ <option value="9">鐢熶骇閫�鏂欏崟</option>
</select>
</div>
</div>
@@ -166,6 +164,10 @@
<!-- 杩欓噷鐨� checked 鐨勭姸鎬佸彧鏄紨绀� -->
<input type="checkbox" name="checkbox" lay-skin="primary" lay-filter="HGiveAwayFlag1">
</script>
+ <script type="text/html" id="switchTp3">
+ <!-- 杩欓噷鐨� checked 鐨勭姸鎬佸彧鏄紨绀� -->
+ <input type="checkbox" name="checkbox" value="{{d.HExpirationDateFlag}}" lay-skin="primary" lay-filter="HExpirationDateFlag" {{ d.HExpirationDateFlag == 1 ? 'checked' : '' }}>
+ </script>
</form>
</div>
</div>
@@ -209,15 +211,49 @@
var option2 = [];
var sWhere = "";
var sBillType = "3801";
- var HModName = "";
+ var HModName = "Gy_BarCodeBill";
var titleData = ["鐗╂枡ID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "杈呭姪灞炴�D", "璁¢噺鍗曚綅ID", "瀹㈡埛ID", "HItemID", "hmainid", "hsubid", "HinterID", "杞﹂棿ID", "渚涘簲鍟咺D","HSTOCKORGID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
var HMaterID = "";
var HBatchNo = "";
var BatchNoArray; //鐢ㄦ潵瀛樺偍鑾峰彇鍒扮殑鎵瑰彿锛屽湪鎵规鎸夐挳鍔熻兘涓敤鍒�
var HMinQty2 = 0; //鐢ㄦ潵瀛樺偍杈撳叆鐨勬渶灏忓寘瑁呮暟锛屽湪鎵规鎸夐挳鍔熻兘涓敤鍒�
- //#endregion
-
+
+ var HMaterInfo = ""; //瀛樺偍鐗╂枡淇℃伅
+ var HBarInfo = ""; //瀛樺偍鏉$爜淇℃伅
+ var HFileList = ""; //瀛樺偍妗f鍒楄〃
+ //#endregion
+
+ //鐩戝惉褰撳墠澶勪簬鍝竴涓〉绛撅紝浼� HModName 鍊�
+ element.on('tab(tab-TabTest)', function (data) {
+ HMaterInfo = table.cache['mainTable'];
+ var cur_title = data.elem.context.innerText;
+ if (cur_title == "鐗╂枡淇℃伅") {
+ HModName = "Gy_BarCodeBill";
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ table.reload('mainTable', {
+ data: HMaterInfo // 璋冪敤table.reload 閲嶆柊娓叉煋鏄剧ず鍔犺浇杩藉姞浜嗘暟鎹殑琛ㄦ牸
+ });
+
+ } else if (cur_title == "鏉$爜淇℃伅") {
+ HModName = "Gy_BarCodeBill_1";
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn1();
+ table.reload('mainTable1', {
+ data: HBarInfo // 璋冪敤table.reload 閲嶆柊娓叉煋鏄剧ず鍔犺浇杩藉姞浜嗘暟鎹殑琛ㄦ牸
+ });
+ } else if (cur_title == "妗f鍒楄〃") {
+ HModName = "Gy_BarCodeBill_2";
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn2();
+ //鍔犺浇妗f鍒楄〃
+ table.reload('mainTable2', {
+ data: HFileList // 璋冪敤table.reload 閲嶆柊娓叉煋鏄剧ず鍔犺浇杩藉姞浜嗘暟鎹殑琛ㄦ牸
+ });
+ }
+ })
+
//#region 杩涘叆椤甸潰鏃㈠姞杞�
//鍒濆鍖栬〃鍗曟彃浠�
set_InitFrom();
@@ -226,16 +262,16 @@
//鍔犺浇宸ュ巶浠g爜鏁版嵁
set_HWorksNumber();
//鍔犺浇鏉$爜绫诲瀷鏁版嵁
- set_HBarCodeType();
+ set_HBarCodeType();
+
+ var rowdata = [{
+ "HMaterID": 0, "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HBQty": 0, "HMinQty": 0, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
+ "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0
+ }];
//鍒濆鍖栬〃鏍�
set_InitGrid();
set_CountGrid();
set_InitGrid2();
-
- //鍒濆鍖栬〃鏍�
- DisPlay_HideColumn();
- DisPlay_HideColumn1();
- DisPlay_HideColumn2();
//鍒ゆ柇鎿嶄綔绫诲瀷
if (OperationType == 1) {//鏃犳簮鏂板
@@ -251,16 +287,20 @@
else {
layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
}
- //#endregion
+ //#endregion
//#region 鐐瑰嚮浜嬩欢锛屽寘鎷琽n鍜宖orm浜嬩欢
//澶村伐鍏锋爮
table.on('toolbar(mainTable)', function (obj) {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;;
- var AddRow = table.cache['mainTable'];
- var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" };
- console.log(NewRow);
+ var AddRow = table.cache['mainTable'];
+
+ var NewRow = {
+ "HMaterID": 0, "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HBQty": 0, "HMinQty": 0, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
+ "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0
+ };
+ //console.log(NewRow);
switch (obj.event) {
//鏂板涓�琛�
case 'btn-AddLine': btnAddLine(NewRow);
@@ -296,6 +336,45 @@
table.on('tool(mainTable)', function (obj) {
set_GridDelete(obj); //琛屽唴鍒犻櫎
set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+
+ //#region 淇敼琛� 鏃堕棿
+
+ var data = obj.data;
+ //鐢熶骇鏃ユ湡
+ if (obj.event == 'HProduceDate') {
+ var field = $(this).data('field');
+ laydate.render({
+ elem: this.firstChild
+ , show: true //鐩存帴鏄剧ず
+ , closeStop: this
+ , done: function (nowDate) {
+ //鏃堕棿閫夋嫨瀹屾垚锛岃鏁版嵁鏇存柊
+ data[field] = nowDate;
+ obj.update(data);
+ //鍒锋柊澶嶉�夋
+ //checkRefresh();
+ }
+ });
+ }
+
+ //淇濊川鏈熻嚦
+ if (obj.event == 'HExpiryDate') {
+ var field = $(this).data('field');
+ laydate.render({
+ elem: this.firstChild
+ , show: true //鐩存帴鏄剧ず
+ , closeStop: this
+ , done: function (nowDate) {
+ //鏃堕棿閫夋嫨瀹屾垚锛岃鏁版嵁鏇存柊
+ data[field] = nowDate;
+ obj.update(data);
+ //鍒锋柊澶嶉�夋
+ //checkRefresh();
+ }
+ });
+ }
+
+ //#endregion
});
//鐩戝惉鍗曞厓鏍肩紪杈� 鍗曞厓鏍肩紪杈戝悗 鍙樻洿
@@ -375,6 +454,18 @@
case '5':
return "濮斿璁㈠崟";
break;
+ case '6':
+ return "鐢熶骇鍏ュ簱鍗�";
+ break;
+ case '7':
+ return "閲囪喘鍏ュ簱鍗�";
+ break;
+ case '8':
+ return "閿�鍞��璐у崟";
+ break;
+ case '9':
+ return "鐢熶骇閫�鏂欏崟";
+ break;
}
}
@@ -386,7 +477,7 @@
//鑾峰彇缁勭粐ID
var SetHOrgID = $("#HOrgID").find("option:selected").val();
//椤甸潰灞�-鑷畾涔�
- var url = '../../PublicPage/HSourceReportHtml.html?OperationType=3&linterid=' + SetHOrgID + '&HSouceBillType=' + getSupType() + '';
+ var url = '../../PublicPage/HSourceReportHtml.html?OperationType=3&HOrgID=' + SetHOrgID + '&HSouceBillType=' + getSupType() + '';
url = encodeURI(url);
//alert(url);
layer.open({
@@ -437,7 +528,17 @@
HMaterID = result.list[0].HMaterID;
HBatchNo = result.list[0].HBatchNo;
if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ for (let i = 0; i < result.list.length; i++) {
+ result.list[i].HQty = result.list[i].HQty.toString().match(/^\d+(?:\.\d{0,6})?/)[0] //淇濈暀灏忔暟鐐瑰悗鍏綅灏忔暟
+ if (result.list[i].HMinQty != 0) {
+ result.list[i].HBQty = Math.ceil(result.list[i].HQty / result.list[i].HMinQty)
+ }
+ }
+
BatchNoArray = result.list; //鑾峰彇鎵瑰彿锛岀敤鏉ョ粰鎵规鎸夐挳鍔熻兘涓殑鎵瑰彿璧嬪��
+ //for (let i = 0; i < result.list.length; i++) {
+ // result.list[i].HMinQty = '';//鐐瑰嚮鍗曞厓鏍肩殑鏃跺�欓粯璁ゅ��0涓嶄細娓呴櫎锛屽鎴风湅浜嗕細瑙夊緱寰堟�紝鎵�浠ュ厛鐢ㄧ┖瀛楃涓插彇浠�;
+ //}
table.reload('mainTable', {
data: result.list // 璋冪敤table.reload 閲嶆柊娓叉煋鏄剧ず鍔犺浇杩藉姞浜嗘暟鎹殑琛ㄦ牸
});
@@ -482,10 +583,13 @@
//鏉$爜鐢熸垚
form.on('submit(ToolCreate)', function (data) {
+ $('#ToolCreate').addClass("layui-btn-disabled").attr("disabled", true);//鐢熸垚鎸夐挳绂佺敤
var sSubStr = JSON.stringify(table.cache['mainTable']);
+ HMaterInfo = table.cache['mainTable'];
//鐗╂枡鏄庣粏淇℃伅涓嶄负绌哄垽鏂�
if (!AllowLoadData(sSubStr))//鏁版嵁楠岃瘉
{
+ $('#ToolCreate').removeClass("layui-btn-disabled").attr("disabled", false);//鐢熸垚鎸夐挳鍚敤
return false;
}
//鑾峰彇閫夋嫨鐨勭粍缁�
@@ -501,8 +605,8 @@
//鑾峰彇閫夋嫨鐨勬潯鐮佺被鍨�
var HSelectBarCodeType = $("#HBarCodeType").find("option:selected").html();
//鑾峰彇褰撳墠鐧诲綍浜哄憳
- //var UserName = sessionStorage["HUserName"];
- var UserName = "Admin";
+ var UserName = sessionStorage["HUserName"];
+ //var UserName = "Admin";
var sMainSub = sSubStr + ';' + HOrgType + ';' + HSourceBillType + ';' + HSelectBarCodeType + ';' + CampanyName + ';' + UserName;
SaveBarCodeCreate(sMainSub);
})
@@ -562,7 +666,7 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- var arr = [{ HBillNo: '', HMaterNumber: checkStatus.data[0].鐗╂枡浠g爜, HMaterName: checkStatus.data[0].鐗╂枡鍚嶇О, HMaterModel: '', HAuxPropNumber: '', HAuxPropName: '', HUnitNumber: checkStatus.data[0].璁¢噺鍗曚綅浠g爜, HUnitName: checkStatus.data[0].璁¢噺鍗曚綅, HBatchNo: '', HGiveAwayFlag: '0', HQty: checkStatus.data[0].鏁伴噺, HMinQty: '0', HPackQty: '0', HBQty: '0', HDate: '', HCusNumber: '', HCusName: '', HSeOrderBillNo: '', HRemark: '' }]
+ var arr = [{ HBillNo: '', HMaterNumber: checkStatus.data[0].鐗╂枡浠g爜, HMaterName: checkStatus.data[0].鐗╂枡鍚嶇О, HMaterModel: '', HAuxPropNumber: '', HAuxPropName: '', HUnitNumber: checkStatus.data[0].璁¢噺鍗曚綅浠g爜, HUnitName: checkStatus.data[0].璁¢噺鍗曚綅, HBatchNo: '', HGiveAwayFlag: '0', HQty: checkStatus.data[0].鏁伴噺.toString("#0.00"), HMinQty: checkStatus.data[0].鏈�灏忓寘瑁呮暟, HPackQty: '0', HBQty: '0', HDate: '', HCusNumber: '', HCusName: '', HSeOrderBillNo: '', HRemark: '' }]
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
table.reload('mainTable', {
data: arr // 璋冪敤table.reload 閲嶆柊娓叉煋鏄剧ず鍔犺浇杩藉姞浜嗘暟鎹殑琛ㄦ牸
@@ -717,7 +821,7 @@
function set_InitGrid() {
columns = [
{ type: 'checkbox', fixed: 'left' }
- , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
+ , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 75 }
, { field: 'HMainID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }
, { field: 'HSubID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }
, { field: 'HBillNo', title: '婧愬崟鍗曞彿', width: 200 }
@@ -725,24 +829,32 @@
, { field: 'HMaterNumber', title: '鐗╂枡浠g爜', edit: 'text', event: 'HMaterNumber', width: 200 }
, { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 200 }
, { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 200 }
+ , { field: 'HBatchNo', title: '鎵瑰彿', edit: 'text', width: 100 }
+ , { field: 'HQty', title: '鏁伴噺', edit: 'text', width: 100 }
+ , { field: 'HMinQty', title: '鏈�灏忓寘瑁呮暟', edit: 'text', width: 100 }
+ , { field: 'HBQty', title: '绠辨暟', width: 100 }
+ , { field: 'HPackQty', title: '澶栫鏁�', edit: 'text', width: 100 }
+ , { field: 'HCoilNO', title: '閽㈠嵎鎹嗗寘鍙�', edit: 'text', width: 100 }
+ , { field: 'HFurnaceNO', title: '鐐夊彿', edit: 'text', width: 100 }
+ , { field: 'HFactory', title: '鍘傚晢', edit: 'text', width: 100 }
+ , { field: 'HCusID', title: '瀹㈡埛ID', width: 100, hide: true }
+ , { field: 'HCusNumber', title: '瀹㈡埛浠g爜', edit: 'text', event: 'HCusNumber', width: 120 }
+ , { field: 'HCusName', title: '瀹㈡埛鍚嶇О', width: 120 }
+ , { field: 'HSeOrderBillNo', title: '閿�鍞鍗曞彿', width: 200 }
+ , { field: 'HRemark', title: '澶囨敞', edit: 'text', width: 100 }
+ , { field: 'HProduceDate', title: '鐢熶骇鏃ユ湡', event: 'HProduceDate', width: 100 }
+ , { field: 'HExpiryDate', title: '淇濊川鏈熻嚦', event: 'HExpiryDate', width: 100 }
+ , { field: 'HheatNO', title: '鐑鐞�', edit: 'text', width: 100 }
, { field: 'HAuxPropID', title: '杈呭姪灞炴�D', width: 100, hide: true }
, { field: 'HAuxPropNumber', title: '杈呭姪灞炴�т唬鐮�', edit: 'text', event: 'HAuxPropNumber', width: 100 }
, { field: 'HAuxPropName', title: '杈呭姪灞炴�у悕绉�', width: 100 }
, { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100, hide: true }
, { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', edit: 'text', event: 'HUnitNumber', width: 100 }
, { field: 'HUnitName', title: '璁¢噺鍗曚綅',width: 100 }
- , { field: 'HBatchNo', title: '鎵瑰彿', edit: 'text', width: 100 }
+ , { field: 'HAuxQty', title: '杈呭崟浣嶆暟閲�', edit: 'text', width: 100 }
+ , { field: 'HExpirationDateFlag', title: '鏄惁鍚敤淇濊川鏈�', width: 100, templet: '#switchTp3', unresize: false }
, { field: 'HGiveAwayFlag', title: '鏄惁璧犲搧', width: 100, templet: '#switchTpl', unresize: false }
- , { field: 'HQty', title: '鏁伴噺', edit: 'text', width: 100 }
- , { field: 'HMinQty', title: '鏈�灏忓寘瑁呮暟', edit: 'text', width: 100 }
- , { field: 'HBQty', title: '绠辨暟', width: 100 }
- , { field: 'HPackQty', title: '澶栫鏁�', edit: 'text', width: 100 }
, { field: 'HDate', title: '杩涙枡鏃ユ湡', width: 100 }
- , { field: 'HCusID', title: '瀹㈡埛ID', width: 100, hide: true }
- , { field: 'HCusNumber', title: '瀹㈡埛浠g爜', edit: 'text', event: 'HCusNumber', width: 120 }
- , { field: 'HCusName', title: '瀹㈡埛鍚嶇О', width: 120 }
- , { field: 'HSeOrderBillNo', title: '閿�鍞鍗曞彿', width: 200 }
- , { field: 'HRemark', title: '澶囨敞', edit: 'text', width: 100 }
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
];
option = {
@@ -750,13 +862,15 @@
, elem: '#mainTable'
, toolbar: '#toolbarDemo'
, page: false
- , cellMinWidth: 120
- , height: 650
+ , cellMinWidth: 75
+ , height: 'full-325'
, cols: [columns]
, limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
, done: function (res, curr, count) {
}
};
+ option.data = rowdata;
+ table.render(option);
}
//鍒濆鏉$爜淇℃伅琛ㄦ牸
function set_CountGrid() {
@@ -787,12 +901,11 @@
option1 = {
id: 'mainTable1'
, elem: '#mainTable1'
- , toolbar: '#toolbarDemo1'
- , height: 500
+ , toolbar: '#toolbarDemo1'
, page: false
, limit: 500
, cellMinWidth: 120
- , height: 650
+ , height: 'full-325'
, cols: [columns]
, done: function (res, curr, count) {
}
@@ -857,12 +970,11 @@
option2 = {
id: 'mainTable2'
, elem: '#mainTable2'
- , toolbar: '#toolbarDemo2'
- , height: 500
+ , toolbar: '#toolbarDemo2'
, page: false
, limit: 500
, cellMinWidth: 120
- , height: 650
+ , height: 'full-325'
, cols: [columns]
, done: function (res, curr, count) {
}
@@ -873,9 +985,15 @@
option.data = [{
"HMainID": 0, "HSubID": 0, "HBillNo": "", "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": ""
, "HAuxPropID": 0, "HAuxPropNumber": "", "HAuxPropName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HBatchNo": "", "HGiveAwayFlag": 0
- , "HQty": 0, "HMinQty": 0, "HBQty": 0, "HPackQty": 0, "HDate": "", "HCusID": 0, "HCusNumber": "", "HCusName": "", "HSeOrderBillNo": "", "HRemark": ""
+ , "HQty": 0, "HMinQty": '', "HBQty": 0, "HPackQty": 0, "HDate": "", "HCusID": 0, "HCusNumber": "", "HCusName": "", "HSeOrderBillNo": "", "HRemark": ""
+ , "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
+ "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0
}];
table.render(option);
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ DisPlay_HideColumn1();
+ DisPlay_HideColumn2();
}
function set_AddFNew1() {
@@ -883,13 +1001,22 @@
"HBarCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HAuxPropNumber": "", "HAuxPropName": ""
, "HGiveAwayFlag": "", "HUnitCode": "", "HUnitName": "", "HQty": 0, "HDate": "", "HCusNumber": "", "HCusName": ""
, "HSourceBillNo": "", "HSeOrderBillNo": "", "HRemark": "", "HMTONo": "", "HShowDate": "", "HInnerBillNo": "", "HMaker": ""
+ , "HExpirationDateFlag": 0
}];
table.render(option1);
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ DisPlay_HideColumn1();
+ DisPlay_HideColumn2();
}
function set_AddFNew2() {
option2.data = [];
table.render(option2);
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ DisPlay_HideColumn1();
+ DisPlay_HideColumn2();
}
//鏃ユ湡鏍煎紡鍖�
@@ -919,11 +1046,12 @@
table.cache["mainTable"].push(NewRow);
option.data = table.cache["mainTable"];
table.render(option);
- rows++;
+ //rows++;
layer.msg('澧炲姞涓�琛屾寜閽紒')
}
//澶嶅埗涓�琛�
function btnCopyLine(data) {
+ data[0].HQty = '';
var copydata = JSON.stringify(data);
if (data.length <= 0) {
layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
@@ -1182,7 +1310,9 @@
dataCol = data1.data[0].HGridString.split(',');
for (var i = 0; i < option2.cols[0].length - 2; i++) {
- var dataCols = dataCol[i].split('|');
+ if (dataCol[i]) {
+ var dataCols = dataCol[i].split('|');
+ }
//闅愯棌鍒�
if (dataCols[1] == 1) {
option2.cols[0][i + 1]["hide"] = true;
@@ -1285,7 +1415,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../PublicPage/PartInformation.html', 'yes'],
+ content: ['../../Baseset/鍩虹璧勬枡/Gy_MaterialList.html', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -1301,9 +1431,19 @@
HMaterID: checkStatus.data[0].HItemID,
HMaterNumber: checkStatus.data[0].HNumber,
HMaterName: checkStatus.data[0].HName,
- HMaterModel: checkStatus.data[0].HModel
+ HMaterModel: checkStatus.data[0].HModel,
+ HUnitID: checkStatus.data[0].HUnitID,
+ HUnitNumber: checkStatus.data[0].HUnitNumber,
+ HUnitName: checkStatus.data[0].HUnitName
});
+ if ($("#HBarCodeType").find("option:selected").html() == '鎵樼洏鏉$爜') {
+ obj.update({
+ HQty: 1, //鏁伴噺
+ HMinQty: 1, //鏈�灏忓寘瑁呮暟閲�
+ HBQty: 1 //绠辨暟
+ });
+ }
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) {
@@ -1463,14 +1603,17 @@
table.reload('mainTable1', {
data: result.list // 璋冪敤table.reload 閲嶆柊娓叉煋鏄剧ず鍔犺浇杩藉姞浜嗘暟鎹殑琛ㄦ牸
});
+ HBarInfo = result.list;
//鐢熸垚鎴愬姛璺宠浆鍒版潯鐮佷俊鎭爣绛鹃〉
element.tabChange('tab-TabTest', '3');
//鍔犺浇妗f鍒楄〃
table.reload('mainTable2', {
data: result.data // 璋冪敤table.reload 閲嶆柊娓叉煋鏄剧ず鍔犺浇杩藉姞浜嗘暟鎹殑琛ㄦ牸
});
+ HFileList = result.data;
}
else {
+ $('#ToolCreate').removeClass("layui-btn-disabled").attr("disabled", false);//鐢熸垚鎸夐挳鍚敤
layer.alert(result.Message, { icon: 5 });
}
layer.closeAll("loading");
--
Gitblit v1.9.1