mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-05-06 08:21:26 +08:00
全新UI视觉体验,移动端API优化降低重复调用,提高并发6倍,修复N多Bug
This commit is contained in:
@@ -31,8 +31,18 @@
|
||||
</el-radio-group>
|
||||
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 220px;" @change="onchangeTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单类型:" class="width100">
|
||||
<el-select v-model="tableFrom.type" placeholder="请选择" class="selWidth" @change="seachList">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号:" class="width100">
|
||||
<el-input v-model="tableFrom.orderId" placeholder="请输入订单号" class="selWidth" size="small" clearable>
|
||||
<el-input v-model="tableFrom.orderNo" placeholder="请输入订单号" class="selWidth" size="small" clearable>
|
||||
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -49,27 +59,27 @@
|
||||
highlight-current-row
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="商品总价:">
|
||||
<span>{{ props.row.totalPrice }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="推广人:">
|
||||
<span>{{ props.row.spreadInfo.id + ' / ' + props.row.spreadInfo.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户备注:">
|
||||
<span>{{ props.row.mark }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家备注:">
|
||||
<span>{{ props.row.remark }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="核销码:" v-if="props.row.shippingType === 2">
|
||||
<span>{{ props.row.verifyCode }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column type="expand">-->
|
||||
<!--<template slot-scope="props">-->
|
||||
<!--<el-form label-position="left" inline class="demo-table-expand">-->
|
||||
<!--<el-form-item label="商品总价:">-->
|
||||
<!--<span>{{ props.row.totalPrice | filterEmpty }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="推广人:">-->
|
||||
<!--<span>{{ props.row.spreadInfo.id + ' / ' + props.row.spreadInfo.name }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="用户备注:">-->
|
||||
<!--<span>{{ props.row.mark | filterEmpty }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="商家备注:">-->
|
||||
<!--<span>{{ props.row.remark | filterEmpty }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-form-item label="核销码:" v-if="props.row.verifyCode">-->
|
||||
<!--<span>{{ props.row.verifyCode }}</span>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-form>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
@@ -102,13 +112,13 @@
|
||||
<div v-for="(val, i ) in scope.row.productList" :key="i" class="tabBox acea-row row-middle" style="flex-wrap: inherit;">
|
||||
<div class="demo-image__preview mr10">
|
||||
<el-image
|
||||
:src="val.info.productInfo.image"
|
||||
:preview-src-list="[val.info.productInfo.image]"
|
||||
:src="val.info.image"
|
||||
:preview-src-list="[val.info.image]"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<span class="tabBox_tit mr10">{{ val.info.productInfo.storeName + ' | ' }}{{ val.info.productInfo.attrInfo.suk ? val.info.productInfo.attrInfo.suk:'-' }}</span>
|
||||
<span class="tabBox_pice">{{ '¥'+ val.info.productInfo.attrInfo.price ? val.info.productInfo.attrInfo.price + ' x '+ val.info.cartNum : '-' }}</span>
|
||||
<span class="tabBox_tit mr10">{{ val.info.productName + ' | ' }}{{ val.info.sku ? val.info.sku:'-' }}</span>
|
||||
<span class="tabBox_pice">{{ '¥'+ val.info.price ? val.info.price + ' x '+ val.info.payNum : '-' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -162,15 +172,15 @@
|
||||
<el-table-column label="操作" min-width="150" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.paid === false" type="text" size="small" @click="edit(scope.row)" class="mr10">编辑</el-button>
|
||||
<el-button v-if="scope.row.statusStr.key === 'notShipped' && scope.row.shippingType === 1 && scope.row.refundStatus !==2" type="text" size="small" class="mr10" @click="sendOrder(scope.row)">发送货</el-button>
|
||||
<el-button v-if="scope.row.shippingType === 2 && scope.row.statusStr.key === 'toBeWrittenOff' && scope.row.paid == true && scope.row.refundStatus === 0 " type="text" size="small" class="mr10" @click="onWriteOff(scope.row)">立即核销</el-button>
|
||||
<el-button v-if="scope.row.statusStr.key === 'notShipped' && scope.row.refundStatus ===0" type="text" size="small" class="mr10" @click="sendOrder(scope.row)">发送货</el-button>
|
||||
<el-button v-if=" scope.row.statusStr.key === 'toBeWrittenOff' && scope.row.paid == true && scope.row.refundStatus === 0 " type="text" size="small" class="mr10" @click="onWriteOff(scope.row)">立即核销</el-button>
|
||||
<el-dropdown trigger="click">
|
||||
<span class="el-dropdown-link">
|
||||
更多<i class="el-icon-arrow-down el-icon--right" />
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="onOrderDetails(scope.row.id)">订单详情</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="onOrderLog(scope.row.id)">订单记录</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="onOrderDetails(scope.row.orderId)">订单详情</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="onOrderLog(scope.row.orderId)">订单记录</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="onOrderMark(scope.row)">订单备注</el-dropdown-item>
|
||||
<el-dropdown-item v-show="scope.row.refundStatus === 1" @click.native="onOrderRefuse(scope.row)">拒绝退款</el-dropdown-item>
|
||||
<!--v-show="((scope.row.statusStr.key !== 'refunded' && scope.row.statusStr.key !== 'unPaid') && (parseFloat(scope.row.payPrice) >= parseFloat(scope.row.refundPrice))) || (scope.row.payPrice == 0 && [0,1].indexOf(scope.row.refundStatus) !== -1)"-->
|
||||
@@ -259,6 +269,9 @@
|
||||
<!-- 发送货 -->
|
||||
<order-send ref="send" :orderId="orderId" @submitFail="getList"></order-send>
|
||||
|
||||
<!-- 发送货视频号商品 -->
|
||||
<order-video-send ref="videoSend" :orderId="orderId" @submitFail="getList"></order-video-send>
|
||||
|
||||
<!--拒绝退款-->
|
||||
<el-dialog
|
||||
title="拒绝退款原因"
|
||||
@@ -274,7 +287,7 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!--立即拒绝-->
|
||||
<!--立即退款-->
|
||||
<el-dialog
|
||||
title="退款处理"
|
||||
:visible.sync="refundVisible"
|
||||
@@ -293,11 +306,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { writeUpdateApi, orderListApi, orderUpdateApi, orderLogApi, orderMarkApi, orderDeleteApi, orderRefuseApi, orderRefundApi } from '@/api/order'
|
||||
import { orderListDataApi, orderStatusNumApi, writeUpdateApi, orderListApi, orderUpdateApi, orderLogApi, orderMarkApi, orderDeleteApi, orderRefuseApi, orderRefundApi } from '@/api/order'
|
||||
import cardsData from '@/components/cards/index'
|
||||
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
|
||||
import detailsFrom from './orderDetail'
|
||||
import orderSend from './orderSend'
|
||||
import orderVideoSend from './orderVideoSend'
|
||||
import { storeStaffListApi } from '@/api/storePoint'
|
||||
import Cookies from 'js-cookie'
|
||||
import { isWriteOff } from "@/utils";
|
||||
@@ -307,13 +321,21 @@
|
||||
cardsData,
|
||||
zbParser,
|
||||
detailsFrom,
|
||||
orderSend
|
||||
orderSend,
|
||||
orderVideoSend
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: [{
|
||||
value: 0,
|
||||
label: '商城订单'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '视频号订单'
|
||||
}],
|
||||
RefuseVisible: false,
|
||||
RefuseData:{},
|
||||
orderId: 0,
|
||||
orderId: '',
|
||||
refundVisible: false,
|
||||
refundData: {},
|
||||
dialogVisibleJI: false,
|
||||
@@ -324,7 +346,7 @@
|
||||
tableFromLog: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
oid: null
|
||||
orderNo: 0
|
||||
},
|
||||
LogLoading: false,
|
||||
isCreate: 1,
|
||||
@@ -338,9 +360,10 @@
|
||||
tableFrom: {
|
||||
status: 'all',
|
||||
dateLimit: '',
|
||||
orderId: '',
|
||||
orderNo: '',
|
||||
page: 1,
|
||||
limit: 20
|
||||
limit: 20,
|
||||
type: ''
|
||||
},
|
||||
orderChartType: {},
|
||||
timeVal: [],
|
||||
@@ -349,11 +372,14 @@
|
||||
ids: '',
|
||||
orderids: '',
|
||||
cardLists: [],
|
||||
isWriteOff: isWriteOff()
|
||||
isWriteOff: isWriteOff(),
|
||||
proType: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
this.getOrderStatusNum();
|
||||
this.getOrderListData();
|
||||
},
|
||||
methods: {
|
||||
resetFormRefundhandler(){
|
||||
@@ -384,7 +410,7 @@
|
||||
this.RefuseVisible = false
|
||||
},
|
||||
onOrderRefuse(row) {
|
||||
this.orderids = row.id
|
||||
this.orderids = row.orderId
|
||||
this.RefuseData = {
|
||||
orderId: row.orderId,
|
||||
reason: ''
|
||||
@@ -392,7 +418,7 @@
|
||||
this.RefuseVisible = true
|
||||
},
|
||||
RefusehandlerSubmit(formValue) {
|
||||
orderRefuseApi({ id: this.orderids, reason: formValue.reason}).then(data => {
|
||||
orderRefuseApi({ orderNo: this.orderids, reason: formValue.reason}).then(data => {
|
||||
this.$message.success('操作成功')
|
||||
this.RefuseVisible = false
|
||||
this.getList()
|
||||
@@ -408,11 +434,11 @@
|
||||
amount: row.payPrice,
|
||||
type: ''
|
||||
}
|
||||
this.orderids = row.id
|
||||
this.orderids = row.orderId
|
||||
this.refundVisible = true
|
||||
},
|
||||
refundhandlerSubmit(formValue) {
|
||||
orderRefundApi({ amount: formValue.amount, orderId: this.orderids, type: formValue.type}).then(data => {
|
||||
orderRefundApi({ amount: formValue.amount, orderNo: this.orderids}).then(data => {
|
||||
this.$message.success('操作成功')
|
||||
this.refundVisible = false
|
||||
this.getList()
|
||||
@@ -420,16 +446,21 @@
|
||||
},
|
||||
// 发送
|
||||
sendOrder(row) {
|
||||
this.$refs.send.modals = true;
|
||||
this.$refs.send.getList();
|
||||
this.$refs.send.sheetInfo();
|
||||
this.orderId = row.id;
|
||||
if(row.type===0){
|
||||
this.$refs.send.modals = true;
|
||||
this.$refs.send.getList();
|
||||
this.$refs.send.sheetInfo();
|
||||
}else{
|
||||
this.$refs.videoSend.modals = true;
|
||||
if(!JSON.parse(sessionStorage.getItem('videoExpress'))) this.$refs.videoSend.companyGetList();
|
||||
}
|
||||
this.orderId = row.orderId;
|
||||
},
|
||||
// 订单删除
|
||||
handleDelete(row, idx) {
|
||||
if (row.isDel) {
|
||||
this.$modalSure().then(() => {
|
||||
orderDeleteApi({ id: row.id }).then(() => {
|
||||
orderDeleteApi({ orderNo: row.orderId }).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.tableData.data.splice(idx, 1)
|
||||
})
|
||||
@@ -451,7 +482,7 @@
|
||||
onOrderLog(id) {
|
||||
this.dialogVisibleJI = true
|
||||
this.LogLoading = true
|
||||
this.tableFromLog.oid = id
|
||||
this.tableFromLog.orderNo = id
|
||||
orderLogApi( this.tableFromLog ).then(res => {
|
||||
this.tableDataLog.data = res.list
|
||||
this.tableDataLog.total = res.total
|
||||
@@ -462,11 +493,11 @@
|
||||
},
|
||||
pageChangeLog(page) {
|
||||
this.tableFromLog.page = page
|
||||
this.getList()
|
||||
this.onOrderLog()
|
||||
},
|
||||
handleSizeChangeLog(val) {
|
||||
this.tableFromLog.limit = val
|
||||
this.getList()
|
||||
this.onOrderLog()
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false
|
||||
@@ -482,7 +513,7 @@
|
||||
inputPlaceholder: '请输入订单备注',
|
||||
inputValidator: (value) => { if(!value) return '输入不能为空'}
|
||||
}).then(({value}) => {
|
||||
orderMarkApi({ mark : value, id: row.id}).then(() => {
|
||||
orderMarkApi({ mark : value, orderNo: row.orderId}).then(() => {
|
||||
this.$message.success('操作成功')
|
||||
this.getList();
|
||||
})
|
||||
@@ -503,6 +534,8 @@
|
||||
this.timeVal = [];
|
||||
this.tableFrom.page = 1
|
||||
this.getList();
|
||||
this.getOrderStatusNum();
|
||||
this.getOrderListData();
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime (e) {
|
||||
@@ -510,6 +543,8 @@
|
||||
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
|
||||
this.tableFrom.page = 1
|
||||
this.getList();
|
||||
this.getOrderStatusNum();
|
||||
this.getOrderListData();
|
||||
},
|
||||
// 编辑
|
||||
edit(row) {
|
||||
@@ -535,21 +570,30 @@
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
orderListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list.list || []
|
||||
this.tableData.total = res.list.total
|
||||
this.orderChartType = res.status
|
||||
const stat = res.top
|
||||
this.cardLists = [
|
||||
{ name: '订单数量', count: stat.count },
|
||||
{ name: '订单金额', count: stat.amount },
|
||||
{ name: '微信支付金额', count: stat.weChatAmount },
|
||||
{ name: '余额支付金额', count: stat.yueAmount }
|
||||
]
|
||||
this.tableData.data = res.list || [];
|
||||
this.tableData.total = res.total;
|
||||
this.listLoading = false
|
||||
}).catch(() => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
// 数据统计
|
||||
getOrderListData() {
|
||||
orderListDataApi({dateLimit:this.tableFrom.dateLimit}).then(res => {
|
||||
this.cardLists = [
|
||||
{ name: '订单数量', count: res.count },
|
||||
{ name: '订单金额', count: res.amount },
|
||||
{ name: '微信支付金额', count: res.weChatAmount },
|
||||
{ name: '余额支付金额', count: res.yueAmount }
|
||||
]
|
||||
});
|
||||
},
|
||||
// 获取各状态数量
|
||||
getOrderStatusNum() {
|
||||
orderStatusNumApi({dateLimit:this.tableFrom.dateLimit}).then(res => {
|
||||
this.orderChartType = res;
|
||||
});
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
|
||||
Reference in New Issue
Block a user