1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-374536af","chunk-2d2106ba"],{"009d":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-container"},[n("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"}},[n("el-form-item",{attrs:{label:"资产编号",prop:"assetNumber"}},[n("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),n("el-form-item",{attrs:{label:"调整原因",prop:"reason"}},[n("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.reason,callback:function(t){e.$set(e.queryParams,"reason",t)},expression:"queryParams.reason"}})],1),n("el-form-item",{attrs:{label:"制单人",prop:"preparedBy"}},[n("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.preparedBy,callback:function(t){e.$set(e.queryParams,"preparedBy",t)},expression:"queryParams.preparedBy"}})],1),n("el-form-item",{attrs:{label:"记录状态",prop:"recordStatus"}},[n("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 n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("el-form-item",[n("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),n("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),n("el-row",{staticClass:"mb8",attrs:{gutter:10}},[n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:adjustment:add"],expression:"['asset:adjustment:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:adjustment:edit"],expression:"['asset:adjustment:edit']"}],attrs:{type:"success",plain:"",icon:"el-icon-edit",size:"mini",disabled:e.single},on:{click:e.handleUpdate}},[e._v("修改")])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:adjustment:submit"],expression:"['asset:adjustment:submit']"}],attrs:{type:"info",plain:"",icon:"el-icon-position",size:"mini",disabled:e.single},on:{click:e.submit}},[e._v("提交")])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:adjustment:audit"],expression:"['asset:adjustment:audit']"}],attrs:{type:"success",plain:"",icon:"el-icon-check",size:"mini",disabled:e.single},on:{click:e.audit}},[e._v("审核")])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:adjustment:remove"],expression:"['asset:adjustment:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),n("el-col",{attrs:{span:1.5}},[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:adjustment:export"],expression:"['asset:adjustment:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),n("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),e.arr?n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.adjustmentList},on:{"selection-change":e.handleSelectionChange}},[n("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),n("el-table-column",{attrs:{label:"编号",align:"center",prop:"id"}}),n("el-table-column",{attrs:{label:"资产编号",align:"center",prop:"assetNumber"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(null!=t.row.assetNumber?e.assetName(t.row.assetNumber):""))])]}}],null,!1,4257743282)}),n("el-table-column",{attrs:{label:"资产原信息",align:"center",prop:"originalAssetInfo"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{attrs:{type:"text",icon:"el-icon-search"},on:{click:function(n){return e.test(t.row.originalAssetInfo)}}},[e._v("查看")])]}}],null,!1,3367464657)}),n("el-table-column",{attrs:{label:"调整原因",align:"center",prop:"reason"}}),n("el-table-column",{attrs:{label:"制单人",align:"center",prop:"preparedBy"}}),n("el-table-column",{attrs:{label:"制单部门",align:"center",prop:"preparedDepartment"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.preparedDepartment?n("span",[e._v(e._s(null!=t.row.preparedDepartment?e.deptName(t.row.preparedDepartment):""))]):e._e()]}}],null,!1,1741463609)}),n("el-table-column",{attrs:{label:"记录状态",align:"center",prop:"recordStatus"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("dict-tag",{attrs:{options:e.dict.type.asset_record_status,value:t.row.recordStatus}})]}}],null,!1,1162246163)}),n("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:adjustment:edit"],expression:"['asset:adjustment:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(n){return e.handleUpdate(t.row)}}},[e._v("修改")]),n("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["asset:adjustment:remove"],expression:"['asset:adjustment:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(n){return e.handleDelete(t.row)}}},[e._v("删除")])]}}],null,!1,1163826826)})],1):e._e(),n("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}}),n("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[n("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[n("el-form-item",{attrs:{label:"资产编号",prop:"assetNumber"}},[n("el-select",{attrs:{filterable:"",placeholder:"请选择资产编号"},model:{value:e.form.assetNumber,callback:function(t){e.$set(e.form,"assetNumber",t)},expression:"form.assetNumber"}},e._l(e.informationList,(function(e){return n("el-option",{key:e.number,attrs:{label:e.name,value:e.number}})})),1)],1),n("el-form-item",{attrs:{label:"资产原信息",prop:"originalAssetInfo"}},[n("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.originalAssetInfo,callback:function(t){e.$set(e.form,"originalAssetInfo",t)},expression:"form.originalAssetInfo"}})],1),n("el-form-item",{attrs:{label:"调整原因",prop:"reason"}},[n("el-input",{attrs:{placeholder:"请输入调整原因"},model:{value:e.form.reason,callback:function(t){e.$set(e.form,"reason",t)},expression:"form.reason"}})],1),n("el-form-item",{attrs:{label:"制单人",prop:"preparedBy"}},[n("el-input",{attrs:{placeholder:"请输入制单人"},model:{value:e.form.preparedBy,callback:function(t){e.$set(e.form,"preparedBy",t)},expression:"form.preparedBy"}})],1),n("el-form-item",{attrs:{label:"制单部门",prop:"preparedDepartment"}},[n("treeselect",{attrs:{options:e.deptOptions,normalizer:e.normalizer,placeholder:"选择制单部门"},model:{value:e.form.preparedDepartment,callback:function(t){e.$set(e.form,"preparedDepartment",t)},expression:"form.preparedDepartment"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),n("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},a=[],s=n("5530"),i=(n("4de4"),n("d3b7"),n("b0c0"),n("d81d"),n("b775"));function o(e){return Object(i["a"])({url:"/asset/adjustment/list",method:"get",params:e})}function l(e){return Object(i["a"])({url:"/asset/adjustment/"+e,method:"get"})}function u(e){return Object(i["a"])({url:"/asset/adjustment",method:"post",data:e})}function c(e){return Object(i["a"])({url:"/asset/adjustment/submit",method:"put",data:e})}function d(e){return Object(i["a"])({url:"/asset/adjustment/audit",method:"put",data:e})}function m(e){return Object(i["a"])({url:"/asset/adjustment",method:"put",data:e})}function p(e){return Object(i["a"])({url:"/asset/adjustment/"+e,method:"delete"})}var f=n("fcb7"),h=n("b88f"),b=n("ca17"),g=n.n(b),y=(n("542c"),{name:"Adjustment",dicts:["asset_record_status"],components:{Treeselect:g.a},data:function(){return{loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,deptOptions:[],arr:[],adjustmentList:[],informationList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,assetNumber:null,originalAssetInfo:null,reason:null,orderNumber:null,preparedBy:null,preparedDepartment:null,recordStatus:null},form:{},rules:{originalAssetInfo:[{required:!0,message:"资产原信息",trigger:"blur"}],orderNumber:[{required:!0,message:"调整单号不能为空",trigger:"blur"}],preparedBy:[{required:!0,message:"制单人不能为空",trigger:"blur"}],recordStatus:[{required:!0,message:"记录状态不能为空",trigger:"change"}]},originalAssetInfo:{}}},created:function(){this.getList()},methods:{test:function(e){JSON.parse(e)},getList:function(){var e=this;this.loading=!0,Object(f["d"])().then((function(t){e.deptOptions=e.handleTree(t.data,"deptId"),e.arr=t.data})),Object(h["e"])().then((function(t){e.informationList=t.rows})),o(this.queryParams).then((function(t){e.adjustmentList=t.rows,e.total=t.total,e.loading=!1}))},normalizer:function(e){return e.children&&!e.children.length&&delete e.children,{id:e.deptId,label:e.deptName,children:e.children}},deptName:function(e){var t=parseInt(e),n=this.arr.filter((function(e){return e.deptId===t}));if(n)return n[0].deptName},assetName:function(e){var t=this.informationList.filter((function(t){return t.number===e}));return t[0].name},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:null,assetNumber:null,originalAssetInfo:null,reason:null,orderNumber:null,preparedBy:null,preparedDepartment: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 n=e.id||this.ids;l(n).then((function(e){t.form=e.data,t.open=!0,t.title="修改资产调整"}))},submit:function(e){var t=this;this.reset();var n=e.id||this.ids;l(n).then((function(e){c(e.data).then((function(e){t.$modal.msgSuccess("提交成功"),t.open=!1,t.getList()}))}))},audit:function(e){var t=this;this.reset();var n=e.id||this.ids;l(n).then((function(e){d(e.data).then((function(e){t.$modal.msgSuccess("审核成功"),t.open=!1,t.getList()}))}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.id?m(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,n=e.id||this.ids;this.$modal.confirm('是否确认删除资产调整编号为"'+n+'"的数据项?').then((function(){return p(n)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("asset/adjustment/export",Object(s["a"])({},this.queryParams),"adjustment_".concat((new Date).getTime(),".xlsx"))}}}),v=y,j=n("2877"),w=Object(j["a"])(v,r,a,!1,null,null,null);t["default"]=w.exports},b88f:function(e,t,n){"use strict";n.d(t,"e",(function(){return a})),n.d(t,"h",(function(){return s})),n.d(t,"f",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return l})),n.d(t,"k",(function(){return u})),n.d(t,"b",(function(){return c})),n.d(t,"g",(function(){return d})),n.d(t,"j",(function(){return m})),n.d(t,"c",(function(){return p})),n.d(t,"i",(function(){return f}));var r=n("b775");function a(e){return Object(r["a"])({url:"/asset/information/list",method:"get",params:e})}function s(e){return Object(r["a"])({url:"/asset/information/select",method:"get",params:e})}function i(){return Object(r["a"])({url:"/visitor/asset/list",method:"get"})}function o(e){return Object(r["a"])({url:"/asset/information/"+e,method:"get"})}function l(e){return Object(r["a"])({url:"/asset/information",method:"post",data:e})}function u(e){return Object(r["a"])({url:"/asset/information",method:"put",data:e})}function c(e){return Object(r["a"])({url:"/asset/information/"+e,method:"delete"})}function d(e){return Object(r["a"])({url:"/asset/information/print",method:"post",data:e})}function m(e){return Object(r["a"])({url:"/asset/information/print/single",method:"post",data:e})}function p(){return Object(r["a"])({url:"/asset/information/getDiy",method:"get"})}function f(e){return Object(r["a"])({url:"/asset/information/setDiy",method:"post",data:e})}},fcb7:function(e,t,n){"use strict";n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"f",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n("b775");function a(e){return Object(r["a"])({url:"/system/dept/list",method:"get",params:e})}function s(e){return Object(r["a"])({url:"/system/dept/list/exclude/"+e,method:"get"})}function i(e){return Object(r["a"])({url:"/system/dept/"+e,method:"get"})}function o(e){return Object(r["a"])({url:"/system/dept",method:"post",data:e})}function l(e){return Object(r["a"])({url:"/system/dept",method:"put",data:e})}function u(e){return Object(r["a"])({url:"/system/dept/"+e,method:"delete"})}}}]);
|