优化代码

This commit is contained in:
java110 2022-09-09 10:30:59 +08:00
parent 509a26ea50
commit bfbc6aa85f
2 changed files with 10 additions and 10 deletions

View File

@ -1,9 +1,9 @@
<div id="staffAttendanceManageModel" class="modal fade" role="dialog" aria-labelledby="staffAttendanceManageModel" aria-hidden="true">
<div id="staffAttendanceDetailModel" class="modal fade" role="dialog" aria-labelledby="staffAttendanceDetailModel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="chooseFloorModelLabel">
<span><vc:i18n name="考勤明细" namespace="staffAttendanceManage"></vc:i18n></span>
<span><vc:i18n name="考勤明细" namespace="staffAttendanceDetail"></vc:i18n></span>
</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
@ -18,15 +18,15 @@
<thead>
<tr>
<th class="text-center">
<span><vc:i18n name="员工名称" namespace="staffAttendanceManage"></vc:i18n></span>
<span><vc:i18n name="员工名称" namespace="staffAttendanceDetail"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="考勤时间" namespace="staffAttendanceManage"></vc:i18n></span>
<span><vc:i18n name="考勤时间" namespace="staffAttendanceDetail"></vc:i18n></span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="detail in staffAttendanceManageInfo.details">
<tr v-for="detail in staffAttendanceDetailInfo.details">
<td class="text-center">{{detail.staffName}}</td>
<td class="text-center">{{detail.clockTime}}</td>
</tr>

View File

@ -1,15 +1,15 @@
(function(vc) {
vc.extends({
data: {
staffAttendanceManageInfo: {
staffAttendanceDetailInfo: {
details: []
}
},
_initMethod: function() {},
_initEvent: function() {
vc.on('staffAttendanceManage', 'openModel', function(_param) {
$('#staffAttendanceManageModel').modal('show');
$that.staffAttendanceManageInfo.feeDetailDiscounts = [];
vc.on('staffAttendanceDetail', 'openModel', function(_param) {
$('#staffAttendanceDetailModel').modal('show');
$that.staffAttendanceDetailInfo.feeDetailDiscounts = [];
vc.component._loadStaffAttendanceDetailInfo(_param);
});
},
@ -29,7 +29,7 @@
param,
function(json, res) {
let _attendanceLogManageInfo = JSON.parse(json);
vc.component.staffAttendanceManageInfo.details = _attendanceLogManageInfo.data;
vc.component.staffAttendanceDetailInfo.details = _attendanceLogManageInfo.data;
},
function(errInfo, error) {
console.log('请求失败处理');