CRM:线索表单去掉客户字段

This commit is contained in:
min 2024-01-21 17:54:07 +08:00
parent 948ef08533
commit 3471b5c5b2

View File

@ -10,17 +10,6 @@
<el-form-item label="线索名称" prop="name">
<el-input v-model="formData.name" placeholder="请输入线索名称" />
</el-form-item>
<!-- TODO 芋艿后续客户的选择 -->
<el-form-item label="客户" prop="customerId">
<el-select v-model="formData.customerId" clearable placeholder="请选择客户">
<el-option
v-for="item in customerList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="下次联系时间" prop="contactNextTime">
<el-date-picker
v-model="formData.contactNextTime"
@ -54,7 +43,6 @@
</template>
<script setup lang="ts">
import * as ClueApi from '@/api/crm/clue'
import * as CustomerApi from '@/api/crm/customer'
const { t } = useI18n() //
const message = useMessage() //
@ -63,11 +51,9 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const customerList = ref([]) //
const formData = ref({
id: undefined,
name: undefined,
customerId: undefined,
contactNextTime: undefined,
telephone: undefined,
mobile: undefined,
@ -77,8 +63,7 @@ const formData = ref({
remark: undefined
})
const formRules = reactive({
name: [{ required: true, message: '线索名称不能为空', trigger: 'blur' }],
customerId: [{ required: true, message: '客户不能为空', trigger: 'blur' }]
name: [{ required: true, message: '线索名称不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
@ -88,12 +73,6 @@ const open = async (type: string, id?: number) => {
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
const customerData = await CustomerApi.getCustomerPage({
pageNo: 1,
pageSize: 100,
pool: false
})
customerList.value = customerData.list
//
if (id) {
formLoading.value = true
@ -137,7 +116,6 @@ const resetForm = () => {
formData.value = {
id: undefined,
name: undefined,
customerId: undefined,
contactNextTime: undefined,
telephone: undefined,
mobile: undefined,