From 65968b3e0e9e03ef0904de35b78872224b9ce00a Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 23 九月 2025 14:15:38 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/采购管理/其他应付单/YF_PayMentOtherBillMain.html | 220 ++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 187 insertions(+), 33 deletions(-)
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\344\273\230\345\215\225/YF_PayMentOtherBillMain.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\344\273\230\345\215\225/YF_PayMentOtherBillMain.html"
index 9f675c9..3b82dcd 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\344\273\230\345\215\225/YF_PayMentOtherBillMain.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\344\273\230\345\215\225/YF_PayMentOtherBillMain.html"
@@ -78,9 +78,9 @@
<div class="layui-inline">
<label class="layui-form-label">渚涘簲鍟�<label style="color:red"> * </label></label>
<div class="layui-input-inline">
- <input type="text" name="HCusName" id="HCusName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
- <input type="hidden" name="HCusID" id="HCusID" class="layui-input" value="0" style="float:left;width:150px;">
- <button type="button" lay-submit="" class="layui-btn" lay-filter="HCusList" style="width:40px;">
+ <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="float: left; width: 150px; background-color: #efefef4d;" readonly>
+ <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float:left;width:150px;">
+ <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupList" style="width:40px;">
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
</button>
</div>
@@ -287,6 +287,7 @@
<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="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
</div>
</script>
</div>
@@ -335,6 +336,8 @@
var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫
var linterid = params[params[1]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
+ window.CusType = 0;//鍏ㄥ眬鍙橀噺
+ window.OptionData = [];
//#endregion
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -348,7 +351,7 @@
//#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
var HModuleType = "2102";
//閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
- var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
+ var HPageTitle = get_PageTitle(HModuleType) || $("h1").html() ;
$("h1").html('<b>' + HPageTitle + '</b>');
//#endregion
@@ -415,13 +418,14 @@
//#endregion
//#region 閫夋嫨渚涘簲鍟嗘寜閽�
- form.on('submit(HCusList)', function () {
- get_checkCus();
+ form.on('submit(HSupList)', function () {
+ get_checkSup();
});
//#endregion
//#region 閫夋嫨璐圭敤椤圭洰鎸夐挳
form.on('submit(HPMList)', function () {
+ CusType = 1;
get_checkSS();
});
//#endregion
@@ -475,7 +479,10 @@
form.render('select');
}
break;
-
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
//#endregion
@@ -851,9 +858,10 @@
, totalRow: true
, cellMinWidth: 120
, height: 400
+ ,limit:100
, cols: [[
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
, { field: 'HProjectMoneyID', title: '璐圭敤椤圭洰ID', hide: true, style: 'background-color: #f9f9f9;' }
, { field: 'HPMoneyName', title: '璐圭敤椤圭洰鍚嶇О', edit: 'text', event: "HPMoneyName", style: 'background-color: #f9f9f9;' } //f7
, { field: 'HTypeSub', title: '鍙戠エ绫诲瀷', templet: '#HTypeSub' }
@@ -863,7 +871,7 @@
//, { field: 'HPrice', title: '鍗曚环', edit: 'text', style: 'background-color: #f9f9f9;' }
, { field: 'HSumMoney', title: '鎬婚噾棰�', style: 'background-color: #f9f9f9;' }
, { field: 'HRemark', title: '瀛愯〃澶囨敞', edit: 'text', style: 'background-color: #f9f9f9;' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ , { fixed: 'right', field: '鎿嶄綔', title: '鎿嶄綔', toolbar: '#barDemo' }
]]
}
@@ -880,7 +888,7 @@
];
option.data = rowdata;
table.render(option);
-
+ DisPlay_HideColumn();
}
//#endregion
@@ -897,6 +905,11 @@
oldData.splice(obj.tr.data('index'), 1)
option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
table.render(option);
+ for (var i = 0; i < oldData.length; i++) {
+ //鍙戠エ绫诲瀷
+ $('#HTypeSub' + (i + 1)).find("option[value='" + oldData[i].HTypeSub + "']").attr("selected", true);
+ }
+ form.render('select');
layer.close(index);
/*}*/
});
@@ -912,6 +925,7 @@
if (event.key == "F7") {
//鍣ㄥ叿绠$悊
if (obj.event == "HPMoneyName") {
+ CusType = 2;
//鎵撳紑鍣ㄥ叿绠$悊灏忕獥浣�
layer.open({
type: 2//寮圭獥绫诲瀷
@@ -919,7 +933,8 @@
, area: ['90%', '90%']//澶у皬
, title: '椤圭洰璐圭敤鍒楄〃'//鏍囬
, shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ["../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_ProjectMoney.html?OperationType=2", "yes"]
+ //, content: ["../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_ProjectMoney.html?OperationType=2", "yes"]
+ , content: ["../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_ProjectMoney.html", "yes"]
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -927,20 +942,27 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
-
- obj.update({
- "HProjectMoneyID": checkStatus.data[0].HItemID
- , "HPMoneyName": checkStatus.data[0].椤圭洰璐圭敤鍚嶇О
+ //OptionData = checkStatus.data[0];
+ obj.update({
+ "HProjectMoneyID": checkStatus.data[0].HItemID
+ , "HPMoneyName": checkStatus.data[0].椤圭洰璐圭敤鍚嶇О
})
layer.close(index);//鍏抽棴寮圭獥
- }
- });
- }
- obj.event = "";
- return false;
+ }
+ , end: function () {
+ obj.update({
+ "HProjectMoneyID": OptionData.HItemID
+ , "HPMoneyName": OptionData.椤圭洰璐圭敤鍚嶇О
+ })
+ }
+ })
}
- })
- }
+ obj.event = "";
+ return false;
+ }
+
+ })
+ }
//#endregion
@@ -1021,14 +1043,14 @@
//#endregion
//#region 渚涘簲鍟嗛�夋嫨椤甸潰
- function get_checkCus() {
+ function get_checkSup() {
layer.open({
type: 2//寮圭獥绫诲瀷
, skin: 'layui-layer-rim' //鍔犱笂杈规
, area: ['90%', '90%']//澶у皬
, title: '涓氬姟瀹㈡埛鍒楄〃'//鏍囬
, shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html', 'yes']
+ , content: ['../../鍩虹璧勬枡/閲囪喘鍩虹璧勬枡/Gy_Supplier.html?Type=HSup', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -1037,8 +1059,8 @@
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- $("#HCusID").val(checkStatus.data[0].HItemID);
- $("#HCusName").val(checkStatus.data[0].渚涘簲鍟嗗悕绉�);
+ $("#HSupID").val(checkStatus.data[0].HItemID);
+ $("#HSupName").val(checkStatus.data[0].渚涘簲鍟嗗悕绉�);
layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -1250,8 +1272,8 @@
, "HBillNo": data[0]["鍗曟嵁鍙�"]
, "HDate": formatDate(data[0]["鏃ユ湡"])
, "HAccDate": formatDate(data[0]["鏀舵鏃ユ湡"])
- , "HCusID": data[0]["HCusID"]
- , "HCusName": data[0]["渚涘簲鍟�"]
+ , "HSupID": data[0]["HSupID"]
+ , "HSupName": data[0]["渚涘簲鍟�"]
, "HCurID": data[0]["HCurID"]
, "HCurName": data[0]["甯佸埆"]
, "HExRate": data[0]["姹囩巼"]
@@ -1343,18 +1365,150 @@
}
//#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
//#endregion
});
- //function GetHDeptNameValue(obj) //杩斿洖閮ㄩ棬
- //{
- // $("#HDeptName").val(obj[0].HName);
- // $("#HDeptID").val(obj[0].HItemID);
- //}
+ function GetHDeptNameValue(obj) //杩斿洖閮ㄩ棬
+ {
+ $("#HDeptName").val(obj[0].閮ㄩ棬鍚嶇О);
+ $("#HDeptID").val(obj[0].HItemID);
+ }
+ function GetHSupNameValue(obj) //杩斿洖渚涘簲鍟�
+ {
+ $("#HSupName").val(obj[0].渚涘簲鍟嗗悕绉�);
+ $("#HSupID").val(obj[0].HItemID);
+ }
+
+ function GetProjectMoneyValue(obj) //杩斿洖椤圭洰璐圭敤
+ {
+ if (CusType == 1) {
+ $("#HProjectMoneyName").val(obj.椤圭洰璐圭敤鍚嶇О);
+ $("#HProjectMoneyID").val(obj.HItemID);
+ } else if (CusType ==2) {
+ OptionData = obj;
+ }
+
+ }
+
+ // //鍙屽嚮杩斿洖椤圭洰璐圭敤
+ //function GetProjectMoneyValue(data) {
+ // OptionData = data
+ // }
+
//function GetHEmpValue(obj) //杩斿洖缁忔墜浜�
//{
// $("#HEmpName").val(obj[0].HName);
--
Gitblit v1.9.1