1164 行
54 KiB
HTML
可执行文件
1164 行
54 KiB
HTML
可执行文件
<!--[1.8.68]-->
|
|
<link rel="stylesheet" href="/Public/css/component-serial.css?v=1.0.0">
|
|
<style>
|
|
.sale-ul {
|
|
width: calc(100% - 40px);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
#loading_examine .el-table .el-button.selected,
|
|
.receiptDialog .el-table .el-button.selected {
|
|
color: #67c23a;
|
|
}
|
|
|
|
.audit-form {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.audit-form .el-form-item {
|
|
width: 45%;
|
|
display: flex;
|
|
}
|
|
|
|
.audit-form .el-form-item__content {
|
|
flex: 1;
|
|
}
|
|
|
|
.audit-scrollbar {
|
|
height: calc(100vh - 240px);
|
|
}
|
|
|
|
.audit-scrollbar .el-scrollbar__wrap {
|
|
overflow-x: hidden;
|
|
}
|
|
</style>
|
|
<div id="customerApp" v-cloak>
|
|
<el-collapse accordion>
|
|
<el-collapse-item>
|
|
<template slot="title">
|
|
售后订单>>></i>
|
|
</template>
|
|
<div>1.售后订单用于处理商城普通订单,秒杀订单,拼团订单售后订单)</div>
|
|
</el-collapse-item>
|
|
</el-collapse>
|
|
<el-form size="small" inline style="margin-top: 10px">
|
|
<el-form-item>
|
|
<date-picker-range :date-time.sync="time"></date-picker-range>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-input class="page-input" placeholder="原订单号或售后订单号" type="text" size="small" v-model="order_no" clearable
|
|
@keydown.enter.exact.native.prevent="search">
|
|
</el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-input class="page-input" placeholder="会员手机号" type="text" size="small" v-model="vip_phone" clearable
|
|
@keydown.enter.exact.native.prevent="search">
|
|
</el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-select class="page-input" v-model="order_type" placeholder="订单类型" size="small" clearable>
|
|
<el-option label="退款订单" value="2"></el-option>
|
|
<el-option label="换货订单" value="3"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-select class="page-input" v-model="order_genre" placeholder="来源类型" size="small" clearable>
|
|
<el-option label="普通订单" value="1"></el-option>
|
|
<el-option label="拼团订单" value="2"></el-option>
|
|
<el-option label="秒杀订单" value="3"></el-option>
|
|
<el-option label="预售订单" value="4"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-select class="page-input" v-model="status" placeholder="状态类型" size="small" clearable>
|
|
<el-option label="待审核" value="1"></el-option>
|
|
<el-option label="待用户发货" value="3"></el-option>
|
|
<el-option label="待商家收货" value="4"></el-option>
|
|
<el-option label="待发货/退款" value="5"></el-option>
|
|
<el-option label="配送中" value="8"></el-option>
|
|
<el-option label="撤销申请" value="7"></el-option>
|
|
<el-option label="驳回" value="6"></el-option>
|
|
<el-option label="已完成" value="2"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" @click="search" plain size="small">查询</el-button>
|
|
<if condition="$authArr['export'] eq true">
|
|
<el-button v-if="storeAuth.data_export==1" @click="export_list" size="small">导出</el-button>
|
|
</if>
|
|
</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">{{customer_order_count}}</div>
|
|
</div>
|
|
<div class="table-top-card">
|
|
<div class="table-top-card-header">退款订单</div>
|
|
<div class="table-top-card-body">{{refund_order_count}}</div>
|
|
</div>
|
|
<div class="table-top-card">
|
|
<div class="table-top-card-header">换货订单</div>
|
|
<div class="table-top-card-body">{{exchange_order_count}}</div>
|
|
</div>
|
|
<div class="table-top-card">
|
|
<div class="table-top-card-header">已退金额</div>
|
|
<div class="table-top-card-body">{{refund_money_actual}}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div style="max-width: calc(100vw - 208px);margin-top: 10px;">
|
|
<el-table border :data="order_list" size="mini" max-height="500" v-loading="loading"
|
|
element-loading-text="数据获取中" element-loading-spinner="el-icon-loading">
|
|
<el-table-column type="index" align="center" label="序号" width="50" fixed></el-table-column>
|
|
<el-table-column prop="order_no" label="售后单号" min-width="140" show-overflow-tooltip fixed></el-table-column>
|
|
<el-table-column prop="refund_no" label="购买单号" min-width="140" show-overflow-tooltip fixed>
|
|
</el-table-column>
|
|
<el-table-column prop="vip_phone" label="会员手机号" show-overflow-tooltip fixed min-width="100">
|
|
</el-table-column>
|
|
<el-table-column prop="all_money" label="金额(元)" min-width="60" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="add_time" label="申请时间" min-width="120" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="order_genre_name" label="来源" min-width="70" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="order_type_name" label="订单类型" min-width="70" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="status_name" min-width="70" label="状态" show-overflow-tooltip></el-table-column>
|
|
<el-table-column fixed="right" label="操作" align="center" width="100">
|
|
<template slot-scope="scope">
|
|
<if condition="$authArr['show'] eq true">
|
|
<el-button type="text" @click="show(scope.row.id)" size="mini"
|
|
v-if="scope.row.refund_status == 1">审核
|
|
</el-button>
|
|
</if>
|
|
<el-button type="text" @click="show(scope.row.id)" size="mini" v-if="scope.row.refund_status != 1">
|
|
详情
|
|
</el-button>
|
|
<el-button type="text" @click="ReceivingGoods(scope.row.id, scope.row.order_no)" size="mini"
|
|
v-if="scope.row.refund_status == 4">确认收货
|
|
</el-button>
|
|
<el-button type="text" @click="refund_option(scope.row.order_no)" size="mini"
|
|
v-if="scope.row.refund_status == 5 && scope.row.order_type == 2">退款
|
|
</el-button>
|
|
<if condition="$authArr['delivery_option'] eq true">
|
|
<el-button type="text" @click="delivery_option(scope.row.order_no,scope.row.id)" size="mini"
|
|
v-if="scope.row.refund_status == 5 && scope.row.order_type == 3 &&scope.row.status == 1 && scope.row.order_status == 0">
|
|
配送
|
|
</el-button>
|
|
</if>
|
|
<el-button type="text" @click="delivery_cancel(scope.row.order_no,scope.row.delivery_type)"
|
|
size="mini"
|
|
v-if="(((scope.row.delivery_type==2 || scope.row.delivery_type == 3 || scope.row.delivery_type == 5) && scope.row.status == 1 && (scope.row.order_status ==1||scope.row.order_status==2)) || (scope.row.delivery_type == 1 && scope.row.status == 2)) && scope.row.order_type == 3">
|
|
取消配送
|
|
</el-button>
|
|
<el-button type="text" @click="seeLogistics(scope.row.id)" size="mini"
|
|
v-if="(scope.row.refund_status == 5 || scope.row.refund_status == 2) && scope.row.order_type == 3 && scope.row.status != 1 && scope.row.delivery_type == 4">
|
|
查看物流
|
|
</el-button>
|
|
<el-button type="text" size="mini"
|
|
v-if="(scope.row.delivery_type == 2 || scope.row.delivery_type == 3 || scope.row.delivery_type == 5) && scope.row.status==1 && scope.row.order_status == 1">
|
|
待接单
|
|
</el-button>
|
|
<el-button type="text" size="mini"
|
|
v-if="(scope.row.delivery_type == 2 || scope.row.delivery_type == 3 || scope.row.delivery_type == 5) && scope.row.status==1 && scope.row.order_status == 2">
|
|
待取货
|
|
</el-button>
|
|
<el-button type="text" size="mini"
|
|
v-if="(((scope.row.delivery_type == 2 || scope.row.delivery_type == 3 || scope.row.delivery_type == 5) && scope.row.order_status==3) || (scope.row.delivery_type == 1 && scope.row.status==2)) && scope.row.order_type == 3">
|
|
配送中
|
|
</el-button>
|
|
<if condition="$authArr['wifi'] eq true">
|
|
<el-button type="text" size="mini" @click="pint_option(scope.row.id)">
|
|
wifi打印
|
|
</el-button>
|
|
</if>
|
|
</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>
|
|
|
|
<el-dialog title="退款" :append-to-body="true" :visible.sync="refundTitle" id="loading_refund">
|
|
<el-form>
|
|
<el-form-item label="是否退还配送费:">
|
|
<el-radio v-model="return_delivery_fee" label="1">同意退还配送费</el-radio>
|
|
<el-radio v-model="return_delivery_fee" label="2">拒绝退还配送费</el-radio>
|
|
</el-form-item>
|
|
<el-form-item label-width="200px">
|
|
<el-button type="primary" @click="refund_agree">提交</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-dialog>
|
|
<el-dialog title="商品详情" :append-to-body="true" :visible.sync="littleTable" width="80%" :top="'20px'"
|
|
id="loading_examine">
|
|
<div style="text-align: center;margin-bottom: 10px">
|
|
<span style="color: red;font-size: 16px">{{order_info.notes}}</span>
|
|
</div>
|
|
<el-scrollbar class="audit-scrollbar">
|
|
<el-table border :data="sell_list" style="width: 100%;" max-height="400px">
|
|
<el-table-column prop="goods_name" label="商品名称" min-width="60" show-overflow-tooltip fixed>
|
|
</el-table-column>
|
|
<el-table-column prop="sku_name" label="规格" min-width="60" show-overflow-tooltip
|
|
fixed></el-table-column>
|
|
<el-table-column label="图片">
|
|
<template slot-scope="scope">
|
|
<a :href="scope.row.image" target="_blank">
|
|
<img :src="scope.row.image" style="max-width: 40px;max-height: 40px">
|
|
</a>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="company" label="单位"></el-table-column>
|
|
<el-table-column prop="price" label="单价(元)" show-overflow-tooltip fixed
|
|
min-width="100"></el-table-column>
|
|
<el-table-column prop="original_price" label="原价(元)" show-overflow-tooltip></el-table-column>
|
|
<el-table-column label="会员折扣" min-width="" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<span v-if="scope.row.discount * 1 < 1 && scope.row.discount * 1 > 0"> {{scope.row.discount}}
|
|
</span>
|
|
<span v-else> 无折扣金额 </span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="integral_dis_money" label="抵扣积分的金额" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="num" label="数量" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<el-button type="text" size="mini" @click="detailsSerial(scope.$index)"
|
|
v-if="scope.row.serial_number_state == 1 && scope.row.retired_serial_list.length > 0">
|
|
{{scope.row.num}}
|
|
</el-button>
|
|
<span v-else>{{scope.row.num}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="all_money" label="实付小计(元)" show-overflow-tooltip></el-table-column>
|
|
<el-table-column label="操作" width="110" v-if="deliver_state == 0 && type == 1">
|
|
<template slot-scope="scope">
|
|
<el-button type="text" size="mini" :class="{selected:scope.row.selectedNum == scope.row.num}"
|
|
@click="selectSerial(scope.$index)" v-if="scope.row.serial_number_state == 1">
|
|
{{scope.row.selectedNum == scope.row.num ? '已选择(可重选)' : '选择串码'}}
|
|
</el-button>
|
|
<span v-else>---</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<el-form :inline="true" label-width="120px" size="mini" label-suffix=":" class="audit-form">
|
|
<el-divider content-position="left">订单信息</el-divider>
|
|
<el-form-item label="售后单号">{{order_info.order_no}}</el-form-item>
|
|
<el-form-item label="购买单号">{{order_info.refund_no}}</el-form-item>
|
|
<el-form-item label="优惠券" v-if="order_info.order_type == 2">{{order_info.coupon_money}}</el-form-item>
|
|
<el-form-item label="代金券" v-if="order_info.order_type == 2 && order_info.pay_coupon_fee > 0">
|
|
{{order_info.pay_coupon_fee}}
|
|
</el-form-item>
|
|
<el-form-item label="积分抵扣" v-if="order_info.integral_dis_money > 0">¥{{order_info.integral_dis_money}}
|
|
</el-form-item>
|
|
<el-form-item label="折扣+优惠" v-if="order_info.order_type == 2">¥{{order_info.vip_dis_money}}
|
|
</el-form-item>
|
|
<el-form-item label="姓名">{{order_info.user_name}}</el-form-item>
|
|
<el-form-item label="手机号">{{order_info.user_phone}}</el-form-item>
|
|
<el-form-item label="配送费" v-if="order_info.order_type == 2">{{order_info.delivery_fee}}</el-form-item>
|
|
<el-form-item label="地址">{{order_info.user_address}}</el-form-item>
|
|
<el-divider content-position="left">其他</el-divider>
|
|
<el-form-item label="申请原因">{{reason.apply_reason}}</el-form-item>
|
|
<el-form-item label="图片">
|
|
<div v-for="(item,index) in reason.img_path" class="file_label" style="margin-right: 10px">
|
|
<a :href="item" target="_blank">
|
|
<img :src="item" style="max-width: 40px;max-height: 40px">
|
|
</a>
|
|
</div>
|
|
</el-form-item>
|
|
<template v-if="order_info.refund_status == 1">
|
|
<el-divider content-position="left">审核</el-divider>
|
|
<el-form-item label="是否同意" style="width: 100%">
|
|
<el-radio v-model="type" label="1">同意<span v-if="order_info.order_type == 2">退款</span><span
|
|
v-if="order_info.order_type == 3">换货</span>
|
|
</el-radio>
|
|
<el-radio v-model="type" label="2">驳回<span v-if="order_info.order_type == 2">退款</span><span
|
|
v-if="order_info.order_type == 3">换货</span></el-radio>
|
|
</el-form-item>
|
|
<el-form-item label="是否需要收货" style="width: 100%"
|
|
v-if="((order_info.order_type == 2 && order_info.status != 1) || (order_info.order_type == 3 && order_info.status == 1)) && type == 1">
|
|
<el-radio v-model="deliver_state" label="1">需要退货</el-radio>
|
|
<el-radio v-model="deliver_state" label="0">不需要退货</el-radio>
|
|
</el-form-item>
|
|
</template>
|
|
<el-form-item label="驳回原因" style="width: 100%"
|
|
v-if="order_info.refund_status == 6 || order_info.refund_status == 1">
|
|
<el-input type="textarea" v-model="reason.reject_reason" v-if="order_info.refund_status == 1">
|
|
</el-input>
|
|
<template v-else>{{reason.reject_reason}}</template>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-scrollbar>
|
|
<if condition="$authArr['examine'] eq true">
|
|
<div style="text-align: center">
|
|
<el-button v-if="order_info.refund_status == 1" type="primary" @click="examine">提交</el-button>
|
|
</div>
|
|
</if>
|
|
</el-dialog>
|
|
|
|
<el-dialog title="配送" :append-to-body="true" :visible.sync="DeliveryTitle" id="loading_delivery">
|
|
<div class="layui-card-body">
|
|
<form action="" class="layui-form sale-ul" lay-filter="saleAlert">
|
|
<div class="layui-form-item">
|
|
<el-select v-model="delivery_type" placeholder="订单类型" size="small" clearable>
|
|
<el-option label="门店配送" value="1"></el-option>
|
|
<el-option label="达达配送" value="2"></el-option>
|
|
<el-option label="UU配送" value="3"></el-option>
|
|
<if condition='make eq true'>
|
|
<el-option label="码科配送" value="5"></el-option>
|
|
</if>
|
|
<el-option label="快递发货" value="4"></el-option>
|
|
</el-select>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<el-button type="primary" @click="delivery_agree">确定</el-button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</el-dialog>
|
|
<el-dialog title="达达取消配送原因" :append-to-body="true" :visible.sync="DaDaTitle">
|
|
<div class="layui-card-body">
|
|
<form action="" class="layui-form sale-ul" lay-filter="saleAlert">
|
|
<div class="layui-form-item">
|
|
<el-select v-model="reason_id" placeholder="订单类型" size="small" clearable>
|
|
<el-option label="门店配送" value="1" v-for="(item,index) in da_reason_list" :label="item.reason"
|
|
:key="item.index" :value="item.reasonid"></el-option>
|
|
</el-select>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<el-button type="primary" @click="da_cancel">确定</el-button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</el-dialog>
|
|
<el-dialog title="UU取消配送原因" :append-to-body="true" :visible.sync="UUTitle">
|
|
<div class="layui-card-body">
|
|
<form action="" class="layui-form sale-ul" lay-filter="saleAlert">
|
|
<div class="layui-form-item">
|
|
<el-input type="textarea" v-model="uu_reason"></el-input>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<el-button type="primary" @click="uu_cancel">确定</el-button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</el-dialog>
|
|
<el-dialog title="收货商品" :append-to-body="true" :visible.sync="receiptDialog" class="receiptDialog"
|
|
@close="receiptDialogClose" width="800px">
|
|
<el-table :data="sell_list" border style="width: 100%">
|
|
<el-table-column label="序号" width="60">
|
|
<template slot-scope="scope">
|
|
<span>{{scope.$index + 1}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="goods_name" align="left" label="商品名称"></el-table-column>
|
|
<el-table-column prop="sku_name" align="left" label="规格"></el-table-column>
|
|
<el-table-column prop="num" label="商品数量" width="80"></el-table-column>
|
|
<el-table-column label="操作" width="110">
|
|
<template slot-scope="scope">
|
|
<el-button type="text" size="mini" :class="{selected:scope.row.selectedNum == scope.row.num}"
|
|
@click="selectSerial(scope.$index)" v-if="scope.row.serial_number_state == 1">
|
|
{{scope.row.selectedNum == scope.row.num ? '已选择(可重选)' : '选择串码'}}
|
|
</el-button>
|
|
<span v-else>---</span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<span slot="footer">
|
|
<el-button @click="receiptDialog = false">取消</el-button>
|
|
<el-button type="primary" @click="receiptDialogConfirm">确定</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
<component-serial :visible.sync="serialVisible" :dialog-type="serialDataType" :parent-index="serialGoodsIndex"
|
|
:parent-data="serialGoodsData" :max-selected="serialMaxSelected" :data="serialData"
|
|
@serial-change="serialChange">
|
|
</component-serial>
|
|
</div>
|
|
<script src="/Public/js/component-serial.js?v=1.0.0"></script>
|
|
<script type="text/javascript">
|
|
var customerApp = new Vue({
|
|
el: '#customerApp',
|
|
data: {
|
|
loading: true,
|
|
order_list: [],
|
|
currentPage: 1,
|
|
currentLimit: 10,
|
|
currentLen: 0,
|
|
customer_order_count: 0,
|
|
refund_order_count: 0,
|
|
exchange_order_count: 0,
|
|
refund_money_actual: 0,
|
|
time: "",
|
|
order_no: "",
|
|
vip_phone: "",
|
|
order_genre: "",
|
|
order_type: "",
|
|
status: "",
|
|
littleTable: false,
|
|
order_info: {},
|
|
sell_list: [], //商品列表
|
|
reason: {},
|
|
type: "1", // 1审核通过 2拒绝
|
|
deliver_state: "1", // 1需要收货 0不需要
|
|
refundTitle: false,
|
|
return_delivery_fee: "1", //是否退还配送费
|
|
refund_order_no: "", //操作订单号
|
|
refund_order_id: "", //操作订单id
|
|
DeliveryTitle: false, //配送
|
|
delivery_type: "", //配送方式
|
|
DaDaTitle: false, //达达取消原因
|
|
da_reason_list: [], //原因列表
|
|
reason_id: "", //达达原因id
|
|
UUTitle: false, //UU取消订单原因
|
|
uu_reason: "", //UU取消原因
|
|
agreeBefore: false, //不需要退货同意前确认
|
|
serialVisible: false, //串号录入窗口开关
|
|
serialGoodsIndex: 0, //串号录入当前商品索引
|
|
serialGoodsData: {}, //串号录入当前商品数据对象
|
|
serialData: [], //串号数据
|
|
serialMaxSelected: 0, //串号最多选择上限
|
|
receiptDialog: false, //收货商品确认弹窗
|
|
serialDataType: '' //串号组件类型
|
|
},
|
|
methods: {
|
|
handleSizeChange(val) {
|
|
this.currentLimit = val;//切换每页数量
|
|
this.currentPage = 1;
|
|
this.getData();
|
|
},
|
|
handleCurrentChange(val) {
|
|
this.currentPage = val;
|
|
this.getData();//切换页数
|
|
},
|
|
search: function () {
|
|
this.getTotal();
|
|
this.currentPage = 1;
|
|
this.getData();
|
|
},
|
|
getData: function () {
|
|
var that = this;
|
|
that.loading = true;
|
|
$.ajax({
|
|
url: "{:U('OrderList')}",
|
|
type: "POST",
|
|
data: {
|
|
page: that.currentPage,
|
|
limit: that.currentLimit,
|
|
time: that.time,
|
|
order_no: that.order_no,
|
|
vip_phone: that.vip_phone,
|
|
order_type: that.order_type,
|
|
status: that.status,
|
|
order_genre: that.order_genre
|
|
},
|
|
success: function (res) {
|
|
if (res.status == 1) {
|
|
that.loading = false;
|
|
that.customer_order_count = res.customer_order_count;
|
|
that.order_list = [];
|
|
that.order_list = res.order_list;
|
|
that.$nextTick(function () {
|
|
that.currentLen = parseInt(res.customer_order_count);
|
|
})
|
|
} else {
|
|
that.$message({
|
|
type: 'error',
|
|
message: '数据获取失败',
|
|
});
|
|
}
|
|
}
|
|
})
|
|
},
|
|
getTotal: function () {
|
|
var that = this;
|
|
$.ajax({
|
|
url: "{:U('OrderTotal')}",
|
|
type: "POST",
|
|
data: {
|
|
time: that.time,
|
|
order_no: that.order_no,
|
|
vip_phone: that.vip_phone,
|
|
order_type: that.order_type,
|
|
status: that.status,
|
|
order_genre: that.order_genre
|
|
},
|
|
success: function (res) {
|
|
that.refund_order_count = res.refund_order_count;
|
|
that.exchange_order_count = res.exchange_order_count;
|
|
that.refund_money_actual = res.refund_money_actual;
|
|
}
|
|
})
|
|
},
|
|
show: function (id) {
|
|
var that = this;
|
|
this.littleTable = true;
|
|
const loading_examine = that.$loading({
|
|
target: "#loading_examine",
|
|
lock: true,
|
|
text: '保存中,请等待',
|
|
spinner: 'el-icon-loading',
|
|
background: 'rgba(255, 255, 255, 0.7)'
|
|
});
|
|
$.ajax({
|
|
url: "{:U('order_info')}",
|
|
type: "POST",
|
|
data: {
|
|
id: id
|
|
},
|
|
success: function (res) {
|
|
loading_examine.close();
|
|
that.sell_list = [];
|
|
that.order_info = [];
|
|
that.reason = [];
|
|
that.sell_list = res.sell_list;
|
|
that.order_info = res.order_info;
|
|
that.reason = res.reason;
|
|
}
|
|
})
|
|
},
|
|
//审核
|
|
async examine() {
|
|
if (this.deliver_state == 0 && this.type == 1) {
|
|
for (const goods of this.sell_list) {
|
|
if (goods.serial_number_state == 1 && (!goods.serial_list || goods.num != goods.selectedNum)) {
|
|
this.$message.error(`请正确选择【${goods.goods_name}】的串号!`)
|
|
return false
|
|
}
|
|
}
|
|
|
|
// if (!await this._notRetuenVerify()) {
|
|
// return false
|
|
// }
|
|
}
|
|
|
|
var that = this;
|
|
var order_info = that.order_info;
|
|
var order_no = order_info.order_no;
|
|
var type = that.type;
|
|
var deliver_state = that.deliver_state;
|
|
var reason_info = that.reason;
|
|
var reason_id = reason_info.id;
|
|
var reason = reason_info.reject_reason;
|
|
if (type == 2 && reason == '') {
|
|
that.$message({
|
|
type: "warning",
|
|
message: "请输入驳回原因",
|
|
duration: 1000
|
|
})
|
|
return;
|
|
}
|
|
that.$confirm('确认该操作?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
const loading_examine = that.$loading({
|
|
target: "#loading_examine",
|
|
lock: true,
|
|
text: '保存中,请等待',
|
|
spinner: 'el-icon-loading',
|
|
background: 'rgba(255, 255, 255, 0.7)'
|
|
});
|
|
$.ajax({
|
|
url: "{:U('examine')}",
|
|
type: "post",
|
|
data: {
|
|
order_no: order_no,
|
|
type: type,
|
|
deliver_state: deliver_state,
|
|
reason_id: reason_id,
|
|
reason: reason,
|
|
goods_list: JSON.stringify(this.sell_list)
|
|
},
|
|
success: function (res) {
|
|
if (res.status == 1) {
|
|
that.$message({
|
|
type: "success",
|
|
message: res.msg,
|
|
duration: 1000,
|
|
onClose: function () {
|
|
loading_examine.close();
|
|
that.littleTable = false;
|
|
that.getData();
|
|
}
|
|
})
|
|
} else {
|
|
that.$message({
|
|
type: "error",
|
|
message: res.msg,
|
|
duration: 1000,
|
|
onClose: function () {
|
|
loading_examine.close();
|
|
}
|
|
})
|
|
}
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
that.$message({
|
|
type: 'info',
|
|
message: '已取消该操作'
|
|
});
|
|
});
|
|
},
|
|
//不需要退货时的商品验证(废弃)
|
|
async _notRetuenVerify() {
|
|
return new Promise(resolve => {
|
|
this.sendRequest('Retail/Customer/examineSerialOperation', {
|
|
data: {
|
|
goods_list: JSON.stringify(this.sell_list)
|
|
},
|
|
success: (response) => {
|
|
if (response.status == 1) {
|
|
this.agreeBefore = true
|
|
resolve(true)
|
|
return
|
|
} else {
|
|
this.$message.error(response.message)
|
|
resolve(false)
|
|
return
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
//收货
|
|
ReceivingGoods: function (id, order_no) {
|
|
$.ajax({
|
|
url: "{:U('order_info')}",
|
|
type: "POST",
|
|
data: {
|
|
id: id
|
|
},
|
|
success: (response) => {
|
|
this.sell_list = response.sell_list
|
|
this.receiptDialog = true
|
|
this.order_no = order_no
|
|
}
|
|
})
|
|
},
|
|
//为确保页面原逻辑不受到影响,关闭弹窗的时候恢复数据的初始化
|
|
receiptDialogClose() {
|
|
this.sell_list = []
|
|
this.order_no = ''
|
|
},
|
|
//收货弹窗确认
|
|
receiptDialogConfirm() {
|
|
this.loading = true;
|
|
$.ajax({
|
|
url: "{:U('ReceivingGoods')}",
|
|
type: "post",
|
|
data: {
|
|
order_no: this.order_no,
|
|
goods_list: JSON.stringify(this.sell_list)
|
|
},
|
|
success: (response) => {
|
|
if (response.status == 1) {
|
|
this.$message({
|
|
type: "success",
|
|
message: response.msg,
|
|
duration: 1000,
|
|
onClose: () => {
|
|
this.loading = false;
|
|
this.littleTable = false;
|
|
this.getData();
|
|
}
|
|
})
|
|
} else {
|
|
this.$message({
|
|
type: "error",
|
|
message: response.msg,
|
|
duration: 1000,
|
|
onClose: () => {
|
|
this.loading = false;
|
|
}
|
|
})
|
|
}
|
|
|
|
this.receiptDialog = false
|
|
this.sell_list = []
|
|
this.order_no = ''
|
|
}
|
|
})
|
|
},
|
|
//是否退还配送费
|
|
refund_option: function (order_no) {
|
|
var that = this;
|
|
that.refundTitle = true;
|
|
that.refund_order_no = order_no;
|
|
},
|
|
//退款
|
|
refund_agree: function () {
|
|
var that = this;
|
|
var return_delivery_fee = that.return_delivery_fee;
|
|
var order_no = that.refund_order_no;
|
|
that.$confirm('确认退款?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
const loading_refund = that.$loading({
|
|
target: "#loading_refund",
|
|
lock: true,
|
|
text: '保存中,请等待',
|
|
spinner: 'el-icon-loading',
|
|
background: 'rgba(255, 255, 255, 0.7)'
|
|
});
|
|
$.ajax({
|
|
url: "{:U('refund_agree')}",
|
|
type: "post",
|
|
data: {
|
|
order_no: order_no, return_delivery_fee: return_delivery_fee
|
|
},
|
|
success: function (res) {
|
|
if (res.status == 1) {
|
|
that.$message({
|
|
type: "success",
|
|
message: res.msg,
|
|
duration: 1000,
|
|
onClose: function () {
|
|
loading_refund.close();
|
|
that.refund_order_no = "";
|
|
that.refundTitle = false;
|
|
that.getData();
|
|
}
|
|
})
|
|
} else {
|
|
that.$message({
|
|
type: "error",
|
|
message: res.msg,
|
|
duration: 1000,
|
|
onClose: function () {
|
|
loading_refund.close();
|
|
that.refundTitle = false;
|
|
}
|
|
})
|
|
|
|
}
|
|
}
|
|
})
|
|
}).catch(() => {
|
|
that.$message({
|
|
type: 'info',
|
|
message: '已取消该操作'
|
|
});
|
|
});
|
|
},
|
|
//配送
|
|
delivery_option(order_no, id) {
|
|
this.refund_order_no = order_no;
|
|
this.refund_order_id = id;
|
|
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()
|
|
}
|
|
})
|
|
},
|
|
//确认配送
|
|
delivery_agree: function () {
|
|
var that = this;
|
|
var delivery_type = that.delivery_type;
|
|
var refund_order_no = that.refund_order_no;
|
|
var refund_order_id = that.refund_order_id;
|
|
if (!delivery_type) {
|
|
that.$message({
|
|
type: "error",
|
|
message: "请选择配送方式",
|
|
duration: 1000
|
|
})
|
|
return;
|
|
}
|
|
if (!refund_order_no) {
|
|
that.$message({
|
|
type: "error",
|
|
message: "订单号缺失请刷新重试",
|
|
duration: 1000
|
|
})
|
|
return;
|
|
}
|
|
if (delivery_type == 4 && !refund_order_id) {
|
|
that.$message({
|
|
type: "error",
|
|
message: "订单ID缺失请刷新重试",
|
|
duration: 1000
|
|
})
|
|
return;
|
|
}
|
|
switch (delivery_type) {
|
|
case '1':
|
|
case '2':
|
|
that.delivery_agree_option(delivery_type, refund_order_no);
|
|
break;
|
|
case '3':
|
|
that.DeliveryTitle = false;
|
|
$.ajax({
|
|
url: "{:U('getUuDeliveryPrice')}",
|
|
type: "post",
|
|
data: {order_no: refund_order_no},
|
|
success: function (res) {
|
|
if (res.status == 1) {
|
|
that.$confirm(res.msg + '是否继续?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
that.delivery_agree_option(delivery_type, refund_order_no);
|
|
}).catch(() => {
|
|
that.$message({
|
|
type: 'info',
|
|
message: '已取消配送'
|
|
});
|
|
});
|
|
} else {
|
|
that.$message({
|
|
type: "error",
|
|
message: res.msg,
|
|
duration: 1000,
|
|
})
|
|
}
|
|
}
|
|
})
|
|
break;
|
|
case '4':
|
|
that.DeliveryTitle = false;
|
|
layer.open({
|
|
type: 2,
|
|
content: "{:U('Express/send_goods')}?id=" + refund_order_id,
|
|
title: "快递发货 - " + refund_order_no,
|
|
scrollbar: false,
|
|
area: ["calc(100% - 160px)", "calc(100% - 65px)"],
|
|
shade: 0,
|
|
offset: 'rb',
|
|
resize: false,
|
|
move: false,
|
|
end: function () {
|
|
that.getData();
|
|
},
|
|
})
|
|
break;
|
|
case '5':
|
|
//码科配送
|
|
that.DeliveryTitle = false;
|
|
$.ajax({
|
|
url: "{:U('getMakeDeliveryPrice')}",
|
|
type: "post",
|
|
data: {order_no: refund_order_no},
|
|
success: function (res) {
|
|
if (res.status == 1) {
|
|
that.$confirm(res.Tips + '是否继续?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
that.delivery_agree_option(delivery_type, refund_order_no, res.data.total_price);
|
|
}).catch(() => {
|
|
that.$message({
|
|
type: 'info',
|
|
message: '已取消配送'
|
|
});
|
|
});
|
|
} else {
|
|
that.$message({
|
|
type: "error",
|
|
message: res.msg,
|
|
duration: 1000,
|
|
})
|
|
}
|
|
}
|
|
})
|
|
break;
|
|
}
|
|
},
|
|
//配送公共方法
|
|
delivery_agree_option: function (delivery_type, refund_order_no, total_price = null) {
|
|
var that = this;
|
|
const loading_delivery = that.$loading({
|
|
target: "#loading_delivery",
|
|
lock: true,
|
|
text: '保存中,请等待',
|
|
spinner: 'el-icon-loading',
|
|
background: 'rgba(255, 255, 255, 0.7)'
|
|
});
|
|
$.ajax({
|
|
url: "{:U('delivery_agree')}",
|
|
type: "post",
|
|
data: {delivery_type: delivery_type, order_no: refund_order_no, total_price: total_price},
|
|
success: function (res) {
|
|
if (res.status == 1) {
|
|
that.$message({
|
|
type: "success",
|
|
message: res.msg,
|
|
duration: 1000,
|
|
onClose: function () {
|
|
loading_delivery.close();
|
|
that.DeliveryTitle = false;
|
|
that.getData();
|
|
}
|
|
})
|
|
} else {
|
|
that.$message({
|
|
type: "error",
|
|
message: res.msg,
|
|
duration: 1000,
|
|
onClose: function () {
|
|
loading_delivery.close();
|
|
that.getData();
|
|
}
|
|
})
|
|
}
|
|
}
|
|
})
|
|
},
|
|
//取消配送
|
|
delivery_cancel: function (order_no, delivery_type) {
|
|
var that = this;
|
|
that.$confirm('确认取消配送?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
switch (delivery_type) {
|
|
case '1':
|
|
that.delivery_cancel_option(order_no);
|
|
break;
|
|
case '2':
|
|
that.DaDaTitle = true;
|
|
that.refund_order_no = "";
|
|
that.refund_order_no = order_no;
|
|
$.ajax({
|
|
url: "{:U('getCancelDeliveryReason')}",
|
|
type: "post",
|
|
data: {},
|
|
success: function (res) {
|
|
that.da_reason_list = [];
|
|
that.da_reason_list = res.reason;
|
|
}
|
|
})
|
|
break;
|
|
case '3':
|
|
that.UUTitle = true;
|
|
that.refund_order_no = "";
|
|
that.refund_order_no = order_no;
|
|
break;
|
|
case '5':
|
|
//码科
|
|
that.delivery_cancel_option(order_no);
|
|
break;
|
|
}
|
|
}).catch(() => {
|
|
that.$message({
|
|
type: 'info',
|
|
message: '已取消该操作'
|
|
});
|
|
});
|
|
},
|
|
//达达取消
|
|
da_cancel: function () {
|
|
var that = this;
|
|
var refund_order_no = that.refund_order_no;
|
|
var reason_id = that.reason_id;
|
|
if (!refund_order_no) {
|
|
that.$message({
|
|
type: "error",
|
|
message: "订单号缺失",
|
|
duration: 1000
|
|
})
|
|
return;
|
|
}
|
|
if (!reason_id) {
|
|
that.$message({
|
|
type: "error",
|
|
message: "请选择原因",
|
|
duration: 1000
|
|
})
|
|
return;
|
|
}
|
|
that.delivery_cancel_option(refund_order_no, reason_id);
|
|
},
|
|
//UU取消
|
|
uu_cancel: function () {
|
|
var that = this;
|
|
var refund_order_no = that.refund_order_no;
|
|
var uu_reason = that.uu_reason;
|
|
if (!refund_order_no) {
|
|
that.$message({
|
|
type: "error",
|
|
message: "订单号缺失",
|
|
duration: 1000
|
|
})
|
|
return;
|
|
}
|
|
if (!uu_reason) {
|
|
that.$message({
|
|
type: "error",
|
|
message: "请输入原因",
|
|
duration: 1000
|
|
})
|
|
return;
|
|
}
|
|
that.delivery_cancel_option(refund_order_no, "", uu_reason);
|
|
},
|
|
//取消配送公共方法
|
|
delivery_cancel_option: function (order_no, reason_id = '', reason = '') {
|
|
var that = this;
|
|
that.loading = true;
|
|
$.ajax({
|
|
url: "{:U('delivery_cancel')}",
|
|
type: "post",
|
|
data: {
|
|
order_no: order_no,
|
|
reason_id: reason_id,
|
|
reason: reason
|
|
},
|
|
success: function (res) {
|
|
if (res.status == 1) {
|
|
that.$message({
|
|
type: "success",
|
|
message: res.msg,
|
|
duration: 1000,
|
|
onClose: function () {
|
|
that.loading = false;
|
|
that.littleTable = false;
|
|
that.getData();
|
|
}
|
|
})
|
|
} else {
|
|
that.$message({
|
|
type: "error",
|
|
message: res.msg,
|
|
duration: 1000,
|
|
onClose: function () {
|
|
that.loading = false;
|
|
}
|
|
})
|
|
}
|
|
}
|
|
})
|
|
},
|
|
//查看物流
|
|
seeLogistics: function (id) {
|
|
var that = this;
|
|
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: function () {
|
|
that.getData();
|
|
},
|
|
})
|
|
},
|
|
//wifi打印
|
|
pint_option: function (bill_id) {
|
|
var that = this;
|
|
$.ajax({
|
|
url: "{:U('print_option')}",
|
|
type: "post",
|
|
data: {bill_id: bill_id},
|
|
success: function (res) {
|
|
if (res.status == 0) {
|
|
that.$message({
|
|
type: "error",
|
|
message: res.msg,
|
|
duration: 1000
|
|
})
|
|
}
|
|
}
|
|
})
|
|
},
|
|
//导出
|
|
export_list: function () {
|
|
var that = this;
|
|
var time = that.time;
|
|
var order_no = that.order_no;
|
|
var vip_phone = that.vip_phone;
|
|
var order_type = that.order_type;
|
|
var status = that.status;
|
|
var order_genre = that.order_genre;
|
|
window.location.href = "{:U('export')}?time=" + time + "&order_no=" + order_no + "&vip_phone=" + vip_phone +
|
|
"&order_type=" + order_type + "&status=" + status + "&order_genre=" + order_genre;
|
|
},
|
|
/**
|
|
* @description: 打开串号选择窗口
|
|
* @param {Number} index: 当前商品索引
|
|
*/
|
|
selectSerial(index) {
|
|
this.serialDataType = 'multiple'
|
|
this.serialVisible = true
|
|
this.serialGoodsIndex = index
|
|
this.serialGoodsData = this.sell_list[index]
|
|
this.serialMaxSelected = this.sell_list[index].num
|
|
this.serialData = []
|
|
const serialList = this.sell_list[index].refund_serial_list
|
|
if (serialList && typeof serialList == 'object' && serialList.length > 0) {
|
|
serialList.forEach(serial => {
|
|
this.serialData.push({
|
|
id: serial.id,
|
|
mainSerial: serial.main_serial_number,
|
|
assistSerial1: serial.auxiliary_serial_number_one,
|
|
assistSerial2: serial.auxiliary_serial_number_two
|
|
})
|
|
})
|
|
}
|
|
},
|
|
/**
|
|
* @description: 串号子组件通道
|
|
* @param {Array} datas: 串号数据
|
|
* @param {Number} goodsIndex: 当前采购的商品索引
|
|
*/
|
|
serialChange(datas, goodsIndex) {
|
|
this.agreeBefore = false
|
|
const serialList = []
|
|
datas.forEach(data => {
|
|
serialList.push({
|
|
id: data.id,
|
|
main_serial_number: data.mainSerial,
|
|
auxiliary_serial_number_one: data.assistSerial1,
|
|
auxiliary_serial_number_two: data.assistSerial2
|
|
})
|
|
})
|
|
this.sell_list[goodsIndex].serial_list = serialList
|
|
this.$set(this.sell_list[goodsIndex], 'selectedNum', serialList.length)
|
|
},
|
|
/**
|
|
* @description: 打开串号详情窗口
|
|
* @param {Number} index: 当前商品索引
|
|
* @param {String} type: 串号详情数据类型
|
|
*/
|
|
detailsSerial(index) {
|
|
this.serialDataType = 'details'
|
|
this.serialMaxSelected = 0
|
|
this.serialData = []
|
|
this.serialVisible = true
|
|
const serialData = []
|
|
this.sell_list[index].retired_serial_list.forEach(serial => {
|
|
serialData.push({
|
|
mainSerial: serial.main_serial_number,
|
|
assistSerial1: serial.auxiliary_serial_number_one,
|
|
assistSerial2: serial.auxiliary_serial_number_two
|
|
})
|
|
})
|
|
|
|
this.serialData = serialData
|
|
}
|
|
},
|
|
created: function () {
|
|
this.getData();
|
|
this.getTotal();
|
|
}
|
|
})
|
|
</script> |