25.d857a221c864eaac74dd.js 12 KB

1
  1. webpackJsonp([25],{PSeb:function(t,e,n){"use strict";e.j=function(t){return Object(a.a)({url:"admin/stock/inventory/confirm/"+t,method:"post"})},e.e=function(t,e){return Object(a.a)({url:"admin/stock/inventory/"+t,method:"post",headers:{"Content-Type":"application/json"},data:e})},e.a=function(t){return Object(a.a)({url:"admin/stock/inventory",method:"post",headers:{"Content-Type":"application/json"},data:t})},e.c=function(t){return Object(a.a)({url:"admin/stock/inventory/cancel/"+t,method:"post"})},e.b=function(t,e){return Object(a.a)({url:"admin/stock/inventory/audit/"+t,method:"post",data:e})},e.g=function(t){return Object(a.a)({url:"admin/stock/inventory/"+t,method:"get",loaidng:!1})},e.h=function(t){return Object(a.a)({url:"admin/stock/inventory",method:"get",loaidng:!1,params:t})},e.d=function(t){return Object(a.a)({url:"admin/stock/inventory/"+t,method:"delete"})},e.i=function(t){return Object(a.a)({url:"/admin/stock/inventory/syncStock/"+t,method:"get",loaidng:!1})},e.f=function(t,e){return Object(a.a)({url:"/admin/erp/warehouseOut/getGoodByWarehouseInventory/"+e,method:"get",loaidng:!1,params:t})};var a=n("vLgD")},RXI1:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("fZjL"),o=n.n(a),i=n("Dd8w"),s=n.n(i),r=n("PSeb"),l=n("38N9"),d=n.n(l),c=n("Pfph"),u=n("hky6"),h=n("dClm"),v=n("jQQ7"),p={name:"goodsInventory",data:function(){return{warehouseList:[],deptList:[],loading:!1,params:{page_no:1,page_size:10},advancedForm:{},tableData:"",dialogVisible:!1,multipleSelection:[],goodsInventoryForm:{},adminList:[],searchTime:[]}},mounted:function(){this.GET_GoodsInventoryList(),this.GET_DeptList(),this.GET_WarehouseList()},watch:{$route:function(t){t.query;this.params.page_no=1,this.GET_GoodsInventoryList()}},methods:{GET_WarehouseList:function(){var t=this;h.G().then(function(e){t.warehouseList=e}),c.h({page_no:1,page_size:9999,user_state:0}).then(function(e){t.adminList=e.data})},handleCheckGoodsInventory:function(t){this.$router.push({name:"goodsInventoryCheck",params:{id:t.id}})},handleAuditGoodsInventory:function(t){this.$router.push({name:"goodsInventoryAudit",params:{id:t.id}})},handleEditGoodsInventory:function(t){this.$router.push({name:"goodsInventoryEdit",params:{id:t.id}})},handleSubmitGoodsInventory:function(t){var e=this;r.i(t.id).then(function(){e.$message.success("处理成功!"),e.GET_GoodsInventoryList()})},handleCancelGoodsInventory:function(t){var e=this;r.c(t.id).then(function(){e.$message.success("撤回成功!"),e.GET_GoodsInventoryList()})},handleConfirmGoodsInventory:function(t){var e=this;this.$confirm("确定吗?","提示",{type:"warning"}).then(function(){r.j(t.id).then(function(){e.$message.success("确认成功!"),e.GET_GoodsInventoryList()})}).catch(function(){})},handleAddGoodsInventory:function(){this.$router.push({name:"goodsInventoryAdd",params:{callback:this.GET_GoodsInventoryList}})},handlePrintGoodsInventoryDialog:function(t){this.GET_GoodsInventoryDetail(t.id)},handleDeleteGoodsInventory:function(){var t=this;if(!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.d(e).then(function(){t.$message.success("删除成功!"),t.GET_GoodsInventoryList()})}).catch(function(){})},statusFilter:function(t){switch(t){case"NOT_HANDLE":return"未处理";case"HAS_HANDLE":return"已处理"}},warehouseName:function(t){var e="";return this.warehouseList.map(function(n){if(n.id==t)return e=n.name}),e},GET_DeptList:function(){var t=this;u.o().then(function(e){t.deptList=v.Foundation.buildTree(e,"0")})},handlePrintGoodsInventory:function(){d()({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_GoodsInventoryList()},handlePageCurrentChange:function(t){this.params.page_no=t,this.GET_GoodsInventoryList()},GET_GoodsInventoryDetail:function(t){var e=this;r.g(t).then(function(t){if(e.goodsInventoryForm=t,t.product_list&&t.product_list.length){var n="";t.product_list.forEach(function(t){n+=t.product_name+"、"})}e.goodsInventoryForm.illustrate=n,e.dialogVisible=!0})},searchEvent:function(t){var e=this;this.params=s()({},this.params,{sn:t}),o()(this.advancedForm).forEach(function(t){return delete e.params[t]}),this.params.page_no=1,this.GET_GoodsInventoryList()},advancedSearchEvent:function(){this.searchTime&&(this.advancedForm.start_time=this.searchTime[0],this.advancedForm.end_time=this.searchTime[1]),this.params=s()({},this.params,this.advancedForm),this.params.page_no=1,this.GET_GoodsInventoryList()},GET_GoodsInventoryList: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})}}},m=n("XyMi");var f=function(t){n("Rzxt")},_=Object(m.a)(p,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":"yyyy-MM-dd hh:mm:ss"},model:{value:t.searchTime,callback:function(e){t.searchTime=e},expression:"searchTime"}})],1)],1),t._v(" "),n("el-col",{attrs:{span:8}},[n("el-form-item",{attrs:{label:"仓库"}},[n("el-select",{attrs:{clearable:""},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-select",{attrs:{clearable:""},model:{value:t.advancedForm.inventory_person_id,callback:function(e){t.$set(t.advancedForm,"inventory_person_id",e)},expression:"advancedForm.inventory_person_id"}},t._l(t.adminList,function(t){return n("el-option",{key:t.id,attrs:{label:t.real_name,value:t.id}})}),1)],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(["goodsInventory:add"])?n("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.handleAddGoodsInventory}},[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:{prop:"inventory_time",label:"盘点日期"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.inventory_time))]}}])}),t._v(" "),n("el-table-column",{attrs:{prop:"warehouse_name",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:{label:"操作",width:"450"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{size:"mini"},on:{click:function(n){return t.handleCheckGoodsInventory(e.row)}}},[t._v("查看")]),t._v(" "),"NOT_HANDLE"==e.row.status?n("el-button",{attrs:{type:"mini",size:"mini"},on:{click:function(n){return t.handleSubmitGoodsInventory(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),t._v(" "),n("el-dialog",{attrs:{visible:t.dialogVisible,width:"940px",center:""},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",{staticStyle:{width:"900px"}},[n("el-button",{staticClass:"print no-btn",attrs:{size:"mini",type:"primary"},on:{click:t.handlePrintGoodsInventory}},[t._v("打印")]),t._v(" "),n("div",{staticClass:"deliverySheet-header",attrs:{slot:"header",id:"deliverySheet"},slot:"header"},[n("h3",[t._v("产品库存盘点单")])]),t._v(" "),n("div",{staticClass:"tips-t"},[n("div",[t._v("\n 仓库名称编码:"+t._s(t.goodsInventoryForm.dept_name)+t._s(t.goodsInventoryForm.warehouse_name)+"\n ")]),t._v(" "),n("div",[t._v("\n 日期:"+t._s(t._f("unixToDateStr")(t.goodsInventoryForm.inventory_time))+"\n ")]),t._v(" "),n("div",[t._v("\n 编号:"+t._s(t.goodsInventoryForm.sn)+"\n ")])]),t._v(" "),n("el-table",{staticStyle:{width:"100%"},attrs:{data:t.goodsInventoryForm.product_list,border:"","cell-style":{textAlign:"center"},"header-cell-style":{textAlign:"center"}}},[n("el-table-column",{attrs:{label:"序号",width:"179"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.$index+1)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"商品编号",width:"170"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.product_sn)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"商品名称",width:"170"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.product_name)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"规格型号",width:"110"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.specification)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"单位",width:"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.unit)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"上期盘点库存",width:"110"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.stock_num)+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"本期盘点库存",width:"110"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.inventory_num)+"\n ")]}}])})],1),t._v(" "),n("div",{staticClass:"tips-t"},[n("div",[t._v("\n 盘点人:"+t._s(t.goodsInventoryForm.inventory_person)+"\n ")])])],1)])],1)},[],!1,f,"data-v-1d870669",null);e.default=_.exports},Rzxt:function(t,e,n){var a=n("Wj8+");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n("rjj0")("a2f4e416",a,!0)},"Wj8+":function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,"\n.search[data-v-1d870669] {\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-1d870669] .el-form-item .el-form-item__content .el-input {\n width: 200px;\n}\n.search .el-button[data-v-1d870669] {\n margin-top: -19px;\n margin-left: 20px;\n}\n.print[data-v-1d870669] {\n margin-left: 790px;\n}\n.deliverySheet-header[data-v-1d870669] {\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-1d870669] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n padding: 30px 0;\n}\n.tips-t div[data-v-1d870669] {\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-1d870669] {\n padding: 20px 0;\n}\n.face-image[data-v-1d870669] {\n display: block;\n width: 50px;\n height: 50px;\n margin: 0 auto;\n}\n[data-v-1d870669] .el-dialog__body {\n padding: 10px 20px;\n}\n",""])}});