工资卡见证页面完善

This commit is contained in:
BianLzhaoMin 2025-08-15 17:22:25 +08:00
parent a8afeff8d6
commit 1befb6f59e
4 changed files with 51 additions and 87 deletions

View File

@ -2,9 +2,9 @@ import request from '@/utils/request'
import requestFormData from '@/utils/request_formdata' import requestFormData from '@/utils/request_formdata'
// 工资卡见证 人员工资卡列表接口 // 工资卡见证 人员工资卡列表接口
export const getPersonContractListAPI = (data) => { export const getPersonWageCardListAPI = (data) => {
return request({ return request({
url: '/bmw/workerContract/list', url: '/bmw/workerWageCard/list',
method: 'get', method: 'get',
params: data, params: data,
}) })
@ -28,17 +28,17 @@ export const getContractDetailListAPI = (data) => {
} }
// 工资卡见证 工资卡上传接口 // 工资卡见证 工资卡上传接口
export const uploadContractAPI = (data) => { export const uploadWageCardAPI = (data) => {
return requestFormData({ return requestFormData({
url: `/bmw/workerContract/edit`, url: '/bmw/workerWageCard/edit',
method: 'post', method: 'post',
data, data,
}) })
} }
// 工资卡见证 查询工资卡详情 // 工资卡见证 查询工资卡详情
export const getContractDetailLookFileAPI = (id) => { export const getWageCarDetailLookFileAPI = (id) => {
return request({ return request({
url: `/bmw/workerContract/lookFile/${id}`, url: `/bmw/workerWageCard/lookFile/${id}`,
method: 'post', method: 'post',
}) })
} }

View File

@ -22,14 +22,14 @@ export const formLabel = [
}, },
{ {
f_label: '银行卡号', f_label: '银行卡号',
f_model: 'phone', f_model: 'bankCardCode',
f_type: 'ipt', f_type: 'ipt',
f_width: '180px', f_width: '180px',
isShow: false, // 是否展示label isShow: false, // 是否展示label
}, },
{ {
f_label: '状态', f_label: '状态',
f_model: 'einStatus', f_model: 'isUpload',
f_type: 'sel', f_type: 'sel',
f_width: '180px', f_width: '180px',
isShow: false, // 是否展示label isShow: false, // 是否展示label
@ -40,7 +40,7 @@ export const formLabel = [
}, },
{ {
label: '未上传', label: '未上传',
value: '2', value: '0',
}, },
], // 状态列表 ], // 状态列表
}, },
@ -49,20 +49,20 @@ export const formLabel = [
export const columnsList = [ export const columnsList = [
{ t_props: 'name', t_label: '姓名' }, { t_props: 'name', t_label: '姓名' },
{ t_props: 'idNumber', t_label: '身份证' }, { t_props: 'idNumber', t_label: '身份证' },
{ t_props: 'contractCode', t_label: '联系方式' }, { t_props: 'phone', t_label: '联系方式' },
{ t_props: 'proName', t_label: '银行卡号' }, { t_props: 'bankCardCode', t_label: '银行卡号' },
{ {
t_props: 'subName', t_props: 'bankName',
t_label: '银行名称', t_label: '银行名称',
}, },
{ t_props: 'teamName', t_label: '银行支行名称' }, { t_props: 'bankBranchName', t_label: '银行支行名称' },
{ {
t_label: '工资卡见证', t_label: '工资卡见证',
t_slot: 'view', t_slot: 'view',
}, },
{ {
t_label: '状态', t_label: '状态',
t_slot: 'isSign', t_slot: 'isUpload',
}, },
{ {
t_props: 'updateTime', t_props: 'updateTime',

View File

@ -7,7 +7,7 @@
:showRightTools="true" :showRightTools="true"
:columnsList="columnsList" :columnsList="columnsList"
ref="wageCardWitnessTableRef" ref="wageCardWitnessTableRef"
:request-api="getPersonContractListAPI" :request-api="getPersonWageCardListAPI"
> >
<template slot="btn" slot-scope="{ queryParams }"> <template slot="btn" slot-scope="{ queryParams }">
<el-button <el-button
@ -22,12 +22,12 @@
</template> </template>
<!-- 上传状态 --> <!-- 上传状态 -->
<template slot="isSign" slot-scope="{ data }"> <template slot="isUpload" slot-scope="{ data }">
<el-tag size="mini" type="danger" v-if="data.isSign == 0"> <el-tag
未上传 size="mini"
</el-tag> :type="data.isUpload == 0 ? 'danger' : 'success'"
<el-tag size="mini" type="success" v-if="data.isSign == 1"> >
已上传 {{ data.isUpload == 0 ? '未上传' : '已上传' }}
</el-tag> </el-tag>
</template> </template>
@ -44,21 +44,11 @@
</template> </template>
<template slot="handle" slot-scope="{ data }"> <template slot="handle" slot-scope="{ data }">
<!-- <el-button
plain
size="mini"
type="primary"
icon="el-icon-edit"
@click="onHandleViewContractDetailsList(data)"
>
详情
</el-button> -->
<el-button <el-button
plain plain
size="mini" size="mini"
type="primary" type="primary"
icon="el-icon-upload" icon="el-icon-upload"
v-if="data.einStatus == 1"
@click="onHandleUploadWageCard(data)" @click="onHandleUploadWageCard(data)"
> >
修改 修改
@ -114,7 +104,10 @@ import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel' import DialogModel from '@/components/DialogModel'
import WageCardUpload from './wage-card-upload' // import WageCardUpload from './wage-card-upload' //
import { formLabel, columnsList, dialogConfig } from './config' import { formLabel, columnsList, dialogConfig } from './config'
import { getPersonContractListAPI } from '@/api/construction-person/red-green-light-mange/contract-witness' import {
getPersonWageCardListAPI,
getWageCarDetailLookFileAPI,
} from '@/api/construction-person/red-green-light-mange/wage-card-witness'
export default { export default {
name: 'WageCardWitness', name: 'WageCardWitness',
components: { components: {
@ -128,7 +121,7 @@ export default {
formLabel, formLabel,
columnsList, columnsList,
dialogConfig, dialogConfig,
getPersonContractListAPI, getPersonWageCardListAPI,
queryDetailsId: '', // id queryDetailsId: '', // id
einStatus: 1, // einStatus: 1, //
formType: 1, // formType: 1, //
@ -141,16 +134,13 @@ export default {
electronicSignature: 'electronicSignature', electronicSignature: 'electronicSignature',
}, },
contractImgList: [ contractImgList: [], //
'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
], //
} }
}, },
methods: { methods: {
// //
onHandleExportWageCard(queryParams) { onHandleExportWageCard(queryParams) {
console.log(queryParams, '导出参数') // console.log(queryParams, '')
// this.download( // this.download(
// '/xxx/xxx', // '/xxx/xxx',
// { // {
@ -160,33 +150,13 @@ export default {
// ) // )
}, },
//
onHandleDeletePersonEntry(data) {
this.$confirm('确定删除该人员吗?', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
const res = await deleteEntryPersonAPI({
id: data.id,
})
if (res.code === 200) {
this.$modal.msgSuccess('删除成功')
this.$refs.wageCardWitnessTableRef.getTableList() //
}
})
.catch(() => {
console.log('取消')
})
},
// //
onHandleUploadWageCard(data) { onHandleUploadWageCard(data) {
console.log(data, '上传工资卡') this.dialogConfig.outerTitle = '工资卡见证'
// this.queryDetailsId = data.id this.dialogConfig.minHeight = ''
if (data.isSign == 1) { this.dialogConfig.maxHeight = ''
this.dialogConfig.outerWidth = '60%'
if (data.isUpload == 1) {
this.$confirm( this.$confirm(
'当前已上传工资卡信息,是否要重新上传,重新上传将会覆盖原数据?', '当前已上传工资卡信息,是否要重新上传,重新上传将会覆盖原数据?',
'温馨提示', '温馨提示',
@ -199,29 +169,23 @@ export default {
.then(async () => { .then(async () => {
this.workerId = data.workerId this.workerId = data.workerId
this.queryDetailsId = data.id this.queryDetailsId = data.id
// this.dialogConfig.outerTitle = ''
// this.dialogConfig.minHeight = ''
// this.dialogConfig.maxHeight = ''
// this.dialogConfig.outerWidth = '60%'
this.dialogConfig.outerVisible = true this.dialogConfig.outerVisible = true
// this.$nextTick(() => {
// this.$refs.uploadContractContentRef.getContractDetail()
// })
}) })
.catch(() => {}) .catch(() => {})
} else { } else {
this.workerId = data.workerId this.workerId = data.workerId
this.queryDetailsId = '' this.queryDetailsId = ''
// this.dialogConfig.outerTitle = ''
// this.dialogConfig.minHeight = ''
// this.dialogConfig.maxHeight = ''
// this.dialogConfig.outerWidth = '70%'
this.dialogConfig.outerVisible = true this.dialogConfig.outerVisible = true
} }
}, },
// //
onHandleViewWageCardImg(data) { async onHandleViewWageCardImg(data) {
const { data: res } = await getWageCarDetailLookFileAPI(data.id)
this.contractImgList = res
.filter((item) => item.sourceType != 5)
.map((item) => item.lsUrl)
this.dialogConfig.outerTitle = '工资卡图片详情' this.dialogConfig.outerTitle = '工资卡图片详情'
this.dialogConfig.minHeight = '500px' this.dialogConfig.minHeight = '500px'
this.dialogConfig.maxHeight = '500px' this.dialogConfig.maxHeight = '500px'
@ -236,7 +200,7 @@ export default {
this.$refs.wageCardWitnessTableRef.getTableList() this.$refs.wageCardWitnessTableRef.getTableList()
this.handleCloseDialogOuter() this.handleCloseDialogOuter()
} catch (error) { } catch (error) {
console.log('表单提交失败', error) // console.log('', error)
} }
}, },

View File

@ -106,9 +106,9 @@ import UploadImg from '@/components/UploadImg'
import UploadImgFormData from '@/components/UploadImgFormData' import UploadImgFormData from '@/components/UploadImgFormData'
import UploadFileFormData from '@/components/UploadFileFormData' import UploadFileFormData from '@/components/UploadFileFormData'
import { import {
uploadContractAPI, uploadWageCardAPI,
getContractDetailAPI, getContractDetailAPI,
} from '@/api/construction-person/red-green-light-mange/contract-witness' } from '@/api/construction-person/red-green-light-mange/wage-card-witness'
export default { export default {
name: 'AddOrEditForm', name: 'AddOrEditForm',
props: { props: {
@ -195,7 +195,7 @@ export default {
// //
fieldsList.forEach((field) => { fieldsList.forEach((field) => {
if (!this.contractInfoForm[field]) { if (!this.salaryCardInfoForm[field]) {
emptyFieldCount++ emptyFieldCount++
} else { } else {
filledFieldCount++ filledFieldCount++
@ -244,9 +244,9 @@ export default {
// //
if (status === 'partial') { if (status === 'partial') {
this.$modal.msgError( this.$modal.msgError(
'请完善合同见证中的必填信息(除附件外)后再提交', '请完善工资卡见证中的必填信息(除附件外)后再提交',
) )
return reject(new Error('合同信息未完善')) return reject(new Error('工资卡信息未完善'))
} }
// //
@ -269,9 +269,9 @@ export default {
const filesList = [] const filesList = []
const formData = new FormData() const formData = new FormData()
this.contractImageList.forEach((item) => { this.bankImageList.forEach((item) => {
item.fileList.forEach((file) => { item.fileList.forEach((file) => {
filesList.push({ type: item.type, name: 'contract' }) filesList.push({ type: item.type, name: 'wageCard' })
formData.append('files', file.raw) formData.append('files', file.raw)
}) })
}) })
@ -280,17 +280,17 @@ export default {
// 3. APIreject // 3. APIreject
try { try {
const res = await uploadContractAPI(formData) const res = await uploadWageCardAPI(formData)
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess('合同上传成功') this.$modal.msgSuccess('工资卡信息上传成功')
resolve() resolve()
} else { } else {
this.$modal.msgError(res.msg) this.$modal.msgError(res.msg)
reject() reject()
} }
} catch (err) { } catch (err) {
this.$modal.msgError('合同上传失败,请重试') this.$modal.msgError('工资卡信息上传失败,请重试')
reject(err) reject(err)
} }
}) })
@ -326,7 +326,7 @@ export default {
// //
async getContractDetail() { async getContractDetail() {
console.log(this.queryDetailsId, 'queryDetailsId 合同详情') // console.log(this.queryDetailsId, 'queryDetailsId ')
const { data: res } = await getContractDetailAPI( const { data: res } = await getContractDetailAPI(
this.queryDetailsId, this.queryDetailsId,
) )