1 |
- webpackJsonp([18],{"74QC":function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n=e("fZjL"),i=e.n(n),s=e("Dd8w"),o=e.n(s),r=(e("hky6"),e("UVPs")),l=e("Lokx"),d=e.n(l),c=e("38N9"),p=e.n(c),h={name:"systemLogs",data:function(){return{loading:!1,params:{page_no:1,page_size:20},tableData:"",searchTime:"",showLogDetail:!1,currDetailLog:{},advancedForm:{},PrintVisible:!1,codeList:[],barcodeValue:"",multipleSelection:[]}},mounted:function(){this.GET_SystemLogs(),this.rowDrop()},methods:{handleSelectionChange:function(t){this.multipleSelection=t},batchPrint:function(){var t=this.multipleSelection.map(function(t){return t.sku});this.codeList=t,this.PrintVisible=!0},handlePrintGoodsLend:function(){p()({printable:"deliverySheet",type:"html",targetStyles:["*"],ignoreElements:["no-logs","goods-image","no-btn"]})},handleCancle:function(){this.PrintVisible=!1,this.codeList=[]},PrintIng:function(t){var a=this;this.barcodeValue=t.sku,this.$nextTick(function(){a.codeList.push(t.sku),a.PrintVisible=!0})},rowDrop:function(){var t=document.querySelector(".draggable-table .el-table__body-wrapper tbody"),a=this;d.a.create(t,{animation:300,handle:".drag-handle",onEnd:function(t){var e=t.newIndex,n=(t.oldIndex,a.tableData.data.splice(e,1)[0]);a.tableData.data.splice(e,0,n),a.updateList(n.id,e)}})},updateList:function(t,a){var e=this,n=[{position:"own",product_id:this.tableData.data[a].id,sort:this.tableData.data[a].sort}];a>0&&n.push({position:"before",product_id:this.tableData.data[a-1].id,sort:this.tableData.data[a-1].sort}),a<this.tableData.data.length-1&&n.push({position:"after",product_id:this.tableData.data[a+1].id,sort:this.tableData.data[a+1].sort}),r.h({data:n}).then(function(t){e.$message.success("更新成功!"),e.GET_SystemLogs()}).catch(function(){e.$message.error("更新失败!")})},handlePageSizeChange:function(t){this.params.page_size=t,this.GET_SystemLogs()},handlePageCurrentChange:function(t){this.params.page_no=t,this.GET_SystemLogs()},searchEvent:function(t){var a=this;this.params=o()({},this.params,{keyword:t}),i()(this.advancedForm).forEach(function(t){return delete a.params[t]}),this.params.page_no=1,this.GET_SystemLogs()},advancedSearchEvent:function(){this.params=o()({},this.params,this.advancedForm),delete this.params.start_time,delete this.params.end_time,this.advancedForm.order_time_range&&(this.params.start_time=this.advancedForm.order_time_range[0]/1e3,this.params.end_time=this.advancedForm.order_time_range[1]/1e3),delete this.params.keyword,delete this.params.order_time_range,this.params.page_no=1,this.GET_SystemLogs()},GET_SystemLogs:function(){var t=this;this.loading=!0;var a=this.MixinClone(this.params);i()(a).forEach(function(t){a[t]||0===a[t]||delete a[t]}),r.c(a).then(function(a){t.loading=!1,t.tableData=a,t.params.page_no=a.page_no,t.params.page_size=a.page_size}).catch(function(){t.loading=!1})},handleShowDetail:function(t){this.showLogDetail=!0,this.currDetailLog=t}}},u=e("XyMi");var g=function(t){e("lzRm"),e("dA9q")},m=Object(u.a)(h,function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("en-table-layout",{staticClass:"draggable-table",attrs:{tableData:t.tableData.data,loading:t.loading},on:{"selection-change":t.handleSelectionChange}},[e("div",{staticClass:"inner-toolbar inner-toolbar2",attrs:{slot:"toolbar"},slot:"toolbar"},[e("div",{staticClass:"toolbar-btns"},[e("el-button",{attrs:{size:"mini",type:"primary",disabled:0===t.multipleSelection.length},on:{click:t.batchPrint}},[t._v("批量打印")])],1)]),t._v(" "),e("template",{slot:"table-columns"},[e("el-table-column",{attrs:{label:"",width:"100"}},[[e("span",{staticClass:"drag-handle"},[t._v("☰")])]],2),t._v(" "),e("el-table-column",{attrs:{type:"selection",width:"55"}}),t._v(" "),e("el-table-column",{attrs:{prop:"goods_vo.name",label:"商品名称"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"selectable"},[t._v(t._s(a.row.goods_vo.name))])]}}])}),t._v(" "),e("el-table-column",{attrs:{prop:"goods_vo.sn",label:"商品编号"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"selectable"},[t._v(t._s(a.row.goods_vo.sn))])]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"SKU",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"selectable"},[t._v(t._s(a.row.sku))])]}}])}),t._v(" "),e("el-table-column",{attrs:{prop:"spec_name",label:"规格型号"}}),t._v(" "),e("el-table-column",{attrs:{prop:"sort",label:"排序号"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",{staticClass:"selectable"},[t._v(t._s(a.row.sort))])]}}])}),t._v(" "),e("el-table-column",{attrs:{label:"操作",width:"310"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t.PrintIng(a.row)}}},[t._v("打印SKU")])]}}])})],1),t._v(" "),t.tableData?e("el-pagination",{attrs:{slot:"pagination","current-page":t.tableData.page_no,"page-sizes":[20,50,70,100],"page-size":t.tableData.page_size,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.data_total},on:{"size-change":t.handlePageSizeChange,"current-change":t.handlePageCurrentChange},slot:"pagination"}):t._e()],2),t._v(" "),e("el-dialog",{attrs:{title:"打印预览",visible:t.PrintVisible,width:"940px",center:""},on:{"update:visible":function(a){t.PrintVisible=a},close:t.handleCancle}},[e("el-button",{staticClass:"print",attrs:{size:"mini",type:"primary"},on:{click:t.handlePrintGoodsLend}},[t._v("打印")]),t._v(" "),e("div",{staticStyle:{width:"900px"},attrs:{id:"deliverySheet"}},t._l(t.codeList,function(a,n){return e("div",{key:n,staticClass:"tips-t"},[e("div",[e("div",{staticClass:"numOrder"}),t._v(" "),e("div",{staticStyle:{"margin-top":"10px","font-size":"20px","text-align":"center"}},[e("barcode",{attrs:{value:a,format:"CODE128"}})],1)])])}),0)],1)],1)},[],!1,g,"data-v-aa2fe5d8",null);a.default=m.exports},N8kX:function(t,a,e){(t.exports=e("FZ+f")(!1)).push([t.i,'\n@charset "UTF-8";\n.nc-container[data-v-aa2fe5d8] {\n height: 32px !important;\n overflow: hidden;\n}\n.drag-handle[data-v-aa2fe5d8] {\n cursor: move;\n /* 设置鼠标为拖拽样式 */\n}\n.face-image[data-v-aa2fe5d8] {\n display: block;\n width: 50px;\n height: 50px;\n margin: 0 auto;\n}\n[data-v-aa2fe5d8] .el-dialog__body {\n padding: 10px 20px;\n}\n[data-v-aa2fe5d8] .img-code {\n width: 80%;\n}\n[data-v-aa2fe5d8] .img-code .el-input-group__append {\n padding: 0;\n margin: 0;\n}\n[data-v-aa2fe5d8] .img-code .el-input-group__append img {\n display: block;\n height: 30px;\n cursor: pointer;\n}\n.logInfo[data-v-aa2fe5d8] {\n margin-bottom: 20px;\n}\n',""])},dA9q:function(t,a,e){var n=e("N8kX");"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);e("rjj0")("22b53928",n,!0)},ixWt:function(t,a,e){(t.exports=e("FZ+f")(!1)).push([t.i,"\n.inner-toolbar2 {\r\n -webkit-box-pack: start !important;\r\n -ms-flex-pack: start !important;\r\n justify-content: flex-start !important;\n}\n.inner-toolbar2 .dateSearch {\r\n margin-right: 20px;\n}\n.toolbar-search {\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n width: 400px;\n}\n.toolbar-search .el-button {\r\n margin-left: 18px;\n}\r\n",""])},lzRm:function(t,a,e){var n=e("ixWt");"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);e("rjj0")("55ed735c",n,!0)}});
|