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
7.9 KiB
1 line
7.9 KiB
|
4 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b3b63f18"],{8499:function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"content_box"},[n("div",{staticClass:"content_box_header"},[n("div",{staticClass:"content_box_header_title"},[t._v(" 归还 ")]),n("div",{staticClass:"content_box_header_back",on:{click:t.back}},[n("img",{attrs:{src:o("c1a8")}}),n("span",{staticClass:"content_box_header_back_text"},[t._v(" 返回 ")])])]),n("div",{staticClass:"content_box_body"},[n("div",{staticClass:"content_box_body_search"},[n("span",[t._v("* 书籍编号")]),n("el-input",{ref:"inputNo",staticClass:"content_box_body_search_no",attrs:{autofocus:"",placeholder:"请扫描条形码"},on:{change:t.returnBook},model:{value:t.form.no,callback:function(e){t.$set(t.form,"no",e)},expression:"form.no"}})],1),n("div",{staticClass:"content_box_body_table"},[n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,height:"47vh"}},[n("el-table-column",{attrs:{type:"index",label:"序号",align:"center",width:"80"}}),n("el-table-column",{attrs:{prop:"name",label:"书名",align:"center"}}),n("el-table-column",{attrs:{prop:"author",label:"作者",align:"center",width:"120"}}),n("el-table-column",{attrs:{prop:"publish_date",label:"出版时间",align:"center",width:"120"}}),n("el-table-column",{attrs:{prop:"publish_house",label:"出版社",align:"center",width:"200"}}),n("el-table-column",{attrs:{prop:"bind_way",label:"装订方式",align:"center",width:"120"}})],1),n("div",{staticClass:"content_box_body_table_footer",on:{click:t.back}},[n("div",{staticClass:"content_box_body_table_footer_btn"},[t._v(" 返回 ")])])],1)]),n("div",{staticClass:"content_box_bottom"}),n("div",{staticClass:"content_box_bottom_right"})])},i=[],r=(o("4de4"),o("b0c0"),o("e9c4"),o("d3b7"),o("0643"),o("2382"),o("88f5")),a={data:function(){return{form:{no:""},tableData:[]}},methods:{returnBook:function(t){var e=this,o=this.tableData.filter((function(e){var o=7==t.length?t:t.substring(0,7);return e.no==o}));if(0!=o.length)return this.$Message.error("已归还,请勿重复操作"),this.$nextTick((function(){this.$refs.inputNo.focus(),this.form.no=""})),!1;Object(r["c"])({no_list:[t]}).then((function(o){e.$Message.success("成功归还"),e.bookDetail(t),e.$nextTick((function(){this.$refs.inputNo.focus(),this.form.no=""}))}))},bookDetail:function(t){var e=this;Object(r["b"])({no:t}).then((function(t){var o,n,i,r,a;t=={}&&0==t.length&&"{}"==JSON.stringify(t)||e.tableData.push({id:t.id,no:t.no,name:null===(o=t.book)||void 0===o?void 0:o.name,author:null===(n=t.book)||void 0===n?void 0:n.author,publish_date:null===(i=t.book)||void 0===i?void 0:i.publish_date,publish_house:null===(r=t.book)||void 0===r?void 0:r.publish_house,bind_way:null===(a=t.book)||void 0===a?void 0:a.bind_way});e.$nextTick((function(){this.$refs.inputNo.focus(),this.form.no=""}))}))},back:function(){if(window.history.length<=1)return this.$router.push({path:"/"}),!1;this.$router.go(-1)}},mounted:function(){},created:function(){this.$nextTick((function(){this.$refs.inputNo.focus(),this.form.no=""}))}},c=a,s=(o("899b"),o("2877")),u=Object(s["a"])(c,n,i,!1,null,null,null);e["default"]=u.exports},"88f5":function(t,e,o){"use strict";o.d(e,"e",(function(){return i})),o.d(e,"b",(function(){return r})),o.d(e,"a",(function(){return a})),o.d(e,"c",(function(){return c})),o.d(e,"d",(function(){return s}));var n=o("d2a2");function i(t){return Object(n["a"])({url:"/api/mobile/other/user-index",method:"get",params:t})}function r(t){return Object(n["a"])({url:"/api/mobile/other/book-detail",method:"get",params:t})}function a(t){return Object(n["a"])({url:"/api/mobile/other/book-borrow",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/api/mobile/other/book-return",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/api/mobile/other/check-book-borrow",method:"post",data:t})}},"899b":function(t,e,o){"use strict";o("8cec")},"8cec":function(t,e,o){},c1a8:function(t,e){t.exports="data:image/png;base64,iVBOR
|