| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b589295c"],{"01c8":function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var r=e("178b"),o=e("3953"),c=e("e630"),u=e("1df6");function i(t){return Object(r["a"])(t)||Object(o["a"])(t)||Object(c["a"])(t)||Object(u["a"])()}},"25de":function(t,n,e){},"32df":function(t,n,e){"use strict";e("25de")},a7fd:function(t,n,e){"use strict";var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"divBox"},[e("div",{staticClass:"header clearfix"},[e("div",{staticClass:"container"},[e("el-form",{attrs:{inline:"",size:"small"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{label:"优惠劵名称:"}},[e("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入优惠券名称",clearable:"",size:"small"},nativeOn:{keyup:function(n){return!n.type.indexOf("key")&&t._k(n.keyCode,"enter",13,n.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.coupon_name,callback:function(n){t.$set(t.tableFrom,"coupon_name",n)},expression:"tableFrom.coupon_name"}})],1),t._v(" "),e("el-form-item",[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(n){return t.getList(1)}}},[t._v("查询")])],1)],1)],1)]),t._v(" "),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"table",attrs:{data:t.tableData.data,size:"small","max-height":"400","tooltip-effect":"dark"}},[t.newGift?t._e():e("el-table-column",{key:"2",attrs:{width:"55"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-radio",{attrs:{label:n.row.coupon_id},nativeOn:{change:function(e){return t.getTemplateRow(n.row)}},model:{value:t.templateRadio,callback:function(n){t.templateRadio=n},expression:"templateRadio"}},[t._v(" ")])]}}],null,!1,829025607)}),t._v(" "),t.newGift?e("el-table-column",{key:"3",attrs:{width:"55"},scopedSlots:t._u([{key:"header",fn:function(n){return[e("el-checkbox",{attrs:{slot:"reference",value:t.isChecked&&t.checkedPage.indexOf(t.tableFrom.page)>-1},on:{change:t.changeType},slot:"reference"})]}},{key:"default",fn:function(n){return[e("el-checkbox",{attrs:{value:t.checkIds.indexOf(n.row.coupon_id)>-1},on:{change:function(e){return t.changeOne(e,n.row)}}})]}}],null,!1,325749758)}):t._e(),t._v(" "),e("el-table-column",{attrs:{prop:"coupon_id",label:"ID","min-width":"50"}}),t._v(" "),e("el-table-column",{attrs:{prop:"title",label:"优惠券名称","min-width":"120"}}),t._v(" "),e("el-table-column",{attrs:{label:"优惠劵类型","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(n){var r=n.row;return[e("span",[t._v(t._s(t._f("couponTypeFilter")(r.type)))])]}}])}),t._v(" "),e("el-table-column",{attrs:{prop:"coupon_price",label:"优惠券面值","min-width":"90"}}),t._v(" "),e("el-table-column",{attrs:{label:"最低消费额","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("span",[t._v(t._s(0===n.row.use_min_price?"不限制":n.row.use_min_price))])]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"有效期限","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("span",[t._v(t._s(1===n.row.coupon_type?n.row.use_start_time+"-"+n.row.use_end_time:n.row.coupon_time+"天"))])]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"剩余数量","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("span",[t._v(t._s(0===n.row.is_limited?"不限量":n.row.remain_count))])]}}])}),t._v(" "),t.newGift?t._e():e("el-table-column",{key:"1",attrs:{label:"操作","min-width":"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small",disabled:t.multipleSelection.coupon_id!=n.row.coupon_id},on:{click:function(e){return t.send(n.row.coupon_id)}}},[t._v("发送")])]}}],null,!1,261276959)})],1),t._v(" "),e("div",{staticClass:"block mb20"},[e("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1),t._v(" "),t.newGift?e("div",[e("el-button",{staticClass:"fr",attrs:{size:"small",type:"primary"},on:{click:t.ok}},[t._v("确定")]),t._v(" "),e("el-button",{staticClass:"fr mr20",attrs:{size:"small"},on:{click:t.close}},[t._v("取消")])],1):t._e()],1)},o=[],c=e("01c8"),u=(e("ac6a"),e("b7be")),i=e("83d6"),a={name:"CouponList",props:{couponForm:{type:Object,default:function(){}},checkedIds:{type:Array,default:[]},allCheck:{type:Boolean,default:!1},userFrom:{type:Object,default:function(){}},newGift:{type:Boolean,default:!1},checkedData:{type:Array,default:function(){return[]}}},data:function(){return{roterPre:i["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:5,not_send_type:5,send_type:6,coupon_name:"",status:1},multipleSelection:{coupon_id:""},templateRadio:0,checkedPage:[],checkBox:[],isChecked:!1,checkIds:[]}},mounted:function(){this.tableFrom.page=1,this.getList(1)},methods:{getTemplateRow:function(t){this.multipleSelection={coupon_id:t.coupon_id}},send:function(t){var n=this;delete this.userFrom["page"],delete this.userFrom["limit"];var e=this;e.$confirm("确定要发送优惠券吗?发送优惠券后将无法恢复,请谨慎操作!","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var r={coupon_id:t,search:e.userFrom,mark:e.filter(n.couponForm),is_all:e.allCheck?1:0,uid:e.checkedIds};Object(u["W"])(r).then((function(t){e.$message.success(t.message),e.$emit("sendSuccess")})).catch((function(t){e.$message.error(t.message)}))})).catch((function(t){e.$message({type:"info",message:"已取消"})}))},filter:function(t){for(var n in t)""===t[n]&&delete t[n];return t},changeType:function(t){this.isChecked=t;var n=this.checkedPage.indexOf(this.tableFrom.page);this.isIndex=n,this.checkedPage.push(this.tableFrom.page),n>-1&&this.checkedPage.splice(n,1),this.syncCheckedId(t)},changeOne:function(t,n){if(t){var e=this.checkIds.indexOf(n.coupon_id);-1===e&&(this.checkIds.push(n.coupon_id),this.checkBox.push(n))}else{var r=this.checkIds.indexOf(n.coupon_id);r>-1&&(this.checkIds.splice(r,1),this.checkBox.splice(r,1))}},syncCheckedId:function(t){var n=this;this.tableData.data.map((function(t){return t.coupon_id}));t?this.tableData.data.forEach((function(t){var e=n.checkIds.indexOf(t.coupon_id);-1===e&&(n.checkIds.push(t.coupon_id),n.checkBox.push(t))})):this.tableData.data.forEach((function(t){var e=n.checkIds.indexOf(t.coupon_id);e>-1&&(n.checkIds.splice(e,1),n.checkBox.splice(e,1))}))},ok:function(){this.tableFrom.coupon_name="",this.$emit("sendSuccess",this.checkBox,this.checkIds)},close:function(){this.$emit("close")},getList:function(t){var n=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(u["Qb"])(this.tableFrom).then((function(t){n.tableData.data=t.data.list,n.tableData.total=t.data.count,n.newGift&&n.setCheckedProduct(n.checkedData),n.listLoading=!1})).catch((function(t){n.listLoading=!1,n.$message.error(t.message)}))},setCheckedProduct:function(t){if(t.length){var n=Object(c["a"])(t),e=n.slice(0);this.checkBox=e,this.checkIds=e.map((function(t){return t.coupon_id}))}else this.checkIds=[]},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")}}},s=a,d=(e("32df"),e("2877")),f=Object(d["a"])(s,r,o,!1,null,"2bedad22",null);n["a"]=f.exports},b7be:function(t,n,e){"use strict";e.d(n,"Qb",(function(){return o})),e.d(n,"Pb",(function(){return c})),e.d(n,"Lb",(function(){return u})),e.d(n,"Kb",(function(){return i})),e.d(n,"Jb",(function(){return a})),e.d(n,"Mb",(function(){return s})),e.d(n,"Nb",(function(){return d})),e.d(n,"Ob",(function(){return f})),e.d(n,"W",(function(){return l})),e.d(n,"R",(function(){return p})),e.d(n,"S",(function(){return g})),e.d(n,"U",(function(){return b})),e.d(n,"T",(function(){return m})),e.d(n,"Db",(function(){return h})),e.d(n,"Q",(function(){return k})),e.d(n,"x",(function(){return _})),e.d(n,"D",(function(){return v})),e.d(n,"v",(function(){return y})),e.d(n,"u",(function(){return w})),e.d(n,"w",(function(){return x})),e.d(n,"Eb",(function(){return C})),e.d(n,"Fb",(function(){return F})),e.d(n,"nc",(function(){return O})),e.d(n,"A",(function(){return I})),e.d(n,"z",(function(){return S})),e.d(n,"E",(function(){return L})),e.d(n,"i",(function(){return j})),e.d(n,"mc",(function(){return B})),e.d(n,"jc",(function(){return D})),e.d(n,"lc",(function(){return z})),e.d(n,"ic",(function(){return P})),e.d(n,"kc",(function(){return $})),e.d(n,"Zb",(function(){return T})),e.d(n,"oc",(function(){return G})),e.d(n,"y",(function(){return R})),e.d(n,"C",(function(){return E})),e.d(n,"B",(function(){return A})),e.d(n,"O",(function(){return J})),e.d(n,"G",(function(){return W})),e.d(n,"J",(function(){return K})),e.d(n,"K",(function(){return N})),e.d(n,"I",(function(){return Q})),e.d(n,"L",(function(){return q})),e.d(n,"P",(function(){return M})),e.d(n,"N",(function(){return U})),e.d(n,"M",(function(){return V})),e.d(n,"F",(function(){return X})),e.d(n,"H",(function(){return Y})),e.d(n,"V",(function(){return Z})),e.d(n,"pb",(function(){return H})),e.d(n,"ob",(function(){return tt})),e.d(n,"hc",(function(){return nt})),e.d(n,"fb",(function(){return et})),e.d(n,"rc",(function(){return rt})),e.d(n,"cb",(function(){return ot})),e.d(n,"ab",(function(){return ct})),e.d(n,"bb",(function(){return ut})),e.d(n,"gc",(function(){return it})),e.d(n,"X",(function(){return at})),e.d(n,"o",(function(){return st})),e.d(n,"n",(function(){return dt})),e.d(n,"m",(function(){return ft})),e.d(n,"l",(function(){return lt})),e.d(n,"k",(function(){return pt})),e.d(n,"Y",(function(){return gt})),e.d(n,"t",(function(){return bt})),e.d(n,"r",(function(){return mt})),e.d(n,"q",(function(){return ht})),e.d(n,"s",(function(){return kt})),e.d(n,"p",(function(){return _t})),e.d(n,"kb",(function(){return vt})),e.d(n,"ib",(function(){return yt})),e.d(n,"mb",(function(){return wt})),e.d(n,"jb",(function(){return xt})),e.d(n,"lb",(function(){return Ct})),e.d(n,"Z",(function(){return Ft})),e.d(n,"Bb",(function(){return Ot})),e.d(n,"Ab",(function(){return It})),e.d(n,"yb",(function(){return St})),e.d(n,"Cb",(function(){return Lt})),e.d(n,"eb",(function(){return jt})),e.d(n,"xb",(function(){return Bt})),e.d(n,"zb",(function(){return Dt})),e.d(n,"wb",(function(){return zt})),e.d(n,"sb",(function(){return Pt})),e.d(n,"ub",(function(){return $t})),e.d(n,"tb",(function(){return Tt})),e.d(n,"nb",(function(){return Gt})),e.d(n,"db",(function(){return Rt})),e.d(n,"qb",(function(){return Et})),e.d(n,"vb",(function(){return At})),e.d(n,"rb",(function(){return Jt})),e.d(n,"a",(function(){return Wt})),e.d(n,"pc",(function(){return Kt})),e.d(n,"d",(function(){return Nt})),e.d(n,"f",(function(){return Qt})),e.d(n,"c",(function(){return qt})),e.d(n,"j",(function(){return Mt})),e.d(n,"b",(function(){return Ut})),e.d(n,"h",(function(){return Vt})),e.d(n,"e",(function(){return Xt})),e.d(n,"g",(function(){return Yt})),e.d(n,"Sb",(function(){return Zt})),e.d(n,"ac",(function(){return Ht})),e.d(n,"Vb",(function(){return tn})),e.d(n,"Tb",(function(){return nn})),e.d(n,"Ub",(function(){return en})),e.d(n,"Wb",(function(){return rn})),e.d(n,"Yb",(function(){return on})),e.d(n,"gb",(function(){return cn})),e.d(n,"hb",(function(){return un})),e.d(n,"dc",(function(){return an})),e.d(n,"fc",(function(){return sn})),e.d(n,"Xb",(function(){return dn})),e.d(n,"cc",(function(){return fn})),e.d(n,"bc",(function(){return ln})),e.d(n,"ec",(function(){return pn}));var r=e("0c6d");function o(t){return r["a"].get("/store/coupon/platformLst",t)}function c(t){return r["a"].get("/store/coupon/update/".concat(t,"/form"))}function u(t){return r["a"].get("/store/coupon/show/".concat(t))}function i(t){return r["a"].delete("store/coupon/delete/".concat(t))}function a(t){return r["a"].get("/store/coupon/sys/clone/".concat(t,"/form"))}function s(t){return r["a"].get("store/coupon/sys/issue",t)}function d(t,n){return r["a"].get("store/coupon/show_lst/".concat(t),n)}function f(t){return r["a"].get("/store/coupon/send/lst",t)}function l(t){return r["a"].post("store/coupon/send",t)}function p(t){return r["a"].get("store/coupon/detail/".concat(t))}function g(t){return r["a"].get("store/coupon/lst",t)}function b(t,n){return r["a"].post("store/coupon/status/".concat(t),{status:n})}function m(){return r["a"].get("store/coupon/create/form")}function h(t){return r["a"].get("store/coupon/issue",t)}function k(t){return r["a"].delete("store/coupon/delete/".concat(t))}function _(t){return r["a"].get("broadcast/room/lst",t)}function v(t,n){return r["a"].post("broadcast/room/status/".concat(t),n)}function y(t){return r["a"].delete("broadcast/room/delete/".concat(t))}function w(t){return r["a"].get("broadcast/room/apply/form/".concat(t))}function x(t){return r["a"].get("broadcast/room/detail/".concat(t))}function C(t,n){return r["a"].post("broadcast/room/feedsPublic/".concat(t),{status:n})}function F(t,n){return r["a"].post("broadcast/room/comment/".concat(t),{status:n})}function O(t,n){return r["a"].post("broadcast/room/closeKf/".concat(t),{status:n})}function I(t){return r["a"].get("broadcast/goods/lst",t)}function S(t){return r["a"].get("broadcast/goods/detail/".concat(t))}function L(t,n){return r["a"].post("broadcast/goods/status/".concat(t),n)}function j(t){return r["a"].get("broadcast/goods/apply/form/".concat(t))}function B(){return r["a"].get("seckill/config/create/form")}function D(t){return r["a"].get("seckill/config/lst",t)}function z(t){return r["a"].get("seckill/config/update/".concat(t,"/form"))}function P(t){return r["a"].delete("seckill/config/delete/".concat(t))}function $(t,n){return r["a"].post("seckill/config/status/".concat(t),{status:n})}function T(t,n){return r["a"].get("seckill/product/detail/".concat(t),n)}function G(t,n){return r["a"].get("broadcast/room/goods/".concat(t),n)}function R(t){return r["a"].delete("broadcast/goods/delete/".concat(t))}function E(t,n){return r["a"].post("broadcast/room/sort/".concat(t),n)}function A(t,n){return r["a"].post("broadcast/goods/sort/".concat(t),n)}function J(t){return r["a"].post("config/others/group_buying",t)}function W(){return r["a"].get("config/others/group_buying")}function K(t){return r["a"].get("store/product/group/lst",t)}function N(t){return r["a"].get("store/product/group/get/".concat(t))}function Q(t){return r["a"].get("store/product/group/detail/".concat(t))}function q(t){return r["a"].post("store/product/group/status",t)}function M(t,n){return r["a"].post("store/product/group/is_show/".concat(t),{status:n})}function U(t){return r["a"].get("store/product/group/get/".concat(t))}function V(t,n){return r["a"].post("store/product/group/update/".concat(t),n)}function X(t){return r["a"].get("store/product/group/buying/lst",t)}function Y(t,n){return r["a"].get("store/product/group/buying/detail/".concat(t),n)}function Z(t,n){return r["a"].get("store/coupon/product/".concat(t),n)}function H(){return r["a"].get("user/integral/title")}function tt(t){return r["a"].get("user/integral/lst",t)}function nt(t){return r["a"].get("user/integral/excel",t)}function et(){return r["a"].get("user/integral/config")}function rt(t){return r["a"].post("user/integral/config",t)}function ot(t){return r["a"].get("discounts/lst",t)}function ct(t,n){return r["a"].post("discounts/status/".concat(t),{status:n})}function ut(t){return r["a"].get("discounts/detail/".concat(t))}function it(t){return r["a"].get("marketing/spu/lst",t)}function at(t){return r["a"].post("activity/atmosphere/create",t)}function st(t,n){return r["a"].post("activity/atmosphere/update/".concat(t),n)}function dt(t){return r["a"].get("activity/atmosphere/lst",t)}function ft(t){return r["a"].get("activity/atmosphere/detail/".concat(t))}function lt(t,n){return r["a"].post("activity/atmosphere/status/".concat(t),{status:n})}function pt(t){return r["a"].delete("activity/atmosphere/delete/".concat(t))}function gt(t){return r["a"].post("activity/border/create",t)}function bt(t,n){return r["a"].post("activity/border/update/".concat(t),n)}function mt(t){return r["a"].get("activity/border/lst",t)}function ht(t){return r["a"].get("activity/border/detail/".concat(t))}function kt(t,n){return r["a"].post("activity/border/status/".concat(t),{status:n})}function _t(t){return r["a"].delete("activity/border/delete/".concat(t))}function vt(){return r["a"].get("points/cate/lst")}function yt(){return r["a"].get("points/cate/create/form")}function wt(t){return r["a"].get("points/cate/update/form/".concat(t))}function xt(t){return r["a"].delete("points/cate/delete/".concat(t))}function Ct(t,n){return r["a"].post("points/cate/status/".concat(t),{status:n})}function Ft(t){return r["a"].post("points/product/create",t)}function Ot(t,n){return r["a"].post("points/product/update/".concat(t),n)}function It(t){return r["a"].get("points/product/lst",t)}function St(t){return r["a"].delete("points/product/delete/".concat(t))}function Lt(t,n){return r["a"].post("points/product/status/".concat(t),{status:n})}function jt(t,n){return r["a"].post("points/product/get_attr_value/".concat(t),n)}function Bt(){return r["a"].get("points/cate/select")}function Dt(t){return r["a"].get("points/product/detail/".concat(t))}function zt(t){return r["a"].get("points/order/lst",t)}function Pt(t){return r["a"].get("points/order/detail/".concat(t))}function $t(t){return r["a"].get("points/order/express/".concat(t))}function Tt(t){return r["a"].get("points/order/excel",t)}function Gt(t,n){return r["a"].post("points/order/delivery/".concat(t),n)}function Rt(t){return r["a"].get("store/express/options",t)}function Et(t){return r["a"].get("points/order/mark/".concat(t,"/form"))}function At(t,n){return r["a"].get("points/order/status/".concat(t),n)}function Jt(t){return r["a"].delete("points/order/delete/".concat(t))}function Wt(t){return r["a"].post("activity/form/create",t)}function Kt(){return r["a"].get("system/form/select")}function Nt(t){return r["a"].get("activity/form/lst",t)}function Qt(t,n){return r["a"].post("activity/form/status/".concat(t),{status:n})}function qt(t){return r["a"].get("activity/form/detail/".concat(t))}function Mt(t,n){return r["a"].get("system/form/info/".concat(t),n)}function Ut(t){return r["a"].delete("activity/form/delete/".concat(t))}function Vt(t,n){return r["a"].get("activity/form/user/lst/".concat(t),n)}function Xt(t,n){return r["a"].get("activity/form/excel/".concat(t),n)}function Yt(t,n){return r["a"].post("activity/form/update/".concat(t),n)}function Zt(t){return r["a"].post("seckill/active/create",t)}function Ht(t){return r["a"].get("seckill/config/select",t)}function tn(t){return r["a"].get("seckill/active/lst",t)}function nn(t){return r["a"].delete("seckill/active/delete/".concat(t))}function en(t){return r["a"].get("seckill/active/detail/".concat(t))}function rn(t,n){return r["a"].post("seckill/active/update/".concat(t),n)}function on(t,n){return r["a"].post("seckill/active/update_status/".concat(t),{status:n})}function cn(t){return r["a"].get("store/product/self_lst",t)}function un(t){return r["a"].get("seckill/product/list",t)}function an(t){return r["a"].get("seckill/product/switchStatus/".concat(t,"/form"))}function sn(t,n){return r["a"].post("seckill/product/update/".concat(t),n)}function dn(t){return r["a"].get("seckill/active/chart_panel/".concat(t))}function fn(t,n){return r["a"].get("seckill/active/chart_people/".concat(t),n)}function ln(t,n){return r["a"].get("seckill/active/chart_order/".concat(t),n)}function pn(t,n){return r["a"].get("seckill/active/chart_product/".concat(t),n)}}}]);
|