|
@@ -114,7 +114,18 @@
|
|
<el-table border v-loading="loading" :data="excelInfo.list" @selection-change="handleSelectionChange"
|
|
<el-table border v-loading="loading" :data="excelInfo.list" @selection-change="handleSelectionChange"
|
|
@row-click="rowClick">
|
|
@row-click="rowClick">
|
|
<el-table-column label="工资列表" align="center" prop="source"/>
|
|
<el-table-column label="工资列表" align="center" prop="source"/>
|
|
- <el-table-column label="日期" align="center" prop="payDate" width="100"/>
|
|
|
|
|
|
+ <el-table-column label="日期" align="center" prop="payDate"/>
|
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ @click="doDelSource(scope.row.source)"
|
|
|
|
+ >删除
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
<pagination
|
|
<pagination
|
|
v-show="excelInfo.total>0"
|
|
v-show="excelInfo.total>0"
|
|
@@ -152,7 +163,6 @@
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
- v-hasPermi="['salary:salaryslip:remove']"
|
|
|
|
>删除
|
|
>删除
|
|
</el-button>
|
|
</el-button>
|
|
<el-button style="margin-left: 10px"
|
|
<el-button style="margin-left: 10px"
|
|
@@ -270,14 +280,15 @@
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
listSalaryslip,
|
|
listSalaryslip,
|
|
- getSalaryslip,
|
|
|
|
- delSalaryslip,
|
|
|
|
- addSalaryslip,
|
|
|
|
- updateSalaryslip,
|
|
|
|
- exportSalaryslip, importTempSalaryslip, getSalaryslips, push, excelList
|
|
|
|
|
|
+ getSalaryslip,
|
|
|
|
+ delSalaryslip,
|
|
|
|
+ delSource,
|
|
|
|
+ addSalaryslip,
|
|
|
|
+ updateSalaryslip,
|
|
|
|
+ exportSalaryslip, importTempSalaryslip, getSalaryslips, push, excelList
|
|
}
|
|
}
|
|
-from
|
|
|
|
-'@/api/salary/salaryslip'
|
|
|
|
|
|
+ from
|
|
|
|
+ '@/api/salary/salaryslip'
|
|
import { getToken } from '@/utils/auth'
|
|
import { getToken } from '@/utils/auth'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -364,6 +375,18 @@ export default {
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ doDelSource(source) {
|
|
|
|
+ this.$modal.confirm('删除后所有信息都将删除,确认删除吗?').then(() => {
|
|
|
|
+ return delSource(source)
|
|
|
|
+ }).then(response => {
|
|
|
|
+ if (response.code === 200) {
|
|
|
|
+ this.$modal.msgSuccess('删除成功')
|
|
|
|
+ this.getList()
|
|
|
|
+ } else {
|
|
|
|
+ this.$modal.msgError('删除失败')
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
/** 查询工资条基础列表 */
|
|
/** 查询工资条基础列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true
|
|
this.loading = true
|
|
@@ -376,13 +399,15 @@ export default {
|
|
this.excelInfo.list = response.rows
|
|
this.excelInfo.list = response.rows
|
|
this.excelInfo.total = response.total
|
|
this.excelInfo.total = response.total
|
|
this.loading = false
|
|
this.loading = false
|
|
- this.queryParams.source = this.excelInfo.list[0].source
|
|
|
|
- listSalaryslip(this.queryParams).then(response => {
|
|
|
|
- this.salaryslipList = []
|
|
|
|
- this.salaryslipList = response.rows
|
|
|
|
- this.total = response.total
|
|
|
|
- this.loading = false
|
|
|
|
- })
|
|
|
|
|
|
+ if (this.excelInfo.list[0]) {
|
|
|
|
+ this.queryParams.source = this.excelInfo.list[0].source
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ listSalaryslip(this.queryParams).then(response => {
|
|
|
|
+ this.salaryslipList = []
|
|
|
|
+ this.salaryslipList = response.rows
|
|
|
|
+ this.total = response.total
|
|
|
|
+ this.loading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|