(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-24e55e5c","chunk-2d2106ba"],{1:function(e,t){},a596:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",staticClass:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"110px"}},[r("el-form-item",{attrs:{label:"资产编码",prop:"assetNumber"}},[r("el-input",{attrs:{placeholder:"请输入资产编码",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.assetNumber,callback:function(t){e.$set(e.queryParams,"assetNumber",t)},expression:"queryParams.assetNumber"}})],1),r("el-form-item",{attrs:{label:"资产名称",prop:"assetName"}},[r("el-input",{attrs:{placeholder:"请输入资产名称",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.assetName,callback:function(t){e.$set(e.queryParams,"assetName",t)},expression:"queryParams.assetName"}})],1),r("el-form-item",{attrs:{label:"借出人",prop:"userName"}},[r("el-input",{attrs:{placeholder:"请输入借出人用户名",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.userName,callback:function(t){e.$set(e.queryParams,"userName",t)},expression:"queryParams.userName"}})],1),r("el-form-item",{attrs:{label:"借出时间",prop:"borrowTime"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择借出时间"},model:{value:e.queryParams.borrowTime,callback:function(t){e.$set(e.queryParams,"borrowTime",t)},expression:"queryParams.borrowTime"}})],1),r("el-form-item",{attrs:{label:"借出位置",prop:"borrowLocationNumber"}},[r("treeselect",{attrs:{options:e.locationList,normalizer:e.tenantIdnormalizer,placeholder:"请选择借出位置"},model:{value:e.queryParams.borrowLocationNumber,callback:function(t){e.$set(e.queryParams,"borrowLocationNumber",t)},expression:"queryParams.borrowLocationNumber"}})],1),r("el-form-item",{attrs:{label:"预计归还时间",prop:"expectedReturnTime"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择预计归还时间"},model:{value:e.queryParams.expectedReturnTime,callback:function(t){e.$set(e.queryParams,"expectedReturnTime",t)},expression:"queryParams.expectedReturnTime"}})],1),r("el-form-item",{attrs:{label:"是否归还",prop:"isReturn"}},[r("el-select",{attrs:{placeholder:"请选择是否归还",clearable:""},model:{value:e.queryParams.isReturn,callback:function(t){e.$set(e.queryParams,"isReturn",t)},expression:"queryParams.isReturn"}},e._l(e.dict.type.my_yes_no,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),r("el-form-item",{attrs:{label:"归还时间",prop:"returnTime"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择归还时间"},model:{value:e.queryParams.returnTime,callback:function(t){e.$set(e.queryParams,"returnTime",t)},expression:"queryParams.returnTime"}})],1),r("el-form-item",{attrs:{label:"归还位置",prop:"returnLocationNumber"}},[r("treeselect",{attrs:{options:e.locationList,normalizer:e.tenantIdnormalizer,placeholder:"请选择归还位置"},model:{value:e.queryParams.returnLocationNumber,callback:function(t){e.$set(e.queryParams,"returnLocationNumber",t)},expression:"queryParams.returnLocationNumber"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),r("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),r("el-row",{staticClass:"mb8",attrs:{gutter:10}},[r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:borrow:add"],expression:"['asset:borrow:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:borrow:edit"],expression:"['asset:borrow:edit']"}],attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:borrow:remove"],expression:"['asset:borrow:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:borrow:export"],expression:"['asset:borrow:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),r("right-toolbar",{attrs:{showSearch:e.showSearch},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.borrowList},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),r("el-table-column",{attrs:{label:"资产编码",align:"center",prop:"assetNumber"}}),r("el-table-column",{attrs:{label:"资产名称",width:"200",align:"center",prop:"assetName"}}),r("el-table-column",{attrs:{label:"借出人",align:"center",prop:"userName"}}),r("el-table-column",{attrs:{label:"借出时间",align:"center",prop:"borrowTime",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.parseTime(t.row.borrowTime,"{y}-{m}-{d}")))])]}}])}),r("el-table-column",{attrs:{label:"借出位置",width:"200",align:"center",prop:"borrowLocationName"}}),r("el-table-column",{attrs:{label:"预计归还时间",align:"center",prop:"expectedReturnTime",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.parseTime(t.row.expectedReturnTime,"{y}-{m}-{d}")))])]}}])}),r("el-table-column",{attrs:{label:"是否归还",align:"center",prop:"isReturn"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-switch",{attrs:{"active-value":1,"active-color":"#13ce66","inactive-value":0},on:{change:function(r){return e.onReturn(r,t.row)}},model:{value:t.row.isReturn,callback:function(r){e.$set(t.row,"isReturn",r)},expression:"scope.row.isReturn"}})]}}])}),r("el-table-column",{attrs:{label:"归还时间",align:"center",prop:"returnTime",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.parseTime(t.row.returnTime,"{y}-{m}-{d}")))])]}}])}),r("el-table-column",{attrs:{label:"归还位置",width:"200",align:"center",prop:"returnLocationName"}}),r("el-table-column",{attrs:{label:"备注",align:"center",prop:"remark"}}),r("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:borrow:edit"],expression:"['asset:borrow:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(r){return e.handleUpdate(t.row)}}},[e._v("修改")]),r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:borrow:remove"],expression:"['asset:borrow:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(r){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),r("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.queryParams.pageNum,limit:e.queryParams.pageSize},on:{"update:page":function(t){return e.$set(e.queryParams,"pageNum",t)},"update:limit":function(t){return e.$set(e.queryParams,"pageSize",t)},pagination:e.getList}}),r("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"110px"}},[r("el-form-item",{attrs:{label:"借出资产编码",prop:"assetNumber"}},[r("el-select",{attrs:{disabled:e.isUpdate,filterable:"",placeholder:"请选择借出资产编码"},model:{value:e.form.assetNumber,callback:function(t){e.$set(e.form,"assetNumber",t)},expression:"form.assetNumber"}},e._l(e.assetSelect,(function(t){return r("el-option",{key:t.id,attrs:{label:t.number,value:t.number}},[r("span",{staticStyle:{float:"left"}},[e._v(e._s(t.number))]),r("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(t.name))])])})),1)],1),r("el-form-item",{attrs:{label:"借出人用户名",prop:"userName"}},[r("el-input",{attrs:{placeholder:"请输入借出人用户名"},on:{change:e.onCheckUserName},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}},[r("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(t){e.openUserSearch=!0}},slot:"append"})],1)],1),e.isUpdate?r("el-form-item",{attrs:{label:"借出位置",prop:"borrowLocationNumber"}},[r("treeselect",{attrs:{options:e.locationList,normalizer:e.tenantIdnormalizer,placeholder:"请输入借出位置"},model:{value:e.form.borrowLocationNumber,callback:function(t){e.$set(e.form,"borrowLocationNumber",t)},expression:"form.borrowLocationNumber"}})],1):e._e(),r("el-form-item",{attrs:{label:"预计归还时间",prop:"expectedReturnTime"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd","picker-options":e.pickerOptions,placeholder:"请选择预计归还时间"},model:{value:e.form.expectedReturnTime,callback:function(t){e.$set(e.form,"expectedReturnTime",t)},expression:"form.expectedReturnTime"}})],1),e.isUpdate?r("el-form-item",{attrs:{label:"是否归还",prop:"isReturn"}},[r("el-switch",{attrs:{"active-text":"是","active-value":1,"active-color":"#13ce66","inactive-text":"否","inactive-value":0},model:{value:e.form.isReturn,callback:function(t){e.$set(e.form,"isReturn",t)},expression:"form.isReturn"}})],1):e._e(),e.isUpdate&&1===e.form.isReturn?r("el-form-item",{attrs:{label:"归还时间",prop:"returnTime"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择归还时间"},model:{value:e.form.returnTime,callback:function(t){e.$set(e.form,"returnTime",t)},expression:"form.returnTime"}})],1):e._e(),e.isUpdate&&1===e.form.isReturn?r("el-form-item",{attrs:{label:"归还位置",prop:"returnLocationNumber"}},[r("treeselect",{attrs:{options:e.locationList,normalizer:e.tenantIdnormalizer,placeholder:"请输入归还位置"},model:{value:e.form.returnLocationNumber,callback:function(t){e.$set(e.form,"returnLocationNumber",t)},expression:"form.returnLocationNumber"}}),r("el-button",{attrs:{type:"text"},on:{click:e.onUseBorrowLocation}},[e._v("归还原位")])],1):e._e(),r("el-form-item",{attrs:{label:"备注",prop:"remark"}},[r("el-input",{attrs:{placeholder:"请输入备注"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),r("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1),r("el-dialog",{attrs:{visible:e.openUserSearch},on:{"update:visible":function(t){e.openUserSearch=t}}},[e.openUserSearch?r("UserSearch",{on:{submit:e.onSelectUser,cancel:function(){e.openUserSearch=!1}}}):e._e()],1)],1)},a=[],o=r("5530"),s=(r("d81d"),r("b775"));function i(e){return Object(s["a"])({url:"/asset/borrow/list",method:"get",params:e})}function l(e){return Object(s["a"])({url:"/asset/borrow/"+e,method:"get"})}function u(e){return Object(s["a"])({url:"/asset/borrow",method:"post",data:e})}function c(e){return Object(s["a"])({url:"/asset/borrow",method:"put",data:e})}function m(e){return Object(s["a"])({url:"/asset/borrow/"+e,method:"delete"})}var d=r("b88f"),p=r("c0c7"),f=r("ffc9"),b=r("b9ab"),h=r("ca17"),y=r.n(h),g=(r("542c"),{name:"Borrow",dicts:["my_yes_no"],components:{Treeselect:y.a,UserSearch:b["a"]},data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,borrowList:[],locationList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,assetNumber:null,assetName:null,userName:null,borrowTime:null,borrowLocationNumber:null,expectedReturnTime:null,isReturn:null,returnTime:null,returnLocationNumber:null},form:{},isUpdate:!1,openUserSearch:!1,pickerOptions:{disabledDate:function(e){return e.getTime()