[fix]合同详情
This commit is contained in:
parent
82359539af
commit
d632703fa3
@ -7,73 +7,32 @@
|
|||||||
:header="false"
|
:header="false"
|
||||||
:footer="false"
|
:footer="false"
|
||||||
>
|
>
|
||||||
<div v-if="form">
|
<a-card class="mt-20">
|
||||||
<div>
|
<a-descriptions
|
||||||
<div class="grey-6 bold-500">
|
v-if="info"
|
||||||
合同编号:{{ form.number }}
|
:data="data"
|
||||||
</div>
|
:title="info.name"
|
||||||
<div class="flex flex-center flex-justify-start">
|
bordered
|
||||||
<div class="font-24 bold">{{ form.name }}</div>
|
/>
|
||||||
<div class="ml-20">
|
<a-empty v-else description="暂无合同"> </a-empty>
|
||||||
<a-dropdown @select="changeStatus">
|
</a-card>
|
||||||
<a-button
|
<div>
|
||||||
type="primary"
|
<a-tabs
|
||||||
size="small"
|
class="mt-10"
|
||||||
:style="
|
@change="tabChange"
|
||||||
`background-color:` + form.status.remark
|
:active-key="tabIndex"
|
||||||
"
|
>
|
||||||
>{{ form.status.label }}
|
<a-tab-pane title="合同附件" key="0"></a-tab-pane>
|
||||||
</a-button>
|
<a-tab-pane title="合同回款" key="1"></a-tab-pane>
|
||||||
<template #content>
|
</a-tabs>
|
||||||
<a-doption
|
</div>
|
||||||
v-for="item in dict"
|
|
||||||
:key="item.id"
|
|
||||||
:value="item"
|
|
||||||
>{{ item.label }}
|
|
||||||
</a-doption>
|
|
||||||
</template>
|
|
||||||
</a-dropdown>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-20">
|
<div v-if="tabIndex === 0 && info">
|
||||||
<a-descriptions :data="data" bordered>
|
<attach
|
||||||
<a-descriptions-item
|
:type="2"
|
||||||
v-for="item of data"
|
:query-id="info.id"
|
||||||
:label="item.label"
|
:project-id="info.projectId"
|
||||||
:key="item.id"
|
/>
|
||||||
>
|
|
||||||
<div>{{ item.value }}</div>
|
|
||||||
</a-descriptions-item>
|
|
||||||
</a-descriptions>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a-tabs
|
|
||||||
class="mt-10"
|
|
||||||
@change="tabChange"
|
|
||||||
:active-key="tabIndex"
|
|
||||||
>
|
|
||||||
<a-tab-pane title="详细信息" key="0"></a-tab-pane>
|
|
||||||
<a-tab-pane title="合同附件" key="1"></a-tab-pane>
|
|
||||||
<a-tab-pane title="回款记录" key="2"></a-tab-pane>
|
|
||||||
<a-tab-pane title="操作记录" key="5"></a-tab-pane>
|
|
||||||
</a-tabs>
|
|
||||||
<xbase v-if="tabIndex === 0" :info="form" @ok="update" />
|
|
||||||
<files v-else-if="tabIndex === 1" :info="form" />
|
|
||||||
<pay-log v-else-if="tabIndex === 2" :info="form" />
|
|
||||||
<div
|
|
||||||
v-else
|
|
||||||
class="flex flex-center flex-col grey-6"
|
|
||||||
style="margin-top: 96px"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
style="width: 100px"
|
|
||||||
src="https://res.wutongshucloud.com/res/2024/12/09/202412091020938.svg"
|
|
||||||
/>
|
|
||||||
<div>正在开发中</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</div>
|
</div>
|
||||||
@ -83,17 +42,20 @@
|
|||||||
import xbase from '@/views/contract/components/base.vue'
|
import xbase from '@/views/contract/components/base.vue'
|
||||||
import files from '@/views/contract/components/files.vue'
|
import files from '@/views/contract/components/files.vue'
|
||||||
import payLog from '@/views/contract/components/pay-log.vue'
|
import payLog from '@/views/contract/components/pay-log.vue'
|
||||||
|
import attach from '@/views/project/components/attach/index.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
attach,
|
||||||
xbase,
|
xbase,
|
||||||
files,
|
files,
|
||||||
payLog
|
payLog
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
info: {
|
id: {
|
||||||
type: Object,
|
required: true,
|
||||||
default: null
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -101,7 +63,7 @@ export default {
|
|||||||
handler(val) {
|
handler(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.form = this.info
|
this.form = this.info
|
||||||
this.init()
|
this.fetchInfo()
|
||||||
} else {
|
} else {
|
||||||
this.tabIndex = 0
|
this.tabIndex = 0
|
||||||
}
|
}
|
||||||
@ -113,29 +75,54 @@ export default {
|
|||||||
tabIndex: 0,
|
tabIndex: 0,
|
||||||
show: false,
|
show: false,
|
||||||
form: null,
|
form: null,
|
||||||
data: [
|
info: null,
|
||||||
{
|
data: [
|
||||||
label: '客户名称',
|
{
|
||||||
prop: 'customer'
|
label: '合同编号',
|
||||||
},
|
prop: 'number'
|
||||||
{
|
},
|
||||||
label: '合同金额(元)',
|
{
|
||||||
prop: 'amount'
|
label: '合同类型',
|
||||||
},
|
prop: 'number'
|
||||||
{
|
},
|
||||||
label: '签订时间',
|
{
|
||||||
prop: 'signDate'
|
label: '合同金额 单位:元',
|
||||||
},
|
prop: 'amount'
|
||||||
{
|
},
|
||||||
label: '回款金额',
|
{
|
||||||
prop: 'payAmount'
|
label: '签订时间',
|
||||||
},
|
prop: 'signDate'
|
||||||
{
|
},
|
||||||
label: '负责人',
|
{
|
||||||
prop: 'person'
|
label: '合同开始日期',
|
||||||
}
|
prop: 'startDate'
|
||||||
],
|
},
|
||||||
dict: []
|
{
|
||||||
|
label: '合同结束日期',
|
||||||
|
prop: 'endDate'
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
label: '对方单位名称',
|
||||||
|
prop: 'customer'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '对方单位联系人',
|
||||||
|
prop: 'contact'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '我方单位名称',
|
||||||
|
prop: 'org'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '我方负责联系人',
|
||||||
|
prop: 'person'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '备注',
|
||||||
|
prop: 'remark'
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -157,26 +144,33 @@ export default {
|
|||||||
this.form = val
|
this.form = val
|
||||||
this.init()
|
this.init()
|
||||||
},
|
},
|
||||||
init() {
|
fetchInfo() {
|
||||||
const tmp = JSON.parse(
|
this.$api.contract.info({ id: this.id }).then(res => {
|
||||||
sessionStorage.getItem('dict_contract_status')
|
if (res.code === 200) {
|
||||||
)
|
this.info = res.data
|
||||||
if (tmp) {
|
this.fetchData()
|
||||||
this.dict = tmp
|
|
||||||
}
|
|
||||||
// 设置data
|
|
||||||
this.data = this.data.map(item => {
|
|
||||||
if (item.prop === 'customer') {
|
|
||||||
item.value = this.form.customer.name
|
|
||||||
} else if (item.prop === 'person') {
|
|
||||||
item.value = this.form.person.name
|
|
||||||
} else {
|
|
||||||
item.value = this.form[item.prop]
|
|
||||||
}
|
}
|
||||||
return item
|
|
||||||
})
|
})
|
||||||
console.log(this.data)
|
},
|
||||||
}
|
fetchData() {
|
||||||
|
this.data = this.data.map(e => {
|
||||||
|
const item = e
|
||||||
|
item.value = this.info[e.prop]
|
||||||
|
if (e.prop === "person"){
|
||||||
|
item.value = this.info.personInfo.name
|
||||||
|
}
|
||||||
|
if (e.prop === "org"){
|
||||||
|
item.value = this.info.org.label
|
||||||
|
}
|
||||||
|
if (e.prop === "customer"){
|
||||||
|
item.value = this.info.customer.name
|
||||||
|
}
|
||||||
|
if (e.prop === "contact"){
|
||||||
|
item.value = this.info.contact.name
|
||||||
|
}
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<div class="flex flex-center flex-justify-between">
|
<div class="flex flex-center flex-justify-between">
|
||||||
<div class="flex flex-center flex-justify-start">
|
<div class="flex flex-center flex-justify-start">
|
||||||
<a-input
|
<a-input
|
||||||
placeholder="请输入合同名称"
|
placeholder="请输入合同名称或编号"
|
||||||
style="width: 380px"
|
style="width: 380px"
|
||||||
allow-clear
|
allow-clear
|
||||||
@clear="fetchList"
|
@clear="fetchList"
|
||||||
@ -15,9 +15,7 @@
|
|||||||
>搜索
|
>搜索
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<edit-contract @ok="fetchList" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<a-table
|
<a-table
|
||||||
class="mt-20"
|
class="mt-20"
|
||||||
@ -40,7 +38,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #menu="{ record }">
|
<template #menu="{ record }">
|
||||||
<div>
|
<div>
|
||||||
<more :info="record" />
|
<more :id="record.id" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -50,13 +48,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import navbar from '@/components/navbar/index.vue'
|
import navbar from '@/components/navbar/index.vue'
|
||||||
import editContract from '@/views/contract/components/edit-contract.vue'
|
|
||||||
import more from '@/views/contract/components/more.vue'
|
import more from '@/views/contract/components/more.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
navbar,
|
navbar,
|
||||||
editContract,
|
|
||||||
more
|
more
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@ -76,7 +76,7 @@ export default {
|
|||||||
prop: 'number'
|
prop: 'number'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '合同金额',
|
label: '合同金额 单位:元',
|
||||||
prop: 'amount'
|
prop: 'amount'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
<div>
|
<div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-center flex-justify-between">
|
<div class="flex flex-center flex-justify-between mt-20">
|
||||||
<div class="flex flex-center" >
|
<div class="flex flex-center" >
|
||||||
<a-input placeholder="请输入项目名称" v-model="name" allow-clear> </a-input>
|
<a-input placeholder="请输入项目名称" v-model="name" allow-clear> </a-input>
|
||||||
<a-button type="primary" class="ml-20" @click="fetchList"> 搜索</a-button>
|
<a-button type="primary" class="ml-20" @click="fetchList"> 搜索</a-button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user