diff --git a/src/api/points.js b/src/api/points.js new file mode 100644 index 0000000..d6d89ab --- /dev/null +++ b/src/api/points.js @@ -0,0 +1,109 @@ +import request from "@/utils/request"; +// 会员积分 + +/** + * 基本设置-获取店铺设置 + * @returns + */ +export function basicSettingGet() { + let shopId = localStorage.getItem("shopId"); + return request({ + url: `/api/points/basic-setting/${shopId}`, + method: "get" + }); +} + +/** + * 基本设置-保存 + * @returns + */ +export function basicSettingPost(data) { + return request({ + url: "/api/points/basic-setting", + method: "post", + data + }); +} + +/** + * 商品设置-新增/编辑 + * @returns + */ +export function goodsSettingAdd(data) { + return request({ + url: "/api/points/goods-setting", + method: data.id ? "put" : "post", + data + }); +} + +/** + * 商品设置-删除 + * @returns + */ +export function goodsDelete(id) { + return request({ + url: `/api/points/goods-setting/${id}`, + method: "DELETE" + }); +} + +/** + * 商品设置-列表 + * @returns + */ +export function goodsSettingPage(params) { + let shopId = localStorage.getItem("shopId"); + return request({ + url: `/api/points/goods-setting/page`, + method: "get", + params: { + ...params, + shopId: shopId + } + }); +} + +/** + * 兑换记录-列表 + * @returns + */ +export function exchangeRecordPage(params) { + let shopId = localStorage.getItem("shopId"); + return request({ + url: `/api/points/exchange-record/page`, + method: "get", + params: { + ...params, + shopId: shopId + } + }); +} + +/** + * 兑换记录-统计 + * @returns + */ +export function exchangeRecordTotal(params) { + let shopId = localStorage.getItem("shopId"); + return request({ + url: `/api/points/exchange-record/total`, + method: "get", + params: { + ...params, + shopId: shopId + } + }); +} + +/** + * 兑换记录-核销 + * @returns + */ +export function recordCheckout(data) { + return request({ + url: "/api/points/exchange-record/checkout", + method: "post", + data + }); +} diff --git a/src/assets/images/1024.png b/src/assets/images/1024.png new file mode 100644 index 0000000..716381b Binary files /dev/null and b/src/assets/images/1024.png differ diff --git a/src/views/application/components/member_points/record.vue b/src/views/application/components/member_points/record.vue index 25048c4..2357bae 100644 --- a/src/views/application/components/member_points/record.vue +++ b/src/views/application/components/member_points/record.vue @@ -4,18 +4,18 @@
- + - - - + + + - - - + + + @@ -25,7 +25,7 @@ - 查询 + 查询 重置 @@ -37,7 +37,7 @@
-
¥1231
+
{{ countData.count }}
总订单数
@@ -46,7 +46,7 @@
-
¥0.00
+
¥{{ countData.totalAmount }}
已支付金额
@@ -54,51 +54,181 @@
- - - - - - - - - + + + + + + + + + + + + + + + + + + +
+
+ +
\ No newline at end of file diff --git a/src/views/application/member_points.vue b/src/views/application/member_points.vue index ffed912..3894dd0 100644 --- a/src/views/application/member_points.vue +++ b/src/views/application/member_points.vue @@ -16,6 +16,7 @@ import Setting from './components/member_points/setting.vue' import ShopList from './components/member_points/shop_list.vue' import Record from './components/member_points/record.vue' export default { + name: "member_points", components: { Setting, ShopList, @@ -23,7 +24,7 @@ export default { }, data() { return { - activeName: '3' + activeName: '1' } } } diff --git a/src/views/product/index.vue b/src/views/product/index.vue index 7362af3..5fbc199 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -21,7 +21,7 @@
- 添加商品 + 添加商品 @@ -139,7 +139,7 @@
- {{ scope.row.conInfos | conInfosFilter }} + {{ scope.row.conInfos | conInfosFilter }}
@@ -189,7 +189,7 @@ style="margin-left: 20px !important;"> 编辑 --> - 编辑 + 编辑 删除 @@ -244,6 +244,7 @@ import { tbProductListV2, tbShopCategoryGet, tbProductDelete, tbProductIsHot, up import { hasPermission } from '@/utils/limits.js' export default { + name: 'product', components: { BindCons, StockHistory @@ -315,14 +316,14 @@ export default { }, methods: { // 是否允许修改商品 - async toPath ( path , row) { + async toPath(path, row) { let res = await hasPermission('允许修改商品'); - if ( !res) { return; } + if (!res) { return; } let query = {}; - if ( row ) { + if (row) { query.goods_id = row.id; } - this.$router.push({path: path, query: query}) + this.$router.push({ path: path, query: query }) }, // 显示修改商品警告线 showStockWarningHandle() { @@ -383,13 +384,13 @@ export default { }, async changeGrounding(event, row, key) { let text; - if (key == 'grounding') { text = "允许上下架商品"} - if (key == 'pauseSale') { text = "允许售罄商品"} + if (key == 'grounding') { text = "允许上下架商品" } + if (key == 'pauseSale') { text = "允许售罄商品" } let res = await hasPermission(text); - if ( !res) { - if (key == 'grounding') { row.isGrounding = (event == 0 ? 1 : 0);} - if (key == 'pauseSale') { row.isPauseSale = (event == 0 ? 1 : 0);} - return; + if (!res) { + if (key == 'grounding') { row.isGrounding = (event == 0 ? 1 : 0); } + if (key == 'pauseSale') { row.isPauseSale = (event == 0 ? 1 : 0); } + return; } this.editorForm.key = key this.editorForm.id = row.id @@ -415,7 +416,7 @@ export default { // 修改库存 async changePrice(type, row) { let res = await hasPermission('允许修改商品库存'); - if ( !res) { return; } + if (!res) { return; } this.editorVisable = true this.editorForm.key = type this.editorForm.id = row.id @@ -437,7 +438,7 @@ export default { // 显示绑定耗材 async showBindCons(item) { let res = await hasPermission('允许修改商品'); - if ( !res) { return; } + if (!res) { return; } // console.log(item); this.$refs.bindCons.show(item) }, @@ -562,7 +563,7 @@ export default { // 删除商品 async delTableHandle(ids) { let res = await hasPermission('允许修改商品'); - if ( !res) { return; } + if (!res) { return; } try { await tbProductDelete(ids) this.getTableData() @@ -575,6 +576,10 @@ export default {