chunk-60256b3a.368ebca5.js 9.8 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-60256b3a"],{"103c":function(s,t,e){"use strict";e("e3d7")},"2d73":function(s,t,e){"use strict";e.r(t);var i=function(){var s=this,t=s._self._c;return t("el-dialog",{attrs:{title:"订单商品详情",visible:s.visible,width:"1180px",top:"6vh","custom-class":"goods-detail-dialog","append-to-body":""},on:{"update:visible":function(t){s.visible=t},close:s.close}},[t("div",{directives:[{name:"loading",rawName:"v-loading",value:s.loading,expression:"loading"}],staticClass:"gd-body"},[s.order.id?t("div",{staticClass:"gd-header"},[t("div",{staticClass:"gd-row row-1"},[t("div",{staticClass:"gd-item"},[t("span",{staticClass:"lab"},[s._v("订单编号:")]),t("span",{staticClass:"val"},[s._v(s._s(s.order.orderSn||"-"))]),t("i",{staticClass:"el-icon-document-copy copy-icon",attrs:{title:"复制"},on:{click:function(t){return s.copyText(s.order.orderSn)}}})]),t("div",{staticClass:"gd-item"},[t("span",{staticClass:"lab"},[s._v("订单状态:")]),t("span",{staticClass:"val status-text"},[s._v(s._s(s.statusText))])]),t("div",{staticClass:"gd-item"},[t("span",{staticClass:"lab"},[s._v("下单人:")]),t("span",{staticClass:"val"},[s._v(s._s(s.order.bookName||s.order.shopAdminName||"-"))])]),t("div",{staticClass:"gd-item"},[t("span",{staticClass:"lab"},[s._v("下单人手机号:")]),t("span",{staticClass:"val"},[s._v(s._s(s.order.bookMobile||"-"))])]),t("div",{staticClass:"gd-item"},[t("span",{staticClass:"lab"},[s._v("下单时间:")]),t("span",{staticClass:"val"},[s._v(s._s(s.order.addTime||"-"))])])]),t("div",{staticClass:"gd-row row-2"},[t("div",{staticClass:"gd-item"},[t("span",{staticClass:"lab"},[s._v("收货人:")]),t("span",{staticClass:"val"},[s._v(s._s(s.order.receiveUserName||"-"))])]),t("div",{staticClass:"gd-item"},[t("span",{staticClass:"lab"},[s._v("收货人手机号:")]),t("span",{staticClass:"val"},[s._v(s._s(s.order.receiveMobile||"-"))])]),t("div",{staticClass:"gd-item address"},[t("span",{staticClass:"lab"},[s._v("收货地址:")]),t("span",{staticClass:"val"},[s._v(s._s(s.order.fullAddress||s.order.receiveAddress||"-"))])]),t("div",{staticClass:"gd-item"},[t("span",{staticClass:"lab"},[s._v("配送方式:")]),t("span",{staticClass:"val"},[s._v(s._s(s.sendTypeText))])])])]):s._e(),t("div",{staticClass:"gd-main"},[t("div",{staticClass:"gd-col left"},[t("div",{staticClass:"col-title"},[s._v("商品清单("+s._s(s.goodsList.length)+")")]),t("div",{staticClass:"goods-list"},[s._l(s.goodsList,(function(e,i){return t("div",{key:i,staticClass:"goods-card",class:{active:s.activeIndex===i},on:{click:function(t){return s.selectGoods(i)}}},[t("span",{staticClass:"idx-badge"},[s._v(s._s(i+1))]),t("cl-avatar",{staticClass:"thumb",attrs:{shape:"square",size:52,src:s.goodsCover(e,"small")}}),t("div",{staticClass:"info"},[t("div",{staticClass:"name"},[s._v(s._s(s.goodsName(e)))]),t("div",{staticClass:"desc"},[s._v(s._s(s.goodsSpec(e)))])]),t("div",{staticClass:"price-side"},[t("div",{staticClass:"unit-line"},[s._v("¥"+s._s(s.formatMoney(e.unitPrice))+" x "+s._s(e.num))]),t("div",{staticClass:"sub"},[s._v("¥"+s._s(s.lineSubtotal(e)))])])],1)})),s.goodsList.length?s._e():t("div",{staticClass:"empty"},[s._v("暂无商品")])],2)]),t("div",{staticClass:"gd-col middle"},[t("div",{staticClass:"col-title"},[s._v("商品详情")]),s.currentGoods?[t("div",{staticClass:"detail-top"},[t("cl-avatar",{staticClass:"main-img",attrs:{shape:"square",size:160,src:s.previewCover}}),t("div",{staticClass:"detail-meta"},[t("div",{staticClass:"detail-name"},[s._v(s._s(s.goodsName(s.currentGoods)))]),t("div",{staticClass:"meta-grid"},[t("div",{staticClass:"meta-item"},[t("label",[s._v("商品编号:")]),t("span",[s._v(s._s(s.currentGoods.goodsSn||s.currentGoods.goodsId||"-"))])]),t("div",{staticClass:"meta-item"},[t("label",[s._v("商品分类:")]),t("span",[s._v(s._s(s.currentGoods.categoryName||s.currentGoods.className||"-"))])]),t("div",{staticClass:"meta-item"},[t("label",[s._v("规格:")]),t("span",[s._v(s._s(s.goodsSpec(s.currentGoods)||"-"))])]),t("div",{staticClass:"meta-item"},[t("label",[s._v("单位:")]),t("span",[s._v(s._s(s.currentGoods.unitName||s.currentGoods.unit||"-"))])])]),t("div",{staticClass:"price-row"},[t("span",[s._v("单价:¥"+s._s(s.formatMoney(s.currentGoods.unitPrice)))]),t("span",[s._v("数量:"+s._s(s.currentGoods.num)+" "+s._s(s.currentGoods.unitName||""))]),t("span",[s._v("小计:¥"+s._s(s.lineSubtotal(s.currentGoods)))])])])],1),s.gallery.length?t("div",{staticClass:"thumbs"},s._l(s.gallery,(function(e,i){return t("div",{key:i,staticClass:"thumb-sm-wrap",class:{active:s.isActiveThumb(e,i)},on:{click:function(t){s.previewCover=e}}},[t("cl-avatar",{attrs:{shape:"square",size:56,src:e}})],1)})),0):s._e(),t("div",{staticClass:"detail-remark"},[t("label",[s._v("备注:")]),t("span",[s._v(s._s(s.currentGoods.remark||s.order.remark||"无"))])])]:t("div",{staticClass:"empty"},[s._v("请选择商品")])],2),t("div",{staticClass:"gd-col right"},[t("div",{staticClass:"col-title"},[s._v("订单金额明细")]),t("div",{staticClass:"amount-panel"},[t("div",{staticClass:"amount-row"},[t("span",[s._v("商品总额")]),t("span",[s._v("¥"+s._s(s.formatMoney(s.goodsTotal)))])]),t("div",{staticClass:"amount-row"},[t("span",[s._v("配送费用")]),t("span",[s._v("¥"+s._s(s.formatMoney(s.order.sendCost)))])]),t("div",{staticClass:"amount-row discount"},[t("span",[s._v("红包减免")]),t("span",[s._v("- ¥"+s._s(s.formatMoney(s.hbDiscount)))])]),t("div",{staticClass:"amount-row discount"},[t("span",[s._v("订单满减")]),t("span",[s._v("- ¥"+s._s(s.formatMoney(s.fullReduce)))])]),t("div",{staticClass:"amount-row discount"},[t("span",[s._v("团购优惠")]),t("span",[s._v("- ¥"+s._s(s.formatMoney(s.groupBuyDiscount)))])]),t("div",{staticClass:"amount-row discount"},[t("span",[s._v("秒杀优惠")]),t("span",[s._v("- ¥"+s._s(s.formatMoney(s.seckillDiscount)))])]),t("div",{staticClass:"amount-row total"},[t("span",[s._v("实付金额")]),t("span",{staticClass:"act"},[s._v("¥"+s._s(s.formatMoney(s.order.actPrice||s.order.realPrice)))])])])])])]),t("span",{staticClass:"gd-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{size:"medium"},on:{click:s.close}},[s._v("关闭")])],1)])},a=[],o=e("ecc5"),r=(e("b15b"),e("e491"),e("0da6"),e("865d"),e("7212"),e("8f26"),e("d9d9"),e("963e"),e("1447"),e("209c"),e("4786"),e("8197"),e("c41f"),e("6d35"),e("0401"),{1:"待支付",2:"待配送",3:"配送中",4:"已完结",5:"已取消",6:"已退款"}),n={0:"送货上门",1:"到店自取",2:"跑腿送货",3:"发物流",4:"发快递"},c={name:"goods-detail-dialog",data:function(){return{visible:!1,loading:!1,order:{},activeIndex:0,previewCover:"",defaultImg:""}},computed:{goodsList:function(){var s=(this.order.goodsInfoList||[]).map((function(s){return Object(o["a"])(Object(o["a"])({},s),{},{_lineType:"goods"})})),t=(this.order.itemInfoList||[]).map((function(s){return Object(o["a"])(Object(o["a"])({},s),{},{_lineType:"item"})}));return s.concat(t)},currentGoods:function(){return this.goodsList[this.activeIndex]||null},gallery:function(){var s=this.currentGoods;if(!s)return[];var t=s.smallImgList||s.imgList||s.pics||s.imgUrls||[];if("string"===typeof t&&t)try{t=JSON.parse(t)}catch(i){t=t.split(",").filter(Boolean)}Array.isArray(t)||(t=[]),t=t.filter(Boolean);var e=this.goodsCover(s,"small");return!t.length&&e?[e]:e&&-1===t.indexOf(e)?[e].concat(t):t},statusText:function(){return r[Number(this.order.status)]||"-"},sendTypeText:function(){return n[Number(this.order.sendType)]||"-"},goodsTotal:function(){return null!=this.order.orderPrice&&""!==this.order.orderPrice?this.order.orderPrice:this.goodsList.reduce((function(s,t){return s+Number(t.unitPrice||0)*Number(t.num||0)}),0)},hbDiscount:function(){return this.order.hbAmount||this.order.hbPrice||this.order.useHbAmount||0},fullReduce:function(){return this.order.fullReduceAmount||this.order.meetAmount||this.order.discountAmount||0},groupBuyDiscount:function(){return this.order.groupBuyDiscount||this.order.groupDiscount||0},seckillDiscount:function(){return this.order.seckillDiscount||this.order.seckillAmount||0}},methods:{open:function(s){var t=this;s&&s.id&&(this.visible=!0,this.loading=!0,this.activeIndex=0,this.previewCover="",this.$service.order.info({id:s.id}).then((function(s){t.order=s||{},t.$nextTick((function(){t.syncPreview()}))})).finally((function(){t.loading=!1})))},close:function(){this.visible=!1,this.order={},this.previewCover=""},selectGoods:function(s){this.activeIndex=s,this.syncPreview()},syncPreview:function(){var s=this.currentGoods;this.previewCover=s?this.goodsCover(s,"big"):""},goodsCover:function(s,t){if(!s)return this.defaultImg;var e=s.smallCover||s.smallCoverUrl||s.smallImgList&&s.smallImgList[0]||"",i=s.bigCover||s.coverUrl||s.cover||s.img||"",a="big"===t?i||e:e||i;return a&&0!==a.indexOf("http")&&0!==a.indexOf("//")&&s.shortCover&&(a="big"===t?i||e:e||i),a||this.defaultImg},isActiveThumb:function(s,t){if(this.previewCover===s)return!0;if(0===t&&this.currentGoods){var e=this.goodsCover(this.currentGoods,"big"),i=this.goodsCover(this.currentGoods,"small");return this.previewCover===e&&s===i}return!1},goodsName:function(s){return s&&(s.name||s.title||s.goodsName||s.itemName)||"-"},goodsSpec:function(s){return s&&(s.goodsStyleName||s.spec||s.styleName||s.attr||s.unitName)||""},formatMoney:function(s){var t=Number(s);return Number.isNaN(t)?"0.00":t.toFixed(2)},lineSubtotal:function(s){return s&&null!=s.price&&""!==s.price?this.formatMoney(s.price):this.formatMoney(Number(s.unitPrice||0)*Number(s.num||0))},copyText:function(s){if(s){var t=document.createElement("input");t.value=s,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),this.$message.success("已复制")}}}},d=c,l=(e("103c"),e("b65c"),e("1805")),u=Object(l["a"])(d,i,a,!1,null,"5faab724",null);t["default"]=u.exports},"512c":function(s,t,e){},b65c:function(s,t,e){"use strict";e("512c")},e3d7:function(s,t,e){}}]);