From 2a500686266b8fc6dae991c799800e37083a45c2 Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期五, 05 九月 2025 14:03:24 +0800 Subject: [PATCH] 客户拜访真机测试,bug修改 --- src/pages/cooperativeOffice/clientVisit/index.vue | 75 ++++--------------------------------- 1 files changed, 8 insertions(+), 67 deletions(-) diff --git a/src/pages/cooperativeOffice/clientVisit/index.vue b/src/pages/cooperativeOffice/clientVisit/index.vue index 5b731d4..6ff2467 100644 --- a/src/pages/cooperativeOffice/clientVisit/index.vue +++ b/src/pages/cooperativeOffice/clientVisit/index.vue @@ -28,35 +28,9 @@ <view class="item-header"> <view class="item-left"> <view class="document-icon"> - <up-icon name="user" size="16" color="#ffffff"></up-icon> + <up-icon name="file-text" size="16" color="#ffffff"></up-icon> </view> <text class="item-id">瀹㈡埛锛歿{ item.customerName }}</text> - </view> - <view class="visit-status"> - <!-- 鏇挎崲鏍囩鍜屾寜閽� --> - <template> - <u-tag type="success">宸插畬鎴�</u-tag> - - <!-- 鎿嶄綔鎸夐挳 --> - <view class="action-buttons"> - <u-button - type="primary" - size="small" - class="action-btn" - @click="openDetail(item)" - > - 鏌ョ湅璇︽儏 - </u-button> - <u-button - type="warning" - size="small" - class="action-btn" - @click="editVisit(item)" - > - 缂栬緫 - </u-button> - </view> - </template> </view> </view> <up-divider></up-divider> @@ -98,18 +72,9 @@ type="primary" size="small" class="action-btn" - @click="viewDetail(item.id)" + @click="viewDetail(item)" > 鏌ョ湅璇︽儏 - </u-button> - <u-button - type="error" - size="small" - plain - class="action-btn" - @click="deleteRecord(item.id)" - > - 鍒犻櫎 </u-button> </view> </view> @@ -131,7 +96,7 @@ import { ref, onMounted } from 'vue' import { onShow } from '@dcloudio/uni-app' import PageHeader from '@/components/PageHeader.vue' -import { getVisitRecords, deleteVisitRecord } from '@/api/cooperativeOffice/clientVisit' +import { getVisitRecords } from '@/api/cooperativeOffice/clientVisit' import useUserStore from "@/store/modules/user" // 鏇挎崲 toast 鏂规硶 defineOptions({name: 'client-visit-index'}) @@ -157,19 +122,13 @@ uni.navigateBack() } -// 鏍煎紡鍖栨棩鏈熸椂闂� -const formatDateTime = (dateStr) => { - if (!dateStr) return '' - return dayjs(dateStr).format("YYYY-MM-DD HH:mm") -} - // 鏌ヨ鍒楄〃 const getList = () => { showLoadingToast('鍔犺浇涓�...') const params = { current: -1, size: -1, - customerName: customerName.value || undefined, + customerName: customerName.value, } getVisitRecords(params) .then((res) => { @@ -203,29 +162,11 @@ } // 鏌ョ湅璇︽儏 -const viewDetail = (id) => { - if (!id) return +const viewDetail = (item) => { + uni.setStorageSync('clientVisit', item) + // 鏌ョ湅璇︽儏璺宠浆鍒板彧璇诲睍绀洪〉闈� uni.navigateTo({ - url: `/pages/cooperativeOffice/clientVisit/detail?id=${id}` - }) -} - -// 鍒犻櫎璁板綍 -const deleteRecord = async (id) => { - if (!id) return - uni.showModal({ - title: '鎻愮ず', - content: '姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ嫓璁胯褰�, 鏄惁缁х画?', - success: async (res) => { - if (!res.confirm) return - try { - await deleteVisitRecord(id) - showToast('鍒犻櫎鎴愬姛') - getList() - } catch (e) { - showToast('鍒犻櫎澶辫触') - } - } + url: '/pages/cooperativeOffice/clientVisit/view' }) } -- Gitblit v1.9.3