chunk-f0af4c64.400ef9ec.js 15 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-f0af4c64"],{"1fc7":function(t,e,a){a.r(e);var n=a("c14f"),r=a("1da1"),i=a("5530"),o=(a("99af"),a("a15b"),a("14d9"),a("a434"),a("e9c4"),a("b64b"),a("d3b7"),a("2f62")),s=a("b7be"),l=a("61f7"),c=a("3f2a");i={name:"marketing_storeSeckill",filters:{formatDate:function(t){if(0!==t)return t=new Date(1e3*t),Object(l.a)(t,"yyyy-MM-dd")}},data:function(){return{loading:!1,columns1:[{title:"ID",key:"id",width:80},{title:"商品图片",slot:"image",minWidth:90},{title:"活动标题",key:"title",minWidth:130},{title:"活动简介",key:"info",minWidth:100},{title:"原价",key:"ot_price",minWidth:100},{title:"秒杀价",key:"price",minWidth:100},{title:"限量",key:"quota_show",minWidth:130},{title:"限量剩余",key:"quota",minWidth:130},{title:"秒杀状态",key:"start_name",minWidth:100},{title:"结束时间",slot:"stop_time",minWidth:100},{title:"状态",slot:"status",minWidth:100},{title:"操作",slot:"action",fixed:"right",minWidth:130}],tableList:[],timeList:[],grid:{xl:7,lg:10,md:12,sm:24,xs:24},tableFrom:{status:"",store_name:"",page:1,limit:15,time_ids:[],time:"",activity_name:""},timeVal:[],total:0}},computed:Object(i.a)(Object(i.a)({},Object(o.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),activated:function(){this.getList(),this.seckillTimeList()},methods:{seckillTimeList:function(){var t=this;Object(s.tb)().then((function(e){t.timeList=e.data.list.data})).catch((function(e){t.$message.error(e.msg)}))},onchangeTime:function(t){this.timeVal=t,this.tableFrom.time=this.timeVal?this.timeVal.join("-"):"",this.tableFrom.page=1,t[0]||(this.tableFrom.time=""),this.getList()},add:function(){this.$router.push({path:this.$routeProStr+"/marketing/store_seckill/create"})},exports:function(){var t=this;return Object(r.a)(Object(n.a)().m((function e(){var a,r,i,o,s,l,c;return Object(n.a)().w((function(e){for(;;)switch(e.n){case 0:a=[],r=[],i=[],o="",(s=JSON.parse(JSON.stringify(t.tableFrom))).page=1,s.limit=200,l=0;case 1:if(l<s.page+1)return e.n=2,t.getExcelData(s);e.n=5;break;case 2:c=e.v,o=o||c.filename,r.length||(r=c.fileKey),a.length||(a=c.header),c.export.length?(i=i.concat(c.export),s.page++,e.n=4):e.n=3;break;case 3:return t.$exportExcel(a,r,o,i),e.a(2);case 4:l++,e.n=1;break;case 5:return e.a(2)}}),e)})))()},getExcelData:function(t){return new Promise((function(e,a){Object(c.g)(t).then((function(t){e(t.data)}))}))},edit:function(t){this.$router.push({path:this.$routeProStr+"/marketing/store_seckill/create/"+t.id+"/0"})},copy:function(t){this.$router.push({path:this.$routeProStr+"/marketing/store_seckill/create/"+t.id+"/1"})},del:function(t,e,a){var n=this;e={title:e,num:a,url:"marketing/seckill/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){n.$message.success(t.msg),n.tableList.splice(a,1)})).catch((function(t){n.$message.error(t.msg)}))},viewInfo:function(t){this.$router.push({path:this.$routeProStr+"/marketing/store_seckill/statistics/"+t.id})},getList:function(){var t=this;this.loading=!0,this.tableFrom.status=this.tableFrom.status||"",this.tableFrom.product_id=this.$route.params.product_id||"",Object(s.rb)(this.tableFrom).then((()=>{var e=Object(r.a)(Object(n.a)().m((function e(a){var r;return Object(n.a)().w((function(e){for(;;)switch(e.n){case 0:r=a.data,t.tableList=r.list,t.total=a.data.count,t.loading=!1;case 1:return e.a(2)}}),e)})));return function(t){return e.apply(this,arguments)}})()).catch((function(e){t.loading=!1,t.$message.error(e.msg)}))},userSearchs:function(){this.tableFrom.page=1,this.getList()},onchangeIsShow:function(t){var e=this,a={id:t.id,status:t.status};Object(s.sb)(a).then((()=>{var t=Object(r.a)(Object(n.a)().m((function t(a){return Object(n.a)().w((function(t){for(;;)switch(t.n){case 0:e.getList(),e.$message.success(a.msg);case 1:return t.a(2)}}),t)})));return function(e){return t.apply(this,arguments)}})()).catch((function(a){e.$message.error(a.msg),t.status=!t.status}))}}},a("a9e5"),o=a("2877"),a=Object(o.a)(i,(function(){var t=this,e=t._self._c;return e("div",[e("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[e("div",{staticClass:"padding-add"},[e("el-form",{ref:"tableFrom",attrs:{model:t.tableFrom,"label-width":t.labelWidth,"label-position":"right",inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{label:"商品搜索:","label-for":"store_name"}},[e("el-input",{staticClass:"form_content_width",attrs:{placeholder:"请输入商品名称,ID"},model:{value:t.tableFrom.store_name,callback:function(e){t.$set(t.tableFrom,"store_name",e)},expression:"tableFrom.store_name"}})],1),e("el-form-item",{attrs:{label:"活动搜索:","label-for":"store_name"}},[e("el-input",{staticClass:"form_content_width",attrs:{placeholder:"请输入活动名称"},model:{value:t.tableFrom.activity_name,callback:function(e){t.$set(t.tableFrom,"activity_name",e)},expression:"tableFrom.activity_name"}})],1),e("el-form-item",{attrs:{label:"活动状态:"}},[e("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:""},on:{change:t.userSearchs},model:{value:t.tableFrom.status,callback:function(e){t.$set(t.tableFrom,"status",e)},expression:"tableFrom.status"}},[e("el-option",{attrs:{value:"1",label:"开启"}}),e("el-option",{attrs:{value:"0",label:"关闭"}})],1)],1),e("el-form-item",{attrs:{label:"活动时间:"}},[e("el-date-picker",{staticStyle:{width:"250px"},attrs:{clearable:"",type:"daterange",editable:!1,format:"yyyy/MM/dd","value-format":"yyyy/MM/dd","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1),e("el-form-item",[e("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),e("el-card",{staticClass:"ivu-mt mt16",attrs:{bordered:!1,shadow:"never"}},[e("el-button",{directives:[{name:"auth",rawName:"v-auth",value:["export-storeSeckill"],expression:"['export-storeSeckill']"},{name:"db-click",rawName:"v-db-click"}],staticClass:"export",on:{click:t.exports}},[t._v("导出")]),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"mt14",attrs:{data:t.tableList,"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[e("el-table-column",{attrs:{label:"ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.id))])]}}])}),e("el-table-column",{attrs:{label:"商品图片","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.row.image,expression:"scope.row.image"}]})])]}}])}),e("el-table-column",{attrs:{label:"商品标题","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tooltip",{attrs:{placement:"top","open-delay":600}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(a.row.title))]),e("span",{staticClass:"line2"},[t._v(t._s(a.row.title))])])]}}])}),e("el-table-column",{attrs:{label:"商品简介","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tooltip",{attrs:{placement:"top","open-delay":600}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(a.row.info))]),e("span",{staticClass:"line2"},[t._v(t._s(a.row.info))])])]}}])}),e("el-table-column",{attrs:{label:"活动名称","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tooltip",{attrs:{placement:"top","open-delay":600}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(a.row.activity_name))]),e("span",{staticClass:"line2"},[t._v(t._s(a.row.activity_name))])])]}}])}),e("el-table-column",{attrs:{label:"售价","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.product_price))])]}}])}),e("el-table-column",{attrs:{label:"秒杀价","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.price))])]}}])}),e("el-table-column",{attrs:{label:"限量","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.quota_show))])]}}])}),e("el-table-column",{attrs:{label:"限量剩余","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.quota))])]}}])}),e("el-table-column",{attrs:{label:"秒杀状态","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.start_name))])]}}])}),e("el-table-column",{attrs:{label:"活动时间","min-width":"190"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("p",[t._v("开始:"+t._s(a.row.start_time))]),e("p",[t._v("结束:"+t._s(a.row.stop_time))])]}}])}),e("el-table-column",{attrs:{label:"状态","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,value:a.row.status,size:"large","active-text":"开启","inactive-text":"关闭"},on:{change:function(e){return t.onchangeIsShow(a.row)}},model:{value:a.row.status,callback:function(e){t.$set(a.row,"status",e)},expression:"scope.row.status"}})]}}])}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"100"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("a",{directives:[{name:"db-click",rawName:"v-db-click"}],on:{click:function(e){return t.del(a.row,"删除秒杀商品",a.$index)}}},[t._v("删除")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{directives:[{name:"db-click",rawName:"v-db-click"}],on:{click:function(e){return t.viewInfo(a.row)}}},[t._v("统计")])]}}])})],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("pagination",{attrs:{total:t.total,page:t.tableFrom.page,limit:t.tableFrom.limit},on:{"update:page":function(e){return t.$set(t.tableFrom,"page",e)},"update:limit":function(e){return t.$set(t.tableFrom,"limit",e)},pagination:t.getList}}):t._e()],1)],1)],1)}),[],!1,null,"16d252b6",null);e.default=a.exports},"2c3e":function(t,e,a){var n=a("83ab"),r=a("9f7f").MISSED_STICKY,i=a("c6b6"),o=a("edd0"),s=a("69f3").get,l=RegExp.prototype,c=TypeError;n&&r&&o(l,"sticky",{configurable:!0,get:function(){if(this!==l){if("RegExp"===i(this))return!!s(this).sticky;throw new c("Incompatible receiver, RegExp required")}}})},"3f2a":function(t,e,a){a.d(e,"h",(function(){return r})),a.d(e,"d",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"f",(function(){return s})),a.d(e,"e",(function(){return l})),a.d(e,"j",(function(){return c})),a.d(e,"a",(function(){return u})),a.d(e,"b",(function(){return d})),a.d(e,"g",(function(){return m})),a.d(e,"i",(function(){return f}));var n=a("6b6c");function r(t){return Object(n.a)({url:"/export/user_list",method:"get",params:t})}function i(t){return Object(n.a)({url:"/export/order_list",method:"get",params:t})}function o(t){return Object(n.a)({url:"/export/order_delivery_list",method:"get",params:t})}function s(t){return Object(n.a)({url:"/export/product_list",method:"get",params:t})}function l(t){return Object(n.a)({url:"/product/product_export",method:"get",params:t})}function c(t){return Object(n.a)({url:"/product/product_import",method:"post",data:t})}function u(t){return Object(n.a)({url:"/export/bargain_list",method:"get",params:t})}function d(t){return Object(n.a)({url:"/export/combination_list",method:"get",params:t})}function m(t){return Object(n.a)({url:"/export/seckill_list",method:"get",params:t})}function f(t){return Object(n.a)({url:"/export/member_card/".concat(t),method:"get"})}},"4d63":function(t,e,a){var n=a("83ab"),r=a("cfe9"),i=a("e330"),o=a("94ca"),s=a("7156"),l=a("9112"),c=a("7c73"),u=a("241c").f,d=a("3a9b"),m=a("44e7"),f=a("577e"),p=a("90d8"),h=a("9f7f"),b=a("aeb0"),g=a("cb2d"),v=a("d039"),_=a("1a2d"),w=a("69f3").enforce,y=a("2626"),k=a("b622"),x=a("fce3"),S=a("107c"),O=k("match"),j=r.RegExp,$=j.prototype,F=r.SyntaxError,E=i($.exec),C=i("".charAt),R=i("".replace),L=i("".indexOf),I=i("".slice),M=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,D=/a/g,W=/a/g,N=(a=new j(D)!==D,h.MISSED_STICKY),T=h.UNSUPPORTED_Y;k=n&&(!a||N||x||S||v((function(){return W[O]=!1,j(D)!==D||j(W)===W||"/a/i"!==String(j(D,"i"))})));if(o("RegExp",k)){for(var P=function(t,e){var a,n,r=d($,this),i=m(t),o=void 0===e,u=[],h=t;if(!r&&i&&o&&t.constructor===P)return t;if((i||d($,t))&&(t=t.source,o)&&(e=p(h)),t=void 0===t?"":f(t),e=void 0===e?"":f(e),h=t,i=e=x&&"dotAll"in D&&(a=!!e&&-1<L(e,"s"))?R(e,/s/g,""):e,N&&"sticky"in D&&(n=!!e&&-1<L(e,"y"))&&T&&(e=R(e,/y/g,"")),S&&(t=(o=(t=>{for(var e,a=t.length,n=0,r="",i=[],o=c(null),s=!1,l=!1,u=0,d="";n<=a;n++){if("\\"===(e=C(t,n)))e+=C(t,++n);else if("]"===e)s=!1;else if(!s)switch(!0){case"["===e:s=!0;break;case"("===e:if(r+=e,"?:"===I(t,n+1,n+3))continue;E(M,I(t,n+1))&&(n+=2,l=!0),u++;continue;case">"===e&&l:if(""===d||_(o,d))throw new F("Invalid capture group name");o[d]=!0,l=!(i[i.length]=[d,u]),d="";continue}l?d+=e:r+=e}return[r,i]})(t))[0],u=o[1]),o=s(j(t,e),r?this:$,P),(a||n||u.length)&&(e=w(o),a&&(e.dotAll=!0,e.raw=P((t=>{for(var e,a=t.length,n=0,r="",i=!1;n<=a;n++)"\\"===(e=C(t,n))?r+=e+C(t,++n):i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),r+=e):r+="[\\s\\S]";return r})(t),i)),n&&(e.sticky=!0),u.length)&&(e.groups=u),t!==h)try{l(o,"source",""===h?"(?:)":h)}catch(t){}return o},q=u(j),V=0;q.length>V;)b(P,j,q[V++]);($.constructor=P).prototype=$,g(r,"RegExp",P,{constructor:!0})}y("RegExp")},"61f7":function(t,e,a){a.d(e,"a",(function(){return i})),a.d(e,"c",(function(){return l})),a.d(e,"b",(function(){return c}));var n=a("ade3"),r=a("5530");function i(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var a,n,r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(a in r)new RegExp("(".concat(a,")")).test(e)&&(n=r[a]+"",e=e.replace(RegExp.$1,1===RegExp.$1.length?n:("00"+n).substr(n.length)));return e}a("99af"),a("13d5"),a("e9f5"),a("9485"),a("b64b"),a("d3b7"),a("4d63"),a("c607"),a("ac1f"),a("2c3e"),a("00b4"),a("25f0"),a("5319"),a("498a");var o={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"};function s(t,e){t.message=function(t){return e.replace("%s",t||"")}}function l(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)({required:!0,message:t,type:"string"},e)}function c(t){return u.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}s(l,"请输入%s"),s(c,"%s格式不正确");var u=Object.keys(o).reduce((function(t,e){return t[e]=function(t){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:Object(n.a)({},e,t);return Object(r.a)(Object(r.a)({message:a.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o),i)},s(t[e],o[e]),t}),{})},a9e5:function(t,e,a){a("cd46")},c607:function(t,e,a){var n=a("83ab"),r=a("fce3"),i=a("c6b6"),o=a("edd0"),s=a("69f3").get,l=RegExp.prototype,c=TypeError;n&&r&&o(l,"dotAll",{configurable:!0,get:function(){if(this!==l){if("RegExp"===i(this))return!!s(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},cd46:function(t,e,a){}}]);