This commit is contained in:
yuanteng 2024-11-06 01:14:31 +08:00
commit 10d80f09b9

View File

@ -1,10 +1,10 @@
<template> <template>
<div> <div>
<el-input style="width: 200px; height: 30px; margin-right: 10px;" suffix-icon="Search" placeholder="请输入订单编号" <el-input style="width: 200px; height: 30px; margin-right: 10px;" suffix-icon="Search" placeholder="请输入订单编号"
v-model="name"></el-input> v-model="name"></el-input>
<el-button class="ml-5" type="primary" @click="load" style="height: 25px;">搜索</el-button> <el-button class="ml-5" type="primary" @click="load" style="height: 25px;">搜索</el-button>
<el-button type="warning" @click="reset" style="height:25px">重置</el-button> <el-button type="warning" @click="reset" style="height:25px">重置</el-button>
</div> </div>
<div style="margin: 15px 0"> <div style="margin: 15px 0">
<el-popconfirm class="ml-5" confirm-button-text='确定' cancel-button-text='取消' icon="InfoFilled" icon-color="red" <el-popconfirm class="ml-5" confirm-button-text='确定' cancel-button-text='取消' icon="InfoFilled" icon-color="red"
title="您确定批量删除这些数据吗?" @confirm="delBatch" width=180> title="您确定批量删除这些数据吗?" @confirm="delBatch" width=180>
@ -117,41 +117,41 @@
</div> </div>
</template> </template>
</el-dialog> --> </el-dialog> -->
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {onMounted, ref} from "vue"; import {onMounted, ref} from "vue";
import myAxios from "@/api/myAxios"; import myAxios from "@/api/myAxios";
import {ElMessage} from "element-plus"; import {ElMessage} from "element-plus";
const tableData : any= ref([]); // const tableData : any= ref([]); //
const total = ref(0); const total = ref(0);
const title = ref('') const title = ref('')
const editForm : any = ref({}); const editForm : any = ref({});
const DialogVisible = ref(true); const DialogVisible = ref(true);
const name =ref('') const name =ref('')
const searchParams: any = ref({ // const searchParams: any = ref({ //
current: 1, // current: 1, //
pageSize: 5 // pageSize: 5 //
}) })
const num = ref(0) const num = ref(0)
const orderDetail : any = ref([]) // const orderDetail : any = ref([]) //
// //
const orderList = ref([{}]) const orderList = ref([{}])
onMounted(()=>{ onMounted(()=>{
getOrderList() // getOrderList() //
}) })
const handleSizeChange = (newSize: any) => { const handleSizeChange = (newSize: any) => {
searchParams.value.pageSize = newSize // searchParams.value.pageSize = newSize //
getOrderList() getOrderList()
} }
const handleCurrentChange = (Current: any) => { const handleCurrentChange = (Current: any) => {
searchParams.value.current = Current searchParams.value.current = Current
getOrderList() getOrderList()
} }
const handleSelectionChange = (row: any) => { const handleSelectionChange = (row: any) => {
// id.value = JSON.parse(JSON.stringify(row)); // id.value = JSON.parse(JSON.stringify(row));
} }
const getOrderList = async () => { const getOrderList = async () => {
try { try {
const res = await myAxios.post('/order/list/page', { ...searchParams.value}); const res = await myAxios.post('/order/list/page', { ...searchParams.value});
console.log('订单信息--->',res.data); console.log('订单信息--->',res.data);
@ -182,16 +182,16 @@ const getOrderList = async () => {
message: '发生错误', message: '发生错误',
}); });
} }
} }
const delBatch =()=>{ const delBatch =()=>{
// //
} }
const showDetail = (index: number, row: any , flag : number) => { const showDetail = (index: number, row: any , flag : number) => {
title.value = "订单详情" title.value = "订单详情"
DialogVisible.value = true; DialogVisible.value = true;
editForm.value = row; editForm.value = row;
}; };
const deleteProduct = async (index: number) => { const deleteProduct = async (index: number) => {
// console.log(typeof index) // console.log(typeof index)
const res = await myAxios.post('/goods/delete', { id: index }) const res = await myAxios.post('/goods/delete', { id: index })
console.log(res) console.log(res)
@ -202,14 +202,15 @@ const deleteProduct = async (index: number) => {
}) })
getOrderList() getOrderList()
} }
} }
const reset = () => { const reset = () => {
name.value = ''; name.value = '';
}; };
const load =()=>{} const load =()=>{}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style>
</style>