[update] - 收入合同-新增页面-增加从iop系统同步合同数据的功能2
This commit is contained in:
@@ -13,11 +13,14 @@ const getContractPage = (params) => postAction('/payResearchProject/payResearchP
|
||||
const getContractList = (params) => postAction('/payResearchProject/payResearchProject/listForThreeContract',params)
|
||||
//合同台账详情接口
|
||||
const getContractById = (params) => getAction(`/payResearchProject/payResearchProject/oneForThreeContract`,params)
|
||||
// 通过 公司名称获取公司的相关信息
|
||||
const getCompanyByName = (params) => getAction(`/company/payCompanyManagement/getCompanyByName`,params)
|
||||
|
||||
export {
|
||||
getAccessToken,
|
||||
refreshToken,
|
||||
getContractPage,
|
||||
getContractList,
|
||||
getContractById
|
||||
getContractById,
|
||||
getCompanyByName
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ export default {
|
||||
methods: {
|
||||
open() {
|
||||
this.visible = true
|
||||
this.loadData(1)
|
||||
this.searchReset()
|
||||
},
|
||||
close() {
|
||||
this.visible = false
|
||||
|
||||
@@ -339,10 +339,10 @@ import { money } from '../../../../utils/validate'
|
||||
import SelectWorkingGroupProjectModule from './SelectWorkingGroupProjectModule'
|
||||
import { addZero } from '../../../../utils/util'
|
||||
import moment from 'moment'
|
||||
import { getAccessToken } from '../../../../api/contractOpenApi'
|
||||
import { getAccessToken, getCompanyByName } from '../../../../api/contractOpenApi'
|
||||
import OtherSystemContract from './OtherSystemContract'
|
||||
import { ConnectionKey } from './ContractData'
|
||||
import Vue from 'vue'
|
||||
|
||||
export default {
|
||||
name: 'RevenueContractModule',
|
||||
components: {
|
||||
@@ -943,7 +943,7 @@ export default {
|
||||
this.$refs.otherSystemContract.open()
|
||||
},
|
||||
// 从iop系统中获取合同的信息
|
||||
updateInfoFunc(info) {
|
||||
async updateInfoFunc(info) {
|
||||
let obj = {}
|
||||
// 提前写好 能对应上的字段
|
||||
Object.keys(ConnectionKey).forEach(key => {
|
||||
@@ -956,18 +956,44 @@ export default {
|
||||
orgCodeTxt: obj.orgCodeTxt // 申请部门
|
||||
}
|
||||
this.$refs.selectPrincipal.setValueByOtherInfo(userInfo)
|
||||
// 签订单位信息的处理
|
||||
// let signedCompanyInit = {
|
||||
// signedCompanyName: info.contSignPartnerAName
|
||||
// }
|
||||
//todo 需要调接口 通过 企业名称查询 当前的企业信息,然后赋值到主体信息中
|
||||
// this.$refs.companySelect.setValueByCompanyName(signedCompanyInit)
|
||||
|
||||
// 需要调接口 通过 企业名称查询 当前的企业信息,然后赋值到主体信息中
|
||||
let signedCompanyObj = await this.getCompanyByName(info.contSignPartnerAName)
|
||||
// 如果能获取到签订单位数据,则直接回显
|
||||
if(signedCompanyObj.id) {
|
||||
// 签订单位信息的处理
|
||||
obj.signedCompany = {
|
||||
id: signedCompanyObj.id,
|
||||
companyName: signedCompanyObj.companyName
|
||||
}
|
||||
// 触发 签订单位的change 事件
|
||||
this.handleSignedCompanyChange(obj.signedCompany)
|
||||
} else {
|
||||
obj.signedCompany = {
|
||||
id: '',
|
||||
companyName: ''
|
||||
}
|
||||
this.handleSignedCompanyChange()
|
||||
}
|
||||
//iop系统没有签订联系人字段
|
||||
// 操作数据,将数据赋值
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(obj)
|
||||
})
|
||||
|
||||
},
|
||||
// 通过名字 获取企业的相关信息
|
||||
getCompanyByName(name) {
|
||||
return new Promise(resolve => {
|
||||
let result = {}
|
||||
getCompanyByName({companyName: name}).then(res => {
|
||||
if(res.success) {
|
||||
result = res.result || {}
|
||||
}
|
||||
}).finally(() => {
|
||||
resolve(result)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user