Commit fcccd49e authored by 谢子梦's avatar 谢子梦

Merge branch 'develop' of http://git.manong.atliangtian.com/longbiao/hr-xinruitong-ui into develop

parents 819cf165 d6346b66
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
// 上传成功回调 // 上传成功回调
handleUploadSuccess(res, file) { handleUploadSuccess(res, file) {
if (res.code === 200) { if (res.code === 200) {
this.uploadList.push({ name: res.fileName, url: res.fileName }); this.uploadList.push({ name: res.fileName, url: res.url });
this.uploadedSuccessfully(); this.uploadedSuccessfully();
} else { } else {
this.number--; this.number--;
......
...@@ -33,13 +33,11 @@ service.interceptors.request.use(config => { ...@@ -33,13 +33,11 @@ service.interceptors.request.use(config => {
// 请求参数加密 // 请求参数加密
if (process.env.VUE_APP_AES_ENCRYPT_ENABLED == 'true') { if (process.env.VUE_APP_AES_ENCRYPT_ENABLED == 'true') {
if (config.data) { if (config.data) {
console.log(JSON.stringify(config.data));
config.data = { config.data = {
// 加密参数 // 加密参数
dataParams: encodeURIComponent(aes.encrypt(JSON.stringify(config.data))) dataParams: encodeURIComponent(aes.encrypt(JSON.stringify(config.data)))
} }
} else if (config.params) { } else if (config.params) {
console.log(JSON.stringify(config.params));
config.params = { config.params = {
// 加密参数 // 加密参数
dataParams: encodeURIComponent(aes.encrypt(JSON.stringify(config.params))) dataParams: encodeURIComponent(aes.encrypt(JSON.stringify(config.params)))
...@@ -158,8 +156,6 @@ service.interceptors.response.use(res => { ...@@ -158,8 +156,6 @@ service.interceptors.response.use(res => {
export function download(url, params, filename) { export function download(url, params, filename) {
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", }) downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
return service.post(url, params, { return service.post(url, params, {
transformRequest: [(params) => { return tansParams(params) }],
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
responseType: 'blob' responseType: 'blob'
}).then(async (data) => { }).then(async (data) => {
const isLogin = await blobValidate(data); const isLogin = await blobValidate(data);
......
...@@ -334,20 +334,20 @@ ...@@ -334,20 +334,20 @@
<el-col :span="7"> <el-col :span="7">
<el-form-item label="岗位工资" :prop="formData.calculaType == 1 ? 'postWage' : ''"> <el-form-item label="岗位工资" :prop="formData.calculaType == 1 ? 'postWage' : ''">
<el-input-number @change="postcalculateShow = true" v-model="formData.postWage" placeholder="请输入请输入岗位工资" <el-input-number @change="postcalculateShow = true" v-model="formData.postWage" placeholder="请输入请输入岗位工资"
:precision="2" :step="1" :min="0" controls-position="right" :step="1" :min="0" controls-position="right"
:disabled="formData.calculaType == 2"></el-input-number> :disabled="formData.calculaType == 2"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="应发工资" :prop="formData.calculaType == 2 ? 'salaryPayable' : ''"> <el-form-item label="应发工资" :prop="formData.calculaType == 2 ? 'salaryPayable' : ''">
<el-input-number @change="postcalculateShow = true" v-model="formData.salaryPayable" <el-input-number @change="postcalculateShow = true" v-model="formData.salaryPayable"
placeholder="请输入请输入应发工资" :precision="2" :step="1" :min="0" controls-position="right" placeholder="请输入请输入应发工资" :step="1" :min="0" controls-position="right"
:disabled="formData.calculaType == 1"></el-input-number> :disabled="formData.calculaType == 1"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="实发工资"> <el-form-item label="实发工资">
<el-input-number v-model="formData.actualPayable" placeholder="请输入请输入实发工资:" :precision="2" :step="1" <el-input-number v-model="formData.actualPayable" placeholder="请输入请输入实发工资:" :step="1"
:min="0" controls-position="right" :disabled="true"></el-input-number> :min="0" controls-position="right" :disabled="true"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -358,6 +358,18 @@ ...@@ -358,6 +358,18 @@
</el-row> </el-row>
</div> </div>
</el-card> </el-card>
<el-card class="box-card" style="margin-top: 22px;">
<div class="cardMain">
<el-row :gutter="10" style="margin-top: 25px;">
<el-col :span="2">
<div class="projectTitle">合同附件</div>
</el-col>
<el-col :span="10">
<FileUpload ref="fileUpload" :fileType="['doc', 'docx', 'pdf']" :limit="1" v-model="formData.annex" />
</el-col>
</el-row>
</div>
</el-card>
</el-form> </el-form>
<div class="fixdBottom"> <div class="fixdBottom">
<div class="fixdBottomMain"> <div class="fixdBottomMain">
...@@ -381,6 +393,7 @@ export default { ...@@ -381,6 +393,7 @@ export default {
banks: [], banks: [],
loading: false, loading: false,
formData: { formData: {
annex: null,
payeeAccBank: null, payeeAccBank: null,
contractId: null, contractId: null,
userName: null, userName: null,
...@@ -556,6 +569,7 @@ export default { ...@@ -556,6 +569,7 @@ export default {
// 计算方法 // 计算方法
postcalculateFN() { postcalculateFN() {
let obj = { let obj = {
wagesPoint: this.formData.wagesPoint,
sybxBase: this.formData.sybxBase, sybxBase: this.formData.sybxBase,
sybxCompanyRate: this.formData.sybxCompanyRate, sybxCompanyRate: this.formData.sybxCompanyRate,
sybxPersonalRate: this.formData.sybxPersonalRate, sybxPersonalRate: this.formData.sybxPersonalRate,
...@@ -622,6 +636,7 @@ export default { ...@@ -622,6 +636,7 @@ export default {
this.formData.providentFundBase = res.data.providentFundBase this.formData.providentFundBase = res.data.providentFundBase
this.formData.providentFundCompanyRate = res.data.providentFundCompanyRate this.formData.providentFundCompanyRate = res.data.providentFundCompanyRate
this.formData.providentFundPersonalRate = res.data.providentFundPersonalRate this.formData.providentFundPersonalRate = res.data.providentFundPersonalRate
this.formData.wagesPoint = res.data.wagesPoint
this.ylbxBaseChange() this.ylbxBaseChange()
this.gsbxBaseChange() this.gsbxBaseChange()
this.ysbxBaseChange() this.ysbxBaseChange()
...@@ -688,6 +703,7 @@ export default { ...@@ -688,6 +703,7 @@ export default {
this.formData = res.data this.formData = res.data
this.formData.contractId = this.$route.query.contractId this.formData.contractId = this.$route.query.contractId
this.formData.contractName = this.$route.query.contractName this.formData.contractName = this.$route.query.contractName
this.formData.wagesPoint = res.data.wagesPoint
this.ylbxBaseChange() this.ylbxBaseChange()
this.gsbxBaseChange() this.gsbxBaseChange()
this.ysbxBaseChange() this.ysbxBaseChange()
...@@ -794,6 +810,7 @@ export default { ...@@ -794,6 +810,7 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
this.form = { this.form = {
annex: null,
contractId: null, contractId: null,
userName: null, userName: null,
userCode: null, userCode: null,
......
...@@ -298,7 +298,21 @@ ...@@ -298,7 +298,21 @@
</el-row> </el-row>
</div> </div>
</el-card> </el-card>
<el-card class="box-card" style="margin-top: 22px;">
<div slot="header" class="clearfix">
<span class="cardHeartTitle">附件</span>
</div>
<div class="cardMain">
<el-row :gutter="10" style="margin-top: 25px;">
<el-col :span="2">
<div class="projectTitle">合同附件</div>
</el-col>
<el-col :span="10">
<FileUpload ref="fileUpload" :fileType="['doc', 'docx', 'pdf']" :limit="1" v-model="formData.annex" />
</el-col>
</el-row>
</div>
</el-card>
</el-form> </el-form>
<div class="fixdBottom"> <div class="fixdBottom">
<div class="fixdBottomMain"> <div class="fixdBottomMain">
...@@ -318,6 +332,7 @@ export default { ...@@ -318,6 +332,7 @@ export default {
return { return {
payerCompanyArr: [], payerCompanyArr: [],
formData: { formData: {
annex: null,
payerCompanyId: null, payerCompanyId: null,
contractName: null, contractName: null,
contractCode: null, contractCode: null,
...@@ -751,6 +766,7 @@ export default { ...@@ -751,6 +766,7 @@ export default {
// 表单重置方法 // 表单重置方法
reset() { reset() {
this.formData = { this.formData = {
annex: null,
wagesPoint: 2, wagesPoint: 2,
contractName: null, contractName: null,
contractCode: null, contractCode: null,
......
This diff is collapsed.
This diff is collapsed.
...@@ -40,6 +40,10 @@ ...@@ -40,6 +40,10 @@
v-hasPermi="['business:payOutDetail:export']">导出 v-hasPermi="['business:payOutDetail:export']">导出
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button type="info" icon="el-icon-upload2" @click="upload.open = true"
v-hasPermi="['business:payOutDetail:add']">导入考勤</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
...@@ -320,8 +324,8 @@ ...@@ -320,8 +324,8 @@
<!-- 调整薪资 --> <!-- 调整薪资 -->
<el-dialog title="调整薪资" :visible.sync="checkWorkOpen" width="1000px" append-to-body> <el-dialog title="调整薪资" :visible.sync="checkWorkOpen" width="1000px" append-to-body>
<el-form label-width="120px"> <el-form label-width="120px">
<el-form-item label="原实发金额"> <el-form-item label="原应发金额">
<el-input v-model="preForm.actualPayableNormal" disabled /> <el-input v-model="preForm.payableNormal" disabled />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="newAdjustItem">新增调整项</el-button> <el-button type="primary" size="small" @click="newAdjustItem">新增调整项</el-button>
...@@ -360,7 +364,7 @@ ...@@ -360,7 +364,7 @@
<el-button type="primary" size="small" @click="doAdjustCalculate">预览</el-button> <el-button type="primary" size="small" @click="doAdjustCalculate">预览</el-button>
</el-form-item> </el-form-item>
<el-form-item v-show="adjustView.open"> <el-form-item v-show="adjustView.open">
<span>合计调整: {{adjustView.adjustSalary}}, 最终实发: {{adjustView.finalSalary}}</span> <span>合计调整: {{adjustView.adjustSalary}}, 最终应发: {{adjustView.finalSalary}}, 最终实发: {{adjustView.actualPayable}}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -368,6 +372,25 @@ ...@@ -368,6 +372,25 @@
<el-button @click="checkWorkOpen = false">取 消</el-button> <el-button @click="checkWorkOpen = false">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 用户导入对话框 -->
<el-dialog title="导入考勤信息" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
:action="upload.url + '?templateType=' + upload.uploadRadio" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xls、xlsx格式文件。</span>
<a style="color:#1890ff;margin:0px;line-height:14px" class="download" download="考勤导入模板"
href="/考勤数据模板.xlsx" target="_blank">下载模板</a>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="importByExcel">确 定</el-button>
<el-button @click="upload.open = false">取 消</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -381,15 +404,31 @@ import { ...@@ -381,15 +404,31 @@ import {
} from '@/api/business/payOutDetail' } from '@/api/business/payOutDetail'
import { adjustCalculate, listAllAdjustInfo } from '@/api/business/adjustInfo' import { adjustCalculate, listAllAdjustInfo } from '@/api/business/adjustInfo'
import { saveAdjustCalculate } from '@/api/business/payOutRecord' import { saveAdjustCalculate } from '@/api/business/payOutRecord'
import { getToken } from '@/utils/auth'
export default { export default {
name: 'PayOutDetail', name: 'PayOutDetail',
dicts: ['pay_status', 'bx_bear_type', 'payee_acc_type'], dicts: ['pay_status', 'bx_bear_type', 'payee_acc_type'],
data() { data() {
return { return {
// 用户导入参数
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: "",
// 是否禁用上传
isUploading: false,
// 是否更新已经存在的用户数据
uploadRadio: 1,
// 设置上传的请求头部
headers: { Authorization: "Bearer " + getToken() },
// 上传的地址
url: process.env.VUE_APP_BASE_API + "/business/payOutRecord/attendance/importByExcel/" + this.$route.query.batchNo
},
adjustItem: [], adjustItem: [],
preForm: { preForm: {
actualPayableNormal: 0, payableNormal: 0,
}, },
preFormOpen: false, preFormOpen: false,
checkWorkOpen: false, checkWorkOpen: false,
...@@ -438,6 +477,7 @@ export default { ...@@ -438,6 +477,7 @@ export default {
adjustView: { adjustView: {
open: false, open: false,
finalSalary: 0, finalSalary: 0,
actualPayable: 0,
adjustSalary: '', adjustSalary: '',
}, },
// 表单参数 // 表单参数
...@@ -752,13 +792,11 @@ export default { ...@@ -752,13 +792,11 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('business/payOutDetail/export', { this.download('business/payOutDetail/export', ...this.queryParams, `payOutDetail_${new Date().getTime()}.xlsx`)
...this.queryParams
}, `payOutDetail_${new Date().getTime()}.xlsx`)
}, },
async checkWork(row) { async checkWork(row) {
this.preForm.salaryPayDetailId = row.id this.preForm.salaryPayDetailId = row.id
this.preForm.actualPayableNormal = row.actualPayableNormal this.preForm.payableNormal = row.payableNormal
await listAllAdjustInfo({ await listAllAdjustInfo({
salaryPayDetailId: row.id salaryPayDetailId: row.id
}).then(resp => { }).then(resp => {
...@@ -812,11 +850,29 @@ export default { ...@@ -812,11 +850,29 @@ export default {
this.adjustView = { this.adjustView = {
open: true, open: true,
adjustSalary: resp.data.adjustSalary + "", adjustSalary: resp.data.adjustSalary + "",
actualPayable: resp.data.actualPayable + "",
finalSalary: resp.data.finalSalary + "" finalSalary: resp.data.finalSalary + ""
} }
} }
}) })
}, },
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
this.getList();
},
importByExcel() {
this.$refs.upload.submit();
}
} }
} }
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment