(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-49e21fec"],{"7b33":function(e,t,o){"use strict";o.r(t);var l='';t["default"]=l},"9d50":function(e,t,o){"use strict";o.d(t,"c",(function(){return i})),o.d(t,"n",(function(){return r})),o.d(t,"h",(function(){return n})),o.d(t,"g",(function(){return a})),o.d(t,"k",(function(){return s})),o.d(t,"e",(function(){return c})),o.d(t,"d",(function(){return d})),o.d(t,"b",(function(){return p})),o.d(t,"i",(function(){return b})),o.d(t,"a",(function(){return g})),o.d(t,"m",(function(){return f})),o.d(t,"f",(function(){return u})),o.d(t,"j",(function(){return m})),o.d(t,"o",(function(){return x})),o.d(t,"l",(function(){return h}));o("6b54");var l=o("b775");function i(e){return Object(l["a"])({url:"/api/Extend/LqInventory/Create",method:"post",data:e})}function r(e){return Object(l["a"])({url:"/api/Extend/LqInventory/Update",method:"put",data:e})}function n(e){return Object(l["a"])({url:"/api/Extend/LqInventory/GetList",method:"get",data:e})}function a(e){return Object(l["a"])({url:"/api/Extend/LqInventory/GetInfo",method:"get",data:{id:e}})}function s(){return Object(l["a"])({url:"/api/Extend/LqInventory/GetWarehouseOptions",method:"get"})}function c(e){return Object(l["a"])({url:"/api/Extend/LqInventory/ExportStockInDetail",method:"get",data:e})}function d(e){return Object(l["a"])({url:"/api/Extend/LqInventoryUsage/Create",method:"post",data:e})}function p(e,t){return Object(l["a"])({url:"/api/Extend/LqInventoryUsage/Cancel?id="+e+"&remarks="+t,method:"put"})}function b(e){return Object(l["a"])({url:"/api/Extend/LqInventoryUsage/GetList",method:"get",data:e})}function g(e,t,o){var i=new URLSearchParams;i.append("result",t),o&&i.append("opinion",o);var r=i.toString();return Object(l["a"])({url:"/api/Extend/LqInventoryUsage/Approve/".concat(e).concat(r?"?"+r:""),method:"post"})}function f(e){return Object(l["a"])({url:"/api/Extend/LqInventoryUsage/MarkReceived/".concat(e),method:"put"})}function u(e){return Object(l["a"])({url:"/api/Extend/LqInventoryUsage/GetBatchInfo",method:"get",data:{batchId:e}})}function m(e){return Object(l["a"])({url:"/api/Extend/LqInventoryUsage/GetStoreReceiveStatistics",method:"post",data:e})}function x(e){return Object(l["a"])({url:"/api/Extend/LqInventoryUsage/UpdateStoreReceiveTime",method:"put",data:e})}function h(e){return Object(l["a"])({url:"/api/Extend/LqInventoryUsage/GetWarehousePendingDelivery",method:"post",data:e})}},"9f63":function(e,t,o){},a3ef:function(e,t,o){"use strict";o("9f63")},aab3:function(e,t,o){"use strict";o.r(t);var l=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"NCC-common-layout"},[o("div",{staticClass:"NCC-common-layout-center"},[o("el-row",{staticClass:"NCC-common-search-box",attrs:{gutter:16}},[o("el-form",{nativeOn:{submit:function(e){e.preventDefault()}}},[o("el-col",{attrs:{span:6}},[o("el-form-item",{attrs:{label:"仓库"}},[o("el-select",{style:{width:"100%"},attrs:{placeholder:"请选择仓库(不选则统计全部)",clearable:"",filterable:""},model:{value:e.query.Warehouse,callback:function(t){e.$set(e.query,"Warehouse",t)},expression:"query.Warehouse"}},e._l(e.warehouseOptions,(function(e){return o("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)],1),o("el-col",{attrs:{span:6}},[o("el-form-item",{attrs:{label:"门店"}},[o("el-select",{style:{width:"100%"},attrs:{placeholder:"请选择门店(不选则统计全部)",clearable:"",filterable:""},model:{value:e.query.StoreId,callback:function(t){e.$set(e.query,"StoreId",t)},expression:"query.StoreId"}},e._l(e.storeOptions,(function(e){return o("el-option",{key:e.id,attrs:{label:e.dm,value:e.id}})})),1)],1)],1),o("el-col",{attrs:{span:6}},[o("el-form-item",[o("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(t){return e.search()}}},[e._v("查询")]),o("el-button",{attrs:{icon:"el-icon-refresh-right"},on:{click:function(t){return e.reset()}}},[e._v("重置")])],1)],1)],1)],1),o("div",{staticClass:"NCC-common-layout-main NCC-flex-main"},[o("div",{staticClass:"NCC-common-head"},[o("div",{staticClass:"head-actions"},[o("el-button",{attrs:{type:"primary",icon:"el-icon-printer",disabled:!e.list.length},on:{click:function(t){return e.printAll()}}},[e._v("打印全部仓库")])],1),o("div",{staticClass:"NCC-common-head-right"},[o("el-tooltip",{attrs:{effect:"dark",content:"刷新",placement:"top"}},[o("el-link",{attrs:{icon:"icon-ym icon-ym-Refresh NCC-common-head-icon",underline:!1},on:{click:function(t){return e.initData()}}})],1),o("screenfull",{attrs:{isContainer:""}})],1)]),o("el-row",{staticStyle:{"margin-bottom":"20px"},attrs:{gutter:16}},[o("el-col",{attrs:{span:8}},[o("el-card",{staticClass:"statistics-card",attrs:{shadow:"never"}},[o("div",{staticClass:"card-content"},[o("div",{staticClass:"card-icon"},[o("i",{staticClass:"el-icon-office-building"})]),o("div",{staticClass:"card-info"},[o("div",{staticClass:"card-label"},[e._v("待领取仓库数")]),o("div",{staticClass:"card-value"},[e._v(e._s(e.warehouseCount))])])])])],1),o("el-col",{attrs:{span:8}},[o("el-card",{staticClass:"statistics-card",attrs:{shadow:"never"}},[o("div",{staticClass:"card-content"},[o("div",{staticClass:"card-icon"},[o("i",{staticClass:"el-icon-s-shop"})]),o("div",{staticClass:"card-info"},[o("div",{staticClass:"card-label"},[e._v("待领取门店数")]),o("div",{staticClass:"card-value"},[e._v(e._s(e.storeCount))])])])])],1),o("el-col",{attrs:{span:8}},[o("el-card",{staticClass:"statistics-card",attrs:{shadow:"never"}},[o("div",{staticClass:"card-content"},[o("div",{staticClass:"card-icon"},[o("i",{staticClass:"el-icon-coin"})]),o("div",{staticClass:"card-info"},[o("div",{staticClass:"card-label"},[e._v("待领取总金额")]),o("div",{staticClass:"card-value"},[e._v("¥"+e._s(e.formatMoney(e.totalAmount)))])])])])],1)],1),o("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"warehouseList",staticClass:"warehouse-list"},[e.list.length?e._e():o("div",{staticClass:"empty-text"},[o("i",{staticClass:"el-icon-warning-outline empty-icon"}),e._v(" 暂无待领取数据\n\t\t\t\t")]),e._l(e.list,(function(t,l){return o("el-card",{key:t.Warehouse||l,ref:"warehouseCard-"+l,refInFor:!0,staticClass:"warehouse-card",attrs:{shadow:"hover"}},[o("div",{staticClass:"warehouse-header"},[o("div",{staticClass:"warehouse-title"},[o("i",{staticClass:"el-icon-office-building warehouse-icon"}),o("span",{staticClass:"text-nowrap"},[e._v(e._s(t.Warehouse||"未知仓库"))]),o("span",{staticClass:"badge"},[e._v("门店 "+e._s(e.warehouseStoreCount(t)))]),o("span",{staticClass:"badge amount"},[e._v("金额 ¥"+e._s(e.formatMoney(e.warehouseAmount(t))))])]),o("div",{staticClass:"warehouse-actions"},[o("el-button",{attrs:{type:"primary",icon:"el-icon-printer",size:"mini"},on:{click:function(t){return e.printWarehouse(l)}}},[e._v("打印该仓库")])],1)]),e._l(t.Stores||[],(function(t,l){return o("div",{key:t.BatchId||l,staticClass:"store-block"},[o("div",{staticClass:"store-header"},[o("div",{staticClass:"store-info"},[o("i",{staticClass:"el-icon-s-shop store-icon"}),o("span",[e._v(e._s(t.StoreName||"无"))])]),o("div",{staticClass:"store-meta"},[o("div",{staticClass:"meta-item"},[o("i",{staticClass:"el-icon-collection"}),o("span",[e._v("批次号:"+e._s(t.BatchId||"无"))])]),o("div",{staticClass:"meta-item"},[o("i",{staticClass:"el-icon-user"}),o("span",[e._v("申请人:"+e._s(t.ApplicationUserName||"无"))])]),o("div",{staticClass:"meta-item"},[o("i",{staticClass:"el-icon-time"}),o("span",[e._v("申请时间:"+e._s(e.formatDateTime(t.ApplicationTime)))])]),o("div",{staticClass:"meta-item highlight"},[o("i",{staticClass:"el-icon-coin"}),o("span",[e._v("合计:¥"+e._s(e.formatMoney(t.TotalAmount)))])])])]),o("NCC-table",{attrs:{data:t.Products||[],"header-cell-style":{background:"#f5f7fa",color:"#606266"}}},[o("el-table-column",{attrs:{label:"序号",type:"index",width:"60",align:"center"}}),o("el-table-column",{attrs:{label:"产品名称",prop:"ProductName",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("div",{staticClass:"product-info"},[o("i",{staticClass:"el-icon-box product-icon"}),o("span",[e._v(e._s(t.row.ProductName||"无"))])])]}}],null,!0)}),o("el-table-column",{attrs:{label:"数量",prop:"Quantity",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("span",[e._v(e._s(t.row.Quantity||0))])]}}],null,!0)}),o("el-table-column",{attrs:{label:"单价",prop:"UnitPrice",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("span",[e._v("¥"+e._s(e.formatMoney(t.row.UnitPrice)))])]}}],null,!0)}),o("el-table-column",{attrs:{label:"金额",prop:"Amount",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("span",{staticClass:"amount-text"},[e._v("¥"+e._s(e.formatMoney(t.row.Amount)))])]}}],null,!0)})],1)],1)}))],2)}))],2)],1)],1)])},i=[],r=(o("f576"),o("ac6a"),o("5df3"),o("4f7f"),o("75fc")),n=(o("55dd"),o("db72")),a=(o("c5f6"),o("b775")),s=o("7b33"),c=o("9d50"),d={data:function(){return{loading:!1,list:[],query:{Warehouse:void 0,StoreId:void 0},storeOptions:[],warehouseOptions:[]}},computed:{warehouseCount:function(){return this.list.length},storeCount:function(){return this.list.reduce((function(e,t){return e+(t.Stores?t.Stores.length:0)}),0)},totalAmount:function(){return this.list.reduce((function(e,t){var o=(t.Stores||[]).reduce((function(e,t){return e+Number(t.TotalAmount||0)}),0);return e+o}),0)}},created:function(){this.initStoreOptions(),this.initWarehouseOptions(),this.initData()},methods:{initData:function(){var e=this;this.loading=!0,Object(c["l"])(Object(n["a"])({},this.query)).then((function(t){e.loading=!1,200===t.code&&t.data&&t.data.success?e.list=t.data.data||[]:(e.list=[],t.data&&t.data.message&&e.$message({type:"info",message:t.data.message}))})).catch((function(){e.loading=!1,e.list=[]}))},initStoreOptions:function(){var e=this;Object(a["a"])({url:"/api/Extend/LqMdxx",method:"GET",data:{currentPage:1,pageSize:1e3}}).then((function(t){t.data&&t.data.list&&(e.storeOptions=t.data.list)})).catch((function(){e.storeOptions=[]}))},initWarehouseOptions:function(){var e=this;Object(a["a"])({url:"/api/Extend/LqProduct/GetList",method:"GET",data:{currentPage:1,pageSize:1e4}}).then((function(t){if(200===t.code&&t.data&&t.data.list){var o=t.data.list.map((function(e){return e.warehouse})).filter((function(e){return e&&""!==e.trim()}));e.warehouseOptions=Object(r["a"])(new Set(o)).sort()}})).catch((function(){e.warehouseOptions=[]}))},search:function(){this.initData()},reset:function(){this.query={Warehouse:void 0,StoreId:void 0},this.initData()},formatMoney:function(e){return e||0===e?Number(e).toFixed(2):"0.00"},formatDateTime:function(e){if(!e)return"无";var t=new Date(e);if(isNaN(t.getTime()))return"无";var o=t.getFullYear(),l=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),r=String(t.getHours()).padStart(2,"0"),n=String(t.getMinutes()).padStart(2,"0"),a=String(t.getSeconds()).padStart(2,"0");return"".concat(o,"-").concat(l,"-").concat(i," ").concat(r,":").concat(n,":").concat(a)},warehouseStoreCount:function(e){return e&&e.Stores?e.Stores.length:0},warehouseAmount:function(e){return e&&e.Stores?e.Stores.reduce((function(e,t){return e+Number(t.TotalAmount||0)}),0):0},printWarehouse:function(e){var t=this.list[e];t?this.printData([t]):this.$message.warning("未找到可打印的仓库数据")},printAll:function(){this.list.length?this.printData(this.list):this.$message.warning("暂无可打印数据")},printData:function(e){var t=this,o='\n\t\t\t\t\n\t\t\t',l=e.map((function(e,o){var l=(e.Stores||[]).map((function(e){var o=(e.Products||[]).map((function(e,o){return'\n\t\t\t\t\t\t
| 序号 | \n\t\t\t\t\t\t\t\t\t\t产品名称 | \n\t\t\t\t\t\t\t\t\t\t数量 | \n\t\t\t\t\t\t\t\t\t\t单价 | \n\t\t\t\t\t\t\t\t\t\t金额 | \n\t\t\t\t\t\t\t\t\t
|---|