shop_mer_admin/mer/js/chunk-69f52be0.a7d01000.js

1 line
4.4 KiB
JavaScript
Raw Normal View History

2024-03-16 17:53:53 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-69f52be0"],{"223e":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:t.tableFrom,inline:"",size:"small","label-width":"95px"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"打印机名称:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入打印机名称",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("搜索")]),t._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("el-card",{staticClass:"mt14"},[a("el-button",{staticClass:"mb20",attrs:{size:"small",type:"primary"},on:{click:t.add}},[t._v("添加打印机")]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{prop:"printer_id",label:"ID","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"printer_name",label:"打印机名称","min-width":"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"printer_terminal",label:"终端号","min-width":"200"}}),t._v(" "),a("el-table-column",{attrs:{label:"是否开启","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,width:60,"active-text":"开启","inactive-text":"不开启"},nativeOn:{click:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"创建时间","min-width":"150",prop:"create_time"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"80",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleEdit(e.row.printer_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.printer_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},i=[],s=a("90e7"),l={name:"ProductGuarantee",components:{},data:function(){return{tableData:{data:[],total:0},listLoading:!0,tableFrom:{page:1,limit:20,date:"",keyword:""},timeVal:[],props:{}}},mounted:function(){this.getList(1)},methods:{searchReset:function(){this.$refs.searchForm.resetFields(),this.getList(1)},add:function(){var t=this;this.$modalForm(Object(s["A"])()).then((function(){return t.getList("")}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(s["C"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")},onchangeIsShow:function(t){var e=this;Object(s["D"])(t.printer_id,{status:t.status}).then((function(t){var a=t.message;e.$message.success(a),e.getList("")})).catch((function(t){var a=t.message;e.$message.error(a)}))},handleEdit:function(t){var e=this;this.$modalForm(Object(s["E"])(t)).then((function(){return e.getLis