|
|
|
|
@ -89,35 +89,38 @@
|
|
|
|
|
<text class="box-tips-txt" v-if="type=='user'">每单限购{{maxCount}}张,同一身份证当天限购1张</text>
|
|
|
|
|
<text class="box-tips-txt"
|
|
|
|
|
v-if="type=='team'">{{minCount}}人以上可团体预约,一个团体最多{{maxCount}}人</text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="commonuser">
|
|
|
|
|
<view class="box-card-content">
|
|
|
|
|
<view class="book-box" style="padding-top: 20rpx;">
|
|
|
|
|
<view class="book-box-card">
|
|
|
|
|
<view class="book-box-title">
|
|
|
|
|
常用人
|
|
|
|
|
</view>
|
|
|
|
|
<view class="">
|
|
|
|
|
<view class="book-box-timerow">
|
|
|
|
|
<block v-for="(item,index) in common_user" :key="index">
|
|
|
|
|
<view class="book-box-row-timeitem" :class="{'book-box-row-timeitem-on':item.checked}" @click="handleCommonUser(item)">
|
|
|
|
|
<view v-if="item.checked" class="book-box-row-timeitem-status">
|
|
|
|
|
<u-icon name="checkmark" color="#fff" size="20rpx" v-if="item.checked">
|
|
|
|
|
</u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
<view>{{item.name}}</view>
|
|
|
|
|
<!-- <view>{{item.datef}}</view> -->
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="commonuser">
|
|
|
|
|
<view class="box-card-content">
|
|
|
|
|
<view class="book-box" style="padding-top: 20rpx;">
|
|
|
|
|
<view class="book-box-card">
|
|
|
|
|
<view class="book-box-title">
|
|
|
|
|
常用人
|
|
|
|
|
</view>
|
|
|
|
|
<view class="">
|
|
|
|
|
<view class="book-box-timerow">
|
|
|
|
|
<block v-for="(item,index) in common_user" :key="index">
|
|
|
|
|
<view class="book-box-row-timeitem"
|
|
|
|
|
:class="{'book-box-row-timeitem-on':item.checked}"
|
|
|
|
|
@click="handleCommonUser(item)">
|
|
|
|
|
<view v-if="item.checked" class="book-box-row-timeitem-status">
|
|
|
|
|
<u-icon name="checkmark" color="#fff" size="20rpx"
|
|
|
|
|
v-if="item.checked">
|
|
|
|
|
</u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
<view>{{item.name}}</view>
|
|
|
|
|
<!-- <view>{{item.datef}}</view> -->
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-visitor">
|
|
|
|
|
<block v-for="(item,index) in form.details_list" :key="index">
|
|
|
|
|
@ -159,15 +162,15 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- <view class="box-card">
|
|
|
|
|
<u-form-item label="特殊情况" labelWidth="80" prop="leader" ref="leader">
|
|
|
|
|
<u-checkbox-group @change="radioChange">
|
|
|
|
|
<u-checkbox activeColor="#EF9525" label="乘坐轮椅等行动不便者" v-model="specialtype" name='1' shape="circle"></u-checkbox>
|
|
|
|
|
</u-checkbox-group>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<!-- <view class="box-card">
|
|
|
|
|
<u-form-item label="特殊情况" labelWidth="80" prop="leader" ref="leader">
|
|
|
|
|
<u-checkbox-group @change="radioChange">
|
|
|
|
|
<u-checkbox activeColor="#EF9525" label="乘坐轮椅等行动不便者" v-model="specialtype" name='1' shape="circle"></u-checkbox>
|
|
|
|
|
</u-checkbox-group>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> -->
|
|
|
|
|
<view class="box-card" v-if="type=='team'">
|
|
|
|
|
<view class="box-card-title">
|
|
|
|
|
@ -187,9 +190,10 @@
|
|
|
|
|
<u-radio width="50%" activeColor="#EF9525" v-for="(item, index) in cardList"
|
|
|
|
|
:key="index" :name=item.idx :label="item.name">
|
|
|
|
|
</u-radio>
|
|
|
|
|
</u-radio-group> -->
|
|
|
|
|
<u-cell-group :border="false">
|
|
|
|
|
<u-cell @click="showCards" :title="card_type_names" :isLink="true" arrow-direction="down"></u-cell>
|
|
|
|
|
</u-radio-group> -->
|
|
|
|
|
<u-cell-group :border="false">
|
|
|
|
|
<u-cell @click="showCards" :title="card_type_names" :isLink="true"
|
|
|
|
|
arrow-direction="down"></u-cell>
|
|
|
|
|
</u-cell-group>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="证件号码" labelWidth="80" prop="from.idcard" required>
|
|
|
|
|
@ -200,14 +204,14 @@
|
|
|
|
|
<u-input readonly placeholder="请输入手机号" v-model="form.mobile"></u-input>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-card" v-if="type=='user'">
|
|
|
|
|
|
|
|
|
|
<view class="box-card-content" style="padding: 10px;">
|
|
|
|
|
<u-form-item label="手机号" labelWidth="80" prop="mobile" ref="mobile" required>
|
|
|
|
|
<u-input readonly placeholder="请输入手机号" v-model="form.mobile"></u-input>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-card" v-if="type=='user'">
|
|
|
|
|
|
|
|
|
|
<view class="box-card-content" style="padding: 10px;">
|
|
|
|
|
<u-form-item label="手机号" labelWidth="80" prop="mobile" ref="mobile" required>
|
|
|
|
|
<u-input readonly placeholder="请输入手机号" v-model="form.mobile"></u-input>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u--form>
|
|
|
|
|
<view class="page-bottom">
|
|
|
|
|
@ -229,24 +233,25 @@
|
|
|
|
|
<u-radio width="50%" activeColor="#EF9525" v-for="(item, index) in cardList"
|
|
|
|
|
:key="index" :name=item.idx :label="item.name">
|
|
|
|
|
</u-radio>
|
|
|
|
|
</u-radio-group> -->
|
|
|
|
|
<u-cell-group :border="false">
|
|
|
|
|
<u-cell @click="showCard" :title="card_type_name" :isLink="true" arrow-direction="down"></u-cell>
|
|
|
|
|
</u-cell-group>
|
|
|
|
|
<!-- <u-input placeholder="身份证" disabled @click="showCard" v-model="formUser.card_type"></u-input> -->
|
|
|
|
|
</u-radio-group> -->
|
|
|
|
|
<u-cell-group :border="false">
|
|
|
|
|
<u-cell @click="showCard" :title="card_type_name" :isLink="true" arrow-direction="down">
|
|
|
|
|
</u-cell>
|
|
|
|
|
</u-cell-group>
|
|
|
|
|
<!-- <u-input placeholder="身份证" disabled @click="showCard" v-model="formUser.card_type"></u-input> -->
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="证件号码" labelWidth="80" prop="idcard" ref="idcard" required>
|
|
|
|
|
<u-input placeholder="请输入证件号码" v-model="formUser.idcard"></u-input>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="行动不便者" labelWidth="80" prop="is_disability" ref="is_disability">
|
|
|
|
|
<u-radio-group v-model="formUser.is_disability">
|
|
|
|
|
<u-radio width="100%" activeColor="#EF9525" v-for="(item, index) in disabilitys"
|
|
|
|
|
:key="index" :name=item.idx :label="item.name">
|
|
|
|
|
</u-radio>
|
|
|
|
|
<!-- <u-checkbox activeColor="#EF9525" label="乘坐轮椅等行动不便者" v-model="specialtype" name='1' shape="circle"></u-checkbox> -->
|
|
|
|
|
</u-radio-group>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="行动不便者" labelWidth="80" prop="is_disability" ref="is_disability">
|
|
|
|
|
<u-radio-group v-model="formUser.is_disability">
|
|
|
|
|
<u-radio width="100%" activeColor="#EF9525" v-for="(item, index) in disabilitys"
|
|
|
|
|
:key="index" :name=item.idx :label="item.name">
|
|
|
|
|
</u-radio>
|
|
|
|
|
<!-- <u-checkbox activeColor="#EF9525" label="乘坐轮椅等行动不便者" v-model="specialtype" name='1' shape="circle"></u-checkbox> -->
|
|
|
|
|
</u-radio-group>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
<u-form-item label="手机号" labelWidth="80" prop="from.mobile" ref="mobile">
|
|
|
|
|
<u-input placeholder="请输入手机号" v-model="formUser.mobile"></u-input>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
@ -255,42 +260,46 @@
|
|
|
|
|
<u-button type="primary" @click="handleAddUser">确定</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
<u-picker :show="cardshow" @cancel="cancel" @confirm="confirmCard" ref="uPicker" :columns="cardLists" keyName="label"></u-picker>
|
|
|
|
|
<u-picker :show="cardshows" @cancel="cancels" @confirm="confirmCards" ref="uPickers" :columns="cardLists" keyName="label"></u-picker>
|
|
|
|
|
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
<u-picker :show="cardshow" @cancel="cancel" @confirm="confirmCard" ref="uPicker" :columns="cardLists"
|
|
|
|
|
keyName="label"></u-picker>
|
|
|
|
|
<u-picker :show="cardshows" @cancel="cancels" @confirm="confirmCards" ref="uPickers" :columns="cardLists"
|
|
|
|
|
keyName="label"></u-picker>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-popup :show="showInfo" mode="bottom" @close="closeInfo" :round="10" closeable>
|
|
|
|
|
<view class="mpopup" :style="[{height:maxheight}]">
|
|
|
|
|
|
|
|
|
|
<view class="mpopup" :style="[{height:maxheight}]">
|
|
|
|
|
|
|
|
|
|
<view class="mpopup-title">
|
|
|
|
|
{{currentNotice.title}}
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="mpopup-content" style="margin-top: 60rpx;">
|
|
|
|
|
<scroll-view scroll-y="true" :style="[{height:scrollheight}]">
|
|
|
|
|
<!-- <rich-text :nodes="currentNotice.content"></rich-text> -->
|
|
|
|
|
<view class="htmls" style="line-height: 50rpx;text-indent: 2em;" v-html="currentNotice.content"></view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<view class="mpopup-content" style="margin-top: 60rpx;">
|
|
|
|
|
<scroll-view scroll-y="true" :style="[{height:scrollheight}]">
|
|
|
|
|
<!-- <rich-text :nodes="currentNotice.content"></rich-text> -->
|
|
|
|
|
<view class="htmls" style="line-height: 50rpx;text-indent: 2em;" v-html="currentNotice.content">
|
|
|
|
|
</view>
|
|
|
|
|
</scroll-view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view style="margin-top: 40rpx;"></view>
|
|
|
|
|
<u-button type="primary" @click="closeInfo">知道了</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-popup :show="successshow" customStyle="width:600rpx;height:300rpx;text-align:center" :round="10" mode="center" width="600rpx" height="150rpx">
|
|
|
|
|
<view class="">
|
|
|
|
|
<view class="successBox">
|
|
|
|
|
<!-- <u-icon name="checkmark-circle" size="90" color="#EF9525"></u-icon> -->
|
|
|
|
|
<view class="h3">您已经预约成功</view>
|
|
|
|
|
<view class="p">即将跳转到参观预约 {{time}} s</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="pinkBtn" @click="goHome">返回首页</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-popup :show="successshow" customStyle="width:600rpx;height:300rpx;text-align:center" :round="10"
|
|
|
|
|
mode="center" width="600rpx" height="150rpx">
|
|
|
|
|
<view class="">
|
|
|
|
|
<view class="successBox">
|
|
|
|
|
<!-- <u-icon name="checkmark-circle" size="90" color="#EF9525"></u-icon> -->
|
|
|
|
|
<view class="h3">您已经预约成功</view>
|
|
|
|
|
<view class="p">即将跳转到参观预约 {{time}} s</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="pinkBtn" @click="goHome">返回首页</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
<u-calendar ref="calendar" :show-confirm="false" :show="showCalendar" :minDate="minDate" :maxDate="maxDate"
|
|
|
|
|
@ -308,25 +317,25 @@
|
|
|
|
|
let month = d.getMonth() + 1
|
|
|
|
|
month = month < 10 ? `0${month}` : month
|
|
|
|
|
const date = d.getDate()
|
|
|
|
|
return {
|
|
|
|
|
successshow: false,
|
|
|
|
|
time:3,
|
|
|
|
|
return {
|
|
|
|
|
successshow: false,
|
|
|
|
|
time: 3,
|
|
|
|
|
showInfo: false,
|
|
|
|
|
currentNotice: {},
|
|
|
|
|
maxheight:"",
|
|
|
|
|
scrollheight:"",
|
|
|
|
|
currentNotice: {},
|
|
|
|
|
maxheight: "",
|
|
|
|
|
scrollheight: "",
|
|
|
|
|
notice: [{
|
|
|
|
|
title: "预约须知",
|
|
|
|
|
content: "预约须知的内容"
|
|
|
|
|
}, {
|
|
|
|
|
title: "批量上传帮助",
|
|
|
|
|
content: "<p>1.批量上传EXCEL的以xlsx结尾</p><p>2.第一列为标题列 姓名 手机号 证件号 行动不便者</p><p>3.文件是从微信聊天记录中选取或者微信文件传输助手</p><img src='@host@/export.png?v=1.1' style='width:100%'/>"
|
|
|
|
|
}],
|
|
|
|
|
specialtype:false,
|
|
|
|
|
specialid:0,
|
|
|
|
|
common_user:[],
|
|
|
|
|
t:null,
|
|
|
|
|
timer:null,
|
|
|
|
|
content: "<p>1.批量上传EXCEL的以xlsx结尾</p><p>2.第一行为标题行 姓名 手机号 证件号 行动不便者</p><p>3.文件是从微信聊天记录中选取或者微信文件传输助手</p><img src='@host@/export.png?v=1.1' style='width:100%'/>"
|
|
|
|
|
}],
|
|
|
|
|
specialtype: false,
|
|
|
|
|
specialid: 0,
|
|
|
|
|
common_user: [],
|
|
|
|
|
t: null,
|
|
|
|
|
timer: null,
|
|
|
|
|
form: {
|
|
|
|
|
date: "",
|
|
|
|
|
rule_id: "",
|
|
|
|
|
@ -338,13 +347,13 @@
|
|
|
|
|
mobile: "",
|
|
|
|
|
type: "",
|
|
|
|
|
details_list: []
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
formUser: {
|
|
|
|
|
name: "",
|
|
|
|
|
idcard: "",
|
|
|
|
|
mobile: "",
|
|
|
|
|
card_type: 1,
|
|
|
|
|
card_type: 1,
|
|
|
|
|
is_disability: 0,
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
@ -384,42 +393,45 @@
|
|
|
|
|
maxCount: 1,
|
|
|
|
|
config: {},
|
|
|
|
|
info: {},
|
|
|
|
|
editIndex: -1,
|
|
|
|
|
disabilitys:[{
|
|
|
|
|
idx: 0,
|
|
|
|
|
name: '否'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
idx: 1,
|
|
|
|
|
name: '是'
|
|
|
|
|
}],
|
|
|
|
|
cardshow:false,
|
|
|
|
|
cardshows:false,
|
|
|
|
|
card_type_name:"身份证",
|
|
|
|
|
card_type_names:"身份证",
|
|
|
|
|
// cardLists:['身份证','港澳台居民居住证','护照','台胞证','港澳证'],
|
|
|
|
|
cardLists: [[{
|
|
|
|
|
value: 1,
|
|
|
|
|
label: '身份证'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 3,
|
|
|
|
|
label: '港澳台居民居住证'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 2,
|
|
|
|
|
label: '护照'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 4,
|
|
|
|
|
label: '台胞证'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 5,
|
|
|
|
|
label: '港澳证'
|
|
|
|
|
}
|
|
|
|
|
]],
|
|
|
|
|
|
|
|
|
|
editIndex: -1,
|
|
|
|
|
disabilitys: [{
|
|
|
|
|
idx: 0,
|
|
|
|
|
name: '否'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
idx: 1,
|
|
|
|
|
name: '是'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
cardshow: false,
|
|
|
|
|
cardshows: false,
|
|
|
|
|
card_type_name: "身份证",
|
|
|
|
|
card_type_names: "身份证",
|
|
|
|
|
// cardLists:['身份证','港澳台居民居住证','护照','台胞证','港澳证'],
|
|
|
|
|
cardLists: [
|
|
|
|
|
[{
|
|
|
|
|
value: 1,
|
|
|
|
|
label: '身份证'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 3,
|
|
|
|
|
label: '港澳台居民居住证'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 2,
|
|
|
|
|
label: '护照'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 4,
|
|
|
|
|
label: '台胞证'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 5,
|
|
|
|
|
label: '港澳证'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onReady() {
|
|
|
|
|
@ -429,7 +441,7 @@
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
this.loadConfig();
|
|
|
|
|
this.loadInfo();
|
|
|
|
|
this.loadInfo();
|
|
|
|
|
this.openNoticeInfo(0);
|
|
|
|
|
if (options.currentDate) {
|
|
|
|
|
this.bcurrentDate = JSON.parse(options.currentDate);
|
|
|
|
|
@ -451,92 +463,92 @@
|
|
|
|
|
that.util.getUserInfo(function(r) {
|
|
|
|
|
that.user = r;
|
|
|
|
|
that.form.mobile = r.mobile;
|
|
|
|
|
}, true);
|
|
|
|
|
|
|
|
|
|
that.loadCommonUser();
|
|
|
|
|
that.maxheight = wx.getSystemInfoSync().windowHeight*0.6 + "px"
|
|
|
|
|
that.scrollheight = wx.getSystemInfoSync().windowHeight*0.6*0.7 + "px"
|
|
|
|
|
},
|
|
|
|
|
onHide() {
|
|
|
|
|
clearInterval(this.t)
|
|
|
|
|
clearTimeout(this.timer)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onUnload() {
|
|
|
|
|
clearInterval(this.t)
|
|
|
|
|
clearTimeout(this.timer)
|
|
|
|
|
}, true);
|
|
|
|
|
|
|
|
|
|
that.loadCommonUser();
|
|
|
|
|
that.maxheight = wx.getSystemInfoSync().windowHeight * 0.6 + "px"
|
|
|
|
|
that.scrollheight = wx.getSystemInfoSync().windowHeight * 0.6 * 0.7 + "px"
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
confirmCards(e){
|
|
|
|
|
this.card_type_names = e.value[0].label
|
|
|
|
|
this.form.card_type = e.value[0].value
|
|
|
|
|
this.cardshows = false
|
|
|
|
|
},
|
|
|
|
|
cancel(){
|
|
|
|
|
this.cardshow = false
|
|
|
|
|
},
|
|
|
|
|
cancels(){
|
|
|
|
|
this.cardshows = false
|
|
|
|
|
},
|
|
|
|
|
showCards(){
|
|
|
|
|
this.cardshows = true
|
|
|
|
|
},
|
|
|
|
|
confirmCard(e){
|
|
|
|
|
this.card_type_name = e.value[0].label
|
|
|
|
|
this.formUser.card_type = e.value[0].value
|
|
|
|
|
this.cardshow = false
|
|
|
|
|
},
|
|
|
|
|
showCard(){
|
|
|
|
|
this.cardshow = true
|
|
|
|
|
},
|
|
|
|
|
goHome(){
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
url: "/pages/index/index"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
radioChange(val){
|
|
|
|
|
console.log(val)
|
|
|
|
|
this.specialtype = !this.specialtype;
|
|
|
|
|
if(this.specialtype){
|
|
|
|
|
this.specialid = val[0]
|
|
|
|
|
}else{
|
|
|
|
|
this.specialid = 0
|
|
|
|
|
}
|
|
|
|
|
// if(this.$refs.radio.currentValue){
|
|
|
|
|
// this.specialtype = val;
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
loadCommonUser(){
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/visit/address-book',
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
|
|
|
|
|
for(var m of res){
|
|
|
|
|
m.checked = false
|
|
|
|
|
}
|
|
|
|
|
that.common_user = res;
|
|
|
|
|
console.log(that.common_user)
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleCommonUser(obj){
|
|
|
|
|
obj.checked = !obj.checked
|
|
|
|
|
if(obj.checked){
|
|
|
|
|
this.form.details_list.push(obj)
|
|
|
|
|
}else{
|
|
|
|
|
for(var i=0;i<this.form.details_list.length;i++){
|
|
|
|
|
if(this.form.details_list[i].name==obj.name){
|
|
|
|
|
this.form.details_list.splice(i,1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onHide() {
|
|
|
|
|
clearInterval(this.t)
|
|
|
|
|
clearTimeout(this.timer)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onUnload() {
|
|
|
|
|
clearInterval(this.t)
|
|
|
|
|
clearTimeout(this.timer)
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
confirmCards(e) {
|
|
|
|
|
this.card_type_names = e.value[0].label
|
|
|
|
|
this.form.card_type = e.value[0].value
|
|
|
|
|
this.cardshows = false
|
|
|
|
|
},
|
|
|
|
|
cancel() {
|
|
|
|
|
this.cardshow = false
|
|
|
|
|
},
|
|
|
|
|
cancels() {
|
|
|
|
|
this.cardshows = false
|
|
|
|
|
},
|
|
|
|
|
showCards() {
|
|
|
|
|
this.cardshows = true
|
|
|
|
|
},
|
|
|
|
|
confirmCard(e) {
|
|
|
|
|
this.card_type_name = e.value[0].label
|
|
|
|
|
this.formUser.card_type = e.value[0].value
|
|
|
|
|
this.cardshow = false
|
|
|
|
|
},
|
|
|
|
|
showCard() {
|
|
|
|
|
this.cardshow = true
|
|
|
|
|
},
|
|
|
|
|
goHome() {
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
url: "/pages/index/index"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
radioChange(val) {
|
|
|
|
|
console.log(val)
|
|
|
|
|
this.specialtype = !this.specialtype;
|
|
|
|
|
if (this.specialtype) {
|
|
|
|
|
this.specialid = val[0]
|
|
|
|
|
} else {
|
|
|
|
|
this.specialid = 0
|
|
|
|
|
}
|
|
|
|
|
// if(this.$refs.radio.currentValue){
|
|
|
|
|
// this.specialtype = val;
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
loadCommonUser() {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/visit/address-book',
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
|
|
|
|
|
for (var m of res) {
|
|
|
|
|
m.checked = false
|
|
|
|
|
}
|
|
|
|
|
that.common_user = res;
|
|
|
|
|
console.log(that.common_user)
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleCommonUser(obj) {
|
|
|
|
|
obj.checked = !obj.checked
|
|
|
|
|
if (obj.checked) {
|
|
|
|
|
this.form.details_list.push(obj)
|
|
|
|
|
} else {
|
|
|
|
|
for (var i = 0; i < this.form.details_list.length; i++) {
|
|
|
|
|
if (this.form.details_list[i].name == obj.name) {
|
|
|
|
|
this.form.details_list.splice(i, 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
loadConfig() {
|
|
|
|
|
|
|
|
|
|
@ -568,8 +580,8 @@
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
console.log(res);
|
|
|
|
|
that.info = res;
|
|
|
|
|
that.notice[0].content = (that.type == 'user' ? res.person_notice : res.team_notice)
|
|
|
|
|
that.notice[0].content = that.notice[0].content.replace(/\<p/gi,"<p class='richp'");
|
|
|
|
|
that.notice[0].content = (that.type == 'user' ? res.person_notice : res.team_notice)
|
|
|
|
|
that.notice[0].content = that.notice[0].content.replace(/\<p/gi, "<p class='richp'");
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
@ -585,14 +597,14 @@
|
|
|
|
|
this.notice[type].content = this.notice[type].content.replace("@host@", this.util.HOST);
|
|
|
|
|
this.currentNotice = this.notice[type];
|
|
|
|
|
},
|
|
|
|
|
submitOrder() {
|
|
|
|
|
console.log(this.form);
|
|
|
|
|
submitOrder() {
|
|
|
|
|
console.log(this.form);
|
|
|
|
|
|
|
|
|
|
this.form.date = this.currentDate.date;
|
|
|
|
|
this.form.rule_id = this.currentTime.id;
|
|
|
|
|
// if(this.specialid){
|
|
|
|
|
// //
|
|
|
|
|
// this.form.is_disability = this.specialid;
|
|
|
|
|
this.form.rule_id = this.currentTime.id;
|
|
|
|
|
// if(this.specialid){
|
|
|
|
|
// //
|
|
|
|
|
// this.form.is_disability = this.specialid;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (this.form.details_list.length != this.form.total) {
|
|
|
|
|
@ -650,8 +662,8 @@
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -661,25 +673,25 @@
|
|
|
|
|
method: "POST",
|
|
|
|
|
data: this.form,
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
console.log(res)
|
|
|
|
|
that.successshow = true;
|
|
|
|
|
that.t = setInterval(function() {
|
|
|
|
|
if (that.time > 0)
|
|
|
|
|
that.time = that.time - 1;
|
|
|
|
|
}, 1000)
|
|
|
|
|
that.timer = setTimeout(function() {
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/pages/order/visitorder'
|
|
|
|
|
})
|
|
|
|
|
clearInterval(that.t);
|
|
|
|
|
clearTimeout(that.timer)
|
|
|
|
|
}, 3000)
|
|
|
|
|
|
|
|
|
|
console.log(res)
|
|
|
|
|
that.successshow = true;
|
|
|
|
|
that.t = setInterval(function() {
|
|
|
|
|
if (that.time > 0)
|
|
|
|
|
that.time = that.time - 1;
|
|
|
|
|
}, 1000)
|
|
|
|
|
that.timer = setTimeout(function() {
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/pages/order/visitorder'
|
|
|
|
|
})
|
|
|
|
|
clearInterval(that.t);
|
|
|
|
|
clearTimeout(that.timer)
|
|
|
|
|
}, 3000)
|
|
|
|
|
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: "none",
|
|
|
|
|
// title: "下单成功",
|
|
|
|
|
// complete() {
|
|
|
|
|
|
|
|
|
|
// complete() {
|
|
|
|
|
|
|
|
|
|
// uni.redirectTo({
|
|
|
|
|
// url: "/pages/success/success?from=visit&id=" + res.id
|
|
|
|
|
// })
|
|
|
|
|
@ -721,21 +733,31 @@
|
|
|
|
|
"token": uni.getStorageSync("userInfo_token").token
|
|
|
|
|
},
|
|
|
|
|
success(res) {
|
|
|
|
|
var jsonlist = JSON.parse(res.data)
|
|
|
|
|
for (var m of jsonlist) {
|
|
|
|
|
|
|
|
|
|
_that.form.details_list.push({
|
|
|
|
|
name: m.name,
|
|
|
|
|
idcard: m.idcard,
|
|
|
|
|
mobile: m.mobile,
|
|
|
|
|
card_type: 1,
|
|
|
|
|
is_disability:0
|
|
|
|
|
})
|
|
|
|
|
console.log(res);
|
|
|
|
|
if (res.data.indexOf("err") > -1) {
|
|
|
|
|
var err = JSON.parse(res.data);
|
|
|
|
|
_that.util.toast("导入失败,原因‘" + err.errmsg + "’请查看批量导入说明");
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
var jsonlist = JSON.parse(res.data);
|
|
|
|
|
for (var m of jsonlist) {
|
|
|
|
|
_that.form.details_list.push({
|
|
|
|
|
name: m.name,
|
|
|
|
|
idcard: m.idcard,
|
|
|
|
|
mobile: m.mobile,
|
|
|
|
|
card_type: 1,
|
|
|
|
|
is_disability: 0
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
},
|
|
|
|
|
fail(error) {
|
|
|
|
|
|
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
console.log('上传到服务器')
|
|
|
|
|
uni.hideLoading();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
@ -767,18 +789,18 @@
|
|
|
|
|
// title: "请正确填写手机号"
|
|
|
|
|
// })
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
if(!this.util.isNull(this.formUser.mobile)){
|
|
|
|
|
if (!this.util.phoneRegex.test(this.formUser.mobile)) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: "请正确填写手机号"
|
|
|
|
|
})
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
if (!this.util.isNull(this.formUser.mobile)) {
|
|
|
|
|
if (!this.util.phoneRegex.test(this.formUser.mobile)) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: "请正确填写手机号"
|
|
|
|
|
})
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//判断是不是编辑 如果是编辑
|
|
|
|
|
if (that.editIndex != -1) {
|
|
|
|
|
that.form.details_list.splice(that.editIndex, 1, that.formUser)
|
|
|
|
|
@ -856,8 +878,8 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return day
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleDate(index) {
|
|
|
|
|
var nt = this.$moment().format("yyyy-MM-DD");
|
|
|
|
|
let list = this.listDatePrice;
|
|
|
|
|
@ -1013,11 +1035,11 @@
|
|
|
|
|
this.editIndex = -1;
|
|
|
|
|
this.showAdd = true
|
|
|
|
|
},
|
|
|
|
|
delUser(index) {
|
|
|
|
|
for(var i=0;i<this.common_user.length;i++){
|
|
|
|
|
if(this.form.details_list[index].name == this.common_user[i].name){
|
|
|
|
|
this.common_user[i].checked = false;
|
|
|
|
|
}
|
|
|
|
|
delUser(index) {
|
|
|
|
|
for (var i = 0; i < this.common_user.length; i++) {
|
|
|
|
|
if (this.form.details_list[index].name == this.common_user[i].name) {
|
|
|
|
|
this.common_user[i].checked = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.form.details_list.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
@ -1134,63 +1156,69 @@
|
|
|
|
|
color: #351C1B;
|
|
|
|
|
padding-bottom: 25rpx;
|
|
|
|
|
border-bottom: 2px solid #F7F6F4;
|
|
|
|
|
}
|
|
|
|
|
.commonuser .book-box-row-timeitem{
|
|
|
|
|
width:160rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
// .mpopup{
|
|
|
|
|
// max-height: 400rpx;
|
|
|
|
|
// // overflow-y: scroll;
|
|
|
|
|
// }
|
|
|
|
|
.mpopup-content {
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
// text-indent: 2rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.box-card-content {}
|
|
|
|
|
.successBox {
|
|
|
|
|
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #00CCB9;
|
|
|
|
|
font-size: 180rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.h3 {
|
|
|
|
|
font-size: 40rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #333333;
|
|
|
|
|
margin-top: 40rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.p {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #333333;
|
|
|
|
|
margin-top: 24rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.pinkBtn {
|
|
|
|
|
width: 50%;
|
|
|
|
|
background-image: linear-gradient(45deg, #EF9525 0%, #EF9525 100%);
|
|
|
|
|
border-radius: 44rpx;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 70rpx;
|
|
|
|
|
margin:30rpx auto;
|
|
|
|
|
}
|
|
|
|
|
.richp{
|
|
|
|
|
margin-bottom:10rpx;
|
|
|
|
|
}
|
|
|
|
|
.u-radio-group{
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
.u-radio-group .u-radio{
|
|
|
|
|
margin-bottom:10rpx;
|
|
|
|
|
margin-right:10rpx
|
|
|
|
|
.commonuser .book-box-row-timeitem {
|
|
|
|
|
width: 160rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// .mpopup{
|
|
|
|
|
// max-height: 400rpx;
|
|
|
|
|
// // overflow-y: scroll;
|
|
|
|
|
// }
|
|
|
|
|
.mpopup-content {
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
// text-indent: 2rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.box-card-content {}
|
|
|
|
|
|
|
|
|
|
.successBox {
|
|
|
|
|
|
|
|
|
|
.iconfont {
|
|
|
|
|
color: #00CCB9;
|
|
|
|
|
font-size: 180rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.h3 {
|
|
|
|
|
font-size: 40rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #333333;
|
|
|
|
|
margin-top: 40rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.p {
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #333333;
|
|
|
|
|
margin-top: 24rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.pinkBtn {
|
|
|
|
|
width: 50%;
|
|
|
|
|
background-image: linear-gradient(45deg, #EF9525 0%, #EF9525 100%);
|
|
|
|
|
border-radius: 44rpx;
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #FFFFFF;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 70rpx;
|
|
|
|
|
margin: 30rpx auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.richp {
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.u-radio-group {
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.u-radio-group .u-radio {
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
margin-right: 10rpx
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|