[update] 收入合同项目关联接口联调;支出合同页面
This commit is contained in:
@@ -10,11 +10,29 @@ const publishRemind = (param) => getAction('',param)
|
||||
const getRevenueContractById = (param) => getAction('/contract/payIncomeContract/queryById', param)
|
||||
// 收入合同审核
|
||||
const aduitRevenueContract = (param) => postAction('/contract/payIncomeContract/audit', param)
|
||||
// 收入合同关联项目
|
||||
const associatedProject = (param) => postAction('/contract/payIncomeContract/associated', param)
|
||||
// 收入合同获取关联项目列表
|
||||
const getAssociatedProject = (param) => getAction('/contract/payIncomeContract/getAssociated', param)
|
||||
// 取消关联
|
||||
const cancelAssociatedProject = (param) => postAction('/contract/payIncomeContract/cancelAssociated', param)
|
||||
// 收入合同提交审核
|
||||
const submitAudit = (param) => postAction('/contract/payIncomeContract/submitAudit', param)
|
||||
// 获取全部工作组信息
|
||||
const getWorkingGroupAllList = (param) => getAction('/project/payWorkingGroup/listAll', param)
|
||||
// 收入合同存档
|
||||
const archiveRevenueContract = (param) => postAction('contract/payIncomeContract/archive', param)
|
||||
|
||||
export {
|
||||
getWorkingGroupById,
|
||||
getChargeNotice,
|
||||
publishRemind,
|
||||
getRevenueContractById,
|
||||
aduitRevenueContract
|
||||
aduitRevenueContract,
|
||||
associatedProject,
|
||||
getAssociatedProject,
|
||||
cancelAssociatedProject,
|
||||
submitAudit,
|
||||
getWorkingGroupAllList,
|
||||
archiveRevenueContract
|
||||
}
|
||||
@@ -93,15 +93,7 @@ export default {
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
],
|
||||
dataSource: [
|
||||
{
|
||||
id: 1,
|
||||
companyName: '合众未来'
|
||||
}, {
|
||||
id: 2,
|
||||
companyName: '盛扬信远'
|
||||
}
|
||||
]
|
||||
dataSource: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -100,7 +100,6 @@ export default {
|
||||
if (this.initContacts && this.initContacts.hasOwnProperty.call(this.initContacts, 'id')) {
|
||||
this.contactsList.push(this.initContacts)
|
||||
}
|
||||
console.log(this.contactsList)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -119,6 +119,7 @@ export default {
|
||||
if (record && record.length > 0) {
|
||||
this.installmentList = record
|
||||
} else {
|
||||
this.installmentList = [this.defaultFormData]
|
||||
record = [this.defaultFormData]
|
||||
}
|
||||
let obj = {}
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
<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 :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入合同编号" v-model="queryParam.contractNum"></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">
|
||||
<a-input placeholder="请输入合同名称" v-model="queryParam.contractName"></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-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">查询</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">新增</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
|
||||
@change="handleImportExcel">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('企业管理')">导出</a-button>
|
||||
<a-button type="primary" icon="download" @click="downTemplate('企业管理导入模板')">下载模板</a-button>
|
||||
<a-button type="danger" icon="delete" @click="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="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
<a @click="handleDelete(record.id)">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
</a-card>
|
||||
</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'
|
||||
|
||||
export default {
|
||||
name: 'ExpenditureContractList',
|
||||
components: { PageHeaderTitle, JDate },
|
||||
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: 250,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '合同名称',
|
||||
align: 'center',
|
||||
dataIndex: 'contractName',
|
||||
width: 250
|
||||
}, {
|
||||
title: '签订单位',
|
||||
align: 'center',
|
||||
dataIndex: 'signedCompanyTemporaryName',
|
||||
width: 250,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '负责人',
|
||||
align: 'center',
|
||||
dataIndex: 'principalName',
|
||||
width: 250,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '合同总金额',
|
||||
align: 'center',
|
||||
dataIndex: 'contractAmount',
|
||||
width: 250,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
dataIndex: 'createTime',
|
||||
width: 250
|
||||
}, {
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 200,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '',
|
||||
delete: '',
|
||||
deleteBatch: '',
|
||||
exportXlsUrl: '',
|
||||
importExcelUrl: '',
|
||||
downTemplateUrl: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleAdd() {
|
||||
this.$router.push({
|
||||
path: '/contractManagement/RevenueContractModule'
|
||||
})
|
||||
},
|
||||
handleEdit(id, contractNum) {
|
||||
this.$router.push({
|
||||
path: '/contractManagement/RevenueContractModule',
|
||||
query: {
|
||||
contractId: id,
|
||||
contractNum: contractNum
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
+509
@@ -0,0 +1,509 @@
|
||||
<template>
|
||||
<div>
|
||||
<page-header-title :is-level-one="false" :level-two-title="title"></page-header-title>
|
||||
<a-card :bordered="false">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<!-- 主体信息-->
|
||||
<div>
|
||||
<div class="part-title">
|
||||
<div class="part-title-text">主体信息</div>
|
||||
</div>
|
||||
<a-row>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入合同编号"
|
||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||
:maxLength='50'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="合同名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入合同名称"
|
||||
v-decorator="['contractName',validatorRules.contractName]"
|
||||
:maxLength='50'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<company-select placeholder="请选择签订单位"
|
||||
v-decorator="['signedCompany',validatorRules.signedCompany]"
|
||||
@change="handleSignedCompanyChange"></company-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="签订联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-contacts placeholder="请选择签订联系人"
|
||||
:selected-company="selectedCompany"
|
||||
:init-contacts="selectedContact"
|
||||
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="是否开口" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag v-decorator="['opening']"
|
||||
:triggerChange="true"
|
||||
placeholder="请选择是否开口"
|
||||
dictCode="yn"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-principal placeholder="请选择负责人"
|
||||
v-decorator="['principalId',validatorRules.principalId]"
|
||||
@change="principalChange"></select-principal>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="部门名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入部门名称"
|
||||
v-decorator="['departmentName']"
|
||||
:disabled="true"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="签订合同总金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入签订合同总金额"
|
||||
v-decorator="['contractAmount',validatorRules.contractAmount]"
|
||||
:maxLength='50'
|
||||
@change="contractAmountChange"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="税率" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入税率"
|
||||
v-decorator="['rate',validatorRules.rate]"
|
||||
:maxLength='50'
|
||||
@change="rateChange"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="未税金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入未税金额"
|
||||
v-decorator="['noTaxAmount']"
|
||||
:maxLength='50'
|
||||
:disabled="true"
|
||||
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<!-- /主体信息-->
|
||||
<a-divider></a-divider>
|
||||
<!-- 日期节点-->
|
||||
<div>
|
||||
<div class="part-title">
|
||||
<div class="part-title-text">日期节点</div>
|
||||
</div>
|
||||
<a-row :gutter="30">
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="合同签订日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-date placeholder="请选择合同签订日期"
|
||||
style="width: 100%;"
|
||||
v-decorator="['contractDate']"
|
||||
:trigger-change="true"
|
||||
date-format="YYYY-MM-DD"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="合同终止日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-date placeholder="请选择合同终止日期"
|
||||
style="width: 100%;"
|
||||
v-decorator="['terminationDate']"
|
||||
:trigger-change="true"
|
||||
date-format="YYYY-MM-DD"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="合同约定主要时点" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-date placeholder="请选择合同约定主要时点"
|
||||
style="width: 100%;"
|
||||
v-decorator="['contractTimePoints']"
|
||||
:trigger-change="true"
|
||||
date-format="YYYY-MM-DD"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<!-- /日期节点-->
|
||||
<a-divider></a-divider>
|
||||
<!-- 账款信息-->
|
||||
<div>
|
||||
<div class="part-title">
|
||||
<div class="part-title-text">账款信息</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-row :gutter="30">
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="应收金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入应收金额"
|
||||
v-decorator="['accountsReceivableAmount',validatorRules.accountsReceivableAmount]"
|
||||
:maxLength='50'
|
||||
@change="accountsReceivableChange"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="已收金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入已收金额"
|
||||
v-decorator="['amountReceived',validatorRules.amountReceived]"
|
||||
:maxLength='50'
|
||||
@change="amountReceivedChange"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="未收金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入未收金额"
|
||||
:maxLength='50'
|
||||
v-decorator="['outstandingAmount']"
|
||||
:disabled="true"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="赊账状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag v-decorator="['accountStatus']"
|
||||
:triggerChange="true"
|
||||
placeholder="请选择赊账状态"
|
||||
dictCode="revenue_contract_account_status"
|
||||
:disabled="true"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /账款信息-->
|
||||
<a-divider></a-divider>
|
||||
<!-- 其他-->
|
||||
<div>
|
||||
<div class="part-title">
|
||||
<div class="part-title-text">其他信息</div>
|
||||
</div>
|
||||
<div>
|
||||
<a-row :gutter="30">
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="合同约定付款次数" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入合同约定付款次数"
|
||||
v-decorator="['contractPaymentTimes']"
|
||||
:maxLength='50'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="是否打包" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag v-decorator="['pack', validatorRules.pack]"
|
||||
:triggerChange="true"
|
||||
placeholder="请选择是否打包"
|
||||
dictCode="yn"
|
||||
@change="packageChange"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="打包年份" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="isPackage">
|
||||
<j-year-date style="width:100%"
|
||||
placeholder="请选择打包年份"
|
||||
v-decorator="['packYear',validatorRules.packYear]"></j-year-date>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /其他-->
|
||||
<a-divider></a-divider>
|
||||
<!-- 分期信息-->
|
||||
<div>
|
||||
<div class="part-title">
|
||||
<div class="part-title-text">分期信息</div>
|
||||
</div>
|
||||
<installment-form ref="installmentForm" @ok="installmentFormOk"></installment-form>
|
||||
</div>
|
||||
<!-- /分期信息-->
|
||||
<a-form-item class="table-operator">
|
||||
<a-button type="primary" @click="handleSave">保存</a-button>
|
||||
<a-button @click="handleCancle">取消</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PageHeaderTitle from '../../../../components/layouts/PageHeaderTitle'
|
||||
import { getRevenueContractById } from '../../../../api/incomePaymentsApi'
|
||||
import pick from 'lodash.pick'
|
||||
import InstallmentForm from '../../../../components/form/InstallmentForm'
|
||||
import CompanySelect from '../../../../components/company/CompanySelect'
|
||||
import SelectContacts from '../../../../components/company/SelectContacts'
|
||||
import SelectPrincipal from '../../../../components/company/SelectPrincipal'
|
||||
import { getAllUserList } from '../../../../api/api'
|
||||
import { postAction } from '../../../../api/manage'
|
||||
import JDate from '../../../../components/tools/JDate'
|
||||
import JYearDate from '../../../../components/jero/JYearDate'
|
||||
|
||||
export default {
|
||||
name: 'ExpenditureContractModule',
|
||||
components: { PageHeaderTitle, InstallmentForm, CompanySelect, SelectContacts, SelectPrincipal, JDate, JYearDate },
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
contractId: '',
|
||||
form: this.$form.createForm(this),
|
||||
confirmLoading: false,
|
||||
model: {},
|
||||
selectedCompany: null,
|
||||
selectedContact: null,
|
||||
rateNum: null,
|
||||
contractAmountNum: null,
|
||||
amountReceivedNum: null,
|
||||
accountsReceivableNum: null,
|
||||
isPackage: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 10 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 14 }
|
||||
},
|
||||
validatorRules: {
|
||||
contractNum: {
|
||||
rules: [{ required: true, validator: this.checkContractNum }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
contractName: {
|
||||
rules: [{ required: true, validator: this.checkContractName }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
signedCompany: {
|
||||
rules: [{ required: true, message: '请选择签订单位' }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
signedContactsId: {
|
||||
rules: [{ required: true, message: '请选择签订联系人' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
principalId: {
|
||||
rules: [{ required: true, message: '请选择负责人' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
contractAmount: {
|
||||
rules: [{ required: true, message: '请输入签订合同总金额' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
rate: {
|
||||
rules: [{ required: true, message: '请输入税率' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
accountsReceivableAmount: {
|
||||
rules: [{ required: true, message: '请输入应收金额' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
amountReceived: {
|
||||
rules: [{ required: true, message: '请输入已收金额' }],
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
pack: {
|
||||
rules: [{ required: true, message: '请选择是否打包' }],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.hasOwnProperty.call(this.$route.query, 'contractId')) {
|
||||
this.contractId = this.$route.query.contractId
|
||||
this.edit(this.contractId)
|
||||
} else {
|
||||
this.add()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
this.title = '新建支出合同'
|
||||
this.$refs.installmentForm.initInstallmentList([])
|
||||
},
|
||||
edit(id) {
|
||||
this.title = '编辑支出合同'
|
||||
this.confirmLoading = true
|
||||
const param = {
|
||||
id: id
|
||||
}
|
||||
getRevenueContractById(param).then(res => {
|
||||
let record
|
||||
record = res.result
|
||||
this.isSaved = true
|
||||
record.signedCompany = {
|
||||
id: record.signedCompanyId,
|
||||
companyName: record.signedCompanyTemporaryName
|
||||
}
|
||||
this.selectedCompany = record.signedCompany
|
||||
record.signedContactsId = record.signedContactsTemporaryId
|
||||
this.selectedContact = {
|
||||
id: record.signedContactsTemporaryId,
|
||||
name: record.signedContactsTemporaryName
|
||||
}
|
||||
this.$refs.installmentForm.initInstallmentList(record.listInstallment)
|
||||
this.model = Object.assign({}, record)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'contractNum', 'contractName', 'signedCompany', 'signedContactsId', 'opening', 'principalId', 'departmentName', 'contractAmount', 'rate', 'noTaxAmount', 'contractDate', 'terminationDate', 'contractTimePoints', 'accountsReceivableAmount', 'amountReceived', 'outstandingAmount', 'accountStatus', 'contractPaymentTimes', 'pack', 'packYear'))
|
||||
this.confirmLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 表单提交
|
||||
*/
|
||||
handleSave() {
|
||||
// 验证分期信息
|
||||
this.$refs.installmentForm.handleSave()
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.confirmLoading = true
|
||||
if (this.installmentList && this.installmentList.length > 0) {
|
||||
let formData = {}
|
||||
values.signedCompanyId = values.signedCompany.id
|
||||
delete values.signedCompany
|
||||
formData.installment = this.installmentList
|
||||
formData.contract = Object.assign(this.model, values)
|
||||
console.log('表单提交数据', formData)
|
||||
let url = ''
|
||||
if (!this.model.id) {
|
||||
url = this.url.add
|
||||
} else {
|
||||
url = this.url.edit
|
||||
}
|
||||
postAction(url, formData).then(res => {
|
||||
if (res.success) {
|
||||
this.contractId = res.result.id
|
||||
this.edit(this.contractId)
|
||||
this.$message.success(res.message)
|
||||
// 保存上方表单信息,(应该在表单验证完全正确时置为true)
|
||||
this.isSaved = true
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancle() {
|
||||
this.model = {}
|
||||
},
|
||||
installmentFormOk(value) {
|
||||
this.installmentList = value.installmentList
|
||||
},
|
||||
/**
|
||||
* 选中企业变化
|
||||
* @param value
|
||||
*/
|
||||
handleSignedCompanyChange(value) {
|
||||
this.selectedCompany = value
|
||||
this.model.signedContactsId = undefined
|
||||
},
|
||||
/**
|
||||
* 负责人变化获取部门信息回显至部门名称
|
||||
* @param value
|
||||
*/
|
||||
principalChange(value) {
|
||||
let param = {
|
||||
id: value
|
||||
}
|
||||
getAllUserList(param).then(res => {
|
||||
this.model.departmentName = res.result[0].orgCodeTxt
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'departmentName'))
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 总签订金额修改
|
||||
* @param e
|
||||
*/
|
||||
contractAmountChange(e) {
|
||||
e.target.value = (e.target.value.replace(/[^0-9.]/g, '')).trim()
|
||||
this.contractAmountNum = e.target.value
|
||||
this.calculateNoTaxAmount()
|
||||
},
|
||||
/**
|
||||
* 税率修改
|
||||
* @param e
|
||||
*/
|
||||
rateChange(e) {
|
||||
e.target.value = (e.target.value.replace(/[^0-9.]/g, '')).trim()
|
||||
this.rateNum = e.target.value
|
||||
this.calculateNoTaxAmount()
|
||||
},
|
||||
/**
|
||||
* 计算未税金额
|
||||
*/
|
||||
calculateNoTaxAmount() {
|
||||
if (this.rateNum !== null && this.contractAmountNum !== null) {
|
||||
this.model.noTaxAmount = Number(this.contractAmountNum) / (1 + Number(this.rateNum))
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'noTaxAmount'))
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 应收金额输入
|
||||
* @param value
|
||||
*/
|
||||
accountsReceivableChange(e) {
|
||||
e.target.value = (e.target.value.replace(/[^0-9.]/g, '')).trim()
|
||||
this.accountsReceivableNum = e.target.value
|
||||
this.calculateOutstandingAmount()
|
||||
},
|
||||
/**
|
||||
* 已收金额输入
|
||||
* @param value
|
||||
*/
|
||||
amountReceivedChange(e) {
|
||||
e.target.value = (e.target.value.replace(/[^0-9.]/g, '')).trim()
|
||||
this.amountReceivedNum = e.target.value
|
||||
this.calculateOutstandingAmount()
|
||||
},
|
||||
/**
|
||||
* 计算未收金额和赊账状态
|
||||
*/
|
||||
calculateOutstandingAmount() {
|
||||
if (this.accountsReceivableNum !== null && this.amountReceivedNum !== null) {
|
||||
this.model.outstandingAmount = Number(this.accountsReceivableNum) - Number(this.amountReceivedNum)
|
||||
if (this.model.outstandingAmount === 0) {
|
||||
this.model.accountStatus = '3'
|
||||
} else if (this.model.outstandingAmount > 0 && this.model.outstandingAmount < Number(this.accountsReceivableNum)) {
|
||||
this.model.accountStatus = '2'
|
||||
} else if (this.model.outstandingAmount === Number(this.accountsReceivableNum)) {
|
||||
this.model.accountStatus = '1'
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'outstandingAmount', 'accountStatus'))
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 打包状态修改
|
||||
*/
|
||||
packageChange(value) {
|
||||
if (value === '1') {
|
||||
this.isPackage = true
|
||||
} else {
|
||||
this.isPackage = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.ant-divider-horizontal {
|
||||
margin: 20px 0;
|
||||
}
|
||||
</style>
|
||||
@@ -22,6 +22,12 @@
|
||||
</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.status" placeholder="请选择合同状态"
|
||||
dictCode="revenue_contract_status"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="10" :lg="11" :md="12" :sm="24">
|
||||
<a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-date
|
||||
placeholder="请选择开始日期"
|
||||
@@ -40,18 +46,12 @@
|
||||
</j-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.status" placeholder="请选择合同状态"
|
||||
dictCode="revenue_contract_status"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="7" :lg="7" :md="9" :sm="24">
|
||||
<a-col :xl="7" :lg="8" :md="9" :sm="24">
|
||||
<a-form-item label="来款状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-checkbox-group v-model="queryParam.chargeUse" :options="incomePaymentsStatus"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
|
||||
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||
@@ -89,10 +89,17 @@
|
||||
|
||||
<!-- 项目名称 待审核状态为红色-->
|
||||
<template slot="projectName" slot-scope="text, record">
|
||||
<div @click="toRevenueContractDetail(record.id, record.contractNum)"
|
||||
v-if="record.status === 2 || record.status === 4">{{ text }}
|
||||
</div>
|
||||
<div class="primary-color" @click="toRevenueContractDetail(record.id)" v-else>{{ text }}</div>
|
||||
<j-ellipsis
|
||||
@click="toRevenueContractDetail(record.id, record.contractNum)"
|
||||
v-if="record.status === 2 || record.status === 4"
|
||||
:value="text"
|
||||
:length="20"></j-ellipsis>
|
||||
<j-ellipsis
|
||||
class="primary-color"
|
||||
@click="toRevenueContractDetail(record.id)"
|
||||
v-else
|
||||
:value="text"
|
||||
:length="20"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
@@ -100,9 +107,9 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleAudit(record.id)" v-if="record.status === 2 || record.status === 4">审核</a>
|
||||
<a @click="handleAudit(record.id)" v-if="record.status === 2">审核</a>
|
||||
<a @click="handleEdit(record.id, record.contractNum)"
|
||||
v-if="record.status === 1 || record.status === 2 || record.status === 4">编辑</a>
|
||||
v-if="record.status === 1 || record.status === 4">编辑</a>
|
||||
<a @click="handleArchive(record.id)" v-if="record.status === 3">存档</a>
|
||||
<a @click="handleDelete(record.id)"
|
||||
v-if="record.status === 1 || record.status === 2 || record.status === 4">删除</a>
|
||||
@@ -111,7 +118,7 @@
|
||||
</a-table>
|
||||
</div>
|
||||
</a-card>
|
||||
<revenue-contract-aduit-module ref="aduitForm" @ok="aduitOk"></revenue-contract-aduit-module>
|
||||
<revenue-contract-aduit-module ref="aduitForm" @ok="modalFormOk"></revenue-contract-aduit-module>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -122,6 +129,7 @@ import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
||||
import RevenueContractAduitModule from './modules/RevenueContractAduitModule'
|
||||
import JDate from '../../../components/tools/JDate'
|
||||
import { RangeDateMixin } from '../../../mixins/RangeDateMixin'
|
||||
import { archiveRevenueContract } from '../../../api/incomePaymentsApi'
|
||||
|
||||
export default {
|
||||
name: 'RevenueContractList',
|
||||
@@ -291,23 +299,22 @@ export default {
|
||||
onOk: function () {
|
||||
that.loading = true
|
||||
that.loading = false
|
||||
// getAction(that.url.deleteBatch, {ids: ids}).then((res) => {
|
||||
// if (res.success) {
|
||||
// that.$message.success(res.message)
|
||||
// // 判断当前删除的数据是否是最后一页的全部数据,如果是的话页码减一
|
||||
// if (that.ipagination.current > 1 && (that.ipagination.current === Math.ceil(that.ipagination.total / that.ipagination.pageSize)) &&
|
||||
// that.selectedRowKeys.length === that.dataSource.length
|
||||
// ) {
|
||||
// that.ipagination.current -= 1
|
||||
// }
|
||||
// that.loadData()
|
||||
// that.onClearSelected()
|
||||
// } else {
|
||||
// that.$message.warning(res.message)
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// that.loading = false
|
||||
// })
|
||||
let param = {
|
||||
contractId: id,
|
||||
contractStatus: 5
|
||||
}
|
||||
archiveRevenueContract(param).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
// 判断当前删除的数据是否是最后一页的全部数据,如果是的话页码减一
|
||||
that.loadData()
|
||||
that.onClearSelected()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
<template>
|
||||
<div >
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:pagination="false"
|
||||
:columns="columns"
|
||||
:scroll="{x: 1500}"
|
||||
:dataSource="associatedProjectDataSource"
|
||||
:loading="associatedProjectLoading"
|
||||
class="j-table-force-nowrap associated-project">
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="20"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record" v-if="canOperate">
|
||||
<a @click="unlinkProject(record)">取消关联</a>
|
||||
</span>
|
||||
</a-table>
|
||||
|
||||
<a-button type="primary" @click="submitAduit" :loading="associatedProjectLoading" v-if="canOperate">提交审核</a-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { cancelAssociatedProject, getAssociatedProject, submitAudit } from '../../../../api/incomePaymentsApi'
|
||||
|
||||
export default {
|
||||
name: 'AssociatedProject',
|
||||
props: {
|
||||
// 合同id
|
||||
contractId: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
// 是否可以操作,详情页面不可操作则隐藏按钮
|
||||
canOperate: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 关联项目列表数据
|
||||
associatedProjectColumns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
}, {
|
||||
title: '来款项目',
|
||||
align: 'center',
|
||||
dataIndex: 'chargeProject',
|
||||
width: 250
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
dataIndex: 'chargeUse_dictText',
|
||||
width: 250
|
||||
}, {
|
||||
title: '来款单位',
|
||||
align: 'center',
|
||||
dataIndex: 'chargeCompanyName',
|
||||
width: 250
|
||||
}, {
|
||||
title: '应收金额',
|
||||
align: 'center',
|
||||
dataIndex: 'receivableAmount',
|
||||
width: 250
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
dataIndex: 'paidAmount',
|
||||
width: 250
|
||||
}, {
|
||||
title: '负责人',
|
||||
align: 'center',
|
||||
dataIndex: 'principalName',
|
||||
width: 250
|
||||
}, {
|
||||
title: '企业联系人',
|
||||
align: 'center',
|
||||
dataIndex: 'contactsName',
|
||||
width: 250
|
||||
}, {
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
dataIndex: 'createTime',
|
||||
width: 250
|
||||
}, {
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 160,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
associatedProjectDataSource: [],
|
||||
associatedProjectLoading: false, // 关联项目表格加载
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
columns() {
|
||||
if (this.canOperate) {
|
||||
return this.associatedProjectColumns
|
||||
} else {
|
||||
return this.associatedProjectColumns.filter(tt => tt.dataIndex !== 'action')
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadAssociatedProject()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 取消关联
|
||||
* @param id
|
||||
*/
|
||||
unlinkProject(record) {
|
||||
console.log(record)
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: '确认取消关联',
|
||||
content: '确定取消关联该项目吗?如果是创建的打包项目,那么也会取消打包。',
|
||||
onOk: function () {
|
||||
that.associatedProjectLoading = true
|
||||
const param = {
|
||||
id: record.id,
|
||||
contractId: that.contractId
|
||||
}
|
||||
cancelAssociatedProject(param).then(res => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
} else {
|
||||
that.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.associatedProjectLoading = false
|
||||
that.loadAssociatedProject()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取关联项目列表
|
||||
*/
|
||||
loadAssociatedProject() {
|
||||
const param = {
|
||||
contractId: this.contractId
|
||||
}
|
||||
if (!this.canOperate) {
|
||||
this.associatedProjectColumns.filter(item => item.dataIndex !== 'action')
|
||||
}
|
||||
this.associatedProjectLoading = true
|
||||
getAssociatedProject(param).then(res => {
|
||||
if (res.success) {
|
||||
this.associatedProjectDataSource = res.result
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.associatedProjectLoading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 提交审核
|
||||
*/
|
||||
submitAduit() {
|
||||
if (this.associatedProjectDataSource.length === 0) {
|
||||
this.$message.warn('请至少关联一个项目')
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
this.associatedProjectLoading = true
|
||||
const param = {
|
||||
id: this.contractId,
|
||||
status: 2
|
||||
}
|
||||
submitAudit(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$router.go(-1)
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
this.associatedProjectLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.associated-project {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
+30
-5
@@ -17,12 +17,12 @@
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="审核" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-radio-group v-decorator="['contractStatus', validatorRules.contractStatus]">
|
||||
<a-radio :value="0">通过</a-radio>
|
||||
<a-radio :value="1">拒绝</a-radio>
|
||||
<a-radio-group v-decorator="['contractStatus', validatorRules.contractStatus]" @change="contractAuditStatuChange">
|
||||
<a-radio :value="3">通过</a-radio>
|
||||
<a-radio :value="4">拒绝</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="拒绝说明" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-form-item label="拒绝说明" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="showExplainRemarks">
|
||||
<a-textarea
|
||||
placeholder="请输入拒绝说明"
|
||||
v-decorator="['explainRemarks', validatorRules.explainRemarks]"
|
||||
@@ -36,6 +36,9 @@
|
||||
|
||||
<script>
|
||||
import { aduitRevenueContract } from '../../../../api/incomePaymentsApi'
|
||||
import { USER_INFO } from '../../../../store/mutation-types'
|
||||
import Vue from 'vue'
|
||||
import pick from 'lodash.pick'
|
||||
|
||||
export default {
|
||||
name: 'RevenueContractAduitModule',
|
||||
@@ -47,6 +50,7 @@ export default {
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
contractId: '',
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 }
|
||||
@@ -68,7 +72,8 @@ export default {
|
||||
rules: [{ required: true, message: '请输入拒绝说明' }],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
}
|
||||
},
|
||||
showExplainRemarks: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -97,10 +102,30 @@ export default {
|
||||
this.close()
|
||||
},
|
||||
open() {
|
||||
let userInfo = Vue.ls.get(USER_INFO)
|
||||
console.log(userInfo)
|
||||
this.model.userName = userInfo.realname
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'userName'))
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.visible = false
|
||||
},
|
||||
/**
|
||||
* 控制拒绝说明显隐
|
||||
* @param e
|
||||
*/
|
||||
contractAuditStatuChange(e) {
|
||||
console.log(e.target.value)
|
||||
if (e.target.value === 3) {
|
||||
this.showExplainRemarks = false
|
||||
return
|
||||
}
|
||||
if (e.target.value === 4) {
|
||||
this.showExplainRemarks = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
<div class="part-title">
|
||||
<div class="part-title-text">关联项目</div>
|
||||
</div>
|
||||
<associated-project ref="associatedProject" :contract-id="$route.query.revenueId" :can-operate="false"></associated-project>
|
||||
</div>
|
||||
<a-divider></a-divider>
|
||||
|
||||
@@ -146,10 +147,11 @@
|
||||
import IconImg from '@/assets/imgs/icon/icon_revenue_contract.png'
|
||||
import PageHeaderTitle from '@/components/layouts/PageHeaderTitle'
|
||||
import { getRevenueContractById } from '../../../../api/incomePaymentsApi'
|
||||
import AssociatedProject from './AssociatedProject'
|
||||
|
||||
export default {
|
||||
name: 'RevenueContractDetail',
|
||||
components: { PageHeaderTitle },
|
||||
components: { PageHeaderTitle, AssociatedProject },
|
||||
data() {
|
||||
return {
|
||||
IconImg,
|
||||
@@ -252,8 +254,9 @@ export default {
|
||||
return this.otherInfoList.filter(item => this.detailData[item.fieldName] && this.detailData[item.fieldName] !== '') || []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
this.initDetailData(this.$route.query.revenueId)
|
||||
this.$refs.associatedProject.loadAssociatedProject()
|
||||
},
|
||||
methods: {
|
||||
initDetailData(id) {
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
<div class="part-title">
|
||||
<div class="part-title-text">分期信息</div>
|
||||
</div>
|
||||
<installment-form ref="installmentForm" @ok="installmentFormOk" :disabled="isSaved"></installment-form>
|
||||
<installment-form ref="installmentForm" @ok="installmentFormOk"></installment-form>
|
||||
</div>
|
||||
<!-- /分期信息-->
|
||||
<a-form-item class="table-operator">
|
||||
@@ -235,12 +235,21 @@
|
||||
<a-card :bordered="false" v-if="isSaved" class="associated-project">
|
||||
<div class="part-title">
|
||||
<div class="part-title-text">关联项目</div>
|
||||
<a-button type="link" @click="chooseProject">选择项目</a-button>
|
||||
<a-button type="link" @click="chooseProject">选择项目
|
||||
<a-icon type="right"></a-icon>
|
||||
</a-button>
|
||||
</div>
|
||||
<associated-project
|
||||
:contract-id="contractId"
|
||||
ref="associatedProject"></associated-project>
|
||||
</a-card>
|
||||
|
||||
<!-- 项目类型选择-->
|
||||
<project-type-selection ref="projectTypeSelection" @ok="selectProjectTypeOk"></project-type-selection>
|
||||
<select-project-module ref="selectProjectModule"></select-project-module>
|
||||
<!-- 项目选择-->
|
||||
<select-project-module ref="selectProjectModule"
|
||||
@ok="selectProjectOk"
|
||||
:default-charge-company="selectedCompany"></select-project-module>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -260,6 +269,7 @@ import { getAllUserList } from '../../../../api/api'
|
||||
import { postAction } from '../../../../api/manage'
|
||||
import { getRevenueContractById } from '../../../../api/incomePaymentsApi'
|
||||
import { duplicateCheck } from '../../../../api/api'
|
||||
import AssociatedProject from './AssociatedProject'
|
||||
|
||||
// 普通项目表头
|
||||
const generalProjectColumns = [
|
||||
@@ -342,13 +352,6 @@ const generalProjectColumns = [
|
||||
width: 80,
|
||||
dataIndex: 'mail',
|
||||
scopedSlots: { customRender: 'status' }
|
||||
}, {
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 160,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
// 工作组项目表头
|
||||
@@ -377,13 +380,6 @@ const workingProjectColumns = [
|
||||
dataIndex: 'obj',
|
||||
width: 250,
|
||||
scopedSlots: { customRender: 'rateOfProgress' }
|
||||
}, {
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
fixed: 'right',
|
||||
width: 180,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
// 会议项目表头
|
||||
@@ -402,7 +398,8 @@ export default {
|
||||
JYearDate,
|
||||
InstallmentForm,
|
||||
ProjectTypeSelection,
|
||||
SelectProjectModule
|
||||
SelectProjectModule,
|
||||
AssociatedProject
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -464,8 +461,8 @@ export default {
|
||||
url: {
|
||||
add: '/contract/payIncomeContract/add',
|
||||
edit: '/contract/payIncomeContract/edit',
|
||||
generalProjectList: '/project/payCommonProject/list',
|
||||
workingGroupProjectList: '/project/payWorkingGroup/list',
|
||||
generalProjectList: '/project/payCommonProject/listAll', // 普通项目
|
||||
workingGroupProjectList: '/project/payWorkingGroup/queryListByCompany', // 工作组项目
|
||||
meetingProjectList: '',
|
||||
memberProjectList: ''
|
||||
},
|
||||
@@ -477,12 +474,15 @@ export default {
|
||||
amountReceivedNum: null, // 输入的未收金额
|
||||
contractAmountNum: null, // 输入的签订合同总金额
|
||||
rateNum: null, // 输入的税率
|
||||
selectedContact: null
|
||||
selectedContact: null,
|
||||
associatedProjectLoading: false,
|
||||
contractId: '' // 收入合同id
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.hasOwnProperty.call(this.$route.query, 'revenueId')) {
|
||||
this.edit(this.$route.query.revenueId)
|
||||
this.contractId = this.$route.query.revenueId
|
||||
this.edit(this.contractId)
|
||||
} else {
|
||||
this.add()
|
||||
}
|
||||
@@ -490,7 +490,7 @@ export default {
|
||||
methods: {
|
||||
add() {
|
||||
this.title = '新建收入合同'
|
||||
this.$refs.installmentForm.initInstallmentList({})
|
||||
this.$refs.installmentForm.initInstallmentList([])
|
||||
},
|
||||
edit(id) {
|
||||
this.title = '编辑收入合同'
|
||||
@@ -529,7 +529,7 @@ export default {
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.confirmLoading = true
|
||||
if (this.installmentList.length > 0) {
|
||||
if (this.installmentList && this.installmentList.length > 0) {
|
||||
let formData = {}
|
||||
values.signedCompanyId = values.signedCompany.id
|
||||
delete values.signedCompany
|
||||
@@ -544,6 +544,8 @@ export default {
|
||||
}
|
||||
postAction(url, formData).then(res => {
|
||||
if (res.success) {
|
||||
this.contractId = res.result.id
|
||||
this.edit(this.contractId)
|
||||
this.$message.success(res.message)
|
||||
// 保存上方表单信息,(应该在表单验证完全正确时置为true)
|
||||
this.isSaved = true
|
||||
@@ -553,6 +555,8 @@ export default {
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -721,16 +725,27 @@ export default {
|
||||
chooseProject() {
|
||||
this.$refs.projectTypeSelection.open()
|
||||
},
|
||||
/**
|
||||
* 项目类型选择回调,动态传入表头数据
|
||||
* @param type
|
||||
*/
|
||||
selectProjectTypeOk(type) {
|
||||
let title = ''
|
||||
switch (type) {
|
||||
case 1:
|
||||
this.$refs.selectProjectModule.columns = generalProjectColumns
|
||||
this.$refs.selectProjectModule.filters = {
|
||||
chargeCompanyId: this.selectedCompany.id,
|
||||
pack: this.model.pack
|
||||
}
|
||||
this.$refs.selectProjectModule.url.list = this.url.generalProjectList
|
||||
title = '普通项目列表'
|
||||
break
|
||||
case 2:
|
||||
this.$refs.selectProjectModule.columns = workingProjectColumns
|
||||
this.$refs.selectProjectModule.filters = {
|
||||
companyId: this.selectedCompany.id
|
||||
}
|
||||
this.$refs.selectProjectModule.url.list = this.url.workingGroupProjectList
|
||||
title = '工作组项目列表'
|
||||
break
|
||||
@@ -745,9 +760,17 @@ export default {
|
||||
title = '会员项目列表'
|
||||
break
|
||||
}
|
||||
this.$refs.selectProjectModule.contractId = this.model.id
|
||||
this.$refs.selectProjectModule.projectType = type
|
||||
this.$refs.selectProjectModule.title = title
|
||||
this.$refs.selectProjectModule.open()
|
||||
},
|
||||
|
||||
/**
|
||||
* 项目选中回调
|
||||
*/
|
||||
selectProjectOk() {
|
||||
this.$refs.associatedProject.loadAssociatedProject()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -763,4 +786,8 @@ export default {
|
||||
.ant-divider-horizontal {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.ant-btn > .anticon + span, .ant-btn > span + .anticon {
|
||||
margin-left: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -62,36 +62,50 @@
|
||||
<!-- 表格区域-->
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
<template slot="htmlSlot" slot-scope="text">
|
||||
<div v-html="text"></div>
|
||||
</template>
|
||||
<template slot="imgSlot" slot-scope="text">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
||||
<img v-else :src="getImgView(text)" height="25px" alt=""
|
||||
style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
||||
</template>
|
||||
<template slot="fileSlot" slot-scope="text,record">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<j-ellipsis @click.native="uploadFile(record.chargeNoticeFileId)" style="color:#219AFF;cursor: pointer"
|
||||
:value="text" :length="20"/>
|
||||
</template>
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:scroll="{x: 800}"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="30"></j-ellipsis>
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<!-- 打包、需要发票、到账、开票、邮寄状态-->
|
||||
<template slot="status" slot-scope="text,record">
|
||||
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
|
||||
</template>
|
||||
|
||||
<!-- 进度-->
|
||||
<template slot="rateOfProgress" slot-scope="text">
|
||||
<progress-bar :data="text"></progress-bar>
|
||||
</template>
|
||||
|
||||
<template slot="status-pack" slot-scope="text,record">
|
||||
<status-slot :statu-obj="record" :status-no="text"></status-slot>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<!-- /表格区域-->
|
||||
<!-- 普通项目新增-->
|
||||
<general-project-module ref="generalProjectForm"
|
||||
v-bind="$attrs"
|
||||
:disabled-charge-company="true"
|
||||
@ok="modalFormOk"></general-project-module>
|
||||
<!-- 工作组项目新增-->
|
||||
<working-group-member-unit-module ref="workingGroupMemberForm"
|
||||
@ok="modalFormOk"
|
||||
v-bind="$attrs"
|
||||
:disabled-charge-company="true"
|
||||
:default-charge-way="2"></working-group-member-unit-module>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
@@ -99,10 +113,15 @@
|
||||
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
|
||||
import SelectPrincipal from '../../../../components/company/SelectPrincipal'
|
||||
import JYearDate from '../../../../components/jero/JYearDate'
|
||||
import GeneralProjectModule from '../../../projectManagement/modules/GeneralProjectModule'
|
||||
import StatusSlot from '../../../../components/tools/StatusSlot'
|
||||
import { associatedProject } from '../../../../api/incomePaymentsApi'
|
||||
import WorkingGroupMemberUnitModule from '../../../projectManagement/modules/WorkingGroupMemberUnitModule'
|
||||
import ProgressBar from '../../../../components/ProgressBar'
|
||||
|
||||
export default {
|
||||
name: 'SelectProjectModule',
|
||||
components: { SelectPrincipal, JYearDate },
|
||||
components: { SelectPrincipal, JYearDate, GeneralProjectModule, StatusSlot, WorkingGroupMemberUnitModule, ProgressBar },
|
||||
mixins: [JeroListMixin],
|
||||
data() {
|
||||
return {
|
||||
@@ -119,7 +138,9 @@ export default {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 10 }
|
||||
},
|
||||
projectType: null,
|
||||
projectType: null, // 项目类型,1--普通项目;2--工作组项目;3--会议项目;4--会员项目
|
||||
disableMixinCreated: true,
|
||||
contractId: '', // 收入合同id
|
||||
url: {
|
||||
list: ''
|
||||
}
|
||||
@@ -127,20 +148,56 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.loadData()
|
||||
this.visible = true
|
||||
console.log(this.columns)
|
||||
},
|
||||
close() {
|
||||
this.visible = false
|
||||
},
|
||||
handleOk() {
|
||||
|
||||
if (this.selectedRowKeys.length <= 0) {
|
||||
this.$message.warn('请选择项目后再提交关联')
|
||||
return
|
||||
}
|
||||
let submitData = []
|
||||
let projectItem
|
||||
this.selectedRowKeys.forEach(item => {
|
||||
projectItem = {
|
||||
contractId: this.contractId,
|
||||
projectId: item,
|
||||
projectType: this.projectType
|
||||
}
|
||||
submitData.push(projectItem)
|
||||
})
|
||||
associatedProject(submitData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.close()
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
/**
|
||||
* 打开不同类型项目的新增module
|
||||
*/
|
||||
handleAdd() {
|
||||
|
||||
switch (this.projectType) {
|
||||
case 1:
|
||||
this.$refs.generalProjectForm.add()
|
||||
this.$refs.generalProjectForm.title = '新增'
|
||||
this.$refs.generalProjectForm.disableSubmit = false
|
||||
break
|
||||
case 2:
|
||||
this.$refs.workingGroupMemberForm.add()
|
||||
this.$refs.workingGroupMemberForm.title = '新增'
|
||||
this.$refs.workingGroupMemberForm.disableSubmit = false
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,10 @@
|
||||
|
||||
<!-- 工作组名称-->
|
||||
<template slot="projectName" slot-scope="text, record">
|
||||
<div class="primary-color" @click="openDetailModal(record)">{{ text }}</div>
|
||||
<j-ellipsis :value="text"
|
||||
:length="20"
|
||||
class="primary-color"
|
||||
@click="openDetailModal(record)"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<!-- 打包、需要发票、到账、开票、邮寄状态-->
|
||||
|
||||
@@ -74,7 +74,11 @@
|
||||
|
||||
<!-- 工作组名称-->
|
||||
<template slot="projectName" slot-scope="text, record">
|
||||
<div class="primary-color" @click="goMemberUnitMaintenance(record)">{{ text }}</div>
|
||||
<j-ellipsis
|
||||
class="primary-color"
|
||||
@click="goMemberUnitMaintenance(record)"
|
||||
:value="text"
|
||||
:length="20"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<!-- 进度-->
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<company-select placeholder="请选择来款企业"
|
||||
v-decorator="['chargeCompany',validatorRules.chargeCompany]"
|
||||
@change="companyChange"
|
||||
:disabled="disabledChargeCompany"
|
||||
:maxLength='50'>
|
||||
</company-select>
|
||||
</a-form-item>
|
||||
@@ -170,6 +171,22 @@ import SelectContacts from '@comp/company/SelectContacts'
|
||||
export default {
|
||||
name: 'GeneralProjectModule',
|
||||
components: { JYearDate, JUpload, CompanySelect, SelectPrincipal, SelectContacts },
|
||||
props: {
|
||||
// 收入合同关联时传入的企业信息,不可修改
|
||||
defaultChargeCompany: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 是否可以修改来款企业
|
||||
disabledChargeCompany: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '操作',
|
||||
@@ -257,11 +274,19 @@ export default {
|
||||
methods: {
|
||||
add() {
|
||||
this.edit({})
|
||||
console.log(this.defaultChargeCompany, '============')
|
||||
},
|
||||
edit(record) {
|
||||
record.chargeCompany = {
|
||||
id: record.chargeCompanyId,
|
||||
companyName: record.chargeCompanyTemporaryName
|
||||
if (this.defaultChargeCompany.hasOwnProperty.call(this.defaultChargeCompany, 'id')) {
|
||||
record.chargeCompany = {
|
||||
id: this.defaultChargeCompany.id,
|
||||
companyName: this.defaultChargeCompany.companyName
|
||||
}
|
||||
} else {
|
||||
record.chargeCompany = {
|
||||
id: record.chargeCompanyId,
|
||||
companyName: record.chargeCompanyTemporaryName
|
||||
}
|
||||
}
|
||||
// 回显选中的企业
|
||||
this.selectedCompany = record.chargeCompany
|
||||
|
||||
@@ -9,11 +9,23 @@
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<a-form :form="form">
|
||||
<a-row v-if="defaultChargeWay">
|
||||
<a-col>
|
||||
<a-form-item label="工作组项目" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||
<a-select placeholder="请选择工作组项目"
|
||||
v-decorator="['workingGroupId',validatorRules.workingGroupId]"
|
||||
:maxLength='50'>
|
||||
<a-select-option v-for="item in workingGroupList" :key="item.id" :value="item.id">{{ item.workingGroupProject }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col>
|
||||
<a-form-item label="成员单位" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||
<company-select placeholder="请选择成员单位"
|
||||
v-decorator="['chargeCompany',validatorRules.chargeCompany]"
|
||||
:disabled="disabledChargeCompany"
|
||||
@change="companyChange"
|
||||
:maxLength='50'>
|
||||
</company-select>
|
||||
@@ -71,7 +83,8 @@
|
||||
<a-row>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="来款方式" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-radio-group v-decorator="['chargeWay',validatorRules.chargeWay]" @change="handlechargeWayChange">
|
||||
<span v-if="defaultChargeWay === 2">合同</span>
|
||||
<a-radio-group v-decorator="['chargeWay',validatorRules.chargeWay]" @change="handlechargeWayChange" v-else>
|
||||
<a-radio :value="1">无</a-radio>
|
||||
<a-radio :value="2">合同</a-radio>
|
||||
<a-radio :value="3">收费通知</a-radio>
|
||||
@@ -184,10 +197,33 @@ import { httpAction } from '@api/manage'
|
||||
import JUpload from '@comp/jero/JUpload'
|
||||
import CompanySelect from '@comp/company/CompanySelect'
|
||||
import SelectContacts from '@comp/company/SelectContacts'
|
||||
import { getWorkingGroupAllList } from '../../../api/incomePaymentsApi'
|
||||
|
||||
export default {
|
||||
name: 'WorkingGroupMemberUnitModule',
|
||||
components: { JUpload, CompanySelect, SelectContacts },
|
||||
props: {
|
||||
// 默认来款方式(收入合同新增工作组项目,来款方式默认为2--合同)
|
||||
defaultChargeWay: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
// 收入合同关联时传入的企业信息,不可修改
|
||||
defaultChargeCompany: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 是否可以修改来款企业
|
||||
disabledChargeCompany: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '操作',
|
||||
@@ -213,6 +249,10 @@ export default {
|
||||
sm: { span: 21 }
|
||||
},
|
||||
validatorRules: {
|
||||
workingGroupId: {
|
||||
rules: [{ required: true, message: '请选择工作组项目' }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
chargeCompany: {
|
||||
rules: [{ required: true, message: '请选择成员单位' }],
|
||||
validateTrigger: 'change'
|
||||
@@ -255,6 +295,7 @@ export default {
|
||||
chargeNoticeList: [], // 收费通知号list
|
||||
selectedChargeNotice: null, // 选中的收费通知号
|
||||
workingGroupId: null,
|
||||
workingGroupList: [],
|
||||
url: {
|
||||
add: '/project/payWorkingGroupSubitem/add',
|
||||
edit: '/project/payWorkingGroupSubitem/edit'
|
||||
@@ -264,11 +305,32 @@ export default {
|
||||
methods: {
|
||||
add() {
|
||||
this.edit({})
|
||||
if (this.defaultChargeWay) {
|
||||
this.loadWorkingGroupList()
|
||||
this.chargeWayType = 2
|
||||
}
|
||||
},
|
||||
loadWorkingGroupList() {
|
||||
getWorkingGroupAllList().then(res => {
|
||||
if (res.success) {
|
||||
this.workingGroupList = res.result
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
edit(record) {
|
||||
record.chargeCompany = {
|
||||
id: record.chargeCompanyId,
|
||||
companyName: record.chargeCompanyTemporaryName
|
||||
// 存在默认选中企业时显示默认企业
|
||||
if (this.defaultChargeCompany.hasOwnProperty.call(this.defaultChargeCompany, 'id')) {
|
||||
record.chargeCompany = {
|
||||
id: this.defaultChargeCompany.id,
|
||||
companyName: this.defaultChargeCompany.companyName
|
||||
}
|
||||
} else {
|
||||
record.chargeCompany = {
|
||||
id: record.chargeCompanyId,
|
||||
companyName: record.chargeCompanyTemporaryName
|
||||
}
|
||||
}
|
||||
// 回显选中的企业
|
||||
this.selectedCompany = record.chargeCompany
|
||||
@@ -314,6 +376,10 @@ export default {
|
||||
// 触发表单验证
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
// 收入合同新建项目手动赋值
|
||||
if (this.defaultChargeWay === 2) {
|
||||
values.chargeWay = 2
|
||||
}
|
||||
values.chargeCompanyTemporaryName = values.chargeCompany.companyName
|
||||
values.chargeCompanyId = values.chargeCompany.id
|
||||
let httpurl = ''
|
||||
@@ -323,7 +389,9 @@ export default {
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
}
|
||||
values.workingGroupId = this.workingGroupId
|
||||
if (this.workingGroupId) {
|
||||
values.workingGroupId = this.workingGroupId
|
||||
}
|
||||
const formData = Object.assign(this.model, values)
|
||||
console.log('表单提交数据', formData)
|
||||
httpAction(httpurl, formData, method).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user