[update] 收入合同普通项目工作组项目新增带出合同号
This commit is contained in:
@@ -54,6 +54,12 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
default: undefined
|
default: undefined
|
||||||
|
},
|
||||||
|
// 取消时将isCancel设为true,用于重置是否为第一次展开下拉
|
||||||
|
isCancel: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -85,6 +91,13 @@ export default {
|
|||||||
this.isFirstOpen = true
|
this.isFirstOpen = true
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
|
},
|
||||||
|
isCancel(val) {
|
||||||
|
if (val) {
|
||||||
|
this.isFirstOpen = true
|
||||||
|
// 取消时重新获取联系人列表,将临时联系人信息加入列表中
|
||||||
|
this.getContactsList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ export default {
|
|||||||
this.visible = true
|
this.visible = true
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
this.choosedType = null
|
||||||
|
this.choosedIndex = null
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
chooseProjectType(index, type) {
|
chooseProjectType(index, type) {
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
<select-contacts placeholder="请选择签订联系人"
|
<select-contacts placeholder="请选择签订联系人"
|
||||||
:selected-company="selectedCompany"
|
:selected-company="selectedCompany"
|
||||||
:init-contacts="selectedContact"
|
:init-contacts="selectedContact"
|
||||||
|
:is-cancel="isCancel"
|
||||||
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts>
|
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -254,6 +255,7 @@
|
|||||||
<!-- 项目选择-->
|
<!-- 项目选择-->
|
||||||
<select-project-module ref="selectProjectModule"
|
<select-project-module ref="selectProjectModule"
|
||||||
@ok="selectProjectOk"
|
@ok="selectProjectOk"
|
||||||
|
:default-contract-num="contractNum"
|
||||||
:default-charge-company="selectedCompany"></select-project-module>
|
:default-charge-company="selectedCompany"></select-project-module>
|
||||||
<!-- 会议项目选择-->
|
<!-- 会议项目选择-->
|
||||||
<select-meeting-project-module ref="selectMeetingProjectModule"
|
<select-meeting-project-module ref="selectMeetingProjectModule"
|
||||||
@@ -420,6 +422,7 @@ export default {
|
|||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
model: {},
|
model: {},
|
||||||
|
temporaryModel: {}, // 编辑数据临时保存
|
||||||
title: '',
|
title: '',
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
@@ -489,13 +492,16 @@ export default {
|
|||||||
rateNum: null, // 输入的税率
|
rateNum: null, // 输入的税率
|
||||||
selectedContact: null, // 联系人回显
|
selectedContact: null, // 联系人回显
|
||||||
associatedProjectLoading: false,
|
associatedProjectLoading: false,
|
||||||
contractId: '' // 收入合同id
|
contractId: '', // 收入合同id
|
||||||
|
contractNum: '', // 合同号
|
||||||
|
isCancel: false //是否取消
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// 判断是编辑还是新增
|
// 判断是编辑还是新增
|
||||||
if (this.$route.query.hasOwnProperty.call(this.$route.query, 'revenueId')) {
|
if (this.$route.query.hasOwnProperty.call(this.$route.query, 'revenueId')) {
|
||||||
this.contractId = this.$route.query.revenueId
|
this.contractId = this.$route.query.revenueId
|
||||||
|
this.contractNum = this.$route.query.contractNum
|
||||||
this.edit(this.contractId)
|
this.edit(this.contractId)
|
||||||
} else {
|
} else {
|
||||||
this.add()
|
this.add()
|
||||||
@@ -529,12 +535,15 @@ export default {
|
|||||||
id: record.signedContactsTemporaryId,
|
id: record.signedContactsTemporaryId,
|
||||||
name: record.signedContactsTemporaryName
|
name: record.signedContactsTemporaryName
|
||||||
}
|
}
|
||||||
|
// 回显打包年份
|
||||||
|
this.isPackage = record.pack === 1
|
||||||
// 处理分期信息回显
|
// 处理分期信息回显
|
||||||
this.$refs.installmentForm.initInstallmentList(record.listInstallment)
|
this.$refs.installmentForm.initInstallmentList(record.listInstallment)
|
||||||
// 获取应收金额和已收金额
|
// 获取应收金额和已收金额
|
||||||
this.accountsReceivableNum = record.accountsReceivableAmount
|
this.accountsReceivableNum = record.accountsReceivableAmount
|
||||||
this.amountReceivedNum = record.amountReceived
|
this.amountReceivedNum = record.amountReceived
|
||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
|
this.temporaryModel = Object.assign({}, record)
|
||||||
this.$nextTick(() => {
|
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.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
|
this.confirmLoading = false
|
||||||
@@ -584,7 +593,18 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleCancle() {
|
handleCancle() {
|
||||||
this.model = {}
|
this.model = this.temporaryModel
|
||||||
|
// 处理联系人信息回显
|
||||||
|
this.isCancel = true
|
||||||
|
this.model.signedContactsId = this.model.signedContactsTemporaryId
|
||||||
|
this.selectedContact = {
|
||||||
|
id: this.model.signedContactsTemporaryId,
|
||||||
|
name: this.model.signedContactsTemporaryName
|
||||||
|
}
|
||||||
|
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
|
||||||
|
})
|
||||||
},
|
},
|
||||||
installmentFormOk(value) {
|
installmentFormOk(value) {
|
||||||
this.installmentList = value.installmentList
|
this.installmentList = value.installmentList
|
||||||
@@ -795,13 +815,14 @@ export default {
|
|||||||
case 1:
|
case 1:
|
||||||
this.$refs.selectProjectModule.columns = generalProjectColumns
|
this.$refs.selectProjectModule.columns = generalProjectColumns
|
||||||
this.getUserDetailByUserId().then(res => {
|
this.getUserDetailByUserId().then(res => {
|
||||||
console.log(res)
|
console.log(this.model.pack)
|
||||||
// 混入筛选条件
|
// 混入筛选条件
|
||||||
this.$refs.selectProjectModule.filters = {
|
this.$refs.selectProjectModule.filters = {
|
||||||
chargeCompanyId: this.selectedCompany.id,
|
chargeCompanyId: this.selectedCompany.id,
|
||||||
contractId: this.contractId,
|
contractId: this.contractId,
|
||||||
departId: res.split(',')[0]
|
departId: res.split(',')[0] // 一个用户多部门情况下传给后端第一个部门id
|
||||||
}
|
}
|
||||||
|
// 查询条件回显
|
||||||
this.$refs.selectProjectModule.queryParam.departId = res.split(',')
|
this.$refs.selectProjectModule.queryParam.departId = res.split(',')
|
||||||
// 获取数据list
|
// 获取数据list
|
||||||
this.$refs.selectProjectModule.url.list = this.url.generalProjectList
|
this.$refs.selectProjectModule.url.list = this.url.generalProjectList
|
||||||
@@ -813,6 +834,8 @@ export default {
|
|||||||
this.$refs.selectProjectModule.projectType = type
|
this.$refs.selectProjectModule.projectType = type
|
||||||
// 标题
|
// 标题
|
||||||
this.$refs.selectProjectModule.title = '普通项目列表'
|
this.$refs.selectProjectModule.title = '普通项目列表'
|
||||||
|
// 获取负责人列表
|
||||||
|
this.$refs.selectProjectModule.departChange(res.split(',')[0])
|
||||||
// 打开弹窗
|
// 打开弹窗
|
||||||
this.$refs.selectProjectModule.open()
|
this.$refs.selectProjectModule.open()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -14,13 +14,13 @@
|
|||||||
<template v-if="projectType === 1">
|
<template v-if="projectType === 1">
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
<a-form-item label="科室" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="科室" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<!-- :disabled="pack === 0" -->
|
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
:dropdownStyle="{ maxHeight: '200px',maxWidth:'100px','overflow-x':'hidden',' overflow-y': 'auto' }"
|
:dropdownStyle="{ maxHeight: '200px',maxWidth:'100px','overflow-x':'hidden',' overflow-y': 'auto' }"
|
||||||
:treeData="treeDepartData"
|
:treeData="treeDepartData"
|
||||||
v-model="queryParam.departId"
|
v-model="queryParam.departId"
|
||||||
placeholder="请选择科室"
|
placeholder="请选择科室"
|
||||||
|
:disabled="pack === 0"
|
||||||
@change="departChange">
|
@change="departChange">
|
||||||
</a-tree-select>
|
</a-tree-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -114,12 +114,14 @@
|
|||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:disabled-charge-company="true"
|
:disabled-charge-company="true"
|
||||||
:default-charge-way="2"
|
:default-charge-way="2"
|
||||||
|
:is-contract-num-disabled="true"
|
||||||
@ok="modalFormOk"></general-project-module>
|
@ok="modalFormOk"></general-project-module>
|
||||||
<!-- 工作组项目新增-->
|
<!-- 工作组项目新增-->
|
||||||
<working-group-member-unit-module ref="workingGroupMemberForm"
|
<working-group-member-unit-module ref="workingGroupMemberForm"
|
||||||
@ok="modalFormOk"
|
@ok="modalFormOk"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:disabled-charge-company="true"
|
:disabled-charge-company="true"
|
||||||
|
:is-contract-num-disabled="true"
|
||||||
:default-charge-way="2"></working-group-member-unit-module>
|
:default-charge-way="2"></working-group-member-unit-module>
|
||||||
</j-modal>
|
</j-modal>
|
||||||
</template>
|
</template>
|
||||||
@@ -196,6 +198,7 @@ export default {
|
|||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
|
this.selectedRowKeys = []
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
handleOk() {
|
handleOk() {
|
||||||
|
|||||||
@@ -121,6 +121,7 @@
|
|||||||
<a-input placeholder="请输入合同号"
|
<a-input placeholder="请输入合同号"
|
||||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
:disabled="isContractNumDisabled"
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -190,11 +191,23 @@ export default {
|
|||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
// 默认来款方式(收入合同新增工作组项目,来款方式默认为2--合同)
|
// 默认来款方式(收入合同新增项目,来款方式默认为2--合同)
|
||||||
defaultChargeWay: {
|
defaultChargeWay: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
default: null
|
default: null
|
||||||
|
},
|
||||||
|
// 收入合同新增项目时带入合同号且不可修改
|
||||||
|
defaultContractNum: {
|
||||||
|
type: String,
|
||||||
|
requirde: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
// 合同号是否可编辑
|
||||||
|
isContractNumDisabled: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -286,6 +299,12 @@ export default {
|
|||||||
if (this.defaultChargeWay === 2) {
|
if (this.defaultChargeWay === 2) {
|
||||||
this.chargeWayType = 2
|
this.chargeWayType = 2
|
||||||
}
|
}
|
||||||
|
if (this.defaultContractNum && this.defaultContractNum !== '') {
|
||||||
|
this.model.contractNum = this.defaultContractNum
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'contractNum'))
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
edit(record) {
|
edit(record) {
|
||||||
if (this.defaultChargeCompany.hasOwnProperty.call(this.defaultChargeCompany, 'id')) {
|
if (this.defaultChargeCompany.hasOwnProperty.call(this.defaultChargeCompany, 'id')) {
|
||||||
|
|||||||
@@ -122,6 +122,7 @@
|
|||||||
<a-input placeholder="请输入合同号"
|
<a-input placeholder="请输入合同号"
|
||||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
:disabled="isContractNumDisabled"
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -228,6 +229,18 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
// 收入合同新增项目时带入合同号且不可修改
|
||||||
|
defaultContractNum: {
|
||||||
|
type: String,
|
||||||
|
requirde: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
// 合同号是否可编辑
|
||||||
|
isContractNumDisabled: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -315,10 +328,18 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
add() {
|
add() {
|
||||||
this.edit({})
|
this.edit({})
|
||||||
|
// 判断默认来款用途是否为合同(收入合同新增)
|
||||||
if (this.defaultChargeWay) {
|
if (this.defaultChargeWay) {
|
||||||
this.loadWorkingGroupList()
|
this.loadWorkingGroupList()
|
||||||
this.chargeWayType = 2
|
this.chargeWayType = 2
|
||||||
}
|
}
|
||||||
|
// 判断是否存在默认合同号(收入合同新增)
|
||||||
|
if (this.defaultContractNum && this.defaultContractNum !== '') {
|
||||||
|
this.model.contractNum = this.defaultContractNum
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'contractNum'))
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
loadWorkingGroupList() {
|
loadWorkingGroupList() {
|
||||||
let param = {
|
let param = {
|
||||||
|
|||||||
Reference in New Issue
Block a user