1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c8618"],{5546:function(e,t,r){"use strict";r.r(t);var a=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",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"借出单号",prop:"lendOrderNumber"}},[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.lendOrderNumber,callback:function(t){e.$set(e.queryParams,"lendOrderNumber",t)},expression:"queryParams.lendOrderNumber"}})],1),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:"returnDate"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择预计归还时间"},model:{value:e.queryParams.returnDate,callback:function(t){e.$set(e.queryParams,"returnDate",t)},expression:"queryParams.returnDate"}})],1),r("el-form-item",{attrs:{label:"实际归还时间",prop:"actualReturnDate"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择实际归还时间"},model:{value:e.queryParams.actualReturnDate,callback:function(t){e.$set(e.queryParams,"actualReturnDate",t)},expression:"queryParams.actualReturnDate"}})],1),r("el-form-item",{attrs:{label:"归还经手人",prop:"bySponsor"}},[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.bySponsor,callback:function(t){e.$set(e.queryParams,"bySponsor",t)},expression:"queryParams.bySponsor"}})],1),r("el-form-item",{attrs:{label:"记录状态",prop:"recordStatus"}},[r("el-select",{attrs:{placeholder:"请选择记录状态",clearable:""},model:{value:e.queryParams.recordStatus,callback:function(t){e.$set(e.queryParams,"recordStatus",t)},expression:"queryParams.recordStatus"}},e._l(e.dict.type.asset_record_status,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],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:["change:return:add"],expression:"['change:return: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:["change:return:edit"],expression:"['change:return: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:["change:return:remove"],expression:"['change:return: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:["change:return:export"],expression:"['change:return: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.returnList},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:"id"}}),r("el-table-column",{attrs:{label:"借出单号",align:"center",prop:"lendOrderNumber"}}),r("el-table-column",{attrs:{label:"资产编号",align:"center",prop:"assetNumber"}}),r("el-table-column",{attrs:{label:"预计归还时间",align:"center",prop:"returnDate",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.parseTime(t.row.returnDate,"{y}-{m}-{d}")))])]}}])}),r("el-table-column",{attrs:{label:"实际归还时间",align:"center",prop:"actualReturnDate",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.parseTime(t.row.actualReturnDate,"{y}-{m}-{d}")))])]}}])}),r("el-table-column",{attrs:{label:"归还经手人",align:"center",prop:"bySponsor"}}),r("el-table-column",{attrs:{label:"备注",align:"center",prop:"remark"}}),r("el-table-column",{attrs:{label:"记录状态",align:"center",prop:"recordStatus"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("dict-tag",{attrs:{options:e.dict.type.asset_record_status,value:t.row.recordStatus}})]}}])}),r("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["change:return:edit"],expression:"['change:return: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:["change:return:remove"],expression:"['change:return: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":"80px"}},[r("el-form-item",{attrs:{label:"借出单号",prop:"lendOrderNumber"}},[r("el-input",{attrs:{placeholder:"请输入借出单号"},model:{value:e.form.lendOrderNumber,callback:function(t){e.$set(e.form,"lendOrderNumber",t)},expression:"form.lendOrderNumber"}})],1),r("el-form-item",{attrs:{label:"资产编号",prop:"assetNumber"}},[r("el-input",{attrs:{placeholder:"请输入资产编号"},model:{value:e.form.assetNumber,callback:function(t){e.$set(e.form,"assetNumber",t)},expression:"form.assetNumber"}})],1),r("el-form-item",{attrs:{label:"预计归还时间",prop:"returnDate"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择预计归还时间"},model:{value:e.form.returnDate,callback:function(t){e.$set(e.form,"returnDate",t)},expression:"form.returnDate"}})],1),r("el-form-item",{attrs:{label:"实际归还时间",prop:"actualReturnDate"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择实际归还时间"},model:{value:e.form.actualReturnDate,callback:function(t){e.$set(e.form,"actualReturnDate",t)},expression:"form.actualReturnDate"}})],1),r("el-form-item",{attrs:{label:"归还经手人",prop:"bySponsor"}},[r("el-input",{attrs:{placeholder:"请输入归还经手人"},model:{value:e.form.bySponsor,callback:function(t){e.$set(e.form,"bySponsor",t)},expression:"form.bySponsor"}})],1),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),r("el-form-item",{attrs:{label:"记录状态",prop:"recordStatus"}},[r("el-select",{attrs:{placeholder:"请选择记录状态"},model:{value:e.form.recordStatus,callback:function(t){e.$set(e.form,"recordStatus",t)},expression:"form.recordStatus"}},e._l(e.dict.type.asset_record_status,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:parseInt(e.value)}})})),1)],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)],1)},n=[],l=r("5530"),s=(r("d81d"),r("b775"));function o(e){return Object(s["a"])({url:"/change/return/list",method:"get",params:e})}function i(e){return Object(s["a"])({url:"/change/return/"+e,method:"get"})}function u(e){return Object(s["a"])({url:"/change/return",method:"post",data:e})}function c(e){return Object(s["a"])({url:"/change/return",method:"put",data:e})}function m(e){return Object(s["a"])({url:"/change/return/"+e,method:"delete"})}var d={name:"Return",dicts:["asset_record_status"],data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,returnList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,lendOrderNumber:null,assetNumber:null,returnDate:null,actualReturnDate:null,bySponsor:null,recordStatus:null},form:{},rules:{lendOrderNumber:[{required:!0,message:"借出单号不能为空",trigger:"blur"}],assetNumber:[{required:!0,message:"资产编号不能为空",trigger:"blur"}],returnDate:[{required:!0,message:"预计归还时间不能为空",trigger:"blur"}],bySponsor:[{required:!0,message:"归还经手人不能为空",trigger:"blur"}],recordStatus:[{required:!0,message:"记录状态不能为空",trigger:"change"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,o(this.queryParams).then((function(t){e.returnList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:null,lendOrderNumber:null,assetNumber:null,returnDate:null,actualReturnDate:null,bySponsor:null,remark:null,recordStatus:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.id})),this.single=1!==e.length,this.multiple=!e.length},handleAdd:function(){this.reset(),this.open=!0,this.title="添加资产归还"},handleUpdate:function(e){var t=this;this.reset();var r=e.id||this.ids;i(r).then((function(e){t.form=e.data,t.open=!0,t.title="修改资产归还"}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.id?c(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):u(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,r=e.id||this.ids;this.$modal.confirm('是否确认删除资产归还编号为"'+r+'"的数据项?').then((function(){return m(r)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("change/return/export",Object(l["a"])({},this.queryParams),"return_".concat((new Date).getTime(),".xlsx"))}}},p=d,h=r("2877"),f=Object(h["a"])(p,a,n,!1,null,null,null);t["default"]=f.exports}}]);
|