chunk-2d0ab8b4.7037d0aa.js 4.8 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0ab8b4"],{1670:function(e,t,i){"use strict";i.r(t);var r=i("a34a"),n=i.n(r),a=i("2f62"),o=i("90e7");function l(e,t,i,r,n,a,o){try{var l=e[a](o),s=l.value}catch(e){return void i(e)}l.done?t(s):Promise.resolve(s).then(r,n)}function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function c(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var u={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}},created:function(){this.getList()},computed:function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(i,!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(i).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},Object(a.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{freight:function(){this.$refs.template.id=0,this.$refs.template.isTemplate=!0},del:function(e,t,i){var r=this,n={title:t,num:i,url:"setting/shipping_templates/del/".concat(e.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(e){r.$Message.success(e.msg),r.levelLists.splice(i,1),r.levelLists.length||(r.levelFrom.page=1==r.levelFrom.page?1:r.levelFrom.page-1),r.getList()})).catch((function(e){r.$Message.error(e.msg)}))},getList:function(){var e=this;this.loading=!0,Object(o.Kb)(this.levelFrom).then(function(){var t,i=(t=n.a.mark((function t(i){var r;return n.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=i.data,e.levelLists=r.data,e.total=r.count,e.loading=!1;case 4:case"end":return t.stop()}}),t)})),function(){var e=this,i=arguments;return new Promise((function(r,n){var a=t.apply(e,i);function o(e){l(a,r,n,o,s,"next",e)}function s(e){l(a,r,n,o,s,"throw",e)}o(void 0)}))});return function(e){return i.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){this.$refs.template.isTemplate=!0,this.$refs.template.editFrom(e)},userSearchs:function(){this.levelFrom.page=1,this.getList()}}},d=i("2877"),m=Object(d.a)(u,(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":"",padding:0}},[i("div",{staticClass:"new_card_pd"},[i("Form",{ref:"levelFrom",attrs:{model:e.levelFrom,inline:"","label-width":e.labelWidth,"label-position":e.labelPosition},nativeOn:{submit:function(e){e.preventDefault()}}},[i("FormItem",{attrs:{label:"搜索:","label-for":"keyword"}},[i("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入模板名称"},model:{value:e.levelFrom.name,callback:function(t){e.$set(e.levelFrom,"name",t)},expression:"levelFrom.name"}}),i("Button",{attrs:{type:"primary"},on:{click:e.userSearchs}},[e._v("查询")])],1)],1)],1)]),i("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[i("Button",{attrs:{type:"primary"},on:{click:e.freight}},[e._v("添加运费模板")]),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[i("viewer",[i("div",{staticClass:"tabBox_img"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.icon,expression:"row.icon"}]})])])]}},{key:"action",fn:function(t){var r=t.row,n=t.index;return[i("a",{on:{click:function(t){return e.edit(r.id)}}},[e._v("修改")]),1!==r.id?i("Divider",{attrs:{type:"vertical"}}):e._e(),1!==r.id?i("a",{on:{click:function(t){return e.del(r,"删除运费模板",n)}}},[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),i("freight-template",{ref:"template"})],1)}),[],!1,null,null,null);t.default=m.exports}}]);