Commit d0765b2c by huaying

fix: 导出订单

parent 360988a8
......@@ -19,7 +19,8 @@
<div class="operate-top">
<div class="fl">
<div class="search-item m-r-10">
<span>下单时间</span><el-date-picker
<span>下单时间</span
><el-date-picker
class="date-picker"
@change="changeTime"
v-model="dateValue"
......@@ -39,7 +40,7 @@
<el-input
placeholder="请输入关键词搜索"
v-model.trim="searchValue"
style="width:280px;"
style="width: 280px"
clearable
@keyup.enter.native="handleInputSearch(searchValue)"
@clear="handleInputSearch(searchValue)"
......@@ -48,7 +49,7 @@
v-model="searchType"
slot="prepend"
placeholder="请选择"
style="width:100px;"
style="width: 100px"
>
<el-option label="订单编号" :value="1" />
<el-option label="卡券名称" :value="2" />
......@@ -80,19 +81,29 @@
<div class="fr">
<el-button
@click="exportExcel"
v-if="integralMallProId && $getButtonLimit($buttonCode.couponExchangeExport)"
v-if="
integralMallProId && $getButtonLimit($buttonCode.couponExchangeExport)
"
type="primary"
:limit-code="$buttonCode.couponExchangeExport"
>
<i class="iconfont icon-icon_yunxiazai" style="margin-right:5px" />导出订单
<i
class="iconfont icon-icon_yunxiazai"
style="margin-right: 5px"
/>导出订单
</el-button>
<el-button
@click="exportExcelAll"
v-if="!integralMallProId && $getButtonLimit($buttonCode.couponExchangeExport)"
v-if="
!integralMallProId && $getButtonLimit($buttonCode.couponExchangeExport)
"
type="primary"
:limit-code="$buttonCode.couponExchangeExport"
>
<i class="iconfont icon-icon_yunxiazai" style="margin-right:5px" />导出订单
<i
class="iconfont icon-icon_yunxiazai"
style="margin-right: 5px"
/>导出订单
</el-button>
</div>
</div>
......@@ -119,27 +130,60 @@
<!-- 折扣券 -->
<!-- <img v-if="scope.row.cardType === 1" src="../../../static/img/zhe.png" alt="" /> -->
<!-- 兑换券 -->
<img v-if="scope.row.giftMainPic" :src="scope.row.giftMainPic" alt="">
<img v-if="scope.row.cardType === 2 && !scope.row.giftMainPic" src="../../../static/img/quan02.png" alt="">
<img v-if="scope.row.giftMainPic" :src="scope.row.giftMainPic" alt="" />
<img
v-if="scope.row.cardType === 2 && !scope.row.giftMainPic"
src="../../../static/img/quan02.png"
alt=""
/>
<!-- 抵金券 -->
<img v-if="scope.row.cardType === 0 && !scope.row.giftMainPic" src="../../../static/img/quan01.png" alt="">
<img
v-if="scope.row.cardType === 0 && !scope.row.giftMainPic"
src="../../../static/img/quan01.png"
alt=""
/>
<!-- 折扣券 -->
<img v-if="scope.row.cardType === 1 && !scope.row.giftMainPic" src="../../../static/img/quan03.png" alt="">
<img
v-if="scope.row.cardType === 1 && !scope.row.giftMainPic"
src="../../../static/img/quan03.png"
alt=""
/>
<!-- 商场券 -->
<img v-if="scope.row.cardType === 3 && !scope.row.giftMainPic" src="../../../static/img/quan04.png" alt>
<img
v-if="scope.row.cardType === 3 && !scope.row.giftMainPic"
src="../../../static/img/quan04.png"
alt
/>
<div class="info-name">
<p class="pro-ellipsis">
{{ scope.row.giftName }}
</p>
<el-tooltip :content="scope.row.proReferId" placement="top" v-if="scope.row.proReferId.indexOf(',') === -1">
<p style="font-size:13px;color:#909399;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
<el-tooltip
:content="scope.row.proReferId"
placement="top"
v-if="scope.row.proReferId.indexOf(',') === -1"
>
<p
style="
font-size: 13px;
color: #909399;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>
卡券编号:{{ scope.row.proReferId }}
</p>
</el-tooltip>
<p style="font-size:13px;color:#909399" v-if="scope.row.proReferId.indexOf(',') === -1">
<p
style="font-size: 13px; color: #909399"
v-if="scope.row.proReferId.indexOf(',') === -1"
>
<span v-if="scope.row.status === 2">已领取</span>
<span v-if="scope.row.status <= 1 && scope.row.status != -2">待领取</span>
<span v-if="scope.row.status <= 1 && scope.row.status != -2"
>待领取</span
>
<span v-if="scope.row.status != -2"> / </span>
<span v-if="scope.row.useStatus === 5">已使用</span>
<span v-if="scope.row.useStatus === 0">待使用</span>
......@@ -156,25 +200,43 @@
sortable="custom"
>
<template slot-scope="scope">
<p style="line-height:18px">
{{ scope.row.createTime ? getTime(scope.row.createTime) : '--' }}
<p style="line-height: 18px">
{{ scope.row.createTime ? getTime(scope.row.createTime) : "--" }}
</p>
<p style="line-height:18px" class="gray-color">
{{ scope.row.createTime ? getSeconds(scope.row.createTime) : '--' }}
<p style="line-height: 18px" class="gray-color">
{{ scope.row.createTime ? getSeconds(scope.row.createTime) : "--" }}
</p>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="优惠券创建人" min-width="130px" />
<el-table-column prop="definedCode" label="订单编号" min-width="170px">
<template slot-scope="scope">
<el-dropdown @visible-change="i => getOrderInfo(i, scope.row.integralMallProExchangeId)" trigger="click" class="drop-list">
<span class="el-dropdown-link"> {{ scope.row.definedCode }}<i class="iconfont icon-icon-" /> </span>
<el-dropdown
@visible-change="
(i) => getOrderInfo(i, scope.row.integralMallProExchangeId)
"
trigger="click"
class="drop-list"
>
<span class="el-dropdown-link">
{{ scope.row.definedCode }}<i class="iconfont icon-icon-" />
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="orderInfo.definedCode">
订单编号:{{ orderInfo.orderNumber }}
</el-dropdown-item>
<el-dropdown-item command="orderInfo.definedCode">
兑换渠道:{{ orderInfo.source === '0' ? '小程序' : orderInfo.source === '1' ? '二维码扫描' : orderInfo.source === '3' ? '常规兑换' : orderInfo.source === '2' ? '其他' : '' }}
兑换渠道:{{
orderInfo.source === "0"
? "小程序"
: orderInfo.source === "1"
? "二维码扫描"
: orderInfo.source === "3"
? "常规兑换"
: orderInfo.source === "2"
? "其他"
: ""
}}
</el-dropdown-item>
<el-dropdown-item command="orderInfo.definedCode">
商户支付号:{{ orderInfo.merchantNumber }}
......@@ -183,19 +245,28 @@
支付流水号:{{ orderInfo.payNumber }}
</el-dropdown-item>
<el-dropdown-item command="orderInfo.definedCode">
下单时间:{{ orderInfo.orderTime ? getTimeAll(orderInfo.orderTime) : '--' }}
下单时间:{{
orderInfo.orderTime ? getTimeAll(orderInfo.orderTime) : "--"
}}
</el-dropdown-item>
<el-dropdown-item command="orderInfo.definedCode">
付款时间:{{ orderInfo.payTime ? getTimeAll(orderInfo.payTime) : '--' }}
付款时间:{{
orderInfo.payTime ? getTimeAll(orderInfo.payTime) : "--"
}}
</el-dropdown-item>
<el-dropdown-item command="orderInfo.definedCode">
发货时间:{{ orderInfo.deliveryTime ? getTimeAll(orderInfo.deliveryTime) : '--' }}
发货时间:{{
orderInfo.deliveryTime ? getTimeAll(orderInfo.deliveryTime) : "--"
}}
</el-dropdown-item>
<el-dropdown-item command="orderInfo.definedCode">
交易完成时间:{{ orderInfo.finishTime ? getTimeAll(orderInfo.finishTime) : '--' }}
交易完成时间:{{
orderInfo.finishTime ? getTimeAll(orderInfo.finishTime) : "--"
}}
</el-dropdown-item>
<el-dropdown-item command="orderInfo.definedCode">
收货信息:{{ orderInfo.definedCode }} {{ orderInfo.consignee }} {{ orderInfo.consigneePhone }} {{ orderInfo.receivingAddress }}
收货信息:{{ orderInfo.definedCode }} {{ orderInfo.consignee }}
{{ orderInfo.consigneePhone }} {{ orderInfo.receivingAddress }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -203,7 +274,11 @@
</el-table-column>
<el-table-column label="会员" min-width="150px">
<template slot-scope="scope">
<memberInfo :memberObj="scope.row" :requestProject="requestProject" :placement="placement" />
<memberInfo
:memberObj="scope.row"
:requestProject="requestProject"
:placement="placement"
/>
</template>
</el-table-column>
<!-- <el-table-column prop="memberCardStatus" label="会员状态" min-width="120px">
......@@ -218,12 +293,8 @@
min-width="120px"
>
<template slot-scope="scope">
<p style="line-height:18px">
积分:{{ scope.row.unitCostIntegral }}
</p>
<p style="line-height:18px">
现金:¥{{ scope.row.payCost }}
</p>
<p style="line-height: 18px">积分:{{ scope.row.unitCostIntegral }}</p>
<p style="line-height: 18px">现金:¥{{ scope.row.payCost }}</p>
</template>
</el-table-column>
<el-table-column
......@@ -233,15 +304,21 @@
min-width="170px"
>
<template slot-scope="scope">
<p style="line-height:18px">
<p style="line-height: 18px">
<span v-if="scope.row.status <= 0">交易关闭</span>
<span v-if="scope.row.status === 2 || scope.row.status === 1">买家已付款</span>
<span v-if="scope.row.status === 2 || scope.row.status === 1"
>买家已付款</span
>
<span v-if="scope.row.status === 11">待付款</span>
</p>
<p style="line-height:18px">
<p style="line-height: 18px">
<el-button
type="text"
v-if="scope.row.status === 11 && scope.row.refundStatus !== 2 && $getButtonLimit($buttonCode.couponExchangeClose)"
v-if="
scope.row.status === 11 &&
scope.row.refundStatus !== 2 &&
$getButtonLimit($buttonCode.couponExchangeClose)
"
@click="closeOrderNoPay(scope.row)"
:limit-code="$buttonCode.couponExchangeClose"
>
......@@ -253,13 +330,13 @@
<template slot="empty">
<div class="no-data-wrap">
<div class="no-data-icon">
<img src="../../../static/img/no-data_icon.png">
<img src="../../../static/img/no-data_icon.png" />
</div>
<p>暂无数据</p>
</div>
</template>
</el-table>
<div class="pagination-conteiner" style="background:#fff;">
<div class="pagination-conteiner" style="background: #fff">
<div class="pagination">
<dm-pagination
v-if="total != 0"
......@@ -385,7 +462,7 @@ export default {
const params = {
creatorName: v,
};
request.get('/api-integral-mall/list-creator', { params }).then(res => {
request.get('/api-integral-mall/list-creator', { params }).then((res) => {
if (res.data.errorCode === 0) {
if (res.data.result) {
cb(res.data.result);
......@@ -399,7 +476,7 @@ export default {
});
},
getStatus () {
request.post('/api-integral-mall/is-show-self ').then(res => {
request.post('/api-integral-mall/is-show-self ').then((res) => {
if (res.data.errorCode === 0) {
this.showFlag = res.data.result.showFlag;
// this.openFlag = res.data.result.openFlag;
......@@ -445,7 +522,8 @@ export default {
}
this.params = {
orderStatus: this.orderStatus,
changeType: this.changeType,
// changeType: this.changeType,
changeType: -1,
searchParams: this.searchValue,
searchType: this.searchType,
beginTime: this.beginTime,
......@@ -461,17 +539,25 @@ export default {
// 计算自然月
natureMonth (curDate, step) {
if (!curDate || !step) return curDate;
if (typeof curDate === 'string') curDate = new Date(curDate.replace(/[\/|\.]/g, '-')); // new Date(str) 对str格式的,ios只支持yyyy-MM-dd
if (typeof curDate === 'string') { curDate = new Date(curDate.replace(/[\/|\.]/g, '-')); } // new Date(str) 对str格式的,ios只支持yyyy-MM-dd
const targetDateLastDay = new Date(curDate.getFullYear(), curDate.getMonth() + step + 1, 0);
const targetDate = new Date(curDate.getFullYear(), curDate.getMonth() + step, Math.min(curDate.getDate(), targetDateLastDay.getDate()));
const targetDateLastDay = new Date(
curDate.getFullYear(),
curDate.getMonth() + step + 1,
0,
);
const targetDate = new Date(
curDate.getFullYear(),
curDate.getMonth() + step,
Math.min(curDate.getDate(), targetDateLastDay.getDate()),
);
return this.formatDate(targetDate, 'yyyy-MM-dd');
},
formatDate (dateObj, format) {
const month = dateObj.getMonth() + 1;
const date = dateObj.getDate();
return format.replace(/yyyy|MM|dd/g, field => {
return format.replace(/yyyy|MM|dd/g, (field) => {
switch (field) {
case 'yyyy':
return dateObj.getFullYear();
......@@ -525,7 +611,9 @@ export default {
const params = {
integralMallProExchangeId: integralMallProExchangeId,
};
request.get('/api-integral-mall/get-order-information', { params }).then(res => {
request
.get('/api-integral-mall/get-order-information', { params })
.then((res) => {
if (res.data.errorCode === 0) {
// this.loading = false;
if (res.data.result) {
......@@ -580,7 +668,9 @@ export default {
integralMallProId: this.integralMallProId ? this.integralMallProId : '',
};
this.loading = true;
request.post('/api-integral-mall/page-undeliver', qs.stringify(params)).then(res => {
request
.post('/api-integral-mall/page-undeliver', qs.stringify(params))
.then((res) => {
if (res.data.errorCode === 0) {
if (res.data.result.rows) {
this.tableData = res.data.result.rows;
......@@ -612,7 +702,7 @@ export default {
integralMallProExchangeId: item.integralMallProExchangeId,
optType: 4,
};
request.get('/api-integral-mall/order-opt', { params }).then(res => {
request.get('/api-integral-mall/order-opt', { params }).then((res) => {
if (res.data.errorCode === 0) {
this.$message.success('关闭订单成功');
this.getList();
......@@ -627,7 +717,7 @@ export default {
<style lang="less" scoped>
/deep/.el-tabs__header .el-tabs__nav-wrap::after {
content: "";
height: 1px!important;
height: 1px !important;
}
.m-r-10 {
margin-right: 10px;
......
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