|
@@ -1,83 +1,83 @@
|
|
|
<!-- 新增客户资料 -->
|
|
<!-- 新增客户资料 -->
|
|
|
<template>
|
|
<template>
|
|
|
<app-drawer :title="selectedRow.userid ? '修改客户资料' : '新增客户资料'" :width="880" v-model:show="show" :refresh="refresh">
|
|
<app-drawer :title="selectedRow.userid ? '修改客户资料' : '新增客户资料'" :width="880" v-model:show="show" :refresh="refresh">
|
|
|
- <el-form ref="formRef" class="el-form--horizontal" label-width="130px" label-position="left" :model="formItem"
|
|
|
|
|
|
|
+ <el-form ref="formRef" class="el-form--horizontal" label-width="130px" label-position="left" :model="formData"
|
|
|
:rules="formRules">
|
|
:rules="formRules">
|
|
|
<el-form-item label="客户类型" prop="userinfotype">
|
|
<el-form-item label="客户类型" prop="userinfotype">
|
|
|
- <el-select v-model="formItem.userinfotype" :disabled="selectedRow.userid > 0">
|
|
|
|
|
|
|
+ <el-select v-model="formData.userinfotype" :disabled="selectedRow.userid > 0">
|
|
|
<el-option :label="item.label" :value="item.value" v-for="(item, index) in getUserInfoTypeList()"
|
|
<el-option :label="item.label" :value="item.value" v-for="(item, index) in getUserInfoTypeList()"
|
|
|
:key="index" />
|
|
:key="index" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<!-- 个人 -->
|
|
<!-- 个人 -->
|
|
|
- <template v-if="formItem.userinfotype === UserInfoType.Customer">
|
|
|
|
|
|
|
+ <template v-if="formData.userinfotype === UserInfoType.Customer">
|
|
|
<el-form-item label="姓名" prop="username">
|
|
<el-form-item label="姓名" prop="username">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.username" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.username" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="身份证号码">
|
|
<el-form-item label="身份证号码">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.cardnum" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.cardnum" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="手机号码" prop="mobilephone">
|
|
<el-form-item label="手机号码" prop="mobilephone">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.mobilephone" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.mobilephone" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="身份证正面照">
|
|
<el-form-item label="身份证正面照">
|
|
|
<app-upload />
|
|
<app-upload />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="邮箱">
|
|
<el-form-item label="邮箱">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.email" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.email" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="身份证反面照">
|
|
<el-form-item label="身份证反面照">
|
|
|
<app-upload />
|
|
<app-upload />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 企业 -->
|
|
<!-- 企业 -->
|
|
|
- <template v-if="formItem.userinfotype === UserInfoType.Enterprise">
|
|
|
|
|
|
|
+ <template v-if="formData.userinfotype === UserInfoType.Enterprise">
|
|
|
<el-form-item label="企业名称" prop="customername">
|
|
<el-form-item label="企业名称" prop="customername">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.customername" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.customername" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="企业简称" prop="nickname">
|
|
<el-form-item label="企业简称" prop="nickname">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.nickname" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.nickname" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="证件类型">
|
|
<el-form-item label="证件类型">
|
|
|
- <el-select v-model="formItem.cardtype">
|
|
|
|
|
|
|
+ <el-select v-model="formData.cardtype">
|
|
|
<el-option :label="item.label" :value="item.value" v-for="(item, index) in getCardType()"
|
|
<el-option :label="item.label" :value="item.value" v-for="(item, index) in getCardType()"
|
|
|
:key="index" />
|
|
:key="index" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="法定代表人">
|
|
<el-form-item label="法定代表人">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.legalpersonname" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.legalpersonname" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="证件号码">
|
|
<el-form-item label="证件号码">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.cardnum" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.cardnum" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="纳税人识别号">
|
|
<el-form-item label="纳税人识别号">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.taxpayernum" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.taxpayernum" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="营业执照">
|
|
<el-form-item label="营业执照">
|
|
|
<app-upload />
|
|
<app-upload />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="联系人">
|
|
<el-form-item label="联系人">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.contactname" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.contactname" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="联系人手机号" prop="mobilephone">
|
|
<el-form-item label="联系人手机号" prop="mobilephone">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.mobilephone" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.mobilephone" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
<el-form-item label="联系电话">
|
|
<el-form-item label="联系电话">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.telphone" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.telphone" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item class="el-form-item--row" label="通讯地址">
|
|
<el-form-item class="el-form-item--row" label="通讯地址">
|
|
|
<div class="el-form-item--col">
|
|
<div class="el-form-item--col">
|
|
|
- <el-select v-model="formItem.provinceid"></el-select>
|
|
|
|
|
- <el-select v-model="formItem.cityid"></el-select>
|
|
|
|
|
- <el-select v-model="formItem.districtid"></el-select>
|
|
|
|
|
|
|
+ <el-select v-model="formData.provinceid"></el-select>
|
|
|
|
|
+ <el-select v-model="formData.cityid"></el-select>
|
|
|
|
|
+ <el-select v-model="formData.districtid"></el-select>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item class="el-form-item--row">
|
|
<el-form-item class="el-form-item--row">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.ipaddress" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.ipaddress" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item class="el-form-item--row" label="备注">
|
|
<el-form-item class="el-form-item--row" label="备注">
|
|
|
- <el-input placeholder="请输入" v-model="formItem.remark" />
|
|
|
|
|
|
|
+ <el-input placeholder="请输入" v-model="formData.remark" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
@@ -103,7 +103,7 @@ const props = defineProps({
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const { formItem, loading, updateCustomerInfo } = useCustomerForm(props.selectedRow)
|
|
|
|
|
|
|
+const { formData, loading, updateCustomerInfo } = useCustomerForm(props.selectedRow)
|
|
|
const show = ref(true)
|
|
const show = ref(true)
|
|
|
const refresh = ref(false)
|
|
const refresh = ref(false)
|
|
|
const formRef = ref<FormInstance>()
|
|
const formRef = ref<FormInstance>()
|