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.5 KiB
JavaScript
1 line
3.5 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0ab3aab0"],{"0b85":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("div",{staticClass:"button-box"},[e("a-upload",{ref:"table",attrs:{name:"file",multiple:!0,accept:".xlsx",action:t.uploadProps.action,showUploadList:!1},on:{change:t.handleChange}},[e("a-button",{staticStyle:{"margin-right":"15px"},attrs:{type:"primary"}},[t._v(" 导入 ")]),e("a-button",{attrs:{type:""},on:{click:t.stockExportModel}},[t._v(" 模板下载 ")])],1)],1),e("a-table",{staticStyle:{"margin-top":"40px"},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(a){return e("span",{},[[e("span",[t._v(t._s(a.shelveId)+" "+t._s(a.column)+"列"+t._s(a.row)+"行")])]],2)}}])})],1)},i=[],o=(e("4160"),e("159b"),e("5530")),s=e("2000"),r=[{title:"序号",customRender:function(t,a,e){return 10*(a.pageNumber-1)+e+1}},{title:"条码",dataIndex:"code"},{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(a,e){return t.pageSize=e}},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(a){var e=Object(o["a"])({},t.pagination);e.total=a.data.total,t.data=a.data.list,t.pagination=e,a.data.list.forEach((function(a,e){a.pageNumber=t.pagination.current}))})).catch((function(t){}))},stockExportModel:function(){var t=this;this.$api.httpApi.stockExportModel({params:{}}).then((function(a){var e=new Blob([a],{type:"application/vnd.ms-excel"});t.$utils.downloadFile("库存模板.xls",e)})).catch((function(t){}))}},components:{}},u=c,p=(e("516d"),e("2877")),l=Object(p["a"])(u,n,i,!1,null,"2729c605",null);a["default"]=l.exports},2e3:function(t,a,e){"use strict";e.d(a,"c",(function(){return n})),e.d(a,"b",(function(){return i})),e.d(a,"d",(function(){return o})),e.d(a,"a",(function(){return s})),e.d(a,"e",(function(){return r}));var n="/api/camera/config/import",i="/api/category/import",o="/api/stock/import",s="/api/pic/",r="/api/mp4/"},"516d":function(t,a,e){"use strict";var n=e("fab2"),i=e.n(n);i.a},a3b8:function(t,a,e){var n=e("24fb");a=n(!1),a.push([t.i,".alarm .ant-form-item-label[data-v-2729c605]{text-align:left}.button-box[data-v-2729c605]{position:absolute;top:20px;right:40px;display:flex;align-items:center;justify-content:center}.button-box .add[data-v-2729c605]{margin-right:20px}",""]),t.exports=a},fab2:function(t,a,e){var n=e("a3b8");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=e("499e").default;i("645a4d86",n,!0,{sourceMap:!1,shadowMode:!1})}}]); |