You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.3 KiB
1 lines
4.3 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1df22872"],{"0bd9":function(t,e,a){},"7b74":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"container"},[a("el-form",{attrs:{size:"small","label-width":"84px"}},[a("el-form-item",{staticClass:"width100",attrs:{label:"模板名称:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入模板名称",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(e)}},model:{value:t.tableFrom.name,callback:function(e){t.$set(t.tableFrom,"name",e)},expression:"tableFrom.name"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search",size:"small"},on:{click:t.getList},slot:"append"})],1)],1)],1)],1),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.add}},[t._v("添加运费模板")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"samll","highlight-current-row":""}},[a("el-table-column",{attrs:{prop:"shipping_template_id",label:"ID","min-width":"60"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"模板名称","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"计费方式","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(t._f("typeFilter")(i.type)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"指定包邮","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(t._f("statusFilter")(i.appoint)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"指定区域不配送","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(t._f("statusFilter")(i.undelivery)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"sort",label:"排序","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.shipping_template_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.shipping_template_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},l=[],n=a("8a9d"),s={name:"ShippingTemplates",filters:{statusFilter:function(t){var e={1:"自定义",2:"开启",0:"关闭"};return e[t]},typeFilter:function(t){var e={0:"按件数",1:"按重量",2:"按体积"};return e[t]}},data:function(){return{dialogVisible:!1,tableFrom:{page:1,limit:20,name:""},tableData:{data:[],total:0},listLoading:!0,componentKey:0}},mounted:function(){this.getList()},methods:{add:function(){var t=this;this.$modalTemplates(0,(function(){t.getList()}))},getList:function(){var t=this;this.listLoading=!0,Object(n["e"])(this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()},onEdit:function(t){var e=this;this.$modalTemplates(t,(function(){e.getList()}),this.componentKey+=1)},handleDelete:function(t,e){var a=this;this.$modalSure().then((function(){Object(n["c"])(t).then((function(t){var i=t.message;a.$message.success(i),a.tableData.data.splice(e,1)})).catch((function(t){var e=t.message;a.$message.error(e)}))}))}}},o=s,r=(a("8ad1"),a("2877")),c=Object(r["a"])(o,i,l,!1,null,"21e688d4",null);e["default"]=c.exports},"8ad1":function(t,e,a){"use strict";a("0bd9")}}]); |