diff --git a/src/views/contract/components/more.vue b/src/views/contract/components/more.vue
index 66384e4..d1c1f29 100644
--- a/src/views/contract/components/more.vue
+++ b/src/views/contract/components/more.vue
@@ -7,73 +7,32 @@
:header="false"
:footer="false"
>
-
-
-
- 合同编号:{{ form.number }}
-
-
-
{{ form.name }}
-
-
- {{ form.status.label }}
-
-
- {{ item.label }}
-
-
-
-
-
-
+
+
+
+
+
-
-
-
- {{ item.value }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
正在开发中
-
-
+
@@ -83,17 +42,20 @@
import xbase from '@/views/contract/components/base.vue'
import files from '@/views/contract/components/files.vue'
import payLog from '@/views/contract/components/pay-log.vue'
+import attach from '@/views/project/components/attach/index.vue'
export default {
components: {
+ attach,
xbase,
files,
payLog
},
props: {
- info: {
- type: Object,
- default: null
+ id: {
+ required: true,
+ type: String,
+ default: ''
}
},
watch: {
@@ -101,7 +63,7 @@ export default {
handler(val) {
if (val) {
this.form = this.info
- this.init()
+ this.fetchInfo()
} else {
this.tabIndex = 0
}
@@ -113,29 +75,54 @@ export default {
tabIndex: 0,
show: false,
form: null,
- data: [
- {
- label: '客户名称',
- prop: 'customer'
- },
- {
- label: '合同金额(元)',
- prop: 'amount'
- },
- {
- label: '签订时间',
- prop: 'signDate'
- },
- {
- label: '回款金额',
- prop: 'payAmount'
- },
- {
- label: '负责人',
- prop: 'person'
- }
- ],
- dict: []
+ info: null,
+ data: [
+ {
+ label: '合同编号',
+ prop: 'number'
+ },
+ {
+ label: '合同类型',
+ prop: 'number'
+ },
+ {
+ label: '合同金额 单位:元',
+ prop: 'amount'
+ },
+ {
+ label: '签订时间',
+ prop: 'signDate'
+ },
+ {
+ label: '合同开始日期',
+ prop: 'startDate'
+ },
+ {
+ label: '合同结束日期',
+ prop: 'endDate'
+ },
+
+ {
+ label: '对方单位名称',
+ prop: 'customer'
+ },
+ {
+ label: '对方单位联系人',
+ prop: 'contact'
+ },
+ {
+ label: '我方单位名称',
+ prop: 'org'
+ },
+ {
+ label: '我方负责联系人',
+ prop: 'person'
+ },
+ {
+ label: '备注',
+ prop: 'remark'
+ }
+ ]
}
},
methods: {
@@ -157,26 +144,33 @@ export default {
this.form = val
this.init()
},
- init() {
- const tmp = JSON.parse(
- sessionStorage.getItem('dict_contract_status')
- )
- if (tmp) {
- 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]
+ fetchInfo() {
+ this.$api.contract.info({ id: this.id }).then(res => {
+ if (res.code === 200) {
+ this.info = res.data
+ this.fetchData()
}
- 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
+ })
+ },
}
}
diff --git a/src/views/contract/index.vue b/src/views/contract/index.vue
index e8438b8..fcef546 100644
--- a/src/views/contract/index.vue
+++ b/src/views/contract/index.vue
@@ -5,7 +5,7 @@
-
+
@@ -50,13 +48,11 @@