|
...
|
...
|
@@ -4,50 +4,26 @@ |
|
4
|
4
|
<view class="detail-page">
|
|
5
|
5
|
<view class="section">
|
|
6
|
6
|
<text class="row company">{{ form.orderNo }}</text>
|
|
7
|
|
- <view :class="['status', `status_${form.examineStatus}`]" />
|
|
8
|
|
- <view class="row"><text class="label">供货单位</text><text class="value">{{ getDicName('SUPPLIER',
|
|
9
|
|
- form.supplyUnit, dicOptions.SUPPLIER) }}</text></view>
|
|
|
7
|
+ <view :class="['status', `status_${form.status}`]" />
|
|
10
|
8
|
<view class="row"><text class="label">订货单位</text><text class="value">{{ form.orderingUnitName }}</text>
|
|
11
|
9
|
</view>
|
|
12
|
10
|
<view class="row"><text class="label">订货日期</text><text class="value">{{ form.orderDate }}</text></view>
|
|
13
|
|
- <view class="row"><text class="label">生产厂</text><text class="value">{{ form.workshopName }}</text></view>
|
|
14
|
|
- <view class="row"><text class="label">结算方式或期限</text><text class="value">{{ form.settlementTerms }}</text></view>
|
|
15
|
|
- <view class="row"><text class="label">交货方式</text><text class="value">{{ form.deliveryMethod }}</text></view>
|
|
|
11
|
+ <view class="row"><text class="label">申请撤单日期</text><text class="value">{{ form.documentPreparationDate }}</text></view>
|
|
|
12
|
+ <view class="row"><text class="label">所属办</text><text class="value">{{ form.deptName }}</text></view>
|
|
16
|
13
|
</view>
|
|
17
|
14
|
|
|
18
|
|
- <!-- 产品-变更前 -->
|
|
|
15
|
+ <!-- 产品 -->
|
|
19
|
16
|
<view class="mgb10">
|
|
20
|
|
- <Product title="变更前" mode="view" :options="genderOptions" :list="form.beforeChangeSpecList" :totalQuantity="form.totalQuantity || 0" />
|
|
21
|
|
- </view>
|
|
22
|
|
-
|
|
23
|
|
- <!-- 产品-变更后 -->
|
|
24
|
|
- <view class="mgb10">
|
|
25
|
|
- <Product title="变更后" mode="view" :options="genderOptions" :list="form.afterChangeSpecList" :totalQuantity="form.afterTotalQuantity || 0" />
|
|
|
17
|
+ <Product mode="view" :list="form.purchaseOrderRevokeLineList" :totalQuantity="form.totalQuantity || 0" :totalRevokeQuantity="form.totalRevokeQuantity || 0"/>
|
|
26
|
18
|
</view>
|
|
27
|
19
|
|
|
28
|
20
|
<view class="section">
|
|
29
|
|
- <view class="row"><text class="label">价格表编号</text><text class="value">{{ form.priceListNo }}</text></view>
|
|
30
|
|
- <view class="row"><text class="label">开票情况</text><text class="value">{{ form.invoicingStatus }}</text></view>
|
|
31
|
|
- <view class="row"><text class="label">运费</text><text class="value">{{ form.shippingCost }}</text></view>
|
|
32
|
|
- <view class="row"><text class="label">包装费</text><text class="value">{{ form.packagingFee }}</text></view>
|
|
33
|
|
- <view class="row"><text class="label">执行标准</text><text class="value">{{ getDicName('APPLICABLE_STANDARD',
|
|
34
|
|
- form.executionStandard, dicOptions.APPLICABLE_STANDARD) }}</text></view>
|
|
|
21
|
+ <view class="row"><text class="label">撤销原因</text><text class="value">{{ form.revokeReason }}</text></view>
|
|
35
|
22
|
</view>
|
|
36
|
23
|
|
|
37
|
|
- <view class="title-header">
|
|
38
|
|
- <image class="title-header_icon" src="/static/images/title.png" />
|
|
39
|
|
- <span>具体质量要求</span>
|
|
40
|
|
- </view>
|
|
41
|
24
|
<view class="section">
|
|
42
|
|
- <view class="row"><text class="label">件重条头</text><text class="value">{{ form.pieceWeightHeader }}</text></view>
|
|
43
|
|
- <view class="row"><text class="label">表面</text><text class="value">{{ form.surface }}</text></view>
|
|
44
|
|
- <view class="row"><text class="label">公差</text><text class="value">{{ form.tolerance }}</text></view>
|
|
45
|
|
- <view class="row"><text class="label">性能</text><text class="value">{{ form.performance }}</text></view>
|
|
46
|
|
- <view class="row"><text class="label">成分</text><text class="value">{{ form.element }}</text></view>
|
|
47
|
|
- <view class="row"><text class="label">包装</text><text class="value">{{ form.packaging }}</text></view>
|
|
48
|
|
- <view class="row"><text class="label">备注</text><text class="value">{{ form.remarks }}</text></view>
|
|
|
25
|
+ <view class="row"><text class="label">撤销确认凭证</text><text class="value act">{{ form.confirmationVoucherFileName }}</text></view>
|
|
49
|
26
|
</view>
|
|
50
|
|
-
|
|
51
|
27
|
</view>
|
|
52
|
28
|
</scroll-view>
|
|
53
|
29
|
<detail-buttons :buttons="displayButtons" @click="handleButtonClick" />
|
|
...
|
...
|
@@ -55,15 +31,9 @@ |
|
55
|
31
|
</template>
|
|
56
|
32
|
|
|
57
|
33
|
<script>
|
|
58
|
|
-import { getDetailApi, cancelApi, confirmApi } from '@/api/revoke_list.js'
|
|
|
34
|
+import { getDetailApi, cancelApi } from '@/api/revoke_list.js'
|
|
59
|
35
|
import Product from './product.vue'
|
|
60
|
36
|
import DetailButtons from '@/components/detail-buttons/index.vue'
|
|
61
|
|
-import {
|
|
62
|
|
- getDicName
|
|
63
|
|
-} from '@/utils/dic.js'
|
|
64
|
|
-import {
|
|
65
|
|
- getDicByCodes
|
|
66
|
|
-} from '@/utils/dic'
|
|
67
|
37
|
|
|
68
|
38
|
export default {
|
|
69
|
39
|
name: 'RevokeListDetail',
|
|
...
|
...
|
@@ -71,35 +41,24 @@ export default { |
|
71
|
41
|
data() {
|
|
72
|
42
|
return {
|
|
73
|
43
|
form: {},
|
|
74
|
|
- enterpriseTypeOptions: [],
|
|
75
|
|
- genderOptions: [],
|
|
76
|
|
- categoryOptions: [],
|
|
77
|
|
- historyList: [],
|
|
78
|
44
|
buttons: [
|
|
79
|
45
|
{ text: '编辑', visible: true, variant: 'outline', event: 'edit' },
|
|
80
|
46
|
{ text: '审核详情', visible: true, variant: 'outline', event: 'auditDetail' },
|
|
81
|
47
|
{ text: '审核', visible: true, variant: 'primary', event: 'audit' },
|
|
82
|
|
- { text: '确认变更', visible: true, variant: 'outline', event: 'confirmChange' },
|
|
83
|
48
|
{ text: '取消', visible: true, variant: 'outline', event: 'cancel', style: { color: 'rgba(0,0,0,0.9)', border: '1px solid #DCDCDC' } },
|
|
84
|
|
- ],
|
|
85
|
|
- dicOptions: {
|
|
86
|
|
- AUDIT_STATUS: [],
|
|
87
|
|
- SUPPLIER: [],
|
|
88
|
|
- APPLICABLE_STANDARD: [],
|
|
89
|
|
- },
|
|
|
49
|
+ ]
|
|
90
|
50
|
}
|
|
91
|
51
|
},
|
|
92
|
52
|
computed: {
|
|
93
|
53
|
statusFlags() {
|
|
94
|
54
|
const m = this.form || {}
|
|
95
|
|
- const e = String(m.examineStatus || '')
|
|
|
55
|
+ const e = String(m.status || '')
|
|
96
|
56
|
return {
|
|
97
|
57
|
isRefuse: e === 'REFUSE',
|
|
98
|
58
|
isAudit: e === 'AUDIT',
|
|
99
|
|
- canEdit: e === 'REFUSE' && !!m.changeCreateBy,
|
|
|
59
|
+ canEdit: e === 'REFUSE' && !!m.revokeCreateBy,
|
|
100
|
60
|
canAudit: e === 'AUDIT' && !!m.showExamine,
|
|
101
|
61
|
canCancel: e === 'REFUSE',
|
|
102
|
|
- canConfirmChange: e === 'REFUSE' && !!m.output
|
|
103
|
62
|
}
|
|
104
|
63
|
},
|
|
105
|
64
|
displayButtons() {
|
|
...
|
...
|
@@ -108,13 +67,11 @@ export default { |
|
108
|
67
|
{ ...this.buttons[0], visible: f.canEdit },
|
|
109
|
68
|
{ ...this.buttons[1], visible: true },
|
|
110
|
69
|
{ ...this.buttons[2], visible: f.canAudit },
|
|
111
|
|
- { ...this.buttons[3], visible: f.canConfirmChange },
|
|
112
|
|
- { ...this.buttons[4], visible: f.canCancel },
|
|
|
70
|
+ { ...this.buttons[3], visible: f.canCancel },
|
|
113
|
71
|
]
|
|
114
|
72
|
}
|
|
115
|
73
|
},
|
|
116
|
74
|
created() {
|
|
117
|
|
- this.loadAllDicData()
|
|
118
|
75
|
},
|
|
119
|
76
|
onLoad(query) {
|
|
120
|
77
|
const id = (query && (query.id || query.code)) || ''
|
|
...
|
...
|
@@ -136,7 +93,6 @@ export default { |
|
136
|
93
|
edit: () => this.onEdit(),
|
|
137
|
94
|
auditDetail: () => this.onAuditDetail(),
|
|
138
|
95
|
audit: () => this.onAudit(),
|
|
139
|
|
- confirmChange: () => this.onConfirmChange(),
|
|
140
|
96
|
cancel: () => this.onCancel(),
|
|
141
|
97
|
}
|
|
142
|
98
|
const fn = map[btn.event]
|
|
...
|
...
|
@@ -148,7 +104,7 @@ export default { |
|
148
|
104
|
onEdit() {
|
|
149
|
105
|
const id = this.getBusinessId()
|
|
150
|
106
|
const query = id ? ('?id=' + encodeURIComponent(id)) : ''
|
|
151
|
|
- uni.navigateTo({ url: '/pages/change_list/modify' + query })
|
|
|
107
|
+ uni.navigateTo({ url: '/pages/revoke_list/modify' + query })
|
|
152
|
108
|
},
|
|
153
|
109
|
onAuditDetail() {
|
|
154
|
110
|
const CACHE_KEY = 'sourceBusinessId'
|
|
...
|
...
|
@@ -160,26 +116,6 @@ export default { |
|
160
|
116
|
uni.setStorageSync(CACHE_KEY, this.getBusinessId())
|
|
161
|
117
|
uni.navigateTo({ url: '/pages/flow/audit' })
|
|
162
|
118
|
},
|
|
163
|
|
- onConfirmChange() {
|
|
164
|
|
- const id = this.getBusinessId();
|
|
165
|
|
- if (!id) return
|
|
166
|
|
- uni.showModal({
|
|
167
|
|
- title: '系统提示',
|
|
168
|
|
- content: '是否确定确认变更?',
|
|
169
|
|
- confirmText: '确定',
|
|
170
|
|
- cancelText: '取消',
|
|
171
|
|
- success: (res) => {
|
|
172
|
|
- if (res && res.confirm) {
|
|
173
|
|
- confirmApi(id).then(() => {
|
|
174
|
|
- uni.showToast({ title: '已确认变更', icon: 'none' })
|
|
175
|
|
- setTimeout(() => { uni.redirectTo({ url: '/pages/change_list/index' }) }, 300)
|
|
176
|
|
- }).catch(() => {
|
|
177
|
|
- uni.showToast({ title: '确认变更失败', icon: 'none' })
|
|
178
|
|
- })
|
|
179
|
|
- }
|
|
180
|
|
- }
|
|
181
|
|
- })
|
|
182
|
|
- },
|
|
183
|
119
|
onCancel() {
|
|
184
|
120
|
const id = this.getBusinessId()
|
|
185
|
121
|
if (!id) return
|
|
...
|
...
|
@@ -192,7 +128,7 @@ export default { |
|
192
|
128
|
if (res && res.confirm) {
|
|
193
|
129
|
cancelApi(id).then(() => {
|
|
194
|
130
|
uni.showToast({ title: '已取消', icon: 'none' })
|
|
195
|
|
- setTimeout(() => { uni.redirectTo({ url: '/pages/change_list/index' }) }, 300)
|
|
|
131
|
+ setTimeout(() => { uni.redirectTo({ url: '/pages/revoke_list/index' }) }, 300)
|
|
196
|
132
|
}).catch(() => {
|
|
197
|
133
|
uni.showToast({ title: '取消失败', icon: 'none' })
|
|
198
|
134
|
})
|
|
...
|
...
|
@@ -200,21 +136,6 @@ export default { |
|
200
|
136
|
}
|
|
201
|
137
|
})
|
|
202
|
138
|
},
|
|
203
|
|
- loadAllDicData() {
|
|
204
|
|
- const dicCodes = ['AUDIT_STATUS', 'SUPPLIER', 'APPLICABLE_STANDARD']
|
|
205
|
|
- return getDicByCodes(dicCodes).then(results => {
|
|
206
|
|
- this.dicOptions.AUDIT_STATUS = results.AUDIT_STATUS.data || []
|
|
207
|
|
- this.dicOptions.SUPPLIER = results.SUPPLIER.data || []
|
|
208
|
|
- this.dicOptions.APPLICABLE_STANDARD = results.APPLICABLE_STANDARD.data || []
|
|
209
|
|
- }).catch(() => {
|
|
210
|
|
- this.dicOptions = {
|
|
211
|
|
- AUDIT_STATUS: [],
|
|
212
|
|
- SUPPLIER: [],
|
|
213
|
|
- APPLICABLE_STANDARD: [],
|
|
214
|
|
- }
|
|
215
|
|
- })
|
|
216
|
|
- },
|
|
217
|
|
- getDicName: getDicName,
|
|
218
|
139
|
}
|
|
219
|
140
|
}
|
|
220
|
141
|
</script>
|
...
|
...
|
|