|
@@ -46,7 +46,7 @@
|
|
|
@submit.prevent="handleSubmit"
|
|
@submit.prevent="handleSubmit"
|
|
|
>
|
|
>
|
|
|
<!-- Name -->
|
|
<!-- Name -->
|
|
|
- <el-form-item prop="name" class="custom-form-item">
|
|
|
|
|
|
|
+ <el-form-item prop="contacts" class="custom-form-item">
|
|
|
<template #label>
|
|
<template #label>
|
|
|
<span class="form-label">
|
|
<span class="form-label">
|
|
|
您的称谓
|
|
您的称谓
|
|
@@ -55,7 +55,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<div class="flex gap-28px w-full lt-sm:flex-col lt-sm:gap-12px">
|
|
<div class="flex gap-28px w-full lt-sm:flex-col lt-sm:gap-12px">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="form.name"
|
|
|
|
|
|
|
+ v-model="form.contacts"
|
|
|
placeholder="请输入您的称谓"
|
|
placeholder="请输入您的称谓"
|
|
|
class="custom-input flex-1 lt-sm:w-full"
|
|
class="custom-input flex-1 lt-sm:w-full"
|
|
|
/>
|
|
/>
|
|
@@ -63,8 +63,8 @@
|
|
|
v-model="form.gender"
|
|
v-model="form.gender"
|
|
|
class="shrink-0 flex-1 lt-sm:w-full lt-sm:justify-start"
|
|
class="shrink-0 flex-1 lt-sm:w-full lt-sm:justify-start"
|
|
|
>
|
|
>
|
|
|
- <el-radio value="mr">先生</el-radio>
|
|
|
|
|
- <el-radio value="ms">女士</el-radio>
|
|
|
|
|
|
|
+ <el-radio value="先生">先生</el-radio>
|
|
|
|
|
+ <el-radio value="女士">女士</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -101,7 +101,7 @@
|
|
|
<!-- Description -->
|
|
<!-- Description -->
|
|
|
<el-form-item prop="desc" class="custom-form-item">
|
|
<el-form-item prop="desc" class="custom-form-item">
|
|
|
<el-input
|
|
<el-input
|
|
|
- v-model="form.desc"
|
|
|
|
|
|
|
+ v-model="form.remark"
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
placeholder="简要描述您的需求 (可选)"
|
|
placeholder="简要描述您的需求 (可选)"
|
|
|
class="custom-textarea w-full"
|
|
class="custom-textarea w-full"
|
|
@@ -113,8 +113,9 @@
|
|
|
<!-- Submit Button -->
|
|
<!-- Submit Button -->
|
|
|
<button
|
|
<button
|
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
|
- class="mt-56px h-48px w-268px bg-#0F67F8 text-white pf-sc-regular rounded-8px px-16px flex items-center justify-between hover:opacity-80 lt-sm:w-453px lt-sm:m-auto lt-sm:rounded-16px lt-sm:h-84px lt-sm:mt-60px lt-sm:justify-between lt-sm:gap-8px"
|
|
|
|
|
- @click="handleSubmit"
|
|
|
|
|
|
|
+ type="submit"
|
|
|
|
|
+ :disabled="loading"
|
|
|
|
|
+ class="mt-56px h-48px w-268px bg-#0F67F8 text-white pf-sc-regular rounded-8px px-16px flex items-center justify-between hover:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed lt-sm:w-453px lt-sm:m-auto lt-sm:rounded-16px lt-sm:h-84px lt-sm:mt-60px lt-sm:justify-between lt-sm:gap-8px"
|
|
|
>
|
|
>
|
|
|
<span class="font-s-16px lt-sm:hidden">立即咨询</span>
|
|
<span class="font-s-16px lt-sm:hidden">立即咨询</span>
|
|
|
<span class="hidden lt-sm:block lt-sm:font-s-26px">提交需求,获取专属方案</span>
|
|
<span class="hidden lt-sm:block lt-sm:font-s-26px">提交需求,获取专属方案</span>
|
|
@@ -159,7 +160,7 @@
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import type { FormInstance, FormRules } from 'element-plus'
|
|
import type { FormInstance, FormRules } from 'element-plus'
|
|
|
-
|
|
|
|
|
|
|
+ import { applyPartner } from '~/api'
|
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
|
modelValue: boolean
|
|
modelValue: boolean
|
|
|
}>()
|
|
}>()
|
|
@@ -175,15 +176,15 @@
|
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
|
|
|
|
|
|
const form = reactive({
|
|
const form = reactive({
|
|
|
- name: '',
|
|
|
|
|
- gender: 'mr',
|
|
|
|
|
|
|
+ contacts: '',
|
|
|
|
|
+ gender: '先生',
|
|
|
phone: '',
|
|
phone: '',
|
|
|
company: '',
|
|
company: '',
|
|
|
- desc: '',
|
|
|
|
|
|
|
+ remark: '',
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const rules = reactive<FormRules>({
|
|
const rules = reactive<FormRules>({
|
|
|
- name: [{ required: true, message: '请输入您的称谓', trigger: 'blur' }],
|
|
|
|
|
|
|
+ contacts: [{ required: true, message: '请输入您的称谓', trigger: 'blur' }],
|
|
|
phone: [{ required: true, message: '请输入您的手机号码', trigger: 'blur' }],
|
|
phone: [{ required: true, message: '请输入您的手机号码', trigger: 'blur' }],
|
|
|
company: [{ required: true, message: '请输入公司名称或项目地址', trigger: 'blur' }],
|
|
company: [{ required: true, message: '请输入公司名称或项目地址', trigger: 'blur' }],
|
|
|
})
|
|
})
|
|
@@ -194,12 +195,25 @@
|
|
|
emit('update:modelValue', false)
|
|
emit('update:modelValue', false)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const handleSubmit = async () => {
|
|
|
|
|
|
|
+ const handleSubmit = () => {
|
|
|
if (!formRef.value) return
|
|
if (!formRef.value) return
|
|
|
|
|
|
|
|
- await formRef.value.validate((valid) => {
|
|
|
|
|
|
|
+ formRef.value.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- close()
|
|
|
|
|
|
|
+ loading.value = true
|
|
|
|
|
+ applyPartner({
|
|
|
|
|
+ company: form.company,
|
|
|
|
|
+ contacts: form.contacts + form.gender,
|
|
|
|
|
+ phone: form.phone,
|
|
|
|
|
+ remark: form.remark || '无',
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ ElMessage.success('提交成功,我们会尽快与您联系')
|
|
|
|
|
+ })
|
|
|
|
|
+ .finally(() => {
|
|
|
|
|
+ close()
|
|
|
|
|
+ loading.value = false
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|