32.dafc6eac8298c0916db1.js 14 KB

1
  1. webpackJsonp([32],{ARoL:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("Dd8w"),i=n.n(a),s=(n("qsHl"),n("NYxO")),o=n("FWz8"),r=n("ivlf"),l=(n("G+dR"),n("Ze8w")),c=n("dClm"),d=n("rySZ"),u=(n("IcnI"),{name:"dashboard_images",computed:i()({},Object(s.b)(["permission_routers"])),data:function(){return{purchaseList:[],stockList:[],listAll:[],OrderList:[],goodsLendListWaitReturnData:[],params:{page_no:1,page_size:9},loading:!1,goodsList:null,memberList:null,tableHeight:(document.body.clientHeight-250)/2,franchiseData:{},tableData:[],revenueChart:{},menuList:[],routerLIst:[],warehouseList:[],warehouse_id:""}},filters:{secrecyMobile:function(t){return t=String(t),/\d{11}/.test(t)?t.replace(/(\d{3})(\d{4})(\d{4})/,"$1****$3"):t}},activated:function(){window.onresize=this.countTableHeight},mounted:function(){var t=this;this.permission_routers.map(function(e){void 0!==e.name&&"dashboard"!==e.name&&t.menuList&&t.routerLIst.push(e)}),this.permission_routers.some(function(t){return"stock"===t.name})&&(this.stockList=this.permission_routers.find(function(t){return"stock"===t.name})),this.permission_routers.some(function(t){return"purchase"===t.name})&&(this.purchaseList=this.permission_routers.find(function(t){return"purchase"===t.name})),this.listAll=[],this.stockList.children&&this.purchaseList.children?this.listAll=this.stockList.children.concat(this.purchaseList.children):this.purchaseList.children?this.listAll=this.purchaseList.children:this.stockList.children&&(this.listAll=this.stockList.children),this.GET_WarehouseList(),this.GET_OrderList(),this.GET_GoodsLendList(),this.GET_menus()},methods:{addWarehouse:function(t){this.$router.push({name:"orderOutboundAdd",params:{id:t.id}})},warehouseName:function(t){var e=[];return this.warehouseList.map(function(n){t.map(function(t){if(n.id==t)return e.push(n.name)})}),e.join("/")},wareName:function(t){var e="";return this.warehouseList.map(function(n){if(n.id==t)return e=n.name}),e},cleanGoodsList:function(t){this.warehouse_id=t,this.GET_WarningGoodsList()},generateTitle:r.a,GET_GoodsLendList:function(){var t=this;this.loading=!0,o.k({page_no:1,page_size:10,selectType:"to_be_return"}).then(function(e){t.loading=!1,t.goodsLendListWaitReturnData=e}).catch(function(){t.loading=!1})},GET_OrderList:function(){var t=this;o.l({page_no:1,page_size:10,selectType:"to_be_send"}).then(function(e){t.OrderList=e})},checkIsauth:function(t){return this.listAll.some(function(e){return e.path===t})},GET_WarningGoodsList:function(){var t=this;d.g(this.warehouse_id).then(function(e){t.tableData=e})},countTableHeight:function(){this.tableHeight=(document.body.clientHeight-80-44-80-80-20-20-4)/2,setTimeout(this.sesalChart.resize)},GET_menus:function(){var t=this;l.e(0).then(function(e){e.map(function(e){e.children.map(function(e){1==e.show_home&&t.menuList.push(e)})})}),l.d(this.params).then(function(t){console.log(t)})},goList:function(t){var e=this;this.routerLIst.map(function(n){n.children.map(function(a){a.name==t.identifier&&(console.log(n),e.$router.push(n.name+"/"+a.path))})})},GET_WarehouseList:function(){var t=this;c.G().then(function(e){t.warehouse_id=e[0].id,t.warehouseList=e,t.GET_WarningGoodsList()})}}}),h=n("XyMi");var p=function(t){n("WzIn")},b=Object(h.a)(u,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"dashboard_images-container"},[n("el-row",{staticStyle:{"margin-top":"20px"},attrs:{gutter:20}},[n("el-col",{attrs:{span:24}},[n("el-card",{attrs:{shadow:"never"}},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("span",[t._v("快捷起草")])]),t._v(" "),n("div",{staticClass:"menus"},t._l(t.menuList,function(e,a){return n("div",{key:a,staticClass:"ments-item"},[n("div",{staticStyle:{display:"flex","flex-direction":"column","align-items":"center"},on:{click:function(n){return t.goList(e)}}},[n("div",[n("img",{attrs:{src:e.icon}})]),t._v(" "),n("div",[t._v(t._s(t.generateTitle(e.identifier)))])])])}),0)])],1)],1),t._v(" "),n("el-row",{staticStyle:{"margin-bottom":"0"},attrs:{gutter:20}},[t.checkPermission(["order"])?n("el-col",{attrs:{span:16}},[n("el-card",{staticStyle:{height:"350px"},attrs:{shadow:"never"}},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("span",[t._v("待发货订单")]),t._v(" "),n("router-link",{attrs:{to:"/sales/order"}},[n("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"}},[t._v("查看更多")])],1)],1),t._v(" "),n("div",{staticClass:"goods-statistics"},[n("el-table",{attrs:{data:t.OrderList.records,loading:t.loading,"header-cell-style":{textAlign:"center"}}},[n("el-table-column",{attrs:{prop:"order_vo.sn",label:"订单编号"}}),t._v(" "),n("el-table-column",{attrs:{prop:"warehouse_name",label:"仓库名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.warehouseName(e.row.order_vo.warehouse_id)))]}}],null,!1,621231599)}),t._v(" "),n("el-table-column",{attrs:{prop:"create_time",label:"下单时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t._f("unixToDate")(e.row.update_time)))]}}],null,!1,1033575770)}),t._v(" "),n("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{size:"mini"},on:{click:function(n){return t.addWarehouse(e.row)}}},[t._v("发货")])]}}],null,!1,4126592768)})],1)],1)])],1):t._e(),t._v(" "),t.checkIsauth("goods-understock")?n("el-col",{attrs:{span:8}},[n("el-card",{staticClass:"box-card",staticStyle:{height:"350px"},attrs:{shadow:"never"}},[n("div",{staticClass:"clearfix",staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"},attrs:{slot:"header"},slot:"header"},[n("span",[t._v("库存预警")]),t._v(" "),n("el-select",{staticStyle:{width:"100px"},attrs:{clearable:""},on:{change:t.cleanGoodsList},model:{value:t.warehouse_id,callback:function(e){t.warehouse_id=e},expression:"warehouse_id"}},t._l(t.warehouseList,function(t){return n("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}),1)],1),t._v(" "),n("div",{staticClass:"yu-statistics"},[n("el-table",{attrs:{data:t.tableData,loading:t.loading,height:"280","header-cell-style":{textAlign:"center"}}},[n("el-table-column",{attrs:{prop:"sn",label:"商品编号"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.goods_vo.sn))]}}],null,!1,1110551992)}),t._v(" "),n("el-table-column",{attrs:{prop:"name",label:"商品名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.goods_vo.name))]}}],null,!1,1682646626)}),t._v(" "),n("el-table-column",{attrs:{prop:"stock_num",label:"库存数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.usable_stock))]}}],null,!1,1809124910)}),t._v(" "),n("el-table-column",{attrs:{prop:"stock_num",label:"预警数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.warning_stock))]}}],null,!1,3054905224)}),t._v(" "),n("el-table-column",{attrs:{prop:"warehouse_id",label:"仓库名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.wareName(e.row.warehouse_id)))]}}],null,!1,1668203277)})],1)],1)])],1):t._e()],1),t._v(" "),t.checkIsauth("goods-lend-add")&&t.checkIsauth("goods-lend")?n("el-row",{staticStyle:{"margin-top":"20px","padding-bottom":"40px"},attrs:{gutter:12}},[n("el-col",{attrs:{span:16}},[n("el-card",{staticClass:"box-card",staticStyle:{height:"350px"},attrs:{shadow:"never"}},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("span",[t._v("待入库订单")]),t._v(" "),n("router-link",{attrs:{to:"/sales/order"}},[n("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"}},[t._v("查看更多")])],1)],1),t._v(" "),n("div",{staticClass:"goods-statistics"},[n("el-table",{attrs:{data:t.goodsLendListWaitReturnData.data,loading:t.loading,"header-cell-style":{textAlign:"center"}}},[n("el-table-column",{attrs:{prop:"sn",label:"订单编号"}}),t._v(" "),n("el-table-column",{attrs:{prop:"warehouse_name",label:"仓库名称"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t.warehouseName(e.row.warehouse_id)))]}}],null,!1,1423921161)}),t._v(" "),n("el-table-column",{attrs:{prop:"create_time",label:"下单时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t._f("unixToDate")(e.row.create_time)))]}}],null,!1,1362253999)})],1)],1)])],1)],1):t._e()],1)},[],!1,p,"data-v-c23b9870",null);e.default=b.exports},OyOb:function(t,e,n){(t.exports=n("FZ+f")(!1)).push([t.i,'\n@charset "UTF-8";\n[data-v-c23b9870] .el-table td:not(.is-left) {\n text-align: center;\n}\n.list-unstyled[data-v-c23b9870] {\n font-size: 14px;\n}\n.list-unstyled li[data-v-c23b9870] {\n padding-bottom: 5px;\n color: #3c8dbc;\n cursor: pointer;\n padding: 5.7px 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.list-unstyled .lis[data-v-c23b9870] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n}\n.list-unstyled a[data-v-c23b9870] {\n color: #3c8dbc;\n text-decoration: none;\n}\n.list-unstyled a[data-v-c23b9870]:hover {\n text-decoration: underline;\n}\n.menus[data-v-c23b9870] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: space-evenly;\n -ms-flex-pack: space-evenly;\n justify-content: space-evenly;\n font-size: 13px;\n padding: 30px 0 110px 0;\n}\n.menus .ments-item[data-v-c23b9870] {\n cursor: pointer;\n}\n.menus .ments-item img[data-v-c23b9870] {\n width: 45px;\n padding-bottom: 10px;\n}\n.menus .ments-item a[data-v-c23b9870] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.dashboard_images-container[data-v-c23b9870] {\n height: 100%;\n}\n.dashboard_images-container .flex-center[data-v-c23b9870] {\n height: 104px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 20px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.dashboard_images-container .flex-center .felx-left[data-v-c23b9870] {\n width: 56px;\n margin-right: 16px;\n}\n.dashboard_images-container .flex-center .felx-left img[data-v-c23b9870] {\n width: 100%;\n}\n.dashboard_images-container .flex-center .felx-right .num[data-v-c23b9870] {\n font-size: 24px;\n}\n.dashboard_images-container .flex-center .felx-right .title[data-v-c23b9870] {\n color: #747474;\n}\n.dashboard_images-container .shopping-info[data-v-c23b9870] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 20px 0;\n}\n.dashboard_images-container .shopping-info .shopping-info-item[data-v-c23b9870] {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n margin-right: 20px;\n margin-bottom: 20px;\n height: 68px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n color: #747474;\n}\n.dashboard_images-container .shopping-info .shopping-info-item .num[data-v-c23b9870] {\n height: 48px;\n line-height: 48px;\n font-size: 16px;\n font-weight: 600;\n color: #333;\n}\n.dashboard_images-container .shopping-info .shopping-info-item[data-v-c23b9870]:last-child {\n margin-right: 0px;\n}\n.dashboard_images-container[data-v-c23b9870] .el-card .el-card__header {\n border-bottom: none !important;\n /* 去除底部边框 */\n}\n.dashboard_images-container[data-v-c23b9870] .el-card__body {\n padding: 10px;\n}\n.dashboard_images-container .goods-statistics[data-v-c23b9870] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -ms-flex-pack: distribute;\n justify-content: space-around;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-align: center;\n}\n.dashboard_images-container .goods-statistics a[data-v-c23b9870] {\n display: block;\n margin: 0;\n width: 75%;\n}\n.dashboard_images-container .goods-statistics a button[data-v-c23b9870] {\n height: 50px;\n width: 400px;\n}\n.dashboard_images-container .yu-statistics[data-v-c23b9870] .el-table__row > td {\n /* 去除表格线 */\n border: none;\n}\n.dashboard_images-container .goods-image[data-v-c23b9870] {\n width: 50px;\n height: 50px;\n}\n.el-row[data-v-c23b9870] {\n position: relative;\n margin-bottom: 20px;\n}\n.el-col[data-v-c23b9870] {\n border-radius: 4px;\n}\n.goods-name[data-v-c23b9870] {\n color: #606266;\n}\n.o2o-goods-name[data-v-c23b9870] {\n color: #4183c4;\n}\n',""])},WzIn:function(t,e,n){var a=n("OyOb");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n("rjj0")("530eaa58",a,!0)}});