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 line
6.9 KiB
1 line
6.9 KiB
12 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-18fda1e0"],{"223e":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:"divBox"},[n("el-card",{staticClass:"box-card"},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("div",{staticClass:"container"},[n("el-form",{attrs:{inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[n("el-form-item",{staticClass:"mr10",attrs:{label:"打印机名称:"}},[n("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"}},[n("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search",size:"small"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1)],1)],1),t._v(" "),n("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.add}},[t._v("添加打印机")])],1),t._v(" "),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini"}},[n("el-table-column",{attrs:{prop:"printer_id",label:"ID","min-width":"150"}}),t._v(" "),n("el-table-column",{attrs:{prop:"printer_name",label:"打印机名称","min-width":"200"}}),t._v(" "),n("el-table-column",{attrs:{prop:"printer_terminal",label:"终端号","min-width":"200"}}),t._v(" "),n("el-table-column",{attrs:{label:"是否开启","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"开启","inactive-text":"不开启"},nativeOn:{click:function(n){return t.onchangeIsShow(e.row)}},model:{value:e.row.status,callback:function(n){t.$set(e.row,"status",n)},expression:"scope.row.status"}})]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"创建时间","min-width":"150",prop:"create_time"}}),t._v(" "),n("el-table-column",{attrs:{label:"操作","min-width":"80",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.handleEdit(e.row.printer_id)}}},[t._v("编辑")]),t._v(" "),n("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return t.handleDelete(e.row.printer_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),n("div",{staticClass:"block"},[n("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},a=[],i=n("90e7"),o={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:{add:function(){var t=this;this.$modalForm(Object(i["p"])()).then((function(){return t.getList("")}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(i["r"])(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(i["s"])(t.printer_id,{status:t.status}).then((function(t){var n=t.message;e.$message.success(n),e.getList("")})).catch((function(t){var n=t.message;e.$message.error(n)}))},handleEdit:function(t){var e=this;this.$modalForm(Object(i["t"])(t)).then((function(){return e.getList("")}))},handleDelete:function(t,e){var n=this;this.$modalSure("删除打印机").then((function(){Object(i["q"])(t).then((function(t){
|