|
@@ -187,16 +187,16 @@ export default window.$crudCommon({
|
|
|
return newFormData;
|
|
return newFormData;
|
|
|
},
|
|
},
|
|
|
getDelParams(row) {
|
|
getDelParams(row) {
|
|
|
- return [{ yearAndMonth: this.params.yearAndMonth, unicode: row.unicode }]
|
|
|
|
|
|
|
+ return { yearAndMonth: this.params.yearAndMonth, xmAndUnicodeList: [{ xmId: row.xmId, unicode: row.unicode }] };
|
|
|
},
|
|
},
|
|
|
getBatchDelParams() {
|
|
getBatchDelParams() {
|
|
|
- let delArr = [];
|
|
|
|
|
|
|
+ let xmAndUnicodeList = [];
|
|
|
this.data.forEach(item => {
|
|
this.data.forEach(item => {
|
|
|
if (this.ids.indexOf(item.id) > -1) {
|
|
if (this.ids.indexOf(item.id) > -1) {
|
|
|
- delArr.push({ yearAndMonth: this.params.yearAndMonth, unicode: item.unicode });
|
|
|
|
|
|
|
+ xmAndUnicodeList.push({ xmId: item.xmId, unicode: item.unicode });
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- return delArr;
|
|
|
|
|
|
|
+ return { yearAndMonth: this.params.yearAndMonth, xmAndUnicodeList };
|
|
|
},
|
|
},
|
|
|
handleExport() {
|
|
handleExport() {
|
|
|
exportBlob(`/api/kd-scientific/xm/technician/hours/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
exportBlob(`/api/kd-scientific/xm/technician/hours/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
@@ -229,7 +229,7 @@ export default window.$crudCommon({
|
|
|
data.records.forEach((item) => {
|
|
data.records.forEach((item) => {
|
|
|
let objData = {
|
|
let objData = {
|
|
|
...item,
|
|
...item,
|
|
|
- id: item.unicode,
|
|
|
|
|
|
|
+ id: item.unicode+'_'+item.xmId,
|
|
|
monthlyHours: (item.monthlyHours || 0).toFixed(1),
|
|
monthlyHours: (item.monthlyHours || 0).toFixed(1),
|
|
|
monthlyDays: (item.monthlyDays || 0).toFixed(1)
|
|
monthlyDays: (item.monthlyDays || 0).toFixed(1)
|
|
|
};
|
|
};
|