|
|
@@ -191,7 +191,16 @@ export default window.$crudCommon({
|
|
|
callback && callback();
|
|
|
},
|
|
|
getDelParams(row) {
|
|
|
- return { yearAndMonth: this.params.yearAndMonth, number: row.number, identityCard: row.identityCard }
|
|
|
+ return [{ yearAndMonth: this.params.yearAndMonth, number: row.number, identityCard: row.identityCard }]
|
|
|
+ },
|
|
|
+ getBatchDelParams() {
|
|
|
+ let delArr = [];
|
|
|
+ this.data.forEach(item => {
|
|
|
+ if (this.ids.indexOf(item.id) > -1) {
|
|
|
+ delArr.push({ yearAndMonth: this.params.yearAndMonth, number: item.number, identityCard: item.identityCard });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return delArr;
|
|
|
},
|
|
|
handleImport() {
|
|
|
this.excelBox = true;
|
|
|
@@ -245,12 +254,22 @@ export default window.$crudCommon({
|
|
|
name: 'technicianMonthAvgSales',
|
|
|
res: ({ data }) => {
|
|
|
data.records = data.records.map(item => {
|
|
|
- let pensionInsurance = new Decimal(item.pensionInsurance || 0);
|
|
|
- let medicalInsurance = new Decimal(item.medicalInsurance || 0);
|
|
|
- let unemploymentInsurance = new Decimal(item.unemploymentInsurance || 0);
|
|
|
- let injuryInsurance = new Decimal(item.injuryInsurance || 0);
|
|
|
- let maternityInsurance = new Decimal(item.maternityInsurance || 0);
|
|
|
- let providentFund = new Decimal(item.providentFund || 0);
|
|
|
+ // 处理id为空的时候,批量清除数据无法获取数据的问题
|
|
|
+ item.id = !item.id ? (item.number || item.identityCard) : item.id;
|
|
|
+ item.averageMonthlySalary = item.averageMonthlySalary === -1 ? "0.00" : item.averageMonthlySalary;
|
|
|
+ item.pensionInsurance = item.pensionInsurance === -1 ? "0.00" : item.pensionInsurance;
|
|
|
+ item.medicalInsurance = item.medicalInsurance === -1 ? "0.00" : item.medicalInsurance;
|
|
|
+ item.unemploymentInsurance = item.unemploymentInsurance === -1 ? "0.00" : item.unemploymentInsurance;
|
|
|
+ item.injuryInsurance = item.injuryInsurance === -1 ? "0.00" : item.injuryInsurance;
|
|
|
+ item.maternityInsurance = item.maternityInsurance === -1 ? "0.00" : item.maternityInsurance;
|
|
|
+ item.providentFund = item.providentFund === -1 ? "0.00" : item.providentFund;
|
|
|
+
|
|
|
+ let pensionInsurance = new Decimal(item.pensionInsurance);
|
|
|
+ let medicalInsurance = new Decimal(item.medicalInsurance);
|
|
|
+ let unemploymentInsurance = new Decimal(item.unemploymentInsurance);
|
|
|
+ let injuryInsurance = new Decimal(item.injuryInsurance);
|
|
|
+ let maternityInsurance = new Decimal(item.maternityInsurance);
|
|
|
+ let providentFund = new Decimal(item.providentFund);
|
|
|
|
|
|
// 社保合计
|
|
|
let socialInsurance = pensionInsurance.add(medicalInsurance).add(unemploymentInsurance).add(injuryInsurance).add(maternityInsurance);
|