diff --git a/public/favicon.ico-1 b/public/favicon.ico-1 deleted file mode 100644 index d65eb21..0000000 Binary files a/public/favicon.ico-1 and /dev/null differ diff --git a/public/favicon.ico-old b/public/favicon.ico-old deleted file mode 100644 index 121ffe2..0000000 Binary files a/public/favicon.ico-old and /dev/null differ diff --git a/src/api/common.js b/src/api/common.js index 864a3c5..16a363f 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -92,3 +92,14 @@ export const getTeamSelectListByConditionAPI = (data) => { data, }) } + +// 删除附件 +export const deleteFileAPI = (id) => { + return request({ + url: '/bmw/pmProject/updateRefundFileById/' + id, + method: 'POST', + data: { + id: id, + }, + }) +} diff --git a/src/api/synthesize-query/three-and-one.js b/src/api/synthesize-query/three-and-one.js index 8ee542e..59f5d67 100644 --- a/src/api/synthesize-query/three-and-one.js +++ b/src/api/synthesize-query/three-and-one.js @@ -90,3 +90,12 @@ export const uploadProMonthTableRefundAPI = (data) => { data, }) } + +// 综合查询 三表一册 农名工工资支付表 保存操作 +export const saveThreeAndOneMonthlyWagePaymentAPI = (data) => { + return request({ + url: '/bmw/pmProject/updateSalary', + method: 'POST', + data, + }) +} diff --git a/src/utils/bonus.js b/src/utils/bonus.js index 23024bf..f1fe388 100644 --- a/src/utils/bonus.js +++ b/src/utils/bonus.js @@ -246,6 +246,7 @@ export function tansParams(params, isEncrypt = false) { // result = result.slice(0, -1) result = encryptWithSM4(result) } + return result } diff --git a/src/views/home-index/components/personPresence/components/item-pie.vue b/src/views/home-index/components/personPresence/components/item-pie.vue index 20ca998..75f69c2 100644 --- a/src/views/home-index/components/personPresence/components/item-pie.vue +++ b/src/views/home-index/components/personPresence/components/item-pie.vue @@ -75,8 +75,9 @@ export default { 0, ) const percent = ( - (dataItem.value / total) * - 100 + isNaN((dataItem.value / total) * 100) + ? 0 + : (dataItem.value / total) * 100 ).toFixed(1) if (data.showAfter) { diff --git a/src/views/synthesize-query/three-and-one/detail/components/three-one-table.vue b/src/views/synthesize-query/three-and-one/detail/components/three-one-table.vue index b1042eb..3581d05 100644 --- a/src/views/synthesize-query/three-and-one/detail/components/three-one-table.vue +++ b/src/views/synthesize-query/three-and-one/detail/components/three-one-table.vue @@ -265,7 +265,7 @@ export default { return { fontSize: '14px', color: '#606266', - padding: '12px 8px', + padding: '12px 0', } }, @@ -307,6 +307,11 @@ export default { // 下载文件 onHandleDownloadFile(row) { console.log('row', row) + this.download( + '/bmw/pmProject/exportThreeAndOne', + {}, + '三表一册.xlsx', + ) }, // 获取三表一册每月数据 diff --git a/src/views/synthesize-query/three-and-one/month-detail/components/att-details.vue b/src/views/synthesize-query/three-and-one/month-detail/components/att-details.vue index 0487b25..e1e6e45 100644 --- a/src/views/synthesize-query/three-and-one/month-detail/components/att-details.vue +++ b/src/views/synthesize-query/three-and-one/month-detail/components/att-details.vue @@ -11,14 +11,16 @@ > @@ -53,8 +55,8 @@ - 出勤:1 - 缺勤:0 + 出勤:1    + 缺勤:0    无对应日期:空白 diff --git a/src/views/synthesize-query/three-and-one/month-detail/components/header-info.vue b/src/views/synthesize-query/three-and-one/month-detail/components/header-info.vue index 545c806..fd9b1ac 100644 --- a/src/views/synthesize-query/three-and-one/month-detail/components/header-info.vue +++ b/src/views/synthesize-query/three-and-one/month-detail/components/header-info.vue @@ -12,7 +12,7 @@ size="mini" type="danger" @click="onHandlePack" - :disabled="monthlyData.refundStatus == 1" + :disabled="monthlyData.status == 2" > 封档 @@ -32,9 +32,9 @@
{{ item.label }}: @@ -60,18 +60,14 @@ 待封档 已封档 @@ -88,7 +84,6 @@ @@ -149,6 +162,7 @@ import { updateProMonthTableAPI, uploadProMonthTableRefundAPI, } from '@/api/synthesize-query/three-and-one' +import { deleteFileAPI } from '@/api/common' import DialogModel from '@/components/DialogModel/index.vue' export default { name: 'HeaderInfo', @@ -169,12 +183,23 @@ export default { default: '', }, }, + + computed: { + fileCount() { + if (this.monthlyData.contractFile) { + return 3 - this.monthlyData.contractFile.length + } + return 3 + }, + }, data() { return { uploadVisible: false, fileSize: 10, fileList: [], - monthlyData: {}, + monthlyData: { + contractFile: [], + }, dialogConfig: { outerTitle: '银行回单查看', outerWidth: '40%', @@ -197,7 +222,7 @@ export default { }, { label: '封档时间', - valueKey: 'refundTime', + valueKey: 'blockTime', }, { label: '回单附件', @@ -236,12 +261,14 @@ export default { const res = await updateProMonthTableAPI({ id: this.id, - refundStatus: 2, + status: 2, }) if (res.code == 200) { this.$modal.msgSuccess('封档成功') this.getMonthlyData() + this.uploadVisible = false + this.fileList = [] } }) .catch(() => { @@ -270,6 +297,9 @@ export default { if (this.fileList.length > 0) { // this.uploadVisible = false const formData = new FormData() + const params = { + id: this.id, + } const fileMsg = [] this.fileList.forEach((item) => { formData.append('files', item.raw) @@ -279,10 +309,14 @@ export default { }) }) + formData.append('fileMsg', JSON.stringify(fileMsg)) + formData.append('params', JSON.stringify(params)) const res = await uploadProMonthTableRefundAPI(formData) if (res.code == 200) { this.$modal.msgSuccess('回单上传成功') this.getMonthlyData() + this.uploadVisible = false + this.fileList = [] } } else { this.$modal.msgError('请上传文件') @@ -345,13 +379,42 @@ export default { // 查看附件 handleClickContractFile() { console.log('查看附件') - this.dialogConfig.outerVisible = true + if (this.monthlyData.contractFile.length > 0) { + this.dialogConfig.outerVisible = true + } else { + this.$modal.msgError('暂无附件') + } }, // 关闭弹框 handleCloseDialogOuter() { this.dialogConfig.outerVisible = false }, + + // 删除附件 + onHandleDeleteFile(row) { + console.log('删除附件', row) + + this.$confirm('是否确定删除附件?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }) + .then(async () => { + const res = await deleteFileAPI(row.id) + if (res.code == 200) { + this.$modal.msgSuccess('删除成功') + this.getMonthlyData() + } + }) + .catch(() => { + // console.log('取消') + }) + }, + // 下载附件 + onHandleDownloadFile(row) { + window.open(row.lsUrl, '_blank') + }, }, } diff --git a/src/views/synthesize-query/three-and-one/month-detail/components/nameList.vue b/src/views/synthesize-query/three-and-one/month-detail/components/nameList.vue index 703d6f1..164f6f0 100644 --- a/src/views/synthesize-query/three-and-one/month-detail/components/nameList.vue +++ b/src/views/synthesize-query/three-and-one/month-detail/components/nameList.vue @@ -11,29 +11,29 @@ > @@ -128,7 +128,7 @@ export default { }, data() { return { - total: 100, + total: 0, nameListQueryParams: { monthId: this.id, onDuty: '', diff --git a/src/views/synthesize-query/three-and-one/month-detail/components/wage-info.vue b/src/views/synthesize-query/three-and-one/month-detail/components/wage-info.vue index 2472462..c6649df 100644 --- a/src/views/synthesize-query/three-and-one/month-detail/components/wage-info.vue +++ b/src/views/synthesize-query/three-and-one/month-detail/components/wage-info.vue @@ -11,20 +11,23 @@ > @@ -61,8 +64,8 @@ stripe style="width: 100%" :data="wageInfoListData" - :header-cell-style="tableHeaderStyle" :cell-style="tableCellStyle" + :header-cell-style="tableHeaderStyle" > @@ -86,9 +88,19 @@ @@ -111,7 +123,10 @@