|
@@ -16,11 +16,11 @@
|
16
|
16
|
<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.tydwbm" /> </a-form-item
|
17
|
17
|
></a-col>
|
18
|
18
|
<a-col :span="8"
|
19
|
|
- ><a-form-item label="单位名称" name="dwmc">
|
|
19
|
+ ><a-form-item label="企业名称" name="dwmc">
|
20
|
20
|
<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.dwmc" /> </a-form-item
|
21
|
21
|
></a-col>
|
22
|
22
|
<a-col :span="8"
|
23
|
|
- ><a-form-item label="单位代码" name="dwdm">
|
|
23
|
+ ><a-form-item label="统一社会信用代码" name="dwdm">
|
24
|
24
|
<a-input
|
25
|
25
|
autocomplete="off"
|
26
|
26
|
placeholder="请输入18位统一社会信用代码"
|
|
@@ -39,7 +39,7 @@
|
39
|
39
|
/> </a-form-item
|
40
|
40
|
></a-col>
|
41
|
41
|
<a-col :span="8"
|
42
|
|
- ><a-form-item label="注册资本" name="zczb">
|
|
42
|
+ ><a-form-item label="注册资本(万元)" name="zczb">
|
43
|
43
|
<a-input
|
44
|
44
|
class="int-box"
|
45
|
45
|
@input="onInput"
|
|
@@ -47,12 +47,12 @@
|
47
|
47
|
:disabled="showLock"
|
48
|
48
|
v-model:value="formState.zczb"
|
49
|
49
|
>
|
50
|
|
- <template #suffix>万元</template>
|
|
50
|
+ <!-- <template #suffix>万元</template> -->
|
51
|
51
|
</a-input></a-form-item
|
52
|
52
|
></a-col
|
53
|
53
|
>
|
54
|
54
|
<a-col :span="8"
|
55
|
|
- ><a-form-item label="资产总额" name="zcze">
|
|
55
|
+ ><a-form-item label="资产总额(万元)" name="zcze">
|
56
|
56
|
<a-input
|
57
|
57
|
class="int-box"
|
58
|
58
|
@input="onChangeInput"
|
|
@@ -60,7 +60,7 @@
|
60
|
60
|
:disabled="showLock"
|
61
|
61
|
v-model:value="formState.zcze"
|
62
|
62
|
>
|
63
|
|
- <template #suffix>万元</template>
|
|
63
|
+ <!-- <template #suffix>万元</template> -->
|
64
|
64
|
</a-input></a-form-item
|
65
|
65
|
></a-col
|
66
|
66
|
>
|
|
@@ -75,7 +75,7 @@
|
75
|
75
|
<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.frsfzh" /> </a-form-item
|
76
|
76
|
></a-col>
|
77
|
77
|
<a-col :span="8"
|
78
|
|
- ><a-form-item label="法人联系方式" name="frlxfs">
|
|
78
|
+ ><a-form-item label="法人联系方式" name="frlxfs" :rules="[{ validator: isMobileData, trigger: 'blur' }]">
|
79
|
79
|
<a-input autocomplete="off" :disabled="showLock" v-model:value="formState.frlxfs" /> </a-form-item
|
80
|
80
|
></a-col>
|
81
|
81
|
</a-row>
|
|
@@ -97,6 +97,7 @@
|
97
|
97
|
<a-col :span="16"
|
98
|
98
|
><a-form-item v-model:validation-status="formState.zcdz" label="注册地址" name="zcdz" class="from-item">
|
99
|
99
|
<a-cascader
|
|
100
|
+ :allowClear="false"
|
100
|
101
|
:disabled="showLock"
|
101
|
102
|
class="address-box"
|
102
|
103
|
:options="cascaOptions"
|
|
@@ -196,6 +197,28 @@
|
196
|
197
|
</a-select>
|
197
|
198
|
</a-form-item></a-col
|
198
|
199
|
>
|
|
200
|
+ <a-col :span="8"
|
|
201
|
+ ><a-form-item label="总仓容">
|
|
202
|
+ <a-input
|
|
203
|
+ autocomplete="off"
|
|
204
|
+ :disabled="showLock"
|
|
205
|
+ v-model:value="formState.totalWarehouseCapacity"
|
|
206
|
+ /> </a-form-item
|
|
207
|
+ ></a-col>
|
|
208
|
+ </a-row>
|
|
209
|
+ <a-row>
|
|
210
|
+ <a-col :span="12">
|
|
211
|
+ <a-form-item ref="uploadDataList" label="上传电子扫描件">
|
|
212
|
+ <UPLoadData
|
|
213
|
+ :beforeUpload="beforeUpload"
|
|
214
|
+ :disabled="showLock"
|
|
215
|
+ listType="picture-card"
|
|
216
|
+ multiple
|
|
217
|
+ v-model:urls="formState.electronicScan"
|
|
218
|
+ :change="changeUpload"
|
|
219
|
+ />
|
|
220
|
+ </a-form-item>
|
|
221
|
+ </a-col>
|
199
|
222
|
</a-row>
|
200
|
223
|
</a-form>
|
201
|
224
|
<div class="btn-box">
|
|
@@ -209,8 +232,9 @@
|
209
|
232
|
</template>
|
210
|
233
|
|
211
|
234
|
<script setup>
|
212
|
|
- import unitInfoApi from '@/api/basic.info/unitInfoApi-zq'
|
|
235
|
+ import unitInfoApi from '@/api/basic.info/unitInfoApi'
|
213
|
236
|
import { message } from 'ant-design-vue'
|
|
237
|
+ import global from '@/api/basic.info/global'
|
214
|
238
|
import {
|
215
|
239
|
isSocialCreditOrIdCode,
|
216
|
240
|
isLongitude,
|
|
@@ -223,7 +247,7 @@
|
223
|
247
|
isSocialCreditCode,
|
224
|
248
|
administrativeDivision,
|
225
|
249
|
isUnitCode
|
226
|
|
- } from '@/utils/validator-zq'
|
|
250
|
+ } from '@/utils/validator'
|
227
|
251
|
const props = defineProps({
|
228
|
252
|
dataObj: {
|
229
|
253
|
type: Object,
|
|
@@ -253,7 +277,9 @@
|
253
|
277
|
kqs: '',
|
254
|
278
|
cfs: '',
|
255
|
279
|
ygs: '',
|
256
|
|
- dwzt: ''
|
|
280
|
+ dwzt: '',
|
|
281
|
+ totalWarehouseCapacity: '',
|
|
282
|
+ electronicScan: ''
|
257
|
283
|
})
|
258
|
284
|
const cascaOptions = ref([])
|
259
|
285
|
const unitTypeList = ref([])
|
|
@@ -287,11 +313,7 @@
|
287
|
313
|
kqs: [{ required: true, message: '请输入库区数', trigger: 'blur' }],
|
288
|
314
|
cfs: [{ required: true, message: '请输入仓房数', trigger: 'blur' }],
|
289
|
315
|
ygs: [{ required: true, message: '请输入油罐数', trigger: 'blur' }],
|
290
|
|
- dwzt: [{ required: true, message: '请选择单位状态', trigger: 'change' }],
|
291
|
|
- frlxfs: [
|
292
|
|
- { required: true, message: '请输入法人联系方式', trigger: 'change' },
|
293
|
|
- { validator: isMobileData, trigger: 'change' }
|
294
|
|
- ]
|
|
316
|
+ dwzt: [{ required: true, message: '请选择单位状态', trigger: 'change' }]
|
295
|
317
|
})
|
296
|
318
|
const auditStatus = ref([
|
297
|
319
|
{ name: '正常', dwzt: 1 },
|
|
@@ -316,6 +338,17 @@
|
316
|
338
|
unitTypeList.value = res
|
317
|
339
|
})
|
318
|
340
|
}
|
|
341
|
+ // 文件预览方式
|
|
342
|
+ function changeUpload(ev) {
|
|
343
|
+ return global.uploadFile(ev).then((reg) => {
|
|
344
|
+ return reg
|
|
345
|
+ })
|
|
346
|
+ }
|
|
347
|
+ const uploadDataList = ref(null)
|
|
348
|
+ function beforeUpload() {
|
|
349
|
+ uploadDataList.value.clearValidate()
|
|
350
|
+ }
|
|
351
|
+
|
319
|
352
|
// 取消按钮
|
320
|
353
|
const handleCancel = () => {
|
321
|
354
|
visible.value = false
|
|
@@ -334,6 +367,19 @@
|
334
|
367
|
.then(() => {
|
335
|
368
|
formState.value.zczb = Number(formState.value.zczb)
|
336
|
369
|
formState.value.zcze = Number(formState.value.zcze)
|
|
370
|
+ // 判断附件内容存在与否
|
|
371
|
+ if (Array.isArray(formState.value.electronicScan)) {
|
|
372
|
+ if (formState.value.electronicScan[0].url) {
|
|
373
|
+ let arrList = formState.value.electronicScan
|
|
374
|
+ formState.value.electronicScan = []
|
|
375
|
+ arrList.forEach((item) => {
|
|
376
|
+ formState.value.electronicScan.push(item.url)
|
|
377
|
+ })
|
|
378
|
+ formState.value.electronicScan = formState.value.electronicScan.join(',')
|
|
379
|
+ } else {
|
|
380
|
+ formState.value.electronicScan = formState.value.electronicScan.join(',')
|
|
381
|
+ }
|
|
382
|
+ }
|
337
|
383
|
// isTypeData === '1' 新增 2是编辑 3是查看
|
338
|
384
|
if (isTypeData.value === '1') return addData()
|
339
|
385
|
if (isTypeData.value === '2') return editData()
|
|
@@ -390,18 +436,22 @@
|
390
|
436
|
// 注册地址选择一栏
|
391
|
437
|
const getChangeData = (val, selectedOptions) => {
|
392
|
438
|
// 将选择好的id循环取出push到formState.value里面
|
393
|
|
- if (selectedOptions.length === 1) {
|
394
|
|
- register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
|
395
|
|
- register.zcdzProvince = selectedOptions[0].id
|
396
|
|
- } else if (selectedOptions.length === 2) {
|
397
|
|
- register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
|
398
|
|
- register.zcdzProvince = selectedOptions[0].id
|
399
|
|
- register.zcdzCity = selectedOptions[1].id
|
|
439
|
+ if (selectedOptions.slice(-1)[0].sortCode.toString().length >= 6) {
|
|
440
|
+ if (selectedOptions.length === 1) {
|
|
441
|
+ register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
|
|
442
|
+ register.zcdzProvince = selectedOptions[0].id
|
|
443
|
+ } else if (selectedOptions.length === 2) {
|
|
444
|
+ register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
|
|
445
|
+ register.zcdzProvince = selectedOptions[0].id
|
|
446
|
+ register.zcdzCity = selectedOptions[1].id
|
|
447
|
+ } else {
|
|
448
|
+ register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
|
|
449
|
+ register.zcdzProvince = selectedOptions[0].id
|
|
450
|
+ register.zcdzCity = selectedOptions[1].id
|
|
451
|
+ register.zcdzArea = selectedOptions[2].id
|
|
452
|
+ }
|
400
|
453
|
} else {
|
401
|
|
- register = { zcdzProvince: '', zcdzCity: '', zcdzArea: '' }
|
402
|
|
- register.zcdzProvince = selectedOptions[0].id
|
403
|
|
- register.zcdzCity = selectedOptions[1].id
|
404
|
|
- register.zcdzArea = selectedOptions[2].id
|
|
454
|
+ formState.value.zcdz = ''
|
405
|
455
|
}
|
406
|
456
|
}
|
407
|
457
|
|
|
@@ -437,6 +487,10 @@
|
437
|
487
|
const detailData = (id) => {
|
438
|
488
|
unitInfoApi.unitInfoDetail({ id: id }).then((res) => {
|
439
|
489
|
formState.value = { ...res }
|
|
490
|
+ if (res.electronicScan) {
|
|
491
|
+ formState.value.electronicScan = []
|
|
492
|
+ formState.value.electronicScan = res.electronicScan.split(',') || ''
|
|
493
|
+ }
|
440
|
494
|
})
|
441
|
495
|
}
|
442
|
496
|
const isClose = () => {
|