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
14 KiB
1 line
14 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-78b0346c"],{"0420":function(t,e,n){"use strict";n("b806")},2439:function(t,n,o){"use strict";o.r(n);var i=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_steps"},t._l(t.listSteps,(function(e,o){return n("div",{staticClass:"content_box_body_steps_item ",class:{content_box_body_steps_item_on:e.step==t.step}},[n("span",[t._v(t._s(e.name))]),e.step==t.step?n("span",{staticStyle:{"margin-left":"10px"}},[t._v(">")]):t._e()])})),0),1==t.step?n("div",{staticStyle:{width:"100%"},attrs:{id:"section1"}},[n("div",{staticClass:"content_box_body_select"},t._l(t.listDepts,(function(e,i){return n("div",{key:i,staticClass:"content_box_body_select_box"},[n("div",{staticClass:"content_box_body_select_box_header",staticStyle:{cursor:"pointer"},on:{click:function(n){return t.tabdept(e)}}},[n("div",{staticClass:"content_box_body_select_box_header_left"},[n("img",{attrs:{src:o("e968")}}),n("span",[t._v(t._s(e.name))])]),n("div",{staticClass:"content_box_body_select_box_header_right"},[n("span",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"item.show"}],staticStyle:{"margin-left":"10px","font-size":"18px"}},[t._v(">")]),n("span",{directives:[{name:"show",rawName:"v-show",value:!e.show,expression:"!item.show"}],staticStyle:{"margin-left":"10px","font-size":"18px",transform:"rotate(0deg)"}},[t._v(">")])])]),n("el-collapse-transition",[n("div",{directives:[{name:"show",rawName:"v-show",value:e.show,expression:"item.show"}],staticClass:"content_box_body_select_box_items"},t._l(e.user,(function(e,o){return n("div",{staticClass:"content_box_body_select_box_item",class:{content_box_body_select_box_item_on:1==e.on},on:{click:function(n){return t.toSelectuser(e)}}},[t._v(" "+t._s(e.name)+" ")])})),0)])],1)})),0)]):2==t.step?n("transition",{attrs:{name:"el-fade-in"}},[n("div",{staticStyle:{width:"100%"},attrs:{id:"section2"}},[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.checkBookBorrow},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:"40vh"}},[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"}}),n("el-table-column",{attrs:{prop:"op",label:"操作",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"danger",size:"medium",plain:""},on:{click:function(n){return t.del(e.$index)}}},[t._v("删除")])]}}])})],1),n("div",{staticClass:"content_box_body_table_footer",on:{click:t.toBorrow}},[n("div",{staticClass:"content_box_body_table_footer_btn"},[t._v(" 确定借阅 ")])])],1)])]):3==t.step?n("div",{staticStyle:{width:"100%"},attrs:{id:"section3"}},[n("el-result",{attrs:{icon:"success",title:"借阅成功",subTitle:"请及时归还图书"}},[n("template",{slot:"extra"},[n("div",{staticClass:"content_box_body_table_footer",on:{click:t.back}},[n("div",{staticClass:"content_box_body_table_footer_btn"},[t._v(" 返回 ")])])])],2)],1):t._e()],1),n("div",{staticClass:"content_box_bottom"}),n("div",{staticClass:"content_box_bottom_right"})])},a=[],s=o("b85c"),c=(o("4de4"),o("a434"),o("b0c0"),o("e9c4"),o("d3b7"),o("0643"),o("2382"),o("88f5")),r={data:function(){return{form:{no:""},userId:"",step:1,listDepts:[],tableData:[],listSteps:[{step:1,name:"选择借阅人"},{step:2,name:"添加借阅书籍"},{step:3,name:"借阅成功"}]}},methods:{tabdept:function(t){var e,n=Object(s["a"])(this.listDepts);try{for(n.s();!(e=n.n()).done;){var o=e.value;o.show=!1}}catch(i){n.e(i)}finally{n.f()}t.show=!t.show,this.$forceUpdate()},del:function(t){this.tableData.splice(t,1),this.$nextTick((function(){this.$refs.inputNo.focus(),this.form.no=""}))},checkBookBorrow:function(t){var n=this,o=this.tableData.filter((function(t){var n=7==e.length?e:e.substring(0,7);return t.no==n}));if(0!=o.length)return this.$Message.error("已在待借阅中,请勿重复添加"),this.$nextTick((function(){this.$refs.inputNo.focus(),this.form.no=""})),fals;var i=[];i.push(t),Object(c["d"])({no:i}).then((function(e){n.bookDetail(t)})).catch((function(t){t&&n.$nextTick((function(){this.$refs.inputNo.focus(),this.form.no=""})),console.log(t)}))},toBorrow:function(){var t=this;if(0==this.tableData.length)return this.$Message.error("请扫码需要借阅的图书"),!1;var e,n=[],o=Object(s["a"])(this.tableData);try{for(o.s();!(e=o.n()).done;){var i=e.value;n.push(i.no)}}catch(r){o.e(r)}finally{o.f()}var a=this;Object(c["a"])({user_id:this.userId,no_list:n}).then((function(e){t.$Message.success("借阅完成");var n=t.$loading({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});setTimeout((function(){n.close(),a.step=3}),500)})).catch((function(e){t.$Message.error(e)}))},userIndex:function(){var t=this;Object(c["e"])().then((function(e){var n,o=Object(s["a"])(e);try{for(o.s();!(n=o.n()).done;){var i,a=n.value,c=Object(s["a"])(a.user);try{for(c.s();!(i=c.n()).done;){var r=i.value;r.on=!1}}catch(b){c.e(b)}finally{c.f()}}}catch(b){o.e(b)}finally{o.f()}t.listDepts=e;var l,u=Object(s["a"])(t.listDepts);try{for(u.s();!(l=u.n()).done;){var d=l.value;d.show=!1}}catch(b){u.e(b)}finally{u.f()}}))},bookDetail:function(t){var e=this;Object(c["b"])({no:t}).then((function(t){var n,o,i,a,s;t=={}&&0==t.length&&"{}"==JSON.stringify(t)||e.tableData.push({id:t.id,no:t.no,name:null===(n=t.book)||void 0===n?void 0:n.name,author:null===(o=t.book)||void 0===o?void 0:o.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===(s=t.book)||void 0===s?void 0:s.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)},toSelectuser:function(t){var e=this;if(t){t.on=!0,e.userId=t.id;var n=this.$loading({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});setTimeout((function(){n.close(),e.step=2}),500)}}},mounted:function(){},created:function(){this.userIndex()}},l=r,u=(o("0420"),o("2877")),d=Object(u["a"])(l,i,a,!1,null,null,null);n["default"]=d.exports},"88f5":function(t,e,n){"use strict";n.d(e,"e",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return r}));var o=n("b775");function i(t){return Object(o["a"])({url:"/api/mobile/other/user-index",method:"get",params:t})}function a(t){return Object(o["a"])({url:"/api/mobile/other/book-detail",method:"get",params:t})}function s(t){return Object(o["a"])({url:"/api/mobile/other/book-borrow",method:"post",data:t})}function c(t){return Object(o["a"])({url:"/api/mobile/other/book-return",method:"post",data:t})}function r(t){return Object(o["a"])({url:"/api/mobile/other/check-book-borrow",method:"post",data:t})}},a434:function(t,e,n){"use strict";var o=n("23e7"),i=n("23cb"),a=n("a691"),s=n("50c4"),c=n("7b0b"),r=n("65f0"),l=n("8418"),u=n("1dde"),d=n("ae40"),b=u("splice"),h=d("splice",{ACCESSORS:!0,0:0,1:2}),f=Math.max,m=Math.min,p=9007199254740991,v="Maximum allowed length exceeded";o({target:"Array",proto:!0,forced:!b||!h},{splice:function(t,e){var n,o,u,d,b,h,y=c(this),A=s(y.length),_=i(t,A),g=arguments.length;if(0===g?n=o=0:1===g?(n=0,o=A-_):(n=g-2,o=m(f(a(e),0),A-_)),A+n-o>p)throw TypeError(v);for(u=r(y,o),d=0;d<o;d++)b=_+d,b in y&&l(u,d,y[b]);if(u.length=o,n<o){for(d=_;d<A-o;d++)b=d+o,h=d+n,b in y?y[h]=y[b]:delete y[h];for(d=A;d>A-o+n;d--)delete y[d-1]}else if(n>o)for(d=A-o;d>_;d--)b=d+o-1,h=d+n-1,b in y?y[h]=y[b]:delete y[h];for(d=0;d<n;d++)y[d+_]=arguments[d+2];return y.length=A-o+n,u}})},b806:function(t,e,n){},b85c:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));n("a4d3"),n("e01a"),n("d28b"),n("d3b7"),n("3ca3"),n("ddb0");var o=n("06c5");function i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Object(o["a"])(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,c=!0,r=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return c=t.done,t},e:function(t){r=!0,s=t},f:function(){try{c||null==n["return"]||n["return"]()}finally{if(r)throw s}}}}},c1a8:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAiCAYAAAA3WXuFAAAA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CuUwIhKI1x7iFMKowJkaOHYTv4GagMfZsk3gi9yuRszNjsudjWloQEyjPipcw9fbWsglgddfjKjWDdc8L/0LcAAUuuQV+nime0AAAAASUVORK5CYII="},e9c4:function(t,e,n){var o=n("23e7"),i=n("d066"),a=n("d039"),s=i("JSON","stringify"),c=/[\uD800-\uDFFF]/g,r=/^[\uD800-\uDBFF]$/,l=/^[\uDC00-\uDFFF]$/,u=function(t,e,n){var o=n.charAt(e-1),i=n.charAt(e+1);return r.test(t)&&!l.test(i)||l.test(t)&&!r.test(o)?"\\u"+t.charCodeAt(0).toString(16):t},d=a((function(){return'"\\udf06\\ud834"'!==s("\udf06\ud834")||'"\\udead"'!==s("\udead")}));s&&o({target:"JSON",stat:!0,forced:d},{stringify:function(t,e,n){var o=s.apply(null,arguments);return"string"==typeof o?o.replace(c,u):o}})}}]); |