|
@@ -10,6 +10,10 @@ |
|
|
<script src="~/Content/jquery/jquery-1.10.2.min.js"></script> |
|
|
<script src="~/Content/jquery/jquery-1.10.2.min.js"></script> |
|
|
</head> |
|
|
</head> |
|
|
<body> |
|
|
<body> |
|
|
|
|
|
@{ |
|
|
|
|
|
ViewBag.Title = "工资明细信息"; |
|
|
|
|
|
Layout = "~/Views/Shared/_Index.cshtml"; |
|
|
|
|
|
} |
|
|
<div id="app" style="height:100%"> |
|
|
<div id="app" style="height:100%"> |
|
|
<el-row :gutter="14" style="margin-bottom:12px"> |
|
|
<el-row :gutter="14" style="margin-bottom:12px"> |
|
|
<el-col :span="4"> |
|
|
<el-col :span="4"> |
|
@@ -23,7 +27,7 @@ |
|
|
<el-col :span="4"> |
|
|
<el-col :span="4"> |
|
|
<el-date-picker size="small" |
|
|
<el-date-picker size="small" |
|
|
v-model="time" |
|
|
v-model="time" |
|
|
type="daterange" |
|
|
|
|
|
|
|
|
type="monthrange" |
|
|
start-placeholder="开始日期" |
|
|
start-placeholder="开始日期" |
|
|
end-placeholder="结束日期" |
|
|
end-placeholder="结束日期" |
|
|
value-format="yyyy-MM-dd"> |
|
|
value-format="yyyy-MM-dd"> |
|
@@ -35,7 +39,7 @@ |
|
|
<el-col :span="10" style="display: flex;justify-content: right;"> |
|
|
<el-col :span="10" style="display: flex;justify-content: right;"> |
|
|
<a v-on:click="refresh" class="btn btn-default" style="margin-right:8px;font-size:14px"><i class="el-icon-refresh"></i></a> |
|
|
<a v-on:click="refresh" class="btn btn-default" style="margin-right:8px;font-size:14px"><i class="el-icon-refresh"></i></a> |
|
|
<a class="btn btn-default" v-on:click="detailShow"><i class="el-icon-edit-outline" style="margin-right:4px"></i>查看</a> |
|
|
<a class="btn btn-default" v-on:click="detailShow"><i class="el-icon-edit-outline" style="margin-right:4px"></i>查看</a> |
|
|
<a class="btn btn-default" v-on:click="importantData"><i class="el-icon-download" style="margin-right:4px"></i>导入</a> |
|
|
|
|
|
|
|
|
<a class="btn btn-default" id="lr_import"><i class="el-icon-download" style="margin-right:4px"></i>导入</a> |
|
|
@*<a class="btn btn-default" v-on:click="del"><i class="el-icon-delete" style="margin-right:4px"></i>删除</a>*@ |
|
|
@*<a class="btn btn-default" v-on:click="del"><i class="el-icon-delete" style="margin-right:4px"></i>删除</a>*@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
@@ -48,20 +52,20 @@ |
|
|
:header-cell-style="{paddingTop:'2px',paddingBottom:'2px'}" |
|
|
:header-cell-style="{paddingTop:'2px',paddingBottom:'2px'}" |
|
|
border |
|
|
border |
|
|
v-on:selection-change="handleSelectionChange"> |
|
|
v-on:selection-change="handleSelectionChange"> |
|
|
<el-table-column type="index" |
|
|
|
|
|
width="38" |
|
|
|
|
|
align="center"> |
|
|
|
|
|
|
|
|
<el-table-column type="index" |
|
|
|
|
|
width="38" |
|
|
|
|
|
align="center"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column align="center" |
|
|
|
|
|
type="selection" |
|
|
|
|
|
width="44"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<template v-for="item in fixedColumn"> |
|
|
|
|
|
<el-table-column :prop="item.prop" |
|
|
|
|
|
show-overflow-tooltip |
|
|
|
|
|
:label="item.label"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column align="center" |
|
|
|
|
|
type="selection" |
|
|
|
|
|
width="44"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<template v-for="item in fixedColumn"> |
|
|
|
|
|
<el-table-column :prop="item.prop" |
|
|
|
|
|
show-overflow-tooltip |
|
|
|
|
|
:label="item.label"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
</template> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
<div style="padding: 6px 0;display: flex;justify-content: center;"> |
|
|
<div style="padding: 6px 0;display: flex;justify-content: center;"> |
|
@@ -74,51 +78,13 @@ |
|
|
:total="total"> |
|
|
:total="total"> |
|
|
</el-pagination> |
|
|
</el-pagination> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 导入 --> |
|
|
|
|
|
<el-dialog title="导入" |
|
|
|
|
|
:visible.sync="dialogVisible" |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
width="456px" |
|
|
|
|
|
:before-close="handleClose"> |
|
|
|
|
|
<div style="margin: 0 auto;width: 360px;"> |
|
|
|
|
|
<el-date-picker style="margin-bottom: 12px;" |
|
|
|
|
|
v-model="month" |
|
|
|
|
|
size="small" |
|
|
|
|
|
type="month" |
|
|
|
|
|
value-format="yyyy-MM" |
|
|
|
|
|
placeholder="选择月"> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
<el-upload v-if="ready" |
|
|
|
|
|
action="#" |
|
|
|
|
|
class="upload-demo" |
|
|
|
|
|
drag |
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
:multiple="false" |
|
|
|
|
|
:accept="'.' + accept.join(',.')" |
|
|
|
|
|
:limit="1" |
|
|
|
|
|
:auto-upload="false" |
|
|
|
|
|
:on-change="handleChange" |
|
|
|
|
|
:disabled="isUploading"> |
|
|
|
|
|
<i class="el-icon-upload"></i> |
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
|
|
|
|
|
<div class="el-upload__tip" slot="tip">只能上传{{accept.join('/')}}文件,且不超过{{size}}mb</div> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
<div v-for="item in fileList" style="width: 360px;margin: 0 auto;padding-top: 16px;"> |
|
|
|
|
|
<div class="el-icon el-icon-document">{{ item.name }}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button v-on:click="handleClose" size="small">取 消</el-button> |
|
|
|
|
|
<el-button type="primary" v-on:click="confirm" size="small">确 定</el-button> |
|
|
|
|
|
</span> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
<!-- 查看详情 --> |
|
|
<!-- 查看详情 --> |
|
|
<el-dialog title="详情" |
|
|
<el-dialog title="详情" |
|
|
:visible.sync="dialogVisible1" |
|
|
:visible.sync="dialogVisible1" |
|
|
:close-on-click-modal="false" |
|
|
:close-on-click-modal="false" |
|
|
width="1200px"> |
|
|
width="1200px"> |
|
|
<div> |
|
|
<div> |
|
|
<el-table :data="detailData" |
|
|
|
|
|
|
|
|
<el-table :data="detailData" v-if="detailData.length" |
|
|
border |
|
|
border |
|
|
show-overflow-tooltip |
|
|
show-overflow-tooltip |
|
|
height="500"> |
|
|
height="500"> |
|
@@ -146,13 +112,14 @@ |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
query: {}, |
|
|
query: {}, |
|
|
time:null, |
|
|
|
|
|
|
|
|
time: null, |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
multipleSelection: [], |
|
|
multipleSelection: [], |
|
|
currentPage: 1, |
|
|
currentPage: 1, |
|
|
pageSize: 30, |
|
|
pageSize: 30, |
|
|
total: 0, |
|
|
total: 0, |
|
|
departmentOptions:[], |
|
|
|
|
|
|
|
|
totalSend: '', |
|
|
|
|
|
departmentOptions: [], |
|
|
//固定列 |
|
|
//固定列 |
|
|
fixedColumn: [ |
|
|
fixedColumn: [ |
|
|
{ prop: 'DeptCode', label: '部门代码' }, |
|
|
{ prop: 'DeptCode', label: '部门代码' }, |
|
@@ -194,11 +161,12 @@ |
|
|
this.NetRequest('/LR_OrganizationModule/Department/GetTree?companyId=207fa1a9-160c-4943-a89b-8fa4db0547ce&parentId=0', null, 'get').then(res => { |
|
|
this.NetRequest('/LR_OrganizationModule/Department/GetTree?companyId=207fa1a9-160c-4943-a89b-8fa4db0547ce&parentId=0', null, 'get').then(res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.departmentOptions = res.map(e => { |
|
|
this.departmentOptions = res.map(e => { |
|
|
return {value:e.id,label:e.text} |
|
|
|
|
|
|
|
|
return { value: e.id, label: e.text } |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
]) |
|
|
]) |
|
|
|
|
|
window.getTableData = this.importCallback |
|
|
this.getTableData() |
|
|
this.getTableData() |
|
|
}, |
|
|
}, |
|
|
NetRequest(url, data, method = "POST") { |
|
|
NetRequest(url, data, method = "POST") { |
|
@@ -244,7 +212,7 @@ |
|
|
if (this.time) { |
|
|
if (this.time) { |
|
|
this.query.time1 = this.time[0] |
|
|
this.query.time1 = this.time[0] |
|
|
this.query.time2 = this.time[1] |
|
|
this.query.time2 = this.time[1] |
|
|
} else if (this.query['time1']){ |
|
|
|
|
|
|
|
|
} else if (this.query['time1']) { |
|
|
delete this.query['time1'] |
|
|
delete this.query['time1'] |
|
|
delete this.query['time2'] |
|
|
delete this.query['time2'] |
|
|
} |
|
|
} |
|
@@ -276,136 +244,36 @@ |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
}).then(async() => { |
|
|
|
|
|
|
|
|
}).then(async () => { |
|
|
let res = await this.NetRequest('/PersonnelManagement/Gz_Amounts/DeleteForm', { keyValue: ids }) |
|
|
let res = await this.NetRequest('/PersonnelManagement/Gz_Amounts/DeleteForm', { keyValue: ids }) |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.$message.success('删除成功!') |
|
|
this.$message.success('删除成功!') |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 导入 |
|
|
|
|
|
importantData() { |
|
|
|
|
|
this.dialogVisible = true |
|
|
|
|
|
}, |
|
|
|
|
|
initUpload() { |
|
|
|
|
|
this.ready = false; |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.ready = true; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
beforeAvatarUpload(file) { |
|
|
|
|
|
let fileRaw = file.raw; |
|
|
|
|
|
let typeArr = fileRaw.name.split("."); |
|
|
|
|
|
let type = typeArr[typeArr.length - 1].toLowerCase(); |
|
|
|
|
|
const isType = this.accept.length ? this.accept.includes(type) : true; |
|
|
|
|
|
const isSize = fileRaw.size / 1024 / 1024 < this.size; |
|
|
|
|
|
if (!isType || !isSize) { |
|
|
|
|
|
if (this.frequently) return false; |
|
|
|
|
|
this.frequently = true; |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
this.frequently = false; |
|
|
|
|
|
}, 500); |
|
|
|
|
|
if (!isType) { |
|
|
|
|
|
// this.$message.error( |
|
|
|
|
|
// `上传文件只能是 ${this.accept.join(" / ")} 格式!` |
|
|
|
|
|
// ); |
|
|
|
|
|
this.$message.warning('上传文件格式错误!') |
|
|
|
|
|
} else if (!isSize) { |
|
|
|
|
|
this.$message.warning('上传文件大小过大!') |
|
|
|
|
|
// this.$message.error(`上传文件大小不能超过 ${this.size}MB!`); |
|
|
|
|
|
} |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
return true; |
|
|
|
|
|
}, |
|
|
|
|
|
handleChange(file, fileList) { |
|
|
|
|
|
this.initUpload(); |
|
|
|
|
|
if (!this.beforeAvatarUpload(file)) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
this.fileList = [{ |
|
|
|
|
|
...fileList[fileList.length - 1], |
|
|
|
|
|
originalName: fileList[fileList.length - 1].name, |
|
|
|
|
|
}]; |
|
|
|
|
|
}, |
|
|
|
|
|
uploadFile(file) { |
|
|
|
|
|
return new Promise((resolve) => { |
|
|
|
|
|
let formData = new FormData(); |
|
|
|
|
|
formData.append("file", file.raw); |
|
|
|
|
|
NetRequest('learun/nologin/adms/annexes/upload', formData) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
resolve(res); |
|
|
|
|
|
} else { |
|
|
|
|
|
resolve(false); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
resolve(false); |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
async upload() { |
|
|
|
|
|
this.isUploading = true; |
|
|
|
|
|
let flag = true; |
|
|
|
|
|
for (const index in this.fileList) { |
|
|
|
|
|
let file = this.fileList[index]; |
|
|
|
|
|
if (file.status == "ready") { |
|
|
|
|
|
res = await this.uploadFile(file); |
|
|
|
|
|
} |
|
|
|
|
|
if (file) { |
|
|
|
|
|
this.fileList[index].status = "success"; |
|
|
|
|
|
this.fileList[index].res = res; |
|
|
|
|
|
this.fileList.splice(1, 0); |
|
|
|
|
|
} else { |
|
|
|
|
|
flag = false; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.isUploading = false; |
|
|
|
|
|
return flag; |
|
|
|
|
|
}, |
|
|
|
|
|
async confirm() { |
|
|
|
|
|
if (!this.month) { |
|
|
|
|
|
this.$message.warning('请选择月份!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.fileList.length) { |
|
|
|
|
|
this.$message.warning('请选择上传文件!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
let params = { |
|
|
|
|
|
month: this.month, |
|
|
|
|
|
} |
|
|
|
|
|
console.log('提交数据-----', params) |
|
|
|
|
|
const formData = new FormData(); |
|
|
|
|
|
formData.append('data', JSON.stringify({ strEntity: JSON.stringify(params) })) |
|
|
|
|
|
let res = await this.NetRequest('/PersonnelManagement/Gz_Amounts/GzImport', formData) |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.$message.success('导入成功!') |
|
|
|
|
|
this.handleClose() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
handleClose() { |
|
|
|
|
|
this.month = '' |
|
|
|
|
|
this.fileList = [] |
|
|
|
|
|
this.dialogVisible = false |
|
|
|
|
|
|
|
|
// 导入回调 |
|
|
|
|
|
importCallback() { |
|
|
|
|
|
this.currentPage = 1 |
|
|
|
|
|
this.time = null |
|
|
|
|
|
this.query = {} |
|
|
|
|
|
this.getTableData() |
|
|
}, |
|
|
}, |
|
|
// 查看详情 |
|
|
// 查看详情 |
|
|
async detailShow() { |
|
|
async detailShow() { |
|
|
if (this.multipleSelection.length!=1) { |
|
|
|
|
|
|
|
|
if (this.multipleSelection.length != 1) { |
|
|
this.$message.warning('请选择一条数据进行查看!') |
|
|
this.$message.warning('请选择一条数据进行查看!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.detailData = JSON.parse(JSON.stringify(this.multipleSelection)) |
|
|
|
|
|
|
|
|
this.detailData = [] |
|
|
let result = await this.NetRequest('/PersonnelManagement/Gz_Amounts/GetDetail', $.param({ userNo: this.multipleSelection[0].UserNo, year: this.multipleSelection[0].Year, month: this.multipleSelection[0].Month }), 'get') |
|
|
let result = await this.NetRequest('/PersonnelManagement/Gz_Amounts/GetDetail', $.param({ userNo: this.multipleSelection[0].UserNo, year: this.multipleSelection[0].Year, month: this.multipleSelection[0].Month }), 'get') |
|
|
if (result) { |
|
|
if (result) { |
|
|
let obj = {} |
|
|
let obj = {} |
|
|
this.trendsColumn = result.map((e, i) => { |
|
|
this.trendsColumn = result.map((e, i) => { |
|
|
obj['trends' + i] = e.Item2 |
|
|
obj['trends' + i] = e.Item2 |
|
|
return { prop: 'trends' + i, label: e.Item1} |
|
|
|
|
|
|
|
|
return { prop: 'trends' + i, label: e.Item1 } |
|
|
}) |
|
|
}) |
|
|
this.detailData[0] = { ...this.detailData[0], ...obj } |
|
|
|
|
|
|
|
|
this.detailData = [{ ...this.multipleSelection[0], ...obj }] |
|
|
|
|
|
console.log(this.detailData) |
|
|
} |
|
|
} |
|
|
this.dialogVisible1 = true |
|
|
this.dialogVisible1 = true |
|
|
}, |
|
|
}, |
|
@@ -457,11 +325,14 @@ |
|
|
border: 1px solid transparent; |
|
|
border: 1px solid transparent; |
|
|
border-radius: 4px; |
|
|
border-radius: 4px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.btn-default { |
|
|
.btn-default { |
|
|
color: #333; |
|
|
color: #333; |
|
|
background-color: #fff; |
|
|
background-color: #fff; |
|
|
border-color: #ccc; |
|
|
border-color: #ccc; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|
|
|
|
|
|
|
|
|
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/Gz_Amounts/Index.js") |
|
|
</body> |
|
|
</body> |
|
|
</html> |
|
|
</html> |