init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,385 @@
|
||||
<!--[1.8.68]-->
|
||||
<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-blessing.js?v=1.0.0"></script>
|
||||
<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>
|
||||
<link rel="stylesheet" href="/Public/Retail/css/order-details.css">
|
||||
<script src="/Public/Retail/js/order-details.js"></script>
|
||||
<div id="secKillApp">
|
||||
<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="searchData(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="searchData(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="searchData(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="searchForm.time"></date-picker-range>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input class="page-input" placeholder="订单号" type="text" v-model="searchForm.out_trade_no" clearable
|
||||
@keydown.enter.exact.native.prevent="searchData">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.secKillStatus" clearable placeholder="秒杀状态">
|
||||
<el-option label="秒杀成功" value="1"></el-option>
|
||||
<el-option label="秒杀失败" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.deliveryMethod" placeholder="配送方式" clearable>
|
||||
<el-option label="快递配送" :value="3" :disabled="[4,5].includes(searchForm.deliveryStatus)"></el-option>
|
||||
<el-option label="同城配送" :value="2" :disabled="[4,5].includes(searchForm.deliveryStatus)"></el-option>
|
||||
<el-option label="自提" :value="1" :disabled="[1,2,3].includes(searchForm.deliveryStatus)"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.deliveryStatus" placeholder="配送状态" clearable>
|
||||
<el-option label="待发货/待配送" :value="1" :disabled="searchForm.deliveryMethod == 1"></el-option>
|
||||
<el-option label="已发货/已配送" :value="2" :disabled="searchForm.deliveryMethod == 1"></el-option>
|
||||
<el-option label="已收货/已送达" :value="3" :disabled="searchForm.deliveryMethod == 1"></el-option>
|
||||
<el-option label="待自提" :value="4" :disabled="[2,3].includes(searchForm.deliveryMethod)"></el-option>
|
||||
<el-option label="已自提" :value="5" :disabled="[2,3].includes(searchForm.deliveryMethod)"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="searchData">查询</el-button>
|
||||
|
||||
<el-button type="primary" plain v-if="storeAuth.data_export==1 && operate.secKillExport"
|
||||
@click="exportExcel">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div>
|
||||
<el-table :data="orderList" border v-loading="loading"
|
||||
:header-cell-style="{background:'#F5F7FA',color:'#606266'}" size="small">
|
||||
<el-table-column align="center" type="index" label="序号" width="60"></el-table-column>
|
||||
<el-table-column align="center" prop="order_name" label="订单类型" min-width="80px" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="order_no" label="订单号" min-width="150px" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="vip_name" label="会员" min-width="100px" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="all_money" label="支付金额" min-width="80px" 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="pay_coupon_fee" label="代金券" min-width="135px" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="add_time" label="下单时间" min-width="135px" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="pickup_name" label="取货方式" min-width="70px"></el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="user_select_time" label="自提/配送-时间" min-width="130px"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="status_name" label="发货状态" min-width="70px"></el-table-column>
|
||||
<el-table-column align="center" prop="state_name" label="秒杀状态" min-width="70px"></el-table-column>
|
||||
|
||||
<el-table-column align="center" fixed="right" label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini"
|
||||
@click="showOrderDetails = true;details_order_no = scope.row.order_no">详情
|
||||
</el-button>
|
||||
|
||||
<el-button type="text" style="color: rgb(103, 194, 58)"
|
||||
v-if="operate.sendGoods&&(scope.row.pickup_type==2||scope.row.pickup_type==3) && scope.row.delivery_type == 1 && scope.row.status==1 && scope.row.state == 1"
|
||||
@click="sendGoods(scope.row)" size="mini">发货
|
||||
</el-button>
|
||||
|
||||
<el-button type="text" v-if="operate.seeLogistics&&scope.row.delivery_type == 4"
|
||||
@click="seeLogistics(scope.row.id)" size="mini">物流
|
||||
</el-button>
|
||||
|
||||
<el-button type="text"
|
||||
v-if="operate.useError&&scope.row.order_type == 1 && scope.row.state == 1 && scope.row.status == 1"
|
||||
@click="useError(scope.row.id)" size="mini">取消订单
|
||||
</el-button>
|
||||
|
||||
<el-button type="text" v-if="operate.wifiPrint&&scope.row.order_type == 1 && scope.row.state == 1"
|
||||
@click="wifiPrint(scope.row.id)" size="mini">wifi打印
|
||||
</el-button>
|
||||
|
||||
<el-button v-if="blessingAuthority" type="text" @click="openBlessingDialog(scope.row.id)"
|
||||
size="mini">
|
||||
祝福
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<div slot="empty" v-if="!table_data_loading">暂无数据</div>
|
||||
<div slot="empty" v-else><span class="el-icon-loading"></span></div>
|
||||
</el-table>
|
||||
<el-pagination @size-change="sizeChange" @current-change="currentChange"
|
||||
layout="total, sizes, prev, pager, next, jumper" :pager-count="5" :page-sizes="[10,20,30,40,50,60,70,80,90]"
|
||||
:page-size="10" :total="count">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
<!--订单详情-->
|
||||
<order-details :show.sync="showOrderDetails" :order-no="details_order_no"></order-details>
|
||||
|
||||
<!--支付详情-->
|
||||
<pay-order-details :show.sync="showPayDetails" order-genre="3" :order-no="details_order_no"></pay-order-details>
|
||||
|
||||
<!-- 祝福语 -->
|
||||
<component-blessing :visible.sync="blessingDialogVisible" :id="blessingOrderId"></component-blessing>
|
||||
</div>
|
||||
<script>
|
||||
var secKillApp = new Vue({
|
||||
el: '#secKillApp',
|
||||
data() {
|
||||
return {
|
||||
orderList: [],
|
||||
count: 0,
|
||||
searchForm: {
|
||||
out_trade_no: '',
|
||||
secKillStatus: '',
|
||||
time: '',
|
||||
page: 1,
|
||||
limit: 10,
|
||||
deliveryMethod: '', //配送方式
|
||||
deliveryStatus: '', //配送状态
|
||||
},
|
||||
showPayDetails: false,
|
||||
showOrderDetails: false,
|
||||
payList: [],
|
||||
details_order_no: '',
|
||||
loading: false,
|
||||
table_data_loading: false,
|
||||
operate: {},
|
||||
expressOrder: 0, //待发货订单数
|
||||
sameCityOrder: 0, //待同城配送订单数
|
||||
selfExtractionOrder: 0, //待自提订单数
|
||||
blessingDialogVisible: false, //祝福语组件开关
|
||||
blessingOrderId: null, //当前祝福语订单ID
|
||||
blessingAuthority: false //当前门店是否具备祝福语权限
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//快递发货
|
||||
sendGoods(item) {
|
||||
//快递发货
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
content: "{:U('Express/send_goods')}?id=" + item.id,
|
||||
title: "发货 - " + item.order_no,
|
||||
scrollbar: false,
|
||||
area: ["calc(100% - 160px)", "calc(100% - 65px)"],
|
||||
shade: 0,
|
||||
offset: 'rb',
|
||||
resize: false,
|
||||
move: false,
|
||||
end: () => {
|
||||
this.getOrderData();
|
||||
}
|
||||
})
|
||||
},
|
||||
//查看物流
|
||||
seeLogistics(id) {
|
||||
top.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,
|
||||
})
|
||||
},
|
||||
//使失败
|
||||
useError(id) {
|
||||
this.$confirm('您确认要取消该秒杀订单吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
$.ajax({
|
||||
url: "{:U('fail')}",
|
||||
type: "post",
|
||||
data: {bill_id: id},
|
||||
success: (res) => {
|
||||
this.loading = false;
|
||||
if (res.status == 1) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
duration: 1500
|
||||
});
|
||||
this.getOrderData();
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: res.msg,
|
||||
duration: 1500
|
||||
});
|
||||
}
|
||||
},
|
||||
error: () => {
|
||||
this.loading = false;
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请求发生错误,请稍后重试',
|
||||
duration: 1500
|
||||
});
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
//wifi打印
|
||||
wifiPrint(id) {
|
||||
$.ajax({
|
||||
url: "{:U('linePrint')}",
|
||||
type: "post",
|
||||
data: {order_id: id},
|
||||
success: (res) => {
|
||||
if (res.status == 0) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg ? res.msg : '已发送打印信息',
|
||||
duration: 1000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//查询
|
||||
searchData(deliveryMethod = 0) {
|
||||
if (deliveryMethod > 0) {
|
||||
this.searchForm.time = []
|
||||
this.searchForm.deliveryMethod = deliveryMethod
|
||||
switch (deliveryMethod) {
|
||||
case 1:
|
||||
this.searchForm.deliveryStatus = 4
|
||||
break
|
||||
case 2:
|
||||
case 3:
|
||||
this.searchForm.deliveryStatus = 1
|
||||
break
|
||||
default:
|
||||
this.searchForm.deliveryMethod = ''
|
||||
this.searchForm.deliveryStatus = ''
|
||||
}
|
||||
}
|
||||
this.searchForm.page = 1;
|
||||
this.getOrderData();
|
||||
},
|
||||
//获取数据列表
|
||||
getOrderData() {
|
||||
this.table_data_loading = true;
|
||||
$.ajax({
|
||||
url: "{:U('getOrdertwo')}",
|
||||
type: "post",
|
||||
data: {
|
||||
secKillStatus: this.searchForm.secKillStatus,
|
||||
out_trade_no: this.searchForm.out_trade_no,
|
||||
time: this.searchForm.time,
|
||||
page: this.searchForm.page,
|
||||
limit: this.searchForm.limit,
|
||||
pickupType: this.searchForm.deliveryMethod, //配送方式
|
||||
status: this.searchForm.deliveryStatus //配送状态
|
||||
},
|
||||
success: (res) => {
|
||||
this.table_data_loading = false;
|
||||
if (res.code === 0) {
|
||||
this.orderList = res.data;
|
||||
this.count = parseInt(res.count);
|
||||
this.selfExtractionOrder = res.pickup_type_one
|
||||
this.sameCityOrder = res.pickup_type_two
|
||||
this.expressOrder = res.pickup_type_three
|
||||
this.blessingAuthority = res.jurisdiction_blessing == 1 ? true : false
|
||||
}
|
||||
},
|
||||
error: () => {
|
||||
this.table_data_loading = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 分页
|
||||
* @param int val 当前选择的页数
|
||||
*/
|
||||
currentChange(val) {
|
||||
this.searchForm.page = val;
|
||||
this.getOrderData();
|
||||
},
|
||||
|
||||
/**
|
||||
* 每页显示数量
|
||||
* @param int val 数量
|
||||
*/
|
||||
sizeChange(val) {
|
||||
this.searchForm.limit = val;
|
||||
this.searchForm.page = 1;
|
||||
this.getOrderData();
|
||||
},
|
||||
//导出
|
||||
exportExcel() {
|
||||
let secKillStatus = this.searchForm.secKillStatus;
|
||||
let out_trade_no = this.searchForm.out_trade_no;
|
||||
if (!this.searchForm.time.length) {
|
||||
this.$confirm('确认导出(默认导出当月记录)?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
window.location.href = "{:U('secKillExport')}?secKillStatus=" + secKillStatus + "&out_trade_no=" + out_trade_no + "&time=" + this.getThisMonthTime();
|
||||
}).catch(() => {
|
||||
})
|
||||
} else {
|
||||
window.location.href = "{:U('secKillExport')}?secKillStatus=" + secKillStatus + "&out_trade_no=" + out_trade_no + "&time=" + this.searchForm.time;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @description 打开祝福语弹窗
|
||||
* @param {Number} id 订单ID
|
||||
*/
|
||||
openBlessingDialog(id) {
|
||||
this.blessingOrderId = id
|
||||
this.blessingDialogVisible = true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchForm.time = this.getThisMonthTime();
|
||||
this.getOrderData();
|
||||
this.checkOperateAuth({
|
||||
wifiPrint: '/index.php/Retail/SecKill/linePrint',
|
||||
secKillExport: '/index.php/Retail/SecKill/secKillExport',
|
||||
sendGoods: '/index.php/Retail/Express/send_goods',
|
||||
seeLogistics: '/index.php/Retail/Express/see_logistics',
|
||||
useError: '/index.php/Retail/SecKill/fail',
|
||||
}, (data) => {
|
||||
this.operate = data;
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
在新工单中引用
屏蔽一个用户