Merge remote-tracking branch 'origin/xuqiubangeng1026'
# Conflicts: # src/views/incomePayments/meetManage/AddOrDetailMeet.vue
This commit is contained in:
@@ -23,7 +23,7 @@ const submitAudit = (param) => postAction('/contract/payIncomeContract/submitAud
|
||||
// 获取不存在成员单位的工作组信息
|
||||
const getWorkingGroupListByNotCompany = (param) => getAction('/project/payWorkingGroup/queryListByNotCompany', param)
|
||||
// 收入合同存档
|
||||
const archiveRevenueContract = (param) => postAction('contract/payIncomeContract/archive', param)
|
||||
const archiveRevenueContract = (param) => postAction('/contract/payIncomeContract/archive', param)
|
||||
// 根据部门id获取用户信息
|
||||
const queryUserByDepartId = (param) => getAction('/sys/user/listRoleAndDepart', param)
|
||||
// 企业联系人新建重名校验
|
||||
@@ -80,6 +80,12 @@ const checkCompanyAduit = (param) => getAction('/payMailContract/payMailContract
|
||||
const getAllDepartTreeList = (param) => getAction('/sys/sysDepart/queryTreeAllList', param)
|
||||
// 验证项目是否关联合同
|
||||
const getIsAssociatedProject = (param) => getAction('/contract/payIncomeContract/getAssociatedProject', param)
|
||||
// 支出合同审核
|
||||
const aduitExpenditureContract = (param) => postAction('/contract/paySpendingContract/audit', param)
|
||||
// 支出合同存档
|
||||
const archiveExpenditureContract = (param) => postAction('/contract/paySpendingContract/archive', param)
|
||||
// 获取全部收入合同(通过企业id查询列表)
|
||||
const getAllRevenueContract = (param) => getAction('/contract/payIncomeContract/queryByCompanyId', param)
|
||||
|
||||
export {
|
||||
getWorkingGroupById,
|
||||
@@ -121,5 +127,8 @@ export {
|
||||
sysReminders,
|
||||
checkCompanyAduit,
|
||||
getAllDepartTreeList,
|
||||
getIsAssociatedProject
|
||||
getIsAssociatedProject,
|
||||
aduitExpenditureContract,
|
||||
archiveExpenditureContract,
|
||||
getAllRevenueContract
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<script>
|
||||
import ContactManagementModule from '@views/businessManagement/modules/ContactManagementModule'
|
||||
import { getContactsByCompany,getContactsByCompanyNoLimit } from '@api/api'
|
||||
import { getContactsByCompany, getContactsByCompanyNoLimit } from '@api/api'
|
||||
|
||||
export default {
|
||||
name: 'SelectContacts',
|
||||
@@ -68,10 +68,10 @@ export default {
|
||||
default: 'string'
|
||||
},
|
||||
// 是否调用无权限接口
|
||||
isLimit:{
|
||||
type:Boolean,
|
||||
required:false,
|
||||
default:false
|
||||
isLimit: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -119,35 +119,36 @@ export default {
|
||||
* 获取联系人数据
|
||||
*/
|
||||
getContactsList() {
|
||||
let params = {}
|
||||
if (this.selectedCompany && this.selectedCompany.id) {
|
||||
const params = {
|
||||
companyId: this.selectedCompany.id
|
||||
}
|
||||
// 是否调用无权限接口
|
||||
if(this.isLimit){
|
||||
// 调用无权限接口
|
||||
return new Promise(resolve => {
|
||||
getContactsByCompanyNoLimit(params).then(res => {
|
||||
this.contactsList = res.result
|
||||
if (this.initContacts && this.initContacts.id) {
|
||||
this.contactsList.push(this.initContacts)
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}else{
|
||||
return new Promise(resolve => {
|
||||
getContactsByCompany(params).then(res => {
|
||||
this.contactsList = res.result
|
||||
console.log(this.initContacts)
|
||||
if (this.initContacts && this.initContacts.id) {
|
||||
this.contactsList.push(this.initContacts)
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
params.companyId = this.selectedCompany.id
|
||||
} else {
|
||||
params.companyId = null
|
||||
}
|
||||
// 是否调用无权限接口
|
||||
if (this.isLimit) {
|
||||
// 调用无权限接口
|
||||
return new Promise(resolve => {
|
||||
getContactsByCompanyNoLimit(params).then(res => {
|
||||
this.contactsList = res.result
|
||||
if (this.initContacts && this.initContacts.id) {
|
||||
this.contactsList.push(this.initContacts)
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
} else {
|
||||
return new Promise(resolve => {
|
||||
getContactsByCompany(params).then(res => {
|
||||
this.contactsList = res.result || []
|
||||
if (this.initContacts && this.initContacts.id) {
|
||||
this.contactsList.push(this.initContacts)
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
* 新建联系人
|
||||
@@ -180,7 +181,7 @@ export default {
|
||||
// 下拉框的搜索
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
)
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -39,7 +39,11 @@ export default {
|
||||
*/
|
||||
initUserList() {
|
||||
getAllUserList().then(res => {
|
||||
this.userList = res.result
|
||||
if (res.success) {
|
||||
this.userList = res.result
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 下拉框的搜索
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<a-select
|
||||
:value="value"
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
show-search
|
||||
allowClear
|
||||
option-filter-prop="children"
|
||||
:filter-option="filterOption">
|
||||
<a-select-option v-for="item in contractList" :key="item" :value="item">
|
||||
{{ item }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAllRevenueContract } from '../../api/incomePaymentsApi'
|
||||
|
||||
export default {
|
||||
name: 'SelectRevenueContract',
|
||||
props: {
|
||||
// 绑定值--合同号
|
||||
value: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: undefined
|
||||
},
|
||||
// 选中的企业,用于获取合同列表
|
||||
company: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 合同列表
|
||||
contractList: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听企业变化获取合同信息
|
||||
company: {
|
||||
handler() {
|
||||
if (!this.company.id) {
|
||||
this.$message.warn(`请先选择企业`)
|
||||
return
|
||||
}
|
||||
this.initRevenueContractList()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initRevenueContractList()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 通过企业id获取合同号
|
||||
*/
|
||||
initRevenueContractList() {
|
||||
let param = {}
|
||||
if (this.company && this.company.id){
|
||||
param.companyId = this.company.id
|
||||
} else {
|
||||
param.companyId = null
|
||||
}
|
||||
getAllRevenueContract(param).then(res => {
|
||||
if (res.success) {
|
||||
this.contractList = res.result
|
||||
} else {
|
||||
console.log(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 下拉框的搜索
|
||||
filterOption(input, option) {
|
||||
console.log(option)
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
)
|
||||
}
|
||||
},
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'change'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -147,7 +147,10 @@
|
||||
<a-row>
|
||||
<a-col :sm="6" :xs="24">{{ item.createBy }}</a-col>
|
||||
<a-col :sm="6" :xs="24">{{ item.createTime }}</a-col>
|
||||
<a-col :sm="6" :xs="24">{{ item.contractStatus_dictText }}</a-col>
|
||||
<!-- 待存档文字替换-->
|
||||
<a-col :sm="6" :xs="24">
|
||||
{{ item.contractStatus_dictText === '待存档' ? '审核通过' : item.contractStatus_dictText }}
|
||||
</a-col>
|
||||
<a-col :sm="6" :xs="24">{{ item.explainRemarks }}</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
@@ -166,7 +169,7 @@
|
||||
<div class="operator-btn">
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="handleEdit(detailData.id, detailData.contractNum)"
|
||||
@click="handleEdit(detailData.id)"
|
||||
v-if="detailData.status === 1 || detailData.status === 4"
|
||||
v-has="'revenueContract:edit'">
|
||||
编辑
|
||||
@@ -175,14 +178,14 @@
|
||||
type="primary"
|
||||
@click="handleAudit(detailData.id)"
|
||||
v-if="detailData.status === 2"
|
||||
v-has="'revenueContract:aduit'">
|
||||
v-has="'expenditureContract:aduit'">
|
||||
审核
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="handleArchive(detailData.id)"
|
||||
v-if="detailData.status === 3"
|
||||
v-has="'revenueContract:archive'">
|
||||
v-has="'expenditureContract:archive'">
|
||||
存档
|
||||
</a-button>
|
||||
</div>
|
||||
@@ -192,17 +195,19 @@
|
||||
</a-card>
|
||||
</a-spin>
|
||||
|
||||
<revenue-contract-aduit-module ref="aduitForm" @ok="operatorOk"></revenue-contract-aduit-module>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PageHeaderTitle from '../../../components/layouts/PageHeaderTitle'
|
||||
import IconImg from '@/assets/imgs/icon/icon_revenue_contract.png'
|
||||
import { getExpenditureContractById } from '../../../api/incomePaymentsApi'
|
||||
import { archiveExpenditureContract, getExpenditureContractById } from '../../../api/incomePaymentsApi'
|
||||
import RevenueContractAduitModule from '../revenueContract/modules/RevenueContractAduitModule'
|
||||
|
||||
export default {
|
||||
name: 'ExpenditureContractDetail',
|
||||
components: { PageHeaderTitle },
|
||||
components: { PageHeaderTitle, RevenueContractAduitModule },
|
||||
data() {
|
||||
return {
|
||||
IconImg,
|
||||
@@ -334,11 +339,49 @@ export default {
|
||||
* @param id
|
||||
* @param contractNum
|
||||
*/
|
||||
handleEdit(id, contractNum) {
|
||||
handleEdit(id) {
|
||||
this.$router.push({
|
||||
path: '/contractManagement/RevenueContractModule',
|
||||
query: {
|
||||
revenueId: id
|
||||
contractId: id
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 审核
|
||||
* @param id
|
||||
*/
|
||||
handleAudit(id) {
|
||||
this.$refs.aduitForm.contractType = 2
|
||||
this.$refs.aduitForm.contractId = id
|
||||
this.$refs.aduitForm.open()
|
||||
},
|
||||
/**
|
||||
* 存档
|
||||
* @param id
|
||||
*/
|
||||
handleArchive(id) {
|
||||
let that = this
|
||||
this.$confirm({
|
||||
title: '存档',
|
||||
content: '确认存档?',
|
||||
onOk: function () {
|
||||
that.loading = true
|
||||
that.loading = false
|
||||
let param = {
|
||||
contractId: id,
|
||||
contractStatus: 5
|
||||
}
|
||||
archiveExpenditureContract(param).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.initDetailData()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -369,7 +412,7 @@ export default {
|
||||
}
|
||||
|
||||
.all-line {
|
||||
width: 100%!important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.ant-divider-horizontal {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<a-input placeholder="请输入合同名称" v-model="queryParam.contractName" :maxLength='50'></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="8" :xl="10" :lg="11" :md="12" :sm="24">
|
||||
<a-col :xxl="8" :xl="10" :lg="12" :md="12" :sm="24">
|
||||
<a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-date
|
||||
placeholder="请选择开始日期"
|
||||
@@ -35,9 +35,17 @@
|
||||
</j-date>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xxl="4" :xl="10" :lg="12" :md="12" :sm="24">
|
||||
<a-form-item label="合同状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag v-model="queryParam.status"
|
||||
placeholder="请选择合同状态"
|
||||
dictCode="expenditure_contract_status"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="4" :lg="7" :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" icon="search" @click="searchQuery" v-has="'expenditureContract:search'">查询</a-button>
|
||||
<a-button type="primary" icon="search" @click="searchQuery"
|
||||
v-has="'expenditureContract:search'">查询</a-button>
|
||||
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
@@ -53,8 +61,12 @@
|
||||
@change="handleImportExcel" v-has="'expenditureContract:import'">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('支出合同')" v-has="'expenditureContract:export'">导出</a-button>
|
||||
<a-button type="primary" icon="download" @click="downTemplate('支出合同导入模板')" v-has="'expenditureContract:downTemplate'">下载模板</a-button>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('支出合同')" v-has="'expenditureContract:export'">
|
||||
导出
|
||||
</a-button>
|
||||
<a-button type="primary" icon="download" @click="downTemplate('支出合同导入模板')"
|
||||
v-has="'expenditureContract:downTemplate'">下载模板
|
||||
</a-button>
|
||||
<a-button type="danger" icon="delete" @click="batchDel" v-has="'expenditureContract:batchDel'">批量删除</a-button>
|
||||
</div>
|
||||
<!-- 操作按钮区域-end-->
|
||||
@@ -72,13 +84,22 @@
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
:rowClassName="aduitClass"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
|
||||
<!-- 项目名称-->
|
||||
<template slot="projectName" slot-scope="text, record">
|
||||
<j-ellipsis
|
||||
@click="toContractDetail(record.id, record.contractNum)"
|
||||
v-if="record.chargeStatus === 1"
|
||||
:value="text"
|
||||
style="cursor: pointer"
|
||||
:length="18"></j-ellipsis>
|
||||
<j-ellipsis
|
||||
class="primary-color"
|
||||
@click="toContractDetail(record.id)"
|
||||
v-else
|
||||
:value="text"
|
||||
:length="18"></j-ellipsis>
|
||||
</template>
|
||||
@@ -88,12 +109,21 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleEdit(record.id)" v-has="'expenditureContract:edit'">编辑</a>
|
||||
<a @click="handleDelete(record.id)" v-has="'expenditureContract:delete'">删除</a>
|
||||
<a @click="handleAudit(record.id)" v-has="'expenditureContract:aduit'" v-if="record.status === 2">审核</a>
|
||||
<a @click="handleEdit(record.id, record.contractNum)"
|
||||
v-has="'expenditureContract:edit'"
|
||||
v-if="record.status === 1 || record.status === 4">编辑</a>
|
||||
<a @click="handleArchive(record.id)" v-has="'expenditureContract:archive'" v-if="record.status === 3">存档</a>
|
||||
<a @click="handleDelete(record.id)"
|
||||
v-has="'expenditureContract:delete'"
|
||||
v-if="record.status === 1 || record.status === 2 || record.status === 4">删除</a>
|
||||
<a :disabled="true" v-if="record.status === 5">已存档</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
<revenue-contract-aduit-module ref="aduitForm" @ok="modalFormOk"></revenue-contract-aduit-module>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -103,10 +133,12 @@ import IconImg from '@assets/imgs/icon/icon_revenue_contract.png'
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
||||
import { RangeDateMixin } from '../../../mixins/RangeDateMixin'
|
||||
import JDate from '../../../components/tools/JDate'
|
||||
import { archiveExpenditureContract } from '../../../api/incomePaymentsApi'
|
||||
import RevenueContractAduitModule from '../revenueContract/modules/RevenueContractAduitModule'
|
||||
|
||||
export default {
|
||||
name: 'ExpenditureContractList',
|
||||
components: { PageHeaderTitle, JDate },
|
||||
components: { PageHeaderTitle, JDate, RevenueContractAduitModule },
|
||||
mixins: [JeroListMixin, RangeDateMixin],
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
@@ -141,8 +173,8 @@ export default {
|
||||
}, {
|
||||
title: '合同编号',
|
||||
align: 'center',
|
||||
dataIndex: 'contractNum',
|
||||
width: 280,
|
||||
dataIndex: 'contractNum',
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
}, {
|
||||
title: '合同名称',
|
||||
@@ -168,6 +200,12 @@ export default {
|
||||
dataIndex: 'contractAmount',
|
||||
width: 200,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
dataIndex: 'status_dictText',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
@@ -206,14 +244,67 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 动态设置到期未付款状态的表格样式
|
||||
* @param record
|
||||
* @returns {string}
|
||||
*/
|
||||
aduitClass(record) {
|
||||
if (record.chargeStatus === 1) {
|
||||
return 'aduit'
|
||||
}
|
||||
return ''
|
||||
},
|
||||
/**
|
||||
* 详情
|
||||
* @param id
|
||||
*/
|
||||
toContractDetail(id) {
|
||||
console.log(id)
|
||||
this.$router.push({
|
||||
path: '/contractManagement/ExpenditureContractDetail',
|
||||
query: {
|
||||
revenueId: id
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 审核
|
||||
* @param id
|
||||
*/
|
||||
handleAudit(id) {
|
||||
this.$refs.aduitForm.contractType = 2
|
||||
this.$refs.aduitForm.contractId = id
|
||||
this.$refs.aduitForm.open()
|
||||
},
|
||||
/**
|
||||
* 存档
|
||||
* @param id
|
||||
*/
|
||||
handleArchive(id) {
|
||||
console.log(id)
|
||||
let that = this
|
||||
this.$confirm({
|
||||
title: '存档',
|
||||
content: '确认存档?',
|
||||
onOk: function () {
|
||||
that.loading = true
|
||||
that.loading = false
|
||||
let param = {
|
||||
contractId: id,
|
||||
contractStatus: 5
|
||||
}
|
||||
archiveExpenditureContract(param).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,4 +312,7 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
/deep/ .aduit {
|
||||
color: red !important;
|
||||
}
|
||||
</style>
|
||||
+14
-2
@@ -232,7 +232,7 @@
|
||||
</div>
|
||||
<!-- /分期信息-->
|
||||
<a-form-item class="table-operator">
|
||||
<a-button type="primary" @click="handleSave" v-preventclick>保存</a-button>
|
||||
<a-button type="primary" @click="save" v-preventclick>保存</a-button>
|
||||
<a-button @click="handleCancle">取消</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
@@ -403,6 +403,18 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
save() {
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: '提示',
|
||||
content: '保存后将进入待审核状态,无法编辑,确定要保存吗 ?',
|
||||
onOk() {
|
||||
that.handleSave()
|
||||
},
|
||||
onCancel() {
|
||||
},
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 表单提交
|
||||
*/
|
||||
@@ -625,7 +637,7 @@ export default {
|
||||
if (this.accountsReceivableNum !== null && this.amountReceivedNum !== null) {
|
||||
this.model.outstandingAmount = Number(this.accountsReceivableNum) - Number(this.amountReceivedNum)
|
||||
this.model.outstandingAmount = this.model.outstandingAmount.toFixed(2)
|
||||
if (Number(this.model.outstandingAmount) === 0) {
|
||||
if (Number(this.model.outstandingAmount) <= 0) {
|
||||
this.model.accountStatus = '3'
|
||||
} else if (Number(this.model.outstandingAmount) > 0 && Number(this.model.outstandingAmount) < Number(this.accountsReceivableNum)) {
|
||||
this.model.accountStatus = '2'
|
||||
|
||||
@@ -85,8 +85,14 @@
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入合同编号" @change="event => event.target.value = event.target.value.trim()"
|
||||
:maxLength="50" v-decorator="['contractNo',validatorRules.contractNo]" disabled></a-input>
|
||||
<!-- <a-input placeholder="请输入合同编号" @change="event => event.target.value = event.target.value.trim()"-->
|
||||
<!-- :maxLength="50" v-decorator="['contractNo',validatorRules.contractNo]" disabled></a-input>-->
|
||||
<select-revenue-contract
|
||||
placeholder="请选择合同编号"
|
||||
:company="contractInfo.companyId"
|
||||
disabled
|
||||
v-decorator="['contractNo',validatorRules.contractNo]" >
|
||||
</select-revenue-contract>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -120,14 +126,15 @@ import CompanySelect from '@comp/company/CompanySelect'
|
||||
import {queryContractMemberProject} from '@api/incomeMeetingApi'
|
||||
import {money} from '@/utils/validate'
|
||||
import {addZero} from '@/utils/util'
|
||||
|
||||
import SelectRevenueContract from '../../../../components/tools/SelectRevenueContract'
|
||||
|
||||
export default {
|
||||
name: 'AddMemberProject',
|
||||
components: {
|
||||
SelectContacts,
|
||||
JDictSelectTag,
|
||||
CompanySelect
|
||||
CompanySelect,
|
||||
SelectRevenueContract
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -164,7 +171,7 @@ export default {
|
||||
},
|
||||
contractNo: {
|
||||
rules: [{ required: true, message: '请输入合同号' }],
|
||||
validateTrigger: 'blur',
|
||||
validateTrigger: 'change',
|
||||
},
|
||||
companyContactId: {
|
||||
rules: [{ required: true, message: '请选择企业联系人' }],
|
||||
|
||||
+10
-2
@@ -38,7 +38,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { aduitRevenueContract } from '../../../../api/incomePaymentsApi'
|
||||
import { aduitRevenueContract, aduitExpenditureContract } from '../../../../api/incomePaymentsApi'
|
||||
import { USER_INFO } from '../../../../store/mutation-types'
|
||||
import Vue from 'vue'
|
||||
import pick from 'lodash.pick'
|
||||
@@ -53,6 +53,7 @@ export default {
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
contractId: '',
|
||||
contractType: 1, // 1---收入合同;2---支出合同
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
@@ -92,7 +93,14 @@ export default {
|
||||
values.contractId = this.contractId
|
||||
const formData = Object.assign(this.model, values)
|
||||
console.log('表单提交数据', formData)
|
||||
aduitRevenueContract(formData).then((res) => {
|
||||
// 收入合同、支出合同调用不同接口
|
||||
let methodFunction
|
||||
if (this.contractType === 1) {
|
||||
methodFunction = aduitRevenueContract
|
||||
} else {
|
||||
methodFunction = aduitExpenditureContract
|
||||
}
|
||||
methodFunction(formData).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('ok')
|
||||
|
||||
@@ -503,8 +503,11 @@ export default {
|
||||
this.amountReceivedNum = record.amountReceived
|
||||
this.model = Object.assign({}, record)
|
||||
this.getUserDetailByUserId()
|
||||
// 计算未收金额和赊账状态
|
||||
this.calculateOutstandingAmount()
|
||||
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.calculateOutstandingAmount()方法中计算后回显
|
||||
this.form.setFieldsValue(pick(this.model, 'contractNum', 'contractName', 'signedCompany', 'signedContactsId', 'opening', 'principalId', 'departmentName', 'contractAmount', 'rate', 'noTaxAmount', 'contractDate', 'terminationDate', 'contractTimePoints', 'accountsReceivableAmount', 'amountReceived', 'contractPaymentTimes', 'pack', 'packYear'))
|
||||
this.confirmLoading = false
|
||||
})
|
||||
})
|
||||
@@ -701,7 +704,7 @@ export default {
|
||||
this.model.outstandingAmount = Number(this.accountsReceivableNum) - Number(this.amountReceivedNum)
|
||||
this.model.outstandingAmount = this.model.outstandingAmount.toFixed(2)
|
||||
// 未收金额 === 0,已付全款状态
|
||||
if (Number(this.model.outstandingAmount) === 0) {
|
||||
if (Number(this.model.outstandingAmount) <= 0) {
|
||||
this.model.accountStatus = '3'
|
||||
// 未收金额 > 0 且 未收金额 < 应收金额,部分付款状态
|
||||
} else if (Number(this.model.outstandingAmount) > 0 && Number(this.model.outstandingAmount) < Number(this.accountsReceivableNum)) {
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
</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.chargeCompanyTemporaryName" :maxLength='50'></a-input>
|
||||
<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">
|
||||
@@ -102,7 +103,10 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="incomePayment(record)" v-has="'incomePaymentAndInvoiving:incomePayment'">来款</a>
|
||||
<!-- 未审核通过的会议项目不允许在这里来款-->
|
||||
<a @click="incomePayment(record)"
|
||||
v-has="'incomePaymentAndInvoiving:incomePayment'"
|
||||
:disabled="record.projectType === 3 && record.registerCheckResult === '0'">来款</a>
|
||||
<a @click="invoicing(record)" :disabled="record.needInvoice === 0"
|
||||
v-has="'incomePaymentAndInvoiving:invoicing'">开票</a>
|
||||
</span>
|
||||
@@ -213,6 +217,12 @@ export default {
|
||||
width: 280,
|
||||
dataIndex: 'chargeCompanyTemporaryName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '企业联系人',
|
||||
align: 'center',
|
||||
width: 280,
|
||||
dataIndex: 'contactsTemporaryName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '应收金额',
|
||||
align: 'center',
|
||||
@@ -295,7 +305,11 @@ export default {
|
||||
* @param record
|
||||
*/
|
||||
invoicing(record) {
|
||||
console.log(record)
|
||||
// 标协会员项目必须先到账后开票
|
||||
if (record.projectType === 5 && record.inAccount !== 1) {
|
||||
this.$message.warn('标协会员项目必须先到账才可开票。')
|
||||
return
|
||||
}
|
||||
this.mailContactsId = record.mailContactsId
|
||||
this.selectProjectId = record.id
|
||||
this.selectProjectType = record.projectType
|
||||
@@ -359,7 +373,7 @@ export default {
|
||||
if (arr.some(item => item.projectType === 5)) {
|
||||
// 标协会员项目是否完全到账
|
||||
if (arr.some(item => item.inAccount !== 1)) {
|
||||
reject('存在未全部到账的标协会员项目!')
|
||||
reject('标协会员项目必须先到账才可开票。')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,9 +82,10 @@
|
||||
<a-form-item label="报名截止时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-date placeholder="请选择报名截止时间" style="width: 100%;"
|
||||
v-decorator="['registerDeadline',validatorRules.registerDeadline]" :trigger-change="true"
|
||||
date-format="YYYY-MM-DD HH:mm" :show-time="true"/>
|
||||
date-format="YYYY-MM-DD HH:mm:ss" :show-time="true"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
|
||||
<a-row>
|
||||
@@ -180,7 +181,11 @@
|
||||
<!--邀请码end-->
|
||||
|
||||
<!--会议费用begin-->
|
||||
<div class="item-title">会议费用</div>
|
||||
<div>
|
||||
<span class="item-title">会议费用</span>
|
||||
<!-- 工作组会议添加的需求变更-->
|
||||
<span class="working-group-remind" v-if="isWorkGroupMeetType">不收费请填写0元</span>
|
||||
</div>
|
||||
<a-row :gutter="24">
|
||||
|
||||
<a-col :xxl="8" :xl="12" :sm="24">
|
||||
@@ -269,8 +274,8 @@
|
||||
<a-form-item :wrapperCol="{xl:{span:17}}">
|
||||
<a-input
|
||||
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"
|
||||
:maxLength="11"
|
||||
v-decorator="['hotelContactsList['+index+'].hotelContactsPhone',validateInviteCode.telephoneNumber]"
|
||||
:maxLength="15"
|
||||
v-decorator="['hotelContactsList['+index+'].hotelContactsPhone',validatorRules.telephoneNumber]"
|
||||
placeholder="请输入联系人手机号"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -328,9 +333,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getUserInfo, getMeetInfoById} from '@api/incomeMeetingApi'
|
||||
import {isRepeat} from '@/utils/util'
|
||||
import {httpAction} from '@api/manage'
|
||||
import { getUserInfo, getMeetInfoById } from '@api/incomeMeetingApi'
|
||||
import { isRepeat } from '@/utils/util'
|
||||
import { httpAction } from '@api/manage'
|
||||
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||
import JYearDate from '@comp/jero/JYearDate'
|
||||
import JUpload from '@comp/jero/JUpload'
|
||||
@@ -343,9 +348,9 @@ import pick from 'lodash.pick'
|
||||
import meetingValidate from '@views/incomePayments/meetManage/meetingValidate'
|
||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import JImageUpload from '@comp/jero/JImageUpload'
|
||||
import {checkMeetingName} from '@/utils/validateOnly'
|
||||
import {addZero} from '@/utils/util'
|
||||
import {money,phoneReg} from '@/utils/validate'
|
||||
import { checkMeetingName } from '@/utils/validateOnly'
|
||||
import { addZero } from '@/utils/util'
|
||||
import { money } from '@/utils/validate'
|
||||
|
||||
export default {
|
||||
name: 'AddOrDetailMeet',
|
||||
@@ -368,26 +373,26 @@ export default {
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
labelCol: {
|
||||
xxl: {span: 7},
|
||||
xs: {span: 24},
|
||||
sm: {span: 6}
|
||||
xxl: { span: 7 },
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xxl: {span: 17},
|
||||
xs: {span: 24},
|
||||
sm: {span: 18}
|
||||
xxl: { span: 17 },
|
||||
xs: { span: 24 },
|
||||
sm: { span: 18 }
|
||||
},
|
||||
remarksLabelCol: {
|
||||
xxl: {span: 3},
|
||||
xl: {span: 4},
|
||||
xs: {span: 24},
|
||||
sm: {span: 3}
|
||||
xxl: { span: 3 },
|
||||
xl: { span: 4 },
|
||||
xs: { span: 24 },
|
||||
sm: { span: 3 }
|
||||
},
|
||||
remarksWrapperCol: {
|
||||
xxl: {span: 21},
|
||||
xl: {span: 20},
|
||||
xs: {span: 24},
|
||||
sm: {span: 21}
|
||||
xxl: { span: 21 },
|
||||
xl: { span: 20 },
|
||||
xs: { span: 24 },
|
||||
sm: { span: 21 }
|
||||
},
|
||||
// 详细地址
|
||||
address: '',
|
||||
@@ -395,45 +400,39 @@ export default {
|
||||
validateInviteCode: {
|
||||
invitationCode: {
|
||||
rules: [
|
||||
{required: true, validator: this.validateCode},
|
||||
{ required: true, validator: this.validateCode }
|
||||
],
|
||||
validateTrigger: ['blur']
|
||||
},
|
||||
meetingName: {
|
||||
rules: [
|
||||
{required: true, validator: this.validaeMeetingName},
|
||||
{ required: true, validator: this.validaeMeetingName }
|
||||
],
|
||||
validateTrigger: ['blur']
|
||||
},
|
||||
particularYear: {
|
||||
rules: [
|
||||
{required: true, validator: this.validateYear},
|
||||
{ required: true, validator: this.validateYear }
|
||||
],
|
||||
validateTrigger: ['blur', 'change'],
|
||||
initialValue: this.$store.getters.currentYear
|
||||
},
|
||||
meetingCosts: {
|
||||
rules: [
|
||||
{required: true, validator: this.validateMeetingCosts},
|
||||
{ required: true, validator: this.validateMeetingCosts }
|
||||
],
|
||||
validateTrigger: ['blur']
|
||||
},
|
||||
meetingCostsVip: {
|
||||
rules: [
|
||||
{required: true, validator: this.validateMeetingCostsVip},
|
||||
{ required: true, validator: this.validateMeetingCostsVip }
|
||||
],
|
||||
validateTrigger: ['blur']
|
||||
},
|
||||
telephoneNumber:{
|
||||
rules: [
|
||||
{ required: true, validator:this.validatePhone },
|
||||
],
|
||||
validateTrigger:['blur']
|
||||
}
|
||||
},
|
||||
url: {
|
||||
add: '/meeting/payMeeting/add',
|
||||
edit: '/meeting/payMeeting/edit',
|
||||
edit: '/meeting/payMeeting/edit'
|
||||
},
|
||||
// 召开时间
|
||||
newConvokeTime: '',
|
||||
@@ -444,9 +443,9 @@ export default {
|
||||
// 收费二维码显示
|
||||
QRcodeBool: true,
|
||||
// 召开地点border颜色控制
|
||||
hasError:false,
|
||||
hasError: false,
|
||||
// 会议类型
|
||||
meetingType: '',
|
||||
meetingType: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -465,13 +464,13 @@ export default {
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.pcaData = new AreaPca()
|
||||
// 编辑获取会议信息 有id就是编辑走编辑
|
||||
if (this.$route.query.id) {
|
||||
getMeetInfoById({id: this.$route.query.id}).then(res => {
|
||||
getMeetInfoById({ id: this.$route.query.id }).then(res => {
|
||||
if (res.success) {
|
||||
this.edit(res.result)
|
||||
}
|
||||
@@ -549,7 +548,7 @@ export default {
|
||||
}
|
||||
// 如果是工作组会议 赋值工作组
|
||||
if (this.meetingType === '1') {
|
||||
this.form.setFieldsValue(pick(this.model, 'workingGroupId',))
|
||||
this.form.setFieldsValue(pick(this.model, 'workingGroupId'))
|
||||
}
|
||||
// 如果是国际研讨会则赋值邀请码
|
||||
if (this.meetingType === '3') {
|
||||
@@ -579,7 +578,7 @@ export default {
|
||||
httpurl = this.url.add
|
||||
}
|
||||
let placeName = values.convokeLocale
|
||||
const formData = Object.assign(this.model, values, {venue: this.getPcaText(placeName)})
|
||||
const formData = Object.assign(this.model, values, { venue: this.getPcaText(placeName) })
|
||||
// 如果会议的费用未为0 不能上传缴费凭证
|
||||
if (values.meetingCosts === '0.00') {
|
||||
delete formData.paymentQrCode
|
||||
@@ -622,8 +621,8 @@ export default {
|
||||
/*
|
||||
*
|
||||
* */
|
||||
changeConvoke(val){
|
||||
if(val){
|
||||
changeConvoke(val) {
|
||||
if (val) {
|
||||
this.hasError = false
|
||||
}
|
||||
},
|
||||
@@ -659,10 +658,10 @@ export default {
|
||||
* 会议负责人
|
||||
* */
|
||||
selectPerson(val) {
|
||||
getUserInfo({id: val}).then(res => {
|
||||
getUserInfo({ id: val }).then(res => {
|
||||
if (res.success) {
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({directorPhone: res.result.phone})
|
||||
this.form.setFieldsValue({ directorPhone: res.result.phone })
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -675,7 +674,7 @@ export default {
|
||||
this.$message.warning('最多添加5个酒店联系人')
|
||||
return
|
||||
}
|
||||
const {form} = this
|
||||
const { form } = this
|
||||
const obj = {
|
||||
hotelContacts: '',
|
||||
hotelContactsPhone: ''
|
||||
@@ -698,7 +697,7 @@ export default {
|
||||
if (this.model.hotelContactsList.length === 1) {
|
||||
return
|
||||
}
|
||||
const {form} = this
|
||||
const { form } = this
|
||||
// // can use data-binding to get
|
||||
const hotelContactsList = form.getFieldValue('hotelContactsList')
|
||||
// 把循环的dom元素删除
|
||||
@@ -807,7 +806,7 @@ export default {
|
||||
}
|
||||
const year = new Date().getFullYear()
|
||||
if (Number(value) < year) {
|
||||
callback(`请选择${year}年或之后的年份`)
|
||||
callback(`请选择${ year }年或之后的年份`)
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@@ -847,19 +846,6 @@ export default {
|
||||
} else {
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
}
|
||||
},
|
||||
/*
|
||||
* 手机号码校验
|
||||
* */
|
||||
validatePhone(rule, value, callback){
|
||||
if (value === undefined || value === '' || value === null) {
|
||||
callback('请输入联系人手机号')
|
||||
}
|
||||
if (value && phoneReg(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback('请输入正确的联系人手机号')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -894,6 +880,12 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
/*会议费用添加的提示语*/
|
||||
.working-group-remind {
|
||||
color: red;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* 新建会议 */
|
||||
|
||||
.project-base-info-title {
|
||||
|
||||
@@ -132,17 +132,23 @@
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
>
|
||||
<a-input
|
||||
placeholder="请输入合同号"
|
||||
:maxLength="50"
|
||||
<!-- <a-input-->
|
||||
<!-- placeholder="请输入合同号"-->
|
||||
<!-- :maxLength="50"-->
|
||||
<!-- v-decorator="['contractNo', validatorRules.contractNo]"-->
|
||||
<!-- :disabled="isAssociatedContract"-->
|
||||
<!-- @change="-->
|
||||
<!-- (e) => {-->
|
||||
<!-- e.target.value = (e.target.value + '').trim();-->
|
||||
<!-- }-->
|
||||
<!-- "-->
|
||||
<!-- ></a-input>-->
|
||||
<select-revenue-contract
|
||||
:company="selectedCompany"
|
||||
placeholder="请选择合同号"
|
||||
v-decorator="['contractNo', validatorRules.contractNo]"
|
||||
:disabled="isAssociatedContract"
|
||||
@change="
|
||||
(e) => {
|
||||
e.target.value = (e.target.value + '').trim();
|
||||
}
|
||||
"
|
||||
></a-input>
|
||||
:disabled="isAssociatedContract">
|
||||
</select-revenue-contract>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -207,11 +213,11 @@
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<!-- <contact-management-module-->
|
||||
<!-- ref="contactForm"-->
|
||||
<!-- is-company-disabled-->
|
||||
<!-- :selected-company="selectedCompany"-->
|
||||
<!-- ></contact-management-module>-->
|
||||
<!-- <contact-management-module-->
|
||||
<!-- ref="contactForm"-->
|
||||
<!-- is-company-disabled-->
|
||||
<!-- :selected-company="selectedCompany"-->
|
||||
<!-- ></contact-management-module>-->
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
@@ -222,9 +228,10 @@ import JUpload from '@comp/jero/JUpload'
|
||||
import CompanySelect from '@comp/company/CompanySelect'
|
||||
// import ContactManagementModule from '@views/businessManagement/modules/ContactManagementModule'
|
||||
import SelectContacts from '@comp/company/SelectContacts'
|
||||
import {addZero} from '@/utils/util'
|
||||
import {money} from '@/utils/validate'
|
||||
import {checkAssociatedProject} from '@/utils/projectCheck'
|
||||
import { addZero } from '@/utils/util'
|
||||
import { money } from '@/utils/validate'
|
||||
import { checkAssociatedProject } from '@/utils/projectCheck'
|
||||
import SelectRevenueContract from '../../../../components/tools/SelectRevenueContract'
|
||||
|
||||
export default {
|
||||
name: 'SafeguardMemberModal',
|
||||
@@ -233,6 +240,7 @@ export default {
|
||||
CompanySelect,
|
||||
// ContactManagementModule,
|
||||
SelectContacts,
|
||||
SelectRevenueContract
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -244,58 +252,58 @@ export default {
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 18 },
|
||||
sm: { span: 18 }
|
||||
},
|
||||
remarksLabelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 3 },
|
||||
sm: { span: 3 }
|
||||
},
|
||||
remarksWrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 21 },
|
||||
sm: { span: 21 }
|
||||
},
|
||||
validatorRules: {
|
||||
companyId: {
|
||||
rules: [{ required: true, message: '请选择会员单位' }],
|
||||
validateTrigger: 'blur',
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
contractNo: {
|
||||
rules: [{ required: true, message: '请输入合同号' }],
|
||||
validateTrigger: 'blur',
|
||||
rules: [{ required: true, message: '请选择合同号' }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
companyContactId: {
|
||||
rules: [{ required: true, message: '请选择企业联系人' }],
|
||||
validateTrigger: 'change',
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
postContactId: {
|
||||
rules: [{ required: true, message: '请选择邮寄联系人' }],
|
||||
validateTrigger: 'change',
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
paymentMethod: {
|
||||
rules: [{ required: true, message: '请选择来款方式' }],
|
||||
validateTrigger: ['blur', 'change'],
|
||||
initialValue: 3,
|
||||
initialValue: 3
|
||||
},
|
||||
amountReceivable: {
|
||||
rules: [
|
||||
{required: true, validator: this.validateMoney},
|
||||
{ required: true, validator: this.validateMoney }
|
||||
],
|
||||
validateTrigger: ['blur']
|
||||
},
|
||||
|
||||
chargeNoticeNo: {
|
||||
rules: [{ required: true, message: '请输入收费通知号' }],
|
||||
validateTrigger: 'blur',
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
needInvoice: {
|
||||
rules: [{ required: true, message: '请选择发票类型' }],
|
||||
validateTrigger: ['change', 'blur'],
|
||||
initialValue: 0,
|
||||
},
|
||||
initialValue: 0
|
||||
}
|
||||
},
|
||||
// 来款方式
|
||||
incomePaysType: 3,
|
||||
@@ -309,10 +317,10 @@ export default {
|
||||
baseInfo: this.$store.state.currentProjetcInfo,
|
||||
url: {
|
||||
add: '/jero/memberProjectSubitem/add',
|
||||
edit: '/jero/memberProjectSubitem/edit',
|
||||
edit: '/jero/memberProjectSubitem/edit'
|
||||
},
|
||||
disabledCompany: false, // 企业是否可以编辑
|
||||
isAssociatedContract: false, // 是否已关联合同
|
||||
isAssociatedContract: false // 是否已关联合同
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -354,7 +362,7 @@ export default {
|
||||
this.timer = setTimeout(() => {
|
||||
this.form.setFieldsValue({
|
||||
chargeNoticeFileId: this.baseInfo.chargeNoticeFileId,
|
||||
chargeNoticeNo: this.baseInfo.chargeNoticeNo,
|
||||
chargeNoticeNo: this.baseInfo.chargeNoticeNo
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
@@ -363,16 +371,16 @@ export default {
|
||||
if (record.companyId) {
|
||||
this.model.companyId = {
|
||||
id: record.companyId,
|
||||
companyName: record.companyName,
|
||||
companyName: record.companyName
|
||||
}
|
||||
this.selectedCompany = Object.assign({}, this.model.companyId)
|
||||
this.selectPerson = {
|
||||
id: this.model.companyContactTemporaryId,
|
||||
name: this.model.companyContactName,
|
||||
name: this.model.companyContactName
|
||||
}
|
||||
this.selectMailPerson = {
|
||||
id: this.model.postContactTemporaryId,
|
||||
name: this.model.postContactName,
|
||||
name: this.model.postContactName
|
||||
}
|
||||
// 修改来款方式 控制dom对应显示隐藏
|
||||
this.incomePaysType = record.paymentMethod
|
||||
@@ -397,10 +405,10 @@ export default {
|
||||
})
|
||||
},
|
||||
// 选择企业联系人 带出邮寄联系人
|
||||
changetPerson(val){
|
||||
changetPerson(val) {
|
||||
// 只有邮寄联系人没有值的时候才去联动复制
|
||||
if(this.form.getFieldValue('postContactId') === undefined ){
|
||||
this.form.setFieldsValue({'postContactId':val})
|
||||
if (this.form.getFieldValue('postContactId') === undefined) {
|
||||
this.form.setFieldsValue({ 'postContactId': val })
|
||||
}
|
||||
},
|
||||
close() {
|
||||
@@ -454,7 +462,9 @@ export default {
|
||||
* 选择会员单位
|
||||
* */
|
||||
companyChange(val) {
|
||||
this.selectedCompany = Object.assign({}, val, )
|
||||
// 清除合同号
|
||||
this.form.setFieldsValue({ contractNo: undefined })
|
||||
this.selectedCompany = Object.assign({}, val)
|
||||
},
|
||||
handleCancel() {
|
||||
this.selectedCompany = null
|
||||
@@ -472,8 +482,8 @@ export default {
|
||||
addContactsOk() {
|
||||
this.$refs.selectContacts.getContactsList()
|
||||
this.$refs.selectMailContacts.getContactsList()
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -179,6 +179,13 @@ export default {
|
||||
dataIndex: 'chargeCompanyName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
// {
|
||||
// title: '企业联系人',
|
||||
// align: 'center',
|
||||
// width: 300,
|
||||
// dataIndex: 'principalName',
|
||||
// scopedSlots: { customRender: 'text' }
|
||||
// },
|
||||
{
|
||||
title: '邮寄联系人',
|
||||
align: 'center',
|
||||
|
||||
@@ -113,13 +113,14 @@ export default {
|
||||
width: 280,
|
||||
dataIndex: 'companyTemporaryName',
|
||||
scopedSlots: { customRender: 'projectName' }
|
||||
}, {
|
||||
title: '打包年份',
|
||||
},
|
||||
{
|
||||
title: '企业联系人',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'packYear',
|
||||
width: 280,
|
||||
dataIndex: 'companyContactTemporaryName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
},{
|
||||
title: '打包联系人',
|
||||
align: 'center',
|
||||
width: 280,
|
||||
@@ -138,24 +139,27 @@ export default {
|
||||
dataIndex: 'receiptExpense',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '企业联系人',
|
||||
title: '打包年份',
|
||||
align: 'center',
|
||||
width: 280,
|
||||
dataIndex: 'companyContactTemporaryName',
|
||||
width: 140,
|
||||
dataIndex: 'packYear',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '联系人电话',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'phone',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '邮箱',
|
||||
align: 'center',
|
||||
width: 280,
|
||||
dataIndex: 'email',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
},
|
||||
|
||||
// {
|
||||
// title: '联系人电话',
|
||||
// align: 'center',
|
||||
// width: 200,
|
||||
// dataIndex: 'phone',
|
||||
// scopedSlots: { customRender: 'text' }
|
||||
// }, {
|
||||
// title: '邮箱',
|
||||
// align: 'center',
|
||||
// width: 280,
|
||||
// dataIndex: 'email',
|
||||
// scopedSlots: { customRender: 'text' }
|
||||
// },
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
|
||||
@@ -273,24 +273,6 @@ export default {
|
||||
width: 140,
|
||||
dataIndex: 'principalName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '企业联系人',
|
||||
align: 'center',
|
||||
width: 280,
|
||||
dataIndex: 'contactsTemporaryName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '联系人电话',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'phone',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '联系人邮箱',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'email',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '应收金额',
|
||||
align: 'center',
|
||||
@@ -331,6 +313,24 @@ export default {
|
||||
width: 80,
|
||||
dataIndex: 'mail',
|
||||
scopedSlots: { customRender: 'status-mail' }
|
||||
}, {
|
||||
title: '企业联系人',
|
||||
align: 'center',
|
||||
width: 280,
|
||||
dataIndex: 'contactsTemporaryName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '联系人电话',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'phone',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '联系人邮箱',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'email',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
@@ -504,7 +504,10 @@ export default {
|
||||
* @param record
|
||||
*/
|
||||
invoicing(record) {
|
||||
console.log(record)
|
||||
if (record.projectType === 5 && record.inAccount !== 1) {
|
||||
this.$message.warn('标协会员项目必须先到账才可开票。')
|
||||
return
|
||||
}
|
||||
this.selectProjectName = record.chargeProject
|
||||
this.selectProjectId = record.id
|
||||
this.selectProjectType = record.projectType
|
||||
@@ -530,6 +533,13 @@ export default {
|
||||
if (arr.some(item => item.makeInvoice === 1)) {
|
||||
reject('存在已完成开票的项目!')
|
||||
}
|
||||
// 是否选中了标协会员项目,标协会员项目只能到账一次、开票一次,前端进行是否完全到账的限制
|
||||
if (arr.some(item => item.projectType === 5)) {
|
||||
// 标协会员项目是否完全到账
|
||||
if (arr.some(item => item.inAccount !== 1)) {
|
||||
reject('标协会员项目必须先到账才可开票。')
|
||||
}
|
||||
}
|
||||
}
|
||||
// 来款
|
||||
if (operateType === 'incomePayment') {
|
||||
|
||||
@@ -145,10 +145,16 @@ export default {
|
||||
}, {
|
||||
title: '项目负责人',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
width: 280,
|
||||
dataIndex: 'principalName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
},{
|
||||
title: '企业联系人',
|
||||
align: 'center',
|
||||
width: 280,
|
||||
dataIndex: 'contactsTemporaryName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '应收金额',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
|
||||
@@ -122,11 +122,17 @@
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="合同号" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="chargeWayType === 2">
|
||||
<a-input placeholder="请输入合同号"
|
||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||
:maxLength='50'
|
||||
:disabled="isContractNumDisabled || isAssociatedContract"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
<!-- <a-input placeholder="请输入合同号"-->
|
||||
<!-- v-decorator="['contractNum',validatorRules.contractNum]"-->
|
||||
<!-- :maxLength='50'-->
|
||||
<!-- :disabled="isContractNumDisabled || isAssociatedContract"-->
|
||||
<!-- @change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>-->
|
||||
<select-revenue-contract
|
||||
placeholder="请选择合同号"
|
||||
:company="selectedCompany"
|
||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||
:disabled="isContractNumDisabled || isAssociatedContract">
|
||||
</select-revenue-contract>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -191,10 +197,11 @@ import Vue from 'vue'
|
||||
import { USER_INFO } from '../../../store/mutation-types'
|
||||
import { money } from '../../../utils/validate'
|
||||
import { checkAssociatedProject } from '../../../utils/projectCheck'
|
||||
import SelectRevenueContract from '../../../components/tools/SelectRevenueContract'
|
||||
|
||||
export default {
|
||||
name: 'GeneralProjectModule',
|
||||
components: { JYearDate, JUpload, CompanySelect, SelectPrincipal, SelectContacts },
|
||||
components: { JYearDate, JUpload, CompanySelect, SelectPrincipal, SelectContacts, SelectRevenueContract },
|
||||
props: {
|
||||
// 收入合同关联时传入的企业信息,不可修改
|
||||
defaultChargeCompany: {
|
||||
@@ -306,8 +313,8 @@ export default {
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
contractNum: {
|
||||
rules: [{ required: true, message: '请输入合同号' }],
|
||||
validateTrigger: 'blur'
|
||||
rules: [{ required: true, message: '请选择合同号' }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
chargeNoticeNo: {
|
||||
rules: [{ required: true, message: '请输入收费通知号' }],
|
||||
@@ -468,8 +475,9 @@ export default {
|
||||
this.selectedCompany = value
|
||||
this.model.contactsId = undefined
|
||||
this.model.mailContactsId = undefined
|
||||
this.model.contractNum = undefined
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'contactsId', 'mailContactsId'))
|
||||
this.form.setFieldsValue(pick(this.model, 'contactsId', 'mailContactsId', 'contractNum'))
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -88,8 +88,10 @@
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="来款方式" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<span v-if="defaultChargeWay === 2">合同</span>
|
||||
<a-radio-group v-decorator="['chargeWay',validatorRules.chargeWay]" @change="handlechargeWayChange"
|
||||
v-else :disabled="isAssociatedContract">
|
||||
<a-radio-group v-decorator="['chargeWay',validatorRules.chargeWay]"
|
||||
@change="handlechargeWayChange"
|
||||
v-else
|
||||
:disabled="isAssociatedContract">
|
||||
<a-radio :value="1">无</a-radio>
|
||||
<a-radio :value="2">合同</a-radio>
|
||||
<a-radio :value="3">收费通知</a-radio>
|
||||
@@ -138,11 +140,17 @@
|
||||
</a-col>
|
||||
<a-col :xl="12" :sm="24">
|
||||
<a-form-item label="合同号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入合同号"
|
||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||
:maxLength='50'
|
||||
:disabled="isContractNumDisabled || isAssociatedContract"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
<!-- <a-input placeholder="请输入合同号"-->
|
||||
<!-- v-decorator="['contractNum',validatorRules.contractNum]"-->
|
||||
<!-- :maxLength='50'-->
|
||||
<!-- :disabled="isContractNumDisabled || isAssociatedContract"-->
|
||||
<!-- @change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>-->
|
||||
<select-revenue-contract
|
||||
placeholder="请选择合同号"
|
||||
:company="selectedCompany"
|
||||
:disabled="isContractNumDisabled || isAssociatedContract"
|
||||
v-decorator="['contractNum',validatorRules.contractNum]">
|
||||
</select-revenue-contract>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -227,10 +235,11 @@ import { isRepeat } from '../../../utils/util'
|
||||
import { addZero } from '../../../utils/util'
|
||||
import { money } from '../../../utils/validate'
|
||||
import { checkAssociatedProject } from '../../../utils/projectCheck'
|
||||
import SelectRevenueContract from '../../../components/tools/SelectRevenueContract'
|
||||
|
||||
export default {
|
||||
name: 'WorkingGroupMemberUnitModule',
|
||||
components: { JUpload, CompanySelect, SelectContacts },
|
||||
components: { JUpload, CompanySelect, SelectContacts, SelectRevenueContract },
|
||||
props: {
|
||||
// 默认来款方式(收入合同新增工作组项目,来款方式默认为2--合同)
|
||||
defaultChargeWay: {
|
||||
@@ -331,8 +340,8 @@ export default {
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
contractNum: {
|
||||
rules: [{ required: true, message: '请输入合同号' }],
|
||||
validateTrigger: 'blur'
|
||||
rules: [{ required: true, message: '请选择合同号' }],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
charge: {
|
||||
rules: [{ required: true, message: '请输入收费通知号' }],
|
||||
@@ -411,6 +420,7 @@ export default {
|
||||
checkAssociatedProject(record.id).then(res => {
|
||||
this.disabledCompany = this.disabledChargeCompany || res || (!!record.inAccount && record.inAccount !== 0) || (!!record.makeInvoice && record.makeInvoice !== 0) || (!!record.mail && record.mail !== 0)
|
||||
this.isAssociatedContract = res
|
||||
console.log(this.isContractNumDisabled,this.isAssociatedContract, this.isContractNumDisabled || this.isAssociatedContract, '----------------')
|
||||
})
|
||||
} else {
|
||||
this.disabledCompany = this.disabledChargeCompany
|
||||
@@ -578,8 +588,9 @@ export default {
|
||||
this.model.contactsIdTwo = undefined
|
||||
this.model.contactsIdThree = undefined
|
||||
this.model.mailContactsId = undefined
|
||||
this.model.contractNum = undefined
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'contactsIdOne', 'contactsIdTwo', 'contactsIdThree', 'mailContactsId'))
|
||||
this.form.setFieldsValue(pick(this.model, 'contactsIdOne', 'contactsIdTwo', 'contactsIdThree', 'mailContactsId', 'contractNum'))
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user