|
...
|
...
|
@@ -77,7 +77,7 @@ export default { |
|
77
|
77
|
{ text: '编辑', visible: true, variant: 'outline', event: 'edit' },
|
|
78
|
78
|
{ text: '审核详情', visible: true, variant: 'outline', event: 'auditDetail' },
|
|
79
|
79
|
{ text: '审核', visible: true, variant: 'primary', event: 'audit' },
|
|
80
|
|
- { text: '申请变更', visible: true, variant: 'outline', event: 'changeApply' },
|
|
|
80
|
+ { text: '申请发货', visible: true, variant: 'outline', event: 'shipmentApply' },
|
|
81
|
81
|
{ text: '取消', visible: true, variant: 'outline', event: 'cancel', style: { color: 'rgba(0,0,0,0.9)', border: '1px solid #DCDCDC' } },
|
|
82
|
82
|
],
|
|
83
|
83
|
dicOptions: {
|
|
...
|
...
|
@@ -90,20 +90,22 @@ export default { |
|
90
|
90
|
computed: {
|
|
91
|
91
|
statusFlags() {
|
|
92
|
92
|
const s = String((this.form && this.form.status) || '')
|
|
|
93
|
+ const e = String((this.form && this.form.examineStatus) || '')
|
|
93
|
94
|
return {
|
|
94
|
|
- isRefuse: s === 'REFUSE',
|
|
95
|
|
- isPass: s === 'PASS',
|
|
96
|
|
- isAudit: s === 'AUDIT',
|
|
|
95
|
+ isRefuse: e === 'REFUSE',
|
|
|
96
|
+ isAudit: e === 'AUDIT',
|
|
97
|
97
|
canExamine: !!this.showExamine,
|
|
|
98
|
+ canDeliveryApply: s === 'ISSUED',
|
|
|
99
|
+ contractCreateBy: !!(this.form && this.form.contractCreateBy)
|
|
98
|
100
|
}
|
|
99
|
101
|
},
|
|
100
|
102
|
displayButtons() {
|
|
101
|
103
|
const f = this.statusFlags
|
|
102
|
104
|
return [
|
|
103
|
|
- { ...this.buttons[0], visible: f.isRefuse },
|
|
104
|
|
- { ...this.buttons[1], visible: true },
|
|
|
105
|
+ { ...this.buttons[0], visible: f.isRefuse && f.contractCreateBy },
|
|
|
106
|
+ { ...this.buttons[1], visible: !f.isRefuse },
|
|
105
|
107
|
{ ...this.buttons[2], visible: f.isAudit && f.canExamine },
|
|
106
|
|
- { ...this.buttons[3], visible: f.isPass },
|
|
|
108
|
+ { ...this.buttons[3], visible: f.canDeliveryApply },
|
|
107
|
109
|
{ ...this.buttons[4], visible: f.isRefuse },
|
|
108
|
110
|
]
|
|
109
|
111
|
}
|
|
...
|
...
|
@@ -127,19 +129,13 @@ export default { |
|
127
|
129
|
this.form = {}
|
|
128
|
130
|
}
|
|
129
|
131
|
},
|
|
130
|
|
- onViewHistory(item) {
|
|
131
|
|
- const id = item && (item.id)
|
|
132
|
|
- if (!id) return
|
|
133
|
|
- const query = '?id=' + encodeURIComponent(id)
|
|
134
|
|
- uni.navigateTo({ url: '/pages/credit_manage/history_detail' + query })
|
|
135
|
|
- },
|
|
136
|
132
|
handleButtonClick(btn) {
|
|
137
|
133
|
if (!btn || btn.disabled) return
|
|
138
|
134
|
const map = {
|
|
139
|
135
|
edit: () => this.onEdit(),
|
|
140
|
136
|
auditDetail: () => this.onAuditDetail(),
|
|
141
|
137
|
audit: () => this.onAudit(),
|
|
142
|
|
- changeApply: () => this.onChangeApply(),
|
|
|
138
|
+ shipmentApply: () => this.onShipmentApply(),
|
|
143
|
139
|
cancel: () => this.onCancel(),
|
|
144
|
140
|
}
|
|
145
|
141
|
const fn = map[btn.event]
|
|
...
|
...
|
@@ -151,7 +147,7 @@ export default { |
|
151
|
147
|
onEdit() {
|
|
152
|
148
|
const id = this.getBusinessId()
|
|
153
|
149
|
const query = id ? ('?id=' + encodeURIComponent(id)) : ''
|
|
154
|
|
- uni.navigateTo({ url: '/pages/credit_manage/modify' + query })
|
|
|
150
|
+ uni.navigateTo({ url: '/pages/order_list/modify' + query })
|
|
155
|
151
|
},
|
|
156
|
152
|
onAuditDetail() {
|
|
157
|
153
|
const CACHE_KEY = 'sourceBusinessId'
|
|
...
|
...
|
@@ -163,10 +159,10 @@ export default { |
|
163
|
159
|
uni.setStorageSync(CACHE_KEY, this.getBusinessId())
|
|
164
|
160
|
uni.navigateTo({ url: '/pages/flow/audit' })
|
|
165
|
161
|
},
|
|
166
|
|
- onChangeApply() {
|
|
|
162
|
+ onShipmentApply() {
|
|
167
|
163
|
const id = this.getBusinessId()
|
|
168
|
164
|
const query = id ? ('?id=' + encodeURIComponent(id)) : ''
|
|
169
|
|
- uni.navigateTo({ url: '/pages/credit_manage/change' + query })
|
|
|
165
|
+ uni.navigateTo({ url: '/pages/order_list/shipment_apply' + query })
|
|
170
|
166
|
},
|
|
171
|
167
|
onCancel() {
|
|
172
|
168
|
const id = this.getBusinessId()
|
|
...
|
...
|
@@ -180,7 +176,7 @@ export default { |
|
180
|
176
|
if (res && res.confirm) {
|
|
181
|
177
|
cancelApi(id).then(() => {
|
|
182
|
178
|
uni.showToast({ title: '已取消', icon: 'none' })
|
|
183
|
|
- setTimeout(() => { uni.redirectTo({ url: '/pages/credit_manage/index' }) }, 300)
|
|
|
179
|
+ setTimeout(() => { uni.redirectTo({ url: '/pages/order_list/index' }) }, 300)
|
|
184
|
180
|
}).catch(() => {
|
|
185
|
181
|
uni.showToast({ title: '取消失败', icon: 'none' })
|
|
186
|
182
|
})
|
|
...
|
...
|
@@ -428,4 +424,4 @@ export default { |
|
428
|
424
|
font-weight: 600;
|
|
429
|
425
|
}
|
|
430
|
426
|
}
|
|
431
|
|
-</style> |
|
|
\ No newline at end of file |
|
|
427
|
+</style> |
...
|
...
|
|