mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-14 04:12:50 +00:00
1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-a1b1ce8e"],{"2ec3":function(t,e,r){},"31b4":function(t,e,r){"use strict";var n=r("f3f3"),o=r("9860"),a=(o=r.n(o),r("6b6c")),i=r("2f62");o={name:"edit",components:{formCreate:o.a.$form()},computed:Object(n.a)({},Object(i.d)("userLevel",["taskId","levelId"])),props:{FromData:{type:Object,default:null},update:{type:Boolean,default:!0}},data:function(){return{modals:!1,type:0,loading:!1,config:{global:{upload:{props:{onSuccess:function(t,e){200===t.status?e.url=t.data.src:this.Message.error(t.msg)}}}}}}},methods:{couponsType:function(){this.$parent.addType(this.type)},onSubmit:function(t){var e=this;this.loading||(this.loading=!0,Object(a.a)({url:this.FromData.action,method:this.FromData.method,data:t}).then((function(t){e.update&&e.$parent.getList(),e.$Message.success(t.msg),e.modals=!1,setTimeout((function(){e.$emit("submitFail"),e.loading=!1}),1e3)})).catch((function(t){e.loading=!1,e.$Message.error(t.msg)})))},cancel:function(){this.type=0}}},r("9646"),n=r("2877"),i=Object(n.a)(o,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return t.FromData?e("div",[e("Modal",{attrs:{scrollable:"","footer-hide":"",closable:"",title:t.FromData.title,"z-index":1,width:"700"},on:{"on-cancel":t.cancel},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[["/marketing/coupon/save.html"===t.FromData.action?e("div",{staticClass:"radio acea-row row-middle"},[e("div",{staticClass:"name ivu-form-item-content"},[t._v("优惠券类型")]),e("Radio-group",{on:{"on-change":t.couponsType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[e("Radio",{attrs:{label:0}},[t._v("通用券")]),e("Radio",{attrs:{label:1}},[t._v("品类券")]),e("Radio",{attrs:{label:2}},[t._v("商品券")])],1)],1):t._e()],e("form-create",{ref:"fc",staticClass:"formBox",attrs:{option:t.config,rule:Array.from(t.FromData.rules),handleIcon:"false"},on:{submit:t.onSubmit}})],2)],1):t._e()}),[],!1,null,"5cc97a38",null);e.a=i.exports},6395:function(t,e,r){"use strict";var n=r("bf20");r.n(n).a},"8aca":function(t,e,r){"use strict";r.r(e),r("a4d3"),r("e01a"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("b0c0"),r("131a"),r("fb6a");var n=r("0122"),o=r("c964"),a=r("f3f3"),i=(r("d3b7"),r("159b"),r("2f62")),c=r("c4c8");function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(e){u=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var a,i,c,s;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new F(n||[]);return o(e,"_invoke",{value:(a=t,i=r,c=n,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return O()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r&&(r=function t(e,r){var n=r.method,o=e.iterator[n];return void 0===o?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f):(n=d(o,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,f):(o=n.arg,o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)))}(r,c),r)){if(r===f)continue;return r}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);if(s="executing",r=d(a,i,c),"normal"===r.type){if(s=c.done?"completed":"suspendedYield",r.arg===f)continue;return{value:r.arg,done:c.done}}"throw"===r.type&&(s="completed",c.method="throw",c.arg=r.arg)}})}),e}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function p(){}function m(){}function v(){}a={};var g=(u(a,i,(function(){return this})),Object.getPrototypeOf),y=(g=g&&g(g(L([]))),g&&g!==e&&r.call(g,i)&&(a=g),v.prototype=p.prototype=Object.create(a));function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var a;o(this,"_invoke",{value:function(o,i){function c(){return new e((function(a,c){!function o(a,i,c,s){var l;a=d(t[a],t,i);if("throw"!==a.type)return(i=(l=a.arg).value)&&"object"==Object(n.a)(i)&&r.call(i,"__await")?e.resolve(i.__await).then((function(t){o("next",t,c,s)}),(function(t){o("throw",t,c,s)})):e.resolve(i).then((function(t){l.value=t,c(l)}),(function(t){return o("throw",t,c,s)}));s(a.arg)}(o,i,a,c)}))}return a=a?a.then(c,c):c()}})}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function L(t){if(t){var e,n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:O}}function O(){return{value:void 0,done:!0}}return o(y,"constructor",{value:m.prototype=v,configurable:!0}),o(v,"constructor",{value:m,configurable:!0}),m.displayName=u(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,l,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,c,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new w(h(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(y),u(y,l,"Generator"),u(y,i,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=L,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;0<=o;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}var i=(a=a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc?null:a)?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,x(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}a={name:"product_productClassify",components:{editFrom:r("31b4").a},data:function(){return{treeSelect:[],FromData:null,grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,artFrom:{pid:0,is_show:"",page:1,cate_name:"",limit:15},total:0,tableData:[]}},computed:Object(a.a)({},Object(i.d)("admin/userLevel",["categoryId"])),mounted:function(){this.goodsCategory(),this.getList()},methods:{goodsCategory:function(){var t=this;Object(c.H)(0).then((function(e){t.treeSelect=e.data})).catch((function(e){t.$Message.error(e.msg)}))},getList:function(){var t=this;this.loading=!0,this.artFrom.is_show=this.artFrom.is_show||"",this.artFrom.pid=this.artFrom.pid||"",Object(c.x)(this.artFrom).then(function(){var e=Object(o.a)(s().mark((function e(r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.tableData=n.list,t.total=n.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.artFrom.page=t,this.getList()},addClass:function(){var t=this;this.$modalForm(Object(c.r)()).then((function(){return t.getList()}))},edit:function(t){var e=this;this.$modalForm(Object(c.s)(t.id)).then((function(){return e.getList()}))},onchangeIsShow:function(t){var e=this;t={id:t.id,is_show:t.is_show};Object(c.G)(t).then(function(){var t=Object(o.a)(s().mark((function t(r){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},handleCheckChange:function(t){var e="",r="";this.list=[],this.artFrom.pid=0,t.forEach((function(t,n){e+="".concat(t.id,","),r+="".concat(t.title,",")})),e=e.substring(0,e.length-1),r=r.substring(0,r.length-1),this.list.push({value:e,title:r}),this.artFrom.pid=e,this.getList()},del:function(t,e,r){var n=this;e={title:e,num:r,url:"product/category/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){n.$Message.success(t.msg),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))},userSearchs:function(){this.artFrom.page=1,this.getList()}}},r("6395"),i=r("2877"),r=Object(i.a)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"article-manager"},[r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("Form",{ref:"artFrom",attrs:{model:t.artFrom,"label-width":75,"label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[r("Row",{attrs:{type:"flex",gutter:24}},[r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"商品分类:",prop:"pid","label-for":"pid"}},[r("Select",{attrs:{placeholder:"请选择商品分类",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.artFrom.pid,callback:function(e){t.$set(t.artFrom,"pid",e)},expression:"artFrom.pid"}},t._l(t.treeSelect,(function(e){return r("Option",{key:e.id,attrs:{value:e.id}},[t._v(t._s(e.cate_name))])})),1)],1)],1),r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"分类状态:","label-for":"is_show"}},[r("Select",{attrs:{placeholder:"请选择分类状态",clearable:""},on:{"on-change":t.userSearchs},model:{value:t.artFrom.is_show,callback:function(e){t.$set(t.artFrom,"is_show",e)},expression:"artFrom.is_show"}},[r("Option",{attrs:{value:"1"}},[t._v("显示")]),r("Option",{attrs:{value:"0"}},[t._v("隐藏")])],1)],1)],1),r("Col",t._b({},"Col",t.grid,!1),[r("FormItem",{attrs:{label:"分类名称:","label-for":"status2"}},[r("Input",{attrs:{search:"","enter-button":"",placeholder:"请输入分类名称"},on:{"on-search":t.userSearchs},model:{value:t.artFrom.cate_name,callback:function(e){t.$set(t.artFrom,"cate_name",e)},expression:"artFrom.cate_name"}})],1)],1)],1),r("Row",{attrs:{type:"flex"}},[r("Col",t._b({},"Col",t.grid,!1),[r("Button",{directives:[{name:"auth",rawName:"v-auth",value:["product-save-cate"],expression:"['product-save-cate']"}],staticClass:"bnt",attrs:{type:"primary",icon:"md-add"},on:{click:t.addClass}},[t._v("添加分类")])],1)],1)],1),r("vxe-table",{staticClass:"mt25",attrs:{"highlight-hover-row":"",loading:t.loading,"header-row-class-name":"false","tree-config":{children:"children"},data:t.tableData}},[r("vxe-table-column",{attrs:{field:"id",title:"ID",tooltip:"",width:"80"}}),r("vxe-table-column",{attrs:{field:"cate_name","tree-node":"",title:"分类名称","min-width":"250"}}),r("vxe-table-column",{attrs:{field:"pic",title:"分类图标","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return e=e.row,[e.pic?r("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.pic,expression:"row.pic"}]})]):t._e()]}}])}),r("vxe-table-column",{attrs:{field:"sort",title:"排序","min-width":"100",tooltip:"true"}}),r("vxe-table-column",{attrs:{field:"is_show",title:"状态","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("i-switch",{attrs:{value:n.is_show,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.is_show,callback:function(e){t.$set(n,"is_show",e)},expression:"row.is_show"}},[r("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),r("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}}])}),r("vxe-table-column",{attrs:{field:"date",title:"操作",width:"250",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row,o=e.index;return[r("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.del(n,"删除商品分类",o)}}},[t._v("删除")])]}}])})],1)],1),r("edit-from",{ref:"edits",attrs:{FromData:t.FromData},on:{submitFail:t.userSearchs}})],1)}),[],!1,null,"4ad6082c",null),e.default=r.exports},9646:function(t,e,r){"use strict";var n=r("2ec3");r.n(n).a},bf20:function(t,e,r){}}]); |