feat: add removing order button in admin order list page

This commit is contained in:
RockYang
2024-03-03 19:27:22 +08:00
parent 3f856afec8
commit 33de83f2ac
4 changed files with 24 additions and 16 deletions

View File

@@ -249,7 +249,7 @@ import {
ArrowDown,
Check,
Close,
Delete, Document,
Delete,
Edit,
Plus,
Promotion,
@@ -259,15 +259,7 @@ import {
VideoPause
} from '@element-plus/icons-vue'
import 'highlight.js/styles/a11y-dark.css'
import {
dateFormat,
escapeHTML,
isMobile,
processContent,
randString,
removeArrayItem,
UUID
} from "@/utils/libs";
import {dateFormat, escapeHTML, isMobile, processContent, randString, removeArrayItem, UUID} from "@/utils/libs";
import {ElMessage, ElMessageBox} from "element-plus";
import hl from "highlight.js";
import {getSessionId, getUserToken, removeUserToken} from "@/store/session";
@@ -361,7 +353,7 @@ onMounted(() => {
notice.value = md.render(res.data['content'])
const oldNotice = localStorage.getItem(noticeKey.value);
// 如果公告有更新,则显示公告
if (oldNotice !== notice.value) {
if (oldNotice !== notice.value && notice.value.length > 10) {
showNotice.value = true
}
}).catch(e => {

View File

@@ -2,6 +2,14 @@
<div class="container order" v-loading="loading">
<div class="handle-box">
<el-input v-model="query.order_no" placeholder="订单号" class="handle-input mr10"></el-input>
<el-select v-model="query.status" placeholder="订单状态" style="width: 100px">
<el-option
v-for="item in orderStatus"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-date-picker
v-model="query.pay_time"
type="daterange"
@@ -74,11 +82,16 @@ import {Search} from "@element-plus/icons-vue";
// 变量定义
const items = ref([])
const query = ref({order_no: "", pay_time: []})
const query = ref({order_no: "", pay_time: [], status: -1})
const total = ref(0)
const page = ref(1)
const pageSize = ref(15)
const loading = ref(true)
const orderStatus = ref([
{value: -1, label: "全部"},
{value: 0, label: "未支付"},
{value: 2, label: "已支付"},
])
onMounted(() => {
fetchData()