1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22657a"],{e7f8: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("el-container",{attrs:{direction:"vertical"}},[a("el-header",{staticStyle:{"border-bottom":"1px solid #eee"},attrs:{height:"40px"}},[t._v("操作记录")]),a("div",{staticStyle:{margin:"10px 0"}},[a("el-form",{attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"选择柜子"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:t.onChangeCabinet},model:{value:t.cabinetValue,callback:function(e){t.cabinetValue=e},expression:"cabinetValue"}},t._l(t.cabinetOptions,(function(t){return a("el-option",{key:t.id,attrs:{label:t.alias,value:t.id}})})),1)],1),a("el-form-item",{attrs:{label:"选择箱子"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.boxValue,callback:function(e){t.boxValue=e},expression:"boxValue"}},t._l(t.boxOptions,(function(t){return a("el-option",{key:t.box_number,attrs:{label:t.box_number,value:t.box_number}})})),1)],1),a("el-form-item",[a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",disabled:t.disSearch},on:{click:t.onSearch}},[t._v("查询")])],1)],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,border:""}},[a("el-table-column",{attrs:{align:"center",prop:"id",label:"ID"}}),a("el-table-column",{attrs:{align:"center",prop:"alias",label:"柜号"}}),a("el-table-column",{attrs:{align:"center",prop:"box_number",label:"箱号"}}),a("el-table-column",{attrs:{align:"center",prop:"status_text",label:"操作类型"}}),a("el-table-column",{attrs:{align:"center",prop:"datetime",label:"操作日期"}})],1),a("el-row",{staticStyle:{"margin-top":"10px"},attrs:{type:"flex",justify:"end"}},[a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:t.total,"page-size":t.pageSize,"current-page":t.pageNumber},on:{"current-change":t.onPageChange}})],1)],1)},i=[],o=a("365c"),l={data:function(){return{pageSize:10,pageNumber:1,cabinetValue:"",cabinetOptions:[],boxOptions:[],boxValue:"",tableData:[],total:0}},created:function(){this.getCabinetList()},computed:{disSearch:function(){return""!=this.boxValue&&""==this.cabinetValue}},methods:{onChangeCabinet:function(t){t&&this.getBoxList(),console.log(t)},getCabinetList:function(){var t=this;Object(o["f"])().then((function(e){console.log(e),e&&"ok"==e.msg&&(t.cabinetOptions=e.data.rows)}))},getBoxList:function(){var t=this;Object(o["e"])({cabinet_number:this.cabinetValue}).then((function(e){e&&"ok"==e.msg&&(t.boxOptions=e.data.rows)}))},getBoxActionList:function(){var t=this,e=this.boxValue?this.boxValue:0;Object(o["d"])({cabinet_number:this.cabinetValue,box_number:e,pageSize:this.pageSize,pageNumber:this.pageNumber}).then((function(e){console.log(e),e&&"ok"==e.msg&&(t.total=e.data.total,t.tableData=e.data.rows)}))},onPageChange:function(t){var e=this;t!=this.pageNumber&&(this.pageNumber=t,setTimeout((function(){e.getBoxActionList()}),0))},onSearch:function(){var t=this;this.pageNumber=1,setTimeout((function(){t.getBoxActionList()}),0)}}},r=l,s=a("2877"),c=Object(s["a"])(r,n,i,!1,null,"2e6b8204",null);e["default"]=c.exports}}]);
|