update
parent
7ea38af6f6
commit
d3a375a9d5
|
@ -35,11 +35,11 @@ const router = createRouter({
|
|||
}
|
||||
},
|
||||
{
|
||||
path: '/ceshi',
|
||||
component: () => import('../views/ceshi.vue'),
|
||||
path: '/order',
|
||||
component: () => import('../views/order.vue'),
|
||||
meta: {
|
||||
comp: 'ceshi',
|
||||
name: '测试'
|
||||
comp: 'order',
|
||||
name: '订单管理'
|
||||
}
|
||||
},
|
||||
]
|
||||
|
|
|
@ -94,12 +94,12 @@ export const create_payorder = async (params: Object)=>{
|
|||
}
|
||||
|
||||
/**
|
||||
* @title 系统开放
|
||||
* @title 订单列表
|
||||
*/
|
||||
export const id_card = async (params: Object)=>{
|
||||
export const orderList = async (params: Object)=>{
|
||||
return POST(
|
||||
{
|
||||
url: "/open/api/ocr/id_card",
|
||||
url: "/api/user/payorder/list",
|
||||
params
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,128 +0,0 @@
|
|||
<template>
|
||||
<div class="tooltip-base-box">
|
||||
<div class="row center">
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Top Left prompts info"
|
||||
placement="top-start"
|
||||
>
|
||||
<el-button>top-start</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Top Center prompts info"
|
||||
placement="top"
|
||||
>
|
||||
<el-button>top</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Top Right prompts info"
|
||||
placement="top-end"
|
||||
>
|
||||
<el-button>top-end</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Left Top prompts info"
|
||||
placement="left-start"
|
||||
>
|
||||
<el-button>left-start</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Right Top prompts info"
|
||||
placement="right-start"
|
||||
>
|
||||
<el-button>right-start</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Left Center prompts info"
|
||||
placement="left"
|
||||
>
|
||||
<el-button class="mt-3 mb-3">left</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Right Center prompts info"
|
||||
placement="right"
|
||||
>
|
||||
<el-button>right</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Left Bottom prompts info"
|
||||
placement="left-end"
|
||||
>
|
||||
<el-button>left-end</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Right Bottom prompts info"
|
||||
placement="right-end"
|
||||
>
|
||||
<el-button>right-end</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="row center">
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Bottom Left prompts info"
|
||||
placement="bottom-start"
|
||||
>
|
||||
<el-button>bottom-start</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Bottom Center prompts info"
|
||||
placement="bottom"
|
||||
>
|
||||
<el-button>bottom</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="Bottom Right prompts info"
|
||||
placement="bottom-end"
|
||||
>
|
||||
<el-button>bottom-end</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.tooltip-base-box {
|
||||
width: 100%;
|
||||
}
|
||||
.tooltip-base-box .row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.tooltip-base-box .center {
|
||||
justify-content: center;
|
||||
}
|
||||
.tooltip-base-box .box-item {
|
||||
width: 110px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
|
@ -26,8 +26,6 @@
|
|||
</div>
|
||||
<div class="f14 white" v-if="!isCollapse">
|
||||
<div>管理员</div>
|
||||
<div>(总经理)</div>
|
||||
<div>17584958214</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-menu
|
||||
|
@ -94,9 +92,9 @@
|
|||
</div>
|
||||
<div class="flex">
|
||||
<div class="header_info">
|
||||
<div class="flex" @click="state.userVisible = true">
|
||||
<!-- <div class="flex" @click="state.userVisible = true">
|
||||
<el-icon size="20"><EditPen /></el-icon>修改密码
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="flex ml20" @click="loginOut">
|
||||
<el-icon size="20"><SwitchButton /></el-icon>退出
|
||||
</div>
|
||||
|
@ -207,11 +205,11 @@ import { useRouter } from "vue-router";
|
|||
import type { FormInstance, FormRules } from "element-plus";
|
||||
import index from "./index.vue";
|
||||
import about from "./about.vue";
|
||||
import ceshi from "./ceshi.vue";
|
||||
import order from "./order.vue";
|
||||
|
||||
const { appContext } = getCurrentInstance();
|
||||
const dom = shallowRef({
|
||||
ceshi,
|
||||
order,
|
||||
about,
|
||||
index,
|
||||
});
|
||||
|
@ -249,15 +247,15 @@ const state = reactive({
|
|||
browserUrl: "about",
|
||||
children: [],
|
||||
icon: "fa fa-link",
|
||||
name: "关于",
|
||||
name: "产品",
|
||||
},
|
||||
{
|
||||
action: "ceshi",
|
||||
action: "order",
|
||||
appIcon: null,
|
||||
browserUrl: "ceshi",
|
||||
browserUrl: "order",
|
||||
children: [],
|
||||
icon: "fa fa-link",
|
||||
name: "测试",
|
||||
name: "订单管理",
|
||||
},
|
||||
] as any,
|
||||
});
|
||||
|
|
|
@ -1,31 +1,24 @@
|
|||
<template>
|
||||
<el-form>
|
||||
<!-- <el-form>
|
||||
<el-form-item>
|
||||
<el-button type="primary">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form> -->
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column align="center" fixed prop="tenant_name" label="租户昵称" />
|
||||
<el-table-column align="center" fixed prop="tenant_name" label="租户昵称" />
|
||||
<el-table-column align="center" prop="account" label="账号" width="220" />
|
||||
<el-table-column align="center" prop="enable" label="是否开启" width="120" />
|
||||
<el-table-column align="center" prop="created_at" label="创建时间" width="220" />
|
||||
<el-table-column align="center" fixed="right" label="操作" width="120">
|
||||
<!-- <el-table-column align="center" fixed="right" label="操作" width="120">
|
||||
<template #default="scope">
|
||||
<el-button @click="update(scope.row)" link type="primary" size="small">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<div class="flex-c-c mt20">
|
||||
<el-pagination
|
||||
v-model:current-page="page"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[100, 200, 300, 400]"
|
||||
layout=" prev, pager, next"
|
||||
:total="count"
|
||||
background
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
<el-pagination v-model:current-page="page" v-model:page-size="pageSize" :page-sizes="[100, 200, 300, 400]"
|
||||
layout=" prev, pager, next" :total="count" background
|
||||
@current-change="handleCurrentChange" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -54,12 +47,9 @@ onMounted(async () => {
|
|||
const page = ref(1)
|
||||
const pageSize = ref(20)
|
||||
|
||||
const handleSizeChange = (val: number) => {
|
||||
console.log(`${val} items per page`)
|
||||
}
|
||||
|
||||
const handleCurrentChange = (val: number) => {
|
||||
page.value=val
|
||||
page.value = val
|
||||
getList()
|
||||
}
|
||||
|
||||
|
@ -77,7 +67,7 @@ const getList = async () => {
|
|||
page: page.value,
|
||||
size: pageSize.value,
|
||||
}
|
||||
const { code, body:{records,total} } = await tenantList(params)
|
||||
const { code, body: { records, total } } = await tenantList(params)
|
||||
if (code == 200) {
|
||||
tableData.value = records
|
||||
count.value = total
|
||||
|
@ -89,7 +79,7 @@ const getList = async () => {
|
|||
*/
|
||||
const regesiter = async (params: Object) => {
|
||||
const { code } = await tenantRegister(formData)
|
||||
if(code==200){
|
||||
if (code == 200) {
|
||||
ElMessage.success("成功!")
|
||||
|
||||
}
|
||||
|
@ -99,22 +89,28 @@ const regesiter = async (params: Object) => {
|
|||
* @title 修改租户
|
||||
*/
|
||||
|
||||
const update = async ()=>{
|
||||
console.log(formData);
|
||||
const update = async (row) => {
|
||||
console.log(row);
|
||||
const params = {
|
||||
tenant_name: "",
|
||||
enable: "",
|
||||
password: ""
|
||||
}
|
||||
return
|
||||
const {code} = await tenantUpdate(formData)
|
||||
if(code==200){
|
||||
const { code } = await tenantUpdate(formData)
|
||||
if (code == 200) {
|
||||
ElMessage.success("修改成功!")
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.flex-c-c{
|
||||
<style scoped>
|
||||
.flex-c-c {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.mt20{
|
||||
|
||||
.mt20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
|
@ -19,13 +19,8 @@
|
|||
<div style="color: #606266; font-size: 14px">忘记密码?</div>
|
||||
</div>
|
||||
<div class="flex-c mt30">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="submitForm(ruleFormRef)"
|
||||
:loading="state.loading"
|
||||
style="width: 100%"
|
||||
>登录</el-button
|
||||
>
|
||||
<el-button type="primary" @click="submitForm(ruleFormRef)" :loading="state.loading"
|
||||
style="width: 100%">登录</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
@ -36,7 +31,7 @@ import { User, Lock } from "@element-plus/icons-vue";
|
|||
import { useRouter } from "vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
import { userLogin } from "@/utils/api.ts";
|
||||
import { userLogin } from "../utils/api";
|
||||
|
||||
const { appContext } = getCurrentInstance();
|
||||
|
||||
|
@ -66,9 +61,12 @@ const submitForm = async (formEl) => {
|
|||
} = await userLogin(ruleForm);
|
||||
if (code == 200) {
|
||||
localStorage.setItem("token", token);
|
||||
ElMessage.success("登录成功")
|
||||
setTimeout(()=>{
|
||||
router.push("/");
|
||||
},200)
|
||||
}
|
||||
ElMessage.success("登录成功")
|
||||
router.push("/");
|
||||
|
||||
} else {
|
||||
ElMessage.error("请完善信息")
|
||||
}
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
<template>
|
||||
<el-form inline>
|
||||
<el-form-item label="状态">
|
||||
<el-select v-model="status" placeholder="请选择" style="width: 240px">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getList()" type="primary">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column prop="out_trade_no" label="订单号" width="180" />
|
||||
<el-table-column prop="product_name" label="产品名" width="180" />
|
||||
<el-table-column prop="total_amount" label="价格" width="100">
|
||||
<template #default="scope">
|
||||
<div>{{ scope.row.total_amount }}元</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="创建时间" />
|
||||
<el-table-column prop="payment_time" label="支付时间" />
|
||||
<el-table-column label="状态">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.payment_status == 'Unpaid'" type="primary">未支付</el-tag>
|
||||
<el-tag v-if="scope.row.payment_status == 'Paid'" type="success">已支付</el-tag>
|
||||
<el-tag v-if="scope.row.payment_status == 'USERPAYING'" type="info">支付中</el-tag>
|
||||
<el-tag v-if="scope.row.payment_status == 'Refunded'" type="warning">已退款</el-tag>
|
||||
<el-tag v-if="scope.row.payment_status == 'Close'" type="warning">已关闭</el-tag>
|
||||
<el-tag v-if="scope.row.payment_status == 'Failed' || scope.row.payment_status == 'REVOKED'"
|
||||
type="danger">支付失败</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<div class="flex-c-c mt20">
|
||||
<el-pagination v-model:current-page="page" v-model:page-size="pageSize" layout=" prev, pager, next" :total="count"
|
||||
background @current-change="handleCurrentChange" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { orderList } from "@/utils/api.ts"
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
const tableData = ref([])
|
||||
const count = ref(0)
|
||||
const page = ref(1)
|
||||
const pageSize = ref(20)
|
||||
const status = ref("")
|
||||
|
||||
const options = [
|
||||
{
|
||||
label: "全部",
|
||||
value: "0"
|
||||
}, {
|
||||
label: "未支付",
|
||||
value: "Unpaid"
|
||||
},
|
||||
{
|
||||
label: "已支付",
|
||||
value: "Paid"
|
||||
},
|
||||
{
|
||||
label: "支付失败",
|
||||
value: "PAYERROR"
|
||||
},
|
||||
{
|
||||
label: "已退款",
|
||||
value: "Refunded"
|
||||
},
|
||||
{
|
||||
label: "已关闭",
|
||||
value: "Close"
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
const handleCurrentChange = (val: number) => {
|
||||
page.value = val
|
||||
getList()
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 获取订单列表
|
||||
*/
|
||||
const getList = async () => {
|
||||
const params = {
|
||||
page: 1,
|
||||
size: 20,
|
||||
}
|
||||
if (status.value&&status.value!='0') {
|
||||
params.payment_status = status.value
|
||||
}
|
||||
const { code, body: { records, total } } = await orderList(params)
|
||||
if (code == 200) {
|
||||
tableData.value = records
|
||||
count.value = total
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.flex-c-c {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mt20 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
|
@ -18,7 +18,7 @@ export default defineConfig({
|
|||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8080',
|
||||
target: 'https://sh-ocr-api.bskies.cc/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue