Commit d50d9f4d authored by lshan's avatar lshan

lishan

parent af56017d
This diff is collapsed.
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
@input="handleInput" @input="handleInput"
@blur="handleChange" @blur="handleChange"
/> />
<div class="flex-shrink-0"> <div class="flex-shrink-0">
<slot name="action" /> <slot name="action" />
</div> </div>
...@@ -54,7 +53,7 @@ import Vue from 'vue' ...@@ -54,7 +53,7 @@ import Vue from 'vue'
export default Vue.extend({ export default Vue.extend({
components:{ components:{
'app-icon':()=>import('@/components/common/Icon.vue') //'app-icon':()=>import('@/components/common/Icon.vue')
// 'main-page': () => import('@/layout/main-page.vue') // 'main-page': () => import('@/layout/main-page.vue')
}, },
props: { props: {
......
...@@ -23,6 +23,14 @@ export const clientRoutes: Array<RouteConfig> = [ ...@@ -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', path: '/client-management',
component: () => import('@/views/client/client-management.vue') 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> <template>
<div class="add-client"> <div class="add-client">
<main-page <main-page left-arrow @click-left="handleClickLeft">
left-arrow <div class="px-4 pt-14">
@click-left="handleClickLeft" <input-cell
> v-model="name"
<div class="px-4 pt-14 "> required
<input-cell :limit="20"
v-model="name" label="真实姓名"
required placeholder="请输入客户姓名(必填)"
:limit="20" error-msg="姓名不能为空"
label="真实姓名" />
placeholder="请输入客户姓名(必填)" <c-cell
error-msg="姓名不能为空" dot
/> title="标签"
<c-cell class="mt-4"
dot @click="$router.push('/select-tag')"
title="标签" />
v-model="tag" <input-cell
class="mt-4" v-model="tel"
@click="$router.push('/select-tag')" label="电话号码"
/> placeholder="添加电话号码"
<input-cell class="mt-4">
add <app-icon slot="prefix" icon-name="y-add" />
v-model="tel" </input-cell>
label="电话号码" <input-cell
placeholder="添加电话号码" v-model="address"
class="mt-4" :limit="50"
/> label="地址"
<input-cell placeholder="请输入客户地址"
v-model="address" class="mt-4"
:limit="50" />
label="地址" <c-cell dot>
placeholder="请输入客户地址" <app-icon slot="prefix" icon-name="location"/>
class="mt-4" <div slot="prefix" class="text-text-secondary">支持地图定位</div>
/> </c-cell>
<y-cell <input-cell
location v-model="company"
dot label="公司"
v-model="location" placeholder="请输入客户公司"
content="支持地图定位" class="mt-4"
/> />
<input-cell
<input-cell v-model="position"
v-model="company" label="职位"
label="公司" placeholder="请输入客户职位"
placeholder="请输入客户公司" class="mt-4"
class="mt-4" />
/> <input-cell
<input-cell v-model="remarks"
v-model="position" label="备注"
label="职位" placeholder="请输入备注"
placeholder="请输入客户职位" class="mt-4"
class="mt-4" />
/> <c-cell dot title="跟进人" class="mt-4" />
<input-cell </div>
v-model="remarks" </main-page>
label="备注" </div>
placeholder="请输入备注"
class="mt-4"
/>
<c-cell
dot
title="跟进人"
v-model="follow"
class="mt-4"
/>
</div>
</main-page>
</div>
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from "vue";
export default Vue.extend({ export default Vue.extend({
name: 'Add-client', name: "Add-client",
components: { components: {
'main-page': () => import('@/layout/main-page.vue'), 'main-page': () => import("@/layout/main-page.vue"),
'input-cell': () => import('@/components/common/input-cell.vue'), 'input-cell': () => import("@/components/common/input-cell.vue"),
'c-cell': () => import('@/components/common/c-cell.vue'), 'c-cell': () => import("@/components/common/c-cell.vue"),
'y-cell': () => import('@/views/attendance/y-cell.vue'), 'app-icon': () => import('@/components/common/Icon.vue'),
// 'c-button': () => import('@/components/common/c-button.vue'), // 'group-cell': () => import('@/components/common/group-cell.vue')
// 'group-cell': () => import('@/components/common/group-cell.vue') },
}, created() {
created(){ // console.log(Mock, 'mock')
// console.log(Mock, 'mock') },
}, data() {
data(){ return {
return{ name: "",
name:'', tel: "",
tag:'', address: "",
tel:'', location: "",
address:'', company: "",
location:'', position: "",
company:'', remarks: "",
position:'', };
remarks:'', },
follow:'', methods: {
} handleClickLeft() {
this.$router.go(-1);
}, },
methods: { },
handleClickLeft() { });
this.$router.go(-1)
},
}
})
</script> </script>
<style> <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> <template>
<div class="add-client"> <div class="add-client">
<main-page <main-page left-arrow @click-left="handleClickLeft">
left-arrow <div class="px-4 pt-14">
@click-left="handleClickLeft"
>
<div class="px-4 pt-14 ">
<c-button <c-button
round round
class="mt-10" class="mt-10"
buttonBg="bg-color-primary" buttonBg="bg-color-primary"
@click="$router.push('/add-client')" @click="$router.push('/add-client')"
> >
完成 完成
</c-button> </c-button>
</div> </div>
</main-page> </main-page>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import Vue from 'vue' import Vue from "vue";
export default Vue.extend({ export default Vue.extend({
name: 'Select-tag', name: "Select-tag",
components: { components: {
'main-page': () => import('@/layout/main-page.vue'), "main-page": () => import("@/layout/main-page.vue"),
'c-button': () => import('@/components/common/c-button.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> </script>
<style> <style>
</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