init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,378 @@
|
||||
<!--[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="advanceOrderApp" 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>
|
||||
<el-input class="page-input" placeholder="请输入订单号" type="text" v-model="order_no" clearable
|
||||
@keydown.enter.exact.native.prevent="search">
|
||||
</el-input>
|
||||
</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-select v-model="advance_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-if="advance_type == 2" v-model="state" 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-if="state == 1" v-model="order_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 label="定金支付时间">
|
||||
<el-date-picker v-model="earnest_pay_time" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="尾款支付时间">
|
||||
<el-date-picker v-model="finish_time" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="search">查询</el-button>
|
||||
|
||||
<el-button type="primary" plain v-if="storeAuth.data_export==1 && operate.export_list" @click="export_list">
|
||||
导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="max-width: calc(100vw - 208px);margin-top: 10px;">
|
||||
<el-table border :data="order_list" size="small" max-height="500" v-loading="loading"
|
||||
:header-cell-style="{background:'#F5F7FA',color:'#606266'}" element-loading-text="数据获取中"
|
||||
element-loading-spinner="el-icon-loading">
|
||||
<el-table-column align="center" type="index" label="序号" width="50" fixed></el-table-column>
|
||||
<el-table-column align="center" prop="order_no" label="订单号" min-width="145" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="vip_phone" label="会员手机号" min-width="100" show-overflow-tooltip fixed>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="all_earnest_price" label="支付定金金额" min-width="100"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" prop="earnest_pay_time" label="支付定金时间" min-width="100"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" prop="all_money" label="支付尾款金额/全额" min-width="130" 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="finish_time" label="订单完成时间" min-width="140" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="advance_name" label="预售方式" min-width="70" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="pay_state_name" label="支付状态" min-width="70" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="delivery_name" label="配送方式" min-width="70" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="status_name" label="发货状态" min-width="70" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="showOrderDetails = true;details_order_no = scope.row.order_no"
|
||||
size="mini">详情
|
||||
</el-button>
|
||||
|
||||
<el-button style="color: rgb(103, 194, 58)"
|
||||
v-if="operate.sendGoods && scope.row.delivery_type==1&&scope.row.status==1&&scope.row.order_type==1&&scope.row.refund_status==0&&(scope.row.pickup_type==2||scope.row.pickup_type==3)"
|
||||
type="text" @click="sendGoods(scope.row.id,scope.row.order_no)" size="mini">发货
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
v-if="operate.seeLogistics && scope.row.delivery_type==4&&scope.row.order_type==1&&scope.row.refund_status==0&&scope.row.pickup_type==2"
|
||||
type="text" @click="seeLogistics(scope.row.id,scope.row.order_no)" size="mini">
|
||||
物流
|
||||
</el-button>
|
||||
|
||||
<el-button type="text"
|
||||
v-if="operate.order_cancel && scope.row.cancel_time == 0 && (scope.row.status == 1 || (scope.row.status == 0 && scope.row.refuse_earnest_price != 1))"
|
||||
@click="order_cancel(scope.row.order_no,scope.row.uid)" size="mini">取消订单
|
||||
</el-button>
|
||||
|
||||
<el-button v-if="operate.print_option" type="text" size="mini" @click="print_option(scope.row.id)">
|
||||
wifi打印
|
||||
</el-button>
|
||||
|
||||
<el-button type="text" disabled v-if="scope.row.cancel_time > 0" 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="4" :order-no="details_order_no"></pay-order-details>
|
||||
|
||||
<!-- 祝福语 -->
|
||||
<component-blessing :visible.sync="blessingDialogVisible" :id="blessingOrderId"></component-blessing>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var advanceOrderApp = new Vue({
|
||||
el: '#advanceOrderApp',
|
||||
data: {
|
||||
loading: true,
|
||||
operate: {},
|
||||
order_list: [],
|
||||
currentPage: 1,
|
||||
currentLimit: 10,
|
||||
currentLen: 0,
|
||||
order_no: "", //订单号
|
||||
advance_type: "", //预售方式
|
||||
state: "", //支付状态
|
||||
order_type: "", //订单状态
|
||||
earnest_pay_time: "", //定金支付时间
|
||||
finish_time: "", //尾款支付时间
|
||||
deliveryMethod: '', //配送方式
|
||||
deliveryStatus: '', //配送状态
|
||||
showPayDetails: false,//支付详情
|
||||
showOrderDetails: false,//订单详情
|
||||
details_order_no: '',//详情订单号
|
||||
expressOrder: 0, //待发货订单数
|
||||
sameCityOrder: 0, //待同城配送订单数
|
||||
selfExtractionOrder: 0, //待自提订单数
|
||||
blessingDialogVisible: false, //祝福语组件开关
|
||||
blessingOrderId: null, //当前祝福语订单ID
|
||||
blessingAuthority: false //当前门店是否具备祝福语权限
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange(val) {
|
||||
this.currentLimit = val;//切换每页数量
|
||||
this.currentPage = 1;
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.currentPage = val;
|
||||
this.getData();//切换页数
|
||||
},
|
||||
search(deliveryMethod = 0) {
|
||||
if (deliveryMethod > 0) {
|
||||
this.earnest_pay_time = [];
|
||||
this.finish_time = [];
|
||||
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.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();
|
||||
},
|
||||
})
|
||||
},
|
||||
//查看物流
|
||||
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,
|
||||
end: () => {
|
||||
this.getData();
|
||||
},
|
||||
})
|
||||
},
|
||||
getData() {
|
||||
this.loading = true;
|
||||
$.ajax({
|
||||
url: "{:U('order_list')}",
|
||||
type: "POST",
|
||||
data: {
|
||||
page: this.currentPage,
|
||||
limit: this.currentLimit,
|
||||
order_no: this.order_no,
|
||||
advance_type: this.advance_type,
|
||||
state: this.state,
|
||||
order_type: this.order_type,
|
||||
earnest_pay_time: this.earnest_pay_time,
|
||||
finish_time: this.finish_time,
|
||||
pickupType: this.deliveryMethod, //配送方式
|
||||
status: this.deliveryStatus //配送状态
|
||||
},
|
||||
success: (res) => {
|
||||
this.loading = false;
|
||||
if (res.status == 1) {
|
||||
this.order_list = [];
|
||||
this.order_list = res.data.order_list;
|
||||
this.currentLen = parseInt(res.data.count);
|
||||
this.expressOrder = res.data.pickup_type_three;
|
||||
this.sameCityOrder = res.data.pickup_type_two;
|
||||
this.selfExtractionOrder = res.data.pickup_type_one;
|
||||
this.blessingAuthority = res.data.jurisdiction_blessing == 1 ? true : false
|
||||
} else {
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//wifi打印
|
||||
print_option(bill_id) {
|
||||
$.ajax({
|
||||
url: "{:U('print_option')}",
|
||||
type: "post",
|
||||
data: {bill_id: bill_id},
|
||||
success: (res) => {
|
||||
if (res.status == 0) {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//导出
|
||||
export_list() {
|
||||
let order_no = this.order_no;
|
||||
let status = this.status;
|
||||
let pickup_type = this.pickup_type;
|
||||
let advance_type = this.advance_type;
|
||||
let state = this.state;
|
||||
let order_type = this.order_type;
|
||||
let earnest_pay_time = this.earnest_pay_time;
|
||||
let finish_time = this.finish_time;
|
||||
window.location.href = "{:U('advance_order_export')}?order_no=" + order_no + "&status=" + status + "&pickup_type=" + pickup_type +
|
||||
"&advance_type=" + advance_type + "&state=" + state + "&order_type=" + order_type + "&earnest_pay_time=" + earnest_pay_time + "&finish_time=" + finish_time;
|
||||
},
|
||||
//取消订单
|
||||
order_cancel(order_no, uid) {
|
||||
this.$confirm('确认取消订单,并自动退款?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
$.ajax({
|
||||
url: "{:U('order_cancel')}",
|
||||
data: {order_no: order_no, uid: uid},
|
||||
type: "post",
|
||||
success: (res) => {
|
||||
this.loading = false;
|
||||
if (res.status == 1) {
|
||||
this.$message.success(res.msg)
|
||||
this.getData();
|
||||
} else {
|
||||
this.$message.info('已取消操作');
|
||||
}
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message.info('已取消操作');
|
||||
});
|
||||
},
|
||||
/**
|
||||
* @description 打开祝福语弹窗
|
||||
* @param {Number} id 订单ID
|
||||
*/
|
||||
openBlessingDialog(id) {
|
||||
this.blessingOrderId = id
|
||||
this.blessingDialogVisible = true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
this.checkOperateAuth({
|
||||
print_option: '/index.php/Retail/AdvanceOrder/print_option',
|
||||
order_cancel: '/index.php/Retail/AdvanceOrder/order_cancel',
|
||||
export_list: '/index.php/Retail/AdvanceOrder/advance_order_export',
|
||||
sendGoods: '/index.php/Retail/Express/send_goods',
|
||||
seeLogistics: '/index.php/Retail/Express/see_logistics',
|
||||
}, (data) => {
|
||||
this.operate = data;
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
在新工单中引用
屏蔽一个用户