Commit d50d9f4d authored by lshan's avatar lshan

lishan

parent af56017d
This diff is collapsed.
......@@ -32,7 +32,6 @@
@input="handleInput"
@blur="handleChange"
/>
<div class="flex-shrink-0">
<slot name="action" />
</div>
......@@ -54,7 +53,7 @@ import Vue from 'vue'
export default Vue.extend({
components:{
'app-icon':()=>import('@/components/common/Icon.vue')
//'app-icon':()=>import('@/components/common/Icon.vue')
// 'main-page': () => import('@/layout/main-page.vue')
},
props: {
......
......@@ -23,6 +23,14 @@ export const clientRoutes: Array<RouteConfig> = [
}
},
{
path: '/add-follow',
name: 'Add-follow',
component: () => import('@/views/client/add-follow.vue'),
meta: {
title: '添加跟进记录'
}
},
{
path: '/client-management',
component: () => import('@/views/client/client-management.vue')
},
......
<template>
<div
class="mb-px bg-white px-4 rounded"
@click="clickItem"
>
<div v-if="checkIfEmpty(label)" class="text-sm text-text-secondary py-2">{{ label }}</div>
<div class="flex py-3 items-center justify-between">
<slot name="head" />
<div class="flex items-center justify-between flex-1">
<app-icon
v-if="location"
type="png"
:path="require('@/assets/icons/y-location.png')"
class-name="h-4 w-3.5 mb-1"
/>
<div v-if="checkIfEmpty(content)" class="flex-1 text-text-secondary pl-1.5">{{ content }}</div>
<app-icon
v-if="dot"
type="png"
:path="require('@/assets/icons/dot.png')"
class-name="h-5 w-1 ml-auto flex-shrink-0 ml-1.5"
/>
</div>
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
components:{
'app-icon':()=>import('@/components/common/Icon.vue')
// 'main-page': () => import('@/layout/main-page.vue')
},
props: {
title: String,
location: {
type: Boolean,
default: false
},
dot: {
type: Boolean,
default: false
},
type: {
type: String,
default: 'content'
},
value: String,
label: String,
content: String
},
name: 'YCell',
methods: {
clickItem() {
this.$emit('click')
},
checkIfEmpty(string: string) {
return string && string.replace(/(^\s*)|(\s*$)/g, '') !== ''
},
}
})
</script>
<style lang="less">
</style>
<template>
<div class="add-client">
<main-page
left-arrow
@click-left="handleClickLeft"
>
<div class="px-4 pt-14 ">
<input-cell
v-model="name"
required
:limit="20"
label="真实姓名"
placeholder="请输入客户姓名(必填)"
error-msg="姓名不能为空"
/>
<c-cell
dot
title="标签"
v-model="tag"
class="mt-4"
@click="$router.push('/select-tag')"
/>
<input-cell
add
v-model="tel"
label="电话号码"
placeholder="添加电话号码"
class="mt-4"
/>
<input-cell
v-model="address"
:limit="50"
label="地址"
placeholder="请输入客户地址"
class="mt-4"
/>
<y-cell
location
dot
v-model="location"
content="支持地图定位"
/>
<input-cell
v-model="company"
label="公司"
placeholder="请输入客户公司"
class="mt-4"
/>
<input-cell
v-model="position"
label="职位"
placeholder="请输入客户职位"
class="mt-4"
/>
<input-cell
v-model="remarks"
label="备注"
placeholder="请输入备注"
class="mt-4"
/>
<c-cell
dot
title="跟进人"
v-model="follow"
class="mt-4"
/>
</div>
</main-page>
</div>
<div class="add-client">
<main-page left-arrow @click-left="handleClickLeft">
<div class="px-4 pt-14">
<input-cell
v-model="name"
required
:limit="20"
label="真实姓名"
placeholder="请输入客户姓名(必填)"
error-msg="姓名不能为空"
/>
<c-cell
dot
title="标签"
class="mt-4"
@click="$router.push('/select-tag')"
/>
<input-cell
v-model="tel"
label="电话号码"
placeholder="添加电话号码"
class="mt-4">
<app-icon slot="prefix" icon-name="y-add" />
</input-cell>
<input-cell
v-model="address"
:limit="50"
label="地址"
placeholder="请输入客户地址"
class="mt-4"
/>
<c-cell dot>
<app-icon slot="prefix" icon-name="location"/>
<div slot="prefix" class="text-text-secondary">支持地图定位</div>
</c-cell>
<input-cell
v-model="company"
label="公司"
placeholder="请输入客户公司"
class="mt-4"
/>
<input-cell
v-model="position"
label="职位"
placeholder="请输入客户职位"
class="mt-4"
/>
<input-cell
v-model="remarks"
label="备注"
placeholder="请输入备注"
class="mt-4"
/>
<c-cell dot title="跟进人" class="mt-4" />
</div>
</main-page>
</div>
</template>
<script lang="ts">
import Vue from 'vue'
import Vue from "vue";
export default Vue.extend({
name: 'Add-client',
components: {
'main-page': () => import('@/layout/main-page.vue'),
'input-cell': () => import('@/components/common/input-cell.vue'),
'c-cell': () => import('@/components/common/c-cell.vue'),
'y-cell': () => import('@/views/attendance/y-cell.vue'),
// 'c-button': () => import('@/components/common/c-button.vue'),
// 'group-cell': () => import('@/components/common/group-cell.vue')
},
created(){
// console.log(Mock, 'mock')
},
data(){
return{
name:'',
tag:'',
tel:'',
address:'',
location:'',
company:'',
position:'',
remarks:'',
follow:'',
}
name: "Add-client",
components: {
'main-page': () => import("@/layout/main-page.vue"),
'input-cell': () => import("@/components/common/input-cell.vue"),
'c-cell': () => import("@/components/common/c-cell.vue"),
'app-icon': () => import('@/components/common/Icon.vue'),
// 'group-cell': () => import('@/components/common/group-cell.vue')
},
created() {
// console.log(Mock, 'mock')
},
data() {
return {
name: "",
tel: "",
address: "",
location: "",
company: "",
position: "",
remarks: "",
};
},
methods: {
handleClickLeft() {
this.$router.go(-1);
},
methods: {
handleClickLeft() {
this.$router.go(-1)
},
}
})
},
});
</script>
<style>
......
<template>
<div class="add-client">
<main-page left-arrow @click-left="handleClickLeft">
<div class="px-4 pt-14">
<div class="bg-white">
<van-cell-group>
<van-field placeholder="请输入用户名" border/>
<van-uploader v-model="fileList" multiple accept=".doc, .docx, .xml, .xlsx, .pdf,audio/*,image/*"/>
</van-cell-group>
</div>
<c-cell dot title="跟进方式" class="mt-4" @click="showPopup"/>
<van-popup v-model="show" round position="bottom" :style="{ height: '30%' }" >
<van-cell value="远程沟通"/>
<van-cell value="外勤拜访" />
<van-cell value="取消" />
</van-popup>
<c-button
round
class="mt-10"
buttonBg="bg-color-primary"
>
完成
</c-button>
</div>
</main-page>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { Popup } from 'vant';
import { Uploader } from 'vant';
import { Field } from 'vant';
import { Cell, CellGroup } from 'vant';
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Field);
Vue.use(Uploader);
Vue.use(Popup);
export default Vue.extend({
name: "Add-follow",
components: {
"main-page": () => import("@/layout/main-page.vue"),
"c-button": () => import("@/components/common/c-button.vue"),
"c-cell": () => import("@/components/common/c-cell.vue"),
'group-cell': () => import('@/components/common/group-cell.vue')
},
created() {
// console.log(Mock, 'mock')
},
data() {
return {
show:false,
fileList: [
// { url: 'https://img01.yzcdn.cn/vant/leaf.jpg' },
// // Uploader 根据文件后缀来判断是否为图片文件
// // 如果图片 URL 中不包含类型信息,可以添加 isImage 标记来声明
// { url: 'https://cloud-image', isImage: true },
],
};
},
methods: {
handleClickLeft() {
this.$router.go(-1);
},
afterRead(file: any) {
// 此时可以自行将文件上传至服务器
console.log(file);
},
showPopup() {
this.show = true;
},
},
});
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="add-client">
<main-page
left-arrow
@click-left="handleClickLeft"
>
<div class="px-4 pt-14 ">
<main-page left-arrow @click-left="handleClickLeft">
<div class="px-4 pt-14">
<c-button
round
class="mt-10"
buttonBg="bg-color-primary"
@click="$router.push('/add-client')"
round
class="mt-10"
buttonBg="bg-color-primary"
@click="$router.push('/add-client')"
>
完成
</c-button>
</div>
</div>
</main-page>
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue'
import Vue from "vue";
export default Vue.extend({
name: 'Select-tag',
components: {
'main-page': () => import('@/layout/main-page.vue'),
'c-button': () => import('@/components/common/c-button.vue'),
name: "Select-tag",
components: {
"main-page": () => import("@/layout/main-page.vue"),
"c-button": () => import("@/components/common/c-button.vue"),
},
created() {
// console.log(Mock, 'mock')
},
data() {
return {};
},
methods: {
handleClickLeft() {
this.$router.go(-1);
},
created(){
// console.log(Mock, 'mock')
},
data(){
return{
}
},
methods: {
handleClickLeft() {
this.$router.go(-1)
},
}
})
},
});
</script>
<style>
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment