|
@@ -35,7 +35,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import CtForm from '@/components/CtForm'
|
|
|
-import { getEnterpriseBusiness, updateEnterpriseBusiness } from '@/api/enterprise'
|
|
|
+import { getEnterpriseBusiness, saveEnterpriseBusiness } from '@/api/enterprise'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import { reactive, ref } from 'vue'
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
@@ -201,7 +201,7 @@ const handleSave = async () => {
|
|
|
})
|
|
|
query.businessUrl = licenseUrl.value
|
|
|
if (!query.establishmentTime) return Snackbar.warning('请选择成立时间')
|
|
|
- await updateEnterpriseBusiness(query)
|
|
|
+ await saveEnterpriseBusiness(query)
|
|
|
Snackbar.success('编辑成功')
|
|
|
isUpdate = true
|
|
|
getBaseInfo()
|
|
@@ -268,7 +268,7 @@ const getBaseInfo = async () => {
|
|
|
try {
|
|
|
const data = await getEnterpriseBusiness()
|
|
|
if (!data || !Object.keys(data).length) return completeFun(completeCount)
|
|
|
- query.id = JSON.parse(localStorage.getItem('entBaseInfo')).id
|
|
|
+ query.id = data.id
|
|
|
formItems.value.options.forEach(item => {
|
|
|
if (item.noParam) return completeCount++
|
|
|
item.value = data[item.key]
|