| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587 |
- @extends('layouts.base')
- @section('title', '订单详情')
- @section('content')
- <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
- <style>
- body{font-weight:500;color:#333;}
- .all{background:#eff3f6}
- .el-form-item__label{margin-right:30px}
- .vue-main-form .el-form-item__content{margin-left:calc(15% + 30px) !important}
- .order-sum-li{width:16.66%;line-height:28px}
- .list-con-goods-text{min-height:70px;overflow:hidden;flex:1;display: flex;flex-direction: column;justify-content: space-between;}
- .list-con-goods-price{border-right:1px solid #e9e9e9;border-left:1px solid #e9e9e9;min-width:150px;min-height:90px;text-align: left;padding:20px;display: flex;flex-direction: column;}
- .list-con-goods-title{font-size:14px;line-height:20px;text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;line-clamp: 2;-webkit-box-orient: vertical;}
- .list-con-goods-option{font-size:12px;color:#999}
- </style>
- <div class="all">
- <div id="app" v-cloak>
- <div class="vue-crumbs">
- <a>订单管理</a> > 订单详情
- </div>
- <el-form ref="form" :model="form" label-width="15%">
- <div class="vue-head">
- <div class="vue-main-title">
- <div class="vue-main-title-left"></div>
- <div class="vue-main-title-content">基本信息</div>
- </div>
- <div class="vue-main-form">
- <el-form-item label="购买会员" prop="store_name">
- <div style="width:100px;height:100px" v-if="user.avatar != '' ">
- <img :src="user.avatar" alt="" style="width:100%;height:100%">
- </div>
- <div style="line-height:33px;margin-left:15px">
- <div>(会员ID:[[user.id]]) [[user.nickname]]</div>
- <div>[[shipping_address.realname]]</div>
- <div>[[shipping_address.mobile]]</div>
- </div>
- </el-form-item>
- <el-form-item label="订单编号">
- <div>[[orderDetail.order_sn]]</div>
- </el-form-item>
- <el-form-item label="订单金额" prop="">
- <div style="display:flex;width:70%">
- <div class="order-sum-li" v-for="(item,index) in amount_detail.amount_items">
- <div>[[item.title]]</div>
- <div>¥[[item.amount]]</div>
- </div>
- <div class="order-sum-li">
- <div>应收款</div>
- <div style="color:red;font-weight:600">¥[[amount_detail.amount]]</div>
- </div>
- </div>
- </el-form-item>
- <el-form-item label="订单状态" prop="">
- <div style="display:inline-block;margin-right:20px">[[orderDetail.status_name]]</div>
- <el-button size="small" plain type="primary" @click="confirmSend(orderDetail.id,orderDetail)" v-if="orderDetail.status==1">确认发货</el-button>
- <el-button size="small" plain type="primary" @click="cancelOrder(orderDetail.id,orderDetail)" v-if="orderDetail.status==0">关闭订单</el-button>
- </el-form-item>
- <el-form-item label="" prop="">
- <el-steps align-center style="width:70%" process-status="process">
- <el-step v-for="(process_item,processIndex) in orderDetail.order_steps" :key="processIndex" :icon="process_item.icon" :status="process_item.status" :title="process_item.title" :description="process_item.desc"></el-step>
- </el-steps>
- </el-form-item>
- <el-form-item label="用户备注" prop="">
- <div>[[orderDetail.remark]]</div>
- </el-form-item>
- </div>
- </div>
- <div v-if="orderDetail.shipping_address != null" class="vue-head">
- <div class="vue-main-title">
- <div class="vue-main-title-left"></div>
- <div class="vue-main-title-content">收货信息</div>
- </div>
- <div class="vue-main-form">
- <el-form-item label="收货人" prop="">
- <div>[[orderDetail.shipping_address.realname]]</div>
- </el-form-item>
- <el-form-item label="联系电话" prop="">
- <div>[[orderDetail.shipping_address.mobile]]</div>
- </el-form-item>
- <el-form-item label="收货地址" prop="">
- <div>[[orderDetail.shipping_address.province]][[orderDetail.shipping_address.city]][[orderDetail.shipping_address.county]][[orderDetail.shipping_address.town]][[orderDetail.shipping_address.detail]]</div>
- </el-form-item>
- <!-- 物流信息 -->
- <div v-if="orderDetail.order_express != null && orderDetail.order_express.length > 0">
- <el-form-item label="物流信息" prop="">
- <el-button size="small" type="primary" @click="showDispatchInfo()">查看</el-button>
- </el-form-item>
- </div>
- </div>
- </div>
- <!-- 商品信息 -->
- <div v-if="orderDetail.order_items !== undefined && orderDetail.order_items.length > 0" class="vue-head">
- <div class="vue-main-title">
- <div class="vue-main-title-left"></div>
- <div class="vue-main-title-content">商品信息</div>
- </div>
- <div class="vue-main-form">
- <el-table :data="orderDetail.order_items" style="width: 100%">
- <el-table-column prop="product_id" label="商品ID" width="100" align="center"></el-table-column>
- <el-table-column prop="" label="商品" width="60" align="center">
- <template slot-scope="scope">
- <img :src="scope.row.image_url" style="width:50px;height:50px;">
- </template>
- </el-table-column>
- <el-table-column prop="down_time" label="" min-width="180" align="left">
- <template slot-scope="scope">
- <!-- style="color:#29BA9C;cursor: pointer;"
- @click=" gotoGoods(scope.row.goods_id) "> -->
- <div class="list-con-goods-title">
- [[scope.row.title]]
- </div>
- <div class="list-con-goods-option">规格: [[scope.row.sku_title]]</div>
- <div class="list-con-goods-option">数量: [[scope.row.qty]]</div>
- <!-- </div> -->
- </template>
- </el-table-column>
- <el-table-column prop="down_time" label="商品价格" min-width="230" align="center">
- <template slot-scope="scope">
- <div>
- <div style="display:flex;justify-content: center;">
- <div style="flex:1;text-align:right">中台-供货价:</div>
- <div style="flex:1;text-align:left">¥[[scope.row.supply_amount]]</div>
- </div>
- <div style="display:flex;justify-content: center;">
- <div style="flex:1;text-align:right">单价:</div>
- <div style="flex:1;text-align:left">¥[[scope.row.price]]</div>
- </div>
- <div style="display:flex;justify-content: center;">
- <div style="flex:1;text-align:right">小计:</div>
- <div style="flex:1;text-align:left">¥[[scope.row.amount]]</div>
- </div>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- </el-form>
- <!-- 查看商品 -->
- <el-dialog :visible.sync="get_goods_show" width="750px" title="商品列表">
- <div id="separate-send">
- <el-table ref="multipleTable1" :data="get_goods_list" tooltip-effect="dark" height="550" style="width: 100%">
- <el-table-column width="550">
- <template slot-scope="scope">
- <div style="display:flex;width: 88%;">
- <div style="width:50px;height:50px">
- <img :src="scope.row.image_url" alt="" style="width:50px;height:50px">
- </div>
- <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
- <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.title]]</div>
- <div style="color:#999">[[scope.row.product_id]]</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column>
- <template slot-scope="scope">
- <div style="color:#999">[[scope.row.sku_title]]</div>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="get_goods_show = false">取 消</el-button>
- </span>
- </el-dialog>
- <!-- 查看物流信息 -->
- <el-dialog :visible.sync="modal_dispatch_info" width="750px" center title="物流信息">
- <div style="height:400px;overflow:auto" id="dispatch-info">
- <!-- 多包裹 -->
- <div>
- <div style="display:flex;margin-bottom:15px;" v-for="(item3,index3) in dispatch">
- <div class="left" style="width:105px;margin-right:30px;text-align:right">
- 包裹[[index3 + 1]]信息
- </div>
- <div class="right" style="flex:1" v-if="item3.order_items.length>0">
- <div>
- <div class="wl-img" style="width:70px;height:70px;position:relative;">
- <img :src="item3.order_items[0].image_url" style="width:100%;height:100%">
- <div style="line-height:18px;background:RGB(17, 9, 5,0.7);color:#fff;position:absolute;bottom:0;width:100%;text-align:center">
- {{-- 共[[item3.count]]件--}}
- </div>
- <div @click="getGoodDetail(item3.order_items)" style="position:absolute;bottom:0;right:-80px;cursor: pointer;color:#ff9b19 ">
- 查看商品
- </div>
- </div>
- <div style="padding:5px 0" v-if="item3.company_name">公司:[[item3.company_name]]</div>
- <div style="padding:5px 0" v-if="item3.express_no">运单号:[[item3.express_no]]</div>
- <div style="padding:5px 0" v-if="item3.express_no == '' ">无物流</div>
- <template v-if="item3.list != null">
- <div style="padding:5px 0" v-for="(d1, k2) in item3.list" :key="k2">[[d1.time]] [[d1.status]]</div>
- </template>
- {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
- {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
- {{--<div style="padding:5px 0">[2020-12-12 09:12:23] 物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新物流信息更新</div>--}}
- </div>
- </div>
- </div>
- </div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="modal_dispatch_info = false">关 闭</el-button>
- {{--<el-button type="primary" @click="confirmRefundReject()">确 认</el-button>--}}
- </span>
- </el-dialog>
- <!-- 确认发货 -->
- <el-dialog :visible.sync="confirm_send_show" width="850px" title="确认发货">
- <div style="height:600px;overflow:auto" id="confirm-send">
- <el-form ref="send" :model="send" :rules="send_rules" label-width="15%">
- <el-form-item label="收件人信息" prop="aggregation">
- <div>收 件 人: [[address_info.realname]] / [[address_info.mobile]]</div>
- <div>收货地址: [[address_info.province]][[address_info.city]][[address_info.county]][[address_info.town]][[address_info.detail]]</div>
- </el-form-item>
- <el-form-item label="配送方式" prop="">
- <el-radio v-model="send.dispatch_type_id" :label="1">快递</el-radio>
- <el-radio v-model="send.dispatch_type_id" :label="2">无需物流</el-radio>
- </el-form-item>
- <div v-if="send.dispatch_type_id == 1">
- <el-form-item label="快递公司">
- <el-select v-model="send.express_code" clearable filterable placeholder="快递公司" :disabled='readonly' style="width:70%;">
- <el-option label="请选择快递" value=""></el-option>
- <el-option v-for="(item,index) in expressCompanies" :key="index" :label="item.name" :value="item.code"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="快递单号" prop="">
- <el-input v-model="send.express_sn" :disabled='readonly' style="width:70%;"></el-input>
- </el-form-item>
- </div>
- <el-table ref="multipleTable" :data="order_goods_send_list" tooltip-effect="dark" height="350" style="width: 100%" @selection-change="moreSendChange">
- <el-table-column type="selection" :selectable="checkSelectable" width="55"></el-table-column>
- <el-table-column width="350">
- <template slot-scope="scope">
- <div style="display:flex;width: 88%;">
- <div style="width:50px;height:50px">
- <img :src="scope.row.image_url" alt="" style="width:50px;height:50px">
- </div>
- <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
- <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.title]]</div>
- <div style="color:#999">[[scope.row.product_id]]</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column >
- <template slot-scope="scope">
- <div style="display:flex;width: 88%;">
- <div style="margin-left:20px;display: flex;flex-direction: column;justify-content: space-between;">
- <div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">[[scope.row.order_express.company_name]]</div>
- <div style="color:#999">[[scope.row.order_express.express_no]]</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column>
- <template slot-scope="scope">
- <div style="color:#999">[[scope.row.sku_title]]</div>
- </template>
- </el-table-column>
- </el-table>
- </el-form>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="confirm_send_show = false">取 消</el-button>
- <el-button type="primary" @click="sureconfirmSend()">确认发货 </el-button>
- </span>
- </el-dialog>
- </div>
- </div>
- </div>
- <script>
- var app = new Vue({
- el:"#app",
- delimiters: ['[[', ']]'],
- name: 'test',
- data() {
- return{
- is_pdf:false,
- street: '{!! \Setting::get("shop.trade")['is_street'] !!}',
- id:0,
- middleground_configuration_id:0,
- getDataUrl: '{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-order.detail') !!}',//获取订单数据链接
- order_id:0,
- orderDetail:{},
- amount_detail:[],//金额数组
- user:[],//用户信息
- shipping_address:[],//收货人信息
- readonly:false,
- dispatch:{}, //订单物流信息
- logistics:{},//物流详情
- modal_dispatch_info: false,
- form:{
- },
- loading: false,
- cancel_send_show:false,// 取消发货弹窗
- cancel_send_con:"",//取消发货原因
- cancel_send_id:'',
- confirm_send_show:false,// 确认发货弹窗
- confirm_send_id:"",
- send:{
- dispatch_type_id:1,
- express_code:"",
- express_sn:"",
- order_sn:"",
- },
- send_rules:{},
- address_info:{},
- expressCompanies:[],//快递公司
- // 多包裹发货
- more_send_show:false,
- order_goods_send_list:[],
- send_order_goods_ids:[],
- // 查看商品
- get_goods_show:false,
- get_goods_list:[],
- }
- },
- created() {
- let result = this.viewReturn();
- this.__initial(result);
- },
- mounted() {
- if(this.id) {
- this.getData();
- }
- },
- methods: {
- //视图返回数据
- viewReturn() {
- return {!! $data?:'{}' !!};
- },
- //初始化页面数据,请求链接
- __initial(data) {
- if (data.id) {
- this.id = data.id;
- }
- if (data.middleground_configuration_id) {
- this.middleground_configuration_id = data.middleground_configuration_id;
- }
- console.log(data);
- },
- getData() {
- let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
- this.$http.post(this.getDataUrl,{id:this.id,middleground_configuration_id:this.middleground_configuration_id }).then(function (response) {
- if (response.data.result){
- this.orderDetail = response.data.data.order;
- this.amount_detail = response.data.data.order.amount_detail;
- this.user = response.data.data.order.user;
- this.shipping_address = response.data.data.order.shipping_address;
- this.order_id = response.data.data.order.id;
- this.dispatch = response.data.data.order.order_express;
- this.logistics = response.data.data.order.logistics;
- loading.close();
- } else {
- this.$message({message: response.data.msg,type: 'error'});
- }
- loading.close();
- },function (response) {
- this.$message({message: response.data.msg,type: 'error'});
- loading.close();
- }
- );
- },
- checkSelectable(item){
- // console.log(item);
- return item.send_status == 0;
- },
- //订单取消
- cancelOrder(id,item){
- this.$confirm('确定取消编号:'+item.order_sn+'订单吗?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
- let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
- this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-order.cancel-order') !!}',{order_id:id,order_sn:item.order_sn,middleground_configuration_id:this.middleground_configuration_id}).then(function (response) {
- if (response.data.result) {
- this.$message({type: 'success',message: '取消成功!'});
- this.getData(1);
- }
- else{
- this.$message({type: 'error',message: response.data.msg});
- }
- loading.close();
- },function (response) {
- this.$message({type: 'error',message: response.data.msg});
- loading.close();
- }
- );
- }).catch(() => {
- this.$message({type: 'info',message: '已取消'});
- });
- },
- // 确认发货
- confirmSend(id,item) {
- let json = {
- order_id:id,
- middleground_configuration_id:this.middleground_configuration_id
- };
- console.log(json);
- let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
- this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-order.goods-send-info') !!}',json).then(function(response) {
- loading.close();
- if (response.data.result) {
- this.confirm_send_show = true;
- this.confirm_send_con = "";
- this.send = {
- dispatch_type_id :1,
- express_code:"",
- express_sn:"",
- order_sn:item.order_sn
- }
- this.confirm_send_id = response.data.data.order.id;
- this.address_info = response.data.data.order.shipping_address || {};
- this.order_goods_send_list = response.data.data.order.order_items;
- this.expressCompanies = response.data.data.express;
- } else {
- this.$message({
- message: response.data.msg,
- type: 'error'
- });
- }
- }, function(response) {
- this.$message({
- message: response.data.msg,
- type: 'error'
- });
- loading.close();
- });
- },
- sureconfirmSend(){
- let json = {
- dispatch_type_id :this.send.dispatch_type_id,
- express_code:this.send.express_code,
- express_sn:this.send.express_sn,
- order_item_ids:this.send_order_goods_ids,
- order_id:this.confirm_send_id,
- order_sn:this.send.order_sn,
- middleground_configuration_id:this.middleground_configuration_id
- };
- let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
- this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-order.send') !!}',json).then(function(response) {
- if (response.data.result) {
- this.$message({
- message: '发货成功',
- type: 'success'
- });
- this.confirm_send_show = false;
- loading.close();
- this.getData();
- } else {
- this.$message({
- message: response.data.msg,
- type: 'error'
- });
- }
- loading.close();
- }, function(response) {
- this.$message({
- message: response.data.msg,
- type: 'error'
- });
- loading.close();
- });
- },
- // 选择商品
- moreSendChange(selection) {
- let arr = [];
- for(let j = 0,len = selection.length; j < len; j++){
- console.log(selection[j].id);
- arr.push(selection[j].id);
- }
- this.send_order_goods_ids = arr;
- },
- // 获取可选择的商品 多包裹发货
- getSeparateSendOrderGoods(id) {
- this.$http.post('{!! yzWebFullUrl('order.multiple-packages-order-goods.get-order-goods') !!}', {order_id:id,middleground_configuration_id:this.middleground_configuration_id}).then(function (response) {
- if (response.data.result) {
- this.order_goods_send_list = response.data.data;
- // console.log(this.order_goods_send_list);
- } else{
- this.$message({type: 'error',message: response.data.msg});
- }
- },function (response) {
- this.$message({type: 'error',message: response.data.msg});
- });
- },
- //查看物流信息
- showDispatchInfo() {
- this.modal_dispatch_info = true;
- },
- // 查看商品
- getGoodDetail(item) {
- console.log(item)
- this.get_goods_show = true;
- this.get_goods_list = [];
- this.get_goods_list = item || [];
- },
- gotoGoods(id) {
- window.open(`{!! yzWebFullUrl('goods.goods.edit') !!}`+`&id=`+id);
- {{--window.location.href = `{!! yzWebFullUrl('goods.goods.edit') !!}`+`&id=`+id;--}}
- },
- clearImg(str,type,index) {
- if(!type) {
- this.form[str] = "";
- this.form[str+'_url'] = "";
- }
- else {
- this.form[str].splice(index,1);
- this.form[str+'_url'].splice(index,1);
- }
- this.$forceUpdate();
- },
- goBack() {
- history.go(-1)
- },
- sureImg(name,image,image_url) {
- this.form[name] = image;
- this.form[name+'_url'] = image_url;
- let url = image_url.split('.')
- console.log(url)
- if(url[url.length-1] == 'pdf') {
- this.is_pdf = true;
- }
- else {
- this.is_pdf = false;
- }
- },
- clearImg(str) {
- this.form[str] = "";
- this.form[str+'_url'] = "";
- this.$forceUpdate();
- },
- },
- })
- </script>
- @endsection
|