feat: 商品模块改造

This commit is contained in:
lzhizhao 2025-10-01 12:44:10 +08:00
parent 270396a95d
commit 7b5719829d
4 changed files with 719 additions and 1070 deletions

View File

@ -51,6 +51,13 @@ export const mer_admin = {
data
);
},
//商品分页 V2
productV2Page: data => {
return $http.post(
`/merchant-api/product/v2/page?pageNumber=${data.p.pageNumber}&pageSize=${data.p.pageSize}`,
data
);
},
//商品规格分页
getProductSpecificationPage: (data, params) => {
return $http.request({
@ -64,6 +71,18 @@ export const mer_admin = {
getProductOverview: data => {
return $http.post(`/merchant-api/product/overview`, data);
},
//商品概况 V2
productV2Overview: data => {
return $http.post(`/merchant-api/product/v2/overview`, data);
},
//商品详情
productDetail: data => {
return $http.request({
method: 'get',
url: '/merchant-api/product/detail',
params: data
})
},
//商户商品分类
getProductCategory: data => {
return $http.request({

View File

@ -1,155 +1,174 @@
<template>
<div>
<div v-if="isMerchant" 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">
<!-- <el-form-item label="平台分类">
<el-select v-model="formInline.region" placeholder="活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item> -->
<!-- <el-form-item label="商户分类">
<el-select v-model="formInline.region" placeholder="活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="商品搜索">
<el-input
v-model="formInline.name"
placeholder="商品搜索"
></el-input>
</el-form-item>
<el-form-item v-if="marketList.length > 0" label="菜市场">
<el-select
@change="getData"
v-model="formInline.marketId"
placeholder="请选择菜市场"
<div class="page-container">
<div v-if="isMerchant">
<el-card class="search-card" shadow="never">
<el-form :model="formInline" ref="searchForm" label-position="top" class="search-form" size="small">
<el-row :gutter="15">
<el-col :span="6">
<el-form-item label="商品名称" prop="name">
<el-input v-model="formInline.name" placeholder="请输入商品名称" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6" v-if="marketList.length > 0">
<el-form-item label="店铺" prop="shopId">
<el-select v-model="formInline.shopId" placeholder="请选择店铺" style="width: 100%;">
<el-option v-for="item in storeList" :key="item.shopId" :label="item.shopName" :value="item.shopId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="状态" prop="status">
<el-select v-model="formInline.status" placeholder="请选择状态" style="width: 100%;" clearable>
<el-option label="上架" value="UP"></el-option>
<el-option label="下架" value="DOWN"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否折扣" prop="isDiscount">
<el-select v-model="formInline.isDiscount" placeholder="请选择是否折扣" style="width: 100%;" clearable>
<el-option label="是" :value="1"></el-option>
<el-option label="否" :value="0"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24" class="search-buttons">
<el-button type="primary" @click="handleSearch" icon="el-icon-search" size="small">查询</el-button>
<el-button @click="handleReset" icon="el-icon-refresh" size="small">重置</el-button>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card class="stats-card" shadow="never">
<el-row :gutter="20">
<el-col :span="6">
<div class="stat-item">
<div class="stat-label">总商品数量()</div>
<div class="stat-value">{{ overview.productCount || 0 }}</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-item">
<div class="stat-label">上架中商品数量()</div>
<div class="stat-value">{{ overview.productOnSaleCount || 0 }}</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-item">
<div class="stat-label">折扣商品数量()</div>
<div class="stat-value">{{ overview.productDiscountCount || 0 }}</div>
</div>
</el-col>
<el-col :span="6">
<div class="stat-item">
<div class="stat-label">仓库中商品数量()</div>
<div class="stat-value">{{ overview.productWarehouseCount || 0 }}</div>
</div>
</el-col>
</el-row>
</el-card>
<el-card class="table-card" shadow="never">
<div style="margin-bottom: 15px;">
<el-button type="primary" size="small" @click="addProduct">添加商品</el-button>
<el-button :disabled="selectList.length <= 0" type="danger" size="small" @click="deleteProduct">批量删除</el-button>
</div>
<el-table
:data="dataList"
v-loading="loading"
style="width: 100%"
@selection-change="handleSelectionChange"
size="small"
>
<el-table-column type="selection" width="55" fixed="left"></el-table-column>
<el-table-column label="商品图" align="center" width="80">
<template slot-scope="{ row }">
<el-image
v-if="row.productMainImg"
:src="row.productMainImg"
:preview-src-list="[row.productMainImg]"
style="width: 40px; height: 40px;"
fit="cover"
></el-image>
<span v-else>暂无商品图</span>
</template>
</el-table-column>
<el-table-column prop="name" label="商品名称" align="center">
<template slot-scope="{ row }">{{ row.name || '-' }}</template>
</el-table-column>
<el-table-column prop="shopName" label="店铺名称" align="center">
<template slot-scope="{ row }">{{ row.shopName || '-' }}</template>
</el-table-column>
<el-table-column label="商品售价" align="center">
<template slot-scope="{ row }">
<span style="color: red;">
<span v-if="row.minSalePrice == row.maxSalePrice">{{ row.minSalePrice || 0 }}</span>
<span v-else>{{ row.minSalePrice || 0 }}~{{ row.maxSalePrice || 0 }}</span>
</span>
</template>
</el-table-column>
<el-table-column label="折扣" align="center">
<template slot-scope="{ row }">
<span v-if="row.isDiscount === 1">{{ row.discount }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="saleNum" label="销量" align="center">
<template slot-scope="{ row }">{{ row.saleNum || '-' }}</template>
</el-table-column>
<el-table-column prop="stockNum" label="库存" align="center">
<template slot-scope="{ row }">{{ row.stockNum || '-' }}</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="{ row }">
<el-popconfirm
:title="row.status == 'DOWN' ? '当前为下架状态,是否更改为上架状态?' : '当前为上架状态,是否更改为下架状态?'"
:confirm-button-text="row.status == 'DOWN' ? '确认上架' : '确认下架'"
@confirm="toggleStatus(row)"
>
<el-option
v-for="item in marketList"
:key="item.marketId"
:label="item.marketName"
:value="item.marketId"
></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="marketList.length > 0" label="店铺">
<el-select v-model="formInline.shopId" placeholder="请选择店铺">
<el-option
v-for="item in storeList"
:key="item.shopId"
:label="item.shopName"
:value="item.shopId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否预售商品">
<el-select
v-model="formInline.isAdvanceSell"
placeholder="请选择是否预售"
>
<el-option label="是" :value="1"></el-option>
<el-option label="否" :value="0"></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>
<div class="stat-list">
<div class="stat-item">
<i style="font-size: 22px" class="el-icon-s-goods"></i>
<div class="stat-right">
<div class="stat-title">总商品数量</div>
<div class="stat-value">
<span style="font-size: 20px">{{
overview.productCount
}}</span>
</div>
</div>
</div>
<div class="stat-item">
<i style="font-size: 22px" class="el-icon-s-shop"></i>
<div class="stat-right">
<div class="stat-title">上架中商品数量</div>
<div class="stat-value">
<span style="font-size: 20px">{{
overview.productOnSaleCount
}}</span>
</div>
</div>
</div>
<div class="stat-item">
<i style="font-size: 22px" class="el-icon-s-marketing"></i>
<div class="stat-right">
<div class="stat-title">折扣商品数量</div>
<div class="stat-value">
<span style="font-size: 20px">{{
overview.productDiscountCount
}}</span>
</div>
</div>
</div>
<div class="stat-item">
<i style="font-size: 22px" class="el-icon-s-promotion"></i>
<div class="stat-right">
<div class="stat-title">仓库中商品数量</div>
<div class="stat-value">
<span style="font-size: 20px">{{
overview.productWarehouseCount
}}</span>
</div>
</div>
</div>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="在售" name="在售"></el-tab-pane>
<el-tab-pane label="仓库中" name="仓库中"></el-tab-pane>
<el-tab-pane label="折扣" name="折扣"></el-tab-pane>
</el-tabs>
<div class="mb-2">
<el-button type="primary" size="small" @click="addProduct"
>添加商品</el-button
>
<el-button
:disabled="selectList.length <= 0"
type="danger"
size="small"
@click="deleteProduct"
>批量删除</el-button
>
</div>
</template>
</obj-table-plus>
<el-tag
slot="reference"
size="mini"
:type="row.status == 'DOWN' ? 'info' : 'success'"
style="cursor: pointer;"
>
{{ row.status == "DOWN" ? "已下架" : "上架中" }}
</el-tag>
</el-popconfirm>
</template>
</el-table-column>
<el-table-column label="操作 (提示:下架后可进行操作)" align="center" width="340" fixed="right">
<template slot-scope="{ row }">
<el-button size="mini" :disabled="row.status != 'DOWN'" type="primary" @click="editProduct(row)">编辑</el-button>
<el-button size="mini" :disabled="row.status != 'DOWN'" type="primary" @click="priceAdjustment(row)">改价</el-button>
<el-button size="mini" :disabled="row.status != 'DOWN'" type="primary" @click="changeInventory(row)">改库存</el-button>
<el-button size="mini" :disabled="row.status != 'DOWN'" type="primary" @click="setDiscounts(row)">设置折扣</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pagination.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.total"
class="pagination-container"
></el-pagination>
</el-card>
<!-- 添加或编辑 -->
<add-or-update
@queryList="$refs.oTable.reload()"
ref="addOrUpdate"
></add-or-update>
<add-or-update @queryList="fetchData" ref="addOrUpdate"></add-or-update>
<!-- 改价格 -->
<AddPrice ref="AddPrice" @queryList="$refs.oTable.reload()"></AddPrice>
<AddPrice ref="AddPrice" @queryList="fetchData"></AddPrice>
<!-- 改库存 -->
<addStock ref="addStock" @queryList="$refs.oTable.reload()"></addStock>
<addStock ref="addStock" @queryList="fetchData"></addStock>
<!-- 打折扣 -->
<AddDiscount
ref="AddDiscount"
@queryList="$refs.oTable.reload()"
></AddDiscount>
<AddDiscount ref="AddDiscount" @queryList="fetchData"></AddDiscount>
</div>
<div style="height: calc(100vh - 200px)" v-else>
<el-empty :image-size="200" description="请先去完成商品哦"></el-empty>
@ -167,20 +186,18 @@ export default {
components: { AddOrUpdate, AddPrice, addStock, AddDiscount },
data() {
return {
activeName: "在售",
dataList: [],
loading: false,
pagination: {
pageNumber: 1,
pageSize: 10,
total: 0
},
formInline: {
name: "",
marketId: "",
shopId: "",
isAdvanceSell: 0
},
tableProp: {
"auto-resize": true,
border: true,
height: "auto",
"row-id": "id",
"show-overflow": false
status: null,
isDiscount: null
},
productFilterType: "SALE",
selectList: [],
@ -190,31 +207,42 @@ export default {
created() {
this.formInline = {
name: "",
marketId: this.marketId,
shopId: this.shopId,
isAdvanceSell: 0
status: null,
isDiscount: null
};
this.$nextTick(() => {
this.$refs.oTable.reload();
});
this.fetchData();
},
methods: {
//
getData() {
// this.$api.mer_admin
// .storeList({ marketId: this.formInline.marketId })
// .then((res) => {
// this.formInline.shopId = res.data.data[0].shopId;
// this.$nextTick(() => {
// this.$refs.oTable.reload();
// });
// });
handleSearch() {
this.pagination.pageNumber = 1;
this.fetchData();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.formInline = {
name: "",
shopId: this.shopId,
status: null,
isDiscount: null
};
this.handleSearch();
},
handleSizeChange(val) {
this.pagination.pageSize = val;
this.fetchData();
},
handleCurrentChange(val) {
this.pagination.pageNumber = val;
this.fetchData();
},
handleSelectionChange(val) {
this.selectList = val;
},
addProduct() {
this.$refs.addOrUpdate.toggle().add(this.formInline.shopId);
},
deleteProduct() {
console.log(this.selectList);
let integers = this.selectList.map(item => {
return item.id;
});
@ -224,9 +252,8 @@ export default {
type: "warning"
})
.then(() => {
console.log("111");
this.$api.mer_admin.BatchDeleteProducts(integers).then(res => {
this.$refs.oTable.reload();
this.fetchData();
});
})
.catch(() => {
@ -236,13 +263,13 @@ export default {
});
});
},
queryList(pageNo, pageSize) {
console.log(this.formInline);
fetchData() {
this.loading = true;
this.$api.mer_admin
.getProductPage({
.productV2Page({
p: {
pageNumber: pageNo,
pageSize: pageSize
pageNumber: this.pagination.pageNumber,
pageSize: this.pagination.pageSize
},
...this.formInline,
productFilterType: this.productFilterType,
@ -250,241 +277,46 @@ export default {
productQuerySortParam: []
})
.then(res => {
console.log(res);
this.$refs.oTable.complete(
res.data.data.data,
Number(res.data.data.total)
);
this.dataList = res.data.data.data;
this.pagination.total = Number(res.data.data.total);
})
.catch(err => {
this.$refs.oTable.complete(false);
this.dataList = [];
this.pagination.total = 0;
}).finally(() => {
this.loading = false;
});
this.$api.mer_admin.getProductOverview(this.formInline).then(res => {
console.log(res, "概况");
this.$api.mer_admin.productV2Overview(this.formInline).then(res => {
this.overview = res.data.data;
});
},
Reset() {
this.formInline = {
name: "",
marketId: this.marketId,
shopId: this.shopId,
isAdvanceSell: 0
toggleStatus(row) {
let data = {
ids: [row.id],
status: row.status === "UP" ? "DOWN" : "UP"
};
this.$refs.oTable.reload();
this.$api.mer_admin.putOnShelvesProducts(data).then(res => {
this.fetchData();
});
},
handleClick() {
switch (this.activeName) {
case "在售":
this.productFilterType = "SALE";
break;
case "仓库中":
this.productFilterType = "WAREHOUSE";
break;
case "折扣":
this.productFilterType = "DISCOUNT";
break;
}
this.$refs.oTable.reload();
async editProduct(row) {
const res = await this.$api.mer_admin.productDetail({ id: row.id });
this.$refs.addOrUpdate.toggle(res.data.data).update();
},
async priceAdjustment(row) {
const res = await this.$api.mer_admin.productDetail({ id: row.id });
this.$refs.AddPrice.toggle(res.data.data).update();
},
async changeInventory(row) {
const res = await this.$api.mer_admin.productDetail({ id: row.id });
this.$refs.addStock.toggle(res.data.data).update();
},
async setDiscounts(row) {
const res = await this.$api.mer_admin.productDetail({ id: row.id });
this.$refs.AddDiscount.toggle(res.data.data).update();
}
},
computed: {
tableCols() {
return [
{ type: "checkbox", width: "60px", fixed: "left" },
// { type: "seq", width: "60px", align: "center", title: "" },
{
title: "商品图",
field: "productPhotoList",
align: "center",
width: "80px",
type: "jsx",
render: ({ row }) => {
if (row.productPhotoList.length > 0) {
return (
<el-image
preview-src-list={row.productPhotoList.map(item => {
return item.url;
})}
src={row.productPhotoList[0].url}
></el-image>
);
} else {
return <span>暂无商品图</span>;
}
}
},
{
title: "商品名称",
align: "center",
field: "name"
},
{
title: "商品售价",
align: "center",
field: "minSalePrice",
type: "jsx",
render: ({ row }) => {
if (row.minSalePrice == row.maxSalePrice) {
return <span>{row.minSalePrice}</span>;
} else {
return (
<span>
{row.minSalePrice}~{row.maxSalePrice}
</span>
);
}
}
},
{
title: "折扣",
align: "center",
field: "discountActivity",
type: "jsx",
render: ({ row }) => {
if (row.discountActivity) {
return <span>{row.discountActivity.ruleObject.discount}</span>;
}
}
},
{
title: "销量",
align: "center",
field: "saleNum"
},
{
title: "库存",
align: "center",
field: "stockNum"
},
{
title: "是否为预售商品",
align: "center",
field: "isAdvanceSell",
type: "jsx",
render: ({ row }) => {
return <span>{row.isAdvanceSell == 1 ? "是" : "否"}</span>;
}
},
{
title: "状态",
// fixed: "right",
type: "jsx",
align: "center",
"title-suffix": {
message: "点击上架/下架切换责任书状态",
icon: "vxe-icon-question-circle-fill"
},
render: ({ row }) => {
let Enable = () => {
let data = {
ids: [row.id],
status: "UP"
};
if (row.status == "UP") {
data.status = "DOWN";
} else {
data.status = "UP";
}
this.$api.mer_admin.putOnShelvesProducts(data).then(res => {
console.log(res);
this.$refs.oTable.reload();
});
};
return (
<el-popconfirm
title={
row.status == "DOWN"
? "当前为下架状态,是否更改为上架状态?"
: "当前为上架状态,是否更改为下架状态?"
}
confirmButtonText={
row.status == "DOWN" ? "确认上架" : "确认下架"
}
onConfirm={Enable}
>
<el-button
slot="reference"
size="mini"
plain
type={row.status == "DOWN" ? "info" : "success"}
>
{row.status == "DOWN" ? "已下架" : "上架中"}
</el-button>
</el-popconfirm>
);
}
},
{
title: "操作 (提示:下架后可进行操作)",
fixed: "right",
type: "jsx",
align: "center",
width: "340px",
render: ({ row }) => {
let edit = () => {
this.$refs.addOrUpdate.toggle(row).update();
};
let priceAdjustment = () => {
console.log(row);
this.$refs.AddPrice.toggle(row).update();
};
let changeInventory = () => {
this.$refs.addStock.toggle(row).update();
};
let setDiscounts = () => {
this.$refs.AddDiscount.toggle(row).update();
};
return (
<div>
<el-button
size="mini"
disabled={row.status != "DOWN"}
type="primary"
onClick={edit}
>
编辑
</el-button>
<el-button
size="mini"
disabled={row.status != "DOWN"}
type="primary"
onClick={priceAdjustment}
>
改价
</el-button>
<el-button
size="mini"
disabled={row.status != "DOWN"}
type="primary"
onClick={changeInventory}
>
改库存
</el-button>
<el-button
size="mini"
disabled={row.status != "DOWN"}
type="primary"
onClick={setDiscounts}
>
设置折扣
</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",
@ -496,27 +328,46 @@ export default {
};
</script>
<style lang="scss" scoped>
.stat-list {
display: flex;
align-items: center;
/* justify-content: space-between; */
// flex-wrap: wrap;
margin-bottom: 10px;
padding: 10px;
border: 1px solid #ccc;
<style scoped>
.page-container {
}
.search-card {
margin-bottom: 15px;
}
.stats-card {
margin-bottom: 15px;
}
.stat-item {
width: 20%;
margin: 20px 20px;
display: flex;
align-items: center;
text-align: center;
background-color: #f5f5f5;
padding: 15px;
border-radius: 4px;
}
.stat-right {
margin-left: 12px;
font-size: 18px;
}
.stat-title {
.stat-label {
font-size: 14px;
color: #606266;
margin-bottom: 5px;
}
.stat-value {
font-size: 20px;
font-weight: bold;
color: #409EFF;
}
.search-form .el-form-item {
margin-bottom: 10px;
}
.search-buttons {
text-align: left;
}
.pagination-container {
margin-top: 20px;
text-align: right;
}
</style>
<style>
.search-form .el-form-item__label {
padding-bottom: 0px !important;
font-size: 12px;
line-height: 20px;
}
</style>

View File

@ -100,11 +100,7 @@
</el-card>
</div>
<el-card class="table-card" shadow="never">
<div slot="header">
<span>订单列表</span>
</div>
<!-- 表格 -->
<!-- 表格 -->
<el-table
:data="tableData"
v-loading="loading"
@ -135,26 +131,25 @@
size="small"
style="width: 100%"
:show-header="true">
<el-table-column label="序号">
<template slot-scope="productScope">
{{ productScope.$index + 1 }}
</template>
<el-table-column prop="productName" label="商品名称">
<template slot-scope="productScope">{{ productScope.row.productName || '-' }}</template>
</el-table-column>
<el-table-column prop="productCount" label="商品数量">
<template slot-scope="productScope">{{ productScope.row.productCount || '-' }}</template>
</el-table-column>
<el-table-column prop="productName" label="商品名称"></el-table-column>
<el-table-column prop="productCount" label="商品数量"></el-table-column>
<el-table-column label="商品原价">
<template slot-scope="productScope">
¥ {{ (productScope.row.originPrice / 100).toFixed(2) }}
¥ {{ (productScope.row.originPrice / 100).toFixed(2) || '0.00' }}
</template>
</el-table-column>
<el-table-column label="商品终价">
<template slot-scope="productScope">
¥ {{ (productScope.row.finalPrice / 100).toFixed(2) }}
¥ {{ (productScope.row.finalPrice / 100).toFixed(2) || '0.00' }}
</template>
</el-table-column>
<el-table-column label="商品订单金额">
<template slot-scope="productScope">
¥ {{ (productScope.row.productOrderMoney / 100).toFixed(2) }}
¥ {{ (productScope.row.productOrderMoney / 100).toFixed(2) || '0.00' }}
</template>
</el-table-column>
<el-table-column prop="productImg" label="商品图片">
@ -164,6 +159,7 @@
style="width: 40px; height: 40px;"
fit="cover"
:preview-src-list="[productScope.row.productImg]"></el-image>
<span v-else>-</span>
</template>
</el-table-column>
</el-table>
@ -174,16 +170,18 @@
{{ shopScope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="shopOrderNo" label="店铺订单号"></el-table-column>
<el-table-column prop="shopOrderNo" label="店铺订单号">
<template slot-scope="shopScope">{{ shopScope.row.shopOrderNo || '-' }}</template>
</el-table-column>
<el-table-column prop="shopName" label="店铺名称">
<template slot-scope="shopScope">
{{ shopScope.row.shopName || "暂无" }}
{{ shopScope.row.shopName || "-" }}
</template>
</el-table-column>
<el-table-column prop="status" label="订单状态">
<template slot-scope="shopScope">
<el-tag :type="getShopStatusType(shopScope.row.status)" size="small">
{{ getShopStatusText(shopScope.row.status) }}
{{ getShopStatusText(shopScope.row.status) || '-' }}
</el-tag>
</template>
</el-table-column>
@ -198,46 +196,62 @@
{{ (pagination.pageNumber - 1) * pagination.pageSize + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="unitOrderNo" label="结算订单号" min-width="120"></el-table-column>
<el-table-column prop="createTime" label="下单时间" width="90"></el-table-column>
<el-table-column prop="receiverName" label="收货人姓名" width="80"></el-table-column>
<el-table-column prop="receiverPhone" label="收货人电话" width="100"></el-table-column>
<el-table-column prop="poi" label="收货人地址" min-width="150"></el-table-column>
<el-table-column prop="unitOrderNo" label="结算订单号" min-width="120">
<template slot-scope="scope">{{ scope.row.unitOrderNo || '-' }}</template>
</el-table-column>
<el-table-column prop="createTime" label="下单时间" width="90">
<template slot-scope="scope">{{ scope.row.createTime || '-' }}</template>
</el-table-column>
<el-table-column prop="receiverName" label="收货人姓名" width="80">
<template slot-scope="scope">{{ scope.row.receiverName || '-' }}</template>
</el-table-column>
<el-table-column prop="receiverPhone" label="收货人电话" width="100">
<template slot-scope="scope">{{ scope.row.receiverPhone || '-' }}</template>
</el-table-column>
<el-table-column prop="poi" label="收货人地址" min-width="150">
<template slot-scope="scope">{{ scope.row.poi || '-' }}</template>
</el-table-column>
<el-table-column label="市场订单金额" min-width="100">
<template slot-scope="scope">
<span>¥ {{ (scope.row.unitOrderMoney / 100).toFixed(2) }}</span>
<span>¥ {{ (scope.row.unitOrderMoney / 100).toFixed(2) || '0.00' }}</span>
</template>
</el-table-column>
<el-table-column label="市场订单商品金额" min-width="120">
<template slot-scope="scope">
<span>¥ {{ (scope.row.productMoney / 100).toFixed(2) }}</span>
<span>¥ {{ (scope.row.productMoney / 100).toFixed(2) || '0.00' }}</span>
</template>
</el-table-column>
<el-table-column label="市场订单配送费" min-width="110">
<template slot-scope="scope">
<span>¥ {{ (scope.row.deliveryMoney / 100).toFixed(2) }}</span>
<span>¥ {{ (scope.row.deliveryMoney / 100).toFixed(2) || '0.00' }}</span>
</template>
</el-table-column>
<el-table-column label="调度费" width="60">
<template slot-scope="scope">
<span>¥ {{ (scope.row.dispatchMoney / 100).toFixed(2) }}</span>
<span>¥ {{ (scope.row.dispatchMoney / 100).toFixed(2) || '0.00' }}</span>
</template>
</el-table-column>
<el-table-column label="包装费" width="60">
<template slot-scope="scope">
<span>¥ {{ (scope.row.packageMoney / 100).toFixed(2) }}</span>
<span>¥ {{ (scope.row.packageMoney / 100).toFixed(2) || '0.00' }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="订单状态" width="100">
<template slot-scope="scope">
<el-tag :type="getStatusTagType(scope.row.status)" size="small">
{{ getStatusText(scope.row.status) }}
{{ getStatusText(scope.row.status) || '-' }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="marketId" label="市场编号" width="90"></el-table-column>
<el-table-column prop="marketName" label="市场名称" min-width="100"></el-table-column>
<el-table-column prop="refundReason" label="申请退款原因" min-width="80"></el-table-column>
<el-table-column prop="marketId" label="市场编号" width="90">
<template slot-scope="scope">{{ scope.row.marketId || '-' }}</template>
</el-table-column>
<el-table-column prop="marketName" label="市场名称" min-width="100">
<template slot-scope="scope">{{ scope.row.marketName || '-' }}</template>
</el-table-column>
<el-table-column prop="refundReason" label="申请退款原因" min-width="80">
<template slot-scope="scope">{{ scope.row.refundReason || '-' }}</template>
</el-table-column>
</el-table>
<!-- 分页 -->
@ -251,7 +265,6 @@
:total="pagination.total"
class="pagination-container"
></el-pagination>
</el-card>
</div>
</template>