2024-12-15 09:35:41 +00:00
|
|
|
<template>
|
2024-12-31 10:01:08 +00:00
|
|
|
<div style="height: calc(100vh - 200px)">
|
|
|
|
<obj-table-plus
|
|
|
|
ref="oTable"
|
|
|
|
style="height: 100%"
|
|
|
|
:tableCols="tableCols"
|
|
|
|
:tableProp="tableProp"
|
|
|
|
@query="queryList"
|
|
|
|
v-model="dataList"
|
|
|
|
:tableEvent="tableEvent"
|
|
|
|
:enableAutoQuery="false"
|
|
|
|
>
|
|
|
|
<template slot="tableTop">
|
|
|
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
2025-01-02 10:30:02 +00:00
|
|
|
<!-- <el-form-item label="订单号">
|
2024-12-31 10:01:08 +00:00
|
|
|
<el-select v-model="formInline.group" placeholder="请选择">
|
|
|
|
<el-option
|
|
|
|
v-for="item in statusList"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:value="item.value"
|
2024-12-15 09:35:41 +00:00
|
|
|
>
|
2024-12-31 10:01:08 +00:00
|
|
|
</el-option>
|
|
|
|
</el-select>
|
2025-01-02 10:30:02 +00:00
|
|
|
</el-form-item> -->
|
2024-12-31 10:01:08 +00:00
|
|
|
<el-form-item v-if="storeList.length > 1" label="摊铺">
|
|
|
|
<el-select
|
|
|
|
class="filter-item"
|
|
|
|
style="width: 200px"
|
|
|
|
v-model="formInline.shopId"
|
|
|
|
placeholder="请选择摊铺"
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
v-for="item in storeList"
|
|
|
|
:key="item.shopId"
|
|
|
|
:label="item.shopName"
|
|
|
|
:value="item.shopId"
|
2024-12-15 09:35:41 +00:00
|
|
|
>
|
2024-12-31 10:01:08 +00:00
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" @click="$refs.oTable.reload()"
|
|
|
|
>查询</el-button
|
|
|
|
>
|
|
|
|
<el-button type="primary" @click="Reset">重置</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
2025-01-02 10:30:02 +00:00
|
|
|
<el-tabs v-model="formInline.group" @tab-click="handleClick">
|
|
|
|
<el-tab-pane
|
|
|
|
v-for="item in statusList"
|
|
|
|
:key="item.value"
|
|
|
|
:label="item.label"
|
|
|
|
:name="item.value"
|
|
|
|
></el-tab-pane>
|
|
|
|
</el-tabs>
|
2024-12-31 10:01:08 +00:00
|
|
|
<!-- <div class="mb-2">
|
2024-12-15 09:35:41 +00:00
|
|
|
<el-button type="primary" size="small" @click="addProduct"
|
|
|
|
>批量导出</el-button
|
|
|
|
>
|
|
|
|
</div> -->
|
2024-12-31 10:01:08 +00:00
|
|
|
</template>
|
|
|
|
</obj-table-plus>
|
|
|
|
<!-- 订单详情 -->
|
|
|
|
<viewDetails ref="viewDetails"></viewDetails>
|
|
|
|
</div>
|
2024-12-15 09:35:41 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-12-27 10:03:02 +00:00
|
|
|
import viewDetails from "./popup/view-details.vue";
|
|
|
|
import content from "./popup/content.vue";
|
2024-12-15 09:35:41 +00:00
|
|
|
import { mapState } from "vuex";
|
|
|
|
export default {
|
2024-12-31 10:01:08 +00:00
|
|
|
components: { content, viewDetails },
|
2024-12-15 09:35:41 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2025-01-02 10:30:02 +00:00
|
|
|
activeName: "0",
|
2024-12-15 09:35:41 +00:00
|
|
|
value1: "1",
|
|
|
|
advanceSellStatus: "",
|
|
|
|
dataList: [],
|
|
|
|
formInline: {
|
2024-12-19 12:03:16 +00:00
|
|
|
group: "",
|
2024-12-15 09:35:41 +00:00
|
|
|
shopId: "",
|
|
|
|
},
|
|
|
|
tableProp: {
|
|
|
|
"auto-resize": true,
|
|
|
|
border: true,
|
|
|
|
height: "auto",
|
|
|
|
"row-id": "id",
|
|
|
|
"show-overflow": false,
|
|
|
|
},
|
|
|
|
statusList: [
|
|
|
|
{
|
2025-01-02 10:30:02 +00:00
|
|
|
label: "全部订单",
|
2024-12-15 09:35:41 +00:00
|
|
|
value: "0",
|
|
|
|
},
|
|
|
|
{
|
2025-01-02 10:30:02 +00:00
|
|
|
label: "待备货",
|
2024-12-15 09:35:41 +00:00
|
|
|
value: "1",
|
|
|
|
},
|
|
|
|
{
|
2025-01-02 10:30:02 +00:00
|
|
|
label: "待取货",
|
2024-12-15 09:35:41 +00:00
|
|
|
value: "2",
|
|
|
|
},
|
|
|
|
{
|
2025-01-02 10:30:02 +00:00
|
|
|
label: "待收货",
|
2024-12-15 09:35:41 +00:00
|
|
|
value: "3",
|
|
|
|
},
|
|
|
|
{
|
2025-01-02 10:30:02 +00:00
|
|
|
label: "已完成",
|
2024-12-19 12:03:16 +00:00
|
|
|
value: "4",
|
2024-12-15 09:35:41 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
productFilterType: "SALE",
|
|
|
|
selectList: [],
|
|
|
|
};
|
|
|
|
},
|
2024-12-19 12:03:16 +00:00
|
|
|
created() {
|
|
|
|
this.formInline = {
|
|
|
|
group: "0",
|
2025-01-02 10:30:02 +00:00
|
|
|
// marketId: this.marketId,
|
2024-12-19 12:03:16 +00:00
|
|
|
shopId: this.shopId,
|
|
|
|
};
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$refs.oTable.reload();
|
|
|
|
});
|
|
|
|
},
|
2024-12-15 09:35:41 +00:00
|
|
|
methods: {
|
|
|
|
// getData() {
|
|
|
|
// this.$api.mer_admin
|
|
|
|
// .storeList({ marketId: this.formInline.marketId })
|
|
|
|
// .then((res) => {
|
|
|
|
// this.storeList = res.data.data;
|
|
|
|
// this.formInline.shopId = res.data.data[0].shopId;
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
// this.$refs.oTable.reload();
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
addProduct() {
|
|
|
|
this.$refs.addOrUpdate.toggle().add();
|
|
|
|
},
|
|
|
|
deleteProduct() {
|
|
|
|
console.log(this.selectList);
|
|
|
|
let integers = this.selectList.map((item) => {
|
|
|
|
return item.id;
|
|
|
|
});
|
|
|
|
this.$confirm("此操作将删除该商品, 是否继续?", "提示", {
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning",
|
|
|
|
})
|
|
|
|
.then(() => {
|
|
|
|
console.log("111");
|
|
|
|
this.$api.mer_admin.BatchDeleteProducts(integers).then((res) => {
|
|
|
|
this.$refs.oTable.reload();
|
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
this.$message({
|
|
|
|
type: "info",
|
|
|
|
message: "已取消删除",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
queryList(pageNo, pageSize) {
|
2025-01-02 10:30:02 +00:00
|
|
|
//全部订单
|
|
|
|
// this.$api.mer_admin
|
|
|
|
// .orderPage({
|
|
|
|
// pageNumber: pageNo,
|
|
|
|
// pageSize: pageSize,
|
|
|
|
// ...this.formInline,
|
|
|
|
// })
|
|
|
|
// .then((res) => {
|
|
|
|
// console.log(res);
|
|
|
|
// this.$refs.oTable.complete(
|
|
|
|
// res.data.data.data,
|
|
|
|
// Number(res.data.data.total)
|
|
|
|
// );
|
|
|
|
// })
|
|
|
|
// .catch((err) => {
|
|
|
|
// this.$refs.oTable.complete(false);
|
|
|
|
// });
|
|
|
|
//根据店铺查询
|
2024-12-15 09:35:41 +00:00
|
|
|
this.$api.mer_admin
|
2025-01-02 10:30:02 +00:00
|
|
|
.shopOrderPage({
|
2024-12-15 09:35:41 +00:00
|
|
|
pageNumber: pageNo,
|
|
|
|
pageSize: pageSize,
|
2024-12-19 12:03:16 +00:00
|
|
|
...this.formInline,
|
2024-12-15 09:35:41 +00:00
|
|
|
})
|
|
|
|
.then((res) => {
|
|
|
|
console.log(res);
|
|
|
|
this.$refs.oTable.complete(
|
|
|
|
res.data.data.data,
|
|
|
|
Number(res.data.data.total)
|
|
|
|
);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
Reset() {
|
|
|
|
this.formInline = {
|
2024-12-19 12:03:16 +00:00
|
|
|
group: "0",
|
|
|
|
shopId: this.shopId,
|
2024-12-15 09:35:41 +00:00
|
|
|
};
|
|
|
|
this.$refs.oTable.reload();
|
|
|
|
},
|
|
|
|
handleClick(e) {
|
|
|
|
console.log(e.name);
|
|
|
|
if (e.name == "5") {
|
|
|
|
this.advanceSellStatus = "";
|
|
|
|
} else {
|
|
|
|
this.advanceSellStatus = e.name;
|
|
|
|
}
|
|
|
|
this.$refs.oTable.reload();
|
|
|
|
},
|
|
|
|
addEarlyWarning() {
|
|
|
|
this.$refs.earlyWarning.toggle().add();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
tableCols() {
|
|
|
|
return [
|
|
|
|
// { type: "checkbox", width: "60px", fixed: "left" },
|
|
|
|
{
|
2024-12-19 12:03:16 +00:00
|
|
|
type: "seq",
|
|
|
|
width: "60px",
|
|
|
|
fixed: "left",
|
2024-12-16 13:00:34 +00:00
|
|
|
align: "center",
|
2024-12-19 12:03:16 +00:00
|
|
|
title: "序号",
|
2024-12-16 13:00:34 +00:00
|
|
|
},
|
|
|
|
{
|
2024-12-19 12:03:16 +00:00
|
|
|
title: "商品详情",
|
2024-12-16 13:00:34 +00:00
|
|
|
// align: "center",
|
|
|
|
// width: "120px",
|
|
|
|
// field: "unitOrderStatus",
|
|
|
|
type: "jsx-out",
|
|
|
|
render: (col) => {
|
|
|
|
console.log(col);
|
2024-12-19 12:03:16 +00:00
|
|
|
return <content />;
|
2024-12-15 09:35:41 +00:00
|
|
|
},
|
|
|
|
},
|
2024-12-19 12:03:16 +00:00
|
|
|
{
|
|
|
|
title: "总订单号",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "orderNo",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "结算单位订单号",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "unitOrderNo",
|
|
|
|
},
|
2024-12-15 09:35:41 +00:00
|
|
|
{
|
2024-12-16 13:00:34 +00:00
|
|
|
title: "总商品数量",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "productCount",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "顾客支付",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "totalMoney",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "配送费",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "deliveryMoney",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "优惠券减免",
|
2024-12-15 09:35:41 +00:00
|
|
|
align: "center",
|
2024-12-16 13:00:34 +00:00
|
|
|
width: "120px",
|
|
|
|
field: "couponMoney",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "下单时间",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "payTime",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "预计送达时间",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "predictDeliveryTime",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "预计收入",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "predictIncome",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "距离",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "distance",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "预计自动取消时间",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "predictAutoCancelTime",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "备注",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "remark",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "包装费",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "packageMoney",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "平台服务费",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "platformMoney",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "备餐完成时间",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "completePrepareTime",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "开始配送时间",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
|
|
|
field: "startDeliveryTime",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "配送完成时间",
|
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
2025-01-02 10:30:02 +00:00
|
|
|
field: "completeDeliveryTime",
|
2024-12-16 13:00:34 +00:00
|
|
|
},
|
|
|
|
{
|
2025-01-02 10:30:02 +00:00
|
|
|
title: "下单时间",
|
2024-12-16 13:00:34 +00:00
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
2025-01-02 10:30:02 +00:00
|
|
|
field: "createTime",
|
2024-12-16 13:00:34 +00:00
|
|
|
},
|
|
|
|
{
|
2025-01-02 10:30:02 +00:00
|
|
|
title: "完成取货时间",
|
2024-12-16 13:00:34 +00:00
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
2025-01-02 10:30:02 +00:00
|
|
|
field: "pickTime",
|
2024-12-16 13:00:34 +00:00
|
|
|
},
|
|
|
|
{
|
2025-01-02 10:30:02 +00:00
|
|
|
title: "订单完成时间",
|
2024-12-16 13:00:34 +00:00
|
|
|
align: "center",
|
|
|
|
width: "120px",
|
2025-01-02 10:30:02 +00:00
|
|
|
field: "completeTime",
|
2024-12-15 09:35:41 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "操作",
|
|
|
|
fixed: "right",
|
|
|
|
type: "jsx",
|
|
|
|
align: "center",
|
|
|
|
width: "100px",
|
|
|
|
render: ({ row }) => {
|
2024-12-31 10:01:08 +00:00
|
|
|
let view = () => {
|
|
|
|
this.$refs.viewDetails.toggle(row).update();
|
2024-12-15 09:35:41 +00:00
|
|
|
};
|
|
|
|
return (
|
|
|
|
<div>
|
2024-12-31 10:01:08 +00:00
|
|
|
<el-button size="mini" type="primary" onClick={view}>
|
2024-12-15 09:35:41 +00:00
|
|
|
查看
|
|
|
|
</el-button>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
},
|
|
|
|
tableEvent() {
|
|
|
|
return {
|
|
|
|
"checkbox-all": ({ records, reserves }) => {
|
|
|
|
this.selectList = [...records, ...reserves];
|
|
|
|
},
|
|
|
|
"checkbox-change": ({ records, reserves }) => {
|
|
|
|
this.selectList = [...records, ...reserves];
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
...mapState("userData", [
|
|
|
|
"isMerchant",
|
|
|
|
"marketList",
|
|
|
|
"storeList",
|
|
|
|
"marketId",
|
|
|
|
"shopId",
|
|
|
|
]),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style>
|