master
xy 2 years ago
parent 2234ed73b6
commit 4dda3f007b

@ -2,9 +2,10 @@
ENV = 'development'
# base api
VUE_APP_DOMIAN=http://192.168.60.99:9003/
#VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/
#VUE_APP_DOMIAN=http://192.168.60.99:9003/
VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/
VUE_APP_BASE_API = ''
VUE_APP_UPLOAD=http://hdcontract.ali251.langye.net/api/admin/upload-file
#VUE_APP_UPLOAD=http://192.168.60.99:9003/api/admin/upload-file
VUE_APP_OUT_URL = http://192.168.60.18:2021

@ -104,6 +104,9 @@ export default {
selectClick(selection, row){
this.$emit('select',selection, row)
},
selectAll (selection) {
this.$emit('select-all',selection)
},
rowClick(selection, row){
this.$emit('rowClick',selection, row)
},
@ -126,6 +129,9 @@ export default {
},
setCurrentRow (row) {
this.$refs.table.setCurrentRow(row)
},
doLayout () {
this.$refs.table.doLayout()
}
},
created() {
@ -159,7 +165,7 @@ export default {
default-expand-all={defaultExpandAll}
tree-props={treeProps}
fit={true}
on={{['select']:selectClick,['cell-click']:cellClick,['row-click']:rowClick}}>
on={{['select']:selectClick,['cell-click']:cellClick,['row-click']:rowClick,['select-all']:this.selectAll}}>
{
//
showIndex ? createIndexRow() : ''
@ -245,6 +251,7 @@ export default {
label-class-name={item.labelClassName}
sortable={item.sortable ?? true}
type={item.type}
reserve-selection={item.reserveSelection}
selectable={item.selectable}
scopedSlots={{
header(scope){

@ -80,7 +80,12 @@
</slot>
</lx-header>
<xy-table :list="list" :table-item="table">
<xy-table :list="list"
ref="xyTable"
:table-item="table"
:show-summary="true"
:summary-method="summaryMethod"
@select="tableSelect" @select-all="tableSelect">
<template v-slot:btns>
<el-table-column
label="操作"
@ -223,6 +228,7 @@ export default {
},
data() {
return {
selections: [],
select: {
plan_id: "",
plan_name: "",
@ -278,6 +284,13 @@ export default {
is_auth: 1,
status: "",
table: [
{
prop: 'summary',
type: 'selection',
width: 55,
fixed: 'left',
reserveSelection: true
},
{
label: "项目名称",
minWidth: 250,
@ -308,9 +321,10 @@ export default {
},
},
{
label: "款项类型",
prop: "type",
width: 120,
label: "备注",
minWidth: 460,
prop: "remark",
align: "left",
},
{
label: "预算计划",
@ -333,22 +347,35 @@ export default {
},
},
{
prop: "status",
label: "状态",
label: "业务科室",
minWidth: 160,
prop: "department.name",
align: "center",
},
{
label: "经办人",
minWidth: 160,
prop: "admin.name",
align: "center",
},
{
label: '付款日期',
prop: 'act_date',
width: 120,
formatter: (cell, data, value) => {
if (value === 0) return "待审核";
else return "已审核";
},
},
{
label: "次数",
prop: "pay_count",
width: 95,
label: "创建信息",
prop: "created_at",
width: 160,
formatter: (cell, data, value) => {
return value + 1;
return parseTime(new Date(value), "{y}-{m}-{d}");
},
},
{
label: "款项类型",
prop: "type",
width: 120,
},
{
label: "是否为最后一笔",
prop: "is_end",
@ -358,35 +385,51 @@ export default {
},
},
{
label: "经办人",
minWidth: 160,
prop: "admin.name",
align: "center",
},
{
label: "业务科室",
minWidth: 160,
prop: "department.name",
align: "center",
},
{
label: "备注",
minWidth: 460,
prop: "remark",
align: "left",
label: "次数",
prop: "pay_count",
width: 95,
formatter: (cell, data, value) => {
return value + 1;
},
},
{
label: "创建信息",
prop: "created_at",
width: 160,
prop: "status",
label: "状态",
width: 120,
formatter: (cell, data, value) => {
return parseTime(new Date(value), "{y}-{m}-{d}");
if (value === 0) return "待审核";
else return "已审核";
},
},
],
};
},
methods: {
summaryMethod ({columns,data}) {
const fn = (prop) => this.selections.reduce((pre,cur) => pre + Number(cur[prop]),0).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
return columns.map((column, index) => {
if (index === 0) {
return '统计'
}
else if (column.property === 'apply_money') {
return fn(column.property)
}
else if (column.property === 'act_money') {
return fn(column.property)
}
else if (column.property === 'pay_count') {
return this.selections.reduce((pre,cur) => pre + Number(cur[column.property]),0) + this.selections.length
} else {
return '';
}
})
},
tableSelect (selections) {
console.log(selections)
this.selections = selections;
this.list = [...this.list]
},
toExport() {
this.is_export = 1;
this.getFundLogs(true);

@ -43,9 +43,14 @@
return h(
"a", {
attrs: {
download: row.file.original_name,
href: row.file.url
//download: row.file.original_name,
//href: row.file.url
},
on: {
['click']:e => {
window.open(row.file.url)
}
}
},
row.file.original_name
);

@ -277,6 +277,12 @@ export default {
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
},
},
{
label: "备注",
minWidth: 360,
prop: "remark",
align: "left",
},
{
label: "预算计划",
width: 320,
@ -298,27 +304,34 @@ export default {
},
},
{
label: "款项类型",
prop: "type",
label: "业务科室",
minWidth: 140,
prop: "department.name",
align: "center",
},
{
label: "经办人",
minWidth: 120,
prop: "admin.name",
align: "center",
},
{
label: '付款日期',
prop: 'act_date',
width: 120,
},
{
prop: "status",
label: "状态",
width: 100,
label: "创建信息",
prop: "created_at",
width: 160,
formatter: (cell, data, value) => {
if (value === 0) return "待审核";
else return "已审核";
return parseTime(new Date(value), "{y}-{m}-{d}");
},
},
{
label: "次数",
prop: "pay_count",
width: 95,
formatter: (cell, data, value) => {
return value + 1;
},
label: "款项类型",
prop: "type",
width: 120,
},
{
label: "最后一笔",
@ -329,29 +342,20 @@ export default {
},
},
{
label: "经办人",
minWidth: 120,
prop: "admin.name",
align: "center",
},
{
label: "业务科室",
minWidth: 140,
prop: "department.name",
align: "center",
},
{
label: "备注",
minWidth: 360,
prop: "remark",
align: "left",
label: "次数",
prop: "pay_count",
width: 95,
formatter: (cell, data, value) => {
return value + 1;
},
},
{
label: "创建信息",
prop: "created_at",
width: 160,
prop: "status",
label: "状态",
width: 100,
formatter: (cell, data, value) => {
return parseTime(new Date(value), "{y}-{m}-{d}");
if (value === 0) return "待审核";
else return "已审核";
},
},
],

Loading…
Cancel
Save