Commit acb342a2 by 匡雅琴

客户信息卡片日期选择交互调整

1 parent 1c891d01
......@@ -9,12 +9,12 @@
.icon-customer-copy { width: 18px; height: 20px; background-position: -138px -30px;}
.icon-customer-phone { width: 20px; height: 20px; background-position: -30px -96px;}
.icon-factory { width: 32px; height: 32px; background-position: -42px -54px;}
.icon-follow { width: 32px; height: 32px; background-position: -96px 0px;}
.icon-identifier { width: 20px; height: 20px; background-position: -60px -96px;}
.icon-open-arrow { width: 8px; height: 7px; background-position: -113px -72px;}
.icon-fllow { width: 18px; height: 18px; background-position: -138px -88px;}
.icon-followRecord { width: 20px; height: 20px; background-position: -90px -96px;}
.icon-follow { width: 32px; height: 32px; background-position: -96px 0px;}
.icon-followRecord { width: 20px; height: 20px; background-position: -60px -96px;}
.icon-identifier { width: 20px; height: 20px; background-position: -90px -96px;}
.icon-maintant { width: 20px; height: 20px; background-position: -138px 0px;}
.icon-message { width: 18px; height: 18px; background-position: 0px -126px;}
.icon-open-arrow { width: 8px; height: 7px; background-position: -113px -72px;}
.icon-sendwechat { width: 20px; height: 18px; background-position: -138px -60px;}
.icon-tel { width: 18px; height: 18px; background-position: -28px -126px;}
\ No newline at end of file

32.8 KB | W: | H:

32.8 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -6,7 +6,7 @@
</div>
<van-form class="dialog-follow">
<van-cell-group inset>
<van-field name="跟进结果" label="跟进结果">
<van-field name="跟进结果" label="跟进结果" class="field-bottom">
<template #input>
<div class="follow-list">
<div class="follow-list-item" v-for="item in followResultList" :key="item.id" @click="selectFollow(item)">
......@@ -15,12 +15,13 @@
</div>
</template>
</van-field>
<van-field name="跟进备注" label="跟进备注" v-model="selectFollowForm.followTips" placeholder="输入备注" maxlength="200" />
<van-field name="跟进备注" rows="1" type="textarea" autosize class="field-bottom" label="跟进备注" v-model="selectFollowForm.followTips" placeholder="输入备注" maxlength="200" />
<van-field name="switch" label="继续跟进">
<template #input>
<van-switch v-model="checked" size="24px" />
</template>
</van-field>
<div class="continue-follow-text field-bottom">若「打开」表示该客户暂未战败,仍需再次招揽; 若「关闭」表示该客户信息将从「待跟进」迁移至「已跟进」列表。</div>
<van-field
v-show="selectFollowForm.followResultId == 1"
v-model="selectFollowForm.appointmentTime"
......@@ -31,7 +32,7 @@
placeholder="请选择到店时间"
@click="showDate"
/>
<div v-show="showPicker">
<div v-show="showPicker && selectFollowForm.followResultId == 1">
<div class="datetime-box">
<div class="datetime-picker">
<div v-for="item in datePickList" :key="item.index" :class="['item', tabIndex == item.index ? 'active' : '']">
......@@ -44,16 +45,17 @@
<van-datetime-picker v-show="tabIndex" type="time" @confirm="confirmTime" :min-hour="minHour" />
</div>
</van-cell-group>
<div class="btn-group">
<van-button block native-type="cancel" @click="cancel">取消</van-button>
<van-button block type="primary">提交</van-button>
</div>
</van-form>
<div class="btn-group">
<van-button block native-type="cancel" @click="cancel">取消</van-button>
<van-button block type="primary">提交</van-button>
</div>
</van-popup>
</div>
</template>
<script>
import { Toast } from 'vant'
export default {
name: 'CustomerFollowPopup',
data() {
......@@ -122,6 +124,8 @@ export default {
checked: true,
// 当前日期
dayNow: '',
// 当前时间
timeNow: '',
// 时间标签可选最小时间
minHour: ''
}
......@@ -144,17 +148,14 @@ export default {
},
// 时间选择tab切换
selectDatetime(item) {
console.log(item)
this.tabIndex = item.index
},
// 选择日期
selectDate(val) {
console.log(val)
this.formatterDate(val, 2)
},
// 选择时间
confirmTime(val) {
console.log(val)
this.datePickList[1].date = val
},
// 确定选择的日期和时间
......@@ -169,6 +170,11 @@ export default {
// 提交按钮
primary() {
// 如果选择标签为预约到店,判断日期和时间是否填了
if (this.selectFollowForm.followResultId == 1) {
if (!this.selectFollowForm.appointmentTime) {
Toast.fail('请选择预约时间')
}
}
},
// 日期格式转化
formatterDate(val, type) {
......@@ -177,17 +183,18 @@ export default {
let m = date.getMonth() + 1
m = m < 10 ? '0' + m : m
let h = date.getHours()
h = h < 10 ? '0' + h : h
let h1 = h < 10 ? '0' + h : h
let d = date.getDate()
d = d < 10 ? '0' + d : d
const time = y + '-' + m + '-' + d
this.datePickList[0].date = time
if (!type) {
this.dayNow = time
this.timeNow = h1 + 1
}
this.datePickList[0].date = time
if (this.dayNow == time) {
this.datePickList[1].date = h + 1 + ':00'
this.minHour = h + 1
this.datePickList[1].date = this.timeNow + ':00'
this.minHour = this.timeNow
return
}
this.datePickList[1].date = '09:00'
......@@ -253,7 +260,7 @@ export default {
}
.datetime-box {
display: flex;
justify-content: space-around;
justify-content: space-between;
}
.datetime-picker {
height: 28px;
......@@ -263,15 +270,40 @@ export default {
border-radius: 6px;
box-sizing: border-box;
}
.continue-follow-text {
width: 287px;
height: 54px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 18px;
padding: 0 90px 16px 0;
}
.field-bottom {
border-bottom: 1px solid #ebedf0;
}
.dialog-follow {
padding: 0 16px;
}
.btn-group {
}
.dialog-follow /deep/ .van-field__label {
width: 60px !important;
}
.dialog-follow /deep/ .van-field__control {
text-align: right;
max-width: 271px;
}
.dialog-follow /deep/ .van-cell-group--inset {
margin: 0;
}
.dialog-follow /deep/ .van-cell {
padding: 16px 0;
}
.dialog-follow /deep/ .van-cell::after {
border-bottom: none;
}
.btn-group /deep/ .van-button--block {
width: 50%;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!