[bug] 验收bug修改

This commit is contained in:
zhaoxiao
2021-09-06 11:03:54 +08:00
parent e6b6483fcd
commit 8ba578030c
7 changed files with 74 additions and 25 deletions
@@ -1,6 +1,6 @@
<template>
<div>
<page-header-title :is-level-one="false" :img-for-icon="IconImg" :level-two-title="contractNum"></page-header-title>
<page-header-title :is-level-one="false" :img-for-icon="IconImg" level-two-title="收入合同详情"></page-header-title>
<a-card :bordered="false">
<!-- 主体信息-->
<div>
@@ -8,8 +8,8 @@
<div class="part-title-text">主体信息</div>
</div>
<a-row class="detail">
<template v-for="item in mainInfoList">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''">
<template v-if="mainInfoShowList.length > 0">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-for="(item, index) in mainInfoShowList" :key="index">
<a-row>
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
@@ -26,8 +26,8 @@
<div class="part-title-text">日期节点</div>
</div>
<a-row class="detail">
<template v-for="item in dateNodeList">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''">
<template v-if="dateNodeShowList.length > 0">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-for="(item, index) in dateNodeShowList" :key="index">
<a-row>
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
@@ -44,8 +44,9 @@
<div class="part-title-text">账款信息</div>
</div>
<a-row class="detail">
<template v-for="item in accountInfoList">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''">
<template v-if="accountInfoShowList.length > 0">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-for="(item, index) in accountInfoShowList"
:key="index">
<a-row>
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
@@ -62,8 +63,8 @@
<div class="part-title-text">其他信息</div>
</div>
<a-row class="detail">
<template v-for="item in otherInfoList">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''">
<template v-if="otherInfoShowList.length > 0">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-for="(item, index) in otherInfoShowList" :key="index">
<a-row>
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
@@ -80,14 +81,12 @@
<div class="part-title-text">分期信息</div>
</div>
<a-row class="detail">
<template v-for="(item, index) in mainInfoList">
<a-col :xxl="4" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''">
<a-row>
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
</a-row>
</a-col>
</template>
<a-col :xxl="4" :xl="8" :sm="12" class="detail-item">
<a-row>
<a-col :sm="10" :xs="24"></a-col>
<a-col :sm="14" :xs="24"></a-col>
</a-row>
</a-col>
</a-row>
</div>
<a-divider></a-divider>
@@ -120,7 +119,7 @@
<script>
import IconImg from '@/assets/imgs/icon/icon_revenue_contract.png'
import PageHeaderTitle from '../../../../components/layouts/PageHeaderTitle'
import PageHeaderTitle from '@/components/layouts/PageHeaderTitle'
export default {
name: 'RevenueContractDetail',
@@ -128,8 +127,9 @@ export default {
data() {
return {
IconImg,
contractNum: '',
detailData: {},
detailData: {
contractNum: '132465'
},
// 主体信息
mainInfoList: [
{
@@ -164,6 +164,7 @@ export default {
title: '未税金额'
}
],
// 日期节点
dateNodeList: [
{
fieldName: 'contractDate',
@@ -176,6 +177,7 @@ export default {
title: '合同约定主要时点'
}
],
// 账款信息
accountInfoList: [
{
fieldName: 'accountsReceivableAmount',
@@ -191,6 +193,7 @@ export default {
title: '赊账状态'
}
],
// 其他信息
otherInfoList: [
{
fieldName: 'contractPaymentTimes',
@@ -207,9 +210,26 @@ export default {
installmentList: []
}
},
computed: {
// 主体信息,去掉没有数据的字段
mainInfoShowList() {
return this.mainInfoList.filter(item => this.detailData[item.fieldName] && this.detailData[item.fieldName] !== '') || []
},
// 日期节点
dateNodeShowList() {
return this.dateNodeList.filter(item => this.detailData[item.fieldName] && this.detailData[item.fieldName] !== '') || []
},
// 账款信息
accountInfoShowList() {
return this.accountInfoList.filter(item => this.detailData[item.fieldName] && this.detailData[item.fieldName] !== '') || []
},
// 其他信息
otherInfoShowList() {
return this.otherInfoList.filter(item => this.detailData[item.fieldName] && this.detailData[item.fieldName] !== '') || []
}
},
created() {
console.log(this.$route.query.revenueId)
this.contractNum = this.$route.query.contractNum
}
}
</script>
@@ -56,7 +56,8 @@
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<select-principal placeholder="请选择负责人"
:disabled="isSaved"
v-decorator="['principalId',validatorRules.principalId]"></select-principal>
v-decorator="['principalId',validatorRules.principalId]"
@change="principalChange"></select-principal>
</a-form-item>
</a-col>
<a-col :xxl="6" :xl="8" :sm="12">
@@ -261,6 +262,7 @@ import InstallmentForm from '../../../../components/form/InstallmentForm'
import ProjectTypeSelection from './ProjectTypeSelection'
import SelectProjectModule from './SelectProjectModule'
import pick from 'lodash.pick'
import { getAllUserList } from '../../../../api/api'
// 普通项目表头
const generalProjectColumns = [
@@ -520,6 +522,21 @@ export default {
this.selectedCompany = value
this.model.signedContactsId = undefined
},
/**
* 负责人变化获取部门信息回显至部门名称
* @param value
*/
principalChange(value) {
let param = {
id: value
}
getAllUserList(param).then(res => {
this.model.departmentName = res.result[0].orgCodeTxt
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'departmentName'))
})
})
},
/**
* 选择关联项目
*/