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
18 KiB
1 lines
18 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4a2bce2d"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),Math.easeInOutQuad=function(t,e,n,a){return t/=a/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function r(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function i(t,e,n){var i=o(),c=t-i,u=20,s=0;e="undefined"===typeof e?500:e;var l=function t(){s+=u;var o=Math.easeInOutQuad(s,i,c,e);r(o),s<e?a(t):n&&"function"===typeof n&&n()};l()}},"0bf6":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"label_page"},[n("el-form",{attrs:{inline:""}},[n("el-form-item",{staticStyle:{"margin-right":"0"}},[n("el-select",{staticStyle:{width:"130px"},attrs:{size:"mini"},model:{value:t.form.model.type,callback:function(e){t.$set(t.form.model,"type",e)},expression:"form.model.type"}},t._l(t.typeList,(function(t,e){return n("el-option",{key:e,attrs:{label:t.label,value:t.value}})})),1)],1),n("el-form-item",[n("el-input",{attrs:{size:"mini"},model:{value:t.form.model.name,callback:function(e){t.$set(t.form.model,"name",e)},expression:"form.model.name"}})],1),n("el-form-item",[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.fetch}},[t._v("查询")]),n("el-button",{attrs:{size:"mini"},on:{click:t.reset}},[t._v("重置")])],1),n("el-form-item",{staticStyle:{float:"right"}},[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.add}},[t._v("新建标签")]),n("el-button",{attrs:{size:"mini"},on:{click:t.exportTag}},[t._v("导出标签")])],1)],1),n("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData.records,border:"","tooltip-effect":"dark"},on:{"selection-change":t.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),n("el-table-column",{attrs:{prop:"name",label:"标签名"}}),n("el-table-column",{attrs:{prop:"tagCount",label:"客户"}}),n("el-table-column",{attrs:{prop:"type",label:"标签类型",formatter:t.getType}}),n("el-table-column",{attrs:{prop:"tradeCondition",label:"打标条件"},scopedSlots:t._u([{key:"default",fn:function(e){return[1===e.row.type?n("span",[t._v("未设置")]):n("p",{staticClass:"condition"},[n("span",[t._v(t._s(t.getCondition(e.row.config)))]),n("span",{on:{click:function(n){return t.moreCondition(e.row)}}},[t._v("查看更多")])])]}}])}),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.edit(e.row.id)}}},[t._v(" 编辑 ")]),n("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(n){return n.preventDefault(),t.deletes(e.row.id)}}},[t._v(" 删除 ")])]}}])})],1),n("div",{staticClass:"batch_btn"},[n("el-button",{attrs:{disabled:!t.multipleSelection.length},on:{click:function(e){return t.deletes(!1)}}},[t._v("批量删除")])],1),n("pagination",{directives:[{name:"show",rawName:"v-show",value:t.tableData.total>0,expression:"tableData.total > 0"}],attrs:{limit:t.form.size,page:t.form.current,total:Number(t.tableData.total)},on:{"update:limit":function(e){return t.$set(t.form,"size",e)},"update:page":function(e){return t.$set(t.form,"current",e)},pagination:t.fetch}}),n("Dialog",{attrs:{title:t.dialog.title,visible:t.dialog.visible,fullscreen:!1,"before-close":t.close,width:"35%"},on:{"update:visible":function(e){return t.$set(t.dialog,"visible",e)}}},[t.dialog.visible?n("more",{attrs:{info:t.dialog.info},on:{close:t.close}}):t._e()],1)],1)},r=[],o=(n("99af"),n("4160"),n("a9e3"),n("ac1f"),n("1276"),n("159b"),n("96cf"),n("1da1")),i=n("333d"),c=n("ac44"),u=n("5c96"),s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"more_page"},[n("h2",[t._v(t._s(t.getTitle(t.info.meetCondition)))]),n("div",{staticClass:"condition"},[n("p",[t._v("交易条件:")]),n("p",t._l(t.list,(function(e,a){return n("span",{key:a},[t._v(t._s(e))])})),0)]),n("el-button",{attrs:{type:"primary"},on:{click:t.close}},[t._v("我知道了")])],1)},l=[],d={props:{info:{type:Object,default:function(){return{}}}},data:function(){return{list:["最后消费时间在30天内","累计成功交易在3-4次","累计消费金额在100-200元"]}},created:function(){this.getData()},methods:{getData:function(){var t=[],e=this.info.config;if(t.push("最后消费时间在".concat(e.lastConsumTime.value).concat(1===e.lastConsumTime.type?"天":"","内")),e.totalConsumTimes){var n=e.totalConsumTimes.split("-");t.push("累计成功交易在".concat(n[0],"-").concat(n[1],"次"))}if(e.totalConsumAmount){var a=e.totalConsumAmount.split("-");t.push("累计消费金额在".concat(a[0]/100,"-").concat(a[1]/100,"元"))}this.list=t},getTitle:function(t){return 1===t?"满足以下任意条件即可":"必须满足以下所有条件"},close:function(){this.$emit("close")}}},f=d,m=(n("edd7"),n("2877")),p=Object(m["a"])(f,s,l,!1,null,"8b17d302",null),b=p.exports,h=n("1771"),g={components:{Pagination:i["a"],Dialog:u["Dialog"],more:b},data:function(){return{form:{current:1,map:{},model:{name:"",type:""},order:"descending",size:10,sort:"id"},typeList:[{label:"全部标签类型",value:""},{label:"手动标签",value:1},{label:"自动标签",value:2}],tableData:{},multipleSelection:[],dialog:{}}},created:function(){this.getLabelList()},methods:{getLabelList:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function e(){var n,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c["a"].getLabelList(t.form);case 2:n=e.sent,a=n.data,0===a.code&&(t.tableData=a.data);case 5:case"end":return e.stop()}}),e)})))()},getType:function(t,e,n){return 1===Number(n)?"手动标签":"自动标签"},add:function(){this.$router.push({path:"/customer-manage/label/add",query:{type:"add"}})},handleSelectionChange:function(t){this.multipleSelection=t},fetch:function(){this.getLabelList()},reset:function(){this.form={current:1,map:{},model:{name:"",type:""},order:"descending",size:10,sort:"id"}},edit:function(t){this.$router.push({path:"/customer-manage/label/add",query:{type:"edit",id:t}})},exportTag:function(){c["a"].exportTag(this.form).then((function(t){Object(h["a"])(t)}))},deletes:function(t){var e=this,n=[];t?n=[t]:this.multipleSelection.forEach((function(t){n.push(t.id)})),e.$confirm("确认要".concat(t?"删除本":"批量删除所选","标签吗"),"".concat(t?"删除":"批量删除","标签"),{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){c["a"].deleteTag({ids:n}).then((function(t){0===t.data.code&&(e.getLabelList(),e.$message.success("操作成功"))}))}))},getCondition:function(t){var e="";if(e+="最后消费时间在".concat(t.lastConsumTime.value).concat(1===t.lastConsumTime.type?"天":"","内;"),t.totalConsumTimes){var n=t.totalConsumTimes.split("-");e+="累计成功交易在".concat(n[0],"-").concat(n[1],"次")}if(t.totalConsumAmount){var a=t.totalConsumAmount.split("-");e+="累计消费金额在".concat(a[0]/100,"-").concat(a[1]/100,"元")}return e},moreCondition:function(t){this.dialog={title:"打标详情",info:t,visible:!0}},close:function(){this.dialog={}}}},v=g,y=(n("3e7e7"),Object(m["a"])(v,a,r,!1,null,"e65dd184",null));e["default"]=y.exports},1771:function(t,e,n){"use strict";n.d(e,"f",(function(){return u})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return l})),n.d(e,"b",(function(){return d})),n.d(e,"a",(function(){return f})),n.d(e,"e",(function(){return m}));n("caad"),n("d3b7"),n("ac1f"),n("8a79"),n("2532"),n("3ca3"),n("1276"),n("2ca0"),n("498a"),n("ddb0"),n("2b3d");var a=n("5530"),r=n("b85c"),o=n("c2cf"),i=n("ebb5"),c=void 0,u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"authority";"string"===typeof t&&(t=[t]),t&&t.length>0&&o["a"].enums({codes:t},n).then((function(n){var a,o=n.data,i=Object(r["a"])(t);try{for(i.s();!(a=i.n()).done;){var c=a.value;e[c]=o.data[c]}}catch(u){i.e(u)}finally{i.f()}}))},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(t,e,"authority")},l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(t,e,"msgs")},d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"===typeof t&&(t=[t]),t&&t.length>0&&i["a"].list({codes:t}).then((function(n){var a,o=n.data,i=Object(r["a"])(t);try{for(i.s();!(a=i.n()).done;){var c=a.value;e[c]=o.data[c]}}catch(u){i.e(u)}finally{i.f()}}))},f=function(t){console.log(t,12);var e=t.data,n=e.type;if(n&&n.includes("application/json")){var a=new FileReader;a.onload=function(t){if(2===t.target.readyState){var e=JSON.parse(t.target.result);c.$message({message:e.msg,type:"warning"})}},a.readAsText(e)}else{var r=t.headers["content-disposition"],o="下载文件.zip";if(r)for(var i=r.split(";"),u=0;u<i.length;u++){var s=i[u];if(null!==s&&""!==s){var l=s.split("=");if(null!==l&&l.length>0&&"filename"===l[0].trim().toLowerCase()){o=decodeURI(l[1]);break}}}(o.startsWith("'")||o.startsWith('"'))&&(o.endsWith("'")||o.endsWith('"'))&&(o=o.substring(1,o.length-1));var d=new Blob([e]),f=document.createElement("a");f.href=window.URL.createObjectURL(d),f.download=o,f.click(),window.URL.revokeObjectURL(f.href)}},m=function(t){var e={size:10,current:1,sort:"id",order:"descending",model:{},map:{},timeRange:null};return t?Object(a["a"])(Object(a["a"])({},e),t):e}},"27ae":function(t,e,n){(function(n){var a,r;(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 o,i=n.Base64,c="2.6.4",u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(t){for(var e={},n=0,a=t.length;n<a;n++)e[t.charAt(n)]=n;return e}(u),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,m=function(t){return t.replace(f,d)},p=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),a=[u.charAt(n>>>18),u.charAt(n>>>12&63),e>=2?"=":u.charAt(n>>>6&63),e>=1?"=":u.charAt(63&n)];return a.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,p)},h=function(t){return b(m(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&&(o=function(t,e){for(var n="",a=0,r=t.length;a<r;a+=3){var o=t[a],i=t[a+1],c=t[a+2],s=o<<16|i<<8|c;n+=u.charAt(s>>>18)+u.charAt(s>>>12&63)+("undefined"!=typeof i?u.charAt(s>>>6&63):"=")+("undefined"!=typeof c?u.charAt(63&s):"=")}return e?g(n):n});var T,O=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=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))}},j=function(t){return t.replace(O,w)},C=function(t){var e=t.length,n=e%4,a=(e>0?s[t.charAt(0)]<<18:0)|(e>1?s[t.charAt(1)]<<12:0)|(e>2?s[t.charAt(2)]<<6:0)|(e>3?s[t.charAt(3)]:0),r=[l(a>>>16),l(a>>>8&255),l(255&a)];return r.length-=[0,0,2,1][n],r.join("")},x=n.atob&&"function"==typeof n.atob?function(t){return n.atob(t)}:function(t){return t.replace(/\S{1,4}/g,C)},A=function(t){return x(String(t).replace(/[^A-Za-z0-9\+\/]/g,""))},S=function(t){return j(x(t))},_=function(t){return String(t).replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},B=function(t){return S(_(t))};n.Uint8Array&&(T=function(t){return Uint8Array.from(A(_(t)),(function(t){return t.charCodeAt(0)}))});var k=function(){var t=n.Base64;return n.Base64=i,t};if(n.Base64={VERSION:c,atob:A,btoa:b,fromBase64:B,toBase64:v,utob:m,encode:v,encodeURI:y,btou:j,decode:B,noConflict:k,fromUint8Array:o,toUint8Array:T},"function"===typeof Object.defineProperty){var L=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",L((function(){return B(this)}))),Object.defineProperty(String.prototype,"toBase64",L((function(t){return v(this,t)}))),Object.defineProperty(String.prototype,"toBase64URI",L((function(){return v(this,!0)})))}}return n["Meteor"]&&(Base64=n.Base64),t.exports?t.exports.Base64=n.Base64:(a=[],r=function(){return n.Base64}.apply(e,a),void 0===r||(t.exports=r)),{Base64:n.Base64}}))}).call(this,n("c8ba"))},"3e7e7":function(t,e,n){"use strict";var a=n("6134"),r=n.n(a);r.a},"4fad":function(t,e,n){var a=n("23e7"),r=n("6f53").entries;a({target:"Object",stat:!0},{entries:function(t){return r(t)}})},6134:function(t,e,n){},"6f53":function(t,e,n){var a=n("83ab"),r=n("df75"),o=n("fc6a"),i=n("d1e7").f,c=function(t){return function(e){var n,c=o(e),u=r(c),s=u.length,l=0,d=[];while(s>l)n=u[l++],a&&!i.call(c,n)||d.push(t?[n,c[n]]:c[n]);return d}};t.exports={entries:c(!0),values:c(!1)}},"8a79":function(t,e,n){"use strict";var a=n("23e7"),r=n("06cf").f,o=n("50c4"),i=n("5a34"),c=n("1d80"),u=n("ab13"),s=n("c430"),l="".endsWith,d=Math.min,f=u("endsWith"),m=!s&&!f&&!!function(){var t=r(String.prototype,"endsWith");return t&&!t.writable}();a({target:"String",proto:!0,forced:!m&&!f},{endsWith:function(t){var e=String(c(this));i(t);var n=arguments.length>1?arguments[1]:void 0,a=o(e.length),r=void 0===n?a:d(o(n),a),u=String(t);return l?l.call(e,u,r):e.slice(r-u.length,r)===u}})},9256:function(t,e,n){"use strict";n("99af"),n("4160"),n("caad"),n("4fad"),n("d3b7"),n("159b");var a=n("5530"),r=n("bc3a"),o=n.n(r),i=n("5c96"),c=n("5657");n("27ae");function u(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 s(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)}o.a.interceptors.request.use((function(t){var e=!1!==t.headers["X-isToken"]||t.headers["X-isToken"],n=c["a"].get("TOKEN","");n&&e&&(t.headers.token="Bearer "+n);var a="ceres_admin_web",r="ceres_admin_web";return t.headers["Authorization"]="Basic ".concat("".concat(a,":").concat(r)),t}),(function(t){return Promise.reject(t)})),o.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(),r={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)?r.data=t.data||{}:r.params=Object(a["a"])(Object(a["a"])({},e),t.data||{}),t.formData&&(r.transformRequest=[function(t){var e=new FormData;return t&&Object.entries(t).forEach((function(t){e.append(t[0],t[1])})),e}]);var c=new Promise((function(t,e){o()(r).then((function(e){s(e,t)})).catch((function(t){u(t,e)}))}));return c};e["a"]=l},9313:function(t,e,n){},ac44:function(t,e,n){"use strict";n("99af");var a=n("9256"),r={getLabelList:"/memberTag/page",addLabel:"/memberTag",queryTag:"/memberTag/queryTag/",deleteTag:"/memberTag",editTag:"/memberTag",exportTag:"/memberTag/export",getTagInfo:"/memberTag/"};e["a"]={getLabelList:function(t){return Object(a["a"])({method:"POST",url:r.getLabelList,data:t})},addLabel:function(t){return Object(a["a"])({method:"POST",url:r.addLabel,data:t})},queryTag:function(t){return Object(a["a"])({method:"GET",url:"".concat(r.queryTag).concat(t)})},deleteTag:function(t){return Object(a["a"])({method:"DELETE",url:r.deleteTag,data:t})},editTag:function(t){return Object(a["a"])({method:"PUT",url:r.editTag,data:t})},exportTag:function(t){return Object(a["a"])({method:"POST",url:r.exportTag,data:t})},getTagInfo:function(t){return Object(a["a"])({method:"GET",url:"".concat(r.getTagInfo).concat(t)})}}},c2cf:function(t,e,n){"use strict";var a=n("5530"),r=n("9256"),o={enums:{method:"GET",url:"/enums"}};e["a"]={uploadFile:"".concat("https://pos.admin.api.lotus-wallet.com","/attachment/upload"),enums:function(t){return Object(r["a"])(Object(a["a"])(Object(a["a"])({},o.enums),{},{data:t}))}}},ebb5:function(t,e,n){"use strict";var a=n("5530"),r=n("9256"),o={page:{method:"POST",url:"/dictionaryItem/page"},update:{method:"PUT",url:"/dictionaryItem"},save:{method:"POST",url:"/dictionaryItem"},delete:{method:"DELETE",url:"/dictionaryItem"},list:{method:"GET",url:"/dictionaryItem/codes"},preview:{method:"POST",url:"/dictionaryItem/preview"},export:{method:"POST",url:"/dictionaryItem/export"},import:{method:"POST",url:"/dictionaryItem/import"}};e["a"]={page:function(t){return Object(r["a"])(Object(a["a"])(Object(a["a"])({},o.page),{},{data:t}))},save:function(t){return Object(r["a"])(Object(a["a"])(Object(a["a"])({},o.save),{},{data:t}))},update:function(t){return Object(r["a"])(Object(a["a"])(Object(a["a"])({},o.update),{},{data:t}))},delete:function(t){return Object(r["a"])(Object(a["a"])(Object(a["a"])({},o.delete),{},{data:t}))},list:function(t){return Object(r["a"])(Object(a["a"])(Object(a["a"])({},o.list),{},{data:t}))},preview:function(t){return Object(r["a"])(Object(a["a"])(Object(a["a"])({},o.preview),{},{data:t}))},export:function(t){return Object(r["a"])(Object(a["a"])(Object(a["a"])({},o.export),{},{responseType:"blob",data:t}))},import:function(t){return Object(r["a"])(Object(a["a"])(Object(a["a"])({},o.import),{},{data:t}))}}},edd7:function(t,e,n){"use strict";var a=n("9313"),r=n.n(a);r.a}}]); |