chunk-643eb91f.a87ce1e5.js 8.7 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-643eb91f"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),Math.easeInOutQuad=function(t,e,n,a){return t/=a/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function o(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function r(t,e,n){var r=i(),s=t-r,u=20,c=0;e="undefined"===typeof e?500:e;var l=function t(){c+=u;var i=Math.easeInOutQuad(c,r,s,e);o(i),c<e?a(t):n&&"function"===typeof n&&n()};l()}},2543:function(t,e,n){"use strict";n.d(e,"f",(function(){return s})),n.d(e,"g",(function(){return u})),n.d(e,"d",(function(){return c})),n.d(e,"h",(function(){return l})),n.d(e,"e",(function(){return p})),n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return g}));var a=n("b775"),o=n("4328"),i=n.n(o),r="/api-web";function s(t){return Object(a["a"])({url:r+"/goods/queryPage",method:"get",params:t})}function u(t){return Object(a["a"])({url:r+"/goods/get/".concat(t),method:"get"})}function c(t){return Object(a["a"])({url:r+"/goods/add",method:"post",data:i.a.stringify(t)})}function l(t){return Object(a["a"])({url:r+"/goods/update",method:"post",data:i.a.stringify(t)})}function p(t){return Object(a["a"])({url:r+"/goods/del/".concat(t),method:"post"})}function d(t){return Object(a["a"])({url:r+"/category/queryPage",method:"get",params:t})}function f(t){return Object(a["a"])({url:r+"/category/upset",method:"post",data:t})}function g(t){return Object(a["a"])({url:r+"/category/del",method:"post",data:i.a.stringify(t)})}},"333d":function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[n("el-pagination",t._b({attrs:{"current-page":t.currentPage,"page-size":t.pageSize,layout:t.layout,"page-sizes":t.pageSizes,total:t.total},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$attrs,!1))],1)},o=[],i=(n("c5f6"),n("09f4")),r={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:10},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total,sizes,prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(t){this.$emit("update:page",t)}},pageSize:{get:function(){return this.limit},set:function(t){this.$emit("update:limit",t)}}},methods:{handleSizeChange:function(t){this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&Object(i["a"])(0,800)},handleCurrentChange:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&Object(i["a"])(0,800)}}},s=r,u=(n("c0b9"),n("2877")),c=Object(u["a"])(s,a,o,!1,null,"31cb099a",null);e["a"]=c.exports},"54b3":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"m-container"},[t._m(0),t._v(" "),n("div",{staticClass:"m-core"},[n("div",{directives:[{name:"permission",rawName:"v-permission",value:"/shopOperation",expression:"'/shopOperation'"}],staticClass:"newBand",on:{click:function(e){return t.onShopOperation("create")}}},[t._v("添加")]),t._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",prop:"id",label:"商品编号"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"brand",label:"品牌"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"name",label:"商品名称"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"商品类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("shopType")(e.row.type))+"\n ")]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"goodsCategoryName",label:"商品分类"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"specification",label:"具体型号"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",{staticStyle:{"max-height":"64px",display:"block"}},[t._v(t._s(e.row.specification))])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"marketPrice",label:"商品价格"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"groupPurchasePrice",label:"商品团购价"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"discountPrice",label:"商品采购价"}}),t._v(" "),n("el-table-column",{attrs:{align:"center","cell-style":"padding: 0",label:"商品缩略图片"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("img",{staticClass:"shopImage",attrs:{src:t.row.image,alt:"",srcset:""}})]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"商品明细"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"shopDesc"},[t._v("\n "+t._s(e.row.desc)+"\n ")])]}}])}),t._v(" "),n("el-table-column",{attrs:{align:"center",width:"140px",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.status?n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"goods/update",expression:"'goods/update'"}],attrs:{type:"text"},on:{click:function(n){return t.onUpdate(e.row)}}},[t._v("上架")]):t._e(),t._v(" "),0==e.row.status?n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"/shopOperation",expression:"'/shopOperation'"}],attrs:{type:"text"},on:{click:function(n){return t.onShopOperation("update",e.row)}}},[t._v("修改")]):t._e(),t._v(" "),1==e.row.status?n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"goods/update",expression:"'goods/update'"}],attrs:{type:"text"},on:{click:function(n){return t.onUpdate(e.row)}}},[t._v("下架")]):t._e()]}}])})],1),t._v(" "),n("pagination",{attrs:{total:t.pageInfo.total,page:t.pageInfo.page,limit:t.pageInfo.limit,"page-sizes":t.pageInfo.page_size},on:{"update:page":function(e){return t.$set(t.pageInfo,"page",e)},"update:limit":function(e){return t.$set(t.pageInfo,"limit",e)},pagination:t.getList}})],1)])])},o=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h2",[n("div",{staticClass:"squrt"}),t._v("商品列表\n ")])}],i=n("333d"),r=n("2543"),s=(n("4360"),{components:{pagination:i["a"]},name:"shopList",data:function(){return{organId:null,searchForm:{status:""},searchLsit:[],tableList:[],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},created:function(){this.init()},activated:function(){this.init()},mounted:function(){},methods:{init:function(){this.$route.query.searchForm&&(this.$route.query.searchForm instanceof Object?this.searchForm=this.$route.query.searchForm:this.searchForm=JSON.parse(this.$route.query.searchForm)),this.$route.query.pageInfo&&(this.$route.query.pageInfo instanceof Object?this.pageInfo=this.$route.query.pageInfo:this.pageInfo=JSON.parse(this.$route.query.pageInfo)),this.getList()},onUpdate:function(t){var e=this;Object(r["h"])({id:t.id,status:t.status?0:1}).then((function(n){e.messageTips(t.status?"下架":"上架",n)}))},onDelete:function(t){var e=this;this.$confirm("您确定删除该商品吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(r["e"])(t.id).then((function(t){e.messageTips("删除",t)}))})).catch((function(){}))},messageTips:function(t,e){200==e.code?(this.$message.success(t+"成功"),this.typeStatus=!1,this.getList()):this.$message.error(e.msg)},getList:function(){var t=this;Object(r["f"])({organId:this.organId,rows:this.pageInfo.limit,page:this.pageInfo.page}).then((function(e){200==e.code&&e.data&&(t.tableList=e.data.rows,t.pageInfo.total=e.data.total)}))},onShopOperation:function(t,e){var n={type:t};e&&(n.id=e.id);var a=JSON.stringify(this.pageInfo),o=JSON.stringify(n);this.$router.push({path:"/shopManager/shopOperation",query:{paramInfo:o,pageInfo:a}})}}}),u=s,c=(n("f195"),n("2877")),l=Object(c["a"])(u,a,o,!1,null,null,null);e["default"]=l.exports},c0b9:function(t,e,n){"use strict";var a=n("de4e"),o=n.n(a);o.a},de4e:function(t,e,n){},f195:function(t,e,n){"use strict";var a=n("fef8"),o=n.n(a);o.a},fef8:function(t,e,n){}}]);