[add] 工作组、普通项目缴费凭证,分标委详情
This commit is contained in:
@@ -0,0 +1,298 @@
|
||||
<template>
|
||||
<div class="main-box">
|
||||
<a-card :bordered="false">
|
||||
<!--查询区域begin-->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-row :gutter="24">
|
||||
<a-col :xl="12" :lg="8" :md="8" :sm="24">
|
||||
<a-tooltip placement="topLeft">
|
||||
<template slot="title">{{ $route.query.projectName }}</template>
|
||||
<div class="project-title">
|
||||
{{ $route.query.projectName }}
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||
<span>应付金额:{{ }}元</span>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="8" :md="8" :sm="24">
|
||||
<span>已付金额:{{ }}元</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<!--查询区域end-->
|
||||
|
||||
<!-- 表格区域-->
|
||||
<div class="table-box">
|
||||
<a-table
|
||||
ref="table"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
|
||||
<!-- 项目名称-->
|
||||
<template slot="projectName" slot-scope="text, record">
|
||||
<j-ellipsis :value="text" :length="20" class="project-name" @click="openDetail(record)"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<template slot="text" slot-scope="text, record">
|
||||
<j-ellipsis :value="text" :length="20"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<!-- 打包、需要发票-->
|
||||
<template v-slot:status-pack="{record, text}">
|
||||
<status-slot :statu-obj="record" :status-no="text"></status-slot>
|
||||
</template>
|
||||
<!-- 到账-->
|
||||
<template v-slot:status="{record, text}">
|
||||
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
|
||||
</template>
|
||||
<!-- 开票-->
|
||||
<template v-slot:status-bill="{record, text}">
|
||||
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="bill"></status-slot>
|
||||
</template>
|
||||
<!-- 邮寄-->
|
||||
<template v-slot:status-mail="{record, text}">
|
||||
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="mail"></status-slot>
|
||||
</template>
|
||||
|
||||
<!-- 缴费凭证-->
|
||||
<span slot="action" class="action-span-cell" slot-scope="text,record">
|
||||
<a @click="paymentVoucher(record)">缴费凭证</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<!-- 表格区域end-->
|
||||
<!-- 添加阶段按钮-->
|
||||
<a-button type="primary" icon="plus" class="add-stage-btn" @click="addStage">添加阶段</a-button>
|
||||
|
||||
<div class="audit-info">
|
||||
<div class="audit-info-title">审核信息</div>
|
||||
<template v-if="auditInfo && auditInfo.length > 0">
|
||||
<div class="audit-info-item-box" v-for="(item, index) in auditInfo" :key="index">
|
||||
<a-row :gutter="15">
|
||||
<a-col :span="8">
|
||||
<div class="audit-info-item">
|
||||
<span class="audit-info-item-title">申请人:</span>
|
||||
<span class="audit-info-item-content">{{ }}</span>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div class="audit-info-item">
|
||||
<span class="audit-info-item-title">申请时间:</span>
|
||||
<span class="audit-info-item-content">{{ }}</span>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div class="audit-info-item">
|
||||
<span class="audit-info-item-title">缴费金额:</span>
|
||||
<span class="audit-info-item-content">{{ }}</span>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="15">
|
||||
<a-col :span="8">
|
||||
<div class="audit-info-item">
|
||||
<span class="audit-info-item-title">缴费日期:</span>
|
||||
<span class="audit-info-item-content">{{ }}</span>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div class="audit-info-item">
|
||||
<span class="audit-info-item-title">缴费凭证:</span>
|
||||
<img class="audit-info-img" src="">
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div class="audit-info-item">
|
||||
<span class="audit-info-item-title">审核结果:</span>
|
||||
<span class="audit-info-item-content">{{ }}</span>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="15">
|
||||
<a-col :span="8">
|
||||
<div class="audit-info-item">
|
||||
<span class="audit-info-item-title">审核人:</span>
|
||||
<span class="audit-info-item-content">{{ }}</span>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div class="audit-info-item">
|
||||
<span class="audit-info-item-title">审核时间:</span>
|
||||
<span class="audit-info-item-content">{{ }}</span>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div class="audit-info-item">
|
||||
<span class="audit-info-item-title">说明:</span>
|
||||
<span class="audit-info-item-content">{{ }}</span>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
<a-list :data-source="[]" v-else></a-list>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
<payment-voucher-modal ref="stageModal" @ok="modalFormOk"></payment-voucher-modal>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import PaymentVoucherModal from '@views/MessagePage/modules/PaymentVoucherModal'
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '阶段',
|
||||
dataIndex: 'chargeProject',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '缴费金额',
|
||||
dataIndex: 'principalName',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '缴费凭证',
|
||||
dataIndex: 'principalPhone',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'img' }
|
||||
}, {
|
||||
title: '申请人',
|
||||
dataIndex: 'principalMail',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '申请日期',
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'PaymentVoucher',
|
||||
components: { PaymentVoucherModal },
|
||||
mixins: [JeroListMixin],
|
||||
data() {
|
||||
return {
|
||||
columns,
|
||||
// 审核信息
|
||||
auditInfo: [],
|
||||
url: {
|
||||
list: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData(arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.error('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
var params = this.getQueryParams()//查询条件
|
||||
this.loading = true
|
||||
this.getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.records || res.result
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total
|
||||
//清空列表选中
|
||||
this.onClearSelected()
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
}
|
||||
if (res.code === 510) {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 添加阶段
|
||||
*/
|
||||
addStage() {
|
||||
this.$refs.stageModal.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.project-title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.table-box {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.add-stage-btn {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.audit-info {
|
||||
|
||||
&-title {
|
||||
padding: 20px 0;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
&-item-box {
|
||||
padding-bottom: 10px;
|
||||
|
||||
.ant-col {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
|
||||
&-title {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&-img {
|
||||
width: calc(100% - 6rem);
|
||||
}
|
||||
}
|
||||
|
||||
.ant-list {
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,154 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<a-form-item label="缴费金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入缴费金额"
|
||||
v-decorator="['amountReceived',validatorRules.amountReceived]"
|
||||
:maxLength='50'
|
||||
@blur="addZero"
|
||||
@change="e => e.target.value = (e.target.value.replace(/[^0-9-.]/g, '')).trim()"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="缴费日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-date placeholder="请选择缴费日期"
|
||||
style="width: 100%;"
|
||||
v-decorator="['paymentDate',validatorRules.paymentDate]"
|
||||
:trigger-change="true"
|
||||
date-format="YYYY-MM-DD"/>
|
||||
</a-form-item>
|
||||
<a-form-item label="付款凭证" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-image-upload v-decorator="['paymentRecord',validatorRules.paymentRecord]"
|
||||
:return-id="true">
|
||||
</j-image-upload>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addZero } from '@/utils/util'
|
||||
import { money } from '@/utils/validate'
|
||||
import JImageUpload from '@comp/jero/JImageUpload'
|
||||
import JDate from '@comp/tools/JDate'
|
||||
|
||||
export default {
|
||||
name: 'PaymentVoucherModal',
|
||||
components: { JImageUpload, JDate },
|
||||
data() {
|
||||
return {
|
||||
title: '凭证信息',
|
||||
width: 600,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 18 }
|
||||
},
|
||||
validatorRules: {
|
||||
amountReceived: {
|
||||
rules: [{ required: true, validator: this.checkMoney }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
paymentDate: {
|
||||
rules: [{ required: true, message: '请选择缴费日期' }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
paymentRecord: {
|
||||
rules: [{ required: true, message: '请上传付款凭证' }],
|
||||
validateTrigger: 'change'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addZero,
|
||||
add() {
|
||||
this.edit({})
|
||||
},
|
||||
edit(record) {
|
||||
this.form.resetFields()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'amountReceived', 'paymentDate', 'remark'))
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
if (this.confirmLoading) {
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
values.projectId = this.projectId
|
||||
values.projectType = this.projectType
|
||||
const obj = Object.assign(this.model, values)
|
||||
let okHttpMethod
|
||||
if (this.model.id) {
|
||||
okHttpMethod = editAmountPhase(obj)
|
||||
} else {
|
||||
let arr = []
|
||||
arr.push(obj)
|
||||
okHttpMethod = addPaymentPhase(arr)
|
||||
}
|
||||
okHttpMethod.then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('ok')
|
||||
this.close()
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
this.confirmLoading = false
|
||||
}, 1000)
|
||||
})
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
close() {
|
||||
this.visible = false
|
||||
},
|
||||
/**
|
||||
* 校验金额格式
|
||||
* @param rules
|
||||
* @param value
|
||||
* @param callback
|
||||
*/
|
||||
checkMoney(rules, value, callback) {
|
||||
if (value) {
|
||||
if (money(value)) {
|
||||
callback()
|
||||
}
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
callback('请输入缴费金额')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user