chunk-2820a6e0.3e61900d.js
10.3 KB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2820a6e0"],{"310c":function(t,e,a){"use strict";a("93d4")},"93d4":function(t,e,a){},"9d50":function(t,e,a){"use strict";a.d(e,"c",(function(){return r})),a.d(e,"l",(function(){return o})),a.d(e,"g",(function(){return i})),a.d(e,"f",(function(){return s})),a.d(e,"d",(function(){return c})),a.d(e,"b",(function(){return l})),a.d(e,"h",(function(){return u})),a.d(e,"a",(function(){return d})),a.d(e,"k",(function(){return f})),a.d(e,"e",(function(){return p})),a.d(e,"i",(function(){return h})),a.d(e,"j",(function(){return m}));a("6b54");var n=a("b775");function r(t){return Object(n["a"])({url:"/api/Extend/LqInventory/Create",method:"post",data:t})}function o(t){return Object(n["a"])({url:"/api/Extend/LqInventory/Update",method:"put",data:t})}function i(t){return Object(n["a"])({url:"/api/Extend/LqInventory/GetList",method:"get",data:t})}function s(t){return Object(n["a"])({url:"/api/Extend/LqInventory/GetInfo",method:"get",data:{id:t}})}function c(t){return Object(n["a"])({url:"/api/Extend/LqInventoryUsage/Create",method:"post",data:t})}function l(t,e){return Object(n["a"])({url:"/api/Extend/LqInventoryUsage/Cancel?id="+t+"&remarks="+e,method:"put"})}function u(t){return Object(n["a"])({url:"/api/Extend/LqInventoryUsage/GetList",method:"get",data:t})}function d(t,e,a){var r=new URLSearchParams;r.append("result",e),a&&r.append("opinion",a);var o=r.toString();return Object(n["a"])({url:"/api/Extend/LqInventoryUsage/Approve/".concat(t).concat(o?"?"+o:""),method:"post"})}function f(t){return Object(n["a"])({url:"/api/Extend/LqInventoryUsage/MarkReceived/".concat(t),method:"put"})}function p(t){return Object(n["a"])({url:"/api/Extend/LqInventoryUsage/GetBatchInfo",method:"get",data:{batchId:t}})}function h(t){return Object(n["a"])({url:"/api/Extend/LqInventoryUsage/GetStoreReceiveStatistics",method:"post",data:t})}function m(t){return Object(n["a"])({url:"/api/Extend/LqInventoryUsage/GetWarehousePendingDelivery",method:"post",data:t})}},b526:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"NCC-common-layout"},[a("div",{staticClass:"NCC-common-layout-center"},[a("el-row",{staticClass:"NCC-common-search-box",attrs:{gutter:16}},[a("el-form",{nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"统计年份"}},[a("el-date-picker",{style:{width:"100%"},attrs:{type:"year",placeholder:"选择年份","value-format":"yyyy",format:"yyyy"},model:{value:t.query.Year,callback:function(e){t.$set(t.query,"Year",e)},expression:"query.Year"}})],1)],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"统计月份"}},[a("el-select",{style:{width:"100%"},attrs:{placeholder:"请选择月份"},model:{value:t.query.Month,callback:function(e){t.$set(t.query,"Month",e)},expression:"query.Month"}},t._l(12,(function(t){return a("el-option",{key:t,attrs:{label:t+"月",value:t}})})),1)],1)],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"门店"}},[a("el-select",{style:{width:"100%"},attrs:{placeholder:"请选择门店(不选则统计所有门店)",clearable:"",filterable:""},model:{value:t.query.StoreId,callback:function(e){t.$set(t.query,"StoreId",e)},expression:"query.StoreId"}},t._l(t.storeOptions,(function(t){return a("el-option",{key:t.id,attrs:{label:t.dm,value:t.id}})})),1)],1)],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"仓库"}},[a("el-select",{style:{width:"100%"},attrs:{placeholder:"请选择仓库(不选则统计所有仓库)",clearable:"",filterable:""},model:{value:t.query.Warehouse,callback:function(e){t.$set(t.query,"Warehouse",e)},expression:"query.Warehouse"}},t._l(t.warehouseOptions,(function(t){return a("el-option",{key:t,attrs:{label:t,value:t}})})),1)],1)],1),a("el-col",{attrs:{span:6}},[a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.search()}}},[t._v("查询")]),a("el-button",{attrs:{icon:"el-icon-refresh-right"},on:{click:function(e){return t.reset()}}},[t._v("重置")])],1)],1)],1)],1),a("div",{staticClass:"NCC-common-layout-main NCC-flex-main"},[a("div",{staticClass:"NCC-common-head"},[a("div",[a("span",{staticClass:"statistics-title"},[t._v("\n\t\t\t\t\t\t"+t._s(t.query.Year)+"年"+t._s(t.query.Month)+"月门店领取统计\n\t\t\t\t\t")])]),a("div",{staticClass:"NCC-common-head-right"},[a("el-tooltip",{attrs:{effect:"dark",content:"刷新",placement:"top"}},[a("el-link",{attrs:{icon:"icon-ym icon-ym-Refresh NCC-common-head-icon",underline:!1},on:{click:function(e){return t.initData()}}})],1),a("screenfull",{attrs:{isContainer:""}})],1)]),a("el-row",{staticStyle:{"margin-bottom":"20px"},attrs:{gutter:16}},[a("el-col",{attrs:{span:8}},[a("el-card",{staticClass:"statistics-card",attrs:{shadow:"never"}},[a("div",{staticClass:"card-content"},[a("div",{staticClass:"card-icon"},[a("i",{staticClass:"el-icon-s-shop"})]),a("div",{staticClass:"card-info"},[a("div",{staticClass:"card-label"},[t._v("门店数量")]),a("div",{staticClass:"card-value"},[t._v(t._s(t.storeCount))])])])])],1),a("el-col",{attrs:{span:8}},[a("el-card",{staticClass:"statistics-card",attrs:{shadow:"never"}},[a("div",{staticClass:"card-content"},[a("div",{staticClass:"card-icon"},[a("i",{staticClass:"el-icon-document"})]),a("div",{staticClass:"card-info"},[a("div",{staticClass:"card-label"},[t._v("领取总数量")]),a("div",{staticClass:"card-value"},[t._v(t._s(t.totalApplicationCount))])])])])],1),a("el-col",{attrs:{span:8}},[a("el-card",{staticClass:"statistics-card",attrs:{shadow:"never"}},[a("div",{staticClass:"card-content"},[a("div",{staticClass:"card-icon"},[a("i",{staticClass:"el-icon-coin"})]),a("div",{staticClass:"card-info"},[a("div",{staticClass:"card-label"},[t._v("领取总金额")]),a("div",{staticClass:"card-value"},[t._v("¥"+t._s(t.formatMoney(t.totalAmount)))])])])])],1)],1),a("NCC-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{data:t.list,"header-cell-style":{background:"#f5f7fa",color:"#606266"}}},[a("el-table-column",{attrs:{label:"序号",align:"center",type:"index",width:"60"}}),a("el-table-column",{attrs:{label:"门店名称",align:"center",prop:"StoreName"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"store-info"},[a("i",{staticClass:"el-icon-s-shop store-icon"}),a("span",[t._v(t._s(e.row.StoreName||"无"))])])]}}])}),a("el-table-column",{attrs:{label:"产品名称",align:"center",prop:"ProductName"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.ProductName||"无"))])]}}])}),a("el-table-column",{attrs:{label:"仓库",align:"center",prop:"Warehouse"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"warehouse-info"},[a("i",{staticClass:"el-icon-office-building warehouse-icon"}),a("span",[t._v(t._s(e.row.Warehouse||"无"))])])]}}])}),a("el-table-column",{attrs:{label:"数量",align:"center",prop:"Quantity"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.Quantity||0))])]}}])}),a("el-table-column",{attrs:{label:"单价",align:"center",prop:"UnitPrice"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v("¥"+t._s(t.formatMoney(e.row.UnitPrice)))])]}}])}),a("el-table-column",{attrs:{label:"金额",align:"center",prop:"Amount"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"amount-text"},[t._v("¥"+t._s(t.formatMoney(e.row.Amount)))])]}}])}),a("el-table-column",{attrs:{label:"领取时间",align:"center",prop:"ReceiveTime",width:"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.formatDateTime(e.row.ReceiveTime)))])]}}])})],1)],1)],1)])},r=[],o=(a("f576"),a("2909")),i=(a("55dd"),a("c5f6"),a("ac6a"),a("5df3"),a("4f7f"),a("b775")),s=a("9d50"),c={data:function(){var t=new Date;return{loading:!1,list:[],query:{Year:String(t.getFullYear()),Month:t.getMonth()+1,StoreId:void 0,Warehouse:void 0},storeOptions:[],warehouseOptions:[]}},computed:{totalApplicationCount:function(){return this.list.reduce((function(t,e){return t+(e.Quantity||0)}),0)},totalAmount:function(){return this.list.reduce((function(t,e){return t+(e.Amount||0)}),0)},storeCount:function(){var t=this.list.map((function(t){return t.StoreName})).filter((function(t){return t&&""!==t.trim()}));return new Set(t).size}},created:function(){this.initStoreOptions(),this.initWarehouseOptions(),this.initData()},methods:{initData:function(){var t=this;if(this.query.Year&&this.query.Month){this.loading=!0;var e={Year:Number(this.query.Year),Month:this.query.Month};this.query.StoreId&&(e.StoreId=this.query.StoreId),this.query.Warehouse&&(e.Warehouse=this.query.Warehouse),Object(s["i"])(e).then((function(e){t.loading=!1,200==e.code&&e.data&&e.data.success?t.list=e.data.data||[]:(t.list=[],e.data&&e.data.message&&t.$message({type:"info",message:e.data.message}))})).catch((function(){t.loading=!1,t.list=[]}))}else this.$message({type:"warning",message:"请选择统计年份和月份"})},initStoreOptions:function(){var t=this;Object(i["a"])({url:"/api/Extend/LqMdxx",method:"GET",data:{currentPage:1,pageSize:1e3}}).then((function(e){e.data&&e.data.list&&(t.storeOptions=e.data.list)})).catch((function(){t.storeOptions=[]}))},initWarehouseOptions:function(){var t=this;Object(i["a"])({url:"/api/Extend/LqProduct/GetList",method:"GET",data:{currentPage:1,pageSize:1e4}}).then((function(e){if(200==e.code&&e.data&&e.data.list){var a=e.data.list.map((function(t){return t.warehouse})).filter((function(t){return t&&""!==t.trim()}));t.warehouseOptions=Object(o["a"])(new Set(a)).sort()}})).catch((function(){t.warehouseOptions=[]}))},search:function(){this.initData()},reset:function(){var t=new Date;this.query={Year:String(t.getFullYear()),Month:t.getMonth()+1,StoreId:void 0,Warehouse:void 0},this.initData()},formatMoney:function(t){return t||0===t?Number(t).toFixed(2):"0.00"},formatDateTime:function(t){if(!t)return"无";var e=new Date(t>1e12?t:1e3*t);if(isNaN(e.getTime()))return"无";var a=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0"),o=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0"),s=String(e.getSeconds()).padStart(2,"0");return"".concat(a,"-").concat(n,"-").concat(r," ").concat(o,":").concat(i,":").concat(s)}}},l=c,u=(a("310c"),a("2877")),d=Object(u["a"])(l,n,r,!1,null,"7ec65df6",null);e["default"]=d.exports}}]);