1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-82b00b2e"],{"15ef":function(t,e,r){},"314d":function(t,e,r){r("15ef")},"31b4":function(t,e,r){r("a630"),r("3ca3");var n=r("5530"),a=(r("e9f5"),r("7d54"),r("d3b7"),r("159b"),r("da05")),o=r("6b6c"),c=r("2f62");a={name:"edit",components:{formCreate:a.a.$form()},computed:Object(n.a)({},Object(c.c)("userLevel",["taskId","levelId"])),props:{FromData:{type:Object,default:null},update:{type:Boolean,default:!0}},watch:{FromData:function(){this.FromData.rules.forEach((function(t){t.title+=":"}))}},data:function(){return{modals:!1,type:0,loading:!1,fapi:null,config:{form:{labelWidth:"100px"},resetBtn:!1,submitBtn:!1,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)},formSubmit:function(){this.fapi.submit()},onSubmit:function(t){var e=this;this.loading||(this.loading=!0,Object(o.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("fae3"),n=r("2877"),c=Object(n.a)(a,(function(){var t=this,e=t._self._c;return t.FromData?e("div",[e("el-dialog",{attrs:{visible:t.modals,title:t.FromData.title,"z-index":1,width:"720px"},on:{"update:visible":function(e){t.modals=e},closed:t.cancel}},[["/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("el-radio-group",{on:{input:t.couponsType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[e("el-radio",{attrs:{label:0}},[t._v("通用券")]),e("el-radio",{attrs:{label:1}},[t._v("品类券")]),e("el-radio",{attrs:{label:2}},[t._v("商品券")])],1)],1):t._e()],e("form-create",{ref:"fc",staticClass:"formBox",attrs:{option:t.config,rule:Array.from(this.FromData.rules),handleIcon:"false"},on:{submit:t.onSubmit},model:{value:t.fapi,callback:function(e){t.fapi=e},expression:"fapi"}}),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.modals=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.formSubmit}},[t._v("确 定")])],1)],2)],1):t._e()}),[],!1,null,"224af4d2",null);e.a=c.exports},4967:function(t,e,r){},"8aca":function(t,e,r){r.r(e);var n=r("c7eb"),a=r("1da1"),o=r("5530"),c=(r("14d9"),r("e9f5"),r("7d54"),r("d3b7"),r("159b"),r("2f62")),i=r("c4c8");o={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(o.a)({},Object(c.c)("admin/userLevel",["categoryId"])),mounted:function(){this.goodsCategory(),this.getList()},methods:{goodsCategory:function(){var t=this;Object(i.F)(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(i.u)(this.artFrom).then((()=>{var e=Object(a.a)(Object(n.a)().mark((function e(r){var a;return Object(n.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=r.data,t.tableData=a.list,t.total=a.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(i.o)()).then((function(){return t.getList()}))},edit:function(t){var e=this;this.$modalForm(Object(i.p)(t.id)).then((function(){return e.getList()}))},onchangeIsShow:function(t){var e=this;t={id:t.id,is_show:t.is_show};Object(i.E)(t).then((()=>{var t=Object(
|