增加专属报价功能

This commit is contained in:
wuweihua
2026-11-05 12:57:13 +08:00
parent 557d43a0b8
commit 308526ecee
32 changed files with 3817 additions and 567 deletions
@@ -12,7 +12,7 @@
size="small"
icon="Plus"
@click="dialogRef.open()"
v-hasPermi="['price:set:edit']"
v-hasPermi="editPerm"
>添加客户</el-button>
</template>
@@ -31,8 +31,8 @@
</el-table-column>
<el-table-column v-if="editable" label="操作" width="120" align="center" fixed="right">
<template #default="{ row }">
<el-button link type="primary" @click="dialogRef.open(row)" v-hasPermi="['price:set:edit']">编辑</el-button>
<el-button link type="danger" @click="remove(row)" v-hasPermi="['price:set:edit']">解绑</el-button>
<el-button link type="primary" @click="dialogRef.open(row)" v-hasPermi="editPerm">编辑</el-button>
<el-button link type="danger" @click="remove(row)" v-hasPermi="editPerm">解绑</el-button>
</template>
</el-table-column>
</el-table>
@@ -55,7 +55,10 @@
import SetSectionCard from './SetSectionCard.vue'
import SetCustomerDialog from './SetCustomerDialog.vue'
import { isChildEditable } from '../../utils/priceSet'
import { delSetCustomer } from '@/api/price/set'
import { usePriceSetModule, usePriceSetPerm } from '../../composables/usePriceSetModule'
const { api } = usePriceSetModule()
const editPerm = usePriceSetPerm('edit')
const props = defineProps({
/** 套餐详情对象 */
@@ -75,7 +78,7 @@ const customers = computed(() => props.set.customers || [])
const editable = computed(() => isChildEditable(props.set.status))
function remove(row) {
proxy.$modal.confirm('确认解绑该客户?').then(() => delSetCustomer(row.customerPricesetId)).then(() => {
proxy.$modal.confirm('确认解绑该客户?').then(() => api.delSetCustomer(row.customerPricesetId)).then(() => {
proxy.$modal.msgSuccess('已解绑')
emit('refresh')
}).catch(() => {})