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.7 KiB
1 lines
4.7 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-21dfb612"],{"0975":function(t,e,i){"use strict";i("db399")},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){u(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 u(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 c={name:"user_group",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:"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.lb)(0)).then((function(){return t.getList()}))},getList:function(){var t=this;this.loading=!0,Object(r.kb)(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.mb)(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)}))}}},l=(i("0975"),i("2877")),d=Object(l.a)(c,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[e("div",{staticClass:"new_card_pd"},[e("Form",{ref:"unitFrom",attrs:{inline:"",model:t.unitFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},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:"请输入单位名称"},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("Row",{attrs:{type:"flex"}},[e("Col",t._b({},"Col",t.grid,!1),[e("Button",{attrs:{type:"primary"},on:{click:t.add}},[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,"25a14984",null);e.default=d.exports},db399:function(t,e,i){}}]); |