1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-72afce34"],{"2dfc":function(e,t,n){"use strict";n.d(t,"e",(function(){return a})),n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return u}));var r=n("b775");function a(e){return Object(r["a"])({url:"/inventory/detail/list",method:"get",params:e})}function l(e){return Object(r["a"])({url:"/inventory/detail/"+e,method:"get"})}function i(e){return Object(r["a"])({url:"/inventory/detail",method:"post",data:e})}function o(e){return Object(r["a"])({url:"/inventory/detail",method:"put",data:e})}function s(e){return Object(r["a"])({url:"/inventory/detail/"+e,method:"delete"})}function u(e){return Object(r["a"])({url:"/inventory/inventory/getDepAssetLossTb",method:"get",params:e})}},c346: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":"98px"}},[n("el-form-item",{attrs:{label:"单据编号",prop:"orderNumber"}},[n("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),n("el-form-item",{attrs:{label:"盘点状态",prop:"inventoryStatus"}},[n("el-select",{attrs:{placeholder:"请选择盘点状态",clearable:""},model:{value:e.queryParams.inventoryStatus,callback:function(t){e.$set(e.queryParams,"inventoryStatus",t)},expression:"queryParams.inventoryStatus"}},e._l(e.dict.type.inventory_detail_is_update_data,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),n("el-form-item",{attrs:{label:"盘点结果 ",prop:"inventoryResult"}},[n("el-select",{attrs:{placeholder:"请选择盘点结果",clearable:""},model:{value:e.queryParams.inventoryResult,callback:function(t){e.$set(e.queryParams,"inventoryResult",t)},expression:"queryParams.inventoryResult"}},e._l(e.dict.type.inventory_detail_inventory_result,(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:["inventory:detail:export"],expression:"['inventory:detail: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,columns:e.columns},on:{"update:showSearch":function(t){e.showSearch=t},"update:show-search":function(t){e.showSearch=t},queryTable:e.getList}})],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.detailList},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:"assetInfo.name"}}),n("el-table-column",{attrs:{label:"资产位置",align:"center",prop:"assetInfo.locationName",width:"140"}}),e.columns[0].visible?n("el-table-column",{attrs:{label:"资产编号",align:"center",prop:"assetInfo.number"}}):e._e(),e.columns[1].visible?n("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"createTime"}}):e._e(),e.columns[2].visible?n("el-table-column",{attrs:{label:"盘点元数据",align:"center",prop:"inventoryMetadata"},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.onSelectOriginalAssetInfo(t.row.inventoryMetadata)}}},[e._v("查看")])]}}],null,!1,1836379977)}):e._e(),n("el-table-column",{attrs:{label:"盘点状态",align:"center",prop:"inventoryStatus"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("dict-tag",{attrs:{options:e.dict.type.inventory_detail_is_update_data,value:t.row.inventoryStatus}})]}}])}),n("el-table-column",{attrs:{label:"账面数量",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s(t.row.assetInfo.quantity))])]}}])}),n("el-table-column",{attrs:{label:"实点数量",align:"center",prop:"inventoryQuantity"}}),n("el-table-column",{attrs:{label:"差异数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("span",[e._v(e._s((Number(t.row.inventoryQuantity)-Number(t.row.assetInfo.quantity)<=0?"":"+")+(Number(t.row.inventoryQuantity)-Number(t.row.assetInfo.quantity))))])]}}])}),n("el-table-column",{attrs:{label:"盘点结果",align:"center",prop:"inventoryResult"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("dict-tag",{attrs:{options:e.dict.type.inventory_detail_inventory_result,value:t.row.inventoryResult}})]}}])}),e.columns[3].visible?n("el-table-column",{attrs:{label:"备注",align:"center",prop:"remark"}}):e._e(),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:["inventory:detail:edit"],expression:"['inventory:detail: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:["inventory:detail:remove"],expression:"['inventory:detail:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(n){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),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:"orderNumber"}},[n("el-input",{attrs:{placeholder:"请输入单据编号"},model:{value:e.form.orderNumber,callback:function(t){e.$set(e.form,"orderNumber",t)},expression:"form.orderNumber"}})],1),n("el-form-item",{attrs:{label:"盘点元数据",prop:"inventoryMetadata"}},[n("el-input",{attrs:{type:"textarea",placeholder:"请输入内容",disabled:""},model:{value:e.form.inventoryMetadata,callback:function(t){e.$set(e.form,"inventoryMetadata",t)},expression:"form.inventoryMetadata"}})],1),n("el-form-item",{attrs:{label:"盘点状态",prop:"inventoryStatus"}},[n("el-select",{attrs:{placeholder:"请选择盘点状态"},model:{value:e.form.inventoryStatus,callback:function(t){e.$set(e.form,"inventoryStatus",t)},expression:"form.inventoryStatus"}},e._l(e.dict.type.inventory_detail_is_update_data,(function(e){return n("el-option",{key:e.value,attrs:{label:e.label,value:parseInt(e.value)}})})),1)],1),n("el-form-item",{attrs:{label:"盘点数量",prop:"orderNumber"}},[n("el-input-number",{attrs:{size:"small",min:0},model:{value:e.form.inventoryQuantity,callback:function(t){e.$set(e.form,"inventoryQuantity",t)},expression:"form.inventoryQuantity"}})],1),n("el-form-item",{attrs:{label:"备注",prop:"remark"}},[n("el-input",{attrs:{placeholder:"请输入备注"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],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),n("el-dialog",{attrs:{title:"资产信息",visible:e.openAdjustment,width:"900px","append-to-body":""},on:{"update:visible":function(t){e.openAdjustment=t}}},[n("AssetInfo",{attrs:{title:"资产原信息",assetInfo:e.adjustmentOriginalAssetInfo}})],1)],1)},a=[],l=n("5530"),i=(n("d3b7"),n("3ca3"),n("ddb0"),n("159b"),n("d81d"),n("99af"),n("2dfc")),o={name:"Detail",dicts:["inventory_detail_is_update_data","inventory_detail_inventory_result"],components:{AssetInfo:function(){return n.e("chunk-2d221a45").then(n.bind(null,"cae6"))}},data:function(){return{orderNumber:null,loading:!0,ids:[],single:!0,openAdjustment:!1,adjustmentOriginalAssetInfo:null,multiple:!0,showSearch:!0,total:0,detailList:[],title:"",columns:[{key:0,label:"资产编号",visible:!1},{key:1,label:"创建时间",visible:!1},{key:2,label:"盘点元数据",visible:!1},{key:3,label:"备注",visible:!1}],open:!1,queryParams:{pageNum:1,pageSize:10,orderNumber:null,inventoryStatus:null,inventoryResult:null},form:{},rules:{orderNumber:[{required:!0,message:"单据编号不能为空",trigger:"blur"}],inventoryMetadata:[{required:!0,message:"盘点元数据不能为空",trigger:"blur"}],inventoryStatus:[{required:!0,message:"盘点状态不能为空",trigger:"change"}]}}},created:function(){this.orderNumber=this.$route.query.orderNumber,this.queryParams.orderNumber=this.$route.query.orderNumber,this.getList()},methods:{getList:function(){var e=this;this.loading=!0,Object(i["e"])(this.queryParams).then((function(t){e.detailList=t.rows,e.detailList.forEach((function(e){e.assetInfo=JSON.parse(e.inventoryMetadata)})),e.total=t.total,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:null,orderNumber:this.orderNumber,inventoryMetadata:null,inventoryStatus:null,inventoryResult:null,inventoryQuantity:null,remark:null},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.queryParams.orderNumber=this.orderNumber,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;Object(i["d"])(n).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?Object(i["f"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):Object(i["a"])(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 Object(i["b"])(n)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("inventory/detail/export",Object(l["a"])({},this.queryParams),"".concat(this.orderNumber,"资产盘点报表_").concat((new Date).getTime(),".xlsx"))},onSelectOriginalAssetInfo:function(e){var t=JSON.parse(e);this.adjustmentOriginalAssetInfo=t,this.openAdjustment=!0}}},s=o,u=n("2877"),c=Object(u["a"])(s,r,a,!1,null,null,null);t["default"]=c.exports}}]);
|