UNPKG

beehole-store-server

Version:

www.bee-hole.com

1 lines 13.2 kB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4c7bedc9","chunk-a8ab056c","chunk-21b69688"],{"1b6c":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}));var a=r("5530"),o=r("bf0f");function n(e,t){return function(){return Object(o["b"])(e,Object(a["a"])({},t))}}function i(e,t){return Object(o["b"])(e,Object(a["a"])({},t))}},"2a5b":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var a=r("b775"),o={reviewList:"/review/list"};function n(e){return Object(a["b"])({url:o.reviewList,method:"post",data:e})}},"3a10":function(e,t,r){"use strict";r.d(t,"g",(function(){return n})),r.d(t,"d",(function(){return i})),r.d(t,"b",(function(){return s})),r.d(t,"j",(function(){return l})),r.d(t,"i",(function(){return u})),r.d(t,"h",(function(){return c})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return h})),r.d(t,"k",(function(){return f})),r.d(t,"c",(function(){return p})),r.d(t,"a",(function(){return b}));var a=r("b775"),o={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",orderExport:"/order/export",memberList:"/member/get_member_list"};function n(e){return Object(a["b"])({url:o.orderList,method:"post",data:e})}function i(e){return Object(a["b"])({url:o.orderFaHuo,method:"post",data:e})}function s(e){return Object(a["b"])({url:o.orderAfter,method:"post",data:e})}function l(e){return Object(a["b"])({url:o.orderRefund,method:"post",data:e})}function u(e){return Object(a["b"])({url:o.orderPushLog,method:"post",data:e})}function c(e){return Object(a["b"])({url:o.orderPush,method:"post",data:e})}function d(e){return Object(a["b"])({url:o.orderInsure,method:"post",data:e})}function h(e){return Object(a["b"])({url:o.orderItems,method:"post",data:e})}function f(e){return Object(a["b"])({url:o.wuliuList,method:"post",data:e})}function p(e){return Object(a["b"])({url:o.orderExport,method:"post",data:e})}function b(e){return Object(a["b"])({url:o.memberList,method:"post",data:e})}},"4a6c":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("div",[e._v(" "+e._s(e.title)+" ")])},o=[],n=(r("a9e3"),r("3a10")),i={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(n["f"])({order_id:this.orderId,good_id:this.goodId,sku_id:this.skuId}).then((function(t){t.list&&(e.title=t.list.title)}))}}},s=i,l=r("2877"),u=Object(l["a"])(s,a,o,!1,null,null,null);t["default"]=u.exports},"6d1c":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e._self._c;return t("div",[t("a-card",{staticStyle:{"margin-bottom":"10px"},attrs:{bordered:!1}},[t("div",{ref:"search",staticClass:"table-page-search-wrapper"},[t("a-form",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-row",{attrs:{gutter:0}},[t("a-col",{attrs:{md:6,sm:24,lg:8}},[t("a-form-item",{attrs:{labelCol:{md:8,sm:6,lg:8},wrapperCol:{md:16,sm:16,lg:16},label:e.$t("view.order.list.orderno")}},[t("a-input",{attrs:{placeholder:e.$t("view.order.list.inputorderno"),"allow-clear":""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery.apply(null,arguments)}},model:{value:e.queryParam.order_id,callback:function(t){e.$set(e.queryParam,"order_id",t)},expression:"queryParam.order_id"}})],1)],1),t("a-col",[t("span",{staticClass:"table-page-search-submitButtons",staticStyle:{float:"right"}},[t("a-button",{attrs:{type:"primary"},on:{click:e.handleQuery}},[t("a-icon",{attrs:{type:"search"}}),e._v(e._s(e.$t("view.order.list.query.btn"))+" ")],1),t("a-button",{staticStyle:{"margin-left":"8px"},on:{click:e.resetQuery}},[t("a-icon",{attrs:{type:"redo"}}),e._v(e._s(e.$t("view.order.list.reset.btn"))+" ")],1)],1)])],1)],1)],1)]),t("a-card",{staticClass:"table-card",attrs:{bordered:!1}},[t("advance-table",{attrs:{loading:e.loading,size:"middle","row-selection":{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange},"format-conditions":!1,columns:e.columns,"data-source":e.list,rowKey:"review_id",tableKey:"test-cat-catlist-table",expandedRowKeys:e.expandedRowKeys,pagination:{current:e.queryParam.page,pageSize:e.queryParam.limit,total:e.total_count,showSizeChanger:!0,showLessItems:!1,showQuickJumper:!1,showTotal:function(t,r){return e.$t("view.order.list.table.total",{num:r[0]+"-"+r[1],total:t})},onChange:e.changeSize,onShowSizeChange:e.onShowSizeChange},title:e.$t("view.order.list.list")},scopedSlots:e._u([{key:"goods_id",fn:function(e){var r=e.record;return t("span",{},[t("order-items",{attrs:{goodId:r.goods_id,skuId:r.sku_id,orderId:r.order_id}})],1)}},{key:"grade",fn:function(e){var r=e.text;return t("span",{},[t("a-rate",{attrs:{"default-value":r,"allow-half":"",disabled:""}})],1)}},{key:"operation",fn:function(r){var a=r.text;return t("span",{},[e._v(" "+e._s(a)+" ")])}}])},[t("div",{staticClass:"table-operations",attrs:{slot:"button"},slot:"button"})])],1)],1)},o=[],n=r("5530"),i=r("ee8a"),s=Object(n["a"])({},i["default"]),l=s,u=r("2877"),c=Object(u["a"])(l,a,o,!1,null,null,null);t["default"]=c.exports},ee8a:function(e,t,r){"use strict";r.r(t);var a=r("5530"),o=(r("d81d"),r("5d9e")),n=r("1b6c"),i=r("2a5b"),s=r("4a6c"),l=r("5880"),u=r("41b2"),c=r.n(u),d=r("8e8e"),h=r.n(d),f=r("0464"),p=r("4d91"),b=r("daa3"),m=r("4df5"),v=r("4d26"),w=r.n(v),g=r("18a7"),y=r("b488");function x(e,t){var r=t?e.pageYOffset:e.pageXOffset,a=t?"scrollTop":"scrollLeft";if("number"!==typeof r){var o=e.document;r=o.documentElement[a],"number"!==typeof r&&(r=o.body[a])}return r}function C(e){var t=void 0,r=void 0,a=e.ownerDocument,o=a.body,n=a&&a.documentElement,i=e.getBoundingClientRect();return t=i.left,r=i.top,t-=n.clientLeft||o.clientLeft||0,r-=n.clientTop||o.clientTop||0,{left:t,top:r}}function _(e){var t=C(e),r=e.ownerDocument,a=r.defaultView||r.parentWindow;return t.left+=x(a),t.left}function O(){}var k={name:"Star",mixins:[y["a"]],props:{value:p["a"].number,index:p["a"].number,prefixCls:p["a"].string,allowHalf:p["a"].bool,disabled:p["a"].bool,character:p["a"].any,characterRender:p["a"].func,focused:p["a"].bool,count:p["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,a=this.allowHalf,o=this.focused,n=t+1,i=e;return 0===r&&0===t&&o?i+=" "+e+"-focused":a&&r+.5===n?(i+=" "+e+"-half "+e+"-active",o&&(i+=" "+e+"-focused")):(i+=n<=r?" "+e+"-full":" "+e+"-zero",n===r&&o&&(i+=" "+e+"-focused")),i}},render:function(){var e=arguments[0],t=this.onHover,r=this.onClick,a=this.onKeyDown,o=this.disabled,n=this.prefixCls,i=this.characterRender,s=this.index,l=this.count,u=this.value,c=Object(b["g"])(this,"character"),d=e("li",{class:this.getClassName()},[e("div",{on:{click:o?O:r,keydown:o?O:a,mousemove:o?O:t},attrs:{role:"radio","aria-checked":u>s?"true":"false","aria-posinset":s+1,"aria-setsize":l,tabIndex:0}},[e("div",{class:n+"-first"},[c]),e("div",{class:n+"-second"},[c])])]);return i&&(d=i(d,this.$props)),d}},j={disabled:p["a"].bool,value:p["a"].number,defaultValue:p["a"].number,count:p["a"].number,allowHalf:p["a"].bool,allowClear:p["a"].bool,prefixCls:p["a"].string,character:p["a"].any,characterRender:p["a"].func,tabIndex:p["a"].number,autoFocus:p["a"].bool};function R(){}var S={name:"Rate",mixins:[y["a"]],model:{prop:"value",event:"change"},props:Object(b["t"])(j,{defaultValue:0,count:5,allowHalf:!1,allowClear:!0,prefixCls:"rc-rate",tabIndex:0,character:"★"}),data:function(){var e=this.value;return Object(b["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),a=this.cleanedValue;r!==a&&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,a=this.sValue,o=this.getStarValue(t,e.pageX),n=!1;r&&(n=o===a),this.onMouseLeave(!0),this.changeValue(n?0:o),this.setState({cleanedValue:n?o: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,a=this.allowHalf,o=this.sValue;t===g["a"].RIGHT&&o<r?(o+=a?.5:1,this.changeValue(o),e.preventDefault()):t===g["a"].LEFT&&o>0&&(o-=a?.5:1,this.changeValue(o),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 a=this.getStarDOM(e),o=_(a),n=a.clientWidth;t-o<n/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(b["s"])(this,"value")||this.setState({sValue:e}),this.$emit("change",e)}},render:function(){for(var e=arguments[0],t=Object(b["l"])(this),r=t.count,a=t.allowHalf,o=t.prefixCls,n=t.disabled,i=t.tabIndex,s=this.sValue,l=this.hoverValue,u=this.focused,c=[],d=n?o+"-disabled":"",h=Object(b["g"])(this,"character"),f=this.characterRender||this.$scopedSlots.characterRender,p=0;p<r;p++){var m={props:{index:p,count:r,disabled:n,prefixCls:o+"-star",allowHalf:a,value:void 0===l?s:l,character:h,characterRender:f,focused:u},on:{click:this.onClick,hover:this.onHover},key:p,ref:"stars"+p};c.push(e(k,m))}return e("ul",{class:w()(o,d),on:{mouseleave:n?R:this.onMouseLeave,focus:n?R:this.onFocus,blur:n?R:this.onBlur,keydown:n?R:this.onKeyDown},attrs:{tabIndex:n?-1:i,role:"radiogroup"},ref:"rateRef"},[c])}},I=S,V=I,$=r("0c63"),L=r("f933"),P=r("db14"),H={prefixCls:p["a"].string,count:p["a"].number,value:p["a"].value,defaultValue:p["a"].value,allowHalf:p["a"].bool,allowClear:p["a"].bool,tooltips:p["a"].arrayOf(p["a"].string),disabled:p["a"].bool,character:p["a"].any,autoFocus:p["a"].bool},q={name:"ARate",model:{prop:"value",event:"change"},props:H,inject:{configProvider:{default:function(){return m["a"]}}},methods:{characterRender:function(e,t){var r=t.index,a=this.$createElement,o=this.$props.tooltips;return o?a(L["a"],{attrs:{title:o[r]}},[e]):e},focus:function(){this.$refs.refRate.focus()},blur:function(){this.$refs.refRate.blur()}},render:function(){var e=arguments[0],t=Object(b["l"])(this),r=t.prefixCls,a=h()(t,["prefixCls"]),o=this.configProvider.getPrefixCls,n=o("rate",r),i=Object(b["g"])(this,"character")||e($["a"],{attrs:{type:"star",theme:"filled"}}),s={props:c()({character:i,characterRender:this.characterRender,prefixCls:n},Object(f["a"])(a,["tooltips"])),on:Object(b["k"])(this),ref:"refRate"};return e(V,s)},install:function(e){e.use(P["a"]),e.component(q.name,q)}},K=q;t["default"]={name:"ReviewList",props:{},components:{AdvanceTable:o["a"],aRate:K,orderItems:s["default"]},computed:Object(a["a"])({},Object(l["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(n["a"])("view.order.list.review.list.nick"),dataIndex:"nick",width:"100px",scopedSlots:{customRender:"nick"}},{title:Object(n["a"])("view.order.list.order_id"),dataIndex:"order_id",width:"150px",scopedSlots:{customRender:"order_id"}},{title:Object(n["a"])("view.order.list.order_item"),dataIndex:"goods_id",width:"200px",scopedSlots:{customRender:"goods_id"}},{title:Object(n["a"])("view.order.list.review.list.grade"),dataIndex:"grade",width:"200px",scopedSlots:{customRender:"grade"}},{title:Object(n["a"])("view.order.list.review.list.content"),dataIndex:"review_content",width:"300px",scopedSlots:{customRender:"review_content"}},{title:Object(n["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(i["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}}}}}]);