(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0ab8b4"],{1670:function(e,t,i){"use strict";i.r(t),i("b0c0"),i("4e82");var l=i("c7eb"),a=i("1da1"),n=i("5530"),s=(i("a434"),i("2f62")),r=i("90e7");n={name:"setting_templates",components:{freightTemplate:i("5334").a},data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,levelFrom:{name:"",page:1,limit:15},levelLists:[],total:0,FromData:null,isTemplate:!1}},created:function(){this.getList()},computed:Object(n.a)(Object(n.a)({},Object(s.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{freight:function(){var e=this;this.isTemplate=!0,this.$nextTick((function(t){e.$refs.template.id=0,e.$refs.template.isTemplate=!0}))},del:function(e,t,i){var l=this;t={title:t,num:i,url:"setting/shipping_templates/del/".concat(e.id),method:"DELETE",ids:""};this.$modalSure(t).then((function(e){l.$message.success(e.msg),l.levelLists.splice(i,1)})).catch((function(e){l.$message.error(e.msg)}))},getList:function(){var e=this;this.loading=!0,Object(r.Ob)(this.levelFrom).then(function(){var t=Object(a.a)(Object(l.a)().mark((function t(i){var a;return Object(l.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:a=i.data,e.levelLists=a.data,e.total=a.count,e.loading=!1;case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading=!1,e.$message.error(t.msg)}))},edit:function(e){var t=this;this.isTemplate=!0,this.$nextTick((function(i){t.$refs.template.isTemplate=!0,t.$refs.template.editFrom(e)}))},userSearchs:function(){this.levelFrom.page=1,this.getList()}}},s=i("2877"),i=Object(s.a)(n,(function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"ivu-mb-16",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[t("div",{staticClass:"padding-add"},[t("el-form",{ref:"levelFrom",attrs:{model:e.levelFrom,"label-width":e.labelWidth,"label-position":"right",inline:""},nativeOn:{submit:function(e){e.preventDefault()}}},[t("el-form-item",{attrs:{label:"搜索:","label-for":"keyword"}},[t("el-input",{staticClass:"form_content_width",attrs:{clearable:"",placeholder:"请输入模板名称"},model:{value:e.levelFrom.name,callback:function(t){e.$set(e.levelFrom,"name",t)},expression:"levelFrom.name"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e.userSearchs}},[e._v("查询")])],1)],1)],1)]),t("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never"}},[t("el-button",{attrs:{type:"primary"},on:{click:e.freight}},[e._v("添加运费模板")]),t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",staticClass:"mt14",attrs:{data:e.levelLists,"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[t("el-table-column",{attrs:{label:"ID",width:"80"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",[e._v(e._s(i.row.id))])]}}])}),t("el-table-column",{attrs:{label:"模板名称","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",[e._v(e._s(i.row.name))])]}}])}),t("el-table-column",{attrs:{label:"计费方式","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",[e._v(e._s(i.row.type))])]}}])}),t("el-table-column",{attrs:{label:"指定包邮","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",[e._v(e._s(i.row.appoint))])]}}])}),t("el-table-column",{attrs:{label:"排序","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",[e._v(e._s(i.row.sort))])]}}])}),t("el-table-column",{attrs:{label:"添加时间","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",[e._v(e._s(i.row.add_time))])]}}])}),t("el-table-column",{attrs:{label:"操作",fixed:"right",width:"100"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("a",{on:{click:function(t){return e.edit(i.row.id)}}},[e._v("修改")]),1!==i.row.id?t("el-divider",{attrs:{direction:"vertical"}}):e._e(),1!==i.row.id?t("a",{on:{click:function(t){return e.del(i.row,"删除模版",e.index)}}},[e._v("删除")]):e._e()]}}])})],1),t("div",{staticClass:"acea-row row-right page"},[e.total?t("pagination",{attrs:{total:e.total,page:e.levelFrom.page,limit:e.levelFrom.limit},on:{"update:page":function(t){return e.$set(e.levelFrom,"page",t)},"update:limit":function(t){return e.$set(e.levelFrom,"limit",t)},pagination:e.getList}}):e._e()],1)],1),e.isTemplate?t("freight-template",{ref:"template",on:{addSuccess:e.getList,close:function(){e.isTemplate=!1}}}):e._e()],1)}),[],!1,null,null,null);t.default=i.exports}}]);