|
|
1
|
+<template>
|
|
|
2
|
+ <view class="page">
|
|
|
3
|
+ <view class="section">
|
|
|
4
|
+ <text class="row company">{{ form.deptName }}</text>
|
|
|
5
|
+ <view class="row"><text class="label">要车日期</text><text class="value">{{ form.applyDate }}</text></view>
|
|
|
6
|
+ </view>
|
|
|
7
|
+
|
|
|
8
|
+ <!-- 产品 -->
|
|
|
9
|
+ <view class="section2">
|
|
|
10
|
+ <Product mode="view" :list="form.delayedShipmentDetailList" />
|
|
|
11
|
+ </view>
|
|
|
12
|
+ </view>
|
|
|
13
|
+</template>
|
|
|
14
|
+
|
|
|
15
|
+<script>
|
|
|
16
|
+import { getDetailApi } from '@/api/delay_invoice.js'
|
|
|
17
|
+import Product from './product.vue'
|
|
|
18
|
+
|
|
|
19
|
+export default {
|
|
|
20
|
+ name: 'DelayInvoiceViewer',
|
|
|
21
|
+ components: { Product },
|
|
|
22
|
+ props: { id: { type: [String, Number], default: '' } },
|
|
|
23
|
+ data() {
|
|
|
24
|
+ return {
|
|
|
25
|
+ form: {},
|
|
|
26
|
+ }
|
|
|
27
|
+ },
|
|
|
28
|
+ computed: {
|
|
|
29
|
+ },
|
|
|
30
|
+ watch: {
|
|
|
31
|
+ id: {
|
|
|
32
|
+ immediate: true,
|
|
|
33
|
+ handler(val) {
|
|
|
34
|
+ const v = (val !== undefined && val !== null) ? String(val) : ''
|
|
|
35
|
+ if (v) this.loadDetail(v)
|
|
|
36
|
+ }
|
|
|
37
|
+ }
|
|
|
38
|
+ },
|
|
|
39
|
+ onLoad(query) {
|
|
|
40
|
+ },
|
|
|
41
|
+ methods: {
|
|
|
42
|
+ async loadDetail(id) {
|
|
|
43
|
+ try {
|
|
|
44
|
+ const res = await getDetailApi(id)
|
|
|
45
|
+ this.form = res.data || {}
|
|
|
46
|
+ } catch (e) {
|
|
|
47
|
+ this.form = {}
|
|
|
48
|
+ }
|
|
|
49
|
+ },
|
|
|
50
|
+ getFormValues() {
|
|
|
51
|
+ const m = this.form || {}
|
|
|
52
|
+ return JSON.parse(JSON.stringify(m))
|
|
|
53
|
+ },
|
|
|
54
|
+ }
|
|
|
55
|
+}
|
|
|
56
|
+</script>
|
|
|
57
|
+
|
|
|
58
|
+<style lang="scss" scoped>
|
|
|
59
|
+
|
|
|
60
|
+.section {
|
|
|
61
|
+ padding: 32rpx;
|
|
|
62
|
+ background: #fff;
|
|
|
63
|
+ margin-bottom: 20rpx;
|
|
|
64
|
+ position: relative;
|
|
|
65
|
+
|
|
|
66
|
+}
|
|
|
67
|
+
|
|
|
68
|
+.row {
|
|
|
69
|
+ display: flex;
|
|
|
70
|
+ margin-bottom: 28rpx;
|
|
|
71
|
+
|
|
|
72
|
+ &:last-child {
|
|
|
73
|
+ margin-bottom: 0;
|
|
|
74
|
+ }
|
|
|
75
|
+
|
|
|
76
|
+ &.company {
|
|
|
77
|
+ font-size: 36rpx;
|
|
|
78
|
+ font-weight: 600;
|
|
|
79
|
+ color: rgba(0, 0, 0, 0.9);
|
|
|
80
|
+ padding-top: 10rpx;
|
|
|
81
|
+ margin-bottom: 32rpx;
|
|
|
82
|
+ line-height: 50rpx;
|
|
|
83
|
+ }
|
|
|
84
|
+
|
|
|
85
|
+ .label {
|
|
|
86
|
+ width: 240rpx;
|
|
|
87
|
+ line-height: 32rpx;
|
|
|
88
|
+ font-size: 28rpx;
|
|
|
89
|
+ color: rgba(0, 0, 0, 0.6);
|
|
|
90
|
+ }
|
|
|
91
|
+
|
|
|
92
|
+ .value {
|
|
|
93
|
+ flex: 1;
|
|
|
94
|
+ line-height: 32rpx;
|
|
|
95
|
+ font-size: 28rpx;
|
|
|
96
|
+ color: rgba(0, 0, 0, 0.9);
|
|
|
97
|
+ text-align: right;
|
|
|
98
|
+ word-break: break-all;
|
|
|
99
|
+ }
|
|
|
100
|
+}
|
|
|
101
|
+
|
|
|
102
|
+.title-header {
|
|
|
103
|
+ background-color: #fff;
|
|
|
104
|
+ display: flex;
|
|
|
105
|
+ align-items: center;
|
|
|
106
|
+ padding: 32rpx 32rpx 22rpx;
|
|
|
107
|
+ border-bottom: 1rpx dashed #f0f0f0;
|
|
|
108
|
+
|
|
|
109
|
+ &_icon {
|
|
|
110
|
+ width: 32rpx;
|
|
|
111
|
+ height: 28rpx;
|
|
|
112
|
+ margin-right: 16rpx;
|
|
|
113
|
+ }
|
|
|
114
|
+
|
|
|
115
|
+ span {
|
|
|
116
|
+ color: rgba(0, 0, 0, 0.9);
|
|
|
117
|
+ font-size: 32rpx;
|
|
|
118
|
+ line-height: 44rpx;
|
|
|
119
|
+ font-weight: 600;
|
|
|
120
|
+ }
|
|
|
121
|
+}
|
|
|
122
|
+</style> |
...
|
...
|
|