From 62f346794d27086f41f7ce901bdd11eead5249c8 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期一, 06 五月 2024 08:54:47 +0800 Subject: [PATCH] 1 --- WebTM/views/采购管理/应付单/Cg_PayableBill.html | 215 +++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 150 insertions(+), 65 deletions(-) diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html" index 5c6541a..de75887 100644 --- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html" +++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html" @@ -100,56 +100,46 @@ </div> </div> <div class="layui-row"> - <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="background-color:#efefef4d;" readonly> - <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;"> - <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="hdeptlist" 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"> - <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="background-color:#efefef4d;" readonly> - <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;"> - <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" 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"> - <input type="text" name="HMangerName" id="HMangerName" class="layui-input" value="" style="background-color:#efefef4d;" readonly> - <input type="hidden" name="HMangerID" id="HMangerID" 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-inline"> + <div class="layui-inline"style="width:625px"> <label class="layui-form-label">渚涘簲鍟�<label style="color:red"> * </label></label> <div class="layui-input-inline"> - <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="background-color:#efefef4d;" readonly> - <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float:left;width:150px;"> + <input type="text" name="HSupName" id="HSupName" class="layui-input" value="" style="background-color: #efefef4d; width: 505px" readonly> + <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="0" style="float: left; width: 505px;"> <!--<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> + </div> + <div class="layui-inline"> + <label class="layui-form-label">閲囪喘閮ㄩ棬<label style="color:red"> * </label></label> + <div class="layui-input-inline"> + <input type="text" name="HDeptName" id="HDeptName" class="layui-input" value="" style="background-color: #efefef4d; float: left; width: 150px; " readonly> + <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="0" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" lay-filter="HDeptList" style="width:40px;"> <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> - </button>--> + </button> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">涓氬姟鍛�<label style="color:red"> * </label></label> + <div class="layui-input-inline"> + <input type="text" name="HEmpName" id="HEmpName" class="layui-input" value="" style="background-color: #efefef4d; float: left; width: 150px;" readonly> + <input type="hidden" name="HEmpID" id="HEmpID" class="layui-input" value="0" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmpList" 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-inline"> - <label class="layui-form-label">甯佸埆</label> + <label class="layui-form-label">甯佸埆<label style="color:red"> * </label></label> <div class="layui-input-inline"> - <input type="text" name="HCurName" id="HCurName" class="layui-input" value="" style="background-color:#efefef4d;" readonly> + <input type="text" name="HCurName" id="HCurName" class="layui-input" value="" style="background-color: #efefef4d; float: left; width: 150px;" readonly> <input type="hidden" name="HCurID" id="HCurID" class="layui-input" value="0" style="float:left;width:150px;"> - <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HCurList" style="width:40px;"> - <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> - </button>--> + <button type="button" lay-submit="" class="layui-btn" lay-filter="HCurList" 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"> @@ -159,27 +149,37 @@ </div> </div> <div class="layui-inline"> - <label class="layui-form-label">閲囪喘鏂瑰紡</label> + <label class="layui-form-label">閲囪喘鏂瑰紡<label style="color:red"> * </label></label> <div class="layui-input-inline"> - <input type="text" name="HPSStyleName" id="HPSStyleName" class="layui-input" value="" style="background-color:#efefef4d;" readonly> + <input type="text" name="HPSStyleName" id="HPSStyleName" class="layui-input" value="" style="background-color: #efefef4d; float: left; width: 150px;" readonly> <input type="hidden" name="HPSStyleID" id="HPSStyleID" class="layui-input" value="0" style="float:left;width:150px;"> - <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="hsellslist" style="width:40px;"> - <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> - </button>--> + <button type="button" lay-submit="" class="layui-btn" lay-filter="HPSStyleList" 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 style="color:red"> * </label></label> <div class="layui-input-inline"> - <input type="text" name="HSSName" id="HSSName" class="layui-input" value="" style="background-color:#efefef4d;" readonly> + <input type="text" name="HSSName" id="HSSName" class="layui-input" value="" style="background-color: #efefef4d; float: left; width: 150px;" readonly> <input type="hidden" name="HSSID" id="HSSID" class="layui-input" value="0" style="float:left;width:150px;"> - <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HSSList" style="width:40px;"> - <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> - </button>--> + <button type="button" lay-submit="" class="layui-btn" lay-filter="HSSList" 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-inline"> + <label class="layui-form-label">涓荤</label> + <div class="layui-input-inline"> + <input type="text" name="HMangerName" id="HMangerName" class="layui-input" value="" style="background-color: #efefef4d; float: left; width: 150px;" readonly> + <input type="hidden" name="HMangerID" id="HMangerID" 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-inline"> <label class="layui-form-label">浠樻鏃ユ湡<label style="color:red"> * </label></label> <div class="layui-input-block"> @@ -498,9 +498,9 @@ } //#endregion - //if (AllowLoadData(data)) { + if (AllowLoadData(data)) { set_SaveBill(data); - //} + } }); //#endregion //#endregion @@ -759,7 +759,7 @@ } }); } - ////#endregion + //#endregion //#region 寮圭獥閫夋嫨鏂规硶 //#region 閫夋嫨閲囪喘閮ㄩ棬 @@ -770,7 +770,19 @@ , area: ['90%', '90%']//澶у皬 , title: '閲囪喘閮ㄩ棬鍒楄〃'//鏍囬 , shift: 2//寮瑰嚭鍔ㄧ敾 - , content: ['../../Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'] + , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.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('璇烽�夋嫨鏁版嵁'); + } + $("#HDeptName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О); + $("#HDeptID").val(checkStatus.data[0].HItemID); + layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { } }) } //#endregion @@ -783,7 +795,19 @@ , area: ['90%', '90%']//澶у皬 , title: '閲囪喘涓荤鍒楄〃'//鏍囬 , shift: 2//寮瑰嚭鍔ㄧ敾 - , content: ['../../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HManager', 'yes'] + , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HManager', '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('璇烽�夋嫨鏁版嵁'); + } + $("#HMangerName").val(checkStatus.data[0].鑱屽憳鍚嶇О); + $("#HMangerID").val(checkStatus.data[0].HItemID); + layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { } }) } //#endregion @@ -796,7 +820,19 @@ , area: ['90%', '90%']//澶у皬 , title: '涓氬姟鍛樺垪琛�'//鏍囬 , shift: 2//寮瑰嚭鍔ㄧ敾 - , content: ['../../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HEmp', 'yes'] + , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?Type=HEmp', '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('璇烽�夋嫨鏁版嵁'); + } + $("#HEmpName").val(checkStatus.data[0].鑱屽憳鍚嶇О); + $("#HEmpID").val(checkStatus.data[0].HItemID); + layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { } }) } //#endregion @@ -822,7 +858,20 @@ , area: ['90%', '90%']//澶у皬 , title: '閲囪喘鏂瑰紡鍒楄〃'//鏍囬 , shift: 2//寮瑰嚭鍔ㄧ敾 - , content: ['../../Baseset/鍩虹璧勬枡/Gy_PoStockStyle.html', 'yes'] + , content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_PoStockStyle.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('璇烽�夋嫨鏁版嵁'); + } + + $("#HPSStyleName").val(checkStatus.data[0].閲囪喘鏂瑰紡鍚嶇О); + $("#HPSStyleID").val(checkStatus.data[0].HItemID); + layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { } }) } //#endregion @@ -835,7 +884,7 @@ , area: ['90%', '90%']//澶у皬 , title: '缁撶畻鏂瑰紡鍒楄〃'//鏍囬 , shift: 2//寮瑰嚭鍔ㄧ敾 - , content: ['../../Baseset/鍩虹璧勬枡/Gy_SettleStyle.html', 'yes'] + , content: ['../../鍩虹璧勬枡/鍩虹璧勬枡/Gy_SettleStyle.html', 'yes'] , btn: ['纭畾', '鍙栨秷'] , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟 var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰 @@ -843,7 +892,7 @@ if (checkStatus.data.length === 0) { return layer.msg('璇烽�夋嫨鏁版嵁'); } - $("#HSSName").val(checkStatus.data[0].HName); + $("#HSSName").val(checkStatus.data[0].缁撶畻鏂瑰紡鍚嶇О); $("#HSSID").val(checkStatus.data[0].HItemID); layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� } @@ -1733,7 +1782,7 @@ } , end: function () { obj.update({ - "HMaterID" :OptionData.HMaterID + "HMaterID": OptionData.HItemID ,"鐗╂枡浠g爜" : OptionData.鐗╂枡浠g爜 , "鐗╂枡鍚嶇О" :OptionData.鐗╂枡鍚嶇О ,"瑙勬牸鍨嬪彿" : OptionData.瑙勬牸鍨嬪彿 @@ -2303,6 +2352,42 @@ return res; } //#endregion + + //#region 淇濆瓨鏂规硶鏍¢獙 + function AllowLoadData(data) { + if ($("#HCurID").val() == 0) { + layer.msg("璇烽�夋嫨甯佸埆锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return; + } + if ($("#HExRate").val() == 0) { + layer.msg("璇疯緭鍏ユ眹鐜囷紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return; + } + if ($("#HEmpID").val() == 0) { + layer.msg("璇烽�夋嫨涓氬姟鍛樺憳锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return; + } + if ($("#HDeptID").val() == 0) { + layer.msg("璇烽�夋嫨閲囪喘閮ㄩ棬锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return; + } + if ($("#HSupID").val() == 0) { + layer.msg("璇烽�夋嫨渚涘簲鍟嗭紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return; + } + if ($("#HPSStyleID").val() == 0) { + layer.msg("璇烽�夋嫨閲囪喘鏂瑰紡锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return; + } + if ($("#HSSID").val() == 0) { + layer.msg("璇烽�夋嫨缁撶畻鏂瑰紡锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return; + } + return true; + } + + //endregion + //#endregion @@ -2311,7 +2396,7 @@ // 鍩虹璧勬枡杩斿洖鏁版嵁 function GetHEmpValue(obj) //杩斿洖涓氬姟鍛� { - $("#HEmpName").val(obj[0].HName); + $("#HEmpName").val(obj[0].鑱屽憳鍚嶇О); $("#HEmpID").val(obj[0].HItemID); } @@ -2323,25 +2408,25 @@ function GetHManagerValue(obj) //杩斿洖涓荤 { - $("#HMangerName").val(obj[0].HName); + $("#HMangerName").val(obj[0].鑱屽憳鍚嶇О); $("#HMangerID").val(obj[0].HItemID); } function GetHDeptNameValue(obj) //杩斿洖閮ㄩ棬 { - $("#HDeptName").val(obj[0].HName); + $("#HDeptName").val(obj[0].閮ㄩ棬鍚嶇О); $("#HDeptID").val(obj[0].HItemID); } - function GetHPSStyleValue(obj) //杩斿洖閲囪喘鏂瑰紡 + function GetHPSStyleNameValue(obj) //杩斿洖閲囪喘鏂瑰紡 { - $("#HSellSName").val(obj[0].HName); - $("#HSellSID").val(obj[0].HItemID); + $("#HPSStyleName").val(obj[0].閲囪喘鏂瑰紡鍚嶇О); + $("#HPSStyleID").val(obj[0].HItemID); } function GetSettleStyleValue(obj) //杩斿洖缁撶畻鏂瑰紡 { - $("#HSSName").val(obj[0].HName); + $("#HSSName").val(obj[0].缁撶畻鏂瑰紡鍚嶇О); $("#HSSID").val(obj[0].HItemID); } -- Gitblit v1.9.1