[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
View File
@@ -1,5 +1,6 @@
import { getAction } from '@api/manage' import { getAction } from '@api/manage'
// 通过id获取工作组详情
const getWorkingGroupById = (params) => getAction('/project/payWorkingGroup/queryById', params) const getWorkingGroupById = (params) => getAction('/project/payWorkingGroup/queryById', params)
// 判断工作组成员是否设置来款通知 // 判断工作组成员是否设置来款通知
const getChargeNotice = (param) => getAction('/project/payWorkingGroupSubitem/getCharge', param) const getChargeNotice = (param) => getAction('/project/payWorkingGroupSubitem/getCharge', param)
+1
View File
@@ -38,6 +38,7 @@ export default {
if (this.isCompanyDisabled) { if (this.isCompanyDisabled) {
return return
} }
this.$refs.businessSelect.searchReset()
this.$refs.businessSelect.visible = true this.$refs.businessSelect.visible = true
this.$refs.businessSelect.selectedRowKeys[0] = this.value.id this.$refs.businessSelect.selectedRowKeys[0] = this.value.id
}, },
@@ -43,7 +43,7 @@
bordered bordered
rowKey="id" rowKey="id"
:columns="columns" :columns="columns"
:scroll="{x: 1500}" :scroll="{x: 1600}"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
@@ -112,6 +112,7 @@ export default {
}, { }, {
title: '公司地址', title: '公司地址',
align: 'center', align: 'center',
width: 400,
dataIndex: 'companyAddress', dataIndex: 'companyAddress',
scopedSlots: { customRender: 'text' } scopedSlots: { customRender: 'text' }
}, { }, {
@@ -1,6 +1,6 @@
<template> <template>
<div> <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"> <a-card :bordered="false">
<!-- 主体信息--> <!-- 主体信息-->
<div> <div>
@@ -8,8 +8,8 @@
<div class="part-title-text">主体信息</div> <div class="part-title-text">主体信息</div>
</div> </div>
<a-row class="detail"> <a-row class="detail">
<template v-for="item in mainInfoList"> <template v-if="mainInfoShowList.length > 0">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''"> <a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-for="(item, index) in mainInfoShowList" :key="index">
<a-row> <a-row>
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col> <a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col> <a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
@@ -26,8 +26,8 @@
<div class="part-title-text">日期节点</div> <div class="part-title-text">日期节点</div>
</div> </div>
<a-row class="detail"> <a-row class="detail">
<template v-for="item in dateNodeList"> <template v-if="dateNodeShowList.length > 0">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''"> <a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-for="(item, index) in dateNodeShowList" :key="index">
<a-row> <a-row>
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col> <a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col> <a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
@@ -44,8 +44,9 @@
<div class="part-title-text">账款信息</div> <div class="part-title-text">账款信息</div>
</div> </div>
<a-row class="detail"> <a-row class="detail">
<template v-for="item in accountInfoList"> <template v-if="accountInfoShowList.length > 0">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''"> <a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-for="(item, index) in accountInfoShowList"
:key="index">
<a-row> <a-row>
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col> <a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col> <a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
@@ -62,8 +63,8 @@
<div class="part-title-text">其他信息</div> <div class="part-title-text">其他信息</div>
</div> </div>
<a-row class="detail"> <a-row class="detail">
<template v-for="item in otherInfoList"> <template v-if="otherInfoShowList.length > 0">
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''"> <a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-for="(item, index) in otherInfoShowList" :key="index">
<a-row> <a-row>
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col> <a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col> <a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
@@ -80,14 +81,12 @@
<div class="part-title-text">分期信息</div> <div class="part-title-text">分期信息</div>
</div> </div>
<a-row class="detail"> <a-row class="detail">
<template v-for="(item, index) in mainInfoList"> <a-col :xxl="4" :xl="8" :sm="12" class="detail-item">
<a-col :xxl="4" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''"> <a-row>
<a-row> <a-col :sm="10" :xs="24"></a-col>
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col> <a-col :sm="14" :xs="24"></a-col>
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col> </a-row>
</a-row> </a-col>
</a-col>
</template>
</a-row> </a-row>
</div> </div>
<a-divider></a-divider> <a-divider></a-divider>
@@ -120,7 +119,7 @@
<script> <script>
import IconImg from '@/assets/imgs/icon/icon_revenue_contract.png' import IconImg from '@/assets/imgs/icon/icon_revenue_contract.png'
import PageHeaderTitle from '../../../../components/layouts/PageHeaderTitle' import PageHeaderTitle from '@/components/layouts/PageHeaderTitle'
export default { export default {
name: 'RevenueContractDetail', name: 'RevenueContractDetail',
@@ -128,8 +127,9 @@ export default {
data() { data() {
return { return {
IconImg, IconImg,
contractNum: '', detailData: {
detailData: {}, contractNum: '132465'
},
// 主体信息 // 主体信息
mainInfoList: [ mainInfoList: [
{ {
@@ -164,6 +164,7 @@ export default {
title: '未税金额' title: '未税金额'
} }
], ],
// 日期节点
dateNodeList: [ dateNodeList: [
{ {
fieldName: 'contractDate', fieldName: 'contractDate',
@@ -176,6 +177,7 @@ export default {
title: '合同约定主要时点' title: '合同约定主要时点'
} }
], ],
// 账款信息
accountInfoList: [ accountInfoList: [
{ {
fieldName: 'accountsReceivableAmount', fieldName: 'accountsReceivableAmount',
@@ -191,6 +193,7 @@ export default {
title: '赊账状态' title: '赊账状态'
} }
], ],
// 其他信息
otherInfoList: [ otherInfoList: [
{ {
fieldName: 'contractPaymentTimes', fieldName: 'contractPaymentTimes',
@@ -207,9 +210,26 @@ export default {
installmentList: [] 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() { created() {
console.log(this.$route.query.revenueId) console.log(this.$route.query.revenueId)
this.contractNum = this.$route.query.contractNum
} }
} }
</script> </script>
@@ -56,7 +56,8 @@
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<select-principal placeholder="请选择负责人" <select-principal placeholder="请选择负责人"
:disabled="isSaved" :disabled="isSaved"
v-decorator="['principalId',validatorRules.principalId]"></select-principal> 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">
@@ -261,6 +262,7 @@ import InstallmentForm from '../../../../components/form/InstallmentForm'
import ProjectTypeSelection from './ProjectTypeSelection' import ProjectTypeSelection from './ProjectTypeSelection'
import SelectProjectModule from './SelectProjectModule' import SelectProjectModule from './SelectProjectModule'
import pick from 'lodash.pick' import pick from 'lodash.pick'
import { getAllUserList } from '../../../../api/api'
// 普通项目表头 // 普通项目表头
const generalProjectColumns = [ const generalProjectColumns = [
@@ -520,6 +522,21 @@ export default {
this.selectedCompany = value this.selectedCompany = value
this.model.signedContactsId = undefined 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'))
})
})
},
/** /**
* 选择关联项目 * 选择关联项目
*/ */
@@ -217,11 +217,11 @@ export default {
}, },
contactsId: { contactsId: {
rules: [{ required: true, message: '请选择联系人' }], rules: [{ required: true, message: '请选择联系人' }],
validateTrigger: 'blur' validateTrigger: 'change'
}, },
mailContactsId: { mailContactsId: {
rules: [{ required: true, message: '请选择邮寄联系人' }], rules: [{ required: true, message: '请选择邮寄联系人' }],
validateTrigger: 'blur' validateTrigger: 'change'
}, },
receivableAmount: { receivableAmount: {
rules: [{ required: true, message: '请输入应收金额' }], rules: [{ required: true, message: '请输入应收金额' }],
@@ -274,6 +274,10 @@ export default {
this.selectedCompany = record.chargeCompany this.selectedCompany = record.chargeCompany
this.form.resetFields() this.form.resetFields()
this.model = Object.assign({}, record) this.model = Object.assign({}, record)
this.model.contactsIdOne = this.model.contactsTemporaryIdOne || undefined
this.model.contactsIdTwo = this.model.contactsTemporaryIdTwo || undefined
this.model.contactsIdThree = this.model.contactsTemporaryIdThree || undefined
this.model.mailContactsId = this.model.mailContactsTemporaryId || undefined
if (this.model.id) { if (this.model.id) {
this.selectedContact1 = { this.selectedContact1 = {
id: this.model.contactsTemporaryIdOne, id: this.model.contactsTemporaryIdOne,
@@ -346,7 +350,12 @@ export default {
handlechargeWayChange(e) { handlechargeWayChange(e) {
if (e.target.value === 3) { if (e.target.value === 3) {
if (this.chargeNoticeList.length === 0) { if (this.chargeNoticeList.length === 0) {
this.chargeWayType = null
this.model.chargeWay = null
this.$message.warn('请先补充该工作组的收费通知信息') this.$message.warn('请先补充该工作组的收费通知信息')
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'chargeWay'))
})
return return
} }
} }