You need to sign in or sign up before continuing.
Commit 2f084fb1 by caoyanzhi

update: 客户订单列表

parent dbb92916
<template>
<div>
<div class="search-bar">
<el-input prefix-icon="el-icon-search" clearable placeholder="请输入订单/退款/退换单号" style="width: 260px"></el-input>
<el-select clearable placeholder="全部订单类型" style="margin-left: 10px;width: 160px"></el-select>
<el-input v-model="params.orderNumber" @change="onSearch" prefix-icon="el-icon-search" clearable placeholder="请输入订单/退款/退换单号" style="width: 260px"></el-input>
<el-select v-model="params.orderType" @change="onSearch" clearable placeholder="全部订单类型" style="margin-left: 10px;width: 160px">
<el-option label="销售单" value="1"></el-option>
<el-option label="退款单" value="2"></el-option>
<el-option label="退换货单" value="4"></el-option>
</el-select>
<span class="search-create-time">创建时间</span>
<el-date-picker
v-model="params.dateRange"
@change="onSearch"
clearable
value-format="yyyy-MM-dd"
type="daterange"
......@@ -41,7 +47,7 @@
</div>
<div class="store-info">
<!-- 天猫、微盟、抖音、门店 -->
<div class="store-type-tag">天猫</div>
<div v-if="formatChannelType(el.channelType)" class="store-type-tag">{{ formatChannelType(el.channelType) }}</div>
<div class="store-name">{{ el.storeName }}</div>
</div>
</div>
......@@ -62,13 +68,14 @@
</div>
</el-table-column>
<el-table-column label="吊牌价/应收(元)" min-width="130px">
<div>120.19</div>
</el-table-column>
<el-table-column label="数量" min-width="70px">
<div>1</div>
<div slot-scope="{ row }" class="tag-price">
<del v-if="el.orderType == 1" class="del-price">{{ row.unitPrice | fomatFloat }}</del>
<div class="sale-price">{{ row.payPrice | fomatFloat }}</div>
</div>
</el-table-column>
<el-table-column label="数量" prop="skuNum" min-width="70px"></el-table-column>
<el-table-column label="小计金额(元)" min-width="120px">
<div>120.09</div>
<div slot-scope="{ row }">{{ row.payPrice * row.skuNum | fomatFloat }}</div>
</el-table-column>
<el-table-column label="订单金额(元)" class-name="order-amount" min-width="210px">
<div class="order-descript">
......@@ -171,48 +178,59 @@ export default {
data() {
return {
params: {
total: 105,
memberId: '', // 会员id
pageSize: 20,
currentPage: 1
currentPage: 1,
orderType: '', // 订单类型 1 销售,2.退货,4.退换货
// channelType: '', // 渠道类型 1:达摩微商城, 3:门店(线下)订单,8:天猫,9:微盟,10:其他,11:抖音
// startTime: '', // 2021-01-01 开始时间
// endTime: '', // 2022-01-01 结束时间
orderNumber: '', // 单号
dateRange: [],
total: 105
},
tableData: [
{
orderNumber: '单号(订单/退款单)',
oorderNumber: '原始订单号',
orderCreateTime: Date.now(),
createTime: Date.now(),
storeName: '店铺名称',
storeCode: '店铺(门店)编码',
// 订单类型 -1 所有,1 销售,2.退货,4.退换货
orderType: 4,
totalAmount: 100,
paidAmount: 200,
payAmount: 300,
promotionAmount: 400,
deliveryPaymentAmount: 10,
payInfo: JSON.stringify([{code:101,name:'现金',value:1}]),
receiverName: '收货人姓名',
phoneNumber: '收货人手机号',
receiverAddress: '收获地址',
clerks: [
{ clerkName: '导购名称', clerkCode: '导购code' }
],
orderItems: [
{
productName: '商品标题',
productCode: '商品编码',
skuValue: '商品规格',
imageUrl: '',
// 商品类型 1正常 2赠品 3换购
productType: 2
}
]
}
// {
// orderNumber: '单号(订单/退款单)',
// oorderNumber: '原始订单号',
// orderCreateTime: Date.now(),
// createTime: Date.now(),
// storeName: '店铺名称',
// storeCode: '店铺(门店)编码',
// // 订单类型 -1 所有,1 销售,2.退货,4.退换货
// orderType: 1,
// totalAmount: 100,
// paidAmount: 200,
// payAmount: 300,
// promotionAmount: 400,
// deliveryPaymentAmount: 10,
// payInfo: JSON.stringify([{code:101,name:'现金',value:1}]),
// receiverName: '收货人姓名',
// phoneNumber: '收货人手机号',
// receiverAddress: '收获地址',
// clerks: [
// { clerkName: '导购名称', clerkCode: '导购code' }
// ],
// orderItems: [
// {
// productName: '商品标题',
// productCode: '商品编码',
// skuValue: '商品规格',
// imageUrl: '',
// // 商品类型 1正常 2赠品 3换购
// productType: 2,
// skuNum: 5,
// unitPrice: 100,
// payPrice: 80
// }
// ]
// }
]
}
},
created() {
console.log('order table')
this.params.memberId = this.$route.query.memberId;
this.getTableData();
},
methods: {
spanMethod({ rowIndex, columnIndex }) {
......@@ -226,12 +244,36 @@ export default {
return [1, 1];
}
},
formatChannelType(type) {
// 渠道类型:1:达摩微商城, 3:门店(线下)订单,8:天猫,9:微盟,10:其他,11:抖音
// <!-- 天猫、微盟、抖音、门店 -->
const typeList = {
3: '门店',
8: '天猫',
9: '微盟',
11: '抖音'
}
return typeList[type];
},
getTableData() {
const { memberId, pageSize, currentPage, orderType, dateRange, orderNumber } = this.params;
const params = { memberId, pageSize, currentPage, orderType, orderNumber };
if (Array.isArray(dateRange) && dateRange.length > 0) {
params.startTime = dateRange[0];
params.endTime = dateRange[1];
}
console.log(params);
},
onSearch() {
this.onCurrentChange(1);
},
onSizeChange(pageSize) {
this.params.pageSize = pageSize;
this.onCurrentChange(1);
this.onSearch();
},
onCurrentChange(currentPage) {
this.params.currentPage = currentPage;
this.getTableData();
}
}
}
......@@ -405,6 +447,15 @@ export default {
/deep/ .order-amount {
border-left: 1px solid #E4E7ED;
}
.tag-price {
font-size: 14px;
font-weight: 400;
color: #303133;
line-height: 22px;
.del-price {
color: #909399;
}
}
.order-descript {
.order-descript-item {
display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment