24.77aea31a97b915ac7ed5.js 9.7 KB

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