|
|
@@ -82,7 +82,15 @@
|
|
|
<td class="text-muted"><span v-if="laborReport.thisRecordOnlineTime">@{{laborReport.thisRecordOnlineTime}}</span></td>
|
|
|
<td><span v-if="laborReport.thisRecordWorkingTime">@{{laborReport.thisRecordWorkingTime}}</span></td>
|
|
|
{{-- <td><span v-if="laborReport.workingDuration">@{{laborReport.workingDuration}}</span></td>--}}
|
|
|
- <td><span v-if="laborReport.remark">@{{laborReport.remark}}</span></td>
|
|
|
+ <td>
|
|
|
+ @can('人事管理-临时工报表-编辑备注')
|
|
|
+ <span v-if="laborReport.remark" class="btn-sm btn-outline-secondary btn" @click="laborReportRemarkCheck($event)" :data_id="laborReport.id">@{{laborReport.remark}}</span>
|
|
|
+ <input v-else class="form-control form-control-sm" @blur="addLaborReportRemark($event)" onfocus="$(this).css('width','85px')" :value="laborReport.remark" :data_id="laborReport.id" >
|
|
|
+ <input type="number" class="form-control form-control-sm" @blur="updateLaborReportRemark($event)" :value="laborReport.remark" :data_id="laborReport.id" style="min-width:85px;display: none">
|
|
|
+ @else
|
|
|
+ <span v-if="laborReport.remark">@{{laborReport.remark}}</span>
|
|
|
+ @endcan
|
|
|
+ </td>
|
|
|
@can('人事管理-临时工报表-删除')
|
|
|
<td><span class="btn btn-sm btn-outline-danger" @click="删除(laborReport.id,laborReport.name)">删</span></td>
|
|
|
@endcan
|
|
|
@@ -133,97 +141,97 @@
|
|
|
<span class="mr-3 text-nowrap"><span class="text-black">临时工:</span><span class="text-black-50">@{{ laborReport.name }} </span></span>
|
|
|
<span class="mr-3 text-nowrap"><span class="text-black">电话:</span><span style="color:#af7651" v-if="">@{{ laborReport.mobile_phone }} </span></span>
|
|
|
<span class="text-nowrap"><span class="text-black">身份证号:</span><span style="color:#af7651" v-if="">@{{ laborReport.identity_number }} </span></span>
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">劳务所:</span><span style="color:#af7651" v-if="">@{{ laborReport.labor_company }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">进组时间:</span><span style="color:#af7651" v-if="">@{{ laborReport.checkInAt }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">审核时间:</span><span style="color:#af7651" v-if="">@{{ laborReport.verifyAt }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">审核人:</span><span style="color:#af7651" v-if="">@{{ laborReport.verifyPerson }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">晚饭打卡(分):</span><span style="color:#af7651" v-if="">@{{ laborReport.relax_time }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">在线时长:</span><span style="color:#af7651" v-if="">@{{ laborReport.onlineDuration }} </span></span>--}}
|
|
|
- {{-- <span class="mr-3 text-nowrap"><span class="text-black">本次工作时长:</span><span style="color:#af7651" v-if="">@{{ laborReport.workingDuration }} </span></span>--}}
|
|
|
- @can('人事管理-临时工报表-删除')
|
|
|
- <span style="transform:scale(1.1)" class="btn btn-sm btn-outline-danger" @click="删除(laborReport.id,laborReport.name)">删</span>
|
|
|
- @endcan
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- <div class="text-info h5 btn btn">{{$laborReports->count()}}/@{{ sum }}</div>
|
|
|
- <div>{{$laborReports->appends($paginateParams)->links()}}</div>
|
|
|
- {{-- 选择晚饭时长弹框 --}}
|
|
|
- <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
- <div class="modal-dialog">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <h5 class="modal-title" id="exampleModalLabel">晚餐时长</h5>
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span aria-hidden="true">×</span>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <form>
|
|
|
- <div class="form-group">
|
|
|
- <label for="relax_time" class="col-form-label">选择晚饭时长:</label>
|
|
|
- <select class="form-control" id="relax_time" v-model="relax_time">
|
|
|
- <option value="30">30分</option>
|
|
|
- <option value="60">60分</option>
|
|
|
- </select>
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">劳务所:</span><span style="color:#af7651" v-if="">@{{ laborReport.labor_company }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">进组时间:</span><span style="color:#af7651" v-if="">@{{ laborReport.checkInAt }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">审核时间:</span><span style="color:#af7651" v-if="">@{{ laborReport.verifyAt }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">审核人:</span><span style="color:#af7651" v-if="">@{{ laborReport.verifyPerson }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">晚饭打卡(分):</span><span style="color:#af7651" v-if="">@{{ laborReport.relax_time }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">在线时长:</span><span style="color:#af7651" v-if="">@{{ laborReport.onlineDuration }} </span></span>--}}
|
|
|
+ {{-- <span class="mr-3 text-nowrap"><span class="text-black">本次工作时长:</span><span style="color:#af7651" v-if="">@{{ laborReport.workingDuration }} </span></span>--}}
|
|
|
+ @can('人事管理-临时工报表-删除')
|
|
|
+ <span style="transform:scale(1.1)" class="btn btn-sm btn-outline-danger" @click="删除(laborReport.id,laborReport.name)">删</span>
|
|
|
+ @endcan
|
|
|
</div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span class="btn btn-block" aria-hidden="true">取消</span>
|
|
|
- </button>
|
|
|
- <button type="button" class="btn btn-primary" data-dismiss="modal" @click="makeSureRelax_time">确定</button>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ <div class="text-info h5 btn btn">{{$laborReports->count()}}/@{{ sum }}</div>
|
|
|
+ <div>{{$laborReports->appends($paginateParams)->links()}}</div>
|
|
|
+ {{-- 选择晚饭时长弹框 --}}
|
|
|
+ <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
+ <div class="modal-dialog">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="exampleModalLabel">晚餐时长</h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <form>
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="relax_time" class="col-form-label">选择晚饭时长:</label>
|
|
|
+ <select class="form-control" id="relax_time" v-model="relax_time">
|
|
|
+ <option value="30">30分</option>
|
|
|
+ <option value="60">60分</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span class="btn btn-block" aria-hidden="true">取消</span>
|
|
|
+ </button>
|
|
|
+ <button type="button" class="btn btn-primary" data-dismiss="modal" @click="makeSureRelax_time">确定</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- {{-- 特定组需要添加备注 --}}
|
|
|
- <div class="modal fade" id="remarkModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
- <div class="modal-dialog">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <h5 class="modal-title" id="exampleModalLabel">添加所需备注</h5>
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span aria-hidden="true">×</span>
|
|
|
- </button>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <form>
|
|
|
- <div class="form-group">
|
|
|
- <label for="remark" class="col-form-label">备注:</label>
|
|
|
- <textarea class="form-control" id="remark"></textarea>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span class="btn btn-block" aria-hidden="true">取消</span>
|
|
|
- </button>
|
|
|
- <button type="button" class="btn btn-primary" data-dismiss="modal" @click="addRemarkAndGroupClock">确定</button>
|
|
|
+ {{-- 特定组需要添加备注 --}}
|
|
|
+ <div class="modal fade" id="remarkModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
|
+ <div class="modal-dialog">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="exampleModalLabel">添加所需备注</h5>
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <form>
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="remark" class="col-form-label">备注:</label>
|
|
|
+ <textarea class="form-control" id="remark"></textarea>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span class="btn btn-block" aria-hidden="true">取消</span>
|
|
|
+ </button>
|
|
|
+ <button type="button" class="btn btn-primary" data-dismiss="modal" @click="addRemarkAndGroupClock">确定</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <!-- 是否晚餐弹框 -->
|
|
|
- <div class="modal fade" id="dinnerModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" >
|
|
|
- <div class="modal-dialog">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-body">
|
|
|
- <b class="font-weight-bold">是否晚餐?</b>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
- <span class="btn btn-block" @click="noDinner">否</span>
|
|
|
- </button>
|
|
|
- <button type="button" class="btn btn-primary" data-dismiss="modal" @click="haveDinner">是</button>
|
|
|
+ <!-- 是否晚餐弹框 -->
|
|
|
+ <div class="modal fade" id="dinnerModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" >
|
|
|
+ <div class="modal-dialog">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-body">
|
|
|
+ <b class="font-weight-bold">是否晚餐?</b>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
|
+ <span class="btn btn-block" @click="noDinner">否</span>
|
|
|
+ </button>
|
|
|
+ <button type="button" class="btn btn-primary" data-dismiss="modal" @click="haveDinner">是</button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
@endsection
|
|
|
|
|
|
@section('lastScript')
|
|
|
@@ -286,6 +294,7 @@
|
|
|
sequence:'{{$laborReport->sequence}}',amountOfJoined:'{{$laborReport->amountOfJoined}}',remark:'{{$laborReport->remark}}',
|
|
|
@if($laborReport->userDutyCheck)user_duty_check_id:'{{$laborReport->userDutyCheck->id}}', userDutyCheckVerifyUserId:'{{$laborReport->userDutyCheck->verify_user_id}}'
|
|
|
,userDutyCheckType:'{{$laborReport->userDutyCheck->type}}',userDutyCheckAt:'{{$laborReport->userDutyCheck->checked_at}}',@endif},
|
|
|
+
|
|
|
@endforeach
|
|
|
],
|
|
|
i:0,
|
|
|
@@ -427,6 +436,9 @@
|
|
|
{name:'thisRecordOnlineTime',value: '在线时长', neglect: true},
|
|
|
{name:'thisRecordWorkingTime',value: '本次工作时长', neglect: true},
|
|
|
{name:'remark',value: '备注'},
|
|
|
+ @can('人事管理-临时工报表-删除')
|
|
|
+ {name:'remove',value: '操作'},
|
|
|
+ @endcan
|
|
|
];
|
|
|
setTimeout(function () {
|
|
|
let header = new Header({
|
|
|
@@ -456,6 +468,79 @@
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
+ //备注修改
|
|
|
+ laborReportRemarkCheck:function (e) {
|
|
|
+ let target = $(e.target);
|
|
|
+ target.hide();
|
|
|
+ let input = target.next();
|
|
|
+ input.show();
|
|
|
+ input.focus();
|
|
|
+ },
|
|
|
+ // 失焦事件
|
|
|
+ updateLaborReportRemark:function (e) {
|
|
|
+ let target = $(e.target);
|
|
|
+ let _this = this;
|
|
|
+ let span = target.prev();
|
|
|
+ let id = target.attr('data_id');
|
|
|
+ let oldRemark = span.text();
|
|
|
+ let remark = target.val();
|
|
|
+ if(remark !== span.text()){
|
|
|
+ let ajaxUrl= '{{url("laborReport/changeLaborReportRemark")}}';
|
|
|
+ axios.post(ajaxUrl,{'id':id,'remark':remark}).then(function (response) {
|
|
|
+ if(response.data.success){
|
|
|
+ _this.updateLaborReports(id,remark);
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.showSuccess('备注修改成功');
|
|
|
+ }else{
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('备注修改失败!'+response.data.fail_info);
|
|
|
+ _this.updateLaborReports(id,oldRemark);
|
|
|
+ }
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('备注修改失败!网络异常:'+err);
|
|
|
+ _this.updateLaborReports(id,oldRemark);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ span.show();
|
|
|
+ target.hide();
|
|
|
+ },
|
|
|
+ addLaborReportRemark(e){
|
|
|
+ let target = $(e.target);
|
|
|
+ target.css('width','85px');
|
|
|
+ let _this = this;
|
|
|
+ let id = target.attr('data_id');
|
|
|
+ let remark = target.val();
|
|
|
+ let ajaxUrl= '{{url("laborReport/changeLaborReportRemark")}}';
|
|
|
+ if(remark === ''|| remark === null){
|
|
|
+ target.css('width','75px');
|
|
|
+ return;
|
|
|
+ }else{
|
|
|
+ axios.post(ajaxUrl,{'id':id,'remark':remark}).then(function (response) {
|
|
|
+ if(response.data.success){
|
|
|
+ tempTip.setDuration(2000);
|
|
|
+ tempTip.showSuccess('备注添加成功');
|
|
|
+ _this.updateLaborReports(id,remark);
|
|
|
+ }else{
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('备注添加失败!'+response.data.fail_info);
|
|
|
+ }
|
|
|
+ }).catch(function (err) {
|
|
|
+ tempTip.setDuration(3000);
|
|
|
+ tempTip.show('备注添加失败!网络异常:'+response.data.fail_info);
|
|
|
+ });
|
|
|
+ target.css('width','75px');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 更新表格数据
|
|
|
+ updateLaborReports(id,newFee){
|
|
|
+ this.laborReports.some(function(laborReport){
|
|
|
+ if(laborReport.id === id){
|
|
|
+ laborReport.remark = newFee;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
selectedColor(id){
|
|
|
if (id==this.selectedStyle){
|
|
|
this.selectedStyle='';
|