chunk-c393d16a.ad87b898.js 5.9 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-c393d16a"],{"6f69":function(e,t,i){i("f519")},"9a71":function(e,t,i){i.r(t),i("4e82"),i("b0c0");var a=i("c14f"),n=i("1da1"),s=i("5530"),l=(i("a434"),i("2f62")),o=i("90e7");s={name:"user_level",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:"code",minWidth:120},{title:"排序",key:"sort",sortable:!0,minWidth:100},{title:"是否显示",slot:"is_shows",minWidth:120},{title:"操作",slot:"action",fixed:"right",minWidth:120}],levelFrom:{keyword:"",is_show:"",page:1,limit:20},levelLists:[],total:0,FromData:null}},created:function(){this.getList()},computed:Object(s.a)(Object(s.a)({},Object(l.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{del:function(e,t,i){var a=this;t={title:t,num:i,url:"freight/express/".concat(e.id),method:"DELETE",ids:""};this.$modalSure(t).then((function(e){a.$message.success(e.msg),a.levelLists.splice(i,1)})).catch((function(e){a.$message.error(e.msg)}))},onchangeIsShow:function(e){var t=this;e={id:e.id,status:e.is_show};Object(o.t)(e).then((()=>{var e=Object(n.a)(Object(a.a)().m((function e(i){return Object(a.a)().w((function(e){for(;;)switch(e.n){case 0:t.$message.success(i.msg);case 1:return e.a(2)}}),e)})));return function(t){return e.apply(this,arguments)}})()).catch((function(e){t.$message.error(e.msg)}))},getList:function(){var e=this;this.loading=!0,Object(o.s)(this.levelFrom).then((()=>{var t=Object(n.a)(Object(a.a)().m((function t(i){var n;return Object(a.a)().w((function(t){for(;;)switch(t.n){case 0:n=i.data,e.levelLists=n.list,e.total=n.count,e.loading=!1;case 1:return t.a(2)}}),t)})));return function(e){return t.apply(this,arguments)}})()).catch((function(t){e.loading=!1,e.$message.error(t.msg)}))},add:function(){var e=this;this.$modalForm(Object(o.q)()).then((function(){return e.getList()}))},edit:function(e){var t=this;this.$modalForm(Object(o.r)(e.id)).then((function(){return t.getList()}))},userSearchs:function(){this.levelFrom.page=1,this.getList()},syncExpress:function(){var e=this;Object(o.u)().then((()=>{var t=Object(n.a)(Object(a.a)().m((function t(i){return Object(a.a)().w((function(t){for(;;)switch(t.n){case 0:e.$message.success(i.msg),e.getList();case 1:return t.a(2)}}),t)})));return function(e){return t.apply(this,arguments)}})()).catch((function(t){e.$message.error(t.msg)}))}}},i("6f69"),l=i("2877"),i=Object(l.a)(s,(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:"是否显示:"}},[t("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:""},on:{change:e.userSearchs},model:{value:e.levelFrom.is_show,callback:function(t){e.$set(e.levelFrom,"is_show",t)},expression:"levelFrom.is_show"}},[t("el-option",{attrs:{value:"",label:"全部"}}),t("el-option",{attrs:{value:"1",label:"显示"}}),t("el-option",{attrs:{value:"0",label:"不显示"}})],1)],1),t("el-form-item",{attrs:{label:"搜索:","label-for":"keyword"}},[t("el-input",{staticClass:"form_content_width",attrs:{placeholder:"请输入物流公司名称或者编码"},model:{value:e.levelFrom.keyword,callback:function(t){e.$set(e.levelFrom,"keyword",t)},expression:"levelFrom.keyword"}})],1),t("el-form-item",[t("el-button",{directives:[{name:"db-click",rawName:"v-db-click"}],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",{directives:[{name:"db-click",rawName:"v-db-click"}],attrs:{type:"primary"},on:{click:e.syncExpress}},[e._v("同步物流公司")]),t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"table",staticClass:"mt14",attrs:{data:e.levelLists,"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":"100"},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":"100"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",[e._v(e._s(i.row.code))])]}}])}),t("el-table-column",{attrs:{label:"排序","min-width":"100"},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":"100"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-switch",{attrs:{"active-value":1,"inactive-value":0,value:i.row.is_show,size:"large"},on:{change:function(t){return e.onchangeIsShow(i.row)}},model:{value:i.row.is_show,callback:function(t){e.$set(i.row,"is_show",t)},expression:"scope.row.is_show"}})]}}])}),t("el-table-column",{attrs:{label:"操作",fixed:"right",width:"80"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("a",{directives:[{name:"db-click",rawName:"v-db-click"}],on:{click:function(t){return e.edit(i.row)}}},[e._v("编辑")])]}}])})],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)],1)}),[],!1,null,"97c9e868",null);t.default=i.exports},f519:function(e,t,i){}}]);