Your Name
2022-11-30 f0cd5a4fe3b366fa753b8da5e387673c30c4d0f7
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-6da8"],{"1Dvt":function(t,e,r){"use strict";r.d(e,"r",function(){return n}),r.d(e,"d",function(){return s}),r.d(e,"c",function(){return c}),r.d(e,"q",function(){return o}),r.d(e,"k",function(){return u}),r.d(e,"l",function(){return l}),r.d(e,"g",function(){return d}),r.d(e,"i",function(){return p}),r.d(e,"f",function(){return h}),r.d(e,"h",function(){return f}),r.d(e,"e",function(){return y}),r.d(e,"p",function(){return b}),r.d(e,"a",function(){return m}),r.d(e,"b",function(){return v}),r.d(e,"j",function(){return g}),r.d(e,"o",function(){return j}),r.d(e,"m",function(){return k}),r.d(e,"n",function(){return O});var a=r("X4fA"),i=r("t3Un");function n(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/stock/info",method:"get",params:t||{}})}function s(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/stock/enterpriseStaticStock",method:"get",params:t||{}})}function c(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/stock/enterpriseSale",method:"get",params:t||{}})}function o(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/stock/saleInfo",method:"get",params:t||{}})}function u(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/stock/detail",method:"get",params:t||{}})}function l(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/statistics/enterprise-type-delivery",method:"post",data:t})}function d(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/statistics/export/enterprise-type-delivery",method:"post",data:t})}function p(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/statistics/city-type-delivery",method:"post",data:t})}function h(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/statistics/export/city-type-delivery",method:"post",data:t})}function f(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/statistics/city-type-entry",method:"post",data:t})}function y(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/statistics/export/city-type-entry",method:"post",data:t})}function b(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/stock/refreshStock",method:"post",data:t})}function m(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/stock/clearStock",method:"post",data:t})}function v(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/stock/clearStockByItem",method:"post",data:t})}function g(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/statistics/city-stock",method:"post",data:t})}function j(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/statistics/stock/history",method:"post",data:t})}function k(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/statistics/export/stock/history",method:"post",data:t})}function O(t){return Object(i.a)({headers:{Authorization:Object(a.a)()},url:"http://39.104.85.193:4105/statistics/history/city-stock",method:"post",data:t})}},"5W5M":function(t,e,r){"use strict";r.d(e,"g",function(){return n}),r.d(e,"b",function(){return s}),r.d(e,"d",function(){return c}),r.d(e,"i",function(){return o}),r.d(e,"f",function(){return u}),r.d(e,"e",function(){return l}),r.d(e,"a",function(){return d}),r.d(e,"c",function(){return p}),r.d(e,"h",function(){return h});var a=r("t3Un"),i=r("X4fA");function n(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/dictionary-types",method:"get",params:t||{}})}function s(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/adddictionary-types",method:"post",data:t})}function c(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/deldictionary-types",method:"post",data:t})}function o(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/putdictionary-types",method:"post",data:t})}function u(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/dictionary-items",method:"get",params:t||{}})}function l(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/dictionaryAllItems",method:"get",params:t||{}})}function d(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/adddictionary-items",method:"post",data:t})}function p(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/deldictionary-items",method:"post",data:t})}function h(t){return Object(a.a)({headers:{Authorization:Object(i.a)()},url:"http://39.104.85.193:4105/putdictionary-items",method:"post",data:t})}},PFhc:function(t,e,r){"use strict";r.r(e);var a=r("14Xm"),i=r.n(a),n=r("D3Ub"),s=r.n(n),c=r("1Dvt"),o=r("7Qib"),u=r("WZwz"),l=r("5W5M"),d=r("jJIE"),p=r.n(d),h={name:"cityStock",data:function(){return{pageSize:30,recordTotal:0,pageTotal:0,currentDate:"",listLoading:!1,tableData:[],checkTypeList:[],provinceList:[],cityList:[],districtList:[],isSupervision:p.a.get("isSupervision"),listQuery:{pageSize:30,pageIndex:1,filter:{specificDate:"",province:"",city:"",district:"",enterprisename:"",safetysupervision:""}}}},created:function(){this.initCurrentDate(),this.getHistoryStock(),this.getDictionaryCheckType(),"null"===this.isSupervision&&(this.listQuery.filter.safetysupervision="烟花爆竹批发经营"),this.getProvince()},methods:{handleSizeChange:function(t){this.listQuery.pageSize=t,this.getHistoryStock()},handleCurrentChange:function(t){this.listQuery.pageIndex=t,this.getHistoryStock()},search:function(){this.getHistoryStock()},getHistoryStock:function(){var t=this;null==this.listQuery.filter.specificDate&&this.initCurrentDate(),this.listLoading=!0,Object(c.o)(this.listQuery).then(function(e){"200"===e.data.code?(t.tableData=e.data.result.records,t.recordTotal=e.data.result.total,t.pageTotal=Object(o.a)(e.data.result.total,e.data.result.size)):t.$message({type:"warning",message:e.data.message})}).finally(function(e){t.listLoading=!1})},initCurrentDate:function(){var t=new Date,e=t.getFullYear(),r=t.getMonth(),a=t.getDate(),i=e+"-"+(r=(r+=1).toString().padStart(2,"0"))+"-"+(a=a.toString().padStart(2,"0"));this.$set(this.listQuery.filter,"specificDate",i)},formatJson:function(t,e){return e.map(function(e){return t.map(function(t){return e[t]})})},exportToExcel:function(){var t=this;return s()(i.a.mark(function e(){var a,n;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return null==t.listQuery.filter.specificDate&&t.initCurrentDate(),e.next=3,Object(c.m)(t.listQuery);case 3:"200"===(a=e.sent).data.code?null===a.data.result||a.data.result===[]||0===a.data.result.length?t.$message({type:"warning",message:"无数据可导出"}):(n=a.data.result,Promise.all([r.e("chunk-0d49"),r.e("chunk-5aa0")]).then(r.bind(null,"S/jZ")).then(function(e){var r=t.formatJson(["enterprisename","stocknum","firecracker","spray","rotation","bead","toy","combined"],n);e.export_json_to_excel({header:["企业名称","库存总数(箱)","爆竹类(箱)","喷花类(箱)","旋转类(箱)","吐珠类(箱)","玩具类(箱)","组合烟花类(箱)"],data:r,filename:"企业历史库存统计"})})):t.$message({message:a.data.message,type:"warning"});case 5:case"end":return e.stop()}},e,t)}))()},getProvince:function(){var t=this;return s()(i.a.mark(function e(){var r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(u.b)();case 2:"200"===(r=e.sent).data.code&&(t.provinceList=r.data.result.provinceList);case 4:case"end":return e.stop()}},e,t)}))()},changeArea:function(t){var e=this;return s()(i.a.mark(function r(){var a,n;return i.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if("province"!==t){r.next=10;break}return e.listQuery.filter.city="",e.listQuery.filter.district="",e.areaListQuery={type:2,parenttype:1,parentname:e.listQuery.filter.province},r.next=6,Object(u.a)(e.areaListQuery);case 6:"200"===(a=r.sent).data.code&&(e.cityList=a.data.result),r.next=17;break;case 10:if("city"!==t){r.next=17;break}return e.listQuery.filter.district="",e.areaListQuery={type:3,parenttype:2,parentname:e.listQuery.filter.city},r.next=15,Object(u.a)(e.areaListQuery);case 15:"200"===(n=r.sent).data.code&&(e.districtList=n.data.result);case 17:case"end":return r.stop()}},r,e)}))()},getDictionaryCheckType:function(){var t=this;if(!(t.checkTypeList&&t.checkTypeList.length>0)){var e={dictionaryType:"安全监管分类"};Object(l.e)(e).then(function(e){var r=e.data;"200"===r.code?t.checkTypeList=r.result:parseError({error:r.message,vm:t})}).catch(function(e){parseError({error:e,vm:t})})}}}},f=(r("QGmU"),r("KHd+")),y=Object(f.a)(h,function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"app-container"},[r("div",{staticClass:"filter-container"},[r("el-row",{staticStyle:{"padding-top":"10px"}},[r("div",{staticStyle:{display:"block"}},[r("div",{staticClass:"basic_search"},[r("span",[t._v("地域:  ")]),t._v(" "),r("el-select",{attrs:{placeholder:"请选择省份",clearable:"",filterable:""},on:{change:function(e){t.changeArea("province")}},model:{value:t.listQuery.filter.province,callback:function(e){t.$set(t.listQuery.filter,"province",e)},expression:"listQuery.filter.province"}},t._l(t.provinceList,function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.name}})}))],1),t._v(" "),r("div",{staticClass:"basic_search"},[r("el-select",{attrs:{prop:"city",clearable:"",filterable:""},on:{change:function(e){t.changeArea("city")}},model:{value:t.listQuery.filter.city,callback:function(e){t.$set(t.listQuery.filter,"city",e)},expression:"listQuery.filter.city"}},t._l(t.cityList,function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.name}})}))],1),t._v(" "),r("div",{staticClass:"basic_search"},[r("el-select",{attrs:{clearable:"",filterable:""},on:{change:function(e){t.changeArea("district")}},model:{value:t.listQuery.filter.district,callback:function(e){t.$set(t.listQuery.filter,"district",e)},expression:"listQuery.filter.district"}},t._l(t.districtList,function(t){return r("el-option",{key:t.id,attrs:{label:t.name,value:t.name}})}))],1),t._v(" "),r("div",{staticClass:"basic_search"},[r("span",[t._v("企业类型:")]),t._v(" "),r("el-select",{attrs:{placeholder:"请选择企业类型",clearable:"",filterable:""},model:{value:t.listQuery.filter.safetysupervision,callback:function(e){t.$set(t.listQuery.filter,"safetysupervision","string"==typeof e?e.trim():e)},expression:"listQuery.filter.safetysupervision"}},[r("el-option",{attrs:{value:"",label:"全部"}}),t._v(" "),t._l(t.checkTypeList,function(t,e){return r("el-option",{key:e,attrs:{label:t.text,value:t.text}})})],2)],1)])]),t._v(" "),r("el-row",{staticStyle:{"padding-top":"10px"}},[t._v("\n            企业名称:\n            "),r("el-input",{staticClass:"filter-item",staticStyle:{width:"20%","padding-right":"15px"},attrs:{placeholder:"企业名称"},nativeOn:{keyup:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?t.search(e):null}},model:{value:t.listQuery.filter.enterprisename,callback:function(e){t.$set(t.listQuery.filter,"enterprisename",e)},expression:"listQuery.filter.enterprisename"}}),t._v("\n\n            查询时间:\n            "),r("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date"},model:{value:t.listQuery.filter.specificDate,callback:function(e){t.$set(t.listQuery.filter,"specificDate",e)},expression:"listQuery.filter.specificDate"}}),t._v(" "),r("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(e){t.search()}}},[t._v("查询")]),t._v(" "),r("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-download"},on:{click:t.exportToExcel}},[t._v("导出")])],1)],1),t._v(" "),r("div",{staticClass:"table_content"},[r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData,border:"",fit:"","highlight-current-row":""}},[r("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"60"}}),t._v(" "),r("el-table-column",{attrs:{label:"企业名称",prop:"enterprisename",align:"center",width:"300"}}),t._v(" "),r("el-table-column",{attrs:{label:"库存总数(箱)",prop:"stocknum",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"爆竹类(箱)",prop:"firecracker",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"喷花类(箱)",prop:"spray",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"旋转类(箱)",prop:"rotation",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"吐珠类(箱)",prop:"bead",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"玩具类(箱)",prop:"toy",align:"center"}}),t._v(" "),r("el-table-column",{attrs:{label:"组合烟花类(箱)",prop:"combined",align:"center"}})],1),t._v(" "),r("br"),t._v(" "),r("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.recordTotal>0,expression:"recordTotal>0"}],staticStyle:{float:"right"},attrs:{"current-page":t.listQuery.pageIndex,"page-sizes":[30,50,100,200,500],"page-size":t.listQuery.pageSize,total:t.recordTotal,layout:"total, sizes, prev, pager, next, jumper",background:""},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}),t._v(" "),r("br")],1)])},[],!1,null,"f205eba0",null);y.options.__file="historystock.vue";e.default=y.exports},QGmU:function(t,e,r){"use strict";var a=r("ZCvE");r.n(a).a},ZCvE:function(t,e,r){}}]);