You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
3.1 KiB
JavaScript
1 line
3.1 KiB
JavaScript
|
5 years ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-60716892"],{"097a9":function(t,e,a){"use strict";var n=a("37ff"),i=a.n(n);i.a},"0b85":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",[a("div",{staticClass:"button-box"},[a("a-upload",{ref:"table",attrs:{name:"file",multiple:!0,accept:".xlsx",action:t.uploadProps.action,showUploadList:!1},on:{change:t.handleChange}},[a("a-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"primary"}},[t._v(" 导入 ")]),a("a-button",{attrs:{type:""},on:{click:t.stockExportModel}},[t._v(" 模板下载 ")])],1)],1),a("a-table",{attrs:{columns:t.columns,"row-key":function(t){return t.id},"data-source":t.data,pagination:t.pagination},on:{change:t.handleGetCameraIoList},scopedSlots:t._u([{key:"actions",fn:function(e){return a("span",{},[[a("span",[t._v(t._s(e.shelveId)+" "+t._s(e.column)+"列"+t._s(e.row)+"行")])]],2)}}])})],1)},i=[],o=(a("4160"),a("159b"),a("5530")),s=a("2000"),r=[{title:"序号",customRender:function(t,e,a){return 10*(e.pageNumber-1)+a+1}},{title:"品规",dataIndex:"category"},{title:"数量",dataIndex:"count"},{title:"货位",scopedSlots:{customRender:"actions"}},{title:"导入时间",dataIndex:"exportTime"}],c={data:function(){var t=this;return{pageNum:1,pageSize:10,data:[],pagination:{total:0,current:1,defaultPageSize:10,showTotal:function(t){return"共 ".concat(t," 条数据")},showSizeChanger:!0,pageSizeOptions:["10","20","30"],onShowSizeChange:function(e,a){return t.pageSize=a}},loading:!1,columns:r,visible:!1,modelType:"",modelData:[]}},computed:{uploadProps:function(){return{action:s["d"]}}},mounted:function(){this.handleGetCameraIoList()},methods:{handleChange:function(t){console.log(t),"done"==t.file.status?(this.$message.success(t.file.response.message),this.handleGetCameraIoList()):"error"==t.file.status&&this.$message.error(t.file.response.message)},handleGetCameraIoList:function(t){console.log(t),t&&(this.pagination.current=t.current,this.pagination.pageSize=t.pageSize,this.pageNum=t.current,this.pageSize=t.pageSize),this.request()},request:function(){var t=this;this.$api.httpApi.getStockpage({data:{pageNum:this.pageNum,pageSize:this.pageSize}}).then((function(e){var a=Object(o["a"])({},t.pagination);a.total=e.data.total,t.data=e.data.list,t.pagination=a,e.data.list.forEach((function(e,a){e.pageNumber=t.pagination.current}))})).catch((function(t){}))},stockExportModel:function(){var t=this;this.$api.httpApi.stockExportModel({params:{}}).then((function(e){var a=new Blob([e],{type:"application/vnd.ms-excel"});t.$utils.downloadFile("库存模板.xls",a)})).catch((function(t){}))}},components:{}},u=c,p=(a("097a9"),a("2877")),l=Object(p["a"])(u,n,i,!1,null,"04c90e0b",null);e["default"]=l.exports},2e3:function(t,e,a){"use strict";a.d(e,"c",(function(){return n})),a.d(e,"b",(function(){return i})),a.d(e,"d",(function(){return o})),a.d(e,"a",(function(){return s})),a.d(e,"e",(function(){return r}));var n="/api/camera/config/import",i="/api/category/import",o="/api/stock/import",s="/api/pic/",r="/api/mp4/"},"37ff":function(t,e,a){}}]);
|