1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b6caf"],{"1f59":function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("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":"68px"}},[a("el-form-item",{attrs:{label:"调拨单号",prop:"allocationOrderNumber"}},[a("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.allocationOrderNumber,callback:function(t){e.$set(e.queryParams,"allocationOrderNumber",t)},expression:"queryParams.allocationOrderNumber"}})],1),a("el-form-item",{attrs:{label:"资产编号",prop:"assetNumber"}},[a("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),a("el-form-item",{attrs:{label:"旧管理人",prop:"oldResponsiblePerson"}},[a("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.oldResponsiblePerson,callback:function(t){e.$set(e.queryParams,"oldResponsiblePerson",t)},expression:"queryParams.oldResponsiblePerson"}})],1),a("el-form-item",{attrs:{label:"旧功能位置编号",prop:"oldLocationNumber"}},[a("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.oldLocationNumber,callback:function(t){e.$set(e.queryParams,"oldLocationNumber",t)},expression:"queryParams.oldLocationNumber"}})],1),a("el-form-item",{attrs:{label:"新管理人",prop:"newResponsiblePerson"}},[a("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.newResponsiblePerson,callback:function(t){e.$set(e.queryParams,"newResponsiblePerson",t)},expression:"queryParams.newResponsiblePerson"}})],1),a("el-form-item",{attrs:{label:"新功能位置编号",prop:"newLocationNumber"}},[a("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.newLocationNumber,callback:function(t){e.$set(e.queryParams,"newLocationNumber",t)},expression:"queryParams.newLocationNumber"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),a("el-row",{staticClass:"mb8",attrs:{gutter:10}},[a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["change:allocationDetail:add"],expression:"['change:allocationDetail:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["change:allocationDetail:edit"],expression:"['change:allocationDetail:edit']"}],attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["change:allocationDetail:remove"],expression:"['change:allocationDetail:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["change:allocationDetail:export"],expression:"['change:allocationDetail:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),a("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),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.allocationDetailList},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),a("el-table-column",{attrs:{label:"编号",align:"center",prop:"id"}}),a("el-table-column",{attrs:{label:"调拨单号",align:"center",prop:"allocationOrderNumber"}}),a("el-table-column",{attrs:{label:"资产编号",align:"center",prop:"assetNumber"}}),a("el-table-column",{attrs:{label:"旧管理人",align:"center",prop:"oldResponsiblePerson"}}),a("el-table-column",{attrs:{label:"旧功能位置编号",align:"center",prop:"oldLocationNumber"}}),a("el-table-column",{attrs:{label:"新管理人",align:"center",prop:"newResponsiblePerson"}}),a("el-table-column",{attrs:{label:"新功能位置编号",align:"center",prop:"newLocationNumber"}}),a("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["change:allocationDetail:edit"],expression:"['change:allocationDetail:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(a){return e.handleUpdate(t.row)}}},[e._v("修改")]),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["change:allocationDetail:remove"],expression:"['change:allocationDetail:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(a){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),a("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}}),a("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"调拨单号",prop:"allocationOrderNumber"}},[a("el-input",{attrs:{placeholder:"请输入调拨单号"},model:{value:e.form.allocationOrderNumber,callback:function(t){e.$set(e.form,"allocationOrderNumber",t)},expression:"form.allocationOrderNumber"}})],1),a("el-form-item",{attrs:{label:"资产编号",prop:"assetNumber"}},[a("el-input",{attrs:{placeholder:"请输入资产编号"},model:{value:e.form.assetNumber,callback:function(t){e.$set(e.form,"assetNumber",t)},expression:"form.assetNumber"}})],1),a("el-form-item",{attrs:{label:"旧管理人",prop:"oldResponsiblePerson"}},[a("el-input",{attrs:{placeholder:"请输入旧管理人"},model:{value:e.form.oldResponsiblePerson,callback:function(t){e.$set(e.form,"oldResponsiblePerson",t)},expression:"form.oldResponsiblePerson"}})],1),a("el-form-item",{attrs:{label:"旧功能位置编号",prop:"oldLocationNumber"}},[a("el-input",{attrs:{placeholder:"请输入旧功能位置编号"},model:{value:e.form.oldLocationNumber,callback:function(t){e.$set(e.form,"oldLocationNumber",t)},expression:"form.oldLocationNumber"}})],1),a("el-form-item",{attrs:{label:"新管理人",prop:"newResponsiblePerson"}},[a("el-input",{attrs:{placeholder:"请输入新管理人"},model:{value:e.form.newResponsiblePerson,callback:function(t){e.$set(e.form,"newResponsiblePerson",t)},expression:"form.newResponsiblePerson"}})],1),a("el-form-item",{attrs:{label:"新功能位置编号",prop:"newLocationNumber"}},[a("el-input",{attrs:{placeholder:"请输入新功能位置编号"},model:{value:e.form.newLocationNumber,callback:function(t){e.$set(e.form,"newLocationNumber",t)},expression:"form.newLocationNumber"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),a("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},n=[],o=a("5530"),r=(a("d81d"),a("b775"));function i(e){return Object(r["a"])({url:"/change/allocationDetail/list",method:"get",params:e})}function s(e){return Object(r["a"])({url:"/change/allocationDetail/"+e,method:"get"})}function c(e){return Object(r["a"])({url:"/change/allocationDetail",method:"post",data:e})}function u(e){return Object(r["a"])({url:"/change/allocationDetail",method:"put",data:e})}function m(e){return Object(r["a"])({url:"/change/allocationDetail/"+e,method:"delete"})}var d={name:"AllocationDetail",data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,allocationDetailList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,allocationOrderNumber:null,assetNumber:null,oldResponsiblePerson:null,oldLocationNumber:null,newResponsiblePerson:null,newLocationNumber:null},form:{},rules:{allocationOrderNumber:[{required:!0,message:"调拨单号不能为空",trigger:"blur"}],assetNumber:[{required:!0,message:"资产编号不能为空",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.loading=!0,i(this.queryParams).then((function(t){e.allocationDetailList=t.rows,e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:null,allocationOrderNumber:null,assetNumber:null,oldResponsiblePerson:null,oldLocationNumber:null,newResponsiblePerson:null,newLocationNumber: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 a=e.id||this.ids;s(a).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?u(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):c(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,a=e.id||this.ids;this.$modal.confirm('是否确认删除资产调拨明细编号为"'+a+'"的数据项?').then((function(){return m(a)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("change/allocationDetail/export",Object(o["a"])({},this.queryParams),"allocationDetail_".concat((new Date).getTime(),".xlsx"))}}},p=d,b=a("2877"),h=Object(b["a"])(p,l,n,!1,null,null,null);t["default"]=h.exports}}]);
|