变更
This commit is contained in:
parent
f172751e31
commit
b667d74070
|
@ -133,7 +133,7 @@
|
||||||
current: 1, //当前页码
|
current: 1, //当前页码
|
||||||
pageSize: 5 //每页显示条数
|
pageSize: 5 //每页显示条数
|
||||||
})
|
})
|
||||||
const num = ref(0)
|
|
||||||
const orderDetail : any = ref([]) //订单中的商品明细,多个商品
|
const orderDetail : any = ref([]) //订单中的商品明细,多个商品
|
||||||
//订单列表
|
//订单列表
|
||||||
const orderList = ref([{}])
|
const orderList = ref([{}])
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
:header-cell-style="{ 'text-align': 'center' }">
|
:header-cell-style="{ 'text-align': 'center' }">
|
||||||
<el-table-column type="selection" width="55"></el-table-column>
|
<el-table-column type="selection" width="55"></el-table-column>
|
||||||
<el-table-column prop="id" label="订单id" width="80"></el-table-column>
|
<el-table-column prop="id" label="订单id" width="80"></el-table-column>
|
||||||
<el-table-column prop="goodSnapshot.name" label="商品名称"></el-table-column>
|
<el-table-column prop="name" label="商品名称"></el-table-column>
|
||||||
<el-table-column prop="quantity" label="购买数量" width="180"></el-table-column>
|
<el-table-column prop="quantity" label="购买数量" width="180"></el-table-column>
|
||||||
<el-table-column prop="totalAmount" label="订单总金额"></el-table-column>
|
<el-table-column prop="totalAmount" label="订单总金额"></el-table-column>
|
||||||
<el-table-column prop="createTime" label="下单时间"></el-table-column>
|
<el-table-column prop="createTime" label="下单时间"></el-table-column>
|
||||||
|
@ -28,9 +28,9 @@
|
||||||
<el-table-column prop="orderStatus" label="订单状态"></el-table-column>
|
<el-table-column prop="orderStatus" label="订单状态"></el-table-column>
|
||||||
<el-table-column label="操作" width="250px">
|
<el-table-column label="操作" width="250px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" @click="ReviseOrView(scope.$index, scope.row , 0)">
|
<!-- <el-button size="small" @click="ReviseOrView(scope.$index, scope.row , 0)">-->
|
||||||
编辑
|
<!-- 编辑-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<el-button plain @click="dialogFormVisible = true">
|
<el-button plain @click="dialogFormVisible = true">
|
||||||
发货
|
发货
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -52,21 +52,21 @@
|
||||||
:small="null" :disabled="null" :background="null" layout="total, sizes, prev, pager, next, jumper"
|
:small="null" :disabled="null" :background="null" layout="total, sizes, prev, pager, next, jumper"
|
||||||
:total="total" />
|
:total="total" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-dialog v-model="dialogFormVisible" title="Shipping address" width="500">-->
|
<el-dialog v-model="dialogFormVisible" title="订单号" width="500">
|
||||||
<!-- <el-form :model="">-->
|
<el-form label-position="100px" size="default">
|
||||||
<!-- <el-form-item label="快递单号" :label-width="formLabelWidth">-->
|
<el-form-item label="快递单号" >
|
||||||
<!-- <el-input v-model=" " autocomplete="off" />-->
|
<el-input v-model="tableData.orderNumber" autocomplete="off" />
|
||||||
<!-- </el-form-item>-->
|
</el-form-item>
|
||||||
<!-- </el-form>-->
|
</el-form>
|
||||||
<!-- <template #footer>-->
|
<template #footer>
|
||||||
<!-- <div class="dialog-footer">-->
|
<div class="dialog-footer">
|
||||||
<!-- <el-button @click="dialogFormVisible = false">取消</el-button>-->
|
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||||
<!-- <el-button type="primary" @click="dialogFormVisible = false">-->
|
<el-button type="primary" @click="dialogFormVisible = false">
|
||||||
<!-- 确定-->
|
确定
|
||||||
<!-- </el-button>-->
|
</el-button>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<!-- </template>-->
|
</template>
|
||||||
<!-- </el-dialog>-->
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -76,6 +76,11 @@
|
||||||
const tableData : any= ref([]);
|
const tableData : any= ref([]);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const num = ref(0)
|
const num = ref(0)
|
||||||
|
const order = ref(
|
||||||
|
{
|
||||||
|
orderNumber:0,
|
||||||
|
}
|
||||||
|
)
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const formLabelWidth = '140px'
|
const formLabelWidth = '140px'
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
|
@ -100,21 +105,21 @@
|
||||||
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)
|
console.log(res.data.data)
|
||||||
if (res.data.code === 1) {
|
if (res.data.code === 1) {
|
||||||
tableData.value = res.data.data.records
|
tableData.value = res.data.data
|
||||||
total.value = parseInt(res.data.data.total)
|
total.value = parseInt(res.data.data.total)
|
||||||
for(let key in tableData.value) {
|
// for(let key in tableData.value) {
|
||||||
num.value = parseInt(key)
|
// num.value = parseInt(key)
|
||||||
const resOrderDetail = await myAxios.post('/order/list/item',{id:tableData.value[key].id})
|
// const resOrderDetail = await myAxios.post('/order/list/item',{id:tableData.value[key].id})
|
||||||
if( resOrderDetail.data.code === 1 ) {
|
// if( resOrderDetail.data.code === 1 ) {
|
||||||
tableData.value.goodSnapshot= resOrderDetail.data.data[key].goodSnapshot
|
// tableData.value.goodSnapshot= resOrderDetail.data.data[key].goodSnapshot
|
||||||
tableData.value.quantity = resOrderDetail.data.data[key].quality
|
// tableData.value.quantity = resOrderDetail.data.data[key].quality
|
||||||
// console.log(resOrderDetail.data.data[0].goodSnapshot.name)
|
// // console.log(resOrderDetail.data.data[0].goodSnapshot.name)
|
||||||
console.log( tableData.value.goodSnapshot.name)
|
// console.log( tableData.value.goodSnapshot.name)
|
||||||
console.log( resOrderDetail.data.data[key].quantity)
|
// console.log( resOrderDetail.data.data[key].quantity)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '获取数据失败',
|
message: '获取数据失败',
|
||||||
|
@ -126,26 +131,25 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const setNumber =async ()=>{
|
||||||
|
const values = Object.values(order.value);
|
||||||
// const getItemList = async (id: number) => {
|
if (values.some(value => value === null || value === undefined )) {
|
||||||
// try {
|
ElMessage({
|
||||||
// const res = await myAxios.post('/order/list/item', { id:tableData.value[key].id});
|
type: 'warning',
|
||||||
// console.log(res)
|
message: '请检查表单数据是否完整填写'
|
||||||
// if (res.data.code === 1) {
|
});
|
||||||
// tableData.value = res.data.data.records;
|
return;
|
||||||
// total.value = parseInt(res.data.data.total)
|
}
|
||||||
// } else {
|
const res = await myAxios.post('/order/list/page', { ...tableData.value.orderNumber});
|
||||||
// ElMessage({
|
if (res.data.code === 1) {
|
||||||
// message: '获取数据失败',
|
ElMessage({
|
||||||
// });
|
type: 'success',
|
||||||
// }
|
message: "提交成功"
|
||||||
// } catch (error) {
|
});
|
||||||
// ElMessage({
|
} else {
|
||||||
// message: '发生错误',
|
ElMessage.error("服务错误");
|
||||||
// });
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// const orderList = ref({
|
// const orderList = ref({
|
||||||
// id:'',
|
// id:'',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user