| | |
| | | <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> |
| | |
| | | |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">ä¿å</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">éåº</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">å®¡æ ¸</button> |
| | | <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">å®¡æ ¸</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">åå®¡æ ¸</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CloseBill" id="set_CloseBill">å
³é</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CancelCloseBill" id="set_CancelCloseBill">åå
³é</button> |
| | | <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CancelCloseBill" id="set_CancelCloseBill">åå
³é</button>--> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-POStockInBill"> |
| | | <ul class="layui-tab-title" lay-filter="tab-all"> |
| | |
| | | <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"> |
| | | <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"> |
| | | <input type="hidden" name="HMainSourceBillType" id="HMainSourceBillType" lay-verify="HMainSourceBillType" value="0"> |
| | | <input type="hidden" name="HMainSourceBillNo" id="HMainSourceBillNo" lay-verify="HMainSourceBillNo" value="0"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchHProNumber" id="btnSearchHProNumber" style="padding: 0 10px;float: right;margin-right: 3px;"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | | </button> |
| | | </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 class="layui-inline"> |
| | | <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="HStageNote" name="HStageNote" id="HStageNote"> |
| | | <input type="text" class="layui-input" lay-verify="HStageNote" name="HStageNote" id="HStageNote" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | </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"> |
| | | <!--å¨ææ¸²æç»ç»--> |
| | |
| | | <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> |
| | | <input type="text" class="layui-input" name="HUpdater" id="HUpdater" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <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="HUpDaterDate" id="hupdatedate" style="background-color:#efefef4d;" readonly> |
| | | <input type="text" class="layui-input" name="HUpdaterDate" id="HUpdaterDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | <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> |
| | |
| | | <script type="text/html" id="barDemo"> |
| | | <!--<a class="layui-btn layui-btn-xs" lay-event="edit">ç¼è¾</a>--> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">å é¤</a> |
| | | </script> |
| | | <!--项ç®ç»ç--> |
| | | <script type="text/html" id="HIsPM"> |
| | | <div class="layui-input-block" style="margin-left: 20px;"> |
| | | <input type="checkbox" name="HIsPM" lay-filter="HIsPM" id="HIsPM{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary"> |
| | | </div> |
| | | </script> |
| | | <script> |
| | | |
| | |
| | | var HModName = "PM_ProjectReportBill"; |
| | | //è¡¨æ ¼æ¸²æåæ° |
| | | var option = {}; //项ç®é¶æ®µè¡¨æ¸²æåæ° |
| | | //è®°å½ç»ç»çå¼ |
| | | var HOrgIDBar = 0; |
| | | //è·ååæ° |
| | | var params = getUrlVars(); |
| | | var OperationType = params[params[0]]; //ä»åæ°ä¸è·å æ°æ®ç±»å 1æ·»å ä¿å 2å¤å¶ 3 ç¼è¾ |
| | | var linterid = params[params[1]]; //ä»åæ°ä¸è·å åæ®å
ç |
| | | var HProjectStageID = params[params[3]]; |
| | | |
| | | //#endregion |
| | | |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åå§åè¡¨æ ¼ |
| | | //DisPlay_HideColumn(); |
| | | //#endregion |
| | | |
| | | //#region åå§åç»ç» |
| | | Organ(); |
| | | //#endregion |
| | | |
| | | //#region å¤æå¹¶è®¾ç½®æä½ç±»åã页é¢åå§å |
| | | if (OperationType == null || OperationType == 1) { //æ°å¢ |
| | | //ç¦ç¨ç»ç»é项 |
| | | $("#HOrgID").attr("disabled", true); |
| | | OperationType = 1; |
| | | //çæå¹¶è®¾ç½®ä¸»è¡¨çå
ç ååæ®å· |
| | | createBillNo(); |
| | |
| | | //åå§å项ç®é¶æ®µè¡¨ |
| | | get_InitGrid1(); |
| | | RoadBillMain(linterid); |
| | | } else if (OperationType == 4 && HProjectStageID != null) { |
| | | //ç¦ç¨ç»ç»é项 |
| | | $("#HOrgID").attr("disabled", true); |
| | | OperationType = 4; |
| | | //çæå¹¶è®¾ç½®ä¸»è¡¨çå
ç ååæ®å· |
| | | createBillNo(); |
| | | |
| | | //åå§åå¶å人åå¶åæ¶é´ |
| | | $("#HMaker").val(sessionStorage["HUserName"]); |
| | | $("#HMakerDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | |
| | | //åå§åæ¥æ |
| | | $("#HDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | //åå§å项ç®é¶æ®µè¡¨ |
| | | get_InitGrid1(); |
| | | //䏿¨-页é¢è®¾ç½® |
| | | set_ProjectReport_Display(); |
| | | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region åå§åè¡¨æ ¼ |
| | | DisPlay_HideColumn(); |
| | | //#endregion |
| | | |
| | | //#endregion |
| | |
| | | //#region 触åäºä»¶ï¼å
æ¬form.on(){}æ ¼å¼çææç¹å»äºä»¶ãéæ©äºä»¶ç |
| | | |
| | | //#region å¼¹çªéæ©è§¦åäºä»¶ |
| | | //#region 鿩项ç®ä»£ç æé® |
| | | form.on('submit(btnSearchHProNumber)', function () { |
| | | get_checkSearchHProNumber(); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region 鿩项ç®é¶æ®µæé® |
| | | form.on('submit(btnSearchHProjectStage)', function () { |
| | | get_checkSearchHProjectStage(); |
| | |
| | | $("#HIsKey").val(data.elem.checked); |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region 项ç®ç»ç |
| | | form.on('checkbox(HIsPM)', function (data) { |
| | | var elem = data.othis.parents('tr'); |
| | | var dataindex = elem.attr("data-index"); |
| | | $.each(option.data, function (index, value) { |
| | | if (value.LAY_TABLE_INDEX == dataindex) { |
| | | value.HIsPM = data.elem.checked;//æéä¸ä¸ææ¡idå¼èµå¼ç»è¡¨æ ¼ç¼å |
| | | } |
| | | }); |
| | | }); |
| | | //#endregion |
| | | //#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 |
| | |
| | | "RowID": (table.cache["mainTable"].length + 1) * 10 |
| | | , 'HEmpID': '0' |
| | | , 'HEmpName': '' |
| | | , 'HIsPM': '0' |
| | | , 'HIsPM': false |
| | | , 'HRate': '0' |
| | | , 'HAvgMoney': '0' |
| | | , 'HCountMoney': '0' |
| | |
| | | table.cache["mainTable"].push(NewRow); |
| | | option.data = table.cache["mainTable"]; |
| | | table.render(option); |
| | | CheckedSet_tableSub_Emp(); |
| | | break; |
| | | case 'btn-CopyLine': |
| | | var copydata = JSON.stringify(data); |
| | |
| | | table.cache["mainTable"].push(JSON.parse(copyrow));//å°å¤å¶çè¡å¼ºè½¬æjson追å å°è¡¨æ ¼ä¸ |
| | | option.data = table.cache["mainTable"];//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option);//å°æ°æ®æ¸²æå°è¡¨æ ¼ä¸ |
| | | CheckedSet_tableSub_Emp(); |
| | | } |
| | | break; |
| | | //å设置 |
| | | case 'set_HideColumn': |
| | | //get_HideColumn(); |
| | | get_HideColumn(); |
| | | break; |
| | | //ä¸ä¸è¡ |
| | | case 'btn_up': |
| | |
| | | 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 |
| | | |
| | | |
| | | |
| | | // |
| | | form.on('submit(Cancel)', function () { |
| | | //sessionStorage["SourceFlag"] = false; |
| | |
| | | Organization += '<option style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>'; |
| | | } |
| | | $("#HOrgID").append(Organization); |
| | | $("#HOrgID").val(sessionStorage["OrganizationID"]) |
| | | if (OperationType == 1) { |
| | | HOrgIDBar = sessionStorage["OrganizationID"]; |
| | | } |
| | | $("#HOrgID").val(HOrgIDBar); |
| | | form.render('select'); |
| | | } |
| | | layer.closeAll("loading"); |
| | |
| | | } |
| | | //#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: '项ç®ç»ç', edit: 'text' } |
| | | , { field: 'HRate', title: '项ç®å æ¯', hide: true } |
| | | , { field: 'HAvgMoney', title: 'åé
ä¸ç»©', edit: 'text' } |
| | | , { field: 'HCountMoney', title: 'ææ', edit: 'text' } |
| | | , { field: 'HIsPM', title: '项ç®ç»ç', templet: "#HIsPM" } |
| | | , { 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' } |
| | | ]] |
| | |
| | | "RowID": 10 |
| | | , 'HEmpID': '0' |
| | | , 'HEmpName': '' |
| | | , 'HIsPM': '0' |
| | | , 'HIsPM': false |
| | | , 'HRate': '0' |
| | | , 'HAvgMoney': '0' |
| | | , 'HCountMoney': '0' |
| | |
| | | ]; |
| | | option.data = rowdata; |
| | | table.render(option); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region 项ç®ä»£ç éæ©é¡µé¢ |
| | | function get_checkSearchHProNumber() { |
| | | //æå¼å·¥ç¨é¡¹ç®å°çªä½ |
| | | layer.open({ |
| | | type: 2 |
| | | , skin: "layui-layer-rim" //å ä¸è¾¹æ¡ |
| | | , title: "å·¥ç¨é¡¹ç®å表" //æ é¢ |
| | | , closeBtn: 1 //çªä½å³ä¸è§å
³é ç æ ·å¼ |
| | | , shift: 2 //å¼¹åºå¨ç» |
| | | , area: ["90%", "90%"] //çªä½å¤§å° |
| | | , maxmin: true //设置æå¤§æå°æé®æ¯å¦æ¾ç¤º |
| | | , content: ["../../项ç®ç®¡ç/å·¥ç¨é¡¹ç®/PM_ProjectBillList.html", "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("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | } |
| | | //è®¾ç½®è¡¨å¤´æ°æ® |
| | | //è®¾ç½®ææ¬æ¡å¼ |
| | | $("#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") { |
| | | $("#checkboxHIsKey").attr("checked", true); |
| | | form.render("checkbox"); |
| | | } else { |
| | | $("#checkboxHIsKey").attr("checked", false); |
| | | form.render("checkbox"); |
| | | } |
| | | //è®¾ç½®è¡¨ä½æ°æ® |
| | | var HBillInterID = checkStatus.data[0].HInterID; |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/PM_ProjectBill/editInit", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "HInterID": HBillInterID, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | //è·åæ°æ®åºä¸è¯¥é¡¹ç®çé¡¹ç®æåæ°æ® |
| | | var tableSub_Emp = result.data[2]; |
| | | //æ ¹æ®è¡¨ä½åï¼å¡«å
è¡¨ä½æ°æ® |
| | | var num = []; |
| | | for (var i = 0; i < tableSub_Emp.length; i++) { |
| | | var rowdata = |
| | | { |
| | | "RowID": (i + 1) * 10 |
| | | , 'HEmpID': tableSub_Emp[i]["HEmployeeID"] |
| | | , 'HEmpName': tableSub_Emp[i]["HEmployeeName"] |
| | | , 'HIsPM': tableSub_Emp[i]["HIsPM"] |
| | | , 'HRate': '0' |
| | | , 'HAvgMoney': '0' |
| | | , 'HCountMoney': '0' |
| | | , 'HRemarkSub': '' |
| | | }; |
| | | num.push(rowdata); |
| | | } |
| | | option.data = num; |
| | | table.render(option); |
| | | //设置å¤éæ¡éä¸ç¶æ |
| | | for (var i = 0; i < tableSub_Emp.length; i++) { |
| | | if (tableSub_Emp[i].HIsPM) { |
| | | $('#HIsPM' + (i + 1)).attr("checked", true); |
| | | } |
| | | } |
| | | form.render('checkbox'); |
| | | } |
| | | }) |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , btn2: function (index, layero) { } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | } |
| | | |
| | | $("#HProjectStageID").val(checkStatus.data[0].HItemID);//项ç®é¶æ®µid |
| | | $("#HProjectStageName").val(checkStatus.data[0].HName);//项ç®é¶æ®µåç§° |
| | | if ($("#HProjectStageName").val() == "") { |
| | | $("#HProjectStageName").val(checkStatus.data[0].HNumber); |
| | | } |
| | | $("#HProjectStageName").val(checkStatus.data[0].é¶æ®µåç§°);//项ç®é¶æ®µåç§° |
| | | $("#HStageNote").val(checkStatus.data[0].项ç®é¶æ®µè¯¦ç»å
容);//项ç®é¶æ®µè¯¦ç»å
容 |
| | | layer.close(index);//å
³éå¼¹çª |
| | | } |
| | | , btn2: function (index, layero) { } |
| | |
| | | num.push(table.cache["mainTable"][i]) |
| | | } |
| | | } |
| | | |
| | | //è·åç»ç»æ°æ® |
| | | data.field.HPRDORGID = sessionStorage["OrganizationID"];//ç»ç» |
| | | data.field.HIsKey = data.field.HIsKey ? 1 : 0; |
| | | //转æ¢éç¨ç¢æ°æ® |
| | | if (data.field.HIsKey == "true") { |
| | | data.field.HIsKey = 1; |
| | | } else { |
| | | data.field.HIsKey = 0; |
| | | } |
| | | //è¥ä¸ºç¼è¾-ä¿åï¼åæ´æ°ä¿®æ¹äººåä¿®æ¹æ¶é´ |
| | | if (OperationType == 3) { |
| | | data.field.HUpdater = sessionStorage["HUserName"]; |
| | | data.field.HUpdaterDate = Format(new Date(), "yyyy-MM-dd"); |
| | | $("#HUpdater").val(sessionStorage["HUserName"]); |
| | | $("#HUpdaterDate").val(Format(new Date(), "yyyy-MM-dd")); |
| | | } |
| | | //è·åè¡¨å¤´æ°æ®å¹¶åºåå |
| | | var sMainStr = JSON.stringify(data.field); //ä¸»è¡¨æ°æ® |
| | | //åè¡¨æ°æ®åºåå |
| | |
| | | , "HMaker": tableMain[0]["HMaker"] |
| | | , "HUpdater": tableMain[0]["HUpdater"] |
| | | , "HChecker": tableMain[0]["HChecker"] |
| | | , "HMakerDate": tableMain[0]["HMakerDate"] == null ? "" : Format(new Date(tableMain[0]["HMakerDate"]), "yy-MM-dd") |
| | | , "HUpdaterDate": tableMain[0]["HUpdaterDate"] == null ? "" : Format(new Date(tableMain[0]["HUpdaterDate"]), "yy-MM-dd") |
| | | , "HCheckerDate": tableMain[0]["HCheckerDate"] == null ? "" : Format(new Date(tableMain[0]["HCheckerDate"]), "yy-MM-dd") |
| | | , "HMakerDate": tableMain[0]["HMakerDate"] == null ? "" : Format(new Date(tableMain[0]["HMakerDate"]), "yyyy-MM-dd") |
| | | , "HUpdaterDate": tableMain[0]["HUpdaterDate"] == null ? "" : Format(new Date(tableMain[0]["HUpdaterDate"]), "yyyy-MM-dd") |
| | | , "HCheckerDate": tableMain[0]["HCheckerDate"] == null ? "" : Format(new Date(tableMain[0]["HCheckerDate"]), "yyyy-MM-dd") |
| | | , "HCloseMan": tableMain[0]["HCloseMan"] |
| | | , "HDeleteMan": tableMain[0]["HDeleteMan"] |
| | | , "HBacker": tableMain[0]["HBacker"] |
| | | , "HCloseManDate": tableMain[0]["HCloseManDate"] == null ? "" : Format(new Date(tableMain[0]["HCloseManDate"]), "yyyy-MM-dd") |
| | | , "HDeleteManDate": tableMain[0]["HDeleteManDate"] == null ? "" : tFormat(new Date(tableMain[0]["HDeleteManDate"]), "yyyy-MM-dd") |
| | | , "HCloseManDate": tableMain[0]["HCloseDate"] == null ? "" : Format(new Date(tableMain[0]["HCloseDate"]), "yyyy-MM-dd") |
| | | , "HDeleteManDate": tableMain[0]["HDeleteDate"] == null ? "" : Format(new Date(tableMain[0]["HDeleteDate"]), "yyyy-MM-dd") |
| | | , "HBackerDate": tableMain[0]["HBackerDate"] == null ? "" : Format(new Date(tableMain[0]["HBackerDate"]), "yyyy-MM-dd") |
| | | , "HBackRemark": tableMain[0]["HBackRemark"] |
| | | }); |
| | | |
| | | var HIsKey = tableMain[0].HIsKey; |
| | | if (HIsKey) { |
| | | $("input[name='checkboxHIsKey'][value='" + HIsKey + "']").attr("checked", true); |
| | | //è¥è¯¥é¶æ®µä¸ºéç¨ç¢ï¼å设置éç¨ç¢å¤éæ¡ä¸ºéä¸ |
| | | if (tableMain[0]["HIsKey"]) { |
| | | $("#checkboxHIsKey").attr("checked", true); |
| | | form.render("checkbox"); |
| | | } |
| | | |
| | | //å表 èµå¼ |
| | | for (var i = 0; i < tableSub.length; i++) { |
| | | tableSub[i].HIsPM = (tableSub[i].HIsPM) ? 1 : 0; |
| | | } |
| | | //ç»ç»çå¼HOrgIDååï¼éæ°æ¸²æ |
| | | HOrgIDBar = tableMain[0]["HOrgID"]; |
| | | |
| | | //å表 |
| | | option.data = tableSub; |
| | | table.render(option); |
| | | //对å表ä¸ç项ç®ç»çå¤éæ¡è¿è¡éä¸ |
| | | for (var i = 0; i < tableSub.length; i++) { |
| | | if (tableSub[i].HIsPM) { |
| | | $('#HIsPM' + (i + 1)).attr("checked", true); |
| | | } |
| | | } |
| | | form.render('checkbox'); |
| | | |
| | | } |
| | | }) |
| | | } |
| | | //#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_ProjectReport_Display() { |
| | | $.ajax({ |
| | | url: GetWEBURL() + "/PM_ProjectBill/set_ProjectReport", |
| | | type: "GET", |
| | | async: false, |
| | | data: { "HInterID": linterid, "HProjectStageID": HProjectStageID, "user": sessionStorage["HUserName"] }, |
| | | success: function (result) { |
| | | var tableMain = result.data[0]; |
| | | var tableSub = result.data[1]; |
| | | |
| | | //#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); |
| | | //主表 èµå¼ |
| | | form.val("formData", { //formTest å³ class="layui-form" æå¨å
ç´ å±æ§ lay-filter="" 对åºçå¼ |
| | | "HProID": tableMain[0]["HInterID"] |
| | | , "HProNumber": tableMain[0]["项ç®ä»£ç "] |
| | | , "HMainSourceBillNo": tableMain[0]["åæ®å·"] |
| | | , "HMainSourceBillType": tableMain[0]["åæ®ç±»å"] |
| | | , "HProjectStageID": tableMain[0]["HProjectStageID"] |
| | | , "HProjectStageName": tableMain[0]["项ç®é¶æ®µ"] |
| | | , "HStageNote": tableMain[0]["项ç®é¶æ®µè¯¦ç»å
容"] |
| | | , "HRelationGoods": tableMain[0]["é¶æ®µç¸å
³äº¤ä»ç©"] |
| | | , "HIsKey": tableMain[0]["éç¨ç¢"]=="Y"?true:false |
| | | , "HRate": tableMain[0]["é¶æ®µä¸ç»©å æ¯"] |
| | | , "HOrgID": tableMain[0]["HOrgID"] |
| | | }); |
| | | //è¥è¯¥é¶æ®µä¸ºéç¨ç¢ï¼å设置éç¨ç¢å¤éæ¡ä¸ºéä¸ |
| | | if (tableMain[0]["éç¨ç¢"]=="Y") { |
| | | $("#checkboxHIsKey").attr("checked", true); |
| | | form.render("checkbox"); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | //#endregion |
| | | //ç»ç»çå¼HOrgIDååï¼éæ°æ¸²æ |
| | | HOrgIDBar = tableMain[0]["HOrgID"]; |
| | | |
| | | //#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); |
| | | //å表 |
| | | option.data = tableSub; |
| | | table.render(option); |
| | | //对å表ä¸ç项ç®ç»çå¤éæ¡è¿è¡éä¸ |
| | | for (var i = 0; i < tableSub.length; i++) { |
| | | if (tableSub[i].HIsPM) { |
| | | $('#HIsPM' + (i + 1)).attr("checked", true); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |
| | | layer.close(wait); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | //#endregion |
| | | form.render('checkbox'); |
| | | |
| | | //#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 é空éªè¯ |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | | //æ¬é¶æ®µä¸ç»©å æ¯æ ¼å¼æ£éª |
| | | var HRate1 = $("#HRate").val() + ""; |
| | | if (HRate1.substring(HRate1.length - 1, HRate1.length) == ".") { |
| | |
| | | } 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; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | //#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 |
| | | return true; |
| | | } |
| | | //#endregion |
| | |
| | | option.data[i - 1] = data[0]; |
| | | option.data[i] = tables[0]; |
| | | table.render(option); |
| | | CheckedSet_tableSub_Emp(); |
| | | break; |
| | | } |
| | | } |
| | |
| | | option.data[i + 1] = data[0]; |
| | | option.data[i] = tables[0]; |
| | | table.render(option); |
| | | CheckedSet_tableSub_Emp(); |
| | | break; |
| | | } |
| | | } |
| | |
| | | oldData.splice(obj.tr.data('index'), 1) |
| | | option.data = oldData;//å°æ°æ®ç»å®å°dataä¸ |
| | | table.render(option); |
| | | CheckedSet_tableSub_Emp(); |
| | | layer.close(index); |
| | | } |
| | | }); |
| | |
| | | } |
| | | //#endregion |
| | | |
| | | //#region é¡¹ç®æå表-å·æ°è®¾ç½®å¤éæ¡ç¶æ |
| | | function CheckedSet_tableSub_Emp() { |
| | | var tableSub_Emp = option.data; |
| | | //对å表ä¸ç项ç®ç»çå¤éæ¡è¿è¡éä¸ |
| | | for (var i = 0; i < tableSub_Emp.length; i++) { |
| | | if (tableSub_Emp[i].HIsPM) { |
| | | $('#HIsPM' + (i + 1)).attr("checked", true); |
| | | } |
| | | } |
| | | form.render('checkbox'); |
| | | } |
| | | //#endregion |
| | | |
| | | //#region éèå设置 |
| | | function get_HideColumn() { |
| | | var colName = ""; |
| | |
| | | success: function (data1) { |
| | | if (data1.data.length != 0) { |
| | | var dataCol = [];//æ°æ®åºæ¥è¯¢åºçåæ°æ® |
| | | var titleData = ["ç¨åºå·", "æ¬å·¥åºç¡®è®¤è®°å½", "èªå¨ç§»è½¬", "æ¢åå夿¶é´", "æ¬éå夿¶é´", "ä¸é循ç¯å¨æ", "ä¸éåºå®å¤©æ°", "å¼å·¥ä½éï¼åºæ°ï¼", "å¼å·¥ä½éï¼å¤©æ°ï¼", "æ åå®é¢", "æ¥åºåä»·", "ä¸åæ ¼åä»·", "å·¥åºå·¥ä»·", "ç产å®é¢", "坿ä½è®¾å¤æ°", "æ å人æ°", "æµè½¬å·¥åº", "ä¸éæµè½¬å·¥åº", "åºå®ç产天æ°", "çäº§å¨æ", "ææ¾åº", "å¨è½¬ç®±", "å¨è½¬ç®±æ å", "æ¢æ¨¡æ¶é´", "转移æ¶é´", "æéæ¶é´", "å夿¶é´", "产线人æ°", "产线产è½", "产线ä¸å¿", "è¯ç", "å å·¥æ°é", "è¿è¡æ¶é´", "æ¶é´åä½", "å¾çº¸ç¼å·", "模å
·ç¼å·", "è¯åä»", "æ¥åºåä»", "ä¸è¯åä»", "å·¥åºç±»å"];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | var titleData = ["è¡å·","æåID"];//ä¸éè¦æ¾ç¤ºçåæ®µ 坿©å± |
| | | |
| | | dataCol = data1.data[0].HGridString.split(','); |
| | | |
| | |
| | | } |
| | | //设置å
容åä½å¤§å° |
| | | 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) { |
| | |
| | | } |
| | | } |
| | | table.render(option); |
| | | CheckedSet_tableSub_Emp(); |
| | | } else { |
| | | table.render(option); |
| | | CheckedSet_tableSub_Emp(); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("æ¥å£è¯·æ±å¤±è´¥!", { icon: 5 }); |