You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

2 lines
7.4 KiB

"use strict";(self["webpackChunkabcdf"]=self["webpackChunkabcdf"]||[]).push([[592],{4592:function(e,t,a){a.r(t),a.d(t,{default:function(){return d}});var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"bg"},[t("el-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("el-tab-pane",{attrs:{label:"待评价订单",name:"pendingPayment"}}),t("el-tab-pane",{attrs:{label:"已评价",name:"pendingDelivery"}})],1),t("div",{staticClass:"filter-bar"},[t("el-form",{attrs:{inline:!0,model:e.filterForm,size:"small"}},[t("el-form-item",{attrs:{label:"订单编号"}},[t("el-input",{attrs:{placeholder:"请输入订单编号"},model:{value:e.filterForm.orderNo,callback:function(t){e.$set(e.filterForm,"orderNo",t)},expression:"filterForm.orderNo"}})],1),t("el-form-item",{attrs:{label:"商品名称"}},[t("el-input",{attrs:{placeholder:"请输入商品名称"},model:{value:e.filterForm.goodsName,callback:function(t){e.$set(e.filterForm,"goodsName",t)},expression:"filterForm.goodsName"}})],1),t("el-form-item",{attrs:{label:"供应商名称"}},[t("el-input",{attrs:{placeholder:"请输入商家名称"},model:{value:e.filterForm.merchantName,callback:function(t){e.$set(e.filterForm,"merchantName",t)},expression:"filterForm.merchantName"}})],1),t("el-form-item",{attrs:{label:"下单时间"}},[t("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd"},model:{value:e.filterForm.createTime,callback:function(t){e.$set(e.filterForm,"createTime",t)},expression:"filterForm.createTime"}})],1),t("el-form-item",[t("el-button",{staticStyle:{background:"#6a8a27",border:"none"},attrs:{type:"primary"},on:{click:e.search}},[e._v("搜索")])],1),t("el-form-item",[t("el-button",{on:{click:e.reset}},[e._v("重置")])],1)],1)],1),t("div",[e._m(0),e._l(e.filteredOrders,function(a){return t("div",{key:a.id,staticClass:"order-card"},[t("div",{staticClass:"order-header flex-between"},[t("div",{staticStyle:{display:"flex"}},[t("div",[e._v("订单号: "+e._s(a.orderNo))]),t("div",{staticStyle:{"padding-left":"60px"}},[e._v("下单时间:"+e._s(a.createTime))])]),t("div",{staticClass:"product-status"})]),t("div",{staticClass:"order-products"},e._l(a.products,function(a){return t("div",{key:a.id,staticClass:"product-item"},[t("img",{staticClass:"product-image",attrs:{src:a.image,alt:a.name}}),t("div",{staticClass:"product-details"},[t("div",{staticClass:"product-name"},[e._v(e._s(a.name))]),t("div",{staticClass:"product-spec"},[e._v(e._s(a.spec))])]),t("div",{staticClass:"product-price"},[e._v("¥"+e._s(a.price.toFixed(2)))]),t("div",{staticClass:"product-quantity"},[e._v("x"+e._s(a.quantity))]),t("div",{staticClass:"product-total"},[e._v("¥"+e._s((a.price*a.quantity).toFixed(2)))]),t("div",{staticClass:"product-actions"},[t("el-button",{attrs:{type:"text",size:"mini"}},[e._v(" 商品详情")])],1)])}),0),t("div",{staticClass:"order-footer"},[t("div",{staticClass:"order-summary"},[t("div",{staticClass:"order-amount"},[e._v(" 合计: "),t("strong",[e._v("¥"+e._s(a.totalAmount.toFixed(2)))]),e._v(" (含运费 ¥"+e._s(a.freight.toFixed(2))+") ")])]),t("div",{staticClass:"order-actions"},[t("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(t){return e.gotoReview(a.id)}}},[e._v("去评价")])],1)])])}),e.filteredOrders.length<=0?t("el-empty",{attrs:{description:"暂无订单"}}):e._e(),t("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[t("el-pagination",{attrs:{"current-page":e.currentPage,"page-sizes":[5,10,20],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.filteredOrders.length},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],2)],1)},r=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"order-products",staticStyle:{padding:"0 20px",background:"#f8f9fa","border-top":"1px solid #eee","border-bottom":"1px solid #eee","margin-bottom":"20px"}},[t("div",{staticClass:"product-item"},[t("div",{staticClass:"product-details"},[t("div",{staticClass:"product-name"},[e._v("商品信息")])]),t("div",{staticClass:"product-price"},[e._v("单价(元)")]),t("div",{staticClass:"product-quantity"},[e._v("数量")]),t("div",{staticClass:"product-total"},[e._v("小计(元)")]),t("div",{staticClass:"product-actions"})])])}],s=(a(4114),a(8111),a(2489),a(3579),{name:"OrderList",data(){return{activeTab:"all",currentPage:1,pageSize:10,filterForm:{goodsName:"",orderNo:"",createTime:"",merchantName:"",tradeStatus:""},orders:[{id:1,orderNo:"209907091214560078",createTime:"2099-07-09 10:47:49",status:"pendingPayment",totalAmount:937,freight:15,isReviewed:!1,merchant:{id:101,name:"花艺生活馆",isOfficial:!0},products:[{id:1001,name:"深情挚爱/卡罗拉玫瑰",image:"https://picsum.photos/200/200?random=1",spec:"卡罗拉玫瑰33枝",price:349,quantity:1,status:"pendingPayment"},{id:1002,name:"精美包装纸",image:"https://picsum.photos/200/200?random=4",spec:"粉色",price:38,quantity:2,status:"pendingPayment"}]},{id:2,orderNo:"209907091214560079",createTime:"2099-07-09 10:48:49",status:"pendingDelivery",totalAmount:199,freight:0,isReviewed:!1,merchant:{id:102,name:"北欧家居旗舰店",isOfficial:!0},products:[{id:2001,name:"北欧花艺素雅仿真花",image:"https://picsum.photos/200/200?random=2",spec:"白色",price:199,quantity:1,status:"pendingDelivery"}]},{id:3,orderNo:"209907091214560080",createTime:"2099-07-09 10:49:49",status:"delivering",totalAmount:389,freight:10,isReviewed:!1,merchant:{id:101,name:"花艺生活馆",isOfficial:!0},products:[{id:3001,name:"香槟玫瑰+白玫瑰混搭",image:"https://picsum.photos/200/200?random=3",spec:"混搭",price:389,quantity:1,status:"delivering"}]}]}},computed:{filteredOrders(){let e=[...this.orders];if("all"!==this.activeTab&&(e=e.filter(e=>e.status===this.activeTab)),this.filterForm.goodsName){const t=this.filterForm.goodsName.toLowerCase();e=e.filter(e=>e.products.some(e=>e.name.toLowerCase().includes(t)))}if(this.filterForm.orderNo&&(e=e.filter(e=>e.orderNo.includes(this.filterForm.orderNo))),this.filterForm.merchantName){const t=this.filterForm.merchantName.toLowerCase();e=e.filter(e=>e.merchant.name.toLowerCase().includes(t))}return this.filterForm.tradeStatus&&(e=e.filter(e=>e.status===this.filterForm.tradeStatus)),e}},methods:{search(){this.currentPage=1,this.$message({message:"搜索条件已应用",type:"info"})},reset(){this.filterForm={goodsName:"",orderNo:"",createTime:"",merchantName:"",tradeStatus:""},this.activeTab="all",this.currentPage=1},handleSizeChange(e){this.pageSize=e},handleCurrentChange(e){this.currentPage=e},getStatusText(e){const t={pendingPayment:"待付款",pendingDelivery:"待发货",delivering:"配送中",completed:"已完成",cancelled:"已取消"};return t[e]||e},getStatusTagType(e){const t={pendingPayment:"warning",pendingDelivery:"info",delivering:"primary",completed:"success",cancelled:"danger"};return t[e]||"default"},payOrder(e){this.$message({message:`订单 ${e} 去付款`,type:"info"})},remindDelivery(e){this.$message({message:`已提醒订单 ${e} 发货`,type:"success"})},checkLogistics(e){this.$message({message:`查看订单 ${e} 物流`,type:"info"})},gotoReview(e){this.$message({message:`去评价订单 ${e}`,type:"info"})},viewOrderDetail(e){this.$router.push({name:"OrderDetail"})}}}),o=s,l=a(1656),n=(0,l.A)(o,i,r,!1,null,"43d0d592",null),d=n.exports}}]);
//# sourceMappingURL=592.90e06992.js.map