e0b5fc638cf56e22e2178f3ae1e914a75adfc9fd20cb7bd7f993cd065c02a1727c719e0cc92977ac003868e755c860513abd4fce1c80ef813537579b27b8 7.5 KB

1
  1. {"code":"/*!\n * build: vue-admin-beautiful \n * copyright: chuzhixin 1204505056@qq.com \n * time: 2022-12-12 09:51:32\n */\n(window[\"webpackJsonp\"]=window[\"webpackJsonp\"]||[]).push([[\"chunk-08366a7d\"],{1868:function(t,e,a){\"use strict\";a.r(e),a.d(e,\"enableIntegralGoods\",(function(){return o})),a.d(e,\"addIntegralGoods\",(function(){return l})),a.d(e,\"getIntegralGoodsInfo\",(function(){return r})),a.d(e,\"getAllIntegralGoods\",(function(){return s})),a.d(e,\"updateIntegralGoods\",(function(){return d})),a.d(e,\"deleteIntegralGoods\",(function(){return u})),a.d(e,\"getAllIntegralGoodsExchange\",(function(){return i})),a.d(e,\"updateIntegralGoodsExchange\",(function(){return c})),a.d(e,\"getIntegralRuleInfo\",(function(){return g})),a.d(e,\"getAllIntegralRule\",(function(){return f})),a.d(e,\"updateIntegralRule\",(function(){return p})),a.d(e,\"enableIntegralRule\",(function(){return h})),a.d(e,\"deleteIntegralRule\",(function(){return I})),a.d(e,\"addIntegralRule\",(function(){return m}));var n=a(\"b775\");function o(t,e){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/enableIntegralGoods/\"+t,method:\"get\",data:e})}function l(t){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/addIntegralGoods\",method:\"post\",data:t})}function r(t,e){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/getIntegralGoodsInfo/\"+t,method:\"get\",data:e})}function s(t){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/getAllIntegralGoods\",method:\"post\",data:t})}function d(t,e){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/updateIntegralGoods/\"+t,method:\"put\",data:e})}function u(t,e){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/deleteIntegralGoods/\"+t,method:\"delete\",data:e})}function i(t){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/getAllIntegralGoodsExchange\",method:\"post\",data:t})}function c(t,e){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/updateIntegralGoodsExchange/\"+t,method:\"put\",data:e})}function g(t,e){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/getIntegralRuleInfo/\"+t,method:\"post\",data:e})}function f(t){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/getAllIntegralRule\",method:\"post\",data:t})}function p(t,e){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/updateIntegralRule/\"+t,method:\"put\",data:e})}function h(t,e){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/enableIntegralRule/\"+t,method:\"get\",data:e})}function I(t,e){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/deleteIntegralRule/\"+t,method:\"get\",data:e})}function m(t){return Object(n[\"default\"])({url:\"/Integral/IntegralGoods/addIntegralRule\",method:\"post\",data:t})}},\"63a9\":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(\"ContainerQuery\",[t.$accessCheck(t.$Access.PointsGoodsManageAddPointsGoods)?a(\"div\",{attrs:{slot:\"left\"},slot:\"left\"},[a(\"el-button\",{attrs:{size:\"small\",type:\"primary\"},on:{click:function(e){return t.$router.push(\"/PointsMall/PointGoodsAdd\")}}},[t._v(\" 新增商品 \")])],1):t._e(),a(\"div\",{attrs:{slot:\"more\"},slot:\"more\"},[a(\"el-input\",{staticStyle:{width:\"220px\"},attrs:{placeholder:\"商品名称\",clearable:\"\"},on:{clear:function(e){return t.pageChange(1)}},nativeOn:{keyup:function(e){return!e.type.indexOf(\"key\")&&t._k(e.keyCode,\"enter\",13,e.key,\"Enter\")?null:t.pageChange(1)}},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:\"keyword\"}},[a(\"el-button\",{attrs:{slot:\"append\"},on:{click:function(e){return t.pageChange(1)}},slot:\"append\"},[a(\"i\",{staticClass:\"el-icon-search\"})])],1)],1),a(\"el-table\",{attrs:{data:t.goods_list}},[a(\"el-table-column\",{attrs:{type:\"selection\",width:\"55\",align:\"center\",fixed:\"left\"}}),a(\"el-table-column\",{attrs:{prop:\"materialName\",label:\"商品\",fixed:\"left\",\"min-width\":\"220\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[a(\"div\",{staticClass:\"clearfix\"},[a(\"div\",{staticClass:\"float_left\"},[a(\"el-image\",{attrs:{fit:\"cover\",src:e.row.images[0]}})],1),a(\"div\",{staticClass:\"float_left goods-name-view\"},[t._v(\" \"+t._s(e.row.name)+\" \")])])]}}])}),a(\"el-table-column\",{attrs:{prop:\"integral\",label:\"积分价格\",\"min-width\":\"120\"}}),a(\"el-table-column\",{attrs:{prop:\"changeNum\",label:\"已兑换数量\",\"min-width\":\"120\"}}),a(\"el-table-column\",{attrs:{prop:\"limit\",label:\"每人限兑\",\"min-width\":\"120\"}}),a(\"el-table-column\",{attrs:{prop:\"sort\",label:\"排序\",\"min-width\":\"120\"}}),a(\"el-table-column\",{attrs:{prop:\"createTime\",label:\"添加时间\",\"min-width\":\"160\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[t._v(\" \"+t._s(t.$_common.formatDate(e.row.createTime))+\" \")]}}])}),a(\"el-table-column\",{attrs:{prop:\"categoryName\",label:\"状态\",\"min-width\":\"120\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[t.$accessCheck(t.$Access.PointsGoodsManageStatusUpdate)?a(\"el-switch\",{staticClass:\"switchStyle\",attrs:{\"active-color\":\"#36B365\",\"active-value\":5,\"inactive-value\":4,\"active-text\":\"上架\",\"inactive-text\":\"下架\"},on:{change:function(a){return t.changeGoodsStatus(a,e.row.id)}},model:{value:e.row.enableStatus,callback:function(a){t.$set(e.row,\"enableStatus\",a)},expression:\"scope.row.enableStatus\"}}):a(\"div\",[5===e.row.enableStatus?a(\"span\",{staticClass:\"success-status\"},[t._v(\" 上架 \")]):a(\"span\",{staticClass:\"info-status\"},[t._v(\"下架\")])])]}}])}),a(\"el-table-column\",{attrs:{prop:\"categoryName\",label:\"操作\",\"min-width\":\"120\"},scopedSlots:t._u([{key:\"default\",fn:function(e){return[t.$accessCheck(t.$Access.PointsGoodsManageDeletePpintsGoods)?a(\"el-button\",{attrs:{type:\"text\"},on:{click:function(a){return t.delGoods(e.row.id)}}},[t._v(\" 删除 \")]):t._e(),t.$accessCheck(t.$Access.PointsGoodsManageEditPointsGoods)?a(\"el-button\",{attrs:{type:\"text\"},on:{click:function(a){return t.editGoods(e.row.id)}}},[t._v(\" 编辑 \")]):t._e()]}}])})],1),a(\"FooterPage\",{attrs:{\"page-size\":t.pageSize,\"total-page\":t.total,\"current-page\":t.page},on:{\"update:totalPage\":function(e){t.total=e},\"update:total-page\":function(e){t.total=e},\"update:currentPage\":function(e){t.page=e},\"update:current-page\":function(e){t.page=e},pageChange:t.pageChange,sizeChange:t.sizeChange}})],1)},o=[],l=a(\"1868\"),r={name:\"GoodsManage\",data(){return{pageSize:10,page:1,total:0,keyword:\"\",goods_list:[]}},created(){this.getAllIntegralGoods()},activated(){this.$_isInit()||this.getAllIntegralGoods()},methods:{async getAllIntegralGoods(){const{data:t,pageTotal:e}=await Object(l[\"getAllIntegralGoods\"])({search:this.keyword,page:this.page,pageSize:this.pageSize});this.goods_list=t,this.total=e},editGoods(t){this.$router.push(\"/PointsMall/PointGoodsEdit?id=\"+t)},async changeGoodsStatus(t,e){await Object(l[\"enableIntegralGoods\"])(e);this.$message.success(\"操作成功\"),this.getAllIntegralGoods()},pageChange(t){this.page=t,this.getAllIntegralGoods()},sizeChange(t){this.pageSize=t,this.pageChange(1)},delGoods(t){this.$confirm(\"确定要删除该商品吗?\",\"提示\",{confirmButtonText:\"确定\",cancelButtonText:\"取消\",type:\"warning\"}).then(async()=>{await Object(l[\"deleteIntegralGoods\"])(t);this.$message.success(\"删除成功\"),this.getAllIntegralGoods()})}}},s=r,d=a(\"2877\"),u=Object(d[\"a\"])(s,n,o,!1,null,\"2fc26792\",null);e[\"default\"]=u.exports}}]);","extractedComments":[]}