From d46442683ae369180193df901bcf56d0fda9e1ae Mon Sep 17 00:00:00 2001
From: yunuo970428 <405378304@qq.com>
Date: Fri, 19 Jul 2024 14:15:27 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=AE=A2=E6=88=B7--=E5=BF=AB?=
=?UTF-8?q?=E6=8D=B7=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../publicPage/quickAddCustomer.vue | 652 ++++++++++++++++++
.../components/publicPage/selectCustomer.vue | 54 +-
2 files changed, 702 insertions(+), 4 deletions(-)
create mode 100644 yxt-as-ui/src/components/publicPage/quickAddCustomer.vue
diff --git a/yxt-as-ui/src/components/publicPage/quickAddCustomer.vue b/yxt-as-ui/src/components/publicPage/quickAddCustomer.vue
new file mode 100644
index 0000000000..90ea055b25
--- /dev/null
+++ b/yxt-as-ui/src/components/publicPage/quickAddCustomer.vue
@@ -0,0 +1,652 @@
+
+
+
+
+
+
+
+
+ *客户名称
+
+
+
+ 客户类型
+ {{ formobj.customerType }}
+
+
+
+
+ *联系电话
+
+
+
+ 微信号
+
+
+
+
+
+ 公司名称
+
+
+
+
+
+
+
+
+
+ 客户地址
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 客户级别
+
+
+
+
+
+
+
+ 是否开启提醒
+
+
+ 是
+ 否
+
+
+
+
+
+
+ 提醒日期
+
+
+
+ 提醒备注
+
+
+
+ 更多信息
+
+
+ 客户生日
+
+
+
+ 性别
+
+
+ {{ item.dictValue }}
+
+
+
+
+
+
+ 证件类型
+ {{ formobj.certificateType }}
+
+
+ 证件号码
+
+
+
+
+
+ 证件有效期
+
+
+
+ 电子邮箱
+
+
+
+
+
+ 紧急联系人
+
+
+
+ 紧急联系电话
+
+
+
+
+
+ 客户来源
+
+
+
+
+
+
+
+ 客户分类
+
+
+
+
+
+
+
+
+
+ 备注
+
+
+
+ 车辆信息
+
+
+ *车牌号
+
+
+
+ *车架号
+
+
+
+
+
+ 发动机号
+
+
+
+ 车型
+
+
+
+
+
+ 购车日期
+
+
+
+ 行驶里程(Km)
+
+
+
+
+
+ 上次保养里程(Km)
+
+
+
+ 下次保养日期
+
+
+
+
+
+ 商业险到期日期
+
+
+
+ 交强险到期日期
+
+
+
+
+
+ 备注
+
+
+
+ 保养到期明细
+
+
+ 行驶里程(Km)
+
+
+
+ 每月公里
+
+
+
+
+
+ 滤芯到期公里
+
+
+
+ 滤芯到期日期
+
+
+
+
+
+ 机油到期公里
+
+
+
+ 机油到期日期
+
+
+
+
+
+ 齿轮油到期公里
+
+
+
+ 齿轮油到期日期
+
+
+
+
+
+ 宝轮到期公里
+
+
+
+ 宝轮到期日期
+
+
+
+
+
+ 风扇皮带到期公里
+
+
+
+ 风扇皮带到期日期
+
+
+
+
+
+ 刹车片到期公里
+
+
+
+ 刹车片到期日期
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/yxt-as-ui/src/components/publicPage/selectCustomer.vue b/yxt-as-ui/src/components/publicPage/selectCustomer.vue
index 3de96c1abc..7502236f54 100644
--- a/yxt-as-ui/src/components/publicPage/selectCustomer.vue
+++ b/yxt-as-ui/src/components/publicPage/selectCustomer.vue
@@ -40,7 +40,8 @@
-
+
+
@@ -66,6 +67,8 @@
+
+
@@ -102,6 +105,7 @@ import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import { customerList, typeValues } from '@/api/Common/dictcommons'
import customermanagementAdd from '@/views/client/customermanagement/customermanagementAdd'
+import quickAddCustomer from './quickAddCustomer'
export default {
name: 'Customer',
@@ -109,12 +113,21 @@ export default {
Pagination,
pageye,
ButtonBar,
- customermanagementAdd
+ customermanagementAdd,
+ quickAddCustomer
},
data() {
return {
btndisabled: false,
+ isQuickAdd: false, // 是否快捷新增
btnList: [
+ {
+ type: 'primary',
+ size: 'small',
+ icon: 'plus',
+ btnKey: 'toQuickAdd',
+ btnLabel: '快捷新增客户'
+ },
{
type: 'primary',
size: 'small',
@@ -193,6 +206,9 @@ export default {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
+ case 'toQuickAdd':
+ this.toQuickAdd()
+ break
case 'toAdd':
this.toAdd()
break
@@ -203,6 +219,15 @@ export default {
break
}
},
+ // 信息条数 获取点击时当前的sid
+ handleSelectionChange(row) {
+ const aa = []
+ this.multipleSelection = row
+ row.forEach(element => {
+ aa.push(element.sid)
+ })
+ this.sids = aa
+ },
// 表中序号
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
@@ -246,8 +271,24 @@ export default {
this.listQuery.params.customerTypeKey = ''
this.getList()
},
+ toQuickAdd() {
+ if (this.sids.length === 1) {
+ this.dialogVisible = true
+ this.isQuickAdd = true
+ this.formobj = {
+ visitWay: '', // 联络方式
+ visitWayKey: '',
+ customerType: '', // 客户类型
+ customerTypeKey: '',
+ psid: ''
+ }
+ } else {
+ this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' })
+ }
+ },
toAdd() {
this.dialogVisible = true
+ this.isQuickAdd = false
this.formobj = {
visitWay: '', // 联络方式
visitWayKey: '',
@@ -272,8 +313,13 @@ export default {
handleConfirm() {
if (this.formobj.customerType !== '' && this.formobj.visitWay !== '') {
this.dialogVisible = false
- this.viewState = 2
- this.$refs['divAdd'].showAdd(this.formobj)
+ if (this.isQuickAdd) {
+ this.viewState = 2
+ this.$refs['divQuickAdd'].showAdd(this.formobj, this.sids[0])
+ } else {
+ this.viewState = 2
+ this.$refs['divAdd'].showAdd(this.formobj)
+ }
} else {
this.$message({ showClose: true, message: '请填写联络方式和客户类型', type: 'warning' })
}