You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
14 KiB
1 lines
14 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-286ca715"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),Math.easeInOutQuad=function(t,e,n,o){return t/=o/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var o=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function a(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(t,e,n){var i=r(),s=t-i,c=20,u=0;e="undefined"===typeof e?500:e;var l=function t(){u+=c;var r=Math.easeInOutQuad(u,i,s,e);a(r),u<e?o(t):n&&"function"===typeof n&&n()};l()}},"27ae":function(t,e,n){(function(n){var o,a;(function(e,n){t.exports=n(e)})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n?n:this,(function(n){"use strict";n=n||{};var r,i=n.Base64,s="2.6.4",c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=function(t){for(var e={},n=0,o=t.length;n<o;n++)e[t.charAt(n)]=n;return e}(c),l=String.fromCharCode,d=function(t){if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?l(192|e>>>6)+l(128|63&e):l(224|e>>>12&15)+l(128|e>>>6&63)+l(128|63&e)}e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return l(240|e>>>18&7)+l(128|e>>>12&63)+l(128|e>>>6&63)+l(128|63&e)},f=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,p=function(t){return t.replace(f,d)},m=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0),o=[c.charAt(n>>>18),c.charAt(n>>>12&63),e>=2?"=":c.charAt(n>>>6&63),e>=1?"=":c.charAt(63&n)];return o.join("")},b=n.btoa&&"function"==typeof n.btoa?function(t){return n.btoa(t)}:function(t){if(t.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return t.replace(/[\s\S]{1,3}/g,m)},h=function(t){return b(p(String(t)))},g=function(t){return t.replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"})).replace(/=/g,"")},v=function(t,e){return e?g(h(t)):h(t)},y=function(t){return v(t,!0)};n.Uint8Array&&(r=function(t,e){for(var n="",o=0,a=t.length;o<a;o+=3){var r=t[o],i=t[o+1],s=t[o+2],u=r<<16|i<<8|s;n+=c.charAt(u>>>18)+c.charAt(u>>>12&63)+("undefined"!=typeof i?c.charAt(u>>>6&63):"=")+("undefined"!=typeof s?c.charAt(63&u):"=")}return e?g(n):n});var P,A=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,O=function(t){switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),n=e-65536;return l(55296+(n>>>10))+l(56320+(1023&n));case 3:return l((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return l((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},w=function(t){return t.replace(A,O)},T=function(t){var e=t.length,n=e%4,o=(e>0?u[t.charAt(0)]<<18:0)|(e>1?u[t.charAt(1)]<<12:0)|(e>2?u[t.charAt(2)]<<6:0)|(e>3?u[t.charAt(3)]:0),a=[l(o>>>16),l(o>>>8&255),l(255&o)];return a.length-=[0,0,2,1][n],a.join("")},x=n.atob&&"function"==typeof n.atob?function(t){return n.atob(t)}:function(t){return t.replace(/\S{1,4}/g,T)},S=function(t){return x(String(t).replace(/[^A-Za-z0-9\+\/]/g,""))},D=function(t){return w(x(t))},j=function(t){return String(t).replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},C=function(t){return D(j(t))};n.Uint8Array&&(P=function(t){return Uint8Array.from(S(j(t)),(function(t){return t.charCodeAt(0)}))});var k=function(){var t=n.Base64;return n.Base64=i,t};if(n.Base64={VERSION:s,atob:S,btoa:b,fromBase64:C,toBase64:v,utob:p,encode:v,encodeURI:y,btou:w,decode:C,noConflict:k,fromUint8Array:r,toUint8Array:P},"function"===typeof Object.defineProperty){var _=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",_((function(){return C(this)}))),Object.defineProperty(String.prototype,"toBase64",_((function(t){return v(this,t)}))),Object.defineProperty(String.prototype,"toBase64URI",_((function(){return v(this,!0)})))}}return n["Meteor"]&&(Base64=n.Base64),t.exports?t.exports.Base64=n.Base64:(o=[],a=function(){return n.Base64}.apply(e,o),void 0===a||(t.exports=a)),{Base64:n.Base64}}))}).call(this,n("c8ba"))},"4fad":function(t,e,n){var o=n("23e7"),a=n("6f53").entries;o({target:"Object",stat:!0},{entries:function(t){return a(t)}})},"5aa0":function(t,e,n){"use strict";var o=n("cbcd"),a=n.n(o);a.a},"6f53":function(t,e,n){var o=n("83ab"),a=n("df75"),r=n("fc6a"),i=n("d1e7").f,s=function(t){return function(e){var n,s=r(e),c=a(s),u=c.length,l=0,d=[];while(u>l)n=c[l++],o&&!i.call(s,n)||d.push(t?[n,s[n]]:s[n]);return d}};t.exports={entries:s(!0),values:s(!1)}},9256:function(t,e,n){"use strict";n("99af"),n("4160"),n("caad"),n("4fad"),n("d3b7"),n("159b");var o=n("5530"),a=n("bc3a"),r=n.n(a),i=n("5c96"),s=n("5657");n("27ae");function c(t,e){"ECONNABORTED"===t.code?Object(i["Message"])({message:"请求超时"}):t.response&&t.response.data?Object(i["Message"])({message:t.response.data}):t.message&&Object(i["Message"])({message:t.message}),e(t)}function u(t,e){t.data.isError&&(4e4===t.data.code||40001===t.data.code||40002===t.data.code||40003===t.data.code||40005===t.data.code||40006===t.data.code||40008===t.data.code?i["MessageBox"].alert(t.data.msg,"提醒",{confirmButtonText:"确定",callback:function(){window.location.hash="/login"}}):i["Message"].error(t.data.msg)),e(t)}r.a.interceptors.request.use((function(t){var e=!1!==t.headers["X-isToken"]||t.headers["X-isToken"],n=s["a"].get("TOKEN","");n&&e&&(t.headers.token="Bearer "+n);var o="ceres_admin_web",a="ceres_admin_web";return t.headers["Authorization"]="Basic ".concat("".concat(o,":").concat(a)),t}),(function(t){return Promise.reject(t)})),r.a.interceptors.response.use((function(t){return t}),(function(t){return Promise.reject(t)}));var l=function(t){console.log(t,"opts");var e={ts:Date.now()},n=t.method.toUpperCase(),a={method:n,url:"".concat("https://pos.admin.api.lotus-wallet.com").concat(t.url),responseType:t.responseType||"",timeout:2e4},i=["PUT","POST","PATCH"];i.includes(n)?a.data=t.data||{}:a.params=Object(o["a"])(Object(o["a"])({},e),t.data||{}),t.formData&&(a.transformRequest=[function(t){var e=new FormData;return t&&Object.entries(t).forEach((function(t){e.append(t[0],t[1])})),e}]);var s=new Promise((function(t,e){r()(a).then((function(e){u(e,t)})).catch((function(t){c(t,e)}))}));return s};e["a"]=l},"9b2a":function(t,e,n){"use strict";n("99af");var o=n("9256"),a={addPromotion:"/promotion/addPromotion",getList:"/promotion/findAdminPromotionList",getDetails:"/promotion/query",delPromotion:"/promotion/delete",updatePromotion:"/promotion/updatePromotion",finishPromotion:"/promotion/end",applyShop:"/promotionApplyInfo/page",auditLog:"/promotionAuditLog/query",getGoodList:"/product/findAdminProductListByIds",auditPromotion:"/promotionApplyInfo/auditPromotion",closeApplyInfo:"/promotionApplyInfo/closeApplyInfo",getDetail:"/promotionStat/detail",findTenantStatDetail:"/promotionStat/findTenantStatDetail"};e["a"]={addPromotion:function(t){return Object(o["a"])({method:"POST",url:a.addPromotion,data:t})},getList:function(t){return Object(o["a"])({method:"POST",url:a.getList,data:t})},getDetails:function(t){return Object(o["a"])({method:"GET",url:"".concat(a.getDetails,"/").concat(t)})},delPromotion:function(t){return Object(o["a"])({method:"POST",url:a.delPromotion,data:t})},updatePromotion:function(t){return Object(o["a"])({method:"POST",url:a.updatePromotion,data:t})},finishPromotion:function(t){return Object(o["a"])({method:"POST",url:a.finishPromotion,data:t})},applyShop:function(t){return Object(o["a"])({method:"POST",url:a.applyShop,data:t})},auditLog:function(t){return Object(o["a"])({method:"POST",url:a.auditLog,data:t})},getGoodList:function(t){return Object(o["a"])({method:"POST",url:a.getGoodList,data:t})},auditPromotion:function(t){return Object(o["a"])({method:"POST",url:a.auditPromotion,data:t})},closeApplyInfo:function(t){return Object(o["a"])({method:"POST",url:a.closeApplyInfo,data:t})},getDetail:function(t){return Object(o["a"])({method:"GET",url:"".concat(a.getDetail,"/").concat(t)})},findTenantStatDetail:function(t){return Object(o["a"])({method:"GET",url:a.findTenantStatDetail,data:t})}}},bd5c:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"marketing_page"},[n("div",{staticClass:"content"},[n("div",{staticClass:"toolbar"},[n("el-form",{attrs:{inline:!0,model:t.formParams}},[n("el-form-item",{attrs:{label:"活动名称"}},[n("el-input",{attrs:{size:"mini"},model:{value:t.formParams.name,callback:function(e){t.$set(t.formParams,"name",e)},expression:"formParams.name"}})],1),n("el-form-item",{attrs:{label:"活动状态"}},[n("el-select",{attrs:{size:"mini"},model:{value:t.formParams.promotionStatus,callback:function(e){t.$set(t.formParams,"promotionStatus",e)},expression:"formParams.promotionStatus"}},t._l(t.statusList,(function(t,e){return n("el-option",{key:e,attrs:{label:t.label,value:t.value}})})),1)],1),n("el-form-item",{attrs:{label:"营销方式"}},[n("el-select",{attrs:{size:"mini"},model:{value:t.formParams.promotionType,callback:function(e){t.$set(t.formParams,"promotionType",e)},expression:"formParams.promotionType"}},t._l(t.promotionTypeList,(function(t,e){return n("el-option",{key:e,attrs:{label:t.label,value:t.value}})})),1),n("el-form-item",[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.query}},[t._v(" 查询 ")]),n("el-button",{attrs:{plain:"",size:"mini"},on:{click:t.reset}},[t._v(" 重置 ")]),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.add}},[t._v(" 新建活动 ")])],1)],1)],1)],1),n("div",{staticClass:"content_table"},[n("div",{staticClass:"table"},[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData.records,border:""}},[n("el-table-column",{attrs:{prop:"name",label:"活动名称"}}),n("el-table-column",{attrs:{prop:"status",formatter:t.getStatus,label:"活动状态"}}),n("el-table-column",{attrs:{prop:"promotionType",label:"营销方式",formatter:t.getType}}),n("el-table-column",{attrs:{prop:"tenantCount",label:"商家数"}}),n("el-table-column",{attrs:{prop:"productCount",label:"商品数量"}}),n("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(n){return n.preventDefault(),t.details(e.row.id)}}},[t._v(" 详情 ")]),5!==e.row.status?n("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(n){return n.preventDefault(),t.edit(e.row)}}},[t._v(" 编辑 ")]):t._e(),4===e.row.status?n("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(n){return n.preventDefault(),t.stop(e.row.id)}}},[t._v(" 结束 ")]):t._e(),5===e.row.status?n("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(n){return n.preventDefault(),t.deletes(e.row.id)}}},[t._v(" 删除 ")]):t._e()]}}])})],1)],1),n("pagination",{directives:[{name:"show",rawName:"v-show",value:t.tableData.total>0,expression:"tableData.total > 0"}],attrs:{limit:t.formParams.pageSize,page:t.formParams.pageIndex,total:Number(t.tableData.total)},on:{"update:limit":function(e){return t.$set(t.formParams,"pageSize",e)},"update:page":function(e){return t.$set(t.formParams,"pageIndex",e)},pagination:t.fetch}})],1)]),n("delete",{attrs:{"dialog-visible":t.dialogVisible},on:{confirm:t.confirm,closed:t.closed}})],1)},a=[],r=(n("4160"),n("159b"),n("96cf"),n("1da1")),i=n("333d"),s=n("9b2a"),c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{attrs:{title:t.dialogVisible.title,visible:t.dialogVisible.visible,width:"30%"},on:{"update:visible":function(e){return t.$set(t.dialogVisible,"visible",e)}}},[n("span",[t._v(t._s(t.dialogVisible.text))]),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:t.close}},[t._v("取 消")]),n("el-button",{attrs:{type:"primary"},on:{click:t.confirm}},[t._v("确 定")])],1)])},u=[],l={props:{dialogVisible:{type:Object,default:function(){}}},data:function(){return{}},methods:{confirm:function(){this.$emit("confirm",!1)},close:function(){this.$emit("closed",!1)}}},d=l,f=n("2877"),p=Object(f["a"])(d,c,u,!1,null,"5fa79df5",null),m=p.exports,b={components:{Pagination:i["a"],Delete:m},data:function(){return{formParams:{name:"",promotionStatus:"",promotionType:"",type:1,pageSize:10,pageIndex:1},statusList:[{label:"全部",value:""},{label:"报名未开始",value:1},{label:"报名进行中",value:2},{label:"活动未开始",value:3},{label:"活动进行中",value:4},{label:"活动已结束",value:5}],promotionTypeList:[{label:"全部",value:""},{label:"满减",value:1},{label:"优惠券",value:2}],tableData:{},dialogVisible:{title:"",visible:!1,text:""}}},created:function(){this.getList()},methods:{getList:function(){var t=this;return Object(r["a"])(regeneratorRuntime.mark((function e(){var n,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,s["a"].getList(t.formParams);case 2:n=e.sent,o=n.data,0===o.code&&(t.tableData=o.data);case 5:case"end":return e.stop()}}),e)})))()},query:function(){this.getList()},add:function(){this.$router.push({path:"/marketing/add"})},details:function(t){this.$router.push({path:"/marketing/details/".concat(t)})},edit:function(t){this.$router.push({path:"/marketing/add",query:{info:t}})},reset:function(){this.formParams={name:"",promotionStatus:"",promotionType:"",type:1,pageSize:10,pageIndex:1}},deletes:function(t){var e=this;e.dialogVisible={visible:!0,title:"删除活动",text:"确认删除此活动吗?",type:1,id:t}},stop:function(t){var e=this;e.dialogVisible={visible:!0,title:"结束活动",text:"未到活动结束时间,确定要提前结束吗?",type:2,id:t}},confirm:function(t){var e=this,n=1===e.dialogVisible.type?"delPromotion":"finishPromotion";s["a"][n]({id:e.dialogVisible.id}).then((function(t){e.getList()})),e.dialogVisible.visible=t},closed:function(t){this.dialogVisible.visible=t},fetch:function(){this.getList()},getDict:function(t,e){var n=e;return t.forEach((function(t){t.value===e&&(n=t.label)})),n},getStatus:function(t,e,n){return this.getDict(this.statusList,n)},getType:function(t,e,n){return this.getDict(this.promotionTypeList,n)}}},h=b,g=(n("5aa0"),Object(f["a"])(h,o,a,!1,null,"b6c4f5be",null));e["default"]=g.exports},cbcd:function(t,e,n){}}]); |