1 line
33 KiB
JavaScript
1 line
33 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-24746857"],{"2b21":function(e,t,n){},"3bbe":function(e,t,n){var a=n("861d");e.exports=function(e){if(!a(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"3f69":function(e,t,n){e.exports=n.p+"static/img/wincoubg.90c2ce0f.png"},7156:function(e,t,n){var a=n("861d"),r=n("d2bb");e.exports=function(e,t,n){var i,o;return r&&"function"==typeof(i=t.constructor)&&i!==n&&a(o=i.prototype)&&o!==n.prototype&&r(e,o),e}},7894:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"couponsbagadd"},[a("div",{staticClass:"outmain ba_f heighthv pad_20 bor_rad5"},[e._m(0),a("div",{staticClass:"mar_t20 flex-bet flex-y-top"},[a("div",{staticClass:"flex-g-1"},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"活动名称",required:!0,prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入活动名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"活动时间",required:!0}},[a("el-date-picker",{attrs:{type:"datetimerange",align:"right","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["08:00:00","23:59:59"]},model:{value:e.timeData,callback:function(t){e.timeData=t},expression:"timeData"}})],1),a("el-form-item",{attrs:{label:"发券位置",required:!0}},[a("el-radio-group",{model:{value:e.form.location,callback:function(t){e.$set(e.form,"location",t)},expression:"form.location"}},[a("el-radio",{attrs:{label:"1"}},[e._v("外卖点单页")]),a("el-radio",{attrs:{label:"2"}},[e._v("堂食点单页")]),a("el-radio",{attrs:{label:"3"}},[e._v("快餐点单页")])],1)],1),a("el-form-item",{attrs:{label:"适用门店",required:!0}},[a("el-radio-group",{model:{value:e.form.storeType,callback:function(t){e.$set(e.form,"storeType",t)},expression:"form.storeType"}},[a("el-radio",{attrs:{label:"1"}},[e._v("仅本店可用")]),a("el-radio",{attrs:{label:"2"}},[e._v("全店通用")]),a("el-radio",{attrs:{label:"3"}},[e._v("指定门店可用")])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"3"==e.form.storeType,expression:"form.storeType=='3'"}]},[a("el-scrollbar",[a("div",{staticClass:"recordBox"},[a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:e.shopTable,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"name",label:"门店名称"}}),a("el-table-column",{attrs:{prop:"address",label:"门店地址"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"textbutton"},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(n){return e.open2(t.row,t.$index)}}},[e._v("删除")])],1)]}}])})],1)],1)]),a("div",{staticClass:"addgoods textbutton"},[a("i",{staticClass:"el-icon-plus subjectcolor2"}),a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.addshop(e.shopTable)}}},[e._v("添加门店")])],1)],1),a("div",{staticClass:"yb_margin lh16"},[e._v("全店通用、指定门店可用不适用于门店模式三")])],1),a("el-form-item",{attrs:{label:"选择人群",required:!0}},[a("el-radio-group",{model:{value:e.form.people,callback:function(t){e.$set(e.form,"people",t)},expression:"form.people"}},[a("el-radio",{attrs:{label:"1"}},[e._v("全部人群")]),a("el-radio",{attrs:{label:"2"}},[e._v("新客")]),a("el-radio",{attrs:{label:"3"}},[e._v("老用户")])],1)],1),a("el-form-item",{attrs:{label:"选择券",required:!0,prop:"coupon"}},[a("div",{},[a("el-select",{attrs:{multiple:"",filterable:"",placeholder:"请选择优惠券"},model:{value:e.form.coupon,callback:function(t){e.$set(e.form,"coupon",t)},expression:"form.coupon"}},e._l(e.comgrouping,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)]),a("el-form-item",{attrs:{label:"背景图片"}},[e.form.icon?a("div",{staticClass:"uploadSource bor_de rel flex"},[a("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enter(1)},mouseleave:function(t){return e.leave(1)}}},[a("i",{ref:"imgicon1",staticClass:"el-icon-check"}),a("i",{staticClass:"el-icon-close",on:{click:function(t){return e.deleteMultiImage(e.form.icon,1)}}})]),a("img",{staticClass:"wid",attrs:{src:e.form.icon},on:{click:function(t){return e.test(1)}}})]):a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(1)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})]),a("div",{staticClass:"yb_margin"},[e._v("背景图片建议尺寸:632*845"),a("a",{staticClass:"mar_l20",on:{click:function(t){return e.tishiImg()}}},[e._v("查看示例")])])])],1)],1),a("el-dialog",{staticClass:"tishidialog",attrs:{title:"示例图片",visible:e.dialogTableVisible4,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(t){e.dialogTableVisible4=t}}},[a("div",{staticClass:"t_c"},[a("img",{staticClass:"mar_l20",staticStyle:{width:"200px",height:"300px"},attrs:{src:n("3f69")}})])]),a("div",{staticClass:"flex-g-0 pad_lr_20"},[a("div",{staticClass:"fon_16"},[e._v("常见问题")]),a("el-collapse",{staticClass:"mar_tb10",staticStyle:{width:"260px"},attrs:{accordion:""},model:{value:e.collapseName,callback:function(t){e.collapseName=t},expression:"collapseName"}},[a("el-collapse-item",{attrs:{title:"什么是弹窗优惠券?",name:"1"}},[a("div",[e._v("弹窗优惠券主要是针对不同的用户群体,推送相对应的优惠券活动,提高下单率。")])]),a("el-collapse-item",{attrs:{title:"哪些用户可以享受弹窗优惠券活动",name:"2"}},[a("div",[e._v("弹窗优惠券可以选择门店新客、老客户等用户")])])],1),a("div",{staticClass:"fon_16 mar_t20"},[e._v("活动规则")]),e._m(1)],1)],1)]),a("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("立即创建")])],1),a("attachment-img",{ref:"img1",attrs:{type:"img"},on:{attachment:e.imgadd1}}),a("shopEdit",{ref:"ShopEdit",on:{fetchData:e.shopListData}})],1)},r=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"shuju_title mar_b20"},[n("div",{staticClass:"shuju_title_text"},[n("span",[e._v("创建弹窗优惠券活动")])])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"color_9 mar_t10 lh30 fon_13"},[n("div",[e._v("1.活动仅限在线支付订单;")]),n("div",[e._v("2.活动成本由商家承担,与店铺其他活动默认同享")]),n("div",[e._v("3.用户需要点击领取才能领取优惠券")])])}],i=(n("c975"),n("d81d"),n("a434"),n("96cf"),n("1da1")),o=n("7cb7"),s=n("c24f"),l=n("ed08"),c=n("fc6e"),u=n("919c"),d={created:function(){this.$route.query.id&&(this.id=this.$route.query.id,this.edit()),this.getSelectCoupon()},components:{attachmentImg:c["a"],shopEdit:u["a"]},data:function(){return{form:{name:"",icon:"",coupon:[],location:"1",people:"1",storeType:"1"},comgrouping:[],timeData:[new Date,(new Date).setMonth((new Date).getMonth()+3)],collapseName:"",dialogTableVisible4:!1,shopTable:[]}},methods:{shopListData:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:t.shopTable=e||[];case 1:case"end":return n.stop()}}),n)})))()},open2:function(e,t){this.$delete(this.shopTable,t)},addshop:function(e){if(e){var t=e.map((function(e){return e.id}));this.$refs["ShopEdit"].showEdit(t)}else this.$refs["ShopEdit"].showEdit()},getSelectCoupon:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var n,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(s["n"])();case 2:n=t.sent,a=n.data,e.comgrouping=a||[];case 5:case"end":return t.stop()}}),t)})))()},edit:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var n,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(o["T"])({id:e.id});case 2:n=t.sent,a=n.data,e.form2=e.form,e.form=Object.assign(e.form2,a),a.startTime&&(e.timeData=[a.startTime,a.endTime]),a.storeInfo&&(e.shopTable=a.storeInfo?a.storeInfo:[]);case 8:case"end":return t.stop()}}),t)})))()},enter:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="none"},leave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="inline-block"},test:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;console.log(this.$refs,e),this.$refs["img"+e].dialogVisible=!0},imgadd1:function(e){this.form.icon=e.str},deleteMultiImage:function(e,t,n){if(Array.prototype.remove=function(e){var t=this.indexOf(e);t>-1&&this.splice(t,1)},"multigraph"==n)switch(t){case 2:this.form2.environment.remove(e);break}else switch(t){case 1:this.form.icon="";break}},tishiImg:function(){this.dialogTableVisible4=!0},submitForm:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs["form"].validate(function(){var t=Object(i["a"])(regeneratorRuntime.mark((function t(n){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!n){t.next=11;break}return e.timeData&&(e.form.startTime=Object(l["a"])(e.timeData[0]),e.form.endTime=Object(l["a"])(e.timeData[1])),e.shopTable&&(e.form.storeArr=e.shopTable.map((function(e){return e.id}))),t.next=5,Object(o["fc"])(e.form);case 5:a=t.sent,r=a.msg,e.$baseMessage(r,"success"),e.$router.go(-1),t.next=12;break;case 11:return t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()}}},m=d,p=n("2877"),f=Object(p["a"])(m,a,r,!1,null,null,null);t["default"]=f.exports},"919c":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"selectgood"},[n("el-dialog",{attrs:{title:e.title,visible:e.dialogFormVisible,width:"1200px","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t},close:e.close}},[n("div",{},[n("el-form",{staticClass:"demo-form-inline searchform",attrs:{inline:!0,model:e.formInline,"label-width":"120px"}},[n("div",{staticClass:"mar_b20"},[n("el-form-item",{attrs:{label:"按门店名称:"}},[n("el-input",{staticStyle:{width:"200px"},attrs:{size:"medium",placeholder:"请输入门店名称搜索"},on:{input:e.onSearch},model:{value:e.formInline.keyword,callback:function(t){e.$set(e.formInline,"keyword",t)},expression:"formInline.keyword"}})],1),n("el-form-item",{attrs:{label:"按门店类别:"}},[n("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:e.onSearch},model:{value:e.formInline.type,callback:function(t){e.$set(e.formInline,"type",t)},expression:"formInline.type"}},e._l(e.typeOptions,(function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),n("el-form-item",{staticClass:"mar_l20",attrs:{label:"按门店区域:"}},[n("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:e.onSearch},model:{value:e.formInline.areaId,callback:function(t){e.$set(e.formInline,"areaId",t)},expression:"formInline.areaId"}},e._l(e.qyOptions,(function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),n("el-form-item",{staticClass:"mar_t20",attrs:{label:"按门店分组:"}},[n("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:e.onSearch},model:{value:e.formInline.typeId,callback:function(t){e.$set(e.formInline,"typeId",t)},expression:"formInline.typeId"}},e._l(e.fzOptions,(function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),n("el-form-item",{staticClass:"mar_t20",attrs:{label:"按门店标签:"}},[n("el-select",{attrs:{clearable:"",placeholder:"请选择"},on:{change:e.onSearch},model:{value:e.formInline.label,callback:function(t){e.$set(e.formInline,"label",t)},expression:"formInline.label"}},e._l(e.labelOptions,(function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1),n("el-form-item",{staticClass:"mar_t20"},[n("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.onSearch}},[e._v("搜索")])],1)],1)]),n("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list,stripe:""},on:{"selection-change":e.setSelectRows}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),n("el-table-column",{attrs:{prop:"name",label:"商家名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",{staticClass:"flex flex-y-top"},[n("div",{},[n("img",{staticClass:"goodlogo bor_rad5",attrs:{src:t.row.icon}})]),n("div",{staticClass:"mar_l10"},[n("div",{staticClass:"flex"},[n("div",{},[e._v(e._s(t.row.name))]),n("el-tag",{staticClass:"mar_l5",attrs:{size:"mini",type:"info"}},[e._v("(ID:"+e._s(t.row.id)+")")])],1)])])]}}])}),n("el-table-column",{attrs:{prop:"address",label:"门店地址&联系电话",width:"400"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("div",[e._v(e._s(t.row.address))]),n("div",[e._v(e._s(t.row.storeTel))])]}}])})],1),n("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.page.total,"page-size":e.page.pagesize,"current-page":e.page.currentPage},on:{"update:currentPage":function(t){return e.$set(e.page,"currentPage",t)},"update:current-page":function(t){return e.$set(e.page,"currentPage",t)},"current-change":e.handleCurrentChange}})],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"medium"},on:{click:e.close}},[e._v("取 消")]),n("el-button",{attrs:{size:"medium",type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)])],1)},r=[],i=(n("99af"),n("d81d"),n("96cf"),n("1da1")),o=n("e692"),s={name:"labelSave",created:function(){},data:function(){return{formInline:{keyword:"",typeId:"",type:"",areaId:"",label:""},title:"",dialogFormVisible:!1,list:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1},typeOptions:[{id:"0",name:"全部"},{id:"1",name:"直营店"},{id:"2",name:"加盟店"}],qyOptions:[],fzOptions:[],labelOptions:[],storeIds:[],storeId:""}},components:{},methods:{init:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var n,a,r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={page:e.page.currentPage,typeId:e.formInline.typeId,keyword:e.formInline.keyword,type:e.formInline.type,areaId:e.formInline.areaId,label:e.formInline.label,storeIds:e.storeIds},t.next=3,Object(o["q"])(n);case 3:a=t.sent,r=a.data,i=a.count,e.list=r,e.page.total=i;case 8:case"end":return t.stop()}}),t)})))()},onSearch:function(){this.init()},setStoreId:function(e){this.storeId=e},handleCurrentChange:function(e){this.page.currentPage=e,this.init()},setSelectRows:function(e){this.selectRows=e},selectStoreCategory:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var n,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(o["u"])();case 2:n=t.sent,a=n.data,e.qyOptions=a.area?a.area:[],e.fzOptions=a.type?a.type:[],e.labelOptions=a.label?a.label:[];case 7:case"end":return t.stop()}}),t)})))()},search:function(){this.init()},showEdit:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:e?(t.title="编辑门店",console.log(e,t.storeIds),t.storeIds=e,t.init(),t.selectStoreCategory()):(t.title="选择门店",t.init(),t.selectStoreCategory()),t.dialogFormVisible=!0;case 2:case"end":return n.stop()}}),n)})))()},close:function(){this.dialogFormVisible=!1},save:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var n,a,r,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!(e.selectRows.length>0)){t.next=12;break}return n=e.selectRows.map((function(e){return e.id})),e.storeIds&&(a=n.concat(e.storeIds)),t.next=5,Object(o["q"])({ids:a});case 5:r=t.sent,r.msg,i=r.data,e.$emit("fetchData",i),e.close(),t.next=14;break;case 12:return e.$baseMessage("未选中任何门店","error"),t.abrupt("return",!1);case 14:case"end":return t.stop()}}),t)})))()}}},l=s,c=(n("a552"),n("2877")),u=Object(c["a"])(l,a,r,!1,null,null,null);t["a"]=u.exports},a434:function(e,t,n){"use strict";var a=n("23e7"),r=n("23cb"),i=n("a691"),o=n("50c4"),s=n("7b0b"),l=n("65f0"),c=n("8418"),u=n("1dde"),d=n("ae40"),m=u("splice"),p=d("splice",{ACCESSORS:!0,0:0,1:2}),f=Math.max,g=Math.min,h=9007199254740991,b="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!m||!p},{splice:function(e,t){var n,a,u,d,m,p,v=s(this),y=o(v.length),_=r(e,y),x=arguments.length;if(0===x?n=a=0:1===x?(n=0,a=y-_):(n=x-2,a=g(f(i(t),0),y-_)),y+n-a>h)throw TypeError(b);for(u=l(v,a),d=0;d<a;d++)m=_+d,m in v&&c(u,d,v[m]);if(u.length=a,n<a){for(d=_;d<y-a;d++)m=d+a,p=d+n,m in v?v[p]=v[m]:delete v[p];for(d=y;d>y-a+n;d--)delete v[d-1]}else if(n>a)for(d=y-a;d>_;d--)m=d+a-1,p=d+n-1,m in v?v[p]=v[m]:delete v[p];for(d=0;d<n;d++)v[d+_]=arguments[d+2];return v.length=y-a+n,u}})},a552:function(e,t,n){"use strict";var a=n("2b21"),r=n.n(a);r.a},a9e3:function(e,t,n){"use strict";var a=n("83ab"),r=n("da84"),i=n("94ca"),o=n("6eeb"),s=n("5135"),l=n("c6b6"),c=n("7156"),u=n("c04e"),d=n("d039"),m=n("7c73"),p=n("241c").f,f=n("06cf").f,g=n("9bf2").f,h=n("58a8").trim,b="Number",v=r[b],y=v.prototype,_=l(m(y))==b,x=function(e){var t,n,a,r,i,o,s,l,c=u(e,!1);if("string"==typeof c&&c.length>2)if(c=h(c),t=c.charCodeAt(0),43===t||45===t){if(n=c.charCodeAt(2),88===n||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:a=2,r=49;break;case 79:case 111:a=8,r=55;break;default:return+c}for(i=c.slice(2),o=i.length,s=0;s<o;s++)if(l=i.charCodeAt(s),l<48||l>r)return NaN;return parseInt(i,a)}return+c};if(i(b,!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var w,k=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof k&&(_?d((function(){y.valueOf.call(n)})):l(n)!=b)?c(new v(x(t)),n,k):x(t)},I=a?p(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;I.length>C;C++)s(v,w=I[C])&&!s(k,w)&&g(k,w,f(v,w));k.prototype=y,y.constructor=k,o(r,b,k)}},bf19:function(e,t,n){"use strict";var a=n("23e7");a({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},c24f:function(e,t,n){"use strict";n.d(t,"k",(function(){return r})),n.d(t,"E",(function(){return i})),n.d(t,"C",(function(){return o})),n.d(t,"d",(function(){return s})),n.d(t,"b",(function(){return l})),n.d(t,"s",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"q",(function(){return m})),n.d(t,"i",(function(){return p})),n.d(t,"r",(function(){return f})),n.d(t,"f",(function(){return g})),n.d(t,"x",(function(){return h})),n.d(t,"h",(function(){return b})),n.d(t,"n",(function(){return v})),n.d(t,"u",(function(){return y})),n.d(t,"g",(function(){return _})),n.d(t,"l",(function(){return x})),n.d(t,"t",(function(){return w})),n.d(t,"A",(function(){return k})),n.d(t,"z",(function(){return I})),n.d(t,"w",(function(){return C})),n.d(t,"p",(function(){return O})),n.d(t,"m",(function(){return S})),n.d(t,"y",(function(){return j})),n.d(t,"a",(function(){return $})),n.d(t,"o",(function(){return L})),n.d(t,"B",(function(){return T})),n.d(t,"e",(function(){return A})),n.d(t,"F",(function(){return E})),n.d(t,"D",(function(){return D})),n.d(t,"v",(function(){return N}));var a=n("b775");function r(e){return Object(a["a"])({url:"channel/member/get-member-list",method:"get",params:e})}function i(e){return Object(a["a"])({url:"channel/member/get-member-list",method:"post",data:e})}function o(e){return Object(a["a"])({url:"channel/activity/select-user",method:"post",data:e})}function s(e){return Object(a["a"])({url:"channel/member/change-status",method:"post",data:e})}function l(e){return Object(a["a"])({url:"channel/member/change-info",method:"post",data:e})}function c(e){return Object(a["a"])({url:"channel/member/member-label-save",method:"post",data:e})}function u(e){return Object(a["a"])({url:"channel/member/change-member-label",method:"post",data:e})}function d(e){return Object(a["a"])({url:"channel/member/get-member-label",method:"get",params:e})}function m(e){return Object(a["a"])({url:"channel/member/member-excel-list",method:"get",params:e})}function p(e){return Object(a["a"])({url:"channel/member/get-member-info",method:"post",data:e})}function f(e){return Object(a["a"])({url:"channel/member/member-info-save",method:"post",data:e})}function g(e){return Object(a["a"])({url:"channel/member/get-deposit-list",method:"get",params:e})}function h(e){return Object(a["a"])({url:"channel/member/deposit-save",method:"post",data:e})}function b(e){return Object(a["a"])({url:"channel/member/deposit-save",method:"get",params:e})}function v(e){return Object(a["a"])({url:"channel/activity/select-coupon",method:"get",params:e})}function y(e){return Object(a["a"])({url:"channel/member/modify-deposit",method:"post",data:e})}function _(e){return Object(a["a"])({url:"channel/member/get-deposit-order",method:"get",params:e})}function x(e){return Object(a["a"])({url:"channel/member/get-member-set-info",method:"get",params:e})}function w(e){return Object(a["a"])({url:"channel/member/member-set",method:"post",data:e})}function k(e){return Object(a["a"])({url:"channel/vip-card/rights-list",method:"get",params:e})}function I(e){return Object(a["a"])({url:"channel/vip-card/save-rights",method:"post",data:e})}function C(e){return Object(a["a"])({url:"channel/vip-card/modify-rights",method:"post",data:e})}function O(e){return Object(a["a"])({url:"channel/vip-card/level-list",method:"get",params:e})}function S(e){return Object(a["a"])({url:"channel/vip-card/save-level",method:"get",params:e})}function j(e){return Object(a["a"])({url:"channel/vip-card/save-level",method:"post",data:e})}function $(e){return Object(a["a"])({url:"channel/vip-card/card-record",method:"get",params:e})}function L(e){return Object(a["a"])({url:"channel/good/goods-vip",method:"get",params:e})}function T(e){return Object(a["a"])({url:"channel/good/save-goods-vip",method:"post",data:e})}function A(e){return Object(a["a"])({url:"channel/member/get-coupon-list",method:"get",params:e})}function E(e){return Object(a["a"])({url:"channel/member/store-coupon-list",method:"get",params:e})}function D(e){return Object(a["a"])({url:"channel/member/send-coupon",method:"post",data:e})}function N(e){return Object(a["a"])({url:"channel/vip-card/modify-level",method:"post",data:e})}},c8f1:function(e,t,n){},d2bb:function(e,t,n){var a=n("825a"),r=n("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return a(n),r(i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},dad0:function(e,t,n){"use strict";var a=n("c8f1"),r=n.n(a);r.a},ed08:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i}));n("a9e3"),n("ac1f"),n("5319"),n("bf19");function a(e){var t=new Date(e).toJSON(),n=new Date(+new Date(t)+288e5).toISOString().replace(/T/g," ").replace(/\.[\d]{3}Z/,"");return n}function r(e){var t=new Date(e),n=t.getFullYear(),a=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,r=t.getDate()<10?"0"+t.getDate():t.getDate(),i=t.getHours()<10?"0"+t.getHours():t.getHours(),o=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),s=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return n+"-"+a+"-"+r+" "+i+":"+o+":"+s}function i(e){var t=new Date(1e3*Number(e)),n=t.getFullYear()+"-",a=(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-",r=(t.getDate()<10?"0"+t.getDate():t.getDate())+" ",i=(t.getHours()<10?"0"+t.getHours():t.getHours())+":",o=(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":",s=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),l=n+a+r+i+o+s;return l}},fc6e:function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{staticClass:"attachmentImg",attrs:{title:"选择图片",visible:e.dialogVisible,"close-on-click-modal":!1,width:"55%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.modalClose,opened:e.dialogOpened}},[n("div",{staticClass:"attachment_img_box",attrs:{flex:"box:first"}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.groupListLoading,expression:"groupListLoading"}],staticClass:"attachment_img_left"},[n("el-menu",{staticClass:"group-menu",attrs:{mode:"vertical"}},[n("el-scrollbar",{staticStyle:{height:"523px",width:"100%"}},[n("div",{staticClass:"goods-menu"},[n("el-menu-item",{class:{"is-active":"all"==e.allindex},staticStyle:{"text-align":"center"},attrs:{index:"all"},on:{click:function(t){return e.selected(0)}}},[n("span",[e._v("全部")])]),e._l(e.groupItem,(function(t){return[n("el-menu-item",{key:t.id,attrs:{index:t.id},on:{click:function(n){return e.selected(t.id)}}},[n("div",{staticClass:"fenlei",attrs:{flex:"dir:left box:last"}},[n("i",{staticClass:"el-icon-circle-close gbfenlei",staticStyle:{display:"none"},on:{click:function(n){return e.deleteType(t.id)}}}),n("div",{staticStyle:{overflow:"hidden","text-overflow":"ellipsis",width:"100%"}},[n("span",[e._v(e._s(t.name))])])])])]}))],2)]),n("el-popover",{attrs:{placement:"top",width:"160"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[n("el-input",{attrs:{placeholder:"请输入分组名称",size:"mini"},model:{value:e.new_type_name,callback:function(t){e.new_type_name=t},expression:"new_type_name"}}),n("div",{staticStyle:{"text-align":"right",margin:"0","margin-top":"10px"}},[n("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){e.visible=!1}}},[e._v("取消")]),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.addNewAttType}},[e._v("确定")])],1),n("el-button",{staticStyle:{"margin-left":"22%","margin-top":"13px"},attrs:{slot:"reference",size:"small"},slot:"reference"},[n("i",{staticClass:"el-icon-circle-plus-outline"}),e._v(" 新建分组 ")])],1)],1)],1),n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.rightLoading,expression:"rightLoading"}],staticClass:"attachment_img_right",attrs:{flex:"dir:top"}},[n("div",{staticClass:"selectBox"},[n("el-input",{staticStyle:{width:"30%","padding-left":"12px"},attrs:{placeholder:"请输入图片名称","suffix-icon":"el-icon-search",size:"small"},on:{input:function(t){return e.search(e.atta_name)}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search(e.atta_name)}},model:{value:e.atta_name,callback:function(t){e.atta_name=t},expression:"atta_name"}}),n("div",{staticStyle:{float:"right",padding:"0 10px 0 0"}},[n("el-upload",{staticClass:"upload-demo",attrs:{action:e.UploadUrl(),multiple:!0,limit:50,"on-exceed":e.handleExceed,"file-list":e.fileList,"on-success":e.handleSuccess,"on-error":e.handleError,"before-upload":e.beforeUpload,data:e.uploadData,"on-progress":e.handProgress}},[n("el-button",{attrs:{size:"small",type:"primary"}},[n("i",{staticClass:"el-icon-plus avatar-uploader-icon"}),e._v(" 上传图片 ")])],1)],1)],1),n("el-scrollbar",{staticClass:"scrollbar",staticStyle:{height:"460px"}},[n("div",{staticClass:"app-attachment-list"},[e._l(e.attachments,(function(t,a){return[n("el-tooltip",{key:t.id,staticClass:"item",attrs:{effect:"dark",content:t.name,placement:"top","open-delay":1}},[n("div",{staticClass:"app-attachment-item",on:{click:function(n){return e.selectedItem(a,t.url)}}},[n("div",{staticClass:"app-attachment-item-bj"},[n("div",{staticClass:"imgStyle"},[n("el-image",{staticStyle:{width:"100%",height:"143px","border-radius":"5px"},attrs:{src:t.url,fit:"cover"}}),n("div",{staticClass:"mask",style:e.getStyle2(a)},[n("i",{staticClass:"el-icon-check center-icon pos-center"}),n("p",{staticClass:"triangle"},[n("i",{staticClass:"el-icon-check"})])])],1),n("div",{staticClass:"app-attachment-name"},[e._v(e._s(t.name))]),n("i",{staticClass:"el-icon-error delete",on:{click:function(n){return e.deleteItem(t.id)}}})])])])]}))],2)]),n("div",{staticStyle:{padding:"5px","text-align":"right","margin-top":"auto"}},[n("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.pagesize},on:{"current-change":e.current_change}})],1)],1)]),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.selectedItems()}}},[e._v("确 定")])],1)])},r=[],i=(n("99af"),n("365c")),o={name:"attachment-img",props:{type:{type:String,default:"img"},type2:{type:String,default:""},op:{type:String}},data:function(){return{visible:!1,atta_name:"",uploadParams:{type_id:0,type:1},category:0,keywords:"",total:0,pagesize:30,currentPage:1,dialogVisible:!1,groupItem:[],attachments:[],groupListLoading:!1,rightLoading:!1,new_type_name:"",fileList:[],selectedArr:{},attachmentList:"12",uploadData:{key:"",token:""},file:{Url:"",path:"",name:"",size:0},att_type:"",allindex:"all"}},created:function(){},methods:{getStyle2:function(e){var t=this,n=t.currentPage,a=t.selectedArr["img"==t.type?"danxuan":"item"+e+n];return a&&a.page==n&&a.index==e?"display:block":""},modalClose:function(){var e=this;e.selectedArr={}},dialogOpened:function(){this.getgroupItem(),this.getAttachment_List()},handProgress:function(){var e=this;e.rightLoading=!0},getgroupItem:function(){var e=this;this.$api.get("common/file/get-category",{storeId:this.type2},(function(t){1==t.code?(e.groupItem=t.data,e.groupListLoading=!1,e.visible=!1):e.groupListLoading=!1}))},getAttachment_List:function(){var e=this;e.rightLoading=!0,this.$api.get("common/file/get-picture",{page:e.currentPage,category:e.category,keywords:e.keywords,storeId:this.type2},(function(t){1==t.code?(e.attachments=t.data,e.total=t.count,e.rightLoading=!1):e.rightLoading=!1}))},addNewAttType:function(){var e=this;e.groupListLoading=!0,this.$api.post("common/file/save-category",{storeId:this.type2,name:e.new_type_name},(function(t){1==t.code?(e.visible=!1,e.$message({message:t.msg,type:"success",duration:500,onClose:function(){e.new_type_name="",e.getgroupItem()}})):(e.visible=!1,e.$message.error(t.msg))}))},deleteType:function(e){var t=this;t.groupListLoading=!0,this.$api.post("common/file/del-picture-category",{id:e},(function(e){1==e.code?(t.visible=!1,t.$message({message:e.msg,type:"success",duration:500,onClose:function(){t.getgroupItem()}})):(t.$message.error(e.msg),t.groupListLoading=!1)}))},search:function(e){var t=this;console.log(e),this.keywords=e,t.getAttachment_List()},current_change:function(e){var t=this;t.currentPage=e,t.getAttachment_List()},deleteItem:function(e){var t=this;t.rightLoading=!0,this.$api.post("common/file/del-picture",{id:e},(function(e){1==e.code?(t.visible=!1,t.$message({message:e.msg,type:"success",duration:500,onClose:function(){t.getAttachment_List()}})):(t.$message.error(e.msg),t.groupListLoading=!1)}))},UploadUrl:function(){var e=i["a"].backendPath;return e+"common/file/get-category"},beforeUpload:function(e){console.log("上传前判断",e);var t="image/jpg"===e.type||"image/jpeg"===e.type||"image/png"===e.type||"image/gif"===e.type,n=e.size/1024/1024<2;return t?n?void 0:(this.$message.error("文件大小不能超过 2MB!"),!1):(this.$message.error("上传图片只支持jpg、jpeg、png格式!"),!1)},handleError:function(e){this.$message({message:"上传失败",duration:2e3,type:"warning"})},handleSuccess:function(e,t,n){console.log("345",n),this.file=t,this.addAttachment()},handleExceed:function(e,t){this.$message.warning("当前限制选择 50 个文件,本次选择了 ".concat(e.length," 个文件,共选择了 ").concat(e.length+t.length," 个文件"))},addAttachment:function(){var e=this,t=new FormData;t.append("file",this.file.raw),t.append("category",this.category),t.append("storeId",this.type2),this.$api.post("common/file/upload",t,(function(t){1==t.code?(e.getAttachment_List(),e.$message.success("上传成功")):(e.$message.error(t.msg),console.log(t.msg))}))},selected:function(e){var t=this;t.rightLoading=!0,t.currentPage=1,t.category=e,t.allindex="otherList",t.getAttachment_List()},selectedItem:function(e,t){var n=this,a="img"==n.type,r=a?"danxuan":"item"+e+n.currentPage,i=n.selectedArr[r];i&&i.index==e?n.$delete(n.selectedArr,r):(a&&n.$delete(n.selectedArr,r),n.$set(n.selectedArr,r,{page:n.currentPage,index:e,url:t}))},selectedItems:function(){var e=this;e=this;var t=e.selectedArr,n="",a=[];for(var r in t)n+=n?","+t[r].url:t[r].url,a.push(t[r].url);e.$emit("attachment",{str:n,arr:a}),e.dialogVisible=!1}}},s=o,l=(n("dad0"),n("2877")),c=Object(l["a"])(s,a,r,!1,null,null,null);t["a"]=c.exports}}]); |