@nstc-business/tbm 0.0.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -4
- package/src/components/invoiceDetail/index.vue +153 -0
- package/src/components/invoiceDetail/invoiceLog.vue +280 -0
- package/src/components/invoiceDetail/invoiceTemplateDetail.vue +99 -0
- package/src/components/invoiceDetail/occupationLog.vue +291 -0
- package/src/components/invoiceDetail/quotaInfor.vue +482 -0
- package/src/components/invoiceDetail/subComponents/memberSelectMultiple.vue +162 -0
- package/src/components/test/index.js +0 -8
- package/src/components/test/src/index.vue +0 -11
- package/src/index.js +0 -24
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nstc-business/tbm",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"private": false,
|
|
5
|
-
"main": "src/index.js",
|
|
6
5
|
"scripts": {
|
|
7
6
|
"serve": "vue-cli-service serve",
|
|
8
7
|
"test": "vue-cli-service serve --test",
|
|
@@ -22,6 +21,7 @@
|
|
|
22
21
|
"el-table-draggable": "^1.4.4",
|
|
23
22
|
"element-ui": "^2.15.6",
|
|
24
23
|
"n20-common-lib": "2.7.57",
|
|
24
|
+
"vxe-table": "^3.6.17",
|
|
25
25
|
"qrcode": "^1.5.0",
|
|
26
26
|
"resize-detector": "^0.3.0",
|
|
27
27
|
"vue": "^2.6.11",
|
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
"vuex": "^3.6.2"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
|
-
"src/components"
|
|
34
|
-
"src/index.js"
|
|
33
|
+
"src/components"
|
|
35
34
|
],
|
|
36
35
|
"devDependencies": {
|
|
37
36
|
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<cl-dialog v-drag width="80%" :destroy-on-close="true" max-dialog :visible.sync="invoiceVisible" title="发票详情">
|
|
3
|
+
<cl-page>
|
|
4
|
+
<template slot="header">
|
|
5
|
+
<cl-tertiary-tab class="m-b-s m-t-s" :init.sync="name" :data="tabList" @click="clickTab" />
|
|
6
|
+
</template>
|
|
7
|
+
<div class="wrapperCss">
|
|
8
|
+
<template v-if="name === '发票信息'">
|
|
9
|
+
<div class="flex-box">
|
|
10
|
+
<div class="wrapperLeft">
|
|
11
|
+
<invoiceTemplateDetail v-model="formData"></invoiceTemplateDetail>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="wrapperRight">
|
|
15
|
+
<iframe class="invoiceImg" :src="'/api/onlinePreview?beid=' + beid" frameborder="0" v-if="beid"></iframe>
|
|
16
|
+
<cl-empty :type="`empty`" content="暂无图片" :width="400" v-else></cl-empty>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<template v-if="name === '额度占用信息'">
|
|
22
|
+
<quotaInfor :type="'invoice'" :tradeId="query.invoiceId"></quotaInfor>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<div class="tableHeight">
|
|
26
|
+
<occupationLog :invoiceId="query.invoiceId" v-if="name === '占用释放记录'"></occupationLog>
|
|
27
|
+
<invoiceLog :sourceId="query.invoiceId" v-if="name === '发票操作记录'"></invoiceLog>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</cl-page>
|
|
31
|
+
</cl-dialog>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import invoiceTemplateDetail from './invoiceTemplateDetail.vue'
|
|
36
|
+
import quotaInfor from './quotaInfor.vue'
|
|
37
|
+
import invoiceLog from './invoiceLog.vue'
|
|
38
|
+
import occupationLog from './occupationLog.vue'
|
|
39
|
+
export default {
|
|
40
|
+
name: 'invoiceDetail',
|
|
41
|
+
props: {
|
|
42
|
+
value: {
|
|
43
|
+
require: true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
components: {
|
|
47
|
+
quotaInfor,
|
|
48
|
+
invoiceLog,
|
|
49
|
+
invoiceTemplateDetail,
|
|
50
|
+
occupationLog
|
|
51
|
+
},
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
invoiceVisible: false,
|
|
55
|
+
name: '发票信息',
|
|
56
|
+
tabList: [{ name: '发票信息' }, { name: '额度占用信息' }, { name: '占用释放记录' }, { name: '发票操作记录' }],
|
|
57
|
+
formData: {}, // 发票信息变量
|
|
58
|
+
beid: '', // 发票附件fileId
|
|
59
|
+
query: {}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
watch: {},
|
|
63
|
+
created() {},
|
|
64
|
+
methods: {
|
|
65
|
+
async clickTab(item) {
|
|
66
|
+
this.name = item.name
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @param data 调用示例setInfo({invoiceId:invoiceId}) invoiceId发票ID
|
|
71
|
+
* @returns {Promise<void>} 获取发票信息并弹出发票详情窗口
|
|
72
|
+
*/
|
|
73
|
+
setInfo(data) {
|
|
74
|
+
this.name = '发票信息'
|
|
75
|
+
this.formData = {}
|
|
76
|
+
this.query = data
|
|
77
|
+
this.setInvoice()
|
|
78
|
+
this.invoiceVisible = true
|
|
79
|
+
},
|
|
80
|
+
/** 获取发票信息 */
|
|
81
|
+
async setInvoice() {
|
|
82
|
+
const { code, data } = await this.$axios.get(`/tbm/invoice-info/${this.query.invoiceId}`, {
|
|
83
|
+
loading: false
|
|
84
|
+
})
|
|
85
|
+
if (code === 200) {
|
|
86
|
+
this.formData = data
|
|
87
|
+
this.beid = data?.fileId
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
</script>
|
|
93
|
+
<style lang="less" scoped>
|
|
94
|
+
.wrapperCss {
|
|
95
|
+
height: 100%;
|
|
96
|
+
.wrapperLeft {
|
|
97
|
+
height: 100%;
|
|
98
|
+
width: 500px;
|
|
99
|
+
overflow-y: scroll;
|
|
100
|
+
}
|
|
101
|
+
.tableHeight {
|
|
102
|
+
height: 450px;
|
|
103
|
+
}
|
|
104
|
+
.n20-empty {
|
|
105
|
+
height: 98%;
|
|
106
|
+
padding-bottom: 0;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
}
|
|
109
|
+
.wrapperRight {
|
|
110
|
+
height: 65vh;
|
|
111
|
+
flex: 1;
|
|
112
|
+
.agnc {
|
|
113
|
+
text-align: center;
|
|
114
|
+
}
|
|
115
|
+
.upload-wrap,
|
|
116
|
+
.invoiceImg {
|
|
117
|
+
position: relative;
|
|
118
|
+
flex: 1;
|
|
119
|
+
height: 100%;
|
|
120
|
+
border: 1px solid #ebeef5;
|
|
121
|
+
width: 100%;
|
|
122
|
+
border-radius: 5px;
|
|
123
|
+
margin-left: 20px;
|
|
124
|
+
overflow: auto;
|
|
125
|
+
}
|
|
126
|
+
.rotateCss {
|
|
127
|
+
position: absolute;
|
|
128
|
+
bottom: 88px;
|
|
129
|
+
right: 40px;
|
|
130
|
+
}
|
|
131
|
+
.upload-wrap {
|
|
132
|
+
position: relative;
|
|
133
|
+
& > div {
|
|
134
|
+
position: absolute;
|
|
135
|
+
top: 50%;
|
|
136
|
+
left: 50%;
|
|
137
|
+
transform: translate(-50%, -50%);
|
|
138
|
+
width: 450px;
|
|
139
|
+
margin: 0 auto;
|
|
140
|
+
& > p {
|
|
141
|
+
font-size: 12px;
|
|
142
|
+
color: #999;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
.upload-icon {
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
color: #008df0;
|
|
148
|
+
font-size: 50px;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
</style>
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
<!--发票操作记录-->
|
|
2
|
+
<template>
|
|
3
|
+
<cl-page>
|
|
4
|
+
<div slot="header">
|
|
5
|
+
<div class="row_between_center m-b-s m-t-s flex-box">
|
|
6
|
+
<div class="row_start_center">
|
|
7
|
+
<el-form :inline="true" @submit.native.prevent>
|
|
8
|
+
<el-form-item label="操作日期">
|
|
9
|
+
<cl-date-picker-por
|
|
10
|
+
:start-date.sync="filterData.starDate"
|
|
11
|
+
:end-date.sync="filterData.endDate"
|
|
12
|
+
type="daterange"
|
|
13
|
+
:clearable="false"
|
|
14
|
+
value-format="yyyy-MM-dd"
|
|
15
|
+
@change="getList"
|
|
16
|
+
/>
|
|
17
|
+
</el-form-item>
|
|
18
|
+
</el-form>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<cl-table-pro
|
|
23
|
+
ref="table"
|
|
24
|
+
:data="tableData"
|
|
25
|
+
:show-setsize="true"
|
|
26
|
+
height="100%"
|
|
27
|
+
:small="{ border: true, size: 'small', stripe: false }"
|
|
28
|
+
:columns="columns"
|
|
29
|
+
>
|
|
30
|
+
<vxe-column
|
|
31
|
+
slot="operDetail"
|
|
32
|
+
slot-scope="{ column }"
|
|
33
|
+
v-bind="{ ...column, field: column.prop, title: column.label }"
|
|
34
|
+
>
|
|
35
|
+
<template slot-scope="{ row }">
|
|
36
|
+
<div style="color: var(--color-primary); cursor: pointer" @click="viewDetail(row)">详情</div>
|
|
37
|
+
</template>
|
|
38
|
+
</vxe-column>
|
|
39
|
+
</cl-table-pro>
|
|
40
|
+
|
|
41
|
+
<div slot="footer" class="flex-box flex-lr m-t-s">
|
|
42
|
+
<div></div>
|
|
43
|
+
<cl-pagination
|
|
44
|
+
:page-obj="page"
|
|
45
|
+
:page-key="{ no: 'current', size: 'pageSize', total: 'totalSize' }"
|
|
46
|
+
:page-sizes="[200, 400, 600, 800]"
|
|
47
|
+
@change="getList"
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
<cl-dialog
|
|
51
|
+
:title="title + '详情'"
|
|
52
|
+
:visible.sync="contractVisible"
|
|
53
|
+
append-to-body
|
|
54
|
+
:close-on-click-modal="true"
|
|
55
|
+
:close-on-press-escape="false"
|
|
56
|
+
top="10vh"
|
|
57
|
+
width="60%"
|
|
58
|
+
>
|
|
59
|
+
<cl-page heght="100%">
|
|
60
|
+
<div slot="header" class="m-b-s">
|
|
61
|
+
<span>操作类型:</span>
|
|
62
|
+
<span class="color-warning">{{ title }}</span>
|
|
63
|
+
|
|
64
|
+
<span>操作时间:</span>
|
|
65
|
+
<span class="color-warning">{{ optTime }}</span>
|
|
66
|
+
</div>
|
|
67
|
+
<cl-table-pro
|
|
68
|
+
:data="contractTableData"
|
|
69
|
+
:show-setsize="true"
|
|
70
|
+
height="350px"
|
|
71
|
+
:small="{ border: true, size: 'small', stripe: false }"
|
|
72
|
+
:columns="contractColumns"
|
|
73
|
+
>
|
|
74
|
+
<vxe-column
|
|
75
|
+
slot="bgProp"
|
|
76
|
+
slot-scope="{ column }"
|
|
77
|
+
v-bind="{ ...column, field: column.prop, title: column.label }"
|
|
78
|
+
>
|
|
79
|
+
<template slot-scope="{ row }">
|
|
80
|
+
<span v-if="isNaN(Number(row[column.prop]))">{{ row[column.prop] }}</span>
|
|
81
|
+
<span v-else>{{ row[column.prop] | toThousands }}</span>
|
|
82
|
+
</template>
|
|
83
|
+
</vxe-column>
|
|
84
|
+
</cl-table-pro>
|
|
85
|
+
</cl-page>
|
|
86
|
+
<div slot="footer" class="flex-box flex-lr m-t-s">
|
|
87
|
+
<div class="row_start_center">
|
|
88
|
+
<cl-statis-item type="全部合计" :list="[{ label: '笔数', value: contractPage.totalSize }]" />
|
|
89
|
+
</div>
|
|
90
|
+
<cl-pagination
|
|
91
|
+
:page-obj="contractPage"
|
|
92
|
+
:page-key="{ no: 'current', size: 'pageSize', total: 'totalSize' }"
|
|
93
|
+
:page-sizes="[200, 400, 600, 800]"
|
|
94
|
+
@change="viewDetail(row)"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
</cl-dialog>
|
|
98
|
+
</cl-page>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<script>
|
|
102
|
+
import { dayjs } from 'n20-common-lib'
|
|
103
|
+
export default {
|
|
104
|
+
components: {},
|
|
105
|
+
props: {
|
|
106
|
+
sourceId: {
|
|
107
|
+
type: [String, Number],
|
|
108
|
+
default: () => {
|
|
109
|
+
return ''
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
watch: {
|
|
114
|
+
sourceId: {
|
|
115
|
+
handler(newval) {
|
|
116
|
+
this.getList()
|
|
117
|
+
},
|
|
118
|
+
deep: true
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
data() {
|
|
122
|
+
return {
|
|
123
|
+
tableData: [],
|
|
124
|
+
columns: [
|
|
125
|
+
{
|
|
126
|
+
label: '操作时间',
|
|
127
|
+
prop: 'createTime',
|
|
128
|
+
align: 'center',
|
|
129
|
+
minWidth: 140,
|
|
130
|
+
'show-overflow-tooltip': true
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
label: '操作用户',
|
|
134
|
+
prop: 'operater',
|
|
135
|
+
align: 'center',
|
|
136
|
+
minWidth: 140,
|
|
137
|
+
'show-overflow-tooltip': true
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
label: '操作用户姓名',
|
|
141
|
+
prop: 'operaterName',
|
|
142
|
+
align: 'center',
|
|
143
|
+
minWidth: 140,
|
|
144
|
+
'show-overflow-tooltip': true
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label: '操作用户单位名称',
|
|
148
|
+
prop: 'memberName',
|
|
149
|
+
align: 'center',
|
|
150
|
+
minWidth: 140,
|
|
151
|
+
'show-overflow-tooltip': true
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
label: '操作',
|
|
155
|
+
prop: 'logTypeEnum',
|
|
156
|
+
align: 'center',
|
|
157
|
+
width: 100,
|
|
158
|
+
'show-overflow-tooltip': true,
|
|
159
|
+
type: 'html',
|
|
160
|
+
formatter: ({ row }) => {
|
|
161
|
+
return `<span>${row.logTypeEnum && row.logTypeEnum.name}</span>`
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
orders: [],
|
|
166
|
+
filterData: {
|
|
167
|
+
starDate: dayjs().date(1).format('YYYY-MM-DD'),
|
|
168
|
+
endDate: dayjs(new Date()).format('YYYY-MM-DD')
|
|
169
|
+
},
|
|
170
|
+
page: {
|
|
171
|
+
current: 1,
|
|
172
|
+
pageSize: 200,
|
|
173
|
+
totalSize: 0
|
|
174
|
+
},
|
|
175
|
+
title: '',
|
|
176
|
+
optTime: '',
|
|
177
|
+
row: {},
|
|
178
|
+
contractVisible: false,
|
|
179
|
+
contractTableData: [],
|
|
180
|
+
contractColumns: [
|
|
181
|
+
{
|
|
182
|
+
label: '字段',
|
|
183
|
+
prop: 'paramName',
|
|
184
|
+
align: 'center',
|
|
185
|
+
minWidth: 140,
|
|
186
|
+
'show-overflow-tooltip': true
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: '变更前',
|
|
190
|
+
prop: 'oldValue',
|
|
191
|
+
align: 'right',
|
|
192
|
+
slotName: 'bgProp',
|
|
193
|
+
minWidth: 140,
|
|
194
|
+
'show-overflow-tooltip': true
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
label: '变更后',
|
|
198
|
+
prop: 'newValue',
|
|
199
|
+
align: 'right',
|
|
200
|
+
slotName: 'bgProp',
|
|
201
|
+
minWidth: 140,
|
|
202
|
+
'show-overflow-tooltip': true
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
label: '生效日期',
|
|
206
|
+
prop: 'updateTime',
|
|
207
|
+
align: 'center',
|
|
208
|
+
minWidth: 140,
|
|
209
|
+
'show-overflow-tooltip': true
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
contractPage: {
|
|
213
|
+
current: 1,
|
|
214
|
+
pageSize: 200,
|
|
215
|
+
totalSize: 0
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
mounted() {
|
|
220
|
+
this.getList()
|
|
221
|
+
},
|
|
222
|
+
activated() {},
|
|
223
|
+
methods: {
|
|
224
|
+
async getList() {
|
|
225
|
+
this.$set(this.filterData, 'sourceType', 'INVOICE_OPER')
|
|
226
|
+
this.$set(this.filterData, 'sourceId', this.sourceId)
|
|
227
|
+
const obj = {
|
|
228
|
+
current: this.page.current,
|
|
229
|
+
data: this.filterData,
|
|
230
|
+
orders: this.orders,
|
|
231
|
+
size: this.page.pageSize
|
|
232
|
+
}
|
|
233
|
+
const { code, data } = await this.$axios.post('/tbm/operLog/log/list', obj, {
|
|
234
|
+
loading: false
|
|
235
|
+
})
|
|
236
|
+
if (code === 200) {
|
|
237
|
+
this.tableData = data.records || []
|
|
238
|
+
this.page.totalSize = data.total
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
async viewDetail(row) {
|
|
242
|
+
this.row = row
|
|
243
|
+
this.title = row.logTypeEnum.name
|
|
244
|
+
this.optTime = row.createTime
|
|
245
|
+
// INVOICE_CANCEL 作废 INVOICE_CANCEL 新增 INVOICE_ACTIVE
|
|
246
|
+
if (row.logTypeEnum.code === 'INVOICE_ACTIVE' || row.logTypeEnum.code === 'INVOICE_CANCEL') {
|
|
247
|
+
// 新增发票/发票作废
|
|
248
|
+
this.$refs.addEditDetail.setInfo(row, row.logTypeEnum.code)
|
|
249
|
+
} else {
|
|
250
|
+
// 发票修改
|
|
251
|
+
this.contractVisible = true
|
|
252
|
+
const obj = {
|
|
253
|
+
current: this.contractPage.current,
|
|
254
|
+
data: {
|
|
255
|
+
parentLogId: row.logId
|
|
256
|
+
},
|
|
257
|
+
orders: this.orders,
|
|
258
|
+
size: this.contractPage.pageSize
|
|
259
|
+
}
|
|
260
|
+
const { code, data } = await this.$axios.post('/tbm/operLog/log/list', obj, {
|
|
261
|
+
loading: false
|
|
262
|
+
})
|
|
263
|
+
if (code === 200) {
|
|
264
|
+
this.contractTableData = data.records || []
|
|
265
|
+
this.contractPage.totalSize = data.total
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
</script>
|
|
272
|
+
|
|
273
|
+
<style lang="less" scoped>
|
|
274
|
+
/deep/ .el-form-item {
|
|
275
|
+
margin-bottom: 0;
|
|
276
|
+
}
|
|
277
|
+
.flex-column {
|
|
278
|
+
height: calc(100% - 50px);
|
|
279
|
+
}
|
|
280
|
+
</style>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<!-- 发票信息(静态)-组件-全局使用 -->
|
|
2
|
+
<template>
|
|
3
|
+
<el-descriptions class="n20-descriptions" :column="1" size="default" border>
|
|
4
|
+
<template v-for="(item, index) in formColums">
|
|
5
|
+
<el-descriptions-item :key="index" :label="item.attrName" v-if="isShowFunc(item)">
|
|
6
|
+
<template v-if="type == 'invoice'">
|
|
7
|
+
<span :class="item.attrName.indexOf('金额') > -1 ? 'color-primary' : ''">
|
|
8
|
+
{{ valueFormat(item, value) }}
|
|
9
|
+
</span>
|
|
10
|
+
</template>
|
|
11
|
+
<template v-else-if="type == 'cldiff'">
|
|
12
|
+
<cl-diff
|
|
13
|
+
:value="valueFormat(item, value)"
|
|
14
|
+
:old-value="valueFormat(item, oldFormData)"
|
|
15
|
+
:tooltip="oldFormData?.submiterName + oldFormData?.submitDate + '修改'"
|
|
16
|
+
/>
|
|
17
|
+
</template>
|
|
18
|
+
</el-descriptions-item>
|
|
19
|
+
</template>
|
|
20
|
+
<slot name="endDate"></slot>
|
|
21
|
+
</el-descriptions>
|
|
22
|
+
</template>
|
|
23
|
+
<script>
|
|
24
|
+
import { numerify } from 'n20-common-lib'
|
|
25
|
+
export default {
|
|
26
|
+
watch: {
|
|
27
|
+
'value.contractType': {
|
|
28
|
+
handler(newval) {
|
|
29
|
+
this.getContractDetailSetting()
|
|
30
|
+
},
|
|
31
|
+
deep: true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
oldFormData: {
|
|
36
|
+
type: Object,
|
|
37
|
+
default: () => {
|
|
38
|
+
return {}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
type: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: 'invoice'
|
|
44
|
+
},
|
|
45
|
+
value: {
|
|
46
|
+
type: Object,
|
|
47
|
+
default: () => {
|
|
48
|
+
return {}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
created() {
|
|
53
|
+
this.getContractDetailSetting()
|
|
54
|
+
},
|
|
55
|
+
data() {
|
|
56
|
+
return {
|
|
57
|
+
formColums: []
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
numerify,
|
|
62
|
+
valueFormat(item, value) {
|
|
63
|
+
let v = ''
|
|
64
|
+
if (value[item.attrCode]?.constructor === Object) {
|
|
65
|
+
v = value[item.attrCode]?.name
|
|
66
|
+
} else if (value && item.attrName.indexOf('元') > -1) {
|
|
67
|
+
v = numerify(value[item.attrCode], '0,0.00')
|
|
68
|
+
} else {
|
|
69
|
+
v = value[item.attrCode]
|
|
70
|
+
}
|
|
71
|
+
return String(v || '--')
|
|
72
|
+
},
|
|
73
|
+
// 是否显示特殊处理
|
|
74
|
+
isShowFunc(item) {
|
|
75
|
+
let show = item.display == 1 ? true : false
|
|
76
|
+
return show
|
|
77
|
+
},
|
|
78
|
+
// 动态获取合同动态信息
|
|
79
|
+
async getContractDetailSetting() {
|
|
80
|
+
const obj = {
|
|
81
|
+
current: 1,
|
|
82
|
+
data: {
|
|
83
|
+
scId: -1
|
|
84
|
+
},
|
|
85
|
+
size: 1000
|
|
86
|
+
}
|
|
87
|
+
await this.$axios
|
|
88
|
+
.post('/tbm/setupBase/modelSetup/list?key=invoice', obj, {
|
|
89
|
+
loading: false
|
|
90
|
+
})
|
|
91
|
+
.then(res => {
|
|
92
|
+
if (res.code === 200) {
|
|
93
|
+
this.formColums = res.data?.records
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</script>
|