webpackJsonp([26],{"0tzy":function(t,e,n){var a=n("6oi5");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n("rjj0")("fd7048c4",a,!0)},"6oi5":function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,"\n.search[data-v-a43dcd46] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n background: #fff;\n overflow: hidden;\n padding: 30px 10px 10px 10px;\n}\n.search[data-v-a43dcd46] .el-form-item .el-form-item__content .el-input {\n width: 200px;\n}\n.search .el-button[data-v-a43dcd46] {\n margin-top: -19px;\n margin-left: 20px;\n}\n.print[data-v-a43dcd46] {\n margin-left: 790px;\n}\n.deliverySheet-header[data-v-a43dcd46] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.tips-t[data-v-a43dcd46] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n padding: 30px 0;\n}\n.tips-t div[data-v-a43dcd46] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n text-align: left;\n padding-left: 70px;\n}\n.tips-f[data-v-a43dcd46] {\n padding: 20px 0;\n}\n.face-image[data-v-a43dcd46] {\n display: block;\n width: 50px;\n height: 50px;\n margin: 0 auto;\n}\n[data-v-a43dcd46] .el-dialog__body {\n padding: 10px 20px;\n}\n",""])},EBtA:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("fZjL"),o=n.n(a),s=n("Dd8w"),i=n.n(s),r=n("Oa05"),d=n("38N9"),l=n.n(d),c=n("hky6"),u=n("dClm"),p=n("jQQ7"),m={name:"GoodsInventoryLoss",data:function(){return{warehouseList:[],deptList:[],loading:!1,params:{page_no:1,page_size:10},advancedForm:{},tableData:"",multipleSelection:[],GoodsInventoryLossForm:{},inventoryType:[]}},mounted:function(){this.GET_GoodsInventoryLossList(),this.GET_DeptList(),this.GET_WarehouseList()},watch:{$route:function(t){t.query;this.params.page_no=1,this.GET_GoodsInventoryLossList()}},methods:{handleDetailGoodsInventoryLoss:function(t){this.$router.push({name:"goodsInventoryLossDetail",params:{id:t.id}})},warehouseName:function(t){var e="";return this.warehouseList.map(function(n){if(n.id==t)return e=n.name}),e},GET_WarehouseList:function(){var t=this;u.G().then(function(e){t.warehouseList=e}),c.u({dictType:"inventory_status"}).then(function(e){t.inventoryType=e.data})},handleAuditGoodsInventoryLoss:function(t){this.$router.push({name:"goodsInventoryLossAudit",params:{id:t.id}})},handleEditGoodsInventoryLoss:function(t){this.$router.push({name:"goodsInventoryLossEdit",params:{id:t.id}})},handleSubmitGoodsInventoryLoss:function(t){this.$router.push({name:"goodsInventoryLossEdit",params:{id:t.id}})},handleCancelGoodsInventoryLoss:function(t){var e=this;r.d(t.id).then(function(){e.$message.success("撤回成功!"),e.GET_GoodsInventoryLossList()})},handleConfirmGoodsInventoryLoss:function(t){var e=this;this.$confirm("确定吗?","提示",{type:"warning"}).then(function(){r.a(t.id).then(function(){e.$message.success("确认成功!"),e.GET_GoodsInventoryLossList()})}).catch(function(){})},handleAddGoodsInventoryLoss:function(){this.$router.push({name:"goodsInventoryLossAdd",params:{callback:this.GET_GoodsInventoryLossList}})},handlePrintGoodsInventoryLossDialog:function(t){this.GET_GoodsInventoryLossDetail(t.id)},handleDeleteGoodsInventoryLoss:function(){var t=this;if(console.log("this.multipleSelection=",this.multipleSelection),!this.multipleSelection||!this.multipleSelection.length)return this.$message.error("请先选择!");this.$confirm("确定要删除当前调整单吗?","提示",{type:"warning"}).then(function(){var e=t.multipleSelection.map(function(t){return t.id});r.e(e).then(function(){t.$message.success("删除成功!"),t.GET_GoodsInventoryLossList()})}).catch(function(){})},statusFilter:function(t){var e="";return this.inventoryType.map(function(n){if(n.value==t)return e=n.label}),e},GET_DeptList:function(){var t=this;c.o().then(function(e){t.deptList=p.Foundation.buildTree(e,"0")})},handlePrintGoodsInventoryLoss:function(){l()({printable:"deliverySheet",type:"html",targetStyles:["*"],ignoreElements:["no-logs","goods-image","no-btn"]})},handleSelectionChange:function(t){console.log("val=-",t),this.multipleSelection=t},handlePageSizeChange:function(t){this.params.page_size=t,this.GET_GoodsInventoryLossList()},handlePageCurrentChange:function(t){this.params.page_no=t,this.GET_GoodsInventoryLossList()},searchEvent:function(t){var e=this;this.params=i()({},this.params,{sn:t}),o()(this.advancedForm).forEach(function(t){return delete e.params[t]}),this.params.page_no=1,this.GET_GoodsInventoryLossList()},advancedSearchEvent:function(){this.params=i()({},this.params,this.advancedForm),delete this.params.start_time,delete this.params.end_time,this.advancedForm.GoodsInventoryLoss_time_range&&(this.params.start_time=parseInt(Number(this.advancedForm.GoodsInventoryLoss_time_range[0])/1e3),this.params.end_time=parseInt(Number(this.advancedForm.GoodsInventoryLoss_time_range[1])/1e3)),delete this.params.GoodsInventoryLoss_time_range,this.params.page_no=1,this.GET_GoodsInventoryLossList()},GET_GoodsInventoryLossList:function(){var t=this;this.loading=!0,r.h(this.params).then(function(e){t.loading=!1,t.tableData=e}).catch(function(){t.loading=!1})}}},h=n("XyMi");var v=function(t){n("0tzy")},f=Object(h.a)(m,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"search"},[n("el-form",{ref:"advancedForm",attrs:{model:t.advancedForm,"label-width":"160px"}},[n("el-row",[n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"报损日期"}},[n("el-date-picker",{attrs:{type:"daterange",align:"center",editable:!1,"unlink-panels":"",clearable:!0,"default-time":["00:00:00","23:59:59"],"range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"timestamp","picker-options":{disabledDate:function(t){return t.getTime()-1>=new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()).getTime()+864e5-1},shortcuts:t.MixinPickerShortcuts}},model:{value:t.advancedForm.goodsInventory_time_range,callback:function(e){t.$set(t.advancedForm,"goodsInventory_time_range",e)},expression:"advancedForm.goodsInventory_time_range"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"仓库"}},[n("el-select",{model:{value:t.advancedForm.warehouse_id,callback:function(e){t.$set(t.advancedForm,"warehouse_id",e)},expression:"advancedForm.warehouse_id"}},t._l(t.warehouseList,function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1)],1),t._v(" "),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"报损人"}},[n("el-input",{attrs:{placeholder:"请输入内容",width:"200px"},model:{value:t.advancedForm.creator,callback:function(e){t.$set(t.advancedForm,"creator",e)},expression:"advancedForm.creator"}})],1)],1)],1)],1),t._v(" "),n("el-button",{on:{click:t.advancedSearchEvent}},[t._v("\n 搜索\n ")])],1),t._v(" "),n("en-table-layout",{attrs:{tableData:t.tableData.data,loading:t.loading},on:{"selection-change":t.handleSelectionChange}},[n("div",{staticClass:"inner-toolbar",attrs:{slot:"toolbar"},slot:"toolbar"},[n("div",{staticClass:"toolbar-btns"},[t.checkPermission(["goodsInventoryLoss:add"])?n("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.handleAddGoodsInventoryLoss}},[t._v("新增")]):t._e()],1)]),t._v(" "),n("template",{slot:"table-columns"},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),n("el-table-column",{attrs:{prop:"sn",label:"报损单编号"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.sn))])]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"仓库"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.warehouseName(e.row.warehouse_id)))]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"status",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.statusFilter(e.row.status)))]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"report_desc",label:"报损说明"}}),t._v(" "),n("el-table-column",{attrs:{label:"操作",width:"450"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.checkPermission(["goodsInventoryLossDetail"])?n("el-button",{attrs:{type:"mini",size:"mini"},on:{click:function(n){return t.handleDetailGoodsInventoryLoss(e.row)}}},[t._v("查看")]):t._e(),t._v(" "),"NOT_HANDLE"==e.row.status&&t.checkPermission(["goodsInventoryLossEdit"])?n("el-button",{attrs:{type:"mini",size:"mini"},on:{click:function(n){return t.handleSubmitGoodsInventoryLoss(e.row)}}},[t._v("审核")]):t._e()]}}])})],1),t._v(" "),t.tableData?n("el-pagination",{attrs:{slot:"pagination","current-page":t.tableData.page_no,"page-sizes":[10,20,50,100],"page-size":t.tableData.page_size,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.data_total},on:{"size-inventory":t.handlePageSizeChange,"current-inventory":t.handlePageCurrentChange},slot:"pagination"}):t._e()],2)],1)},[],!1,v,"data-v-a43dcd46",null);e.default=f.exports},Oa05:function(t,e,n){"use strict";e.a=function(t){return Object(a.a)({url:"admin/stock/damage/report/confirm/"+t,method:"post"})},e.f=function(t,e){return Object(a.a)({url:"admin/stock/damage/report/"+t,method:"post",headers:{"Content-Type":"application/json"},data:e})},e.b=function(t){return Object(a.a)({url:"admin/stock/damage/report",method:"post",headers:{"Content-Type":"application/json"},data:t})},e.d=function(t){return Object(a.a)({url:"admin/stock/damage/report/cancel/"+t,method:"post"})},e.c=function(t,e){return Object(a.a)({url:"admin/stock/damage/report/audit/"+t,method:"post",data:e})},e.g=function(t){return Object(a.a)({url:"admin/stock/damage/report/"+t,method:"get",loaidng:!1})},e.h=function(t){return Object(a.a)({url:"admin/stock/damage/report",method:"get",loaidng:!1,params:t})},e.e=function(t){return Object(a.a)({url:"admin/stock/damage/report/"+t,method:"delete"})},e.i=function(t,e){return Object(a.a)({url:"/admin/stock/damage/report/submit/"+t,method:"post",headers:{"Content-Type":"application/json"},data:e})};var a=n("vLgD")}});