chunk-508fa47d.73aac368.js 4.3 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-508fa47d"],{"37a5":function(t,e,a){},"5b0b":function(t,e,a){"use strict";var n=a("37a5");a.n(n).a},b43f:function(t,e,a){"use strict";a.r(e);var n=a("2f62"),i=a("f8b7");function r(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function s(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var o={name:"index",computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?r(a,!0).forEach((function(e){s(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):r(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(n.e)("admin/layout",["isMobile"])),data:function(){return{columns1:[{title:"ID",key:"id",width:80},{title:"微信名称",key:"nickname",minWidth:120},{title:"头像",slot:"avatar",minWidth:60},{title:"名称",key:"wx_name",minWidth:120},{title:"手机号码",key:"phone",minWidth:120},{title:"是否显示",slot:"status",minWidth:120},{title:"添加时间",key:"add_time",minWidth:120},{title:"操作",slot:"action",fixed:"right",minWidth:150}],data1:[],total:0,tableOptions:{page:1,limit:15},loading:!1}},created:function(){this.getOrderDeliveryList()},methods:{getOrderDeliveryList:function(){var t=this;this.loading=!0,Object(i.b)(this.tableOptions).then((function(e){t.data1=e.data.list,t.total=e.data.count,t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},add:function(){var t=this;this.$modalForm(Object(i.s)()).then((function(){return t.getOrderDeliveryList()}))},edit:function(t){var e=this;this.$modalForm(Object(i.t)(t.id)).then((function(){return e.getOrderDeliveryList()}))},del:function(t,e,a){var n=this,i={title:e,num:a,url:"/order/delivery/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(i).then((function(t){n.$Message.success(t.msg),n.data1.splice(a,1),n.data1.length||(n.tableOptions.page=1==n.tableOptions.page?1:n.tableOptions.page-1),n.getOrderDeliveryList()})).catch((function(t){n.$Message.error(t.msg)}))},onchangeIsShow:function(t){var e=this;Object(i.v)(t).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}))},pageChange:function(t){this.tableOptions.page=t,this.getOrderDeliveryList()}}},c=(a("5b0b"),a("2877")),l=Object(c.a)(o,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Row",{staticClass:"mb20",attrs:{type:"flex"}},[a("Col",{attrs:{span:"24"}},[a("Button",{directives:[{name:"auth",rawName:"v-auth",value:["setting-delivery_service-add"],expression:"['setting-delivery_service-add']"}],staticClass:"mr10",attrs:{type:"primary"},on:{click:t.add}},[t._v("添加配送员")])],1)],1),a("Table",{attrs:{columns:t.columns1,data:t.data1,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatar",fn:function(t){var e=t.row;return[a("viewer",[a("div",{staticClass:"tabBox_img"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.avatar,expression:"row.avatar"}]})])])]}},{key:"status",fn:function(e){var n=e.row;return[a("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"add_time",fn:function(e){var n=e.row;return[a("span",[t._v(" "+t._s(t._f("formatDate")(n.add_time)))])]}},{key:"action",fn:function(e){var n=e.row,i=e.index;return[a("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.del(n,"删除配送员",i)}}},[t._v("删除")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.tableOptions.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"879cb2a8",null);e.default=l.exports}}]);