From 1a40b7a8d4e6e24db362715b030ca9dfc1e2035e Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 03 四月 2024 10:19:26 +0800
Subject: [PATCH] 销售出库明细报表:分组合计增加千分号、控制小数位数
---
WebTM/views/工资管理/考勤汇报单/Pay_WorkTimesBillEdit.html | 345 +++++++++++++++++++++++++++++++--------------------------
1 files changed, 188 insertions(+), 157 deletions(-)
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillEdit.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillEdit.html"
index dd3c4ff..df7d350 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillEdit.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillEdit.html"
@@ -15,6 +15,7 @@
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script src="../../../layuiadmin/PubCustom.js"></script>
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script src="../../../layuiadmin/PageTitle.js"></script>
<style type="text/css">
.layui-form-item .layui-inline {
margin-right: 0;
@@ -191,26 +192,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;">
@@ -224,7 +210,20 @@
</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>
@@ -283,6 +282,14 @@
, laydate = layui.laydate
, element = layui.element;
+ //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+ var HModuleType = "2203";
+ //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+ var HPageTitle = get_PageTitle(HModuleType) == "" ? $("h1").html() : get_PageTitle(HModuleType);
+ $("h1").html('<b>' + HPageTitle + '</b>');
+ //#endregion
+
+
var params = get_UrlVars();
if (typeof (params[params[0]]) == "undefined") {
var OperationType = 1;//鎿嶄綔绫诲瀷
@@ -300,40 +307,46 @@
});
-
var tableReload = table.reload;
var option = {
elem: '#mainTable'
, toolbar: '#toolbarDemo'
, height: 500
+ , totalRow: true
//,url: '/demo/table/user/' //鏁版嵁鎺ュ彛
, page: true //寮�鍚垎椤�
, cols: [[ //琛ㄥご
- { type: 'checkbox', fixed: 'left' }
+ { type: 'checkbox', totalRowText: '鍚堣' }
, { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
, { field: 'HEmpID', title: 'HEmpID', edit: 'text', width: 100, hide: true }
, { field: 'HEmpNumber', title: '鑱屽憳浠g爜', edit: 'text', event: 'HEmpCheck', width: 150 }
, { field: 'HEmpName', title: '鑱屽憳鍚嶇О', edit: 'text', width: 100 }
, { field: 'HEmpRate', title: '鑱屽憳绯绘暟', edit: 'text', width: 100 }
- , { field: 'HPMTimes', title: '涓嬪崍宸ユ椂', edit: 'text', width: 100 }
- , { field: 'HAMTimes', title: '涓婂崍宸ユ椂', edit: 'text', width: 100 }
- , { field: 'HBaseTimes', title: '鍩烘湰宸ユ椂', edit: 'text', width: 100 }
- , { field: 'HBaseDays', title: '鍩烘湰澶╂暟', edit: 'text', width: 100 }
- , { field: 'HOverTimes', title: '鍔犵彮宸ユ椂', edit: 'text', width: 100 }
- , { field: 'HOverDays', title: '鍔犵彮澶╂暟', edit: 'text', width: 100 }
- , { field: 'HLeaveTimes', title: '璇峰亣宸ユ椂', edit: 'text', width: 100 }
- , { field: 'HLeaveDays', title: '璇峰亣澶╂暟', edit: 'text', width: 100 }
- , { field: 'HLateQty', title: '杩熷埌娆℃暟', edit: 'text', width: 100 }
- , { field: 'HLateTimes', title: '杩熷埌鏃堕棿', edit: 'text', width: 100 }
- , { field: 'HEarlyQty', title: '鏃╅��娆℃暟', edit: 'text', width: 100 }
- , { field: 'HEarlyTimes', title: '鏃╅��鏃堕棿', edit: 'text', width: 100 }
- , { field: 'HOutForEmpQty', title: '绉佸嚭娆℃暟', edit: 'text', width: 100 }
- , { field: 'HOutForEmpTimes', title: '绉佸嚭鏃堕棿', edit: 'text', width: 100 }
- , { field: 'HOutForComQty', title: '鍏嚭娆℃暟', edit: 'text', width: 100 }
- , { field: 'HOutForComTimes', title: '鍏嚭鏃堕棿', edit: 'text', width: 100 }
- , { field: 'HAbsentDays', title: '鏃峰伐澶╂暟', edit: 'text', width: 100 }
+ , { field: 'HPMTimes', title: '涓嬪崍宸ユ椂', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HAMTimes', title: '涓婂崍宸ユ椂', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HBaseTimes', title: '鍩烘湰宸ユ椂', width: 100, totalRow: true }
+ , { field: 'HBaseDays', title: '鍩烘湰澶╂暟', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HOverTimes', title: '鍔犵彮宸ユ椂', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HOverDays', title: '鍔犵彮澶╂暟', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HLeaveTimes', title: '璇峰亣宸ユ椂', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HLeaveDays', title: '璇峰亣澶╂暟', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HLateQty', title: '杩熷埌娆℃暟', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HLateTimes', title: '杩熷埌鏃堕棿', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HEarlyQty', title: '鏃╅��娆℃暟', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HEarlyTimes', title: '鏃╅��鏃堕棿', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HOutForEmpQty', title: '绉佸嚭娆℃暟', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HOutForEmpTimes', title: '绉佸嚭鏃堕棿', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HOutForComQty', title: '鍏嚭娆℃暟', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HOutForComTimes', title: '鍏嚭鏃堕棿', edit: 'text', width: 100, totalRow: true }
+ , { field: 'HAbsentDays', title: '鏃峰伐澶╂暟', edit: 'text', width: 100, totalRow: true }
, { field: 'HRestFlag', title: '鍘備紤', edit: 'text', value: "true", width: 100, hide: true }
, { field: 'HSchClassID', title: '鐝', edit: 'text', width: 100 }
+ , { field: 'HCTPrjID', title: '鏍哥畻鏂规浠g爜', edit: 'text', width: 100, hide: true}
+ , { field: 'HCTPrjName', title: '鏍哥畻鏂规鍚嶇О', edit: 'text', event: 'HCTPrjName', width: 100 }
+ , { field: 'HWorkTypeID', title: '宸ョ浠g爜', edit: 'text', width: 100, hide: true}
+ , { field: 'HWorkTypeName', title: '宸ョ鍚嶇О', edit: 'text', event: 'HWorkTypeName', width: 100 }
+ , { field: 'HPayMoney', title: '灏忔椂宸ヨ祫', edit: 'text', width: 100 }
+ , { field: 'HMoney', title: '宸ヨ祫', width: 100, totalRow: true }
//, { field: 'HNeedTimes ', title: '搴斾笂鐝伐鏃�', edit: 'text', width: 100 }
, { field: 'HRemark', title: '澶囨敞', edit: 'text', width: 100 }
, { field: 'HMainSourceInterID ', title: '婧愬崟涓诲唴鐮�', edit: 'text', width: 100, hide: true }
@@ -348,21 +361,14 @@
if (OperationType == 1) {
$("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
$("#HMaker").val(sessionStorage["HUserName"]);
- $("#HCheckDate").val(Format(new Date(), "yyyy-MM-dd"));
- $("#HChecker").val(sessionStorage["HUserName"]);
- $("#HUpDateDate").val(Format(new Date(), "yyyy-MM-dd"));
- $("#HUpDater").val(sessionStorage["HUserName"]);
- $("#HCloseDate").val(Format(new Date(), "yyyy-MM-dd"));
- $("#HDeleteDate").val(Format(new Date(), "yyyy-MM-dd"));
- $("#HDeleteMan").val(sessionStorage["HUserName"]);
- $("#HCloseMan").val(sessionStorage["HUserName"]);
//鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": " ", "HSQProcName": " ","HProcID":0, "HZRProcName": " ", "HMRBChecker": " ", "HRemark": " ", "HPSProcName": " ", "HCloseMan": " " }
option.data = [{
"HEmpID": "", "HEmpNumber": "", "HEmpName": "", "HEmpID": "", "HEmpRate": 0
, "HPMTimes": 0, "HAMTimes": 0, "HBaseTimes": 0, "HBaseDays": 0, "HOverTimes": 0
, "HOverDays": 0, "HLeaveTimes": 0, "HLeaveDays": 0, "HLateQty": 0, "HLateTimes": 0, "HEarlyQty": 0
, "HEarlyTimes": 0, "HOutForEmpQty": 0, "HOutForEmpTimes": 0, "HOutForComQty": 0, "HOutForComTimes": 0, "HAbsentDays": 0
- , "HRestFlag": "true", "HSchClassID": 0, "HNeedTimes": 0, "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0
+ , "HRestFlag": "true", "HSchClassID": 0, "HCTPrjID": 0, "HCTPrjName": "", "HWorkTypeID": 0, "HWorkTypeName": "", "HPayMoney": 0,"HMoney":0
+ , "HNeedTimes": 0, "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0
, "HSourceBillType": "", "HRemark": ""
}];
table.render(option);
@@ -373,7 +379,7 @@
$.ajax({
url: GetWEBURL() + 'Pay_WorkTimesBill/Pay_WorkTimesBillListProjectDetai',
type: "GET",
- data: { "sqlWhere": "and hmainid=" + hID },
+ data: { "HInterID": hID },
success: function (result) {
if (result.count == 1) {
@@ -404,7 +410,8 @@
, "HPMTimes": 0, "HAMTimes": 0, "HBaseTimes": 0, "HBaseDays": 0, "HOverTimes": 0
, "HOverDays": 0, "HLeaveTimes": 0, "HLeaveDays": 0, "HLateQty": 0, "HLateTimes": 0, "HEarlyQty": 0
, "HEarlyTimes": 0, "HOutForEmpQty": 0, "HOutForEmpTimes": 0, "HOutForComQty": 0, "HOutForComTimes": 0, "HAbsentDays": 0
- , "HRestFlag": "true", "HSchClassID": 0, "HNeedTimes": 0, "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0
+ , "HRestFlag": "true", "HSchClassID": 0, "HCTPrjID": 0, "HCTPrjName": "", "HWorkTypeID": 0, "HWorkTypeName": "", "HPayMoney": 0, "HMoney": 0
+ , "HNeedTimes": 0, "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0
, "HSourceBillType": "", "HRemark": ""
};
switch (obj.event) {
@@ -486,6 +493,54 @@
}
});
+ }
+ if (obj.event === 'HCTPrjName') {//鏍哥畻鏂规
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '鏍哥畻鏂瑰紡鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_ClassTimePrjList.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('璇烽�夋嫨鏁版嵁');
+ }
+ obj.update({
+ HCTPrjName: checkStatus.data[0].HName
+ , HCTPrjID: checkStatus.data[0].HItemID
+ });
+ layer.close(layer.index);
+ }
+ , btn2: function (index, layero) { }
+ })
+ }
+ if (obj.event === 'HWorkTypeName') {//宸ョ
+ layer.open({
+ type: 2//寮圭獥绫诲瀷
+ , skin: 'layui-layer-rim' //鍔犱笂杈规
+ , area: ['90%', '90%']//澶у皬
+ , title: '宸ョ鍒楄〃'//鏍囬
+ , shift: 2//寮瑰嚭鍔ㄧ敾
+ , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WorkTypeList.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('璇烽�夋嫨鏁版嵁');
+ }
+ obj.update({
+ HWorkTypeName: checkStatus.data[0].HName
+ , HWorkTypeID: checkStatus.data[0].HItemID
+ });
+ layer.close(layer.index);
+ }
+ , btn2: function (index, layero) { }
+ })
}
//if (obj.event === 'HMaterCheck') //妯″叿淇℃伅
//{
@@ -623,55 +678,56 @@
//layer.msg('[ID: ' + data.id + '] ' + field + ' 瀛楁鏇存敼涓猴細' + value);
switch (field) {
- case "HDesignLife": //璁捐瀵垮懡
+ case "HPMTimes": //涓嬪崍宸ユ椂
value = isNaN(value) ? 0 : value;
- var HUseLife = isNaN(data.HUseLife) ? 0 : data.HUseLife;
+ //鍩烘湰宸ユ椂=涓婂崍宸ユ椂+涓嬪崍宸ユ椂
+ var HBaseTimes = Number(isNaN(data.HAMTimes) ? 0 : data.HAMTimes) + Number(value);
+ //宸ヨ祫=灏忔椂宸ヨ祫*鍩烘湰宸ユ椂
+ var HMoney = Number(isNaN(data.HPayMoney) ? 0 : data.HPayMoney) * HBaseTimes;
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
- HDesignLife: value, //璁捐瀵垮懡
- HLeaveLife: value - HUseLife, //鍓╀綑瀵垮懡=璁捐瀵垮懡-浣跨敤瀵垮懡
+ HPMTimes: value, //涓嬪崍宸ユ椂
+ HBaseTimes: HBaseTimes, //鍩烘湰宸ユ椂
+ HMoney: HMoney, //宸ヨ祫
});
break;
- case "HLeaveLife": //鍓╀綑瀵垮懡
- var HDesignLife = isNaN(data.HDesignLife) ? 0 : data.HDesignLife;
- var HUseLife = isNaN(data.HUseLife) ? 0 : data.HUseLife;
- //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
- obj.tr.find('td[data-field=HLeaveLife] input').val(HDesignLife - HUseLife);
- obj.update({
- HLeaveLife: HDesignLife - HUseLife, //鍓╀綑瀵垮懡=璁捐瀵垮懡-浣跨敤瀵垮懡
- });
- break;
- case "HUseLife": //浣跨敤瀵垮懡
- var HDesignLife = isNaN(data.HDesignLife) ? 0 : data.HDesignLife;
+ case "HAMTimes": //涓婂崍宸ユ椂
value = isNaN(value) ? 0 : value;
+ //鍩烘湰宸ユ椂=涓婂崍宸ユ椂+涓嬪崍宸ユ椂
+ var HBaseTimes = Number(value) + Number(isNaN(data.HPMTimes) ? 0 : data.HPMTimes);
+ //宸ヨ祫=灏忔椂宸ヨ祫*鍩烘湰宸ユ椂
+ var HMoney = Number(isNaN(data.HPayMoney) ? 0 : data.HPayMoney) * HBaseTimes;
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
- HLeaveLife: HDesignLife - value, //鍓╀綑瀵垮懡=璁捐瀵垮懡-浣跨敤瀵垮懡
+ HAMTimes: value, //涓婂崍宸ユ椂
+ HBaseTimes: HBaseTimes, //鍩烘湰宸ユ椂
+ HMoney: HMoney, //宸ヨ祫
});
break;
- case "HQty": //瀹炲彂鏁伴噺
+ case "HPayMoney": //灏忔椂宸ヨ祫
value = isNaN(value) ? 0 : value;
- var HPrice = isNaN(data.HPrice) ? 0 : data.HPrice;
+ //宸ヨ祫=灏忔椂宸ヨ祫*鍩烘湰宸ユ椂
+ var HMoney = Number(value) * Number(isNaN(data.HBaseTimes) ? 0 : data.HBaseTimes);
+ //console.log(HMoney);
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
- HMoney: value * HPrice, //閲戦=瀹炴敹鏁伴噺*鍗曚环
+ HMoney: HMoney, //宸ヨ祫
});
break;
- case "HPrice": //鍗曚环
+ case "HMoney": //宸ヨ祫
value = isNaN(value) ? 0 : value;
- var HQty = isNaN(data.HQty) ? 0 : data.HQty;
+ if (data.HPayMoney == 0 || data.HPayMoney == null)
+ {
+ value = 0;
+ }
+ //宸ヨ祫=灏忔椂宸ヨ祫*鍩烘湰宸ユ椂
+ var HMoney = Number(isNaN(data.HPayMoney) ? 0 : data.HPayMoney) * Number(isNaN(data.HBaseTimes) ? 0 : data.HBaseTimes);
+ console.log(HMoney);
//鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
obj.update({
- HMoney: value * HQty, //閲戦=瀹炴敹鏁伴噺*鍗曚环
+ HMoney: HMoney, //宸ヨ祫
});
break;
- case "HMoney": //閲戦
- var HPrice = isNaN(data.HPrice) ? 0 : data.HPrice;
- var HQty = isNaN(data.HQty) ? 0 : data.HQty;
- //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
- obj.update({
- HMoney: HPrice * HQty, //閲戦=瀹炴敹鏁伴噺*鍗曚环
- });
break;
default:
}
@@ -708,11 +764,13 @@
, "HMaker": data.鍒跺崟浜�
, "HChecker": data.瀹℃牳浜�
, "HCloseMan": data.鍏抽棴浜�
- , "HMakeDate": data.鍒跺崟鏃ユ湡
- , "HCheckDate": data.瀹℃牳鏃ユ湡
- , "HCloseDate": data.鍏抽棴鏃ユ湡
- , "HUpDateDate": data.淇敼鏃ユ湡
- , "HDeleteDate": data.浣滃簾鏃ユ湡
+ , "HUpDater": data.淇敼浜�
+ , "HDeleteMan": data.浣滃簾浜�
+ , "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Format(data.鍒跺崟鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
+ , "HCheckDate": data.瀹℃牳鏃ユ湡 == null ? "" : Format(data.瀹℃牳鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
+ , "HCloseDate": data.鍏抽棴鏃ユ湡 == null ? "" : Format(data.鍏抽棴鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
+ , "HUpDateDate": data.淇敼鏃ユ湡 == null ? "" : Format(data.淇敼鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
+ , "HDeleteDate": data.浣滃簾鏃ユ湡 == null ? "" : Format(data.浣滃簾鏃ユ湡, "yyyy-MM-dd hh:mm:ss")
});
} else {
@@ -776,6 +834,7 @@
}
$("#HGroupName").val(checkStatus.data[0].鐝粍);
$("#HGroupID").val(checkStatus.data[0].HItemID);
+ GetEmployee();
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) {
@@ -790,45 +849,53 @@
}
});
});
+ function GetEmployee() {
+ $.ajax({
+ url: GetWEBURL() + "/Pay_WorkTimesBill/GetEmployeeByHGroup",
+ type: "GET",
+ data: { "HGroupID": $("#HGroupID").val() },
+ success: function (result) {
+ if (result != null) {
+ if (result.count == 1) {
+ var BYData = result.list[0];
+ var rowdate1 = layui.table.cache["mainTable"];
+ option.data = [{
+ "HEmpID": "", "HEmpNumber": "", "HEmpName": "", "HEmpID": "", "HEmpRate": 0
+ , "HPMTimes": 0, "HAMTimes": 0, "HBaseTimes": 0, "HBaseDays": 0, "HOverTimes": 0
+ , "HOverDays": 0, "HLeaveTimes": 0, "HLeaveDays": 0, "HLateQty": 0, "HLateTimes": 0, "HEarlyQty": 0
+ , "HEarlyTimes": 0, "HOutForEmpQty": 0, "HOutForEmpTimes": 0, "HOutForComQty": 0, "HOutForComTimes": 0, "HAbsentDays": 0
+ , "HRestFlag": "true", "HSchClassID": 0, "HCTPrjID": 0, "HCTPrjName": "", "HWorkTypeID": 0, "HWorkTypeName": "", "HPayMoney": 0, "HMoney": 0
+ , "HNeedTimes": 0, "HMainSourceInterID": 0, "HMainSourceEntryID": 0, "HMainSourceBillNo": 0
+ , "HSourceBillType": "", "HRemark": ""
+ }];
+ table.render(option);
+ if (BYData.length != 0) //琛ㄤ綋鏁版嵁涓虹┖鏃�
+ {
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < BYData.length; i++) {
+ var checkrow = {
+ "HEmpID": BYData[i].HEmpID, "HEmpNumber": BYData[i].HEmpNumber, "HEmpName": BYData[i].HEmpName, "HEmpRate": BYData[i].HEmpRate
+ , "HPMTimes": rowdate1[i].HPMTimes, "HAMTimes": rowdate1[i].HAMTimes, "HBaseTimes": rowdate1[i].HBaseTimes, "HBaseDays": rowdate1[i].HBaseDays, "HOverTimes": rowdate1[i].HOverTimes
+ , "HOverDays": rowdate1[i].HOverDays, "HLeaveTimes": rowdate1[i].HLeaveTimes, "HLeaveDays": rowdate1[i].HLeaveDays, "HLateQty": rowdate1[i].HLateQty, "HLateTimes": rowdate1[i].HLateTimes, "HEarlyQty": rowdate1[i].HEarlyQty
+ , "HEarlyTimes": rowdate1[i].HEarlyTimes, "HOutForEmpQty": rowdate1[i].HOutForEmpQty, "HOutForEmpTimes": rowdate1[i].HOutForEmpTimes, "HOutForComQty": rowdate1[i].HOutForComQty, "HOutForComTimes": rowdate1[i].HOutForComTimes, "HAbsentDays": rowdate1[i].HAbsentDays
+ , "HRestFlag": "true", "HSchClassID": rowdate1[i].HSchClassID, "HCTPrjID": BYData[i].HCTPrjID, "HCTPrjName": BYData[i].HCTPrjName, "HWorkTypeID": rowdate1[i].HWorkTypeID, "HWorkTypeName": rowdate1[i].HWorkTypeName, "HPayMoney": rowdate1[i].HPayMoney, "HMoney": rowdate1[i].HMoney
+ , "HNeedTimes": rowdate1[i].HNeedTimes, "HMainSourceInterID": rowdate1[i].HMainSourceInterID, "HMainSourceEntryID": rowdate1[i].HMainSourceEntryID, "HMainSourceBillNo": rowdate1[i].HMainSourceBillNo
+ , "HSourceBillType": rowdate1[i].HSourceBillType, "HRemark": rowdate1[i].HRemark
+ };
+ buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ table.reload("mainTable", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+ }
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }
+ }
+ })
+ }
-
- ////琛ㄥご淇℃伅涓荤寮圭獥
- //form.on('submit(Employee)', function () {
- // //椤甸潰灞�-鑷畾涔�
- // layer.open({
- // type: 2,
- // skin: 'layui-layer-rim', //鍔犱笂杈规
- // title: '鑱屽憳鍒楄〃',
- // closeBtn: 1,
- // shift: 2,
- // area: ['80%', '80%'],
- // maxmin: true,
- // content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HEmpID', '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].HName);
- // $("#HEmpID").val(checkStatus.data[0].HItemID);
- // layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
- // }
- // , btn2: function (index, layero) {
- // //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
- // //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
- // },
- // end: function () {
-
- // },
- // success: function (layero, index) {
-
- // }
- // });
- //});
//琛ㄥご淇℃伅閮ㄩ棬寮圭獥
form.on('submit(Department)', function () {
//椤甸潰灞�-鑷畾涔�
@@ -866,43 +933,7 @@
}
});
});
- ////琛ㄥご淇℃伅宸ヨ祫绫诲瀷寮圭獥
- //form.on('submit(PayType)', function () {
- // //椤甸潰灞�-鑷畾涔�
- // layer.open({
- // type: 2,
- // skin: 'layui-layer-rim', //鍔犱笂杈规
- // title: '宸ヨ祫绫诲瀷鍒楄〃',
- // closeBtn: 1,
- // shift: 2,
- // area: ['80%', '80%'],
- // maxmin: true,
- // content: ['../../../views/宸ヨ祫绠$悊/Gy_WorkPayTypeBillList.html?Type=HPayTypeID', '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('璇烽�夋嫨鏁版嵁');
- // }
- // $("#HPayTypeName").val(checkStatus.data[0].宸ヨ祫绫诲瀷鍚嶇О);
- // $("#HPayID").val(checkStatus.data[0].HItemID);
- // layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
- // }
- // , btn2: function (index, layero) {
- // //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
- // //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
- // },
- // end: function () {
-
- // },
- // success: function (layero, index) {
-
- // }
- // });
- //});
+
//閫�鍑�
form.on('submit(Exit)', function (data) {
if (OperationType == 1) {
@@ -955,8 +986,8 @@
if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
$('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
- var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
- parent.layer.close(index); //鍐嶆墽琛屽叧闂�
+ //var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
+ //parent.layer.close(index); //鍐嶆墽琛屽叧闂�
});
}
else {
--
Gitblit v1.9.1