移动端返回
This commit is contained in:
@@ -163,64 +163,44 @@ layout("/mobile/platform.html"){
|
||||
</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>
|
||||
<van-nav-bar title="申请账号审核" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')" 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>
|
||||
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>
|
||||
<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
|
||||
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 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-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">
|
||||
|
||||
<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">
|
||||
@@ -267,8 +247,7 @@ layout("/mobile/platform.html"){
|
||||
<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===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>
|
||||
@@ -289,58 +268,57 @@ layout("/mobile/platform.html"){
|
||||
|
||||
<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
|
||||
@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
|
||||
@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>
|
||||
<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>
|
||||
<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
|
||||
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',
|
||||
el: "#app",
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
@@ -349,43 +327,40 @@ layout("/mobile/platform.html"){
|
||||
auditState: 1
|
||||
},
|
||||
stateOption: [
|
||||
{text: '未审核', value: 1},
|
||||
{text: '审核未通过', value: 2},
|
||||
{text: '审核通过', value: 3},
|
||||
{ text: "未审核", value: 1 },
|
||||
{ text: "审核未通过", value: 2 },
|
||||
{ text: "审核通过", value: 3 }
|
||||
],
|
||||
time: new Date(),
|
||||
show: false,
|
||||
timeList: [],
|
||||
info: {},
|
||||
info: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doDelete(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确认要删除吗?',
|
||||
title: "温馨提示",
|
||||
message: "确认要删除吗?"
|
||||
})
|
||||
.then(async () => {
|
||||
const resp = await $.post(loc() + "/doDelete", {id: o.id})
|
||||
const resp = await $.post(loc() + "/doDelete", { id: o.id })
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('删除成功');
|
||||
vant.Toast.success("删除成功")
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Toast.fail('删除失败');
|
||||
vant.Toast.fail("删除失败")
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
});
|
||||
|
||||
.catch(() => {})
|
||||
},
|
||||
async doSubmit() {
|
||||
const resp = await $.post(loc() + "/doSubmit", this.info)
|
||||
if (resp.code === 0) {
|
||||
vant.Toast.success('审核成功');
|
||||
vant.Toast.success("审核成功")
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Toast.fail('审核失败');
|
||||
vant.Toast.fail("审核失败")
|
||||
}
|
||||
},
|
||||
openSubmit(o) {
|
||||
@@ -395,29 +370,31 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
onConfirm() {
|
||||
if (this.pageForm.timeSwitch === true) {
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
this.timeList = [{ text: "全部", value: "全部" }]
|
||||
} else {
|
||||
this.timeList = [{
|
||||
text: moment(this.time).format('YYYY-MM'),
|
||||
value: moment(this.time).format('YYYY-MM')
|
||||
}]
|
||||
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 === "year") {
|
||||
return val + `年`
|
||||
}
|
||||
if (type === 'month') {
|
||||
return val + `月`;
|
||||
if (type === "month") {
|
||||
return val + `月`
|
||||
}
|
||||
return val;
|
||||
return val
|
||||
},
|
||||
async onLoad() {
|
||||
this.loading = true
|
||||
$.post(loc() + '/pageData', this.pageForm).then(res => {
|
||||
$.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) {
|
||||
@@ -428,10 +405,10 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.timeList = [{text: '全部', value: '全部'}]
|
||||
this.timeList = [{ text: "全部", value: "全部" }]
|
||||
this.$set(this.pageForm, "time", this.timeList[0].value)
|
||||
this.$set(this.pageForm, "timeSwitch", true)
|
||||
this.onLoad()
|
||||
@@ -439,7 +416,6 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
@@ -6,53 +6,40 @@ layout("/mobile/platform.html"){
|
||||
|
||||
<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>
|
||||
<van-nav-bar title="申请二维码" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')" 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>
|
||||
<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>
|
||||
<div style="font-weight: bold; font-size: 15px">二维码有效期截止时间</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="二维码有效期截止时间" is-link :value="dateTimeValue"
|
||||
@click="openDateTime"></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"
|
||||
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',
|
||||
el: "#app",
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
@@ -60,30 +47,30 @@ layout("/mobile/platform.html"){
|
||||
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')
|
||||
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 === "year") {
|
||||
return val + "年"
|
||||
}
|
||||
if (type === 'month') {
|
||||
return val + '月';
|
||||
if (type === "month") {
|
||||
return val + "月"
|
||||
}
|
||||
if (type === 'day') {
|
||||
return val + '日';
|
||||
if (type === "day") {
|
||||
return val + "日"
|
||||
}
|
||||
if (type === 'hour') {
|
||||
return val + '时';
|
||||
if (type === "hour") {
|
||||
return val + "时"
|
||||
}
|
||||
return val;
|
||||
return val
|
||||
},
|
||||
confirm(val) {
|
||||
this.initQrcode();
|
||||
this.initQrcode()
|
||||
this.dateTimeShow = false
|
||||
this.dateTimeValue = moment(val).format('YYYY-MM-DD HH')
|
||||
this.dateTimeValue = moment(val).format("YYYY-MM-DD HH")
|
||||
},
|
||||
openDateTime() {
|
||||
this.dateTimeShow = true
|
||||
@@ -91,23 +78,23 @@ layout("/mobile/platform.html"){
|
||||
initQrcode() {
|
||||
this.$nextTick(() => {
|
||||
$("#qrcode").html("")
|
||||
$("#qrcode").qrcode({ //设置css
|
||||
$("#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();
|
||||
this.initQrcode()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
Reference in New Issue
Block a user