移动端返回

This commit is contained in:
Paidax
2025-04-03 17:51:01 +08:00
parent 45a16bf564
commit 3a2f108c42
74 changed files with 2859 additions and 3654 deletions
@@ -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;">审&emsp;&emsp;核
<van-button
@click.stop="openSubmit(o)"
class="cus_button"
type="primary"
size="small"
color="#1867b0"
style="margin-right: 8px; width: auto"
>
审&emsp;&emsp;核
</van-button>
</div>
<div>
<van-button @click.stop="doDelete(o)" class="cus_button"
type="danger" size="small"
style="margin-right: 8px; width: auto;">删&emsp;&emsp;除
<van-button
@click.stop="doDelete(o)"
class="cus_button"
type="danger"
size="small"
style="margin-right: 8px; width: auto"
>
删&emsp;&emsp;除
</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>
<!--#
}
#-->