[update] - 支出合同、收入合同-新增页面-增加从iop系统同步合同数据的功能1
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
/* 合同管理 对接其他IOP系统的api */
|
||||||
|
import {getAction, postAction} from './manage'
|
||||||
|
// let apiBaseUrl = '/openApi'
|
||||||
|
// 获得 access_token
|
||||||
|
const getAccessToken = (params) => postAction(`payResearchProject/payResearchProject/getToken`,params)
|
||||||
|
// const getAccessToken = (params) => postAction(`https://openapi.catarc.ac.cn/login`,params)
|
||||||
|
// 刷新 access_token
|
||||||
|
const refreshToken = (params) => postAction('/payResearchProject/payResearchProject/refreshToken',params)
|
||||||
|
|
||||||
|
//合同台账分页查询接口
|
||||||
|
const getContractPage = (params) => postAction('/payResearchProject/payResearchProject/pageForThreeContractPage',params)
|
||||||
|
//合同台账列表查询接口
|
||||||
|
const getContractList = (params) => postAction('/payResearchProject/payResearchProject/listForThreeContract',params)
|
||||||
|
//合同台账详情接口
|
||||||
|
const getContractById = (params) => getAction(`/payResearchProject/payResearchProject/oneForThreeContract`,params)
|
||||||
|
|
||||||
|
export {
|
||||||
|
getAccessToken,
|
||||||
|
refreshToken,
|
||||||
|
getContractPage,
|
||||||
|
getContractList,
|
||||||
|
getContractById
|
||||||
|
}
|
||||||
@@ -56,6 +56,13 @@ export default {
|
|||||||
return (
|
return (
|
||||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
// 通过其他的信息 赋值,如 姓名、部门、员工号
|
||||||
|
setValueByOtherInfo(otherInfo) {
|
||||||
|
let ele = this.userList.find(tt => tt.realname === otherInfo.realname && tt.orgCodeTxt === otherInfo.orgCodeTxt)
|
||||||
|
if( ele) {
|
||||||
|
this.$emit('change', ele.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
<img :src="imgForIcon" class="page-header-icon">
|
<img :src="imgForIcon" class="page-header-icon">
|
||||||
<span class="page-header-title">{{ levelTwoTitle }}</span>
|
<span class="page-header-title">{{ levelTwoTitle }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template>
|
||||||
|
<slot name="default"></slot>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
+55
-7
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<page-header-title :is-level-one="false" :level-two-title="title"></page-header-title>
|
<page-header-title :is-level-one="false" :level-two-title="title">
|
||||||
|
<template v-slot:default>
|
||||||
|
<!--只有新增的时候 可以查看iop系统合同的数据-->
|
||||||
|
<a-button v-if="!model.id" class="top-btn" type="link" @click="lookOtherSystemData">查看合同数据</a-button>
|
||||||
|
</template>
|
||||||
|
</page-header-title>
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
@@ -81,10 +86,13 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="6" :xl="8" :sm="12">
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<select-principal placeholder="请选择负责人"
|
<select-principal
|
||||||
:disabled="canEdit"
|
ref="selectPrincipal"
|
||||||
v-decorator="['principalId',validatorRules.principalId]"
|
placeholder="请选择负责人"
|
||||||
@change="principalChange"></select-principal>
|
:disabled="canEdit"
|
||||||
|
v-decorator="['principalId',validatorRules.principalId]"
|
||||||
|
@change="principalChange"
|
||||||
|
></select-principal>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="6" :xl="8" :sm="12">
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
@@ -276,6 +284,9 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
<!-- 其他系统合同的数据 IOP系统-->
|
||||||
|
<other-system-contract ref="otherSystemContract" :amount-type="1" @update-info="updateInfoFunc"></other-system-contract>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -284,20 +295,23 @@ import PageHeaderTitle from '../../../../components/layouts/PageHeaderTitle'
|
|||||||
import { getExpenditureContractById } from '../../../../api/incomePaymentsApi'
|
import { getExpenditureContractById } from '../../../../api/incomePaymentsApi'
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
import InstallmentForm from '../../../../components/form/InstallmentForm'
|
import InstallmentForm from '../../../../components/form/InstallmentForm'
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
import CompanySelect from '../../../../components/company/CompanySelect'
|
import CompanySelect from '../../../../components/company/CompanySelect'
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
import SelectContacts from '../../../../components/company/SelectContacts'
|
import SelectContacts from '../../../../components/company/SelectContacts'
|
||||||
import SelectPrincipal from '../../../../components/company/SelectPrincipal'
|
import SelectPrincipal from '../../../../components/company/SelectPrincipal'
|
||||||
import { duplicateCheck, getAllUserList } from '../../../../api/api'
|
import { duplicateCheck, getAllUserList } from '../../../../api/api'
|
||||||
import { postAction } from '../../../../api/manage'
|
import { postAction } from '../../../../api/manage'
|
||||||
import JDate from '../../../../components/tools/JDate'
|
import JDate from '../../../../components/tools/JDate'
|
||||||
import JYearDate from '../../../../components/jero/JYearDate'
|
|
||||||
import { money } from '../../../../utils/validate'
|
import { money } from '../../../../utils/validate'
|
||||||
import { addZero } from '../../../../utils/util'
|
import { addZero } from '../../../../utils/util'
|
||||||
import { phoneReg, postcode } from '../../../../utils/validate'
|
import { phoneReg, postcode } from '../../../../utils/validate'
|
||||||
|
import OtherSystemContract from '../../revenueContract/modules/OtherSystemContract'
|
||||||
|
import {ConnectionKey} from '../../revenueContract/modules/ContractData'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExpenditureContractModule',
|
name: 'ExpenditureContractModule',
|
||||||
components: { PageHeaderTitle, InstallmentForm, CompanySelect, SelectContacts, SelectPrincipal, JDate, JYearDate },
|
components: { PageHeaderTitle, InstallmentForm, SelectPrincipal, JDate, OtherSystemContract},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
@@ -772,6 +786,32 @@ export default {
|
|||||||
callback('请输入已付金额')
|
callback('请输入已付金额')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 查询其他系统的数据,2022-3-31 需要变更对接其他的系统
|
||||||
|
lookOtherSystemData() {
|
||||||
|
this.$refs.otherSystemContract.open()
|
||||||
|
},
|
||||||
|
// 从iop系统中获取合同的信息
|
||||||
|
updateInfoFunc(info) {
|
||||||
|
let obj = {}
|
||||||
|
// 提前写好 能对应上的字段
|
||||||
|
Object.keys(ConnectionKey).forEach(key => {
|
||||||
|
obj[key] = info[ConnectionKey[key]]
|
||||||
|
})
|
||||||
|
// 通过员工号或者姓名 查询相关的负责人数据
|
||||||
|
// 负责人信息的处理 todo 需要增加员工号的判断
|
||||||
|
let userInfo = {
|
||||||
|
realname: obj.realname, // 申请人
|
||||||
|
orgCodeTxt: obj.orgCodeTxt // 申请部门
|
||||||
|
}
|
||||||
|
this.$refs.selectPrincipal.setValueByOtherInfo(userInfo)
|
||||||
|
// 签订单位信息的处理
|
||||||
|
obj.signedCompanyTemporaryName = info.contSignPartnerAName
|
||||||
|
//iop系统没有签订联系人字段
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(obj)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -783,4 +823,12 @@ export default {
|
|||||||
.ant-divider-horizontal {
|
.ant-divider-horizontal {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-header-title {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.top-btn{
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -0,0 +1,247 @@
|
|||||||
|
let ContractResponse = {
|
||||||
|
'success': true,
|
||||||
|
'code': 200,
|
||||||
|
'msg': '成功',
|
||||||
|
'data': {
|
||||||
|
'pageNo': 1,
|
||||||
|
'pageSize': 10,
|
||||||
|
'count': 550,
|
||||||
|
'pageCount': 55,
|
||||||
|
'list': [
|
||||||
|
{
|
||||||
|
'id': 'b8578a1d-ea9b-4e53-8108-a641aaf05177',
|
||||||
|
'bindid': 'e0fda33e-343c-41ec-8ec8-59245f339b12',
|
||||||
|
'bigContNmbr': 'CATARC-S-2021-00496',
|
||||||
|
'contName': '订单',
|
||||||
|
'applycomp': '汽车标准化研究所',
|
||||||
|
'applycomno': '11001',
|
||||||
|
'contSignPartnerAName': '亮锐(上海)管理有限公司',
|
||||||
|
'contSignOurcompName': '中国汽车技术研究中心有限公司',
|
||||||
|
'contAmountLc': 40000.00,
|
||||||
|
'contAmountFc': 40000.00,
|
||||||
|
'contUntaxAmountLc': 37735.85,
|
||||||
|
'contUntaxAmountFc': 37735.85,
|
||||||
|
'bigContType': '5N3WEYLF4A',
|
||||||
|
'applyuser': '轩轶',
|
||||||
|
'userno': '01140',
|
||||||
|
'applydept': '整车部',
|
||||||
|
'applydeptno': '11003',
|
||||||
|
'contStatus': 'ST_SCCS',
|
||||||
|
'midContNmbr': '',
|
||||||
|
'invoiceType': '专票',
|
||||||
|
'taxRate': '0.06',
|
||||||
|
'isOpen': 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'id': 'e2dd5e56-f123-46ad-b7e1-e57b0e8bd9a4',
|
||||||
|
'bindid': 'a1ab5a5f-2c2a-42e7-8f7a-f9cec663883d',
|
||||||
|
'bigContNmbr': 'CATARC-S-2020-00233',
|
||||||
|
'contName': '共同开展《汽车脚踏板位置尺寸测量方法》标准研究工作',
|
||||||
|
'applycomp': '汽车标准化研究所',
|
||||||
|
'applycomno': '11001',
|
||||||
|
'contSignPartnerAName': '一汽丰田技术开发有限公司',
|
||||||
|
'contSignOurcompName': '中国汽车技术研究中心有限公司',
|
||||||
|
'contAmountLc': 300000.00,
|
||||||
|
'contAmountFc': 0.00,
|
||||||
|
'contUntaxAmountLc': 283018.87,
|
||||||
|
'contUntaxAmountFc': 0.00,
|
||||||
|
'bigContType': '5N3WEYLF4A',
|
||||||
|
'applyuser': '曹丽娟',
|
||||||
|
'userno': '04770',
|
||||||
|
'applydept': '整车部',
|
||||||
|
'applydeptno': '11003',
|
||||||
|
'contStatus': 'ST_SCCS',
|
||||||
|
'midContNmbr': '',
|
||||||
|
'invoiceType': '专票',
|
||||||
|
'taxRate': '0.06',
|
||||||
|
'isOpen': 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'id': 'a7557ccb-31bf-4734-ae90-c0808a6d701d',
|
||||||
|
'bindid': '42e0f0bc-6835-4bb2-8bf4-fd2b4d20ee52',
|
||||||
|
'bigContNmbr': 'CATARC-S-2020-00047',
|
||||||
|
'contName': '技术服务合同',
|
||||||
|
'applycomp': '汽车标准化研究所',
|
||||||
|
'applycomno': '11001',
|
||||||
|
'contSignPartnerAName': '中航电测仪器(西安)有限公司',
|
||||||
|
'contSignOurcompName': '中国汽车技术研究中心有限公司',
|
||||||
|
'contAmountLc': 100000.00,
|
||||||
|
'contAmountFc': 0.00,
|
||||||
|
'contUntaxAmountLc': 94339.62,
|
||||||
|
'contUntaxAmountFc': 0.00,
|
||||||
|
'bigContType': '5N3WEYLF4A',
|
||||||
|
'applyuser': '田富刚',
|
||||||
|
'userno': '04235',
|
||||||
|
'applydept': '整车部',
|
||||||
|
'applydeptno': '11003',
|
||||||
|
'contStatus': 'ST_SCCS',
|
||||||
|
'midContNmbr': '',
|
||||||
|
'invoiceType': '专票',
|
||||||
|
'taxRate': '0.06',
|
||||||
|
'isOpen': 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'id': '7955d654-6527-4dc8-bf24-aa3c1d87f259',
|
||||||
|
'bindid': 'b94aa273-1d4e-4287-965e-b117c8a93e14',
|
||||||
|
'bigContNmbr': 'CATARC-S-2021-00151',
|
||||||
|
'contName': '车用动力电池回收利用标准共同研究合作',
|
||||||
|
'applycomp': '汽车标准化研究所',
|
||||||
|
'applycomno': '11001',
|
||||||
|
'contSignPartnerAName': '浙江天能电源材料有限公司',
|
||||||
|
'contSignOurcompName': '中国汽车技术研究中心有限公司',
|
||||||
|
'contAmountLc': 150000.00,
|
||||||
|
'contAmountFc': 0.00,
|
||||||
|
'contUntaxAmountLc': 141509.43,
|
||||||
|
'contUntaxAmountFc': 0.00,
|
||||||
|
'bigContType': '5N3WEYLF4A',
|
||||||
|
'applyuser': '张铜柱',
|
||||||
|
'userno': '01877',
|
||||||
|
'applydept': '整车部',
|
||||||
|
'applydeptno': '11003',
|
||||||
|
'contStatus': 'ST_SCCS',
|
||||||
|
'midContNmbr': '',
|
||||||
|
'invoiceType': '专票',
|
||||||
|
'taxRate': '0.06',
|
||||||
|
'isOpen': 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'id': '8c45943c-96c6-4752-96ad-e9a686d407ee',
|
||||||
|
'bindid': 'f29c0358-ea5c-4807-8915-033a3341bad6',
|
||||||
|
'bigContNmbr': 'CATARC-S-2021-00955',
|
||||||
|
'contName': '关于CATARC-S-2021-0010合同的补充协议',
|
||||||
|
'applycomp': '汽车标准化研究所',
|
||||||
|
'applycomno': '11001',
|
||||||
|
'contSignPartnerAName': '大陆马牌轮胎(中国)有限公司',
|
||||||
|
'contSignOurcompName': '中国汽车技术研究中心有限公司',
|
||||||
|
'contAmountLc': 125751.00,
|
||||||
|
'contAmountFc': 0.00,
|
||||||
|
'contUntaxAmountLc': 118633.02,
|
||||||
|
'contUntaxAmountFc': 0.00,
|
||||||
|
'bigContType': 'DJT7MXLDEF',
|
||||||
|
'applyuser': '许天楚',
|
||||||
|
'userno': '05530',
|
||||||
|
'applydept': '整车部',
|
||||||
|
'applydeptno': '11003',
|
||||||
|
'contStatus': 'ST_SCCS',
|
||||||
|
'midContNmbr': '',
|
||||||
|
'invoiceType': '专票',
|
||||||
|
'taxRate': '0.06',
|
||||||
|
'isOpen': 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'title': [],
|
||||||
|
'ext': {},
|
||||||
|
'orderBy': ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
ContractResponse,
|
||||||
|
QueryById,
|
||||||
|
ConnectionKey
|
||||||
|
}
|
||||||
|
|
||||||
|
let QueryById = {
|
||||||
|
'success': true,
|
||||||
|
'code': 200,
|
||||||
|
'msg': '成功',
|
||||||
|
'data': {
|
||||||
|
'id': 'b8578a1d-ea9b-4e53-8108-a641aaf05177',
|
||||||
|
'bindid': 'e0fda33e-343c-41ec-8ec8-59245f339b12',
|
||||||
|
'bigContNmbr': 'CATARC-S-2021-00496',
|
||||||
|
'contName': '订单',
|
||||||
|
'applycomp': '汽车标准化研究所',
|
||||||
|
'applycomno': '11001',
|
||||||
|
'contSignPartnerAName': '亮锐(上海)管理有限公司',
|
||||||
|
'contSignOurcompName': '中国汽车技术研究中心有限公司',
|
||||||
|
'contAmountLc': 40000.00,
|
||||||
|
'contAmountFc': 40000.00,
|
||||||
|
'contUntaxAmountLc': 37735.85,
|
||||||
|
'contUntaxAmountFc': 37735.85,
|
||||||
|
'applydept': '整车部',
|
||||||
|
'applydeptno': '11003',
|
||||||
|
'applyuser': '轩轶',
|
||||||
|
'userno': '01140',
|
||||||
|
'contStartDate': '2021-07-21 16:00:00',
|
||||||
|
'contStatus': 'ST_SCCS',
|
||||||
|
'bigContType': '5N3WEYLF4A',
|
||||||
|
'costType': '',
|
||||||
|
'invoiceType': '专票',
|
||||||
|
'taxRate': '0.06',
|
||||||
|
'currencyUnit': '人民币',
|
||||||
|
'exchRate': '1',
|
||||||
|
'isOpen': 0,
|
||||||
|
'isStandard': 0,
|
||||||
|
'midContNmbr': '',
|
||||||
|
'contReve': 0.00,
|
||||||
|
'contAr': 40000.00,
|
||||||
|
'incomeConfirmedAmount': 0.00,
|
||||||
|
'contUnconfirmedAmount': 40000.00,
|
||||||
|
'purchFormNmbr': '',
|
||||||
|
'contPay': 0.00,
|
||||||
|
'contUnpd': 40000.00,
|
||||||
|
'contPaid': 0.00,
|
||||||
|
'contReveInvoc': 40000.00
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* {
|
||||||
|
'code': 0,
|
||||||
|
'data': {
|
||||||
|
'applycomno': 'string',//所属单位编码
|
||||||
|
'applycomp': 'string',//所属单位
|
||||||
|
'applydept': 'string',//申请部门
|
||||||
|
'applydeptno': 'string',//申请部门编码
|
||||||
|
'applyuser': 'string',//申请人
|
||||||
|
'bigContNmbr': '中心合同号',//中心合同号
|
||||||
|
'bigContType': 'string', //中心合同类别
|
||||||
|
'bindid': 'string',//
|
||||||
|
'contAmountFc': 0,//合同金额(外币)
|
||||||
|
'contAmountLc': 10000,//合同金额(人民币)
|
||||||
|
'contAr': 0,//待开票金额
|
||||||
|
'contName': '合同名称',//合同名称
|
||||||
|
'contPaid': 0,//已收票金额
|
||||||
|
'contPay': 0,//已付款金额
|
||||||
|
'contReve': 0,//已开票金额
|
||||||
|
'contReveInvoc': 0,//待收票金额
|
||||||
|
'contSignOurcompName': 'string',//法人公司名称
|
||||||
|
'contSignPartnerAName': 'string',//供应商名称
|
||||||
|
'contStartDate': '2022-04-02T02:41:09.460Z',//合同存档日期
|
||||||
|
'contStatus': 'string',//合同状态
|
||||||
|
'contUnconfirmedAmount': 0,//未确认金额
|
||||||
|
'contUnpd': 0,// 待付款金额
|
||||||
|
'contUntaxAmountFc': 0,//未税金额(外币)
|
||||||
|
'contUntaxAmountLc': 0,//未税金额(人民币)
|
||||||
|
'costType': 'string',//成本类别
|
||||||
|
'currencyUnit': 'string',//合同币种
|
||||||
|
'exchRate': 'string',//汇率
|
||||||
|
'id': 'string',
|
||||||
|
'incomeConfirmedAmount': 0,//已确认金额
|
||||||
|
'invoiceType': 'string',//发票类型
|
||||||
|
'isOpen': 0,//是否开口合同
|
||||||
|
'isStandard': 0,//是否标准合同
|
||||||
|
'midContNmbr': 'string',//院所合同号
|
||||||
|
'purchFormNmbr': 'string',//采购单编号
|
||||||
|
'taxRate': '6%',//税率
|
||||||
|
'userno': 'string'//申请人工号
|
||||||
|
},
|
||||||
|
'msg': 'string',
|
||||||
|
'success': true
|
||||||
|
}*/
|
||||||
|
|
||||||
|
//contAmountType ---支出合同、收入合同的标识
|
||||||
|
// 对应关系的字段, key-来款系统的字段 value-iop系统的字段 收支类型 0–收入 1–支出
|
||||||
|
let ConnectionKey = {
|
||||||
|
'contractNum': 'bigContNmbr', //合同编号--中心合同号
|
||||||
|
'contractName': 'contName', //合同名称 --合同名称
|
||||||
|
// 'signedCompanyName': 'contSignPartnerAName', //签订单位 在来款系统是一个对象{id:'', companyName: ''}
|
||||||
|
// 'signedContactsId': '', //签订联系人
|
||||||
|
'opening': 'isOpen', // 是否开口 -- 是否开口合同
|
||||||
|
'realname': 'applyuser', //负责人 --- 可以通过员工号,在系统查询对应的负责人
|
||||||
|
'orgCodeTxt': 'applydept', // 申请部门 --- 可以通过员工号,在系统查询对应的负责人
|
||||||
|
'contractAmount': 'contAmountLc', //签订合同总金额 --合同金额(人民币)
|
||||||
|
'rate': 'taxRate', //税率--税率
|
||||||
|
'noTaxAmount': 'contUntaxAmountLc', //未税金额--未税金额(人民币)
|
||||||
|
}
|
||||||
@@ -0,0 +1,344 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
:confirmLoading="confirmLoading"
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<div :spinning="confirmLoading">
|
||||||
|
<!-- 查询区域-start -->
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row>
|
||||||
|
<!-- 暂时不支持查询 合同编号、合同名称-->
|
||||||
|
<!-- <a-col :xl="8" :lg="9" :md="10" :sm="24">-->
|
||||||
|
<!-- <a-form-item label="合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
|
<!-- <a-input placeholder="请输入合同编号" v-model="queryParam.contractNum" :maxLength='50'></a-input>-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!-- </a-col>-->
|
||||||
|
<!-- <a-col :xl="8" :lg="9" :md="10" :sm="24">-->
|
||||||
|
<!-- <a-form-item label="合同名称" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
|
<!-- <a-input placeholder="请输入合同名称" v-model="queryParam.contName" :maxLength='50'></a-input>-->
|
||||||
|
<!-- </a-form-item>-->
|
||||||
|
<!-- </a-col>-->
|
||||||
|
<a-col :xl="8" :lg="9" :md="10" :sm="24">
|
||||||
|
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入签订单位" v-model="queryParam.contSignPartnerAName" :maxLength='50'></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="10" :lg="12" :md="12" :sm="24">
|
||||||
|
<a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-date
|
||||||
|
placeholder="请选择开始日期"
|
||||||
|
date-format="YYYY-MM-DD 00:00:00"
|
||||||
|
class="query-group-cust"
|
||||||
|
v-model="queryParam.startDate"
|
||||||
|
:disabled-date="disabledStartDate">
|
||||||
|
</j-date>
|
||||||
|
<span class="query-group-split-cust"></span>
|
||||||
|
<j-date
|
||||||
|
placeholder="请选择结束日期"
|
||||||
|
date-format="YYYY-MM-DD 23:59:59"
|
||||||
|
class="query-group-cust"
|
||||||
|
v-model="queryParam.endDate"
|
||||||
|
: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-->
|
||||||
|
<a-table
|
||||||
|
class="j-table-force-nowrap"
|
||||||
|
rowKey="id"
|
||||||
|
bordered
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:loading="loading"
|
||||||
|
:scroll="{x: 1000}"
|
||||||
|
@change="handleTableChange"
|
||||||
|
>
|
||||||
|
<template slot="text" slot-scope="text">
|
||||||
|
<a-tooltip>
|
||||||
|
<template slot="title">{{ text }}</template>
|
||||||
|
<div class="table-text">{{ text }}</div>
|
||||||
|
</a-tooltip>
|
||||||
|
</template>
|
||||||
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||||
|
<a @click="handleGetInfo(record)">获取合同基础信息</a>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
<template slot="footer">
|
||||||
|
<a-button @click="handleCancel">关闭</a-button>
|
||||||
|
<a-button @click="handleOk" type="primary" v-preventclick>确定</a-button>
|
||||||
|
</template>
|
||||||
|
</j-modal>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {filterObj} from '@/utils/util'
|
||||||
|
// import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
|
import { RangeDateMixin } from '../../../../mixins/RangeDateMixin'
|
||||||
|
|
||||||
|
import { getContractPage, getContractById } from '../../../../api/contractOpenApi'
|
||||||
|
import JDate from '@/components/tools/JDate'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'OtherSystemContract',
|
||||||
|
mixins: [RangeDateMixin],
|
||||||
|
props: {
|
||||||
|
// 收支类型 0–收入 1–支出
|
||||||
|
amountType: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
amountType() {
|
||||||
|
this.filter.contAmountType = this.amountType
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.filter.contAmountType = this.amountType
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: 'IOP系统合同数据',
|
||||||
|
width: 1200,
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: '',
|
||||||
|
key: 'rowIndex',
|
||||||
|
width: 60,
|
||||||
|
align: 'center',
|
||||||
|
customRender: function (t, r, index) {
|
||||||
|
return parseInt(index) + 1
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
title: '合同编号',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'bigContNmbr',
|
||||||
|
width: 240,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '合同名称',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'contName',
|
||||||
|
width: 240,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '负责人/申请人',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'applyuser',
|
||||||
|
width: 120,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '申请部门',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'applydept',
|
||||||
|
width: 120,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '签订单位',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'contSignPartnerAName',
|
||||||
|
width: 160,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '合同总金额',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'contAmountLc',
|
||||||
|
width: 150
|
||||||
|
}, {
|
||||||
|
title: '合同状态',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'contStatus',
|
||||||
|
width: 100,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '申请员工号',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'applydeptno',
|
||||||
|
width: 200
|
||||||
|
}, {
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 170,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 10 }
|
||||||
|
},
|
||||||
|
dateKeyObj: {
|
||||||
|
beginKey: 'startDate',
|
||||||
|
endKey: 'endDate'
|
||||||
|
},
|
||||||
|
// disableMixinCreated: true,
|
||||||
|
//查询条件
|
||||||
|
queryParam: {},
|
||||||
|
// 记录上一次查询的条件,防止查询处输入框的数据发生变化,未点击查询按钮,再点击分页的时候数据发生变化
|
||||||
|
lastQueryParam: {},
|
||||||
|
/* 数据源 */
|
||||||
|
dataSource: [],
|
||||||
|
/* 分页参数 */
|
||||||
|
ipagination: {
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
pageSizeOptions: ['10', '20', '30', '50', '100'],
|
||||||
|
showTotal: (total, range) => {
|
||||||
|
return range[0] + '-' + range[1] + ' 共' + total + '条'
|
||||||
|
},
|
||||||
|
showQuickJumper: true,
|
||||||
|
showSizeChanger: true,
|
||||||
|
total: 0
|
||||||
|
},
|
||||||
|
filter: {
|
||||||
|
contAmountType: 0 // 收支类型 0–收入 1–支出
|
||||||
|
},
|
||||||
|
/* 排序参数 */
|
||||||
|
isorter: {
|
||||||
|
column: 'createTime',
|
||||||
|
order: 'desc',
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
JDate
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
this.visible = true
|
||||||
|
this.loadData(1)
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.close()
|
||||||
|
},
|
||||||
|
getQueryParams() {
|
||||||
|
//获取查询条件
|
||||||
|
let sqp = {}
|
||||||
|
let param = Object.assign(sqp, this.lastQueryParam, this.isorter, this.filter)
|
||||||
|
// param.field = this.getQueryField()
|
||||||
|
param.pageNo = this.ipagination.current
|
||||||
|
param.pageSize = this.ipagination.pageSize
|
||||||
|
return filterObj(param)
|
||||||
|
},
|
||||||
|
getQueryField() {
|
||||||
|
let str = 'id,'
|
||||||
|
if (this.columns && this.columns.length){
|
||||||
|
this.columns.forEach(function (value) {
|
||||||
|
str += ',' + value.dataIndex
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return str
|
||||||
|
},
|
||||||
|
// 加载列表页中的数据
|
||||||
|
loadData(arg) {
|
||||||
|
//加载数据 若传入参数1则加载第一页的内容
|
||||||
|
if (arg === 1) {
|
||||||
|
this.ipagination.current = 1
|
||||||
|
}
|
||||||
|
let params = this.getQueryParams()//查询条件
|
||||||
|
this.loading = true
|
||||||
|
getContractPage(params).then(result => {
|
||||||
|
if(result.success) {
|
||||||
|
let res = result.result
|
||||||
|
this.dataSource = res.data.list
|
||||||
|
if (res.data.count) {
|
||||||
|
this.ipagination.total = res.data.count
|
||||||
|
//清空列表选中
|
||||||
|
this.onClearSelected()
|
||||||
|
} else {
|
||||||
|
this.ipagination.total = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleTableChange(pagination, filters, sorter) {
|
||||||
|
//分页、排序、筛选变化时触发
|
||||||
|
if (Object.keys(sorter).length > 0) {
|
||||||
|
this.isorter.column = sorter.field
|
||||||
|
this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
|
||||||
|
}
|
||||||
|
this.ipagination = pagination
|
||||||
|
this.loadData()
|
||||||
|
},
|
||||||
|
|
||||||
|
onSelectChange(selectedRowKeys, selectionRows) {
|
||||||
|
this.selectedRowKeys = selectedRowKeys
|
||||||
|
this.selectionRows = selectionRows
|
||||||
|
},
|
||||||
|
onClearSelected() {
|
||||||
|
this.selectedRowKeys = []
|
||||||
|
this.selectionRows = []
|
||||||
|
},
|
||||||
|
searchQuery() {
|
||||||
|
this.lastQueryParam = {...this.queryParam}
|
||||||
|
this.loadData(1)
|
||||||
|
},
|
||||||
|
searchReset() {
|
||||||
|
this.lastQueryParam = {}
|
||||||
|
this.queryParam = {}
|
||||||
|
this.loadData(1)
|
||||||
|
},
|
||||||
|
// 点击获取合同信息,同步到新增合同的页面
|
||||||
|
handleGetInfo(record) {
|
||||||
|
let id = record.id
|
||||||
|
getContractById({id}).then(res => {
|
||||||
|
if(res.success) {
|
||||||
|
this.$emit('update-info', res.result.data)
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.table-text {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,6 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<page-header-title :is-level-one="false" :img-for-icon="IconImg" :level-two-title="title"></page-header-title>
|
<page-header-title class="page-header-title" :is-level-one="false" :img-for-icon="IconImg" :level-two-title="title">
|
||||||
|
<template v-slot:default>
|
||||||
|
<!--只有新增的时候 可以查看iop系统合同的数据-->
|
||||||
|
<a-button v-if="!model.id" class="top-btn" type="link" @click="lookOtherSystemData">查看合同数据</a-button>
|
||||||
|
</template>
|
||||||
|
</page-header-title>
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
@@ -30,10 +35,13 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="6" :xl="8" :sm="12">
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<company-select placeholder="请选择签订单位"
|
<company-select
|
||||||
:disabled="isSaved || canEdit"
|
ref="companySelect"
|
||||||
v-decorator="['signedCompany',validatorRules.signedCompany]"
|
placeholder="请选择签订单位"
|
||||||
@change="handleSignedCompanyChange"></company-select>
|
:disabled="isSaved || canEdit"
|
||||||
|
v-decorator="['signedCompany',validatorRules.signedCompany]"
|
||||||
|
@change="handleSignedCompanyChange"
|
||||||
|
></company-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="6" :xl="8" :sm="12" style="margin-bottom: 0px">
|
<a-col :xxl="6" :xl="8" :sm="12" style="margin-bottom: 0px">
|
||||||
@@ -60,6 +68,7 @@
|
|||||||
<select-principal placeholder="请选择负责人"
|
<select-principal placeholder="请选择负责人"
|
||||||
:disabled="canEdit"
|
:disabled="canEdit"
|
||||||
v-decorator="['principalId',validatorRules.principalId]"
|
v-decorator="['principalId',validatorRules.principalId]"
|
||||||
|
ref="selectPrincipal"
|
||||||
@change="principalChange"></select-principal>
|
@change="principalChange"></select-principal>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -302,6 +311,8 @@
|
|||||||
<!-- 会员项目选择-->
|
<!-- 会员项目选择-->
|
||||||
<select-member-project-module ref="selectMemberProjectModule"
|
<select-member-project-module ref="selectMemberProjectModule"
|
||||||
@ok="selectProjectOk"></select-member-project-module>
|
@ok="selectProjectOk"></select-member-project-module>
|
||||||
|
<!-- 其他系统合同的数据 IOP系统-->
|
||||||
|
<other-system-contract ref="otherSystemContract" @update-info="updateInfoFunc"></other-system-contract>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -328,7 +339,10 @@ import { money } from '../../../../utils/validate'
|
|||||||
import SelectWorkingGroupProjectModule from './SelectWorkingGroupProjectModule'
|
import SelectWorkingGroupProjectModule from './SelectWorkingGroupProjectModule'
|
||||||
import { addZero } from '../../../../utils/util'
|
import { addZero } from '../../../../utils/util'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
import { getAccessToken } from '../../../../api/contractOpenApi'
|
||||||
|
import OtherSystemContract from './OtherSystemContract'
|
||||||
|
import { ConnectionKey } from './ContractData'
|
||||||
|
import Vue from 'vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'RevenueContractModule',
|
name: 'RevenueContractModule',
|
||||||
components: {
|
components: {
|
||||||
@@ -344,7 +358,8 @@ export default {
|
|||||||
AssociatedProject,
|
AssociatedProject,
|
||||||
SelectMeetingProjectModule,
|
SelectMeetingProjectModule,
|
||||||
SelectMemberProjectModule,
|
SelectMemberProjectModule,
|
||||||
SelectWorkingGroupProjectModule
|
SelectWorkingGroupProjectModule,
|
||||||
|
OtherSystemContract
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -468,6 +483,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.add()
|
this.add()
|
||||||
}
|
}
|
||||||
|
// 获取IOP系统的token --不需要了 后端做相关操作即可
|
||||||
|
// this.getOtherSystemAccessToken()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addZero,
|
addZero,
|
||||||
@@ -909,6 +926,48 @@ export default {
|
|||||||
*/
|
*/
|
||||||
disabledPackDate(current) {
|
disabledPackDate(current) {
|
||||||
return current < moment().subtract(15, 'year') || current > moment().add(1, 'year')
|
return current < moment().subtract(15, 'year') || current > moment().add(1, 'year')
|
||||||
|
},
|
||||||
|
// 获取iop系统的token-用于合同的对接
|
||||||
|
getOtherSystemAccessToken() {
|
||||||
|
let params = {
|
||||||
|
'appid': 'asri',
|
||||||
|
'secret': 'QyYjBQ5LyJkxktvMoKqdUOUtYgkk2VW4DgaKjgVIjCoVz7R5bgNoS'
|
||||||
|
}
|
||||||
|
getAccessToken(params).then(res => {
|
||||||
|
if(res.success) {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询其他系统的数据,2022-3-31 需要变更对接其他的系统
|
||||||
|
lookOtherSystemData() {
|
||||||
|
this.$refs.otherSystemContract.open()
|
||||||
|
},
|
||||||
|
// 从iop系统中获取合同的信息
|
||||||
|
updateInfoFunc(info) {
|
||||||
|
let obj = {}
|
||||||
|
// 提前写好 能对应上的字段
|
||||||
|
Object.keys(ConnectionKey).forEach(key => {
|
||||||
|
obj[key] = info[ConnectionKey[key]]
|
||||||
|
})
|
||||||
|
// 通过员工号或者姓名 查询相关的负责人数据
|
||||||
|
// 负责人信息的处理 todo 需要增加员工号的判断
|
||||||
|
let userInfo = {
|
||||||
|
realname: obj.realname, // 申请人
|
||||||
|
orgCodeTxt: obj.orgCodeTxt // 申请部门
|
||||||
|
}
|
||||||
|
this.$refs.selectPrincipal.setValueByOtherInfo(userInfo)
|
||||||
|
// 签订单位信息的处理
|
||||||
|
// let signedCompanyInit = {
|
||||||
|
// signedCompanyName: info.contSignPartnerAName
|
||||||
|
// }
|
||||||
|
//todo 需要调接口 通过 企业名称查询 当前的企业信息,然后赋值到主体信息中
|
||||||
|
// this.$refs.companySelect.setValueByCompanyName(signedCompanyInit)
|
||||||
|
//iop系统没有签订联系人字段
|
||||||
|
// 操作数据,将数据赋值
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(obj)
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -928,4 +987,11 @@ export default {
|
|||||||
.ant-btn > .anticon + span, .ant-btn > span + .anticon {
|
.ant-btn > .anticon + span, .ant-btn > span + .anticon {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
.page-header-title {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.top-btn{
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user