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.8 KiB

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