diff --git a/src/views/crm/business/BusinessForm.vue b/src/views/crm/business/BusinessForm.vue index 736937c4f..733820b2c 100644 --- a/src/views/crm/business/BusinessForm.vue +++ b/src/views/crm/business/BusinessForm.vue @@ -10,7 +10,7 @@ - + @@ -35,7 +35,8 @@ @@ -51,7 +52,7 @@ - + - + - + - + - + @@ -191,7 +194,7 @@ @@ -227,7 +230,7 @@ -
+
确 定 取 消
@@ -246,7 +249,7 @@ import { useUserStore } from '@/store/modules/user'; import { defaultProps, handleTree } from '@/utils/tree'; import BusinessProductForm from './components/BusinessProductForm.vue'; import { erpPriceMultiply, erpPriceInputFormatter } from '@/utils'; -import { number } from 'vue-types'; +import { propTypes } from '@/utils/propTypes' const { proxy }: any = getCurrentInstance(); const { t } = useI18n(); @@ -298,7 +301,9 @@ const userOptions = ref([]); const statusTypeList = ref([]); const customerList = ref([]); const deptTree = ref(); - +const props = defineProps({ + type: propTypes.number.def(undefined) +}) const subTabsName = ref('product'); const productFormRef = ref(); @@ -380,6 +385,7 @@ const submitForm = async () => { const valid = await formRef.value.validate(); if (!valid) return; + formLoading.value = true; try { const data = formData.value as unknown as BusinessApi.BusinessVO; @@ -422,9 +428,8 @@ const resetForm = () => { const route = useRoute(); onMounted(async () => { const customerId = route.query.customerId; - console.log('%csrc/views/crm/business/BusinessForm.vue:425 formData.value', 'color: #007acc;', formData.value); formData.value.ownerUserId = customerId ? '' : useUserStore().getUser.id; - formType.value = route.query.id; + formType.value = route.query.id || route.params.id; if (formType.value) open(formType.value, customerId) customerList.value = await CustomerApi.getCustomerSimpleList(); statusTypeList.value = await BusinessStatusApi.getBusinessStatusTypeSimpleList(); diff --git a/src/views/crm/business/components/BusinessProductForm.vue b/src/views/crm/business/components/BusinessProductForm.vue index 9bf435fad..82483a0df 100644 --- a/src/views/crm/business/components/BusinessProductForm.vue +++ b/src/views/crm/business/components/BusinessProductForm.vue @@ -18,8 +18,17 @@ -