1.新增店铺装修小票设置

2.店铺装修新增pad点餐设置
3.应用中心新增会员积分
4.店铺设置新增积分设置
This commit is contained in:
gyq
2024-11-01 10:23:05 +08:00
parent f4b0414856
commit 9bf1dda6dc
10 changed files with 757 additions and 101 deletions

View File

@@ -21,7 +21,7 @@
<div class="head-container">
<div class="header_wrap">
<!-- <router-link :to="{ name: 'add_shop' }" > -->
<el-button type="primary" icon="el-icon-plus" @click="toPath( '/product/add_shop')">添加商品</el-button>
<el-button type="primary" icon="el-icon-plus" @click="toPath('/product/add_shop')">添加商品</el-button>
<!-- </router-link> -->
<el-select v-model="tableData.sort" placeholder="排序" @change="getTableData">
<el-option value="createdAt,desc" label="创建时间"></el-option>
@@ -139,7 +139,7 @@
<div class="cons_wrap" v-if="scope.row.typeEnum">
<div v-if="scope.row.conInfos && scope.row.conInfos.length">
<el-button type="text" @click="showBindCons(scope.row)">
{{ scope.row.conInfos | conInfosFilter }}
<span class="cons_span">{{ scope.row.conInfos | conInfosFilter }}</span>
<i class="el-icon-edit"></i>
</el-button>
</div>
@@ -189,7 +189,7 @@
style="margin-left: 20px !important;">
<el-button type="text" icon="el-icon-edit">编辑</el-button>
</router-link> -->
<el-button type="text" icon="el-icon-edit" @click="toPath( '/product/add_shop' ,scope.row )">编辑</el-button>
<el-button type="text" icon="el-icon-edit" @click="toPath('/product/add_shop', scope.row)">编辑</el-button>
<el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important;"
slot="reference">删除</el-button>
@@ -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 {
</script>
<style scoped lang="scss">
.cons_span {
white-space: break-spaces;
}
.header_wrap {
display: flex;
align-items: center;