|
@@ -30,17 +30,6 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
|
- <el-form-item label="状态" prop="evaluateStatus">
|
|
|
- <el-select v-model="screenForm.evaluateStatus" placeholder="全部">
|
|
|
- <el-option label="全部" value=""></el-option>
|
|
|
- <el-option label="未评价订单" :value="0"></el-option>
|
|
|
- <el-option label="已评价订单" :value="3"></el-option>
|
|
|
- <el-option label="差评订单" :value="1"></el-option>
|
|
|
- <el-option label="好评订单" :value="2"></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="12" :lg="6">
|
|
|
<el-form-item label="创建时间" prop="createDate" style="height: 33px;">
|
|
|
<el-date-picker v-model="screenForm.createDate" type="datetimerange"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
|
|
@@ -56,9 +45,11 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :lg="6" class="tr">
|
|
|
- <el-form-item label="">
|
|
|
- <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
|
|
|
- <el-button size="small" @click="resetScreenForm">清空</el-button>
|
|
|
+ <el-form-item label="" label-width="0px">
|
|
|
+ <div style="text-align: left;">
|
|
|
+ <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
|
|
|
+ <el-button size="small" @click="resetScreenForm">清空</el-button>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -68,23 +59,22 @@
|
|
|
<div class="fl">
|
|
|
<el-tabs v-model="tabCurrent" type="card" @tab-click="changeTabs" class="fl" size="small" style="margin-right: 10px">
|
|
|
<el-tab-pane label="全部" name="ALL"></el-tab-pane>
|
|
|
- <el-tab-pane label="待付款" name="NOPAY"></el-tab-pane>
|
|
|
- <el-tab-pane label="待确认" name="DQR"></el-tab-pane>
|
|
|
- <el-tab-pane label="待发货" name="DFH"></el-tab-pane>
|
|
|
- <el-tab-pane label="已发货" name="YFH"></el-tab-pane>
|
|
|
+ <el-tab-pane label="待付款" name="SAVE"></el-tab-pane>
|
|
|
+ <el-tab-pane label="待确认" name="WAIT"></el-tab-pane>
|
|
|
+ <el-tab-pane label="待发货" name="PAID"></el-tab-pane>
|
|
|
+ <el-tab-pane label="已发货" name="SEND"></el-tab-pane>
|
|
|
<el-tab-pane label="已完成" name="OVER"></el-tab-pane>
|
|
|
- <el-tab-pane label="退款/取消" name="CLOSE"></el-tab-pane>
|
|
|
- <el-tab-pane label="已超时" name="TIMEOUT"></el-tab-pane>
|
|
|
+ <el-tab-pane label="已退货/取消" name="CANCEL"></el-tab-pane>
|
|
|
+ <el-tab-pane label="已超时" name="TIME_OUT"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<el-button class="fl" type="primary" size="small" @click="add">新增</el-button>
|
|
|
</div>
|
|
|
<div class="fr">
|
|
|
- <el-button size="small" type="primary">导出</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="handleExport">导出</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<zj-page-fill>
|
|
|
<div class="order-main-container">
|
|
|
- <!-- -->
|
|
|
<div class="table-top">
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="3">
|
|
@@ -98,87 +88,70 @@
|
|
|
<el-col :span="3" style="text-align: center"><span class="item">操作</span></el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <!-- -->
|
|
|
<div class="order-item" v-for="order in dataList" :key="order.orderId">
|
|
|
<div class="order-top">
|
|
|
- <span><b>订单号</b>:{{ order.orderId }}</span>
|
|
|
+ <span><b>订单号</b>:{{ order.esOrderId }}</span>
|
|
|
<span><b>下单时间</b>:{{ order.createTime }}</span>
|
|
|
- <el-tag>商城销售</el-tag>
|
|
|
+ <!-- <el-tag>商城销售</el-tag> -->
|
|
|
<div class="fr"></div>
|
|
|
</div>
|
|
|
<div class="order-content">
|
|
|
<el-row style="width:100%;">
|
|
|
<el-col :span="6" style="height: 100%;">
|
|
|
<div class="col-item-pro">
|
|
|
- <div class="pro-item" v-for="orderItem in order.orderDetails" :key="orderItem.orderDetailId">
|
|
|
+ <div class="pro-item">
|
|
|
<div class="left">
|
|
|
<div class="image">
|
|
|
- <img :src="orderItem.imgUrl" style="height:80px;width: 80px;">
|
|
|
+ <img :src="order.goodsUrl" style="height:80px;width: 80px;">
|
|
|
</div>
|
|
|
<div class="main">
|
|
|
- <span><el-tag type="danger" effect="plain" size="mini" style="margin-right: 4px"
|
|
|
- v-if="orderItem.promotionFullPieceId">满件打折</el-tag>{{ orderItem.esGoodsName }}</span>
|
|
|
- <span class="spec"
|
|
|
- v-if="orderItem.goodsSpecName === '默认' && orderItem.goodsSpecValue === '默认'">默认</span>
|
|
|
- <span class="spec" v-else>{{ orderItem.goodsSpecName }}-{{ orderItem.goodsSpecValue
|
|
|
- }}</span>
|
|
|
+ <span>{{ order.esGoodsName }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <span>¥{{ orderItem.price }}</span>
|
|
|
- <span>x{{ orderItem.num }}</span>
|
|
|
+ <span>¥{{ order.goodsPrice }}</span>
|
|
|
+ <span>x{{ order.num }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="4" style="height: 100%;">
|
|
|
<div class="col-item">
|
|
|
- <div>{{ order.userName }}</div>
|
|
|
- <div>{{ order.userMobile }}</div>
|
|
|
+ <div>{{ order.wechatUserName }}</div>
|
|
|
+ <div>{{ order.wechatUserMobile }}</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="4" style="height: 100%;">
|
|
|
<div class="col-item">
|
|
|
- <div>{{ order.receUserName }}/{{ order.recePhone }}</div>
|
|
|
- <div class="ellipsis-2">{{ order.province + order.city + order.area + order.street + order.receAddress + order.houseNo }}</div>
|
|
|
+ <div>{{ order.userName }}/{{ order.userMobile }}</div>
|
|
|
+ <div class="ellipsis-2">{{ order.province + order.city + order.area + order.street + order.receAddress }}</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="4" style="height: 100%;">
|
|
|
<div class="col-item">
|
|
|
- <div class="totalprice">¥{{ order.payAmount }}</div>
|
|
|
- <div style="font-size: 12px" v-if="order.discountAmount">(<span>-{{ order.discountAmount
|
|
|
- }}</span><span v-if="order.promotionDiscountRate">/{{ order.promotionDiscountRate * 10
|
|
|
- }}折</span>)</div>
|
|
|
+ <div class="totalprice">¥{{ order.totalAmount }}</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="3" style="height: 100%;">
|
|
|
<div class="col-item">
|
|
|
<div style="display: flex; align-items: center;">
|
|
|
- <img src="@/assets/order/CLOSE.png" style="width: 16px; flex-shrink: 0;"
|
|
|
- v-if="order.status == 'CLOSE'">
|
|
|
- <img src="@/assets/order/DFH.png" style="width: 16px; flex-shrink: 0;"
|
|
|
- v-if="order.status == 'DFH'">
|
|
|
- <img src="@/assets/order/NOPAY.png" style="width: 16px; flex-shrink: 0;"
|
|
|
- v-if="order.status == 'NOPAY'">
|
|
|
- <img src="@/assets/order/OVER.png" style="width: 16px; flex-shrink: 0;"
|
|
|
- v-if="order.status == 'OVER'">
|
|
|
- <img src="@/assets/order/TIMEOUT.png" style="width: 16px; flex-shrink: 0;"
|
|
|
- v-if="order.status == 'TIMEOUT'">
|
|
|
- <img src="@/assets/order/YFH.png" style="width: 16px; flex-shrink: 0;"
|
|
|
- v-if="order.status == 'YFH'">
|
|
|
- <span style="margin-left: 4px">{{ order.status | ORDER_CURRENT_STATUS_FILTER }}</span>
|
|
|
+ <span style="margin-left: 4px">{{ ({SAVE: "买家下单", WAIT: "待确认", PAID: "待发货", SEND: "卖家发货", OVER: "交易完成", TIME_OUT: "超时", CANCEL: "取消", WAIT_REFUND: "售后中", REFUND: "已退"})[order.status] }}</span>
|
|
|
</div>
|
|
|
- <div>({{ order.toWorkOrder ? '已派单' : '未派单' }})</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="3" style="height: 100%;">
|
|
|
- <div class="col-item">
|
|
|
+ <div class="col-item">
|
|
|
<div class="operate">
|
|
|
- <el-popconfirm title="确定确认订单吗?" @confirm="">
|
|
|
+ <el-popconfirm title="确认订单吗?" @confirm="quedingesOrderPayOk">
|
|
|
<el-button slot="reference" type="text" size="small">确认订单</el-button>
|
|
|
</el-popconfirm>
|
|
|
- <el-button @click="viewDetails" type="text" size="small">查看详情</el-button>
|
|
|
- <el-button @click="viewMaterialFlow" type="text" size="small">查看物流</el-button>
|
|
|
+ <el-popconfirm title="确认取消订单吗?" @confirm="quedingesOrderCancel">
|
|
|
+ <el-button slot="reference" type="text" size="small">取消订单</el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ <el-button @click="viewMaterialFlow(order)" type="text" size="small">查看物流</el-button>
|
|
|
+ <el-button @click="viewDetails(order, 0)" type="text" size="small">查看详情</el-button>
|
|
|
+ <el-button @click="viewDetails(order, 1)" type="text" size="small">确认收款</el-button>
|
|
|
+ <el-button @click="viewDetails(order, 2)" type="text" size="small">退货</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -201,31 +174,35 @@
|
|
|
</div>
|
|
|
<!-- 新增 -->
|
|
|
<div v-if="activeKey == 'add'" style="width:100%;height:100%;">
|
|
|
- <add/>
|
|
|
+ <add :detailsId="detailsId" @removeTab="()=>{
|
|
|
+ getList()
|
|
|
+ data.removeTab()
|
|
|
+ }"/>
|
|
|
</div>
|
|
|
<!-- 查看详情 -->
|
|
|
<div v-if="activeKey == 'details'" style="width:100%;height:100%;">
|
|
|
- <detailsV/>
|
|
|
- </div>
|
|
|
- <!-- 确认订单 -->
|
|
|
- <div v-if="activeKey == 'remark'" style="width:100%;height:100%;">
|
|
|
-
|
|
|
+ <detailsV :detailsId="detailsId" :detailsType="detailsType" @viewMaterialFlow="viewMaterialFlow" @removeTab="()=>{
|
|
|
+ getList()
|
|
|
+ data.removeTab()
|
|
|
+ }"/>
|
|
|
</div>
|
|
|
<!-- 确认收款 -->
|
|
|
<div v-if="activeKey == 'materialDetail'" style="width:100%;height:100%;">
|
|
|
-
|
|
|
+ <detailsV :detailsId="detailsId" :detailsType="detailsType" @viewMaterialFlow="viewMaterialFlow" @removeTab="()=>{
|
|
|
+ getList()
|
|
|
+ data.removeTab()
|
|
|
+ }"/>
|
|
|
</div>
|
|
|
- <!-- 取消订单 -->
|
|
|
- <div v-if="activeKey == 'deliverGoods'" style="width:100%;height:100%;">
|
|
|
-
|
|
|
+ <!-- 退货 -->
|
|
|
+ <div v-if="activeKey == 'editAddress3'" style="width:100%;height:100%;">
|
|
|
+ <detailsV :detailsId="detailsId" :detailsType="detailsType" @viewMaterialFlow="viewMaterialFlow" @removeTab="()=>{
|
|
|
+ getList()
|
|
|
+ data.removeTab()
|
|
|
+ }"/>
|
|
|
</div>
|
|
|
<!-- 查看物流 -->
|
|
|
<div v-if="activeKey == 'materialFlow'" style="width:100%;height:100%;">
|
|
|
- <materialFlow/>
|
|
|
- </div>
|
|
|
- <!-- 退货 -->
|
|
|
- <div v-if="activeKey == 'editAddress3'" style="width:100%;height:100%;">
|
|
|
-
|
|
|
+ <materialFlow :detailsId="detailsId"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
</zj-tab-page>
|
|
@@ -235,14 +212,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { esOrderList } from "@/api/orderManagement";
|
|
|
+import { esOrderList, esOrderListExcel, esOrderPayOk, esOrderCancel } from "@/api/orderManagement";
|
|
|
import add from "./add.vue"
|
|
|
import detailsV from "./details.vue"
|
|
|
import materialFlow from "./materialFlow.vue"
|
|
|
import '@/styles/order-list.scss'
|
|
|
+import { downloadFiles } from '@/utils/util'
|
|
|
export default {
|
|
|
components: {add, detailsV, materialFlow},
|
|
|
-
|
|
|
data() {
|
|
|
return {
|
|
|
screenForm: { // 筛选表单数据
|
|
@@ -271,15 +248,30 @@ export default {
|
|
|
pageSize: 10, // 每页数量
|
|
|
listTotal: 0, // 列表总数
|
|
|
dataList: [],
|
|
|
+ detailsId: "",
|
|
|
+ detailsType: "",
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
-
|
|
|
- },
|
|
|
created() {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ quedingesOrderPayOk(row){
|
|
|
+ esOrderPayOk({
|
|
|
+ esOrderId:row.esOrderId
|
|
|
+ }).then(res=>{
|
|
|
+ this.$message({ type: 'success', message: `确定成功!` })
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ quedingesOrderCancel(row){
|
|
|
+ esOrderCancel({
|
|
|
+ esOrderId:row.esOrderId
|
|
|
+ }).then(res=>{
|
|
|
+ this.$message({ type: 'success', message: `取消成功!` })
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ },
|
|
|
add(){
|
|
|
this.$refs.tabPage.addTab({
|
|
|
// 对应显示的模块
|
|
@@ -298,7 +290,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- viewDetails(){
|
|
|
+ viewDetails(row, type){
|
|
|
this.$refs.tabPage.addTab({
|
|
|
// 对应显示的模块
|
|
|
activeKey: "details",
|
|
@@ -308,7 +300,8 @@ export default {
|
|
|
label: "订单详情",
|
|
|
// 打开时事件
|
|
|
triggerEvent: () => {
|
|
|
-
|
|
|
+ this.detailsId = row.esOrderId
|
|
|
+ this.detailsType = type
|
|
|
},
|
|
|
// 关闭时事件
|
|
|
closeEvent: () => {
|
|
@@ -316,7 +309,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- viewMaterialFlow(){
|
|
|
+ viewMaterialFlow(row){
|
|
|
this.$refs.tabPage.addTab({
|
|
|
// 对应显示的模块
|
|
|
activeKey: "materialFlow",
|
|
@@ -326,7 +319,7 @@ export default {
|
|
|
label: "查看物流",
|
|
|
// 打开时事件
|
|
|
triggerEvent: () => {
|
|
|
-
|
|
|
+ this.detailsId = row.esOrderId
|
|
|
},
|
|
|
// 关闭时事件
|
|
|
closeEvent: () => {
|
|
@@ -362,16 +355,12 @@ export default {
|
|
|
this.listTotal = res.data.total;
|
|
|
})
|
|
|
},
|
|
|
- openForm(type, order) {
|
|
|
-
|
|
|
- },
|
|
|
// 更改每页数量
|
|
|
handleSizeChange(val) {
|
|
|
this.pageSize = val;
|
|
|
this.currentPage = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
-
|
|
|
// 更改当前页
|
|
|
handleCurrentChange(val) {
|
|
|
this.currentPage = val;
|
|
@@ -388,6 +377,23 @@ export default {
|
|
|
this.currentPage = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ // 导出
|
|
|
+ handleExport() {
|
|
|
+ let params = {
|
|
|
+ orderId: this.screenForm.orderId, // 订单号
|
|
|
+ esGoodsName: this.screenForm.esGoodsName, // 商品名称
|
|
|
+ userName: this.screenForm.userName, // 会员昵称
|
|
|
+ userMobile: this.screenForm.userMobile, // 手机号
|
|
|
+ status: this.screenForm.status, // 状态
|
|
|
+ startCreateTime: this.screenForm.createDate[0] ? this.screenForm.createDate[0] : null, // 创建时间
|
|
|
+ endCreateTime: this.screenForm.createDate[1] ? this.screenForm.createDate[1] : null, // 创建时间
|
|
|
+ startPayTime: this.screenForm.payDate[0] ? this.screenForm.payDate[0] : null, // 支付时间
|
|
|
+ endPayTime: this.screenForm.payDate[1] ? this.screenForm.payDate[1] : null, // 支付时间
|
|
|
+ pageNum: this.currentPage,
|
|
|
+ pageSize: this.pageSize
|
|
|
+ };
|
|
|
+ downloadFiles('esOrder/listExcel', params);
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
|