zx/public/mer/js/chunk-b293ab24.ffa60110.js

1 line
5.1 KiB
JavaScript
Raw Normal View History

2024-07-02 15:32:59 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b293ab24"],{"7b74":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:t.tableFrom,size:"small","label-width":"85px",inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"模板名称:",prop:"name"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入模板名称",clearable:""},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"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("搜索")]),t._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("el-card",{staticClass:"mt14"},[a("el-button",{staticClass:"mb20",attrs:{size:"small",type:"primary"},on:{click:t.add}},[t._v("添加运费模板")]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small","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 n=e.row;return[a("span",[t._v(t._s(t._f("typeFilter")(n.type)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"指定包邮","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("span",[t._v(t._s(t._f("statusFilter")(n.appoint)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"指定区域不配送","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("span",[t._v(t._s(t._f("statusFilter")(n.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":"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.is_default?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.setDefault(e.row.shipping_template_id)}}},[t._v("设为默认")]):t._e(),t._v(" "),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:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),a("templatesFrom",{ref:"templateForm",attrs:{tempId:t.id,componentKey:t.componentKey},on:{getList:t.getList}})],1)},i=[],l=a("8a9d"),s=a("54b0"),r={name:"ShippingTemplates",components:{templatesFrom:s["a"]},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},id:0,listLoading:!0,componentKey:0}},mounted:function(){this.getList()},methods:{searchReset:function(){this.$refs.searchForm.resetFields(),this.getList(1)},add:function(){this.$refs.templateForm.dialogVisible=!0,this.$refs.templateForm.resetData()},getList:functi