index.vue
3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!--
* @Date: 2022-09-30 09:53:14
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-09-30 11:50:17
* @FilePath: /swx/src/pages/addRecord/index.vue
* @Description: 文件描述
-->
<template>
<view style="padding: 1rem;">
<view style="background-color: white; border-radius: 0.65rem; padding: 1rem;overflow: auto; margin-bottom: 1px;">
<view style="display: inline-block; margin-right: 1rem; line-height: 60rpx;">
<view class="bg-gradient" style="font-size: 1.15rem;">添加记录</view>
</view>
</view>
<view style="background-color: #FFFFFF; padding-bottom: 2rem; border-radius: 1rem;">
<!-- <AtInput disabled :border="true" title="用户名" type='text' placeholder='请输入姓名' v-model:value="username" /> -->
<view class="at-input" style="margin-right: 1rem;">
<view class="at-input__container">
<label class="h5-label at-input__title at-input__title">用户名</label>
<input class="h5-input at-input__input" placeholder-class="placeholder" :placeholder="username" :disabled="true"/>
</view>
</view>
<view class="at-input" style="margin-right: 1rem;">
<view class="at-input__container">
<label class="h5-label at-input__title at-input__title">陪伴状态</label>
<input @tap="show_popup=true" class="h5-input at-input__input" placeholder-class="placeholder" :value="user_status" placeholder="请选择陪伴状态" :disabled="true"/>
<view style="margin-right: 0; margin-top: 0.5rem;"><van-icon :name="icon_sel" color="" /></view>
</view>
</view>
<van-field :value="message" label-class="label-class" input-class="input-class" label="跟进内容" type="textarea"
placeholder="请输入跟进记录详情" placeholder-style="color: #CCC; font-size: 1.05rem;" :autosize="{ maxHeight: 300, minHeight: 150 }" customStyle="" inputAlign=""
rightIcon="" :required="false" :border="false" @change="onChange" />
</view>
</view>
<bottom-button @on-submit="onSubmit">保存</bottom-button>
<!-- 陪伴状态弹出框 -->
<van-popup :show="show_popup" position="bottom" custom-style="height: 40%;" :lock-scroll="true">
<van-picker :show-toolbar="true" title="" confirm-button-text="确定" :columns="columns" toolbar-class="picker-toolbar"
@confirm="onConfirm" @cancel="onCancel" @change="onChange" />
</van-popup>
</template>
<script setup>
import { ref } from "vue";
import icon_sel from '@/images/icon/sel@2x.png'
import bottomButton from "@/components/bottom-button";
import Taro from '@tarojs/taro'
const username = ref('精妙');
const message = ref('');
const onSubmit = (val) => {
console.warn(val);
Taro.showToast({
title: '请检查输入项',
icon: 'error',
duration: 2000
});
Taro.redirectTo({
url: '../joinSuccess/index'
})
}
const show_popup = ref(false);
const user_status = ref('');
const columns = ref(['跟进', '引导']);
const onChange = (event) => {
const { picker, value, index } = event.detail;
}
const onConfirm = (event) => {
const { picker, value, index } = event.detail;
user_status.value = value;
show_popup.value = false;
}
const onCancel = (event) => {
show_popup.value = false;
}
</script>
<script>
import "./index.less";
export default {
name: "demoPage",
};
</script>