(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-738d3a4e"],{"31f7":function(t,e,i){},"98b0":function(t,e,i){"use strict";i("31f7")},d303:function(t,e,i){"use strict";i.r(e);var n=i("2f62"),r=i("c4c8");function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){c(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function c(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var l={name:"user_group",data:function(){return{loading:!1,columns1:[{title:"ID",key:"id",width:80},{title:"单位名称",key:"name",minWidth:100},{title:"排序",key:"sort",minWidth:100},{title:"操作",slot:"action",minWidth:120}],unitFrom:{page:1,limit:15,name:""},list:[],total:0}},computed:s(s({},Object(n.e)("admin/layout",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getList()},methods:{unitSearchs:function(){this.unitFrom.page=1,this.list=[],this.getList()},add:function(){var t=this;this.$modalForm(Object(r.Ab)(0)).then((function(){return t.getList()}))},getList:function(){var t=this;this.loading=!0,Object(r.zb)(this.unitFrom).then((function(e){var i=e.data;t.list=i.list,t.total=i.count,t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.unitFrom.page=t,this.getList()},edit:function(t){var e=this;this.$modalForm(Object(r.Bb)(t)).then((function(){return e.getList()}))},del:function(t,e,i){var n=this,r={title:e,num:i,url:"product/unit/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(r).then((function(t){n.$Message.success(t.msg),n.list.splice(i,1),n.list.length||(n.unitFrom.page=1==n.unitFrom.page?1:n.unitFrom.page-1),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))}}},u=(i("98b0"),i("2877")),d=Object(u.a)(l,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{attrs:{bordered:!1,"dis-hover":"",padding:0}},[e("div",{staticClass:"new_card_pd"},[e("Form",{ref:"unitFrom",attrs:{inline:"",model:t.unitFrom,"label-width":75,"label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("Row",{attrs:{gutter:24,type:"flex",justify:"end"}},[e("Col",{attrs:{span:"24"}},[e("FormItem",{attrs:{label:"单位搜索："}},[e("Input",{staticClass:"input-add",attrs:{placeholder:"请输入单位名称",clearable:""},model:{value:t.unitFrom.name,callback:function(e){t.$set(t.unitFrom,"name",e)},expression:"unitFrom.name"}}),e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.unitSearchs()}}},[t._v("查询")])],1)],1)],1)],1)],1)]),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"flex-y-center"},[e("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加商品单位")]),e("div",{staticClass:"fs-12 pl-14 flex-y-center"},[e("Icon",{staticStyle:{color:"#f90","font-size":"18px"},attrs:{type:"ios-alert-outline"}}),e("span",{staticClass:"pl-4"},[t._v("支持统一设置商品单位，新增商品时可直接选用，便于商品标准化管理。")])],1)],1),e("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.list,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"icons",fn:function(t){var i=t.row;return t.index,[e("viewer",[e("div",{staticClass:"tabBox_img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:i.icon,expression:"row.icon"}]})])])]}},{key:"action",fn:function(i){var n=i.row,r=i.index;return[e("a",{on:{click:function(e){return t.edit(n.id)}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.del(n,"删除单位",r)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.unitFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"a2611b2e",null);e.default=d.exports}}]);