1
This commit is contained in:
commit
10d80f09b9
|
@ -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>
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user