canyin-project/ybcy/views/channel/index/static/js/chunk-c41393d2.d94a9308.js

1 line
8.1 KiB
JavaScript
Raw Normal View History

2024-11-01 16:07:54 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c41393d2"],{6823:function(e,t,a){"use strict";var r=a("fb7b"),s=a.n(r);s.a},"71ad2":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"outmain ba_f"},[a("div",{staticClass:"ba_f"},[a("el-tabs",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"存酒记录",name:"storestorage"}}),a("el-tab-pane",{attrs:{label:"取酒记录",name:"storestoragerecord"}}),a("el-tab-pane",{attrs:{label:"酒品名称",name:"storestoragebrand"}}),a("el-tab-pane",{attrs:{label:"存酒设置",name:"storestorageset"}})],1)],1),e._m(0),a("div",[a("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.handleEdit}},[e._v("新增酒品名称")]),a("el-button",{attrs:{size:"medium"},on:{click:e.handleDelete}},[e._v("批量删除")])],1),a("div",{staticClass:"tabledata mar_t20"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:e.list,"element-loading-text":e.elementLoadingText,stripe:"","row-key":"id"},on:{"selection-change":e.setSelectRows}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{prop:"sort",label:"排序"}}),a("el-table-column",{attrs:{prop:"id",label:"ID"}}),a("el-table-column",{attrs:{prop:"name",label:"酒品名称"}}),a("el-table-column",{attrs:{prop:"body",label:"说明"}}),a("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{attrs:{"active-value":"1","inactive-value":"2"},on:{change:function(a){return e.changeSwitch(t.row)}},model:{value:t.row.display,callback:function(a){e.$set(t.row,"display",a)},expression:"scope.row.display"}})]}}])}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleEdit(t.row)}}},[e._v("编辑")]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("删除")])],1)]}}])})],1),a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.page.total,"page-size":e.page.pagesize,"current-page":e.page.currentPage},on:{"update:currentPage":function(t){return e.$set(e.page,"currentPage",t)},"update:current-page":function(t){return e.$set(e.page,"currentPage",t)},"current-change":e.handleCurrentChange}}),a("edit",{ref:"edit",on:{fetchData:e.fetchData}})],1)])},s=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"shuju_title mar_b20 mar_t20"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("酒品名称")])])])}],n=(a("d81d"),a("96cf"),a("1da1")),o=a("5530"),i=a("b4e3"),l=a("7cb7"),c=a("2f62"),u={components:{Edit:i["a"]},created:function(){this.fetchData()},computed:Object(o["a"])({},Object(c["d"])(["storeId"])),data:function(){return{activeName:"storestoragebrand",list:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1}}},methods:{handleClick:function(){"storestorage"==this.activeName?this.$router.push({path:"storestorage"}):"storestoragerecord"==this.activeName?this.$router.push({path:"storestoragerecord"}):"storestoragebrand"==this.activeName?this.$router.push({path:"storestoragebrand"}):"storestorageset"==this.activeName&&this.$router.push({path:"storestorageset"})},fetchData:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(l["g"])({page:e.page.currentPage,storeId:e.storeId});case 2:a=t.sent,r=a.data,s=a.count,e.list=r,e.page.total=s,e.listLoading=!1;case 8:case"end":return t.stop()}}),t)})))()},setSelectRows:function(e){this.selectRows=e},handleEdit:function(e){this.$refs["edit"].setStoreId(this.storeId),e.i