batch-order-index.blade.php 22 KB

1
  1. @extends('layouts.base') @section('title', "批量下单(中)记录列表") @section('content') <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/> <link rel="stylesheet" href="{{resource_get('plugins/yz-supply/assent/css/album1.css?time='.time())}}"> <style> .edit-i{display:none;} .el-table_1_column_2:hover .edit-i{font-weight:900;padding:0;margin:0;display:inline-block;} .el-tabs__item,.is-top{font-size:16px} .el-tabs__active-bar { height: 3px;} .list-title{display:flex;width:100%;background:#f9f9f9;padding:15px 10px;font-weight:900;border:1px solid #e9e9e9;} .list-title .list-title-1{display:flex;align-items:center;justify-content: center;} .list-info{display:flex ;padding: 10px;justify-content: left;background:#f9f9f9;} .list-con{display:flex;width:100%;font-size:12px;font-weight:500;align-items: stretch;border-bottom: 1px solid rgb(233, 233, 233);} .list-con-goods{display:flex;align-items:center;justify-content: center;box-sizing:border-box;padding-left:10px;border-top:1px solid #e9e9e9;min-height:90px} .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} .list-con-member-info{display:flex;padding:0 2px;flex-direction: column;flex:1;min-width: 120px;line-height:28px;justify-content: center;text-align:left;font-size:14px;border-top:1px solid #e9e9e9;border-right:1px solid #e9e9e9;} .list-member{padding: 10px;font-size: 12px;font-weight: 500;display:flex} .list-num{flex:3;display:flex;align-items:center;border-right:1px solid #e9e9e9;justify-content: center;} .list-gen{display:flex;align-items:center;justify-content: center;line-height:28px;} .list-gen-txt{flex:1;border-right:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;align-items:center;justify-content: center;display:flex;} .list-opt{flex:1;display:flex;align-items:center;border-left:1px solid #e9e9e9;justify-content: center;} /* 导航 */ .el-radio-button .el-radio-button__inner,.el-radio-button:first-child .el-radio-button__inner {border-radius: 4px 4px 4px 4px;border-left: 0px;} .el-radio-button__inner{border:0;} .el-radio-button:last-child .el-radio-button__inner {border-radius: 4px 4px 4px 4px;} .a-btn { border-radius: 2px; padding: 8px 12px; box-sizing: border-box; color: #666; font-weight: 500; text-align: center; margin-left: 1%; background-color: #fff; } .a-btn:hover{ background-color: #29BA9C; color: #FFF; } .a-colour1 { background-color: #fff; color: #666; } .a-colour2 { background-color: #29BA9C; color: #FFF; } </style> <div class="all"> <div id="app" v-cloak> <div class="vue-head"> <div class="top-title"> <span :class="item.class" v-for="(item,index) in albumTopTitle" @click="skipUrl(item)" :key="index">[[item.name]]</span> </div> </div> <div class="vue-head"> <div class="vue-main-title" style="margin-bottom:20px"> <div class="vue-main-title-left"></div> <div class="vue-main-title-content">订单筛选</div> <div class="vue-main-title-button"> </div> </div> <div class="vue-search"> <el-form :inline="true" :model="search_form" class="demo-form-inline"> <el-form-item label="" prop=""> <el-select v-model="search_form.middleground_configuration_id" placeholder="请选择供应链" clearable remote filterable > <el-option v-for="item in middleground_configuration" :key="item.id" :label="item.title" :value="item.id"></el-option> </el-select> </el-form-item> <el-form-item label=""> <el-input v-model="search_form.order_sn" placeholder="中台订单号"></el-input> </el-form-item> <el-form-item label=""> <el-input v-model="search_form.order_id" placeholder="中台订单id"></el-input> </el-form-item> <el-form-item label=""> <el-input v-model="search_form.third_order_sn" placeholder="商城批量下单订单号"></el-input> </el-form-item> <el-form-item label=""> <el-input v-model="search_form.pay_sn" placeholder="中台支付单号"></el-input> </el-form-item> <el-form-item label=""> <el-button type="primary" @click="search(1)">搜索</el-button> </el-form-item> </el-form> </div> </div> <div class="vue-main"> <div class="vue-main-form"> <div class="vue-main-title" style="margin-bottom:20px"> <div class="vue-main-title-left"></div> <div class="" style="text-align:left;font-size:14px;color:#999"> <span>订单数:[[count]]</span>&nbsp;&nbsp;&nbsp; </div> <div class="vue-main-title-button"> </div> </div> <div v-for="(item,index) in list" style="border:1px solid #e9e9e9;border-radius:10px;margin-bottom:10px"> <div class="list-info"> <div style="display:flex;flex-wrap:wrap"> <div class="vue-ellipsis" style="color:#999;"> <strong>中台订单ID:</strong>[[item.order_id]]&nbsp;&nbsp;&nbsp; </div> <div class="vue-ellipsis" style="color:#999;"> <strong>中台订单编号:</strong>[[item.order_sn]]&nbsp;&nbsp;&nbsp; </div> {{-- <div class="vue-ellipsis" style="color:#999;">--}} {{-- <strong>中台支付单号:</strong>[[item.pay_sn]]&nbsp;&nbsp;&nbsp;--}} {{-- </div>--}} <div class="vue-ellipsis" style="color:#999;"> <strong>批量下单订单编号:</strong>[[item.third_order_sn]]&nbsp;&nbsp;&nbsp; </div> <div class="vue-ellipsis" style="color:#999;max-width:230px"> <strong>下单时间:</strong>[[item.created_at]]&nbsp;&nbsp;&nbsp; </div> <div class="vue-ellipsis" style="color:red;max-width:230px"> <strong>配置名称:</strong>[[item.middleground_configuration_title]]&nbsp;&nbsp;&nbsp; </div> </div> </div> <div class="list-con"> <div style="flex:3;min-width:400px"> <div v-for="(item1,index1) in item.has_many_yz_supply_batch_order_item" class="list-con-goods"> <div class="list-con-goods-img" style="width:80px"> <el-image :src="item1.image_url" style="width:70px;height:70px"></el-image> </div> <div class="list-con-goods-text" :style="{justifyContent:(item1.sku_title?'':'center')}"> <div class="list-con-goods-title" style="color:#29BA9C;cursor: pointer;" v-if="item1.yz_goods_id" @click="gotoGoods(item1.yz_goods_id)">[[item1.title]]</div> <div class="list-con-goods-title" style="color:#29BA9C;cursor: pointer;" v-else>[[item1.title]]</div> <div class="list-con-goods-option" v-if="item1.sku_title">规格:[[item1.sku_title]]</div> </div> <div class="list-con-goods-price" style="width:200px;margin: 0 auto;"> <div>中台-商品供货价:[[item1.supply_amount]]</div> <div>金额:[[item1.amount]]</div> <div>数量:[[item1.qty]]</div> </div> </div> </div> <div class="list-con-member-info vue-ellipsis" style="text-align:center;min-width: 90px;"> <div><strong>[[item.pay_type_name]]</strong></div> <div><strong v-if="item.pay_type">[[item.pay_type]]</strong></div> </div> <div class="list-con-member-info vue-ellipsis" style="min-width: 120px;"> <div style="min-width:75%;margin:0 auto"> <div >订单总价:¥[[item.amount]]</div> <div>订单运费:¥[[item.freight]]</div> </div> </div> <div class="list-con-member-info vue-ellipsis" style="text-align:center"> <div style="min-width:70%;margin:0 auto"> <div style="color:#29BA9C">[[item.status_name]]</div> </div> </div> {{-- <div class="list-con-member-info vue-ellipsis" style="text-align:center;min-width: 80px;border-right:0">--}} {{-- <div v-if="item.status == 1">--}} {{-- <el-button @click="confirmSend(item.id,item)" size="mini" type="primary" style="width:80%;margin:0 auto;margin-bottom:5px;">确认提交/支付</el-button><br>--}} {{-- </div>--}} {{-- </div>--}} </div> <div class="list-member"> <div v-if="item.address.address"> [[item.address.address.consignee]]&nbsp;&nbsp;&nbsp;[[item.address.address.phone]]&nbsp;&nbsp;&nbsp;[[item.address.address.province]][[item.address.address.city]][[item.address.address.area]][[item.address.address.street]][[item.address.address.description]] </div> </div> </div> </div> </div> <div style="height: 100px;"></div> <div> <!-- 分页 --> <div class="vue-page" v-if="total>0"> <el-row> <el-col align="right"> <el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total" :page-size="per_page" :current-page="current_page" background ></el-pagination> </el-col> </el-row> </div> </div> </div> {{--@include('public.admin.orderOperation')--}} {{--@include('public.admin.orderOperationV')--}} <script> var app = new Vue({ el: "#app", delimiters: ['[[', ']]'], name: 'test', data() { return { albumTopTitle: [ { id: 1, name: "订单列表", class:"album-name-against", url:"{!! yzWebFullUrl('plugin.yz-supply.admin.order-vue-list.index') !!}" }, { id: 2, name: "批量下单(中)记录", class:"album-name", url:"{!! yzWebFullUrl('plugin.yz-supply.admin.bulk-order.batch-order-index') !!}" }, ], {{--commonPartUrl: '{!! yzWebFullUrl('order.order-list.common-part') !!}', //获取公共参数链接--}} listUrl: '{!! yzWebFullUrl('plugin.yz-supply.admin.bulk-order.batch-order-list') !!}',//获取订单数据链接 list:[], count:0, has_many_level:[], change_sort:'', times:[], //页面返回全部参数 responseResults:{}, //插件判断条件 extra_param:{}, //订单条件 code:'all', expressCompanies:[],//快递公司 middleground_configuration:[],//中台供应链 //搜索条件参数 search_form:{ middleground_configuration_id:"", order_searchs:1, }, order_searchs_string_placeholder:"请输入订单编号", close_order_id:"", close_order_api:"", close_order1_id:"", close_order1_api:"", cancel_send_show:false,// 取消发货弹窗 cancel_send_con:"",//取消发货原因 cancel_send_id:'', confirm_send_show:false,// 确认发货弹窗 confirm_send_id:"", order_model:{}, dispatch_price:0,//运费 order_goods_model:[], address_info:{}, //发货提交信息 send:{ dispatch_type_id:1, express_code:"", express_sn:"", order_sn:"", }, send_rules:{ }, order_goods_send_list:[ // {'goods_id':231284,'title':'测试','thumb':'https://fjfff-1301507422.cos.ap-guangzhou.myqcloud.com//images//5//2020//08//GjeOooWqo8O2dlw2v5ODzDOZOqMOeJ.jpg'}, // {'goods_id':231284,'title':'测试','thumb':'https://fjfff-1301507422.cos.ap-guangzhou.myqcloud.com//images//5//2020//08//GjeOooWqo8O2dlw2v5ODzDOZOqMOeJ.jpg'} ], send_order_goods_ids:[], street:0, province_list:[], city_list : [], district_list : [], street_list : [], areaLoading:false, rules: {}, current_page:1, total:1, per_page:1, readonly:false, operationType:'', operationOrder:{}, dialog_show:0, } }, created() { }, mounted() { this.getMiddlegroundConfiguration(); this.getData(1); }, methods: { skipUrl(item){ window.location.href = item.url }, //视图返回数据 viewReturn() { return {!! $data?:'{}' !!}; }, getMiddlegroundConfiguration(){ this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.middleground-configuration.get-middleground-configurations') !!}').then(function (response) { if (response.data.result) { this.middleground_configuration = response.data.data; } else { this.$message({message: response.data.msg, type: 'error'}); } }, function (response) { this.$message({message: response.data.msg, type: 'error'}); }) }, checkSelectable(item){ return item.send_status == 0; }, getData(page) { let requestData = { page:page, code: this.code, search: JSON.parse(JSON.stringify(this.search_form)), middleground_configuration_id:this.search_form.middleground_configuration_id }; if(this.times && this.times.length>0) { requestData.search.start_time = this.times[0]; requestData.search.end_time = this.times[1]; } let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'}); this.$http.post(this.listUrl,requestData).then(function(response) { console.log(response.data.data); if (response.data.result) { this.count = response.data.data.total; this.list = response.data.data.data; this.current_page = response.data.data.page; this.total = response.data.data.total; this.per_page = response.data.data.per_page; 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(); }); }, getExpressCompanies(){ this.$http.post('{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-order.get-express-companies') !!}').then(response => { if (response.data.result == 1) { this.expressCompanies = response.data.data.data; console.log(this.expressCompanies); } else { that.$message.error(response.data.msg); } }), function (res) { console.log(res); }; }, // 多包裹确认发货 选择商品 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; }, gotoDetail(item) { let link = '{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.cloud-order.detail') !!}'; {{--let link = '{!! yzWebFullUrl('plugin.yz-supply.admin.cloud.vue-detail') !!}';--}} link = link+'&middleground_configuration_id='+this.search_form.middleground_configuration_id+'&id='+item.id; console.log(link); window.open(link); }, search(val) { this.getData(val); }, orderConfirm(operationType, order) { console.log(operationType, order); this.dialog_show++; this.operationOrder = order; this.operationType = operationType; }, orderexport(){ let requestData = { code: this.code, search: JSON.parse(JSON.stringify(this.search_form)), middleground_configuration_id:this.search_form.middleground_configuration_id }; if(this.times && this.times.length>0) { requestData.search.start_time = this.times[0]; requestData.search.end_time = this.times[1]; } // window.location.href = this.exportUrl; let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'}); this.$http.post(this.exportUrl,requestData).then(function(response) { console.log(response.data.data.link); if (response.data.result) { let $eleForm = $("<form method='get'></form>"); $eleForm.attr("action",response.data.data.link); $(document.body).append($eleForm); //提交表单,实现下载 $eleForm.submit(); 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(); }); }, gotoGoods(id) { let link = '{!! yzWebFullUrl('plugin.yz-supply.admin.shop-goods.edit') !!}'; window.location.href = link+`&id=`+id; }, // 字符转义 escapeHTML(a) { a = "" + a; return a.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, "\"").replace(/&apos;/g, "'");; }, getParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; }, reloadList() { this.search(this.current_page) } }, }) </script> @endsection