762 lines
28 KiB
Vue
762 lines
28 KiB
Vue
<template>
|
||
<div>
|
||
<page-header-title :is-level-one="false" :level-two-title="workingGroupProject"></page-header-title>
|
||
<a-card :bordered="false">
|
||
<div class="part-title">
|
||
<div class="part-title-text">工作组信息</div>
|
||
</div>
|
||
<!-- 工作组信息区域-->
|
||
<a-spin :spinning="spinning">
|
||
<div class="work-group-detail">
|
||
<div class="work-group-detail-item work-group-detail-item-small"
|
||
v-for="(item, index) in detailTitleList"
|
||
:key="index">
|
||
<div class="work-group-detail-item-title">{{ item.title }}:</div>
|
||
<div class="work-group-detail-item-content work-group-detail-item-filename"
|
||
v-if="(item.fieldName === 'chargeNoticeAId' || item.fieldName === 'chargeNoticeBId') && workingGroupDetail[item.fieldName]">
|
||
<preview-file :file-id="workingGroupDetail[item.fieldName]"></preview-file>
|
||
</div>
|
||
<div class="work-group-detail-item-content" v-else>{{ workingGroupDetail[item.fieldName] }}</div>
|
||
</div>
|
||
<div class="work-group-detail-item">
|
||
<div class="work-group-detail-item-title">任务及目标:</div>
|
||
<div class="work-group-detail-item-content">{{ workingGroupDetail.missionAndObjectives }}</div>
|
||
</div>
|
||
<div class="work-group-detail-item">
|
||
<div class="work-group-detail-item-title">备注:</div>
|
||
<div class="work-group-detail-item-content">{{ workingGroupDetail.remarks }}</div>
|
||
</div>
|
||
</div>
|
||
</a-spin>
|
||
<!-- /工作组信息区域-->
|
||
|
||
<a-divider></a-divider>
|
||
|
||
<!-- 查询区域-->
|
||
<div class="part-title">
|
||
<div class="part-title-text">成员信息</div>
|
||
</div>
|
||
<div class="table-page-search-wrapper">
|
||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||
<a-row>
|
||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||
<a-form-item label="成员单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||
<a-input placeholder="请输入成员单位" v-model="queryParam.chargeCompanyTemporaryName"
|
||
:maxLength='50'></a-input>
|
||
</a-form-item>
|
||
</a-col>
|
||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||
<a-form-item label="来款状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||
<j-dict-select-tag v-model="queryParam.chargeStatus " placeholder="请选择来款状态"
|
||
dictCode="work_group_charge_status"/>
|
||
</a-form-item>
|
||
</a-col>
|
||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||
<a-form-item label="来款年份" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||
<j-year-date style="width:100%" placeholder="请选择年份" v-model="queryParam.paymentDate"></j-year-date>
|
||
</a-form-item>
|
||
</a-col>
|
||
|
||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||
<a-form-item label="是否打包" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||
<j-dict-select-tag v-model="queryParam.pack"
|
||
placeholder="请选择是否打包"
|
||
dictCode="yn"
|
||
/>
|
||
</a-form-item>
|
||
</a-col>
|
||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||
<a-form-item label="标签名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||
<a-input placeholder="请输入标签名称" v-model="queryParam.label" :maxLength='50'></a-input>
|
||
</a-form-item>
|
||
</a-col>
|
||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||
<a-form-item label="预估到账日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||
<j-month-date placeholder="请选择开始日期"
|
||
class="query-group-cust"
|
||
v-model="queryParam[rangeMonthKey.start]"
|
||
:trigger-change="true"
|
||
date-format="YYYY-MM"
|
||
:disabled-date="disabledStartMonth"
|
||
/>
|
||
<span class="query-group-split-cust"></span>
|
||
<j-month-date placeholder="请选择结束日期"
|
||
class="query-group-cust"
|
||
v-model="queryParam[rangeMonthKey.end]"
|
||
:trigger-change="true"
|
||
date-format="YYYY-MM"
|
||
:disabled-date="disabledEndMonth"
|
||
/>
|
||
</a-form-item>
|
||
</a-col>
|
||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||
<a-form-item label="是否审核" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||
<j-dict-select-tag v-model="queryParam.checkPaymentStatus"
|
||
placeholder="请选择是否审核"
|
||
dictCode="yn"
|
||
/>
|
||
</a-form-item>
|
||
</a-col>
|
||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||
<a-form-item label="是否确认凭证" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||
<j-dict-select-tag v-model="queryParam.confirmVoucher"
|
||
placeholder="请选择是否确认凭证"
|
||
dictCode="yn"
|
||
/>
|
||
</a-form-item>
|
||
</a-col>
|
||
|
||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||
<span class="table-page-search-submitButtons">
|
||
<a-button type="primary" icon="search" @click="searchQuery"
|
||
v-has="'workingGroupMember:search'">查询</a-button>
|
||
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||
</span>
|
||
</a-col>
|
||
</a-row>
|
||
</a-form>
|
||
</div>
|
||
<!-- /查询区域-->
|
||
|
||
<!-- 操作按钮区域-->
|
||
<div class="table-operator">
|
||
<a-button type="primary" icon="plus" @click="handleAdd" v-has="'workingGroupMember:add'" v-if="canOperate">
|
||
添加成员
|
||
</a-button>
|
||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :data="importParam"
|
||
:action="importExcelUrl" @change="handleImportExcel" v-has="'workingGroupMember:import'"
|
||
v-if="canOperate">
|
||
<a-button type="primary" icon="import">导入</a-button>
|
||
</a-upload>
|
||
<a-button type="primary" icon="export" @click="handleExportXls('工作组成员')" v-has="'workingGroupMember:export'">
|
||
导出
|
||
</a-button>
|
||
<a-button type="primary" icon="download" @click="downTemplate('工作组成员导入模板')"
|
||
v-has="'workingGroupMember:downTemplate'" v-if="canOperate">下载模板
|
||
</a-button>
|
||
<a-button type="danger" icon="delete" @click="batchDel" v-has="'workingGroupMember:batchDel'" v-if="canOperate">
|
||
批量删除
|
||
</a-button>
|
||
<a-button type="primary" @click="setChargeNotic" v-has="'workingGroupMember:setChargeNotic'" v-if="canOperate">
|
||
设置收费通知
|
||
</a-button>
|
||
<a-button type="primary" @click="setDunningReminder" v-has="'workingGroupMember:setDunningReminder'"
|
||
v-if="canOperate">催款提醒
|
||
</a-button>
|
||
<a-button type="primary" @click="setLabel" v-has="'workingGroupMember:setLabel'">设置标签</a-button>
|
||
</div>
|
||
<!-- /操作按钮区域-end-->
|
||
|
||
<!-- table表格区域-->
|
||
<div>
|
||
<a-table
|
||
ref="table"
|
||
size="middle"
|
||
bordered
|
||
rowKey="id"
|
||
:columns="columns"
|
||
:scroll="{x: 1500}"
|
||
: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 :value="text"
|
||
:length="18"
|
||
class="primary-color"
|
||
@click="openDetailModal(record)"></j-ellipsis>
|
||
</template>
|
||
<!--金钱 3位一逗号分隔-->
|
||
<template slot="allMoney" slot-scope="text">
|
||
<a-tooltip>
|
||
<template slot="title">{{ formatMoney(text) }}</template>
|
||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||
</a-tooltip>
|
||
</template>
|
||
<!-- 打包、需要发票、到账、开票、邮寄状态-->
|
||
<template slot="status" slot-scope="text,record">
|
||
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
|
||
</template>
|
||
|
||
<!-- 确认收入 -->
|
||
<template slot="status-confirm" slot-scope="text,record">
|
||
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="confirm"
|
||
:get-info-func="getPayConfirmList"></status-slot>
|
||
</template>
|
||
|
||
<!-- 开票-->
|
||
<template slot="status-bill" slot-scope="text,record">
|
||
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="bill"></status-slot>
|
||
</template>
|
||
|
||
<!-- 邮寄-->
|
||
<template slot="status-mail" slot-scope="text,record">
|
||
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="mail"></status-slot>
|
||
</template>
|
||
|
||
<!--打包-->
|
||
<template slot="status-pack" slot-scope="text,record">
|
||
<status-slot :statu-obj="record" :status-no="text" status-key="pack"></status-slot>
|
||
</template>
|
||
|
||
<!--需要发票-->
|
||
<template slot="status-needInvoice" slot-scope="text,record">
|
||
<status-slot :statu-obj="record" :status-no="text"></status-slot>
|
||
</template>
|
||
|
||
<template slot="text" slot-scope="text">
|
||
<a-tooltip>
|
||
<template slot="title">{{ text }}</template>
|
||
<div class="table-text">{{ text }}</div>
|
||
</a-tooltip>
|
||
</template>
|
||
|
||
<span slot="action" class="action-span-cell" slot-scope="text, record" v-if="canOperate">
|
||
<!-- 待确收金额不为0,未开票、未到账、未邮寄可以操作调账 -->
|
||
<a @click="handleEditAccount(record)" :disabled="isAllowEditAccount(record)" v-has="'workingGroupMember:editAccount'">调账</a>
|
||
<a @click="handleEdit(record)" v-has="'workingGroupMember:edit'">编辑</a>
|
||
<a @click="handleDelete(record.id)" v-has="'workingGroupMember:delete'">删除</a>
|
||
<a @click="confirmVoucher(record.id)" v-show="!record.confirmVoucher" v-has="'workingGroupMember:confirmVoucher'">确认凭证</a>
|
||
</span>
|
||
</a-table>
|
||
</div>
|
||
</a-card>
|
||
|
||
<project-detail-modal ref="projectDetail"></project-detail-modal>
|
||
<working-group-member-unit-module ref="modalForm" @ok="modalFormOk"></working-group-member-unit-module>
|
||
<working-group-member-set-charge-notice ref="setChargeNotic"
|
||
@ok="modalFormOk"></working-group-member-set-charge-notice>
|
||
|
||
<email-error-msg-modal ref="emailError"></email-error-msg-modal>
|
||
|
||
<work-group-set-label ref="workGroupSetLabel" @ok="modalFormOk"></work-group-set-label>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||
import JYearDate from '@comp/jero/JYearDate'
|
||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||
import {getWorkingGroupById, dunningReminder, workingGroupEditAccount, getPayConfirmList} from '@api/incomePaymentsApi'
|
||
import StatusSlot from '../../components/tools/StatusSlot'
|
||
import ProjectDetailModal from '../../components/ProjectDetailModal'
|
||
import WorkingGroupMemberUnitModule from './modules/WorkingGroupMemberUnitModule'
|
||
import WorkingGroupMemberSetChargeNotice from './modules/WorkingGroupMemberSetChargeNotice'
|
||
import Vue from 'vue'
|
||
import { ACCESS_TOKEN } from '../../store/mutation-types'
|
||
import PreviewFile from '../../components/jero/PreviewFile'
|
||
import EmailErrorMsgModal from './modules/EmailErrorMsgModal'
|
||
import WorkGroupSetLabel from './modules/WorkGroupSetLabel'
|
||
import { formatMoney } from '../../utils/formatMoney'
|
||
import {YesOrNoEnums} from '@/enums/commonEnums'
|
||
import { MonthRangeMixin } from '../../mixins/MonthRangeMixins'
|
||
import { getAction } from '../../api/manage'
|
||
import JMonthDate from '../../components/tools/JMonthDate'
|
||
|
||
// eslint-disable-next-line no-undef,no-unused-vars
|
||
const Base64 = require('js-base64').Base64
|
||
|
||
export default {
|
||
name: 'WorkingGroupMemberUnitMaintenance',
|
||
components: {
|
||
JYearDate,
|
||
PageHeaderTitle,
|
||
StatusSlot,
|
||
ProjectDetailModal,
|
||
WorkingGroupMemberUnitModule,
|
||
WorkingGroupMemberSetChargeNotice,
|
||
PreviewFile,
|
||
EmailErrorMsgModal,
|
||
WorkGroupSetLabel,
|
||
JMonthDate
|
||
},
|
||
mixins: [JeroListMixin, MonthRangeMixin],
|
||
computed: {
|
||
importExcelUrl: function () {
|
||
return `${ window._CONFIG['domianURL'] }/${ this.url.importExcelUrl }`
|
||
}
|
||
},
|
||
data() {
|
||
return {
|
||
disableMixinCreated: true,
|
||
workingGroupProject: '',
|
||
workingGroupProjectId: '',
|
||
spinning: false,
|
||
detailTitleList: [
|
||
{
|
||
title: '工作组项目名称',
|
||
fieldName: 'workingGroupProject'
|
||
}, {
|
||
title: '负责人A',
|
||
fieldName: 'principalNameA'
|
||
}, {
|
||
title: '负责人B',
|
||
fieldName: 'principalNameB'
|
||
}, {
|
||
title: '每年召开次数',
|
||
fieldName: 'convokeNum'
|
||
}, {
|
||
title: '运行周期',
|
||
fieldName: 'operationCycle'
|
||
}, {
|
||
title: '本年应收款A',
|
||
fieldName: 'yearChargeA'
|
||
}, {
|
||
title: '收费通知号A',
|
||
fieldName: 'chargeNoticeNoA'
|
||
}, {
|
||
title: '收费通知A',
|
||
fieldName: 'chargeNoticeAId'
|
||
}, {
|
||
title: '本年应收款B',
|
||
fieldName: 'yearChargeB'
|
||
}, {
|
||
title: '收费通知号B',
|
||
fieldName: 'chargeNoticeNoB'
|
||
}, {
|
||
title: '收费通知B',
|
||
fieldName: 'chargeNoticeBId'
|
||
}
|
||
],
|
||
labelCol: {
|
||
xs: { span: 24 },
|
||
sm: { span: 5 }
|
||
},
|
||
wrapperCol: {
|
||
xs: { span: 24 },
|
||
sm: { span: 10 }
|
||
},
|
||
url: {
|
||
list: '/project/payWorkingGroupSubitem/list',
|
||
delete: '/project/payWorkingGroupSubitem/delete',
|
||
deleteBatch: '/project/payWorkingGroupSubitem/deleteBatch',
|
||
exportXlsUrl: '/project/payWorkingGroupSubitem/exportXls',
|
||
importExcelUrl: '/project/payWorkingGroupSubitem/importExcel',
|
||
downTemplateUrl: '/project/payWorkingGroupSubitem/downloadExcelModel',
|
||
// 确认凭证
|
||
confirmVoucher: '/project/payWorkingGroupSubitem/confirmVoucher'
|
||
},
|
||
columns: [
|
||
{
|
||
title: '序号',
|
||
dataIndex: '',
|
||
key: 'rowIndex',
|
||
width: 60,
|
||
align: 'center',
|
||
customRender: function (t, r, index) {
|
||
return parseInt(index) + 1
|
||
}
|
||
}, {
|
||
title: '成员单位',
|
||
align: 'center',
|
||
width: 280,
|
||
dataIndex: 'chargeCompanyTemporaryName',
|
||
scopedSlots: { customRender: 'projectName' }
|
||
}, {
|
||
title: '企业联系人',
|
||
align: 'center',
|
||
width: 120,
|
||
dataIndex: 'contactsTemporaryNameOne',
|
||
scopedSlots: { customRender: 'text' }
|
||
}, {
|
||
title: '待确收金额',
|
||
align: 'center',
|
||
dataIndex: 'receivableAmount',
|
||
width: 180,
|
||
scopedSlots: {customRender: 'allMoney'},
|
||
// customRender: (text, record) => (
|
||
// <j-ellipsis value={ record.receivableAmount + '元' } length={ 15 }></j-ellipsis>
|
||
// )
|
||
}, {
|
||
title: '实收金额',
|
||
align: 'center',
|
||
dataIndex: 'paidAmount',
|
||
width: 180,
|
||
scopedSlots: {customRender: 'allMoney'},
|
||
// customRender: (text, record) => (
|
||
// <j-ellipsis value={ record.paidAmount + '元' } length={ 15 }></j-ellipsis>
|
||
// )
|
||
}, {
|
||
title: '标签名称',
|
||
align: 'center',
|
||
dataIndex: 'label',
|
||
width: 100,
|
||
scopedSlots: { customRender: 'text' }
|
||
}, {
|
||
title: '预估到账日期',
|
||
align: 'center',
|
||
width: 140,
|
||
dataIndex: 'estimatedArrivalDate',
|
||
scopedSlots: { customRender: 'text' }
|
||
}, {
|
||
// 2021-10-22需求变更新加
|
||
title: '收费通知号',
|
||
align: 'center',
|
||
width: 280,
|
||
dataIndex: 'chargeNoticeNo',
|
||
scopedSlots: { customRender: 'text' }
|
||
}, {
|
||
title: '打包',
|
||
align: 'center',
|
||
fixed: 'right',
|
||
width: 80,
|
||
dataIndex: 'pack',
|
||
scopedSlots: { customRender: 'status-pack' }
|
||
},
|
||
{
|
||
title: '确认凭证',
|
||
align: 'center',
|
||
fixed: 'right',
|
||
dataIndex: 'confirmVoucher',
|
||
width: 100,
|
||
scopedSlots: { customRender: 'status-pack' }
|
||
},
|
||
{
|
||
title: '审核',
|
||
align: 'center',
|
||
fixed: 'right',
|
||
dataIndex: 'checkPaymentStatus',
|
||
width: 100,
|
||
scopedSlots: { customRender: 'status-pack' }
|
||
},
|
||
{
|
||
title: '需要发票',
|
||
align: 'center',
|
||
fixed: 'right',
|
||
width: 80,
|
||
dataIndex: 'needInvoice',
|
||
scopedSlots: { customRender: 'status-needInvoice' }
|
||
}, {
|
||
title: '到账',
|
||
align: 'center',
|
||
fixed: 'right',
|
||
width: 80,
|
||
dataIndex: 'inAccount',
|
||
scopedSlots: { customRender: 'status' }
|
||
}, {
|
||
title: '开票',
|
||
align: 'center',
|
||
fixed: 'right',
|
||
width: 80,
|
||
dataIndex: 'makeInvoice',
|
||
scopedSlots: { customRender: 'status-bill' }
|
||
}, {
|
||
title: '确收',
|
||
align: 'center',
|
||
fixed: 'right',
|
||
width: 80,
|
||
dataIndex: 'affirmIncome',
|
||
scopedSlots: { customRender: 'status-confirm' }
|
||
}, {
|
||
title: '操作',
|
||
dataIndex: 'action',
|
||
align: 'center',
|
||
fixed: 'right',
|
||
width: 220,
|
||
scopedSlots: { customRender: 'action' }
|
||
}
|
||
],
|
||
workingGroupDetail: {},
|
||
chargeNoticeList: [], // 收费通知号选项
|
||
importParam: {},
|
||
// 给定当年作为来款年份默认查询条件
|
||
// queryParam: {
|
||
// paymentDate: new Date().getFullYear().toString()
|
||
// },
|
||
// lastQueryParam: {
|
||
// paymentDate: new Date().getFullYear().toString()
|
||
// },
|
||
canOperate: true // 是否可操作(负责人B不可操作)
|
||
}
|
||
},
|
||
created() {
|
||
// 初始化工作组信息
|
||
this.initWorkGroupData()
|
||
},
|
||
methods: {
|
||
formatMoney,
|
||
getPayConfirmList,
|
||
// 是否可以调账
|
||
isAllowEditAccount (record) {
|
||
const { receivableAmount, mail, inAccount, makeInvoice } = record
|
||
// 待确收金额为0,已开票、已到账、已邮寄,满足其一不可以操作
|
||
return (receivableAmount === '0.00') || (mail !== 0) || (inAccount !== 0) || (makeInvoice !== 0)
|
||
},
|
||
// 调账
|
||
handleEditAccount (record) {
|
||
this.$confirm({
|
||
title: '确认调账',
|
||
content: '是否调账数据?',
|
||
onOk: () => {
|
||
this.loading = true
|
||
const params = {
|
||
id: record.id,
|
||
companyId: record.chargeCompanyId,
|
||
workGroupId: this.workingGroupProjectId
|
||
}
|
||
workingGroupEditAccount(params).then(res => {
|
||
if (res.success) {
|
||
this.$message.success(res.message)
|
||
this.modalFormOk()
|
||
} else {
|
||
this.$message.warning(res.message)
|
||
}
|
||
}).finally(() => {
|
||
this.loading = false
|
||
})
|
||
}
|
||
})
|
||
},
|
||
/**
|
||
* 初始化工作组信息
|
||
*/
|
||
initWorkGroupData() {
|
||
this.spinning = true
|
||
this.workingGroupProject = this.$route.query.workingGroupProject || ''
|
||
this.workingGroupProjectId = this.$route.query.workingGroupProjectId || ''
|
||
this.canOperate = this.$route.query.canOperate === 'true' ? true : false
|
||
this.filters.workingGroupId = this.workingGroupProjectId
|
||
this.importParam.workGroupId = this.workingGroupProjectId
|
||
this.loadData()
|
||
let param = {
|
||
id: this.workingGroupProjectId
|
||
}
|
||
getWorkingGroupById(param).then(res => {
|
||
if (res.success) {
|
||
this.workingGroupDetail = res.result || {}
|
||
}
|
||
}).finally(() => {
|
||
this.spinning = false
|
||
})
|
||
},
|
||
|
||
handleAdd: function () {
|
||
this.getChargeNoticeList()
|
||
this.$refs.modalForm.workingGroupId = this.workingGroupProjectId
|
||
this.$refs.modalForm.chargeNoticeList = this.chargeNoticeList
|
||
// 是否显示金额字段
|
||
this.$refs.modalForm.showPayField = (this.workingGroupDetail.payFlag + '') !== YesOrNoEnums.no.value
|
||
this.$refs.modalForm.add()
|
||
this.$refs.modalForm.title = '添加成员'
|
||
this.$refs.modalForm.disableSubmit = false
|
||
},
|
||
handleEdit: function (record) {
|
||
this.getChargeNoticeList()
|
||
this.$refs.modalForm.workingGroupId = this.workingGroupProjectId
|
||
this.$refs.modalForm.chargeNoticeList = this.chargeNoticeList
|
||
// 是否显示金额字段
|
||
this.$refs.modalForm.showPayField = (this.workingGroupDetail.payFlag + '') !== YesOrNoEnums.no.value
|
||
this.$refs.modalForm.edit(record)
|
||
this.$refs.modalForm.title = '编辑'
|
||
this.$refs.modalForm.disableSubmit = false
|
||
},
|
||
/**
|
||
* 获取收费通知列表
|
||
*/
|
||
getChargeNoticeList() {
|
||
this.chargeNoticeList = []
|
||
let chargeNoticeA, chargeNoticeB
|
||
// 是否存在收费通知A
|
||
if (this.workingGroupDetail.chargeNoticeNoA && this.workingGroupDetail.chargeNoticeNoA !== '') {
|
||
chargeNoticeA = {
|
||
type: 'chargeNoticeA',
|
||
label: `A:${ this.workingGroupDetail.chargeNoticeNoA }`,
|
||
value: this.workingGroupDetail.chargeNoticeNoA,
|
||
key: this.workingGroupDetail.chargeA,
|
||
yearCharge: this.workingGroupDetail.yearChargeA,
|
||
chargeNoticeId: this.workingGroupDetail.chargeNoticeAId
|
||
}
|
||
this.chargeNoticeList.push(chargeNoticeA)
|
||
}
|
||
// 是否存在收费通知B
|
||
if (this.workingGroupDetail.chargeNoticeNoB && this.workingGroupDetail.chargeNoticeNoB !== '') {
|
||
chargeNoticeB = {
|
||
type: 'chargeNoticeB',
|
||
label: `B:${ this.workingGroupDetail.chargeNoticeNoB }`,
|
||
value: this.workingGroupDetail.chargeNoticeNoB,
|
||
key: this.workingGroupDetail.chargeB,
|
||
yearCharge: this.workingGroupDetail.yearChargeB,
|
||
chargeNoticeId: this.workingGroupDetail.chargeNoticeBId
|
||
}
|
||
this.chargeNoticeList.push(chargeNoticeB)
|
||
}
|
||
},
|
||
/**
|
||
* 设置收费通知
|
||
*/
|
||
setChargeNotic() {
|
||
if (!this.workingGroupDetail.chargeNoticeNoA && !this.workingGroupDetail.chargeNoticeNoB) {
|
||
this.$message.warn('请先补充该工作组的收费通知信息')
|
||
return
|
||
}
|
||
if (this.selectedRowKeys.length === 0) {
|
||
this.$message.warn('请先选择成员')
|
||
return
|
||
}
|
||
// 2022-04-26 变更:不校验来款是否是收费通知
|
||
// let param = {
|
||
// ids: this.selectedRowKeys.join(','),
|
||
// workingGroupId: this.workingGroupProjectId
|
||
// }
|
||
// 判断选中的成员是否存在来款方式非收费通知的
|
||
// getChargeNotice(param).then(res => {
|
||
// if (res.success) {
|
||
this.getChargeNoticeList()
|
||
this.$refs.setChargeNotic.chargeNoticeList = this.chargeNoticeList
|
||
this.$refs.setChargeNotic.selectedRowKeys = this.selectedRowKeys
|
||
this.$refs.setChargeNotic.handleOpen()
|
||
// } else {
|
||
// this.$message.warn(res.message)
|
||
// }
|
||
// })
|
||
},
|
||
/**
|
||
* 催款提醒
|
||
*/
|
||
setDunningReminder() {
|
||
if (this.selectedRowKeys.length === 0) {
|
||
this.$message.warn('请先选择成员')
|
||
return
|
||
}
|
||
let param = {
|
||
projectIds: this.selectedRowKeys.join(',').toString()
|
||
}
|
||
const that = this
|
||
this.$confirm({
|
||
title: '确认催款',
|
||
content: '是否向选中的成员发送催款提醒?',
|
||
onOk: function () {
|
||
that.loading = true
|
||
dunningReminder(param).then((res) => {
|
||
if (res.success) {
|
||
that.$message.success(res.message)
|
||
// 是否有邮件发送失败 有就给出提示信息
|
||
if (Array.isArray(res.result) && res.result.length > 0) {
|
||
// msgWarn(this,res.result,0)
|
||
that.$refs.emailError.open()
|
||
that.$refs.emailError.msgList = res.result
|
||
console.log(that.$refs.emailError.msgList, 'that.$refs.emailError.msgList ')
|
||
}
|
||
that.loadData()
|
||
that.onClearSelected()
|
||
} else {
|
||
that.$message.warning(res.message)
|
||
}
|
||
}).finally(() => {
|
||
that.loading = false
|
||
})
|
||
}
|
||
})
|
||
},
|
||
/**
|
||
* 文件预览
|
||
* @param file
|
||
*/
|
||
previewFile(file) {
|
||
console.log(file)
|
||
if (file && file.url) {
|
||
const fileFullUrl = `${ window._CONFIG['domianWebSocketURL'] }/sys/common/download/${ file.id }?token=${ Vue.ls.get(ACCESS_TOKEN) }&fullfilename=${ file.fileName }`
|
||
// let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
|
||
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
|
||
window.open(url)
|
||
}
|
||
},
|
||
// 设置标签
|
||
setLabel() {
|
||
if (this.selectedRowKeys.length <= 0) {
|
||
this.$message.warning('请选择一条记录!')
|
||
return
|
||
}
|
||
this.$refs.workGroupSetLabel.show(this.selectedRowKeys)
|
||
},
|
||
onDateChange: function (value, dateString) {
|
||
this.queryParam.estimatedArrivalStartDate = dateString[0]
|
||
this.queryParam.estimatedArrivalEndDate = dateString[1]
|
||
},
|
||
// 确认凭证
|
||
confirmVoucher(id) {
|
||
var that = this
|
||
this.$confirm({
|
||
title: '确认',
|
||
content: '确定要确认此条数据凭证吗?',
|
||
onOk: function () {
|
||
getAction(that.url.confirmVoucher, {id: id}).then((res) => {
|
||
if (res.success) {
|
||
that.$message.success(res.message)
|
||
that.loadData()
|
||
} else {
|
||
if (res.message.indexOf('<br/>') > -1) {
|
||
that.messageLineFeed('确认凭证失败', res.message)
|
||
} else {
|
||
that.$message.warning(res.message)
|
||
}
|
||
}
|
||
})
|
||
}
|
||
})
|
||
}
|
||
// 2021 10 11 沟通后去掉了这个功能
|
||
// searchReset() {
|
||
// this.lastQueryParam = {
|
||
// paymentDate: new Date().getFullYear().toString()
|
||
// }
|
||
// this.queryParam = {
|
||
// paymentDate: new Date().getFullYear().toString()
|
||
// }
|
||
// this.loadData(1)
|
||
// },
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style scoped lang="less">
|
||
@import '~@assets/less/common.less';
|
||
|
||
.ant-divider-horizontal {
|
||
height: 1px;
|
||
background-color: #F2F2F2;
|
||
margin: 15px 0px;
|
||
}
|
||
|
||
.work-group-detail {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
padding-bottom: 20px;
|
||
|
||
&-item-small {
|
||
width: 33.3% !important;
|
||
}
|
||
|
||
&-item {
|
||
display: flex;
|
||
padding: 5px 5px;
|
||
width: 100%;
|
||
font-size: 14px;
|
||
|
||
&-title {
|
||
flex-shrink: 0;
|
||
color: #999999;
|
||
}
|
||
|
||
&-content {
|
||
word-break: break-all;
|
||
color: #2F3133;
|
||
}
|
||
|
||
&-filename {
|
||
//cursor: pointer;
|
||
}
|
||
}
|
||
}
|
||
|
||
.table-text {
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
</style>
|