1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3cf07bfc"],{1:function(e,t){},bd88:function(e,t,r){"use strict";r("ee44")},daa0:function(e,t,r){"use strict";r.r(t);var o=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}},[r("el-row",[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"单据编号",prop:"orderNumber"}},[r("el-input",{attrs:{placeholder:"请输入单据编号",clearable:"",disabled:""},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.orderNumber,callback:function(t){e.$set(e.queryParams,"orderNumber",t)},expression:"queryParams.orderNumber"}})],1)],1)],1),r("el-form-item",{attrs:{label:"资产编号",prop:"assetNumber"}},[[r("el-select",{attrs:{filterable:"",placeholder:"请输入资产编号"},model:{value:e.queryParams.assetNumber,callback:function(t){e.$set(e.queryParams,"assetNumber",t)},expression:"queryParams.assetNumber"}},e._l(e.informationList,(function(t){return r("el-option",{key:t.number,attrs:{label:t.name,value:t.number}},[r("span",{staticStyle:{float:"left"}},[e._v(e._s(t.name))]),r("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(t.number))])])})),1)]],2),2===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【调拨】旧管理人",prop:"allocationOldResponsiblePerson"}},[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.allocationOldResponsiblePerson,callback:function(t){e.$set(e.queryParams,"allocationOldResponsiblePerson",t)},expression:"queryParams.allocationOldResponsiblePerson"}})],1):e._e(),2===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【调拨】旧功能位置",prop:"allocationOldLocationNumber"}},[r("treeselect",{attrs:{options:e.locationList,normalizer:e.tenantIdnormalizer,placeholder:"【调拨】旧功能位置"},model:{value:e.queryParams.allocationOldLocationNumber,callback:function(t){e.$set(e.queryParams,"allocationOldLocationNumber",t)},expression:"queryParams.allocationOldLocationNumber"}})],1):e._e(),2===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【调拨】新管理人",prop:"allocationNewResponsiblePerson"}},[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.allocationNewResponsiblePerson,callback:function(t){e.$set(e.queryParams,"allocationNewResponsiblePerson",t)},expression:"queryParams.allocationNewResponsiblePerson"}})],1):e._e(),2===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【调拨】新功能位置",prop:"allocationNewLocationNumber"}},[r("treeselect",{attrs:{options:e.locationList,normalizer:e.tenantIdnormalizer,placeholder:"【调拨】新功能位置"},model:{value:e.queryParams.allocationNewLocationNumber,callback:function(t){e.$set(e.queryParams,"allocationNewLocationNumber",t)},expression:"queryParams.allocationNewLocationNumber"}})],1):e._e(),3===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【借出】预计归还时间",prop:"lendReturnDate"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择【借出】预计归还时间"},model:{value:e.queryParams.lendReturnDate,callback:function(t){e.$set(e.queryParams,"lendReturnDate",t)},expression:"queryParams.lendReturnDate"}})],1):e._e(),3===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【借出】实际归还时间",prop:"lendActualReturnDate"}},[r("el-date-picker",{attrs:{clearable:"",type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择【借出】实际归还时间"},model:{value:e.queryParams.lendActualReturnDate,callback:function(t){e.$set(e.queryParams,"lendActualReturnDate",t)},expression:"queryParams.lendActualReturnDate"}})],1):e._e(),3===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【借出】归还经手人",prop:"lendBySponsor"}},[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.lendBySponsor,callback:function(t){e.$set(e.queryParams,"lendBySponsor",t)},expression:"queryParams.lendBySponsor"}})],1):e._e(),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}},[null===e.orderInfo.id||e.orderInfo.recordStatus<1?r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["order:detail:add"],expression:"['order:detail:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1):e._e(),null===e.orderInfo.id||e.orderInfo.recordStatus<1?r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["order:detail:edit"],expression:"['order:detail:edit']"}],attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1):e._e(),null===e.orderInfo.id||e.orderInfo.recordStatus<1?r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["order:detail:remove"],expression:"['order:detail:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1):e._e(),r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["order:detail:export"],expression:"['order:detail: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.detailList},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:"assetNumber"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(null!=t.row.assetNumber?e.getAssetName(t.row.assetNumber):""))])]}}])}),2===e.orderInfo.orderType?r("el-table-column",{attrs:{label:"【调拨】旧管理人",align:"center",prop:"allocationOldResponsiblePerson"}}):e._e(),2===e.orderInfo.orderType?r("el-table-column",{attrs:{label:"【调拨】旧功能位置编号",align:"center",prop:"allocationOldLocationNumber"}}):e._e(),2===e.orderInfo.orderType?r("el-table-column",{attrs:{label:"【调拨】新管理人",align:"center",prop:"allocationNewResponsiblePerson"}}):e._e(),2===e.orderInfo.orderType?r("el-table-column",{attrs:{label:"【调拨】新功能位置编号",align:"center",prop:"allocationNewLocationNumber"}}):e._e(),3===e.orderInfo.orderType?r("el-table-column",{attrs:{label:"【借出】预计归还时间",align:"center",prop:"lendReturnDate",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.parseTime(t.row.lendReturnDate,"{y}-{m}-{d}")))])]}}],null,!1,626611616)}):e._e(),3===e.orderInfo.orderType?r("el-table-column",{attrs:{label:"【借出】实际归还时间",align:"center",prop:"lendActualReturnDate",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.parseTime(t.row.lendActualReturnDate,"{y}-{m}-{d}")))])]}}],null,!1,4157025166)}):e._e(),3===e.orderInfo.orderType?r("el-table-column",{attrs:{label:"【借出】归还经手人",align:"center",prop:"lendBySponsor"}}):e._e(),r("el-table-column",{attrs:{label:"备注",align:"center",prop:"remark"}}),r("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[3===e.orderInfo.orderType&&e.orderInfo.recordStatus>1?r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["order:order:edit"],expression:"['order:order:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-position"},on:{click:function(r){return e.onReturn(t.row)}}},[e._v("归还")]):e._e(),r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["order:detail:edit"],expression:"['order:detail:edit']"}],attrs:{disabled:e.orderInfo.recordStatus>0,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:["order:detail:remove"],expression:"['order:detail:remove']"}],attrs:{disabled:e.orderInfo.recordStatus>0,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("div",{staticClass:"btns"},[(1===e.orderInfo.orderType||e.orderInfo.existDetail||e.detailList.length>0)&&0===e.orderInfo.recordStatus?r("el-button",{attrs:{type:"warning"},on:{click:function(t){return e.submitFormByOrder(1)}}},[e._v("提 交")]):e._e(),0===e.orderInfo.recordStatus?r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitFormByOrder(0)}}},[e._v("保 存")]):e._e(),0===e.orderInfo.recordStatus?r("el-button",{on:{click:e.cancelByOrder}},[e._v("取 消")]):e._e()],1),r("el-dialog",{attrs:{title:e.title,visible:e.open,width:"600px","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":"170px"}},[r("el-form-item",{attrs:{label:"单据编号",prop:"orderNumber"}},[r("el-input",{attrs:{placeholder:"请输入单据编号",disabled:""},model:{value:e.form.orderNumber,callback:function(t){e.$set(e.form,"orderNumber",t)},expression:"form.orderNumber"}})],1),r("el-form-item",{attrs:{label:"资产编号",prop:"assetNumber"}},[[r("el-select",{attrs:{filterable:"",placeholder:"请输入资产编号",disabled:e.orderInfo.recordStatus>0},model:{value:e.form.assetNumber,callback:function(t){e.$set(e.form,"assetNumber",t)},expression:"form.assetNumber"}},e._l(e.informationList,(function(t){return r("el-option",{key:t.number,attrs:{label:t.name,value:t.number}},[r("span",{staticStyle:{float:"left"}},[e._v(e._s(t.name))]),r("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[e._v(e._s(t.number))])])})),1)]],2),2===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【调拨】旧管理人",prop:"allocationOldResponsiblePerson"}},[r("el-input",{attrs:{placeholder:"系统自动补充",disabled:""},model:{value:e.form.allocationOldResponsiblePerson,callback:function(t){e.$set(e.form,"allocationOldResponsiblePerson",t)},expression:"form.allocationOldResponsiblePerson"}})],1):e._e(),2===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【调拨】旧功能位置",prop:"allocationOldLocationNumber"}},[r("el-select",{attrs:{placeholder:"系统自动补充",disabled:""},model:{value:e.form.allocationOldLocationNumber,callback:function(t){e.$set(e.form,"allocationOldLocationNumber",t)},expression:"form.allocationOldLocationNumber"}},e._l(e.locationList,(function(e){return r("el-option",{key:e.number,attrs:{label:e.name,value:e.number}})})),1)],1):e._e(),2===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【调拨】新管理人",prop:"allocationNewResponsiblePerson"}},[r("el-input",{attrs:{placeholder:"请输入【调拨】新管理人"},model:{value:e.form.allocationNewResponsiblePerson,callback:function(t){e.$set(e.form,"allocationNewResponsiblePerson",t)},expression:"form.allocationNewResponsiblePerson"}})],1):e._e(),2===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【调拨】新功能位置",prop:"allocationNewLocationNumber"}},[r("treeselect",{attrs:{options:e.locationList,normalizer:e.tenantIdnormalizer,placeholder:"请选择【调拨】新功能位置"},model:{value:e.form.allocationNewLocationNumber,callback:function(t){e.$set(e.form,"allocationNewLocationNumber",t)},expression:"form.allocationNewLocationNumber"}})],1):e._e(),3===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【借出】预计归还时间",prop:"lendReturnDate"}},[r("el-date-picker",{attrs:{clearable:"",disabled:e.orderInfo.recordStatus>0,type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择【借出】预计归还时间"},model:{value:e.form.lendReturnDate,callback:function(t){e.$set(e.form,"lendReturnDate",t)},expression:"form.lendReturnDate"}})],1):e._e(),3===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【借出】实际归还时间",prop:"lendActualReturnDate"}},[r("el-date-picker",{attrs:{clearable:"",disabled:e.orderInfo.recordStatus<2,type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择【借出】实际归还时间"},model:{value:e.form.lendActualReturnDate,callback:function(t){e.$set(e.form,"lendActualReturnDate",t)},expression:"form.lendActualReturnDate"}})],1):e._e(),3===e.orderInfo.orderType?r("el-form-item",{attrs:{label:"【借出】归还经手人",prop:"lendBySponsor"}},[r("el-input",{attrs:{placeholder:"请输入【借出】归还经手人",disabled:e.orderInfo.recordStatus<2},model:{value:e.form.lendBySponsor,callback:function(t){e.$set(e.form,"lendBySponsor",t)},expression:"form.lendBySponsor"}})],1):e._e(),r("el-form-item",{attrs:{label:"备注",prop:"remark"}},[r("el-input",{attrs:{placeholder:"请输入备注",disabled:e.orderInfo.recordStatus>0},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)],1)},a=[],n=r("5530"),l=(r("4de4"),r("d3b7"),r("b0c0"),r("d81d"),r("b775"));function i(e){return Object(l["a"])({url:"/order/detail/list",method:"get",params:e})}function s(e){return Object(l["a"])({url:"/order/detail/"+e,method:"get"})}function u(e){return Object(l["a"])({url:"/order/detail",method:"post",data:e})}function c(e){return Object(l["a"])({url:"/order/detail",method:"put",data:e})}function d(e){return Object(l["a"])({url:"/order/detail/"+e,method:"delete"})}var m=r("dea0"),p=r("ffc9"),f=r("b88f"),b=r("ca17"),y=r.n(b),h=(r("542c"),{name:"Detail",props:{orderInfo:{type:Object,default:function(){return{id:null,orderNumber:null,orderType:null,applicationDate:null,applicationDepartment:null,adjustmentAssetNumber:null,allocationCallOutDepartment:null,allocationCallOutBy:null,allocationCallOutDate:null,allocationCallInDepartment:null,allocationCallInBy:null,allocationCallInDate:null,lendDepartment:null,lendBySponsor:null,lendPassingUnit:null,reason:null,preparedBy:null,preparedDepartment:null,corporation:null,recordStatus:null}}}},components:{Treeselect:y.a},data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,detailList:[],locationList:[],informationList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,orderNumber:this.orderInfo.orderNumber,assetNumber:null,allocationOldResponsiblePerson:null,allocationOldLocationNumber:null,allocationNewResponsiblePerson:null,allocationNewLocationNumber:null,lendReturnDate:null,lendActualReturnDate:null,lendBySponsor:null},form:{},rules:{assetNumber:[{required:!0,message:"资产编号不能为空",trigger:"blur"}]}}},created:function(){this.getLocation(),this.getList()},methods:{getList:function(){var e=this;this.loading=!0,Object(f["f"])().then((function(t){e.informationList=t.data})),i(this.queryParams).then((function(t){e.detailList=t.rows,e.total=t.total,e.loading=!1}))},tenantIdnormalizer:function(e){return{id:e.number,label:e.label,children:e.children}},getLocation:function(){var e=this;Object(p["f"])().then((function(t){e.locationList=t.data}))},getAssetName:function(e){var t=this.informationList.filter((function(t){return t.number===e}));return 0===t.length?"":t[0].name},cancel:function(){this.open=!1,this.reset()},cancelByOrder:function(){this.$emit("cancelByOrder",1)},reset:function(){this.form={id:null,orderNumber:this.orderInfo.orderNumber,assetNumber:null,allocationOldResponsiblePerson:null,allocationOldLocationNumber:null,allocationNewResponsiblePerson:null,allocationNewLocationNumber:null,lendReturnDate:null,lendActualReturnDate:null,lendBySponsor:null,remark: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.form.orderNumber=this.orderInfo.orderNumber,this.open=!0,this.title="添加单据明细"},handleUpdate:function(e){var t=this;this.reset();var r=e.id||this.ids;s(r).then((function(e){t.form=e.data,t.open=!0,t.title="修改单据明细"}))},onReturn:function(e){var t=this;this.reset();var r=e.id||this.ids;s(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()})))}))},submitFormByOrder:function(e){var t=this,r=this.orderInfo;r.recordStatus=e,Object(m["g"])(r).then((function(r){0===e?t.$modal.msgSuccess("保存成功"):t.$modal.msgSuccess("提交成功"),t.cancelByOrder()}))},handleDelete:function(e){var t=this,r=e.id||this.ids;this.$modal.confirm('是否确认删除单据明细编号为"'+r+'"的数据项?').then((function(){return d(r)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("order/detail/export",Object(n["a"])({},this.queryParams),"detail_".concat((new Date).getTime(),".xlsx"))}}}),v=h,N=(r("bd88"),r("2877")),g=Object(N["a"])(v,o,a,!1,null,"72567fe6",null);t["default"]=g.exports},ee44:function(e,t,r){},ffc9:function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"e",(function(){return n})),r.d(t,"f",(function(){return l})),r.d(t,"a",(function(){return i})),r.d(t,"g",(function(){return s})),r.d(t,"b",(function(){return u})),r.d(t,"d",(function(){return c}));r("99af");var o=r("b775");r("4328");function a(e){return Object(o["a"])({url:"/asset/location/"+e,method:"get"})}function n(e){return Object(o["a"])({url:"/asset/location/tree",method:"post",data:e})}function l(e){return Object(o["a"])({url:"/asset/location/treeSelect",method:"get",data:{params:{id:e}}})}function i(e){return Object(o["a"])({url:"/asset/location",method:"post",data:e})}function s(e){return Object(o["a"])({url:"/asset/location",method:"put",data:e})}function u(e){return Object(o["a"])({url:"/asset/location/"+e,method:"delete"})}function c(e,t){return"/asset/location/code/".concat(e,"?v=").concat(t)}}}]);
|