|
|
@@ -167,6 +167,18 @@ export default window.$crudCommon({
|
|
|
newFormData.dailyAttendances = dailyAttendances;
|
|
|
return newFormData;
|
|
|
},
|
|
|
+ getDelParams(row) {
|
|
|
+ return [{ yearAndMonth: this.params.yearAndMonth, unicode: row.unicode }]
|
|
|
+ },
|
|
|
+ getBatchDelParams() {
|
|
|
+ let delArr = [];
|
|
|
+ this.data.forEach(item => {
|
|
|
+ if (this.ids.indexOf(item.id) > -1) {
|
|
|
+ delArr.push({ yearAndMonth: this.params.yearAndMonth, unicode: item.unicode });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return delArr;
|
|
|
+ },
|
|
|
handleImport() {
|
|
|
let excelParams = { yearAndMonth: this.params.yearAndMonth };
|
|
|
this.$refs.uploadExcelDialog.open('/api/kd-scientific/attendance/import', excelParams);
|
|
|
@@ -204,7 +216,7 @@ export default window.$crudCommon({
|
|
|
res: ({ data }) => {
|
|
|
let newList = [];
|
|
|
data.records.forEach((item) => {
|
|
|
- let objData = { ...item, unicode: item.technicianId };
|
|
|
+ let objData = { ...item };
|
|
|
item.dailyAttendances.forEach(hourItem => {
|
|
|
objData[hourItem.workDate] = (hourItem.workHours || 0).toFixed(1);
|
|
|
});
|