|
@@ -97,7 +97,9 @@ |
|
@@ -97,7 +97,9 @@ |
|
97
|
import { downloadFile } from '@/utils/downloadFile.js'
|
97
|
import { downloadFile } from '@/utils/downloadFile.js'
|
|
98
|
import DetailButtons from '@/components/detail-buttons/index.vue'
|
98
|
import DetailButtons from '@/components/detail-buttons/index.vue'
|
|
99
|
import { getDicByCodes, getDicName } from '@/utils/dic.js'
|
99
|
import { getDicByCodes, getDicName } from '@/utils/dic.js'
|
|
100
|
-import { domesticCustomerCreditCancelApi, domesticCustomerCreditGetApi, getPurchaseDeptApi, getAllRegionApi } from '@/api/procure-manage/domesticCustomerCredit.js'
|
100
|
+import { boolText } from '@/utils/common.js'
|
|
|
|
101
|
+import { domesticCustomerCreditCancelApi, domesticCustomerCreditGetApi, getPurchaseDeptApi, getAllRegionApi, domesticCustomerCreditSubmitApi } from '@/api/procure-manage/domesticCustomerCredit.js'
|
|
|
|
102
|
+import { getInfo } from '@/api/login.js'
|
|
101
|
|
103
|
|
|
102
|
export default {
|
104
|
export default {
|
|
103
|
name: 'DomesticTradeDetail',
|
105
|
name: 'DomesticTradeDetail',
|
|
@@ -109,6 +111,7 @@ export default { |
|
@@ -109,6 +111,7 @@ export default { |
|
109
|
id: '',
|
111
|
id: '',
|
|
110
|
loading: false,
|
112
|
loading: false,
|
|
111
|
form: {},
|
113
|
form: {},
|
|
|
|
114
|
+ investigatorId: '',
|
|
112
|
dicOptions: {
|
115
|
dicOptions: {
|
|
113
|
COMPANY_NATURE: [],
|
116
|
COMPANY_NATURE: [],
|
|
114
|
DEVELOP_NEW: [],
|
117
|
DEVELOP_NEW: [],
|
|
@@ -144,6 +147,11 @@ export default { |
|
@@ -144,6 +147,11 @@ export default { |
|
144
|
visible: true,
|
147
|
visible: true,
|
|
145
|
variant: 'outline',
|
148
|
variant: 'outline',
|
|
146
|
event: 'cancel',
|
149
|
event: 'cancel',
|
|
|
|
150
|
+ },{
|
|
|
|
151
|
+ text: '提交',
|
|
|
|
152
|
+ visible: true,
|
|
|
|
153
|
+ variant: 'outline',
|
|
|
|
154
|
+ event: 'submit',
|
|
147
|
}]
|
155
|
}]
|
|
148
|
}
|
156
|
}
|
|
149
|
},
|
157
|
},
|
|
@@ -155,9 +163,10 @@ export default { |
|
@@ -155,9 +163,10 @@ export default { |
|
155
|
return [
|
163
|
return [
|
|
156
|
{ ...this.buttons[0], visible: d && this.$auth.hasPermi('procure-manage:domestic-trade:review') },
|
164
|
{ ...this.buttons[0], visible: d && this.$auth.hasPermi('procure-manage:domestic-trade:review') },
|
|
157
|
{ ...this.buttons[1], visible: s === 'AUDIT' && e && this.$auth.hasPermi('procure-manage:domestic-trade:approve') },
|
165
|
{ ...this.buttons[1], visible: s === 'AUDIT' && e && this.$auth.hasPermi('procure-manage:domestic-trade:approve') },
|
|
158
|
- { ...this.buttons[2], visible: s === 'REFUSE' && this.$auth.hasPermi('procure-manage:domestic-trade:modify') },
|
166
|
+ { ...this.buttons[2], visible: (s === 'REFUSE' || !s) && this.$auth.hasPermi('procure-manage:domestic-trade:modify') },
|
|
159
|
// { ...this.buttons[3], visible: s === 'PASS' && this.$auth.hasPermi('procure-manage:domestic-trade:change') },
|
167
|
// { ...this.buttons[3], visible: s === 'PASS' && this.$auth.hasPermi('procure-manage:domestic-trade:change') },
|
|
160
|
{ ...this.buttons[3], visible: s === 'REFUSE' && this.$auth.hasPermi('procure-manage:domestic-trade:cancel') },
|
168
|
{ ...this.buttons[3], visible: s === 'REFUSE' && this.$auth.hasPermi('procure-manage:domestic-trade:cancel') },
|
|
|
|
169
|
+ { ...this.buttons[4], visible: (s === 'REFUSE' || !s) && this.$auth.hasPermi('procure-manage:domestic-trade:submit') },
|
|
161
|
]
|
170
|
]
|
|
162
|
},
|
171
|
},
|
|
163
|
companyNatureOptions() {
|
172
|
companyNatureOptions() {
|
|
@@ -219,6 +228,16 @@ export default { |
|
@@ -219,6 +228,16 @@ export default { |
|
219
|
this.loadDetail()
|
228
|
this.loadDetail()
|
|
220
|
},
|
229
|
},
|
|
221
|
methods: {
|
230
|
methods: {
|
|
|
|
231
|
+ async getUserInfo() {
|
|
|
|
232
|
+ getInfo()
|
|
|
|
233
|
+ .then((res) => {
|
|
|
|
234
|
+ console.log('获取用户信息成功:', res);
|
|
|
|
235
|
+ this.investigatorId = res?.data?.id || '';
|
|
|
|
236
|
+ })
|
|
|
|
237
|
+ .catch((err) => {
|
|
|
|
238
|
+ console.error('获取用户信息失败:', err);
|
|
|
|
239
|
+ });
|
|
|
|
240
|
+ },
|
|
222
|
async loadDicData() {
|
241
|
async loadDicData() {
|
|
223
|
try {
|
242
|
try {
|
|
224
|
const results = await getDicByCodes(['COMPANY_NATURE', 'DEVELOP_NEW', 'OPERATION_METHOD', 'PURCHASE_SOURCE'])
|
243
|
const results = await getDicByCodes(['COMPANY_NATURE', 'DEVELOP_NEW', 'OPERATION_METHOD', 'PURCHASE_SOURCE'])
|
|
@@ -291,7 +310,28 @@ export default { |
|
@@ -291,7 +310,28 @@ export default { |
|
291
|
if (e === 'audit') return this.onAudit(btn && btn.params)
|
310
|
if (e === 'audit') return this.onAudit(btn && btn.params)
|
|
292
|
if (e === 'auditDetail') return this.onAuditDetail(btn && btn.params)
|
311
|
if (e === 'auditDetail') return this.onAuditDetail(btn && btn.params)
|
|
293
|
if (e === 'cancel') return this.onCancel(btn && btn.params)
|
312
|
if (e === 'cancel') return this.onCancel(btn && btn.params)
|
|
|
|
313
|
+ if (e === 'submit') return this.onSubmit(btn && btn.params)
|
|
294
|
},
|
314
|
},
|
|
|
|
315
|
+ onSubmit() {
|
|
|
|
316
|
+ const id = this.id || (this.form && this.form.id) || ''
|
|
|
|
317
|
+ if (!id) return
|
|
|
|
318
|
+ uni.showModal({
|
|
|
|
319
|
+ title: '系统提示',
|
|
|
|
320
|
+ content: '确认提交该资信调查表?',
|
|
|
|
321
|
+ confirmText: '确定',
|
|
|
|
322
|
+ cancelText: '取消',
|
|
|
|
323
|
+ success: (res) => {
|
|
|
|
324
|
+ if (res && res.confirm) {
|
|
|
|
325
|
+ domesticCustomerCreditSubmitApi(id).then(() => {
|
|
|
|
326
|
+ uni.showToast({ title: '已提交', icon: 'none' })
|
|
|
|
327
|
+ setTimeout(() => { uni.redirectTo({ url: '/pages/domestic_trade/index' }) }, 300)
|
|
|
|
328
|
+ }).catch((e) => {
|
|
|
|
329
|
+ uni.showToast({ title: (e && e.msg) || '提交失败', icon: 'none' })
|
|
|
|
330
|
+ })
|
|
|
|
331
|
+ }
|
|
|
|
332
|
+ }
|
|
|
|
333
|
+ })
|
|
|
|
334
|
+ },
|
|
295
|
onEdit(params) {
|
335
|
onEdit(params) {
|
|
296
|
uni.navigateTo({ url: '/pages/domestic_trade/modify?id=' + this.id })
|
336
|
uni.navigateTo({ url: '/pages/domestic_trade/modify?id=' + this.id })
|
|
297
|
},
|
337
|
},
|