UNPKG

beehole-store-server

Version:

www.bee-hole.com

1 lines 10.3 kB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a8ab056c","chunk-21b69688"],{"1b6c":function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return o}));var n=r("5530"),a=r("bf0f");function i(e,t){return function(){return Object(a["b"])(e,Object(n["a"])({},t))}}function o(e,t){return Object(a["b"])(e,Object(n["a"])({},t))}},"2a5b":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r("b775"),a={reviewList:"/review/list"};function i(e){return Object(n["b"])({url:a.reviewList,method:"post",data:e})}},"3a10":function(e,t,r){"use strict";r.d(t,"e",(function(){return i})),r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return s})),r.d(t,"h",(function(){return u})),r.d(t,"g",(function(){return c})),r.d(t,"f",(function(){return l})),r.d(t,"c",(function(){return d})),r.d(t,"d",(function(){return h})),r.d(t,"i",(function(){return f}));var n=r("b775"),a={orderList:"/order/list",orderFaHuo:"/order/ship",orderAfter:"/after_sales/list",orderRefund:"/after_sales/refund",orderPushLog:"/order/push/log",orderPush:"/order/push",orderInsure:"/order/insure",orderItems:"/order/items",wuliuList:"/order/waybill/list"};function i(e){return Object(n["b"])({url:a.orderList,method:"post",data:e})}function o(e){return Object(n["b"])({url:a.orderFaHuo,method:"post",data:e})}function s(e){return Object(n["b"])({url:a.orderAfter,method:"post",data:e})}function u(e){return Object(n["b"])({url:a.orderRefund,method:"post",data:e})}function c(e){return Object(n["b"])({url:a.orderPushLog,method:"post",data:e})}function l(e){return Object(n["b"])({url:a.orderPush,method:"post",data:e})}function d(e){return Object(n["b"])({url:a.orderInsure,method:"post",data:e})}function h(e){return Object(n["b"])({url:a.orderItems,method:"post",data:e})}function f(e){return Object(n["b"])({url:a.wuliuList,method:"post",data:e})}},"4a6c":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e._self._c;return t("div",[e._v(" "+e._s(e.title)+" ")])},a=[],i=(r("a9e3"),r("3a10")),o={name:"OrderItems",props:{orderId:{type:String,required:!0},goodId:{type:Number,required:!0},skuId:{type:Number,required:!0}},components:{},data:function(){return{title:""}},filters:{},created:function(){this.getList()},computed:{},watch:{},methods:{getList:function(){var e=this;Object(i["d"])({order_id:this.orderId,good_id:this.goodId,sku_id:this.skuId}).then((function(t){t.list&&(e.title=t.list.title)}))}}},s=o,u=r("2877"),c=Object(u["a"])(s,n,a,!1,null,null,null);t["default"]=c.exports},ee8a:function(e,t,r){"use strict";r.r(t);var n=r("5530"),a=(r("d81d"),r("5d9e")),i=r("1b6c"),o=r("2a5b"),s=r("4a6c"),u=r("5880"),c=r("41b2"),l=r.n(c),d=r("8e8e"),h=r.n(d),f=r("0464"),b=r("4d91"),p=r("daa3"),m=r("4df5"),v=r("4d26"),w=r.n(v),g=r("18a7"),x=r("b488");function O(e,t){var r=t?e.pageYOffset:e.pageXOffset,n=t?"scrollTop":"scrollLeft";if("number"!==typeof r){var a=e.document;r=a.documentElement[n],"number"!==typeof r&&(r=a.body[n])}return r}function j(e){var t=void 0,r=void 0,n=e.ownerDocument,a=n.body,i=n&&n.documentElement,o=e.getBoundingClientRect();return t=o.left,r=o.top,t-=i.clientLeft||a.clientLeft||0,r-=i.clientTop||a.clientTop||0,{left:t,top:r}}function R(e){var t=j(e),r=e.ownerDocument,n=r.defaultView||r.parentWindow;return t.left+=O(n),t.left}function y(){}var C={name:"Star",mixins:[x["a"]],props:{value:b["a"].number,index:b["a"].number,prefixCls:b["a"].string,allowHalf:b["a"].bool,disabled:b["a"].bool,character:b["a"].any,characterRender:b["a"].func,focused:b["a"].bool,count:b["a"].number},methods:{onHover:function(e){var t=this.index;this.$emit("hover",e,t)},onClick:function(e){var t=this.index;this.$emit("click",e,t)},onKeyDown:function(e){var t=this.$props.index;13===e.keyCode&&this.__emit("click",e,t)},getClassName:function(){var e=this.prefixCls,t=this.index,r=this.value,n=this.allowHalf,a=this.focused,i=t+1,o=e;return 0===r&&0===t&&a?o+=" "+e+"-focused":n&&r+.5===i?(o+=" "+e+"-half "+e+"-active",a&&(o+=" "+e+"-focused")):(o+=i<=r?" "+e+"-full":" "+e+"-zero",i===r&&a&&(o+=" "+e+"-focused")),o}},render:function(){var e=arguments[0],t=this.onHover,r=this.onClick,n=this.onKeyDown,a=this.disabled,i=this.prefixCls,o=this.characterRender,s=this.index,u=this.count,c=this.value,l=Object(p["g"])(this,"character"),d=e("li",{class:this.getClassName()},[e("div",{on:{click:a?y:r,keydown:a?y:n,mousemove:a?y:t},attrs:{role:"radio","aria-checked":c>s?"true":"false","aria-posinset":s+1,"aria-setsize":u,tabIndex:0}},[e("div",{class:i+"-first"},[l]),e("div",{class:i+"-second"},[l])])]);return o&&(d=o(d,this.$props)),d}},_={disabled:b["a"].bool,value:b["a"].number,defaultValue:b["a"].number,count:b["a"].number,allowHalf:b["a"].bool,allowClear:b["a"].bool,prefixCls:b["a"].string,character:b["a"].any,characterRender:b["a"].func,tabIndex:b["a"].number,autoFocus:b["a"].bool};function k(){}var I={name:"Rate",mixins:[x["a"]],model:{prop:"value",event:"change"},props:Object(p["t"])(_,{defaultValue:0,count:5,allowHalf:!1,allowClear:!0,prefixCls:"rc-rate",tabIndex:0,character:"★"}),data:function(){var e=this.value;return Object(p["s"])(this,"value")||(e=this.defaultValue),{sValue:e,focused:!1,cleanedValue:null,hoverValue:void 0}},watch:{value:function(e){this.setState({sValue:e})}},mounted:function(){var e=this;this.$nextTick((function(){e.autoFocus&&!e.disabled&&e.focus()}))},methods:{onHover:function(e,t){var r=this.getStarValue(t,e.pageX),n=this.cleanedValue;r!==n&&this.setState({hoverValue:r,cleanedValue:null}),this.$emit("hoverChange",r)},onMouseLeave:function(){this.setState({hoverValue:void 0,cleanedValue:null}),this.$emit("hoverChange",void 0)},onClick:function(e,t){var r=this.allowClear,n=this.sValue,a=this.getStarValue(t,e.pageX),i=!1;r&&(i=a===n),this.onMouseLeave(!0),this.changeValue(i?0:a),this.setState({cleanedValue:i?a:null})},onFocus:function(){this.setState({focused:!0}),this.$emit("focus")},onBlur:function(){this.setState({focused:!1}),this.$emit("blur")},onKeyDown:function(e){var t=e.keyCode,r=this.count,n=this.allowHalf,a=this.sValue;t===g["a"].RIGHT&&a<r?(a+=n?.5:1,this.changeValue(a),e.preventDefault()):t===g["a"].LEFT&&a>0&&(a-=n?.5:1,this.changeValue(a),e.preventDefault()),this.$emit("keydown",e)},getStarDOM:function(e){return this.$refs["stars"+e].$el},getStarValue:function(e,t){var r=e+1;if(this.allowHalf){var n=this.getStarDOM(e),a=R(n),i=n.clientWidth;t-a<i/2&&(r-=.5)}return r},focus:function(){this.disabled||this.$refs.rateRef.focus()},blur:function(){this.disabled||this.$refs.rateRef.blur()},changeValue:function(e){Object(p["s"])(this,"value")||this.setState({sValue:e}),this.$emit("change",e)}},render:function(){for(var e=arguments[0],t=Object(p["l"])(this),r=t.count,n=t.allowHalf,a=t.prefixCls,i=t.disabled,o=t.tabIndex,s=this.sValue,u=this.hoverValue,c=this.focused,l=[],d=i?a+"-disabled":"",h=Object(p["g"])(this,"character"),f=this.characterRender||this.$scopedSlots.characterRender,b=0;b<r;b++){var m={props:{index:b,count:r,disabled:i,prefixCls:a+"-star",allowHalf:n,value:void 0===u?s:u,character:h,characterRender:f,focused:c},on:{click:this.onClick,hover:this.onHover},key:b,ref:"stars"+b};l.push(e(C,m))}return e("ul",{class:w()(a,d),on:{mouseleave:i?k:this.onMouseLeave,focus:i?k:this.onFocus,blur:i?k:this.onBlur,keydown:i?k:this.onKeyDown},attrs:{tabIndex:i?-1:o,role:"radiogroup"},ref:"rateRef"},[l])}},V=I,S=V,L=r("0c63"),$=r("f933"),H=r("db14"),P={prefixCls:b["a"].string,count:b["a"].number,value:b["a"].value,defaultValue:b["a"].value,allowHalf:b["a"].bool,allowClear:b["a"].bool,tooltips:b["a"].arrayOf(b["a"].string),disabled:b["a"].bool,character:b["a"].any,autoFocus:b["a"].bool},D={name:"ARate",model:{prop:"value",event:"change"},props:P,inject:{configProvider:{default:function(){return m["a"]}}},methods:{characterRender:function(e,t){var r=t.index,n=this.$createElement,a=this.$props.tooltips;return a?n($["a"],{attrs:{title:a[r]}},[e]):e},focus:function(){this.$refs.refRate.focus()},blur:function(){this.$refs.refRate.blur()}},render:function(){var e=arguments[0],t=Object(p["l"])(this),r=t.prefixCls,n=h()(t,["prefixCls"]),a=this.configProvider.getPrefixCls,i=a("rate",r),o=Object(p["g"])(this,"character")||e(L["a"],{attrs:{type:"star",theme:"filled"}}),s={props:l()({character:o,characterRender:this.characterRender,prefixCls:i},Object(f["a"])(n,["tooltips"])),on:Object(p["k"])(this),ref:"refRate"};return e(S,s)},install:function(e){e.use(H["a"]),e.component(D.name,D)}},q=D;t["default"]={name:"ReviewList",props:{},components:{AdvanceTable:a["a"],aRate:q,orderItems:s["default"]},computed:Object(n["a"])({},Object(u["mapGetters"])(["shopId"])),data:function(){return{queryParam:{order_id:"",page:1,limit:10},columns:[],list:[],total_count:0,labelCol:{span:6},wrapperCol:{span:18},loading:!1,multiple:!0,selectedRowKeys:[],expandedRowKeys:[],showReviewModal:!1}},created:function(){this.initColunmns()},methods:{handleQuery:function(){this.getList()},resetQuery:function(){},initColunmns:function(){this.columns=[{title:Object(i["a"])("view.order.list.review.list.nick"),dataIndex:"nick",width:"100px",scopedSlots:{customRender:"nick"}},{title:Object(i["a"])("view.order.list.order_id"),dataIndex:"order_id",width:"150px",scopedSlots:{customRender:"order_id"}},{title:Object(i["a"])("view.order.list.order_item"),dataIndex:"goods_id",width:"200px",scopedSlots:{customRender:"goods_id"}},{title:Object(i["a"])("view.order.list.review.list.grade"),dataIndex:"grade",width:"200px",scopedSlots:{customRender:"grade"}},{title:Object(i["a"])("view.order.list.review.list.content"),dataIndex:"review_content",width:"300px",scopedSlots:{customRender:"review_content"}},{title:Object(i["a"])("view.order.list.create_time"),dataIndex:"create_time",ellipsis:!0,scopedSlots:{customRender:"create_time"}}],this.getList()},getList:function(){var e=this;e.shopId&&(this.queryParam.shop_id=e.shopId),Object(o["a"])(this.queryParam).then((function(t){e.list=t.list,e.total_count=t.total_count}))},changeSize:function(e,t){this.queryParam.page=e,this.queryParam.limit=t,this.getList()},onShowSizeChange:function(e,t){this.queryParam.limit=t,this.getList()},onSelectChange:function(e,t){this.selectedRowKeys=e,this.selectedRows=t,this.ids=this.selectedRows.map((function(e){return e.review_id})),this.single=1!==e.length,this.multiple=!e.length}}}}}]);