canyin-project/ybcy/views/channel/index/static/js/chunk-5c23e3a2.ff14ea29.js
2024-11-01 16:07:54 +08:00

1 line
14 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5c23e3a2"],{"2d3a":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"outmain ba_f"},[t._m(0),n("div",[n("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.handleEdit}},[t._v("新增标签")]),n("el-button",{attrs:{size:"medium"},on:{click:t.handleDelete}},[t._v("批量删除")])],1),n("div",{staticClass:"tabledata mar_t20"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"element-loading-text":t.elementLoadingText,stripe:""},on:{"selection-change":t.setSelectRows}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),n("el-table-column",{attrs:{prop:"sort",label:"排序"}}),n("el-table-column",{attrs:{prop:"id",label:"ID"}}),n("el-table-column",{attrs:{prop:"name",label:"标签名称"}}),n("el-table-column",{attrs:{prop:"display",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-switch",{attrs:{"active-value":"1","inactive-value":"2"},on:{change:function(n){return t.changeSwitch(e.row)}},model:{value:e.row.display,callback:function(n){t.$set(e.row,"display",n)},expression:"scope.row.display"}})]}}])}),n("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"flex"},[n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.handleEdit(e.row)}}},[t._v("编辑")]),n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.handleDelete(e.row)}}},[t._v("删除")])],1)]}}])})],1),n("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:t.page.total,"page-size":t.page.pagesize,"current-page":t.page.currentPage},on:{"update:currentPage":function(e){return t.$set(t.page,"currentPage",e)},"update:current-page":function(e){return t.$set(t.page,"currentPage",e)},"current-change":t.handleCurrentChange}}),n("edit",{ref:"edit",on:{fetchData:t.fetchData}})],1)])},a=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"shuju_title mar_b20"},[n("div",{staticClass:"shuju_title_text"},[n("span",[t._v("打印机标签")])])])}],o=(n("d81d"),n("96cf"),n("1da1")),c=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{},[n("el-dialog",{attrs:{title:t.title,visible:t.dialogFormVisible,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible=e},close:t.close}},[n("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[n("el-form-item",{attrs:{label:"排序",prop:"sort"}},[n("el-input",{attrs:{autocomplete:"off",placeholder:"请输入排序"},model:{value:t.form.sort,callback:function(e){t.$set(t.form,"sort","string"===typeof e?e.trim():e)},expression:"form.sort"}})],1),n("el-form-item",{attrs:{label:"标签名称",prop:"name",required:!0}},[n("el-input",{attrs:{autocomplete:"off",placeholder:"请输入标签名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name","string"===typeof e?e.trim():e)},expression:"form.name"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"medium"},on:{click:t.close}},[t._v("取 消")]),n("el-button",{attrs:{size:"medium",type:"primary"},on:{click:t.save}},[t._v("确 定")])],1)],1)],1)},u=[],i=n("5a4a"),s={name:"labelSave",created:function(){},data:function(){return{form:{id:"",name:"",sort:"1"},title:"",dialogFormVisible:!1}},components:{},methods:{showEdit:function(t){t?(this.title="编辑",this.form=Object.assign({},t)):this.title="添加",this.dialogFormVisible=!0},close:function(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1},save:function(){var t=this;this.$refs["form"].validate(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(n){var r,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n){e.next=10;break}return e.next=3,Object(i["S"])(t.form);case 3:r=e.sent,a=r.msg,t.$baseMessage(a,"success"),t.$emit("fetchData"),t.close(),e.next=11;break;case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}}},l=s,d=n("2877"),f=Object(d["a"])(l,c,u,!1,null,null,null),h=f.exports,m={components:{Edit:h},created:function(){this.fetchData()},data:function(){return{list:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1}}},methods:{fetchData:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function e(){var n,r,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.listLoading=!0,e.next=3,Object(i["v"])({page:t.page.currentPage});case 3:n=e.sent,r=n.data,a=n.count,t.list=r,t.page.total=a,setTimeout((function(){t.listLoading=!1}),100);case 9:case"end":return e.stop()}}),e)})))()},setSelectRows:function(t){this.selectRows=t},handleEdit:function(t){t.id?this.$refs["edit"].showEdit(t):this.$refs["edit"].showEdit()},handleDelete:function(t){var e=this;if(t.id)this.$baseConfirm("你确定要删除当前项吗",null,Object(o["a"])(regeneratorRuntime.mark((function n(){var r,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,Object(i["R"])({id:t.id});case 2:r=n.sent,a=r.msg,e.$baseMessage(a,"success"),e.fetchData();case 6:case"end":return n.stop()}}),n)}))));else{if(!(this.selectRows.length>0))return this.$baseMessage("未选中任何行","error"),!1;var n=this.selectRows.map((function(t){return t.id}));this.$baseConfirm("你确定要删除选中项吗",null,Object(o["a"])(regeneratorRuntime.mark((function t(){var r,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["R"])({id:n});case 2:r=t.sent,a=r.msg,e.$baseMessage(a,"success"),e.fetchData();case 6:case"end":return t.stop()}}),t)}))))}},changeSwitch:function(t){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){var r,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,Object(i["n"])({id:t.id,display:t.display});case 2:r=n.sent,a=r.msg,e.$baseMessage(a,"success"),e.fetchData();case 6:case"end":return n.stop()}}),n)})))()},handleCurrentChange:function(t){this.page.currentPage=t,this.fetchData()}}},p=m,g=Object(d["a"])(p,r,a,!1,null,null,null);e["default"]=g.exports},"5a4a":function(t,e,n){"use strict";n.d(e,"B",(function(){return a})),n.d(e,"d",(function(){return o})),n.d(e,"G",(function(){return c})),n.d(e,"z",(function(){return u})),n.d(e,"r",(function(){return i})),n.d(e,"y",(function(){return s})),n.d(e,"W",(function(){return l})),n.d(e,"A",(function(){return d})),n.d(e,"F",(function(){return f})),n.d(e,"D",(function(){return h})),n.d(e,"f",(function(){return m})),n.d(e,"e",(function(){return p})),n.d(e,"g",(function(){return g})),n.d(e,"i",(function(){return b})),n.d(e,"w",(function(){return v})),n.d(e,"ab",(function(){return j})),n.d(e,"o",(function(){return O})),n.d(e,"Z",(function(){return w})),n.d(e,"C",(function(){return y})),n.d(e,"H",(function(){return x})),n.d(e,"q",(function(){return k})),n.d(e,"c",(function(){return _})),n.d(e,"h",(function(){return $})),n.d(e,"b",(function(){return R})),n.d(e,"u",(function(){return D})),n.d(e,"N",(function(){return C})),n.d(e,"m",(function(){return E})),n.d(e,"L",(function(){return S})),n.d(e,"x",(function(){return z})),n.d(e,"db",(function(){return L})),n.d(e,"j",(function(){return P})),n.d(e,"cb",(function(){return F})),n.d(e,"t",(function(){return M})),n.d(e,"J",(function(){return V})),n.d(e,"l",(function(){return T})),n.d(e,"I",(function(){return J})),n.d(e,"v",(function(){return q})),n.d(e,"S",(function(){return I})),n.d(e,"n",(function(){return N})),n.d(e,"R",(function(){return A})),n.d(e,"bb",(function(){return B})),n.d(e,"E",(function(){return G})),n.d(e,"s",(function(){return H})),n.d(e,"X",(function(){return K})),n.d(e,"T",(function(){return Q})),n.d(e,"Y",(function(){return U})),n.d(e,"V",(function(){return W})),n.d(e,"Q",(function(){return X})),n.d(e,"k",(function(){return Y})),n.d(e,"M",(function(){return Z})),n.d(e,"a",(function(){return tt})),n.d(e,"K",(function(){return et})),n.d(e,"U",(function(){return nt})),n.d(e,"P",(function(){return rt})),n.d(e,"p",(function(){return at})),n.d(e,"O",(function(){return ot}));var r=n("b775");function a(t){return Object(r["a"])({url:"channel/good/good-render",method:"get",params:t})}function o(t){return Object(r["a"])({url:"channel/good/attr-show",method:"get",params:t})}function c(t){return Object(r["a"])({url:"channel/good/goods-save",method:"post",data:t})}function u(t){return Object(r["a"])({url:"channel/good/good-detail",method:"get",params:t})}function i(t){return Object(r["a"])({url:"channel/good/get-good-list",method:"get",params:t})}function s(t){return Object(r["a"])({url:"channel/good/good-del",method:"post",data:t})}function l(t){return Object(r["a"])({url:"channel/good/set-good-num",method:"post",data:t})}function d(t){return Object(r["a"])({url:"channel/good/good-down",method:"post",data:t})}function f(t){return Object(r["a"])({url:"channel/good/goods-recovery",method:"post",data:t})}function h(t){return Object(r["a"])({url:"channel/good/good-usave",method:"post",data:t})}function m(t){return Object(r["a"])({url:"channel/category/get-category-list",method:"get",params:t})}function p(t){return Object(r["a"])({url:"channel/category/category-del",method:"post",data:t})}function g(t){return Object(r["a"])({url:"channel/category/category-save",method:"post",data:t})}function b(t){return Object(r["a"])({url:"channel/category/change-switch",method:"post",data:t})}function v(t){return Object(r["a"])({url:"channel/specs/get-specs-list",method:"get",params:t})}function j(t){return Object(r["a"])({url:"channel/specs/specs-save",method:"post",data:t})}function O(t){return Object(r["a"])({url:"channel/specs/change-specs",method:"post",data:t})}function w(t){return Object(r["a"])({url:"channel/specs/specs-del",method:"post",data:t})}function y(t){return Object(r["a"])({url:"channel/good/specs-list",method:"post",data:t})}function x(t){return Object(r["a"])({url:"channel/good/specs-save",method:"post",data:t})}function k(t){return Object(r["a"])({url:"channel/attribute/get-attr-list",method:"get",params:t})}function _(t){return Object(r["a"])({url:"channel/attribute/attr-save",method:"post",data:t})}function $(t){return Object(r["a"])({url:"channel/attribute/change-attr",method:"post",data:t})}function R(t){return Object(r["a"])({url:"channel/attribute/attr-del",method:"post",data:t})}function D(t){return Object(r["a"])({url:"channel/material/get-materia-list",method:"get",params:t})}function C(t){return Object(r["a"])({url:"channel/material/meteria-save",method:"post",data:t})}function E(t){return Object(r["a"])({url:"channel/material/change-materia",method:"post",data:t})}function S(t){return Object(r["a"])({url:"channel/material/materia-del",method:"post",data:t})}function z(t){return Object(r["a"])({url:"channel/unit/get-unit-list",method:"get",params:t})}function L(t){return Object(r["a"])({url:"channel/unit/unit-save",method:"post",data:t})}function P(t){return Object(r["a"])({url:"channel/unit/change-display",method:"post",data:t})}function F(t){return Object(r["a"])({url:"channel/unit/unit-del",method:"post",data:t})}function M(t){return Object(r["a"])({url:"channel/good-label/get-label-list",method:"get",params:t})}function V(t){return Object(r["a"])({url:"channel/good-label/label-save",method:"post",data:t})}function T(t){return Object(r["a"])({url:"channel/good-label/change-label",method:"post",data:t})}function J(t){return Object(r["a"])({url:"channel/good-label/label-del",method:"post",data:t})}function q(t){return Object(r["a"])({url:"channel/print/get-print-list",method:"get",params:t})}function I(t){return Object(r["a"])({url:"channel/print/print-save",method:"post",data:t})}function N(t){return Object(r["a"])({url:"channel/print/change-print",method:"post",data:t})}function A(t){return Object(r["a"])({url:"channel/print/print-del",method:"post",data:t})}function B(t){return Object(r["a"])({url:"channel/good/synchro-goods",method:"post",data:t})}function G(t){return Object(r["a"])({url:"channel/activity/goods-activity-list",method:"get",params:t})}function H(t){return Object(r["a"])({url:"channel/activity/save-goods-activity",method:"get",params:t})}function K(t){return Object(r["a"])({url:"channel/activity/save-goods-activity",method:"post",data:t})}function Q(t){return Object(r["a"])({url:"channel/activity/modify-goods-activity",method:"post",data:t})}function U(t){return Object(r["a"])({url:"channel/category/special-category",method:"get",params:t})}function W(t){return Object(r["a"])({url:"channel/category/save-special",method:"post",data:t})}function X(t){return Object(r["a"])({url:"channel/category/modify-special",method:"post",data:t})}function Y(t){return Object(r["a"])({url:"channel/good/change-goods",method:"post",data:t})}function Z(t){return Object(r["a"])({url:"channel/good/merge-goods",method:"post",data:t})}function tt(t){return Object(r["a"])({url:"channel/good/all-down",method:"post",data:t})}function et(t){return Object(r["a"])({url:"channel/comment/label-list",method:"get",params:t})}function nt(t){return Object(r["a"])({url:"channel/comment/save-label",method:"post",data:t})}function rt(t){return Object(r["a"])({url:"channel/comment/modify-label",method:"post",data:t})}function at(t){return Object(r["a"])({url:"channel/comment/comment-list",method:"get",params:t})}function ot(t){return Object(r["a"])({url:"channel/comment/modify-comment",method:"post",data:t})}}}]);