27.6479c75faef69dbc5b21.js 13 KB

1
  1. webpackJsonp([27],{JGEb:function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,"\n.search[data-v-636619e2] {\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-636619e2] .el-form-item .el-form-item__content .el-input {\n width: 200px;\n}\n.search .el-button[data-v-636619e2] {\n margin-top: -19px;\n margin-left: 20px;\n}\n.print[data-v-636619e2] {\n margin-left: 790px;\n}\n.deliverySheet-header[data-v-636619e2] {\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-636619e2] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n padding: 30px 0;\n}\n.tips-t div[data-v-636619e2] {\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-636619e2] {\n padding: 20px 0;\n}\n.face-image[data-v-636619e2] {\n display: block;\n width: 50px;\n height: 50px;\n margin: 0 auto;\n}\n[data-v-636619e2] .el-dialog__body {\n padding: 10px 20px;\n}\n",""])},PSeb:function(t,e,n){"use strict";e.i=function(t){return Object(o.a)({url:"admin/stock/inventory/confirm/"+t,method:"post"})},e.e=function(t,e){return Object(o.a)({url:"admin/stock/inventory/"+t,method:"post",headers:{"Content-Type":"application/json"},data:e})},e.a=function(t){return Object(o.a)({url:"admin/stock/inventory",method:"post",headers:{"Content-Type":"application/json"},data:t})},e.c=function(t){return Object(o.a)({url:"admin/stock/inventory/cancel/"+t,method:"post"})},e.b=function(t,e){return Object(o.a)({url:"admin/stock/inventory/audit/"+t,method:"post",data:e})},e.f=function(t){return Object(o.a)({url:"admin/stock/inventory/"+t,method:"get",loaidng:!1})},e.g=function(t){return Object(o.a)({url:"admin/stock/inventory",method:"get",loaidng:!1,params:t})},e.d=function(t){return Object(o.a)({url:"admin/stock/inventory/"+t,method:"delete"})},e.h=function(t){return Object(o.a)({url:"/admin/stock/inventory/syncStock/"+t,method:"get",loaidng:!1})};var o=n("vLgD")},RXI1:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n("fZjL"),a=n.n(o),i=n("Dd8w"),s=n.n(i),r=n("PSeb"),l=n("38N9"),d=n.n(l),c=n("hky6"),u=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:{}}},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;u.C().then(function(e){t.warehouseList=e})},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.h(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.i(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;c.p().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.f(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}),a()(this.advancedForm).forEach(function(t){return delete e.params[t]}),this.params.page_no=1,this.GET_GoodsInventoryList()},advancedSearchEvent:function(){this.params=s()({},this.params,this.advancedForm),delete this.params.start_time,delete this.params.end_time,this.advancedForm.goodsInventory_time_range&&(this.params.start_time=parseInt(Number(this.advancedForm.goodsInventory_time_range[0])/1e3),this.params.end_time=parseInt(Number(this.advancedForm.goodsInventory_time_range[1])/1e3)),delete this.params.goodsInventory_time_range,this.params.page_no=1,this.GET_GoodsInventoryList()},GET_GoodsInventoryList:function(){var t=this;this.loading=!0,r.g(this.params).then(function(e){t.loading=!1,t.tableData=e,console.log(t.tableData)}).catch(function(){t.loading=!1})}}},m=n("XyMi");var h=function(t){n("RjDv")},_=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:!1,"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.out_warehouse_id,callback:function(e){t.$set(t.advancedForm,"out_warehouse_id",e)},expression:"advancedForm.out_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.inventory_person,callback:function(e){t.$set(t.advancedForm,"inventory_person",e)},expression:"advancedForm.inventory_person"}})],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,h,"data-v-636619e2",null);e.default=_.exports},RjDv:function(t,e,n){var o=n("JGEb");"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);n("rjj0")("5e94cf2c",o,!0)}});