From 727ee25aeb5fcaf84e2cf009b2eacd3a86bcb3ca Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 28 十一月 2024 12:55:23 +0800
Subject: [PATCH] 新增 环境检测方案,环境检测单
---
WebTM/views/采购管理/采购合同/Add_Edit_Cg_ContractBillList.html | 665 +++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 596 insertions(+), 69 deletions(-)
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html"
index e3a5a03..cec8419 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html"
@@ -197,25 +197,11 @@
</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 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>
- </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;">
@@ -228,18 +214,32 @@
<input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" 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="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-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 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>
@@ -260,6 +260,8 @@
<div class="layui-btn-container">
<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="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>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
</div>
</script>
@@ -321,7 +323,8 @@
//璁板綍缁勭粐鐨勫��
var HOrgIDBar = 0;
-
+ var HModName = "Add_Edit_Cg_ContractBillSub1"
+ var HModName2 = "Add_Edit_Cg_ContractBillSub2"
//#region 杩涘叆椤甸潰鍗冲姞杞�
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
@@ -439,6 +442,16 @@
//checkRefresh();
}
break;
+ //搴撳瓨鏌ヨ
+ case 'get_Inventory': get_Inventory();
+ break;
+ //鍑哄叆搴撹褰曟煡璇�
+ case 'get_InOutSum': get_InOutSum();
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
//鍒楄缃�
//case 'set_hidecolumn':
// get_hidecolumn();
@@ -479,6 +492,10 @@
//鍒锋柊澶嶉�夋
//checkRefresh();
}
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn2':
+ get_HideColumn2();
break;
//鍒楄缃�
//case 'set_hidecolumn':
@@ -574,7 +591,10 @@
//鏁板�兼牸寮忔牎楠屽伐鍏�
var ref = /^\d+(\.\d+)?$/; //闈炶礋鏁版鍒欒〃杈惧紡
var temp = ""; //瀹氫箟涓�涓┖瀛楃涓插彉閲� temp
-
+ 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(); //鑾峰彇褰撳墠鐨勫�艰祴鍊肩粰oldtext 鑾峰彇褰撳墠鍏冪礌锛堝彲鑳芥槸涓�涓〃鏍煎崟鍏冩牸锛夌殑鍓嶄竴涓悓绾у厓绱犵殑鏂囨湰鍐呭锛屽苟灏嗚繖涓枃鏈唴瀹瑰瓨鍌ㄥ湪鍙橀噺oldText涓�
var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
@@ -590,7 +610,6 @@
HQty: oldText //灏唄qty瀛楁鎭㈠鍒颁繚瀛樺崟鍏冩牸鐨勫��
});
table.render(option); //閲嶆柊娓叉煋琛ㄦ牸
-
layer.msg("鏁伴噺璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!"); //鎻愮ず璇疯緭鍏ュぇ浜�0鏁板瓧
return;
}
@@ -599,10 +618,15 @@
var HPrice = obj.data.HPrice * 1; //鍗曚环
var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
var HTaxRate = obj.data.HTaxRate * 0.01; //绋庣巼
- var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4)); //绋庨=閲戦*绋庣巼
+ var HTaxMoney = Number((HMoney * HTaxRate)); //绋庨=閲戦*绋庣巼
var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
var HExRate = $("#HExRate").val(); //姹囩巼
-
+ //鏁板瓧绮惧害
+ HQty = Number(HQty.toFixed(HQtyDec));
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({ //鏇存柊琛ㄦ牸鏁版嵁 鏂规硶鏄瀵硅薄鎻愪緵鐨勪竴涓柟娉曪紝鐢ㄤ簬鏇存柊鍏跺唴閮ㄧ姸鎬佹垨涓庝箣鍏宠仈鐨勬暟鎹簮
HQty: HQty // 鏇存柊HQty瀛楁锛屽叾鍊兼潵鑷彉閲廐Qty
@@ -611,6 +635,7 @@
, HTaxMoney: HTaxMoney //鏇存柊HMoney瀛楁锛屽叾鍊兼潵鑷彉閲廐Money
, HlineTotal: HlineTotal //鏂癏lineTotal瀛楁锛屽叾鍊兼潵鑷彉閲廐lineTotal
});
+ table.render(option)
break;
case "HPrice": //鍗曚环
//鏁版嵁鏍煎紡鏍¢獙
@@ -620,7 +645,7 @@
obj.update({ //浣跨敤obj.update鏂规硶鏇存柊琛ㄦ牸涓煇涓�琛岀殑鏁版嵁
HPrice: oldText //灏咹Price瀛楁鎭㈠鍒颁繚瀛樺崟鍏冩牸鐨勫��
});
-
+ table.render(option); //閲嶆柊娓叉煋琛ㄦ牸
layer.msg("鍗曚环璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!"); //鎻愮ず 鍗曚环璇疯緭鍏ュぇ浜�0鐨勬暟瀛�!
return;
}
@@ -633,6 +658,12 @@
var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4)); //绋庨=閲戦*绋庣巼
var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
var HExRate = $("#HExRate").val(); //姹囩巼
+ //鏁板瓧绮惧害
+ HQty = Number(HQty.toFixed(HQtyDec));
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
@@ -642,6 +673,7 @@
, HTaxMoney: HTaxMoney
, HlineTotal: HlineTotal
});
+ table.render(option)
break;
case "HTaxRate": //鏁伴噺
//鏁版嵁鏍煎紡鏍¢獙
@@ -652,6 +684,7 @@
HTaxRate: oldText
});
layer.msg("绋庣巼璇疯緭鍏ヤ笉灏忎簬0鐨勬暟瀛�!");
+ table.render(option); //閲嶆柊娓叉煋琛ㄦ牸
return;
}
@@ -665,6 +698,13 @@
var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
var HExRate = $("#HExRate").val(); //姹囩巼
+ //鏁板瓧绮惧害
+ HQty = Number(HQty.toFixed(HQtyDec));
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
HTaxRate: HTaxRate * 100
@@ -675,7 +715,6 @@
, HlineTotal: HlineTotal
});
break;
- table.render(option);
default:
}
});
@@ -758,7 +797,7 @@
, loading: false
, cols: [[ //瀛愯〃
{ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�', style: 'background-color:#efefef4d;' }
- , { type: 'numbers', title: '搴忓彿', width: 100, style: 'background-color:#efefef4d;' }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100, style: 'background-color:#efefef4d;' }
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
@@ -770,14 +809,15 @@
, { field: 'HMoney', title: '閲戦', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
, { field: 'HTaxRate', title: '绋庣巼', width: 100, edit: 'text' }
, { field: 'HTaxMoney', title: '绋庨', width: 100, style: 'background-color:#efefef4d;' }
- , { field: 'HlineTotal', title: '浠风◣鍚堣', width: 100, edit: 'text' }
+ , { field: 'HlineTotal', title: '浠风◣鍚堣', width: 100, style: 'background-color:#efefef4d;' }
, { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+ , { fixed: 'right', field: '鎿嶄綔', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
]]
}
option.data = rowdata;
table.render(option);
+ DisPlay_HideColumn();
}
function set_InitGrid2() {
option2 = {
@@ -789,19 +829,20 @@
, loading: false
, cols: [[ //瀛愯〃
{ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�', style: 'background-color:#efefef4d;' }
- , { type: 'numbers', title: '搴忓彿', width: 100, style: 'background-color:#efefef4d;' }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100, style: 'background-color:#efefef4d;' }
, { field: 'HCurID', title: '璐у竵浠g爜', width: 100, hide: true }
, { field: '璐у竵鍚嶇О', title: '璐у竵鍚嶇О', width: 100, edit: 'text', event: "HCurID" }//f7
, { field: 'HExRate', title: '姹囩巼', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
, { field: 'HMoney', title: '閲戦', width: 100, edit: 'text', totalRow: true }
, { field: 'HDate', title: '鍒拌揣鏃ユ湡', width: 120, event: 'HDate' }
, { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo2', width: 70 }
+ , { fixed: 'right', field: '鎿嶄綔', title: '鎿嶄綔', toolbar: '#barDemo2', width: 70 }
]]
}
option2.data = rowdata2;
table.render(option2);
+ DisPlay_HideColumn2();
}
//#endregion
//#region 鍔犺浇琛ㄥご
@@ -838,14 +879,15 @@
, "HSSName": data[0].缁撶畻鏂瑰紡
, "HInnerBillNo": data[0].鍐呴儴鍗曟嵁
, "HRemark": data[0].琛ㄥご澶囨敞
- , "HMaker": data[0].鍒跺崟浜�
- , "HChecker": data[0].瀹℃牳浜�
- , "HCloseMan": data[0].鍏抽棴浜�
- , "HMakeDate": data[0].鍒跺崟鏃ユ湡
- , "HCheckDate": data[0].瀹℃牳鏃ユ湡
- , "HCloseDate": data[0].鍏抽棴鏃ユ湡
- , "HUpDateDate": data[0].淇敼鏃ユ湡
- , "HDeleteDate": data[0].浣滃簾鏃ユ湡
+ , "HMaker": data.鍒跺崟浜�
+ , "HUpDater": data.淇敼浜�
+ , "HChecker": data.瀹℃牳浜�
+ , "HCloseMan": 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")
, "HContractDate": formatDate(data[0].鍚堝悓鏃ユ湡)
, "HContractName": data[0].鍚堝悓鍚嶇О
});
@@ -1006,6 +1048,56 @@
}
//#endregion
+ //#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 鎸塅7 寮圭獥鍔熻兘
//琛屽唴蹇嵎閿瓫閫�
function set_GridCellCheck(obj) {
@@ -1033,31 +1125,34 @@
// return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
//}
OptionData = checkStatus.data[0];
- 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, "璁¢噺鍗曚綅": "", "HWHID": 0, "HWHName": "", "鏁伴噺": "", "HRemark": ""
- , "HPrice": "0", "HTaxPrice": "0", "HMoney": "0", "HDiscountRate": "1", "HRelTaxPrice": "0", "HTaxRate": "0", "HTaxMoney": "0", "HlineTotal": "0", "HlineTotalBB": "0", "HDate": Format(new Date, "yyyy- MM - dd")
- };
+ var TaxRate = getHTaxRateByHSupID();
+ 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, "璁¢噺鍗曚綅": "", "HWHID": 0, "HWHName": "", "鏁伴噺": "", "HRemark": ""
+ , "HPrice": "0", "HTaxPrice": "0", "HMoney": "0", "HDiscountRate": "1", "HRelTaxPrice": "0", "HTaxRate": "0", "HTaxMoney": "0", "HlineTotal": "0", "HlineTotalBB": "0", "HDate": Format(new Date, "yyyy- MM - dd")
+ };
- table.cache["mainTable"].push(NewRow);
- option.data = table.cache["mainTable"];
+ table.cache["mainTable"].push(NewRow);
+ option.data = table.cache["mainTable"];
- table.render(option);
+ 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;
+ option.data[rowIndex + i].HTaxRate = TaxRate;
}
-
- 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;
-
+ table.render(option);
}
- table.render(option);
layer.closeAll();
//layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -1066,14 +1161,60 @@
//return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
},
end: function () {
- obj.update({
- "HMaterID": OptionData.HItemID
- , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
- , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
- , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
- , "HUnitID": OptionData.HUnitID
- , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
- })
+ //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+ var HSupID = $("#HSupID").val();
+ if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+ 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"]; //閲戦绮惧害
+ $.ajax({
+ url: GetWEBURL() + "/Gy_Supplier/xg",
+ //url: "http://localhost:12761/Gy_Supplier/xg",
+ type: "GET",
+ data: {
+ "HInterID": HSupID
+ },
+ success: function (d) {
+ var HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�) * 0.01;
+ //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ var HQty = obj.data.HQty * 1; //鏁伴噺
+ var HPrice = obj.data.HPrice * 1; //鍗曚环
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ var HTaxMoney = Number((HMoney * HTaxRate)); //绋庨=閲戦*绋庣巼
+ var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
+ //鏁板瓧绮惧害
+ HQty = Number(HQty.toFixed(HQtyDec));
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
+ "HMaterID": OptionData.HItemID //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
+ , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+ , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+ , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+ , "HUnitID": OptionData.HUnitID
+ , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+ , "HTaxRate": HTaxRate * 100
+ , HQty: HQty //鏇存柊HQty瀛楁锛孒Qty
+ , HPrice: HPrice //鏇存柊HPrice瀛楁锛孒Price
+ , HMoney: HMoney //鏇存柊HMoney瀛楁锛孒Money
+ , HTaxMoney: HTaxMoney //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
+ , HlineTotal: HlineTotal //鏇存柊HlineTotal瀛楁锛孒lineTotal
+ })
+ }
+ });
+ } else if (typeof (OptionData.HItemID) != "undefined") {
+ obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
+ "HMaterID": OptionData.HItemID //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
+ , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+ , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+ , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+ , "HUnitID": OptionData.HUnitID
+ , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+ })
+ }
}
});
}
@@ -1152,6 +1293,121 @@
}
})
+ //鍙屽嚮
+ $('.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];
+ var TaxRate = getHTaxRateByHSupID();
+ 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, "璁¢噺鍗曚綅": "", "HWHID": 0, "HWHName": "", "鏁伴噺": "", "HRemark": ""
+ , "HPrice": "0", "HTaxPrice": "0", "HMoney": "0", "HDiscountRate": "1", "HRelTaxPrice": "0", "HTaxRate": "0", "HTaxMoney": "0", "HlineTotal": "0", "HlineTotalBB": "0", "HDate": Format(new Date, "yyyy- MM - dd")
+ };
+
+ 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;
+ option.data[rowIndex + i].HTaxRate = TaxRate;
+ }
+ table.render(option);
+ }
+ layer.closeAll();
+ //layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+ //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+ var HSupID = $("#HSupID").val();
+ if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
+ 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"]; //閲戦绮惧害
+ $.ajax({
+ url: GetWEBURL() + "/Gy_Supplier/xg",
+ //url: "http://localhost:12761/Gy_Supplier/xg",
+ type: "GET",
+ data: {
+ "HInterID": HSupID
+ },
+ success: function (d) {
+ var HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�) * 0.01;
+ //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ var HQty = obj.data.HQty * 1; //鏁伴噺
+ var HPrice = obj.data.HPrice * 1; //鍗曚环
+ var HMoney = HQty * HPrice; //閲戦=鏁伴噺*鍗曚环
+ var HTaxMoney = Number((HMoney * HTaxRate)); //绋庨=閲戦*绋庣巼
+ var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
+ //鏁板瓧绮惧害
+ HQty = Number(HQty.toFixed(HQtyDec));
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
+ "HMaterID": OptionData.HItemID //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
+ , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+ , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+ , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+ , "HUnitID": OptionData.HUnitID
+ , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+ , "HTaxRate": HTaxRate * 100
+ , HQty: HQty //鏇存柊HQty瀛楁锛孒Qty
+ , HPrice: HPrice //鏇存柊HPrice瀛楁锛孒Price
+ , HMoney: HMoney //鏇存柊HMoney瀛楁锛孒Money
+ , HTaxMoney: HTaxMoney //鏇存柊HTaxMoney瀛楁锛孒TaxMoney
+ , HlineTotal: HlineTotal //鏇存柊HlineTotal瀛楁锛孒lineTotal
+ })
+ }
+ });
+ } else if (typeof (OptionData.HItemID) != "undefined") {
+ obj.update({ //鏇存柊琛ㄦ牸鏁版嵁
+ "HMaterID": OptionData.HItemID //璁剧疆HItemID鐨勫�间负鈥淗BillNo鈥濆瓧娈电殑鍊糎ItemID`鐨勫��
+ , "鐗╂枡浠g爜": OptionData.鐗╂枡浠g爜
+ , "鐗╂枡鍚嶇О": OptionData.鐗╂枡鍚嶇О
+ , "瑙勬牸鍨嬪彿": OptionData.瑙勬牸鍨嬪彿
+ , "HUnitID": OptionData.HUnitID
+ , "璁¢噺鍗曚綅": OptionData.璁¢噺鍗曚綅鍚嶇О
+ })
+ }
+ }
+ });
+ });
}
//琛屽唴鍒犻櫎
@@ -1328,6 +1584,55 @@
}
//#endregion
+ //#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 閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+ function getHTaxRateByHSupID() {
+ var HTaxRate;
+ //閫氳繃渚涘簲鍟唅d鑾峰彇绋庣巼
+ var HSupID = $("#HSupID").val();
+ if (HSupID != 0) {
+ $.ajax({
+ url: GetWEBURL() + "/Gy_Supplier/xg",
+ type: "GET",
+ async: false,
+ data: {
+ "HInterID": HSupID
+ },
+ success: function (d) {
+ HTaxRate = parseInt(d.data[0].澧炲�肩◣鐜�);
+ }
+ });
+ } else {
+ HTaxRate = 0;
+ }
+ return HTaxRate;
+ }
+ //#endregion
//#region 淇濆瓨鍚庢祻瑙堟柟娉�
function ReRoadBillMain() {
@@ -1338,7 +1643,229 @@
//#endregion
//#endregion
+ //#region 鍒楄缃�1
+ //闅愯棌鍒楄缃�
+ 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
+
+ //#region 鍒楄缃�2
+ //闅愯棌鍒楄缃�
+ function get_HideColumn2() {
+ var colName = "";
+ for (var i = 1; i < option2.cols[0].length - 1; i++) {
+ colName += option2.cols[0][i]["field"] + ",";
+ }
+ var colTitleName = "";
+ for (var i = 1; i < option2.cols[0].length - 1; i++) {
+ colTitleName += option2.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=' + HModName2 + '&colName=' + colName + '&colTitleName = ' + colTitleName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn2() {
+ $.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 < option2.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option2.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option2.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option2.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option2.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option2.cols[0][i + 1]["title"], titleData) == -1) {
+ option2.cols[0][i + 1]["hide"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option2.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option2.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option2.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option2.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ }
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option2.cols[0].length - 1; i++) {
+ if (option2.cols[0][i]["fixed"] != null) {
+ option2.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(option2.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option2.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ table.render(option2);
+ } else {
+ table.render(option2);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+ //#endregion
//浠ヤ笂鏄痩ayui妯″潡
--
Gitblit v1.9.1