437 行
20 KiB
HTML
可执行文件
437 行
20 KiB
HTML
可执行文件
<!--[1.8.68]-->
|
|
<link rel="stylesheet" href="/Public/Retail/css/order-details.css">
|
|
<link rel="stylesheet" href="/Public/css/component-serial.css">
|
|
<link rel="stylesheet" href="/Public/css/component-serial-modify-record.css">
|
|
<link rel="stylesheet" href="/Public/css/component-blessing.css">
|
|
<script src="/Public/js/component-serial.js?v=1.0.0"></script>
|
|
<script src="/Public/js/component-serial-modify-record.js?v=1.0.0"></script>
|
|
<script src="/Public/js/component-blessing.js?v=1.0.0"></script>
|
|
<script src="/Public/Retail/js/order-details.js"></script>
|
|
|
|
<div id="xcxOrderApp" v-cloak>
|
|
<div class="page-title">待处理</div>
|
|
<div class="table-top-card-box">
|
|
<div class="table-top-card flex-card">
|
|
<div class="table-top-card-header">待发货订单</div>
|
|
<div class="table-top-card-body">
|
|
<el-button type="text" @click="search(3)">{{expressOrder}}</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="table-top-card flex-card">
|
|
<div class="table-top-card-header">待配送订单</div>
|
|
<div class="table-top-card-body">
|
|
<el-button type="text" @click="search(2)">{{sameCityOrder}}</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="table-top-card flex-card">
|
|
<div class="table-top-card-header">待自提订单</div>
|
|
<div class="table-top-card-body">
|
|
<el-button type="text" @click="search(1)">{{selfExtractionOrder}}</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="page-title">订单</div>
|
|
|
|
<el-form :inline="true" size="small">
|
|
<el-form-item>
|
|
<date-picker-range :date-time.sync="time_range"></date-picker-range>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-input class="page-input" placeholder="请输入单号" type="text" v-model="title" clearable
|
|
@keydown.enter.exact.native.prevent="search">
|
|
</el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-input class="page-input" placeholder="会员手机号" type="text" v-model="card" clearable
|
|
@keydown.enter.exact.native.prevent="search">
|
|
</el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-select v-model="pay" placeholder="付款方式" clearable>
|
|
<el-option label="微信支付" value="6"></el-option>
|
|
<el-option label="会员余额" value="5"></el-option>
|
|
<el-option label="组合支付" value="8"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-select v-model="user_type" placeholder="用户类型" clearable>
|
|
<el-option label="会员" value="1"></el-option>
|
|
<el-option label="普通用户" value="2"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-select v-model="deliveryMethod" placeholder="配送方式" clearable>
|
|
<el-option label="快递配送" :value="3" :disabled="[4,5].includes(deliveryStatus)"></el-option>
|
|
<el-option label="同城配送" :value="2" :disabled="[4,5].includes(deliveryStatus)"></el-option>
|
|
<el-option label="自提" :value="1" :disabled="[1,2,3].includes(deliveryStatus)"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-select v-model="deliveryStatus" placeholder="配送状态" clearable>
|
|
<el-option label="待发货/待配送" :value="1" :disabled="deliveryMethod == 1"></el-option>
|
|
<el-option label="已发货/已配送" :value="2" :disabled="deliveryMethod == 1"></el-option>
|
|
<el-option label="已收货/已送达" :value="3" :disabled="deliveryMethod == 1"></el-option>
|
|
<el-option label="待自提" :value="4" :disabled="[2,3].includes(deliveryMethod)"></el-option>
|
|
<el-option label="已自提" :value="5" :disabled="[2,3].includes(deliveryMethod)"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" @click="search">查询</el-button>
|
|
|
|
<el-button v-if="storeAuth.data_export==1 && operate.export" @click="exportOrd">导出
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<div class="table-top-card-box">
|
|
<div class="table-top-card">
|
|
<div class="table-top-card-header">销售总额</div>
|
|
<div class="table-top-card-body">{{all_money}}</div>
|
|
</div>
|
|
<div class="table-top-card">
|
|
<div class="table-top-card-header">优惠券总额</div>
|
|
<div class="table-top-card-body">{{coupon_money}}</div>
|
|
</div>
|
|
<div class="table-top-card">
|
|
<div class="table-top-card-header">代金券总额</div>
|
|
<div class="table-top-card-body">{{pay_coupon_money}}</div>
|
|
</div>
|
|
<div class="table-top-card">
|
|
<div class="table-top-card-header">会员价优惠总额</div>
|
|
<div class="table-top-card-body">{{less_money}}</div>
|
|
</div>
|
|
<div class="table-top-card">
|
|
<div class="table-top-card-header">会员折扣总额</div>
|
|
<div class="table-top-card-body">{{dis_money}}</div>
|
|
</div>
|
|
<div class="table-top-card">
|
|
<div class="table-top-card-header">积分抵扣总额</div>
|
|
<div class="table-top-card-body">{{integral_money}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="max-width: calc(100vw - 208px);margin-top: 10px;">
|
|
<el-table border :data="list" size="mini" max-height="500"
|
|
:header-cell-style="{background:'#F5F7FA',color:'#606266'}">
|
|
<el-table-column align="center" type="index" label="序号" width="50" fixed></el-table-column>
|
|
<el-table-column align="center" prop="order_no" label="单号" width="144" show-overflow-tooltip fixed>
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="vip_phone" label="会员手机号" show-overflow-tooltip min-width="100">
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="all_money" label="金额(元)" min-width="70" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<el-button type="text" size="mini"
|
|
@click="details_order_no=scope.row.order_no;showPayDetails=true;">
|
|
{{scope.row.all_money}}
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="payname" label="支付类型" min-width="90"></el-table-column>
|
|
<el-table-column align="center" prop="use_integral" label="使用积分" min-width="60" show-overflow-tooltip>
|
|
</el-table-column>
|
|
<el-table-column align="center" label="优惠券" min-width="100" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template v-if="scope.row.reduction==2">
|
|
<p v-if="scope.row.coupon_money">{{scope.row.coupon_money}}</p>
|
|
<p v-if="scope.row.pay_coupon_fee">{{scope.row.pay_coupon_fee}}</p>
|
|
</template>
|
|
<span v-else>——</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="vip_dis_money" label="折扣+优惠" min-width="60" show-overflow-tooltip>
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="addtime" label="下单时间" min-width="140" show-overflow-tooltip>
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="isneedsend_name" label="取货类型" min-width="60" show-overflow-tooltip>
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="user_select_time" label="配送货自取时间" min-width="140"
|
|
show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" prop="user_name" label="联系人" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" prop="user_phone" label="联系人手机号" min-width="80" show-overflow-tooltip>
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="user_address" label="地址" show-overflow-tooltip></el-table-column>
|
|
<el-table-column align="center" prop="have_away" min-width="60" label="状态" show-overflow-tooltip>
|
|
</el-table-column>
|
|
<el-table-column align="center" fixed="right" label="操作" min-width="150">
|
|
<template slot-scope="scope">
|
|
|
|
<el-button type="text" @click="showOrderDetails = true;details_order_no = scope.row.order_no"
|
|
size="mini">详情
|
|
</el-button>
|
|
|
|
<el-button type="text" v-if="operate.wifiPrint" @click="wifi(scope.row.id)" size="mini">wifi打印
|
|
</el-button>
|
|
|
|
<el-button type="text" v-if="operate.orderPrint" @click="print(scope.row.id)" size="mini">打印单据
|
|
</el-button>
|
|
|
|
<el-button v-if="operate.sendGoods && verifySend(scope.row)" style="color: rgb(103, 194, 58)"
|
|
type="text" @click="sendGoods(scope.row.id,scope.row.order_no)" size="mini">发货
|
|
</el-button>
|
|
|
|
<el-button v-if="operate.seeLogistics && verifyLogistics(scope.row)" type="text"
|
|
@click="seeLogistics(scope.row.id)" size="mini">
|
|
物流
|
|
</el-button>
|
|
|
|
<el-button v-if="blessingAuthority" type="text" @click="openBlessingDialog(scope.row.id)"
|
|
size="mini">
|
|
祝福
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
:page-sizes="[10, 15, 20, 25, 30, 35, 40, 45, 50]" :page-size="100"
|
|
layout="total, sizes, prev, pager, next, jumper" :total="currentLen">
|
|
</el-pagination>
|
|
</div>
|
|
|
|
<!--订单详情-->
|
|
<order-details :show.sync="showOrderDetails" :order-no="details_order_no"></order-details>
|
|
|
|
<!--支付详情-->
|
|
<pay-order-details :show.sync="showPayDetails" order-genre="1" :order-no="details_order_no"></pay-order-details>
|
|
|
|
<!-- 祝福语 -->
|
|
<component-blessing :visible.sync="blessingDialogVisible" :id="blessingOrderId"></component-blessing>
|
|
</div>
|
|
<script type="text/javascript">
|
|
var xcxOrderApp = new Vue({
|
|
el: '#xcxOrderApp',
|
|
data: {
|
|
list: [],
|
|
currentPage: 1,
|
|
currentLimit: 10,
|
|
currentLen: 0,
|
|
operate: {},
|
|
|
|
time_range: '',
|
|
title: '',
|
|
card: '',
|
|
pay: '',
|
|
user_type: '',
|
|
deliveryMethod: '', //配送方式
|
|
deliveryStatus: '', //配送状态
|
|
all_money: 0,
|
|
refund_money: 0,
|
|
dis_money: 0,
|
|
coupon_money: 0,
|
|
less_money: 0,
|
|
pay_coupon_money: 0,
|
|
integral_money: 0,
|
|
expressOrder: 0, //待发货订单数
|
|
sameCityOrder: 0, //待同城配送订单数
|
|
selfExtractionOrder: 0, //待自提订单数
|
|
|
|
showOrderDetails: false,
|
|
showPayDetails: false,
|
|
name: '',
|
|
phone: '',
|
|
distribution_fee: '',
|
|
exchange_money: '',
|
|
reduce_money: '',
|
|
toallmonety: '',
|
|
address: '',
|
|
remark: '',
|
|
details_order_no: '',
|
|
blessingDialogVisible: false, //祝福语组件开关
|
|
blessingOrderId: null, //当前祝福语订单ID
|
|
blessingAuthority: false //当前门店是否具备祝福语权限
|
|
},
|
|
methods: {
|
|
//验证是否可以发货
|
|
verifySend(item) {
|
|
return item.delivery_type == 1 && item.status == 1 && item.order_type == 1 && item.refund_status == 0 && (item.pickup_type == 2 || item.pickup_type == 3)
|
|
},
|
|
//验证是否可以查看物流
|
|
verifyLogistics(item) {
|
|
return item.delivery_type == 4 && item.order_type == 1 && item.refund_status == 0 && (item.pickup_type == 2 || item.pickup_type == 3)
|
|
},
|
|
handleSizeChange(val) {
|
|
this.currentLimit = val;//切换每页数量
|
|
this.currentPage = 1;
|
|
this.getData();
|
|
},
|
|
handleCurrentChange(val) {
|
|
this.currentPage = val;
|
|
this.getData();//切换页数
|
|
},
|
|
search(deliveryMethod = 0) {
|
|
if (deliveryMethod > 0) {
|
|
this.time_range = []
|
|
this.deliveryMethod = deliveryMethod
|
|
switch (deliveryMethod) {
|
|
case 1:
|
|
this.deliveryStatus = 4
|
|
break
|
|
case 2:
|
|
case 3:
|
|
this.deliveryStatus = 1
|
|
break
|
|
default:
|
|
this.deliveryMethod = ''
|
|
this.deliveryStatus = ''
|
|
}
|
|
}
|
|
this.getSumData();
|
|
this.currentPage = 1;
|
|
this.getData();
|
|
},
|
|
//快递发货
|
|
sendGoods(id, order_no) {
|
|
layer.open({
|
|
type: 2,
|
|
content: "{:U('Express/send_goods')}?id=" + id,
|
|
title: "发货 - " + order_no,
|
|
scrollbar: false,
|
|
area: ["calc(100% - 160px)", "calc(100% - 65px)"],
|
|
shade: 0,
|
|
offset: 'rb',
|
|
resize: false,
|
|
move: false,
|
|
end: () => {
|
|
this.getData();
|
|
this.getSumData();
|
|
},
|
|
})
|
|
},
|
|
//查看物流
|
|
seeLogistics(id) {
|
|
layer.open({
|
|
type: 2,
|
|
content: "{:U('Express/see_logistics')}?id=" + id,
|
|
title: "物流详情",
|
|
scrollbar: false,
|
|
area: ["calc(100% - 160px)", "calc(100% - 65px)"],
|
|
shade: 0,
|
|
offset: 'rb',
|
|
resize: false,
|
|
move: false,
|
|
})
|
|
},
|
|
getData() {
|
|
$.ajax({
|
|
url: "{:U('ordermsg')}",
|
|
type: "POST",
|
|
data: {
|
|
page: this.currentPage,
|
|
limit: this.currentLimit,
|
|
type: 1,
|
|
time: this.time_range,
|
|
title: this.title,
|
|
card: this.card,
|
|
pay: this.pay,
|
|
user_type: this.user_type,
|
|
pickupType: this.deliveryMethod, //配送方式
|
|
status: this.deliveryStatus //配送状态
|
|
},
|
|
success: (res) => {
|
|
if (res.code == 0) {
|
|
this.list = [];
|
|
this.currentLen = parseInt(res.count);
|
|
this.list = res.data;
|
|
this.blessingAuthority = res.jurisdiction_blessing == 1 ? true : false
|
|
} else {
|
|
this.$message.error('数据获取失败');
|
|
}
|
|
}
|
|
})
|
|
},
|
|
getSumData() {
|
|
$.ajax({
|
|
url: "{:U('shopvolume')}",
|
|
type: "POST",
|
|
data: {
|
|
time: this.time_range,
|
|
title: this.title, //单号
|
|
card: this.card, //会员号
|
|
pay: this.pay, //支付方式
|
|
order_genre: 1,
|
|
pickupType: this.deliveryMethod, //配送方式
|
|
status: this.deliveryStatus //配送状态
|
|
},
|
|
success: (res) => {
|
|
this.all_money = res.all_money;
|
|
this.refund_money = res.refund_money;
|
|
this.dis_money = res.dis_money;
|
|
this.integral_money = res.integral_money;
|
|
this.coupon_money = res.coupon_money;
|
|
this.less_money = res.less_money;
|
|
this.pay_coupon_money = res.pay_coupon_money;
|
|
this.expressOrder = res.pickup_type_three;
|
|
this.sameCityOrder = res.pickup_type_two;
|
|
this.selfExtractionOrder = res.pickup_type_one;
|
|
}
|
|
})
|
|
},
|
|
exportOrd() {
|
|
let date = this.time_range;
|
|
let title = this.title;
|
|
let card = this.card;
|
|
let pay = this.pay;
|
|
let user_type = this.user_type;
|
|
if (!this.time_range.length) {
|
|
this.$confirm('确认导出?(默认导出当月明细)', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'error'
|
|
}).then(() => {
|
|
date = this.getThisMonthTime();
|
|
window.location.href = "{:U('Xcx/export')}?date=" + date + "&title=" + title + "&card=" + card + "&pay=" + pay + '&user_type=' + user_type;
|
|
}).catch(() => {
|
|
|
|
});
|
|
} else {
|
|
window.location.href = "{:U('Xcx/export')}?date=" + date + "&title=" + title + "&card=" + card + "&pay=" + pay + '&user_type=' + user_type;
|
|
}
|
|
|
|
},
|
|
print(id) {
|
|
layer.open({
|
|
type: 2,
|
|
content: "{:U('Retail/WebPrint/orderPrint')}?id=" + id,
|
|
title: "打印订单",
|
|
area: ['calc(100% - 160px)', 'calc(100% - 65px)'],
|
|
shade: 0,
|
|
offset: 'rb',
|
|
})
|
|
},
|
|
wifi(id) {
|
|
$.ajax({
|
|
url: "{:U('storeIdGet')}",
|
|
type: "post",
|
|
data: {order_id: id},
|
|
success: (res) => {
|
|
if (res.status == 0) {
|
|
this.$message.error(res.msg);
|
|
}
|
|
}
|
|
})
|
|
},
|
|
/**
|
|
* @description 打开祝福语弹窗
|
|
* @param {Number} id 订单ID
|
|
*/
|
|
openBlessingDialog(id) {
|
|
this.blessingOrderId = id
|
|
this.blessingDialogVisible = true
|
|
}
|
|
},
|
|
created() {
|
|
this.time_range = this.getThisMonthTime();
|
|
this.getData();
|
|
this.getSumData();
|
|
this.checkOperateAuth({
|
|
export: '/index.php/Retail/Xcx/export',
|
|
orderPrint: '/index.php/Retail/WebPrint/orderPrint',
|
|
wifiPrint: '/index.php/Retail/Xcx/storeIdGet',
|
|
sendGoods: '/index.php/Retail/Express/send_goods',
|
|
seeLogistics: '/index.php/Retail/Express/see_logistics',
|
|
}, (data) => {
|
|
this.operate = data;
|
|
})
|
|
}
|
|
})
|
|
</script> |