diff --git a/src/dealer/customer/index.tsx b/src/dealer/customer/index.tsx index 85c8d5f..bc316ec 100644 --- a/src/dealer/customer/index.tsx +++ b/src/dealer/customer/index.tsx @@ -64,15 +64,18 @@ const CustomerIndex = () => { const editComments = (customer: CustomerUser) => { Taro.showModal({ title: '编辑跟进情况', + // @ts-ignore editable: true, placeholderText: '请输入跟进情况', content: customer.comments || '', success: async (res) => { + // @ts-ignore if (res.confirm && res.content !== undefined) { try { // 更新跟进情况 await updateShopDealerApply({ ...customer, + // @ts-ignore comments: res.content.trim() }); @@ -98,13 +101,6 @@ const CustomerIndex = () => { }); }; - // 检查是否有编辑权限 - const canEditComments = (customer: CustomerUser): boolean => { - const currentUserId = Taro.getStorageSync('UserId'); - // 只有客户的报备人可以编辑跟进情况 - return customer.userId === currentUserId; - }; - // 计算剩余保护天数(基于过期时间) const calculateProtectDays = (expirationTime?: string, applyTime?: string): number => { try { @@ -421,17 +417,15 @@ const CustomerIndex = () => { {/* 显示 comments 字段 */} 跟进情况:{customer.comments || '暂无'} - {canEditComments(customer) && ( - { - e.stopPropagation(); - editComments(customer); - }} - > - 编辑 - - )} + { + e.stopPropagation(); + editComments(customer); + }} + > + 编辑 +