CRMEB/crmeb/public/admin/system_static/js/chunk-2d0ab8b4.617bb152.js
2023-04-06 18:14:33 +08:00

1 line
4.0 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0ab8b4"],{1670:function(e,t,i){"use strict";i.r(t);var n=i("c964"),a=i("f3f3"),l=(i("96cf"),i("a434"),i("2f62")),r=i("90e7");a={name:"setting_templates",components:{freightTemplate:i("5334").a},data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,columns1:[{title:"ID",key:"id",width:80},{title:"模板名称",key:"name",minWidth:100},{title:"计费方式",key:"type",minWidth:120},{title:"指定包邮",key:"appoint",minWidth:120},{title:"排序",key:"sort",minWidth:120},{title:"添加时间",key:"add_time",minWidth:120},{title:"操作",slot:"action",fixed:"right",minWidth:120}],levelFrom:{name:"",page:1,limit:15},levelLists:[],total:0,FromData:null,isTemplate:!1}},created:function(){this.getList()},computed:Object(a.a)(Object(a.a)({},Object(l.e)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"left"}}),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 n=this;t={title:t,num:i,url:"setting/shipping_templates/del/".concat(e.id),method:"DELETE",ids:""};this.$modalSure(t).then((function(e){n.$Message.success(e.msg),n.levelLists.splice(i,1)})).catch((function(e){n.$Message.error(e.msg)}))},getList:function(){var e=this;this.loading=!0,Object(r.Jb)(this.levelFrom).then(function(){var t=Object(n.a)(regeneratorRuntime.mark((function t(i){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=i.data,e.levelLists=n.data,e.total=n.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)}))},pageChange:function(e){this.levelFrom.page=e,this.getList()},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()}}},l=i("2877"),i=Object(l.a)(a,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[i("Form",{ref:"levelFrom",attrs:{model:e.levelFrom,"label-width":e.labelWidth,"label-position":e.labelPosition},nativeOn:{submit:function(e){e.preventDefault()}}},[i("Row",{attrs:{type:"flex",gutter:24}},[i("Col",e._b({},"Col",e.grid,!1),[i("FormItem",{attrs:{label:"搜索:","label-for":"keyword"}},[i("Input",{attrs:{search:"","enter-button":"",placeholder:"请输入模板名称"},on:{"on-search":e.userSearchs},model:{value:e.levelFrom.name,callback:function(t){e.$set(e.levelFrom,"name",t)},expression:"levelFrom.name"}})],1)],1)],1),i("Row",{attrs:{type:"flex"}},[i("Col",e._b({},"Col",e.grid,!1),[i("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:e.freight}},[e._v("添加运费模板")])],1)],1)],1),i("Table",{ref:"table",staticClass:"mt25",attrs:{columns:e.columns1,data:e.levelLists,loading:e.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:e._u([{key:"icons",fn:function(e){var t=e.row;return e.index,[i("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.icon,expression:"row.icon"}]})])]}},{key:"action",fn:function(t){var n=t.row,a=t.index;return[i("a",{on:{click:function(t){return e.edit(n.id)}}},[e._v("修改")]),1!==n.id?i("Divider",{attrs:{type:"vertical"}}):e._e(),1!==n.id?i("a",{on:{click:function(t){return e.del(n,"删除分组",a)}}},[e._v("删除")]):e._e()]}}])}),i("div",{staticClass:"acea-row row-right page"},[i("Page",{attrs:{total:e.total,current:e.levelFrom.page,"show-elevator":"","show-total":"","page-size":e.levelFrom.limit},on:{"on-change":e.pageChange}})],1)],1),e.isTemplate?i("freight-template",{ref:"template",on:{addSuccess:e.getList,close:function(){e.isTemplate=!1}}}):e._e()],1)}),[],!1,null,null,null);t.default=i.exports}}]);