| | |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/Scripts/webConfig.js"></script> |
| | | <script src="../../../layuiadmin/PubCustom.js"></script> |
| | | <style> |
| | | <!--<style> |
| | | .main-btn { /*头é¨ä¸»æé®*/ |
| | | padding: 0 2px; /*è°æ´æé®å·¦å³ç©ºé大å°*/ |
| | | height: 30px; |
| | |
| | | .layui-form-label { |
| | | width: 25%; |
| | | } |
| | | </style> |
| | | </style>--> |
| | | |
| | | </head> |
| | | <body> |
| | |
| | | <div class="layui-form-item" style="padding-top: 10px;"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">åæ®å·*</label> |
| | | <label class="layui-form-label" style="width: 85px;">åæ®å·<label style="color:red"> * </label></label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" name="HInterID" id="HInterID" lay-verify="HInterID"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">æ¥æ</label> |
| | | <label class="layui-form-label" style="width: 85px;">æ¥æ<label style="color:red"> * </label></label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width:180px;"> |
| | | <input type="date" class="layui-input" lay-verify="HDate" name="HDate" id="HDate" style="padding-left: 80px;"> |
| | | </div> |
| | | </div> |
| | | <!--<div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">项ç®ä»£ç <label style="color:red"> * </label></label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" lay-verify="HProNumber" name="HProNumber" id="HProNumber"> |
| | | </div> |
| | | </div>--> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">项ç®ä»£ç *</label> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">项ç®ä»£ç <label style="color:red"> * </label></label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="HProNumber" name="HProNumber" id="HProNumber" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HProID" id="HProID" lay-verify="HProID" value="0"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">项ç®é¶æ®µ*</label> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">项ç®é¶æ®µ<label style="color:red"> * </label></label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="HProjectStageName" name="HProjectStageName" id="HProjectStageName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HProjectStageID" id="HProjectStageID" lay-verify="HProjectStageID" value="0"> |
| | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">æ±æ¥äºº*</label> |
| | | <label class="layui-form-label" style="width: 85px;padding: 9px 18px;">æ±æ¥äºº<label style="color:red"> * </label></label> |
| | | <div class="layui-input-block" style="margin-left: 77px;"> |
| | | <input type="text" class="layui-input" lay-verify="HReportEmpName" name="HReportEmpName" id="HReportEmpName" style="background-color:#efefef4d;width: 60%;display: inline-block;" readonly> |
| | | <input type="hidden" name="HReportEmpID" id="HReportEmpID" lay-verify="HReportEmpID" value="0"> |
| | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">夿³¨<label style="color:red"> * </label></label> |
| | | <label class="layui-form-label" style="width: 85px;">夿³¨</label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 501px;"> |
| | | <input type="text" class="layui-input" lay-verify="HRemark" name="HRemark" id="HRemark"> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ç»ç»*</label> |
| | | <label class="layui-form-label" style="width: 85px;">ç»ç»<label style="color:red"> * </label></label> |
| | | <div class="layui-input-block" style="margin-left: 120px; width: 501px;"> |
| | | <select name="HOrgID" id="HOrgID" lay-verify="HOrgID"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | |
| | | <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="btn_up"><i class="layui-icon layui-icon-form"></i>ä¸ä¸è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_under"><i class="layui-icon layui-icon-form"></i>ä¸ä¸è¡</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn_up"><i class="layui-icon layui-icon-form"></i>ä¸ä¸è¡</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_under"><i class="layui-icon layui-icon-form"></i>ä¸ä¸è¡</button>--> |
| | | </div> |
| | | </script> |
| | | </div> |
| | |
| | | icon: 4, skin: 'layui-layer-lan', title: "温馨æç¤º", closeBtn: 0, btn: ['éæ°ç»å½'] |
| | | }, function () { window.location.href = "../../user/login.html"; }); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åå§åè¡¨æ ¼ |
| | | //DisPlay_HideColumn(); |
| | | //#endregion |
| | | |
| | | //#region åå§åç»ç» |
| | |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region å®¡æ ¸ |
| | | form.on('submit(set_CheckBill)', function (data) { |
| | | set_CheckBill(data); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region åå®¡æ ¸ |
| | | form.on('submit(set_AbandonCheck)', function (data) { |
| | | set_AbandonCheck(data); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region å
³é |
| | | form.on('submit(set_CloseBill)', function (data) { |
| | | set_CloseBill(data); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region åå
³é |
| | | form.on('submit(set_CancelCloseBill)', function (data) { |
| | | set_CancelCloseBill(data); |
| | | }); |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | //#endregion |
| | |
| | | //ä¸ä¸è¡ |
| | | case 'btn_up': |
| | | btn_up(data); |
| | | CheckedSet_tableSub_Emp(); |
| | | break; |
| | | //ä¸ä¸è¡ |
| | | case 'btn_under': |
| | | btn_under(data); |
| | | CheckedSet_tableSub_Emp(); |
| | | break; |
| | | } |
| | | }); |
| | |
| | | table.on('tool(mainTable)', function (obj) { |
| | | set_GridDelete(obj); //è¡å
å é¤ |
| | | set_GridCellCheck(obj); //è¡å
å¿«æ·é®çé |
| | | |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region å表ï¼è¡å
é¼ æ 离å¼äºä»¶ï¼æ£æ¥é¡¹ç®é¶æ®µæ¯å¦éå¤ |
| | | table.on('edit(mainTable)', function (obj) { |
| | | if (obj.field == "HEmpID") { |
| | | var num = 0; |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | if (obj.value == option.data[i]["HEmpID"]) { |
| | | num += 1; |
| | | } |
| | | if (num > 1) { |
| | | layer.msg("æå:" + obj.value + "éå¤!"); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | //#endregion |
| | | |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 项ç®é¶æ®µè¡¨ãé¡¹ç®æå表åå§å |
| | | //#region å表åå§å |
| | | function get_InitGrid1() { |
| | | option = { |
| | | elem: '#mainTable' |
| | | , toolbar: '#toolbarDemo' |
| | | , page: true |
| | | , limit: 500 |
| | | , limits: [50, 500, 5000, 50000] |
| | | //, page: true |
| | | //, limit: 500 |
| | | //, limits: [50, 500, 5000, 50000] |
| | | , totalRow: true |
| | | , cellMinWidth: 120 |
| | | , height: 400 |
| | | , cols: [[ |
| | | { type: 'checkbox', totalRowText: 'å计è¡' } |
| | | , { type: 'numbers', title: 'åºå·', totalRow: true } |
| | | , { field: 'RowID', title: 'è¡å·', hide: true } //è¡æ è¯ï¼ç¨äºä¸ä¸è¡ãä¸ä¸è¡è¯å«æå¨è¡ |
| | | , { field: 'HEmpID', title: 'æåID', hide: true } |
| | | , { type: 'numbers', title: 'åºå·', style: 'background-color: #f9f9f9;' } |
| | | , { field: 'RowID', title: 'è¡å·', hide: true, style: 'background-color: #f9f9f9;' } //è¡æ è¯ï¼ç¨äºä¸ä¸è¡ãä¸ä¸è¡è¯å«æå¨è¡ |
| | | , { field: 'HEmpID', title: 'æåID', hide: true, style: 'background-color: #f9f9f9;' } |
| | | , { field: 'HEmpName', title: 'æå', edit: 'text', event: "HEmpName" } //f7 |
| | | , { field: 'HIsPM', title: '项ç®ç»ç', templet: "#HIsPM" } |
| | | , { field: 'HRate', title: '项ç®å æ¯', hide: true } |
| | | , { field: 'HAvgMoney', title: 'åé
ä¸ç»©', edit: 'text' } |
| | | , { field: 'HCountMoney', title: 'ææ', edit: 'text' } |
| | | , { field: 'HRate', title: '项ç®å æ¯', totalRow: true, style: 'background-color: #f9f9f9;'} |
| | | , { field: 'HAvgMoney', title: 'åé
ä¸ç»©', totalRow: true, style: 'background-color: #f9f9f9;' } |
| | | , { field: 'HCountMoney', title: 'ææ', totalRow: true, style: 'background-color: #f9f9f9;' } |
| | | , { field: 'HRemarkSub', title: '夿³¨', edit: 'text' } |
| | | , { fixed: 'right', title: 'æä½', toolbar: '#barDemo' } |
| | | ]] |
| | |
| | | } |
| | | //è®¾ç½®è¡¨å¤´æ°æ® |
| | | //è®¾ç½®ææ¬æ¡å¼ |
| | | $("#HProNumber").val(checkStatus.data[0].项ç®ä»£ç );//å·¥ç¨é¡¹ç®ä»£ç |
| | | $("#HProjectStageID").val(checkStatus.data[0].HProjectStageID);//å·¥ç¨é¡¹ç®ä»£ç |
| | | $("#HProjectStageName").val(checkStatus.data[0].项ç®é¶æ®µ);//å·¥ç¨é¡¹ç®ä»£ç |
| | | $("#HStageNote").val(checkStatus.data[0].项ç®é¶æ®µè¯¦ç»å
容);//å·¥ç¨é¡¹ç®ä»£ç |
| | | $("#HPMGoodsID").val(checkStatus.data[0].HPMGoodsID);//å·¥ç¨é¡¹ç®ä»£ç |
| | | $("#HRelationGoods").val(checkStatus.data[0].é¶æ®µç¸å
³äº¤ä»ç©);//å·¥ç¨é¡¹ç®ä»£ç |
| | | $("#HIsKey").val((checkStatus.data[0].éç¨ç¢=='Y'?true:false));//å·¥ç¨é¡¹ç®ä»£ç |
| | | $("#HRate").val(checkStatus.data[0].é¶æ®µä¸ç»©å æ¯);//å·¥ç¨é¡¹ç®ä»£ç |
| | | $("#HProNumber").val(checkStatus.data[0].项ç®ä»£ç ); |
| | | $("#HProjectStageID").val(checkStatus.data[0].HProjectStageID); |
| | | $("#HProjectStageName").val(checkStatus.data[0].项ç®é¶æ®µ); |
| | | $("#HStageNote").val(checkStatus.data[0].项ç®é¶æ®µè¯¦ç»å
容); |
| | | $("#HPMGoodsID").val(checkStatus.data[0].HPMGoodsID); |
| | | $("#HRelationGoods").val(checkStatus.data[0].é¶æ®µç¸å
³äº¤ä»ç©); |
| | | $("#HIsKey").val((checkStatus.data[0].éç¨ç¢=='Y'?true:false)); |
| | | $("#HRate").val(checkStatus.data[0].é¶æ®µä¸ç»©å æ¯); |
| | | |
| | | //设置å¤éæ¡éä¸ç¶æ |
| | | if ($("#HIsKey").val() == "true") { |
| | |
| | | , 'HAvgMoney': '0' |
| | | , 'HCountMoney': '0' |
| | | , 'HRemarkSub': '' |
| | | } |
| | | ; |
| | | }; |
| | | num.push(rowdata); |
| | | } |
| | | option.data = num; |
| | |
| | | |
| | | //#endregion |
| | | |
| | | //#region å®¡æ ¸ |
| | | function set_CheckBill() { |
| | | layer.confirm("确认è¦å®¡æ ¸å?", function (index) { |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_RoutingBill/AuditGy_RoutingBill', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åå®¡æ ¸ |
| | | function set_AbandonCheck() { |
| | | layer.confirm("确认è¦åå®¡æ ¸å?", function (index) { |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_RoutingBill/AuditGy_RoutingBill', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å
³é |
| | | function set_CloseBill() { |
| | | layer.confirm("确认è¦å
³éå?", function (index) { |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_RoutingBill/CloseGy_RoutingBill', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": 0, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åå
³é |
| | | function set_CancelCloseBill() { |
| | | layer.confirm("确认è¦åå
³éå?", function (index) { |
| | | var wait = layer.load(); |
| | | $.ajax({ |
| | | url: GetWEBURL() + '/Gy_RoutingBill/CloseGy_RoutingBill', |
| | | type: "GET", |
| | | data: { "HInterID": $("#HInterID").val(), "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | if (result.count == 1) { |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | layer.close(wait); |
| | | } else { |
| | | layer.alert(result.code + result.Message, { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | //#region é空éªè¯ |
| | | function AllowLoadData(data) { |
| | | //#region è¡¨å¤´æ°æ®æ£éª |
| | |
| | | layer.msg("åæ®å·ä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | if ($("#HProNumber").val() == "") { |
| | | layer.msg("项ç®ä»£ç ä¸è½ä¸ºç©º!"); |
| | | if ($("#HDate").val() == "") { |
| | | layer.msg("æ¥æä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | if ($("#HProjectStageName").val() == "") { |
| | | |
| | | if ($("#HProID").val() == "0") { |
| | | layer.msg("项ç®ä»£ç æªéæ©!"); |
| | | return false; |
| | | } |
| | | if ($("#HProjectStageID").val() == "0") { |
| | | layer.msg("项ç®é¶æ®µæªéæ©!"); |
| | | return false; |
| | | } |
| | | if ($("#HReportEmpName").val() == "") { |
| | | if ($("#HReportEmpID").val() == "0") { |
| | | layer.msg("æ±æ¥äººæ²¡æéæ©!"); |
| | | return false; |
| | | } |
| | |
| | | } else { |
| | | var ref = /^[0-9]+\.?[0-9]*$/; |
| | | if (!ref.test(HRate1)) { |
| | | layer.msg("ä¸ç»©å æ¯è¯·è¾æ£ç¡®å
¥æ°åï¼"); |
| | | layer.msg("æ¬é¶æ®µä¸ç»©å æ¯è¯·è¾æ£ç¡®å
¥æ°åï¼"); |
| | | return; |
| | | } |
| | | } |
| | |
| | | //#endregion |
| | | |
| | | //#region åè¡¨æ°æ®æ£éª |
| | | var num = []; |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | if (option.data[i] != "") { |
| | | //æå段é夿£éª |
| | | if ($.inArray(option.data[i]["HEmpID"], num) == -1) { |
| | | num.push(option.data[i]["HEmpID"]); |
| | | } else { |
| | | layer.msg("第" + (i + 1) + "è¡,æå:" + option.data[i]["HEmpName"] + "éå¤!"); |
| | | return false; |
| | | } |
| | | //æåé空æ£éª |
| | | if (option.data[i]["HEmpName"] == "") { |
| | | if (option.data[i]["HEmpID"] == "0") { |
| | | layer.msg("第" + (i + 1) + "è¡:æåä¸è½ä¸ºç©º!"); |
| | | return false; |
| | | } |
| | | |
| | | //æ¯å¦é¡¹ç®ç»çæ ¼å¼æ£éª |
| | | if (option.data[i]["HIsPM"] != "1" && option.data[i]["HIsPM"] != '0') { |
| | | layer.msg("第" + (i + 1) + "è¡:æ¯å¦é¡¹ç®ç»ç请è¾å
¥0æ1!"); |
| | | return false; |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //#endregion |
| | | |
| | | //#region å表å
³é®åé夿 ¡éª |
| | | var num = []; |
| | | for (var i = 0; i < option.data.length; i++) { |
| | | if ($.inArray(option.data[i]["HEmpID"], num) == -1) { |
| | | num.push(option.data[i]["HEmpID"]); |
| | | } else { |
| | | layer.msg("第" + (i + 1) + "è¡,æå:" + option.data[i]["HEmpName"] + "éå¤!"); |
| | | return false; |
| | | } |
| | | } |
| | | //#endregion |
| | |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | if (data1.data[0].HFontSize != 0) { |
| | | option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | option.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;"; |
| | | } else { |
| | | option.cols[0][i + 1]["style"] = "font-size:100%"; |
| | | option.cols[0][i + 1]["style"] += "font-size:100%"; |
| | | } |
| | | //设置å宽 |
| | | //if (data1.data[0].HColumnWidth != 0) { |