Commit d6e1bd25 by 李伟康

fix(NegotiationDetail): 修复客户抽屉打开权限控制问题

- 将客户抽屉打开方法从内联调用改为独立方法
- 添加权限检查避免无编辑权限时打开客户抽屉
- 在表格组件中添加禁用属性控制编辑状态
- 统一权限验证逻辑确保界面交互一致性
1 parent bef5749c
......@@ -8,7 +8,7 @@
<view class="sprite-icon icon-negotiation-detail-count"></view>
今日待接待客户数<text class="text-primary">{{ customerCount }}</text>
</view>
<view class="fixed-btn flex" @click="$refs.CustomerDrawer.open()">
<view class="fixed-btn flex" @click="openCustomerDrawer">
查看客户
<uni-icons type="right" size="12" color="#2C66F7"></uni-icons>
</view>
......@@ -29,7 +29,7 @@
<template v-if="i.children.length">
<Table :columns="i.children[0]" :data="i.children" titleKey="label" tableStyle="padding-right:32rpx"
customTable cornerText="序号" LeftWidth="104rpx" @rowClick="handleRowClick" :tableIndex="index"
hasFooter @clickAdd="addItem(index)" :maxLength="i.rules.maxLength">
hasFooter @clickAdd="addItem(index)" :maxLength="i.rules.maxLength" :disabled="!saveBtn">
<template v-slot:customCell="{ row, colIndex }">
<text>{{ formatValue(row[colIndex].value) }}</text>
<template v-if="row[colIndex].unit && formatValue(row[colIndex].value) != '-'">
......@@ -201,6 +201,10 @@ export default {
this.$emit('maxLengthError', error)
}
},
openCustomerDrawer(){
if(!this.saveBtn) return
this.$refs.CustomerDrawer.open()
}
}
}
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!