增加专属报价功能
This commit is contained in:
@@ -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(() => {})
|
||||
|
||||
Reference in New Issue
Block a user