287 lines
9.6 KiB
Vue
287 lines
9.6 KiB
Vue
<template>
|
|
<div>
|
|
<page-header-title :img-for-icon="IconImg"></page-header-title>
|
|
<a-card :bordered="false">
|
|
<!-- 查询区域-start -->
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
<a-row>
|
|
<a-col :xxl="4" :xl="10" :lg="12" :md="12" :sm="24">
|
|
<a-form-item label="合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<a-input placeholder="请输入合同编号" v-model="queryParam.contractNum" :maxLength='50'></a-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xxl="4" :xl="10" :lg="12" :md="12" :sm="24">
|
|
<a-form-item label="合同名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<a-input placeholder="请输入合同名称" v-model="queryParam.contractName" :maxLength='50'></a-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xxl="8" :xl="10" :lg="11" :md="12" :sm="24">
|
|
<a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<j-date
|
|
placeholder="请选择开始日期"
|
|
date-format="YYYY-MM-DD"
|
|
class="query-group-cust"
|
|
v-model="queryParam.startTime"
|
|
:disabled-date="disabledStartDate">
|
|
</j-date>
|
|
<span class="query-group-split-cust"></span>
|
|
<j-date
|
|
placeholder="请选择结束日期"
|
|
date-format="YYYY-MM-DD"
|
|
class="query-group-cust"
|
|
v-model="queryParam.endTime"
|
|
:disabled-date="disabledEndDate">
|
|
</j-date>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
|
<span class="table-page-search-submitButtons">
|
|
<a-button type="primary" icon="search" @click="searchQuery"
|
|
v-has="'expenditureContract:search'">查询</a-button>
|
|
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
|
</span>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form>
|
|
</div>
|
|
<!-- /查询区域-end-->
|
|
|
|
<!-- 操作按钮区域-->
|
|
<div class="table-operator">
|
|
<a-button type="primary" icon="plus" @click="handleAdd" v-has="'expenditureContract:add'">新增</a-button>
|
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
|
|
@change="handleImportExcel" v-has="'expenditureContract:import'">
|
|
<a-button type="primary" icon="import">导入</a-button>
|
|
</a-upload>
|
|
<a-button type="primary" icon="export" @click="handleExportXls('支出合同')" v-has="'expenditureContract:export'">
|
|
导出
|
|
</a-button>
|
|
<a-button type="primary" icon="download" @click="downTemplate('支出合同导入模板')"
|
|
v-has="'expenditureContract:downTemplate'">下载模板
|
|
</a-button>
|
|
<a-button type="danger" icon="delete" @click="batchDel" v-has="'expenditureContract:batchDel'">批量删除</a-button>
|
|
</div>
|
|
<!-- 操作按钮区域-end-->
|
|
|
|
<!-- table表格区域-->
|
|
<div>
|
|
<a-table
|
|
ref="table"
|
|
size="middle"
|
|
bordered
|
|
rowKey="id"
|
|
:columns="columns"
|
|
:scroll="{x: 1600}"
|
|
:dataSource="dataSource"
|
|
:pagination="ipagination"
|
|
:loading="loading"
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
@change="handleTableChange"
|
|
class="j-table-force-nowrap">
|
|
|
|
<template slot="projectName" slot-scope="text, record">
|
|
<j-ellipsis
|
|
class="primary-color"
|
|
@click="toContractDetail(record.id)"
|
|
:value="text"
|
|
:length="18"></j-ellipsis>
|
|
</template>
|
|
|
|
<template slot="text" slot-scope="text">
|
|
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
|
</template>
|
|
|
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
|
|
|
<!-- v-if="record.status === 2"-->
|
|
<a @click="handleAudit(record.id)" v-has="'revenueContract:aduit'">审核</a>
|
|
<!-- v-if="record.status === 1 || record.status === 4" -->
|
|
<a @click="handleEdit(record.id, record.contractNum)"
|
|
v-has="'expenditureContract:edit'">编辑</a>
|
|
<!-- v-if="record.status === 3" -->
|
|
<a @click="handleArchive(record.id)" v-has="'revenueContract:archive'">存档</a>
|
|
<!-- v-if="record.status === 1 || record.status === 2 || record.status === 4"-->
|
|
<a @click="handleDelete(record.id)"
|
|
v-has="'expenditureContract:delete'">删除</a>
|
|
<!-- v-if="record.status === 5"-->
|
|
<a :disabled="true">已存档</a>
|
|
</span>
|
|
</a-table>
|
|
</div>
|
|
</a-card>
|
|
|
|
<revenue-contract-aduit-module ref="aduitForm" @ok="modalFormOk"></revenue-contract-aduit-module>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import PageHeaderTitle from '../../../components/layouts/PageHeaderTitle'
|
|
import IconImg from '@assets/imgs/icon/icon_revenue_contract.png'
|
|
import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
|
import { RangeDateMixin } from '../../../mixins/RangeDateMixin'
|
|
import JDate from '../../../components/tools/JDate'
|
|
import { archiveRevenueContract } from '../../../api/incomePaymentsApi'
|
|
import RevenueContractAduitModule from '../revenueContract/modules/RevenueContractAduitModule'
|
|
|
|
export default {
|
|
name: 'ExpenditureContractList',
|
|
components: { PageHeaderTitle, JDate, RevenueContractAduitModule },
|
|
mixins: [JeroListMixin, RangeDateMixin],
|
|
computed: {
|
|
importExcelUrl: function () {
|
|
return `${ window._CONFIG['domianURL'] }/${ this.url.importExcelUrl }`
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
IconImg,
|
|
labelCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 5 }
|
|
},
|
|
wrapperCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 10 }
|
|
},
|
|
dateKeyObj: {
|
|
beginKey: 'startTime',
|
|
endKey: 'endTime'
|
|
},
|
|
columns: [
|
|
{
|
|
title: '序号',
|
|
dataIndex: '',
|
|
key: 'rowIndex',
|
|
width: 60,
|
|
align: 'center',
|
|
customRender: function (t, r, index) {
|
|
return parseInt(index) + 1
|
|
}
|
|
}, {
|
|
title: '合同编号',
|
|
align: 'center',
|
|
dataIndex: 'contractNum',
|
|
width: 280,
|
|
scopedSlots: { customRender: 'projectName' }
|
|
}, {
|
|
title: '合同名称',
|
|
align: 'center',
|
|
dataIndex: 'contractName',
|
|
width: 280,
|
|
scopedSlots: { customRender: 'text' }
|
|
}, {
|
|
title: '签订单位',
|
|
align: 'center',
|
|
dataIndex: 'signedCompanyTemporaryName',
|
|
width: 280,
|
|
scopedSlots: { customRender: 'text' }
|
|
}, {
|
|
title: '负责人',
|
|
align: 'center',
|
|
dataIndex: 'principalName',
|
|
width: 280,
|
|
scopedSlots: { customRender: 'text' }
|
|
}, {
|
|
title: '合同总金额',
|
|
align: 'center',
|
|
dataIndex: 'contractAmount',
|
|
width: 200,
|
|
scopedSlots: { customRender: 'text' }
|
|
}, {
|
|
title: '创建时间',
|
|
align: 'center',
|
|
dataIndex: 'createTime',
|
|
width: 250
|
|
}, {
|
|
title: '操作',
|
|
dataIndex: 'action',
|
|
align: 'center',
|
|
fixed: 'right',
|
|
width: 200,
|
|
scopedSlots: { customRender: 'action' }
|
|
}
|
|
],
|
|
url: {
|
|
list: '/contract/paySpendingContract/list',
|
|
delete: '/contract/paySpendingContract/delete',
|
|
deleteBatch: '/contract/paySpendingContract/deleteBatch',
|
|
exportXlsUrl: '/contract/paySpendingContract/exportXls',
|
|
importExcelUrl: '/contract/paySpendingContract/importExcel',
|
|
downTemplateUrl: '/contract/paySpendingContract/downloadExcelModel'
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
handleAdd() {
|
|
this.$router.push({
|
|
path: '/contractManagement/RevenueContractModule'
|
|
})
|
|
},
|
|
handleEdit(id) {
|
|
this.$router.push({
|
|
path: '/contractManagement/RevenueContractModule',
|
|
query: {
|
|
contractId: id
|
|
}
|
|
})
|
|
},
|
|
/**
|
|
* 详情
|
|
* @param id
|
|
*/
|
|
toContractDetail(id) {
|
|
console.log(id)
|
|
this.$router.push({
|
|
path: '/contractManagement/ExpenditureContractDetail',
|
|
query: {
|
|
revenueId: id
|
|
}
|
|
})
|
|
},
|
|
/**
|
|
* 审核
|
|
* @param id
|
|
*/
|
|
handleAudit(id) {
|
|
this.$refs.aduitForm.contractType = 2
|
|
this.$refs.aduitForm.contractId = id
|
|
this.$refs.aduitForm.open()
|
|
},
|
|
/**
|
|
* 存档
|
|
* @param id
|
|
*/
|
|
handleArchive(id) {
|
|
console.log(id)
|
|
let that = this
|
|
this.$confirm({
|
|
title: '存档',
|
|
content: '确认存档?',
|
|
onOk: function () {
|
|
that.loading = true
|
|
that.loading = false
|
|
let param = {
|
|
contractId: id,
|
|
contractStatus: 5
|
|
}
|
|
archiveRevenueContract(param).then((res) => {
|
|
if (res.success) {
|
|
that.$message.success(res.message)
|
|
that.loadData()
|
|
} else {
|
|
that.$message.warning(res.message)
|
|
}
|
|
}).finally(() => {
|
|
that.loading = false
|
|
})
|
|
}
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
@import '~@assets/less/common.less';
|
|
</style> |