init
This commit is contained in:
@@ -0,0 +1,415 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar title="申请账号" placeholder fixed></van-nav-bar>
|
||||
|
||||
<van-form ref="form" @submit="doSubmit" validate-trigger="onSubmit"
|
||||
class="mt10"
|
||||
scroll-to-error
|
||||
input-align="right"
|
||||
:show-error-message="false">
|
||||
|
||||
<van-cell-group inset>
|
||||
|
||||
<van-field label="申请人姓名" v-model="formData.applyUserName"
|
||||
left-icon="contact" required
|
||||
placeholder="请填写申请人姓名"
|
||||
:rules="[{ required:true, message: '请填写申请人姓名' }]"></van-field>
|
||||
<van-field label="供应商名称" v-model="formData.userName"
|
||||
left-icon="cart-o" required
|
||||
placeholder="请填写完整供应商名称"
|
||||
:rules="[{ required:true, message: '请填写完整供应商名称' }]"></van-field>
|
||||
|
||||
|
||||
<van-cell title="申请模块" clickable>
|
||||
<template #right-icon>
|
||||
<van-radio-group v-model="formData.applyModel" direction="horizontal"
|
||||
@change="applyModelChange">
|
||||
<van-radio :name="1">福利</van-radio>
|
||||
<van-radio :name="2">疗休养</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-cell>
|
||||
<!-- <van-field label="性别" v-model="formData.sex" readonly
|
||||
required
|
||||
@click="sexPicker = true"
|
||||
placeholder="请选择性别"
|
||||
clickable
|
||||
:rules="[{ required:true, message: '请选择性别' }]"
|
||||
left-icon="ellipsis"></van-field>
|
||||
<van-popup v-model="sexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男','女']"
|
||||
@confirm="(val)=>{this.formData.sex = val;sexPicker=false}"
|
||||
@cancel="sexPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>-->
|
||||
|
||||
<van-field label="联系电话" placeholder="请填写联系电话"
|
||||
left-icon="phone-o"
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
:value="formData.mobile"
|
||||
@touchstart.native.stop="mobileShow = true"
|
||||
:rules="[{ required:true, message: '请填写联系电话' }]"></van-field>
|
||||
|
||||
<van-number-keyboard
|
||||
v-model="formData.mobile"
|
||||
:show="mobileShow"
|
||||
:maxlength="11"
|
||||
@blur="mobileShow = false"
|
||||
></van-number-keyboard>
|
||||
|
||||
<van-field label="身份证号" placeholder="请填写身份证号"
|
||||
left-icon="notes-o"
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
:value="formData.idCard"
|
||||
@touchstart.native.stop="idCardShow = true"
|
||||
:rules="[{ required:true, message: '请填写身份证号' }]"></van-field>
|
||||
<van-number-keyboard
|
||||
:show="idCardShow"
|
||||
extra-key="X"
|
||||
close-button-text="完成"
|
||||
@blur="idCardShow = false"
|
||||
:maxlength="18"
|
||||
v-model="formData.idCard"
|
||||
></van-number-keyboard>
|
||||
|
||||
|
||||
<template v-if="formData.applyModel===1">
|
||||
<div class="van-cell" style="flex-flow: column">
|
||||
<div class="van-cell__title van-field__label"
|
||||
style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>请选择中标的福利项目</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<div v-if="welfareProjectList&&welfareProjectList.length>0">
|
||||
<van-checkbox-group v-model="formData.welfareProjectIds">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
v-for="(item, index) in welfareProjectList"
|
||||
clickable
|
||||
:key="item.id"
|
||||
:title="item.name"
|
||||
@click="$refs.checkboxes[index].toggle();">
|
||||
<template #right-icon>
|
||||
<van-checkbox :name="item.id"
|
||||
ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
|
||||
|
||||
<div v-else style="height: 100px">
|
||||
暂无
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="formData.applyModel===2">
|
||||
|
||||
|
||||
<div class="van-cell" style="flex-flow: column">
|
||||
<div class="van-cell__title van-field__label"
|
||||
style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>请选择中标的目的地/线路</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-tabs v-model="formData.applyModelActive">
|
||||
<van-tab title="目的地" name="baseManagement"></van-tab>
|
||||
<van-tab title="线路" name="line"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<template v-if="formData.applyModelActive==='baseManagement'">
|
||||
<!-- 目的地-->
|
||||
<div v-if="baseManagementList&&baseManagementList.length>0">
|
||||
<van-checkbox-group v-model="formData.baseManagementIds">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
v-for="(item, index) in baseManagementList"
|
||||
clickable
|
||||
:key="item.id"
|
||||
:title="item.baseName"
|
||||
@click="$refs.checkboxes[index].toggle();">
|
||||
<template #right-icon>
|
||||
<van-checkbox :name="item.id"
|
||||
ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
<div v-else style="height: 100px">
|
||||
暂无
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="formData.applyModelActive==='line'">
|
||||
<!-- 线路-->
|
||||
<div v-if="lineList&&lineList.length>0">
|
||||
<van-checkbox-group v-model="formData.lineIds">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
v-for="(item, index) in lineList"
|
||||
clickable
|
||||
:key="item.id"
|
||||
:title="item.lineName"
|
||||
@click="$refs.checkboxes[index].toggle();">
|
||||
<template #right-icon>
|
||||
<van-checkbox :name="item.id"
|
||||
ref="checkboxes"></van-checkbox>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
</div>
|
||||
<div v-else style="height: 100px">
|
||||
暂无
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
<div style="margin: 20px 20px 10px;">
|
||||
<van-button native-type="submit" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor" :disabled="disabled">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</van-form>
|
||||
|
||||
<van-tabbar v-model="active">
|
||||
<van-tabbar-item icon="user-circle-o" @click="clickTabbar('/mobile/self/applyUser')">申请账号
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="friends-o" replace
|
||||
@click="clickTabbar('/mobile/self/applyUser/list')">
|
||||
我的申请
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
idCardShow: false,
|
||||
mobileShow: false,
|
||||
formData: {
|
||||
applyModel: 1,
|
||||
welfareProjectIds: [],
|
||||
lineIds: [],
|
||||
baseManagementIds: [],
|
||||
},
|
||||
disabled: false,
|
||||
currentDate: "",
|
||||
id: "",
|
||||
active: 0,
|
||||
sexPicker: false,
|
||||
welfareProjectList: [],
|
||||
lineList: [],
|
||||
baseManagementList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
applyModelChange(val) {
|
||||
if (val === 1) {
|
||||
this.$set(this.formData, "welfareProjectIds", [])
|
||||
}
|
||||
if (val === 2) {
|
||||
this.$set(this.formData, "applyModelActive", "baseManagement")
|
||||
this.$set(this.formData, "lineIds", [])
|
||||
this.$set(this.formData, "baseManagementIds", [])
|
||||
}
|
||||
},
|
||||
clickTabbar(val) {
|
||||
location.replace(val + "?currentDate=" + this.currentDate)
|
||||
},
|
||||
async getWelfareProject() {
|
||||
const resp = await $.post("/mobile/self/applyUser/welfareProjectList")
|
||||
if (resp.code === 0) {
|
||||
this.welfareProjectList = resp.data
|
||||
}
|
||||
|
||||
},
|
||||
async getBaseManagementList() {
|
||||
const resp = await $.post("/mobile/self/applyUser/getBaseManagementList")
|
||||
if (resp.code === 0) {
|
||||
this.baseManagementList = resp.data
|
||||
}
|
||||
},
|
||||
async getLineList() {
|
||||
const resp = await $.post("/mobile/self/applyUser/getLineList")
|
||||
if (resp.code === 0) {
|
||||
this.lineList = resp.data
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
if (this.formData.applyModel === 1 && this.formData.welfareProjectIds && this.formData.welfareProjectIds.length === 0) {
|
||||
vant.Dialog.alert({
|
||||
message: '请选择您中标的福利项目!如您已中标且没有可选福利项目,请联系管理员',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
if (this.formData.applyModel === 2 &&
|
||||
((this.formData.baseManagementIds && this.formData.baseManagementIds.length === 0)
|
||||
|| (this.formData.lineListIds && this.formData.lineListIds.length === 0))) {
|
||||
vant.Dialog.alert({
|
||||
message: '请选择您中标的疗休养项目!如您已中标且没有可选疗休养项目,请联系管理员',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.id) {
|
||||
const data = await $.post(loc() + "/getUserByMobile", {mobile: this.formData.mobile})
|
||||
if (data) {
|
||||
vant.Toast.fail('当前手机号已申请!如有问题请联系管理员');
|
||||
return
|
||||
}
|
||||
}
|
||||
let message = ""
|
||||
if (this.formData.applyModel === 1) {
|
||||
let projectNames = []
|
||||
this.formData.welfareProjectIds.forEach(id => {
|
||||
const welfare = this.welfareProjectList.find(w => w.id === id)
|
||||
if (welfare) {
|
||||
projectNames.push(welfare.name)
|
||||
}
|
||||
|
||||
})
|
||||
message = "您选择的福利项目有【" + names + "],"
|
||||
this.formData.projectNames = names.join(",")
|
||||
this.formData.welfareProjectIds = JSON.stringify(this.formData.welfareProjectIds)
|
||||
} else {
|
||||
let names = []
|
||||
|
||||
if (this.formData.baseManagementIds && this.formData.baseManagementIds.length > 0) {
|
||||
this.formData.baseManagementIds.forEach(id => {
|
||||
const baseManagement = this.baseManagementList.find(w => w.id === id)
|
||||
if (baseManagement) {
|
||||
names.push(baseManagement.baseName)
|
||||
}
|
||||
})
|
||||
this.formData.baseManagementIds = JSON.stringify(this.formData.baseManagementIds)
|
||||
}
|
||||
|
||||
|
||||
if (this.formData.lineIds && this.formData.lineIds.length > 0) {
|
||||
this.formData.lineIds.forEach(id => {
|
||||
const line = this.lineList.find(w => w.id === id)
|
||||
if (line) {
|
||||
names.push(line.lineName)
|
||||
}
|
||||
})
|
||||
this.formData.lineIds = JSON.stringify(this.formData.lineIds)
|
||||
}
|
||||
this.formData.projectNames = names.join(",")
|
||||
|
||||
message = "您选择的疗休养项目有【" + names + "],"
|
||||
}
|
||||
|
||||
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: message + '您确定要提交申请吗?您手机号、身份证号仅作为生成密码时使用,请保证正确否则无法登录,审核通过后将以短信通知您,',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post(loc() + "/doSubmit", this.formData)
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('申请成功');
|
||||
setTimeout(() => {
|
||||
location.replace("/mobile/self/applyUser/list?currentDate=" + this.currentDate)
|
||||
}, 1000)
|
||||
} else {
|
||||
vant.Toast.fail('申请失败');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.currentDate = GetQueryString("currentDate")
|
||||
await this.getWelfareProject()
|
||||
await this.getBaseManagementList()
|
||||
await this.getLineList()
|
||||
|
||||
if (this.id) {
|
||||
const resp = await $.post(loc() + "/findOne", {id: this.id})
|
||||
this.formData = resp.data
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.currentDate) {
|
||||
this.disabled = true
|
||||
vant.Toast.fail('请扫描申请二维码进入');
|
||||
return
|
||||
} else {
|
||||
if (new Date().valueOf() > this.currentDate) {
|
||||
this.disabled = true
|
||||
vant.Dialog.alert({
|
||||
message: '二维码已过期!请联系管理员',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.van-cell {
|
||||
line-height: 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,445 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-index-bar__sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 6px 0px;
|
||||
border-color: lightgray;
|
||||
}
|
||||
|
||||
.van-button--small {
|
||||
border-radius: revert;
|
||||
width: 40%;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cus_overflow {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.showMore {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.cus_popup {
|
||||
width: 70%;
|
||||
height: 50%;
|
||||
/*border-radius: 10px;*/
|
||||
padding: 10px 14px;
|
||||
font-size: 15px;
|
||||
/*background-color: #E5E7E9;
|
||||
background-image: url("https://www.transparenttextures.com/patterns/green-cup.png");*/
|
||||
}
|
||||
|
||||
.cus_icon {
|
||||
z-index: 10000;
|
||||
color: white;
|
||||
font-size: 35px;
|
||||
position: fixed;
|
||||
top: 81%;
|
||||
left: 44%;
|
||||
}
|
||||
|
||||
.userPopup {
|
||||
height: 80%;
|
||||
background-color: #f6f7f9;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.firstName {
|
||||
width: 45px;
|
||||
background-color: lightgrey;
|
||||
border-radius: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 84%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.van-dialog__header {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.van-dialog__confirm {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.van-field__label {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.cus_cell {
|
||||
padding: 4px 0px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-checkbox-group {
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.unit {
|
||||
display: inline-block;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.van-dropdown-menu__item {
|
||||
flex: auto;
|
||||
}
|
||||
|
||||
.audit_icon {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="申请账号审核"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
shape="round"
|
||||
maxlength="10"
|
||||
@search="doSearch"
|
||||
placeholder="请输入供应商名称、申请人进行查询"
|
||||
>
|
||||
</van-search>
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item :title="pageForm.time" ref="item">
|
||||
<van-cell center title="查询全部">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="pageForm.timeSwitch" size="24"
|
||||
active-color="#246fb4"></van-switch>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-datetime-picker v-show="pageForm.timeSwitch === false"
|
||||
v-model="time" cancel-button-text=" " confirm-button-text=" "
|
||||
type="year-month"
|
||||
title="选择年月"
|
||||
:formatter="timeFormatter"
|
||||
></van-datetime-picker>
|
||||
<div style="padding: 5px 16px;margin-top: 6px">
|
||||
<van-button type="danger" color="#246fb4" block round @click="onConfirm"
|
||||
style="height: 36px">
|
||||
确认
|
||||
</van-button>
|
||||
</div>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.auditState" :options="stateOption"
|
||||
@change="doSearch">
|
||||
</van-dropdown-item>
|
||||
|
||||
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 116px">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished" :immediate-check="false"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="onLoad">
|
||||
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div>
|
||||
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 74%">
|
||||
<div class="van-ellipsis title">
|
||||
<span class="title_span">|</span>
|
||||
<span>{{o.userName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">申请人姓名:</span>
|
||||
<span>{{o.applyUserName}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">联系电话:</span>
|
||||
<span>{{o.mobile}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">身份证号:</span>
|
||||
<span>{{o.idCard}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">申请模式:</span>
|
||||
<span>{{o.applyModel===1?'福利':'疗休养'}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.applyModel===1">
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">申请添加的福利项目:</span>
|
||||
<span>{{o.projectNames}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span v-if="o.auditState===1"
|
||||
style="color: #e6a23c">待审核</span>
|
||||
<span v-if="o.auditState==3" style="color: #67c23a">审核通过</span>
|
||||
<span v-if="o.auditState==2" style="color: #f56c6c">审核不通过</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.auditState !== 1">
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核时间:</span>
|
||||
<span>{{o.auditTime}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.auditState !== 1">
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核意见:</span>
|
||||
<span>{{o.auditOpinion?o.auditOpinion:'暂无'}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div v-if="o.auditState === 1">
|
||||
<van-button @click.stop="openSubmit(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">审  核
|
||||
</van-button>
|
||||
</div>
|
||||
<div>
|
||||
<van-button @click.stop="doDelete(o)" class="cus_button"
|
||||
type="danger" size="small"
|
||||
style="margin-right: 8px; width: auto;">删  除
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
<van-dialog v-model="optionShow" title="审核意见" show-cancel-button @confirm="doSubmit">
|
||||
<van-cell center title="是否审核通过:">
|
||||
<template #right-icon>
|
||||
<van-switch v-model="info.checked" size="24" active-color="#07c160"
|
||||
inactive-color="#ee0a24"></van-switch>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-field
|
||||
v-model="info.auditOpinion"
|
||||
rows="4"
|
||||
label="审核意见:"
|
||||
autosize
|
||||
type="textarea"
|
||||
maxlength="30"
|
||||
placeholder="请输入审核意见"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
|
||||
</van-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
optionShow: false,
|
||||
pageForm: {
|
||||
auditState: 1
|
||||
},
|
||||
stateOption: [
|
||||
{text: '未审核', value: 1},
|
||||
{text: '审核未通过', value: 2},
|
||||
{text: '审核通过', value: 3},
|
||||
],
|
||||
time: new Date(),
|
||||
show: false,
|
||||
timeList: [],
|
||||
info: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doDelete(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确认要删除吗?',
|
||||
})
|
||||
.then(async () => {
|
||||
const resp = await $.post(loc() + "/doDelete", {id: o.id})
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('删除成功');
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Toast.fail('删除失败');
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
async doSubmit() {
|
||||
const resp = await $.post(loc() + "/doSubmit", this.info)
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('审核成功');
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Toast.fail('审核失败');
|
||||
}
|
||||
},
|
||||
openSubmit(o) {
|
||||
this.info = o
|
||||
this.$set(this.info, "checked", true)
|
||||
this.optionShow = true
|
||||
},
|
||||
onConfirm() {
|
||||
if (this.pageForm.timeSwitch === true) {
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
} else {
|
||||
this.timeList = [{
|
||||
text: moment(this.time).format('YYYY-MM'),
|
||||
value: moment(this.time).format('YYYY-MM')
|
||||
}]
|
||||
}
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$refs.item.toggle()
|
||||
this.doSearch()
|
||||
},
|
||||
timeFormatter(type, val) {
|
||||
if (type === 'year') {
|
||||
return val + `年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return val + `月`;
|
||||
}
|
||||
return val;
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post(loc() + '/pageData', this.pageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
if (this.tableData.length === res.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$set(this.pageForm, "timeSwitch", true)
|
||||
this.onLoad()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,249 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar title="我的申请" placeholder fixed></van-nav-bar>
|
||||
|
||||
<van-form ref="form" @submit="doSubmit" validate-trigger="onSubmit"
|
||||
class="mt5"
|
||||
scroll-to-error
|
||||
input-align="right"
|
||||
:show-error-message="false">
|
||||
<van-cell-group inset>
|
||||
|
||||
<van-field label="联系电话" v-model="formData.mobile" type="tel" placeholder="请填写联系电话查询"
|
||||
left-icon="phone-o"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写联系电话' }]"></van-field>
|
||||
<van-field label="身份证号" v-model="formData.idCard" placeholder="请填写身份证号查询"
|
||||
left-icon="notes-o"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写身份证号' }]"></van-field>
|
||||
|
||||
</van-cell-group>
|
||||
<div style="margin: 20px 20px 10px;">
|
||||
<van-button native-type="submit" style="border-radius: 10px" block type="info"
|
||||
:color="themeColor">
|
||||
查 询
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
|
||||
<van-popup v-model="userShow" position="right" :style="{ height: '100%', width: '100%' }">
|
||||
|
||||
<van-nav-bar title="我的申请信息" left-arrow placeholder fixed
|
||||
@click-left="userShow=false"></van-nav-bar>
|
||||
|
||||
|
||||
<div style="min-height: 100vh; background-color: #f9f9f9; display: block;">
|
||||
<van-list :finished="finished"
|
||||
:finished-text="applyDataList.length>0?'没有更多了':''">
|
||||
|
||||
<div class="van-doc-card" v-for="o in applyDataList">
|
||||
<div>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">申请人姓名:</span>
|
||||
<span>{{o.applyUserName}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">供应商名称:</span>
|
||||
<span>{{o.userName}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<!-- <van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">性别:</span>
|
||||
<span>{{o.sex}}</span>
|
||||
</van-col>
|
||||
</van-row>-->
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">联系电话:</span>
|
||||
<span>{{o.mobile}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">身份证号:</span>
|
||||
<span>{{o.idCard}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">申请模式:</span>
|
||||
<span>{{o.applyModel===1?'福利':'疗休养'}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.applyModel===1">
|
||||
<van-col span="24">
|
||||
<span style="color: grey; float: left">申请添加的福利项目:</span>
|
||||
<span>{{o.projectNames}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
|
||||
<van-row>
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核状态:</span>
|
||||
<span v-if="o.auditState===1"
|
||||
style="color: #e6a23c">待审核</span>
|
||||
<span v-if="o.auditState==3" style="color: #67c23a">审核通过</span>
|
||||
<span v-if="o.auditState==2" style="color: #f56c6c">审核不通过</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.auditState !== 1">
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核时间:</span>
|
||||
<span>{{o.auditTime}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<van-row v-if="o.auditState !== 1">
|
||||
<van-col span="24">
|
||||
<span style="color: grey">审核意见:</span>
|
||||
<span>{{o.auditOpinion?o.auditOpinion:'暂无'}}</span>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 4px">
|
||||
<div v-if="o.auditState === 1">
|
||||
<van-button @click.stop="openEdit(o)" class="cus_button"
|
||||
type="primary" size="small" color="#1867b0"
|
||||
style="margin-right: 8px; width: auto;">编  辑
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</div>
|
||||
|
||||
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-tabbar v-model="active">
|
||||
<van-tabbar-item icon="user-circle-o" @click="clickTabbar('/mobile/self/applyUser')">申请账号
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="friends-o" replace
|
||||
@click="clickTabbar('/mobile/self/applyUser/list')">
|
||||
我的申请
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
currentDate: "",
|
||||
userShow: false,
|
||||
active: 1,
|
||||
applyDataList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickTabbar(val) {
|
||||
location.replace(val + "?currentDate=" + this.currentDate)
|
||||
},
|
||||
openEdit(o) {
|
||||
location.replace("/mobile/self/applyUser?id=" + o.id)
|
||||
},
|
||||
async getApplyData() {
|
||||
const resp = await $.post("/mobile/self/applyUser/getApplyData", {
|
||||
mobile: this.formData.mobile,
|
||||
idCard: this.formData.idCard
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.applyDataList = resp.data
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
await this.getApplyData()
|
||||
if (this.applyDataList && this.applyDataList.length > 0) {
|
||||
this.userShow = true
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
message: '暂时无法查询到您申请的信息',
|
||||
}).then(() => {
|
||||
// on close
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.currentDate = GetQueryString("currentDate")
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
.van-doc-card {
|
||||
margin: 0px 14px 14px 14px;
|
||||
padding: 12px 12px 12px 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.van-list {
|
||||
padding-top: 14px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.title_span {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: -1px;
|
||||
top: 11px;
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.van-row div {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.cus_button {
|
||||
border-top-right-radius: 16px;
|
||||
border-bottom-left-radius: 16px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,113 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<script src="${base!}/assets/platform/js/jquery.qrcode.min.js"></script>
|
||||
|
||||
<script src="${base!}/assets/platform/js/jr-qrcode.js"></script>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar
|
||||
title="申请二维码"
|
||||
left-arrow
|
||||
placeholder
|
||||
fixed
|
||||
@click-left="history.go(-1)"
|
||||
safe-area-inset-top
|
||||
></van-nav-bar>
|
||||
|
||||
<div style="width: 100%;position: fixed;top: 50%;transform: translateY(-50%);">
|
||||
<div id="qrcode" style="width: 70%;left: 0;right: 0;margin: auto"></div>
|
||||
<van-cell class="mt10">
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" name="clock" color="red"></van-icon>
|
||||
</template>
|
||||
<template #title>
|
||||
<div style="font-weight: bold;font-size: 15px">二维码有效期截止时间</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="二维码有效期截止时间" is-link :value="dateTimeValue"
|
||||
@click="openDateTime"></van-cell>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<van-popup v-model="dateTimeShow" position="bottom" :style="{ height: '50%' }">
|
||||
<van-datetime-picker
|
||||
class="mt10"
|
||||
v-model="currentDate"
|
||||
type="datehour"
|
||||
title="选择完整时间"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@cancel="dateTimeShow = false"
|
||||
@confirm="confirm"
|
||||
:formatter="formatter"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
minDate: new Date(),
|
||||
maxDate: new Date(2025, 10, 1),
|
||||
currentDate: new Date(new Date().getTime() + 60 * 60 * 1000),
|
||||
dateTimeShow: false,
|
||||
dateTime: '',
|
||||
dateTimeValue: moment(new Date(new Date().getTime() + 60 * 60 * 1000)).format('YYYY-MM-DD HH')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatter(type, val) {
|
||||
if (type === 'year') {
|
||||
return val + '年';
|
||||
}
|
||||
if (type === 'month') {
|
||||
return val + '月';
|
||||
}
|
||||
if (type === 'day') {
|
||||
return val + '日';
|
||||
}
|
||||
if (type === 'hour') {
|
||||
return val + '时';
|
||||
}
|
||||
return val;
|
||||
},
|
||||
confirm(val) {
|
||||
this.initQrcode();
|
||||
this.dateTimeShow = false
|
||||
this.dateTimeValue = moment(val).format('YYYY-MM-DD HH')
|
||||
},
|
||||
openDateTime() {
|
||||
this.dateTimeShow = true
|
||||
},
|
||||
initQrcode() {
|
||||
this.$nextTick(() => {
|
||||
$("#qrcode").html("")
|
||||
$("#qrcode").qrcode({ //设置css
|
||||
render: "canvas", //二维码的生成方式
|
||||
width: $("#qrcode").width(), //生成二维码的宽度
|
||||
height: $("#qrcode").width(), //生成二维码的高度
|
||||
text: APP_DOMAIN + "/mobile/self/applyUser?currentDate=" + this.currentDate.valueOf(),
|
||||
correctLevel: 3 //容错级别,默认为2,最高为3,为了让用户扫码最快,容错级别应当设为最低
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.initQrcode();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user