master
xy 2 years ago
parent 76b5cb86e3
commit 8840e8c2ff

@ -45,7 +45,7 @@
>
<template slot-scope="{ row, $index }">
<el-link v-if="row.read_count" type="success" :underline="false"
>已读</el-link
>已读</el-link
>
<Button
v-else
@ -54,7 +54,7 @@
style="margin-left: 10px"
ghost
@click="readIt(row, $index)"
>未读</Button
>未读</Button
>
</template>
</el-table-column>
@ -71,7 +71,7 @@
style="margin-left: 10px"
ghost
@click="toContract(row)"
>查看</Button
>查看</Button
>
</template>
</el-table-column>
@ -276,7 +276,12 @@
style="margin-bottom: 10px; border: 0px; margin-top: 25px"
>
<div slot="content">
<xy-table :cell-style="nopayCellStyle" :height="300" :list="nopay" :table-item="nopayTable">
<xy-table
:cell-style="nopayCellStyle"
:height="300"
:list="nopay"
:table-item="nopayTable"
>
<template v-slot:btns> </template>
</xy-table>
</div>
@ -314,7 +319,7 @@ export default {
prop: "name",
label: "合同名称",
width: 280,
align:"left"
align: "left",
},
{
prop: "money",
@ -338,7 +343,7 @@ export default {
prop: "supply",
label: "承包商/供货商",
minWidth: 160,
align:"left"
align: "left",
},
{
label: "服务时间",
@ -352,6 +357,11 @@ export default {
);
},
},
{
label: "部门",
prop: "department.name",
width: 160,
},
],
departmentTotal: [],
departmentTotalTable: [
@ -389,7 +399,7 @@ export default {
prop: "name",
label: "合同名称",
width: 180,
align:"left"
align: "left",
},
{
prop: "money",
@ -449,7 +459,7 @@ export default {
prop: "name",
label: "合同名称",
width: 180,
align:"left"
align: "left",
},
{
prop: "money",
@ -467,7 +477,7 @@ export default {
prop: "supply",
label: "承包商/供货商",
width: 160,
align:"left"
align: "left",
},
{
label: "服务时间",
@ -527,7 +537,7 @@ export default {
prop: "supply",
label: "承包商/供货商",
width: 160,
align:"left"
align: "left",
},
{
label: "服务时间",
@ -576,7 +586,7 @@ export default {
prop: "name",
label: "合同名称",
width: 180,
align:"left"
align: "left",
},
{
prop: "money",
@ -594,7 +604,7 @@ export default {
prop: "supply",
label: "承包商/供货商",
width: 160,
align:"left"
align: "left",
},
{
label: "服务时间",
@ -637,7 +647,7 @@ export default {
prop: "name",
label: "合同名称",
width: 180,
align:"left"
align: "left",
},
{
prop: "money",
@ -655,7 +665,7 @@ export default {
prop: "supply",
label: "承包商/供货商",
width: 160,
align:"left"
align: "left",
},
{
label: "服务时间",
@ -698,7 +708,7 @@ export default {
prop: "name",
label: "合同名称",
width: 180,
align:"left"
align: "left",
},
{
prop: "money",
@ -716,7 +726,7 @@ export default {
prop: "supply",
label: "承包商/供货商",
width: 160,
align:"left"
align: "left",
},
{
label: "服务时间",
@ -761,7 +771,7 @@ export default {
prop: "name",
label: "合同名称",
width: 180,
align:"left"
align: "left",
},
{
prop: "money",
@ -779,7 +789,7 @@ export default {
prop: "supply",
label: "承包商/供货商",
width: 160,
align:"left"
align: "left",
},
{
label: "服务时间",
@ -822,7 +832,7 @@ export default {
prop: "name",
label: "合同名称",
width: 180,
align:"left"
align: "left",
},
{
prop: "money",
@ -1031,28 +1041,36 @@ export default {
.catch((error) => {});
},
methods: {
nopayCellStyle ({row}) {
let per = ((((row.fund_log_total) / row.money) || 0) * 100)?.toFixed(2) || 0
let endDay = this.$moment(new Date()).diff(this.$moment(new Date(row.end_date)),'months')
nopayCellStyle({ row }) {
let per = ((row.fund_log_total / row.money || 0) * 100)?.toFixed(2) || 0;
let endDay = this.$moment(new Date()).diff(
this.$moment(new Date(row.end_date)),
"months"
);
if (per < 100 && endDay >= 6) {
return {
'background': '#ef6256ee',
'color': '#fff'
}
background: "#ef625688",
color: "#fff",
};
}
},
async getNopay() {
const res = await nopayTotal({
is_auth: 1,
//year: this.select.year
});
this.nopay = res.filter(i => i.momey != 0);
this.nopay = res
.filter((i) => i.momey != 0)
.sort((a, b) => {
return (
new Date(a.end_date).getTime() - new Date(b.end_date).getTime()
);
});
},
async getDepartmnetTotal() {
const res = await departmentTotal({
is_auth: 1,
year: this.select.year
year: this.select.year,
});
this.departmentTotal = res;
},
@ -1061,7 +1079,7 @@ export default {
this.select.year = e;
this.getStatistic();
this.getNopay();
this.getDepartmnetTotal()
this.getDepartmnetTotal();
},
async getStatistic() {
const res = await statistic(this.select);

@ -37,9 +37,15 @@ export default {
key: "file",
title: "文件",
width: 200,
render:(h,{ row }) => {
return h('a',{ attrs: { download: row.file.original_name, href: row.file.url } },row.file.original_name)
}
render: (h, { row }) => {
return h(
"a",
{
attrs: { download: row.file.original_name, href: row.file.url },
},
row.file.original_name
);
},
},
{
key: "content",
@ -81,15 +87,15 @@ export default {
},
on: {
["on-ok"]: (_) => {
let attachments = this.detail.attachment.filter(
(i) => i.id !== row.id
).map(i => {
return {
file: i.file.id,
date: i.date,
content: i.content
}
})
let attachments = this.detail.attachment
.filter((i) => i.id !== row.id)
.map((i) => {
return {
file: i.file.id,
date: i.date,
content: i.content,
};
});
save({
...this.detail,
attachment_list: attachments,
@ -195,14 +201,15 @@ export default {
"file-list": this.fileList,
limit: 1,
headers: {
Authorization: "Bearer " + getToken()
Authorization: "Bearer " + getToken(),
},
accept: ".rar,.zip,.doc,.docx,.pdf,.jpg,.png,.gif,.mp4,.xls,.xlsx",
"on-success":(response, file, fileList) => {
this.fileList = fileList
form.file = response?.id
accept:
".rar,.zip,.doc,.docx,.pdf,.jpg,.png,.gif,.mp4,.xls,.xlsx",
"on-success": (response, file, fileList) => {
this.fileList = fileList;
form.file = response?.id;
},
"before-upload":(file) => {
"before-upload": (file) => {
if (file.size / 1000 > 5 * 1024) {
this.$message({
type: "warning",
@ -211,9 +218,9 @@ export default {
return false;
}
},
"on-remove":(file, fileList) => {
this.fileList = fileList
}
"on-remove": (file, fileList) => {
this.fileList = fileList;
},
},
},
[

@ -47,53 +47,59 @@ export default {
width: 160,
},
{
key: 'operate',
title: '操作',
key: "operate",
title: "操作",
width: 100,
align: 'left',
render: (h,{ row }) => {
return h('Poptip',{
align: "left",
render: (h, { row }) => {
return h("Poptip", {
props: {
transfer: true,
confirm: true,
title: "确认要删除吗"
title: "确认要删除吗",
},
scopedSlots: {
default: () => {
return h('Button',{
props: {
ghost: true,
size: 'small',
type: 'error'
}
},'删除')
}
return h(
"Button",
{
props: {
ghost: true,
size: "small",
type: "error",
},
},
"删除"
);
},
},
on: {
['on-ok']:_ =>{
let contents = this.detail.content.filter(i => i.id !== row.id)
["on-ok"]: (_) => {
let contents = this.detail.content.filter(
(i) => i.id !== row.id
);
save({
...this.detail,
content_list: contents,
attachment_list: this.detail.attachment.map(i => {
attachment_list: this.detail.attachment.map((i) => {
return {
date: i.date,
content: i.content,
file: i.file.id
}
})
}).then(_ => {
file: i.file.id,
};
}),
}).then((_) => {
this.$message({
type: 'success',
message: '删除成功'
})
this.getDetail()
})
}
}
})
}
}
type: "success",
message: "删除成功",
});
this.getDetail();
});
},
},
});
},
},
],
};
},
@ -218,7 +224,7 @@ export default {
});
instance.confirmButtonLoading = false;
done();
this.getDetail()
this.getDetail();
})
.catch((_) => {
instance.confirmButtonLoading = false;

Loading…
Cancel
Save