From d7ba9c0757cb96f542801b6babeff82967f4630b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 03 三月 2026 16:20:00 +0800
Subject: [PATCH] 公司 1.商机管理添加字段合同金额与付款描述字段,以及其他字段优化修改 2.商机管理录入人查询条件修改
---
src/views/salesManagement/opportunityManagement/index.vue | 120 ++++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 93 insertions(+), 27 deletions(-)
diff --git a/src/views/salesManagement/opportunityManagement/index.vue b/src/views/salesManagement/opportunityManagement/index.vue
index 888a9ac..c7d7dd3 100644
--- a/src/views/salesManagement/opportunityManagement/index.vue
+++ b/src/views/salesManagement/opportunityManagement/index.vue
@@ -102,7 +102,7 @@
{{ formatDate(row.updateTime) }}
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔" fixed="right" width="220" align="center">
+ <el-table-column label="鎿嶄綔" fixed="right" width="240" align="center">
<template #default="{ row }">
<el-button
link
@@ -118,7 +118,7 @@
size="small"
@click="handleAddOperation(row)"
>
- 娣诲姞鎻忚堪
+ 娣诲姞鏀归�犲唴瀹�
</el-button>
<el-button
link
@@ -200,15 +200,40 @@
</el-select>
</el-form-item>
- <el-form-item label="瀹㈡埛鍚嶇О" prop="customerName">
- <el-select v-model="form.customerName" placeholder="璇烽�夋嫨" clearable :disabled="operationType === 'detail' || operationType === 'addOperation'">
- <el-option v-for="item in customerOption" :key="item.customerName" :label="item.customerName" :value="item.customerName">
- {{
- item.customerName + "鈥斺��" + item.taxpayerIdentificationNumber
- }}
- </el-option>
- </el-select>
- </el-form-item>
+ <el-row :gutter="20">
+ <el-col :span="12">
+ <el-form-item label="瀹㈡埛鍚嶇О" prop="customerName">
+ <el-select
+ v-model="form.customerName"
+ placeholder="璇烽�夋嫨"
+ clearable
+ style="width: 100%"
+ :disabled="operationType === 'detail' || operationType === 'addOperation'"
+ >
+ <el-option
+ v-for="item in customerOption"
+ :key="item.customerName"
+ :label="item.customerName"
+ :value="item.customerName"
+ >
+ {{
+ item.customerName + "鈥斺��" + item.taxpayerIdentificationNumber
+ }}
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鍟嗘満鏉ユ簮" prop="businessSource">
+ <el-input
+ v-model="form.businessSource"
+ placeholder="璇疯緭鍏ュ晢鏈烘潵婧�"
+ clearable
+ :disabled="operationType === 'detail' || operationType === 'addOperation'"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
<el-row :gutter="20">
<el-col :span="12">
@@ -244,17 +269,36 @@
</el-col>
</el-row>
- <el-form-item label="鍟嗘満鏉ユ簮" prop="businessSource">
- <el-input v-model="form.businessSource" placeholder="璇疯緭鍏ュ晢鏈烘潵婧�" :disabled="operationType === 'detail' || operationType === 'addOperation'" />
+ <el-form-item label="鍚堝悓閲戦" prop="contractAmount">
+ <el-input
+ v-model="form.contractAmount"
+ placeholder="璇疯緭鍏ュ悎鍚岄噾棰�"
+ clearable
+ :disabled="operationType === 'detail' || operationType === 'addOperation'"
+ >
+ <template #append>鍏�</template>
+ </el-input>
</el-form-item>
- <el-form-item label="瀹㈡埛鎻忚堪" prop="description" v-if="operationType !== 'detail'">
+ <el-form-item label="鏀归�犲唴瀹�" prop="description">
<el-input
v-model="form.description"
type="textarea"
- :rows="3"
- placeholder="璇疯緭鍏ュ鎴锋弿杩�"
+ :autosize="{ minRows: 4, maxRows: 10 }"
+ :placeholder="renovationPlaceholder"
show-word-limit
+ :disabled="operationType === 'detail'"
+ />
+ </el-form-item>
+
+ <el-form-item label="浠樻鎻忚堪" prop="paymentDescription">
+ <el-input
+ v-model="form.paymentDescription"
+ type="textarea"
+ :autosize="{ minRows: 3, maxRows: 10 }"
+ placeholder="鏄惁鍨祫锛熶紒涓氭槸鍚﹀紑绁紵浼佷笟鏄惁鍒嗚ˉ璐存垨棰濆鍑洪挶锛�"
+ show-word-limit
+ :disabled="operationType === 'detail'"
/>
</el-form-item>
@@ -340,7 +384,7 @@
</el-tag>
</div>
<div class="description-change" v-if="record.description">
- <span class="label">瀹㈡埛鎻忚堪锛�</span>
+ <span class="label">鏀归�犲唴瀹癸細</span>
<span class="description-text">{{ record.description }}</span>
</div>
</div>
@@ -395,6 +439,25 @@
const tableLoading = ref(false)
const userList = ref([])
const customerOption = ref([])
+const DEFAULT_USER_QUERY = { postCode: 'Market_Sales' }
+let userListPromise = null
+
+const loadUserList = async (query = DEFAULT_USER_QUERY) => {
+ if (userListPromise) return userListPromise
+ userListPromise = (async () => {
+ try {
+ const res = await userListNoPage(query)
+ userList.value = res?.data || []
+ return userList.value
+ } catch (err) {
+ console.error('鑾峰彇鐢ㄦ埛鍒楄〃澶辫触:', err)
+ userList.value = []
+ userListPromise = null
+ throw err
+ }
+ })()
+ return userListPromise
+}
// 鍒嗛〉閰嶇疆
const page = reactive({
@@ -430,10 +493,14 @@
customerScale: '',
mainProducts: '',
businessSource: '',
+ contractAmount: '',
description: '',
+ paymentDescription: '',
entryPerson: userStore.nickName,
entryDate: dayjs().format('YYYY-MM-DD')
})
+
+const renovationPlaceholder = '1.鏍囧噯鍖栵細\n2.瀹氬埗鍖栵細\n3.澶栭噰锛�'
// 鍙樻洿璁板綍鏁版嵁锛堟ā鎷熸暟鎹級
const changeHistory = ref([])
@@ -604,8 +671,7 @@
resetForm()
// 鍔犺浇鐢ㄦ埛鍒楄〃鍜屽鎴峰垪琛�
- let userLists = await userListNoPage()
- userList.value = userLists.data
+ await loadUserList()
customerList().then((res) => {
customerOption.value = res
})
@@ -626,8 +692,7 @@
operationType.value = 'addOperation'
// 鍔犺浇鐢ㄦ埛鍒楄〃鍜屽鎴峰垪琛�
- let userLists = await userListNoPage()
- userList.value = userLists.data
+ await loadUserList()
customerList().then((res) => {
customerOption.value = res
})
@@ -637,6 +702,7 @@
// 淇濈暀鍘熷鍟嗘満ID锛岀敤浜庡叧鑱旀搷浣滆褰�
status: row.status,
description: '', // 娓呯┖瀹㈡埛鎻忚堪锛屽厑璁搁噸鏂板~鍐�
+ paymentDescription: '', // 娓呯┖浠樻鎻忚堪锛屽厑璁搁噸鏂板~鍐�
entryPerson: userStore.nickName, // 璁剧疆褰曞叆浜轰负褰撳墠璐﹀彿
entryDate: dayjs().format('YYYY-MM-DD') // 璁剧疆褰曞叆鏃堕棿涓哄綋澶�
})
@@ -648,8 +714,7 @@
operationType.value = 'detail'
// 鍔犺浇鐢ㄦ埛鍒楄〃鍜屽鎴峰垪琛�
- let userLists = await userListNoPage()
- userList.value = userLists.data
+ await loadUserList()
customerList().then((res) => {
customerOption.value = res
})
@@ -691,8 +756,7 @@
operationType.value = 'edit'
// 鍔犺浇鐢ㄦ埛鍒楄〃鍜屽鎴峰垪琛�
- let userLists = await userListNoPage()
- userList.value = userLists.data
+ await loadUserList()
customerList().then((res) => {
customerOption.value = res
})
@@ -780,6 +844,7 @@
submitData = {
status: form.status,
description: form.description,
+ paymentDescription: form.paymentDescription,
entryPerson: form.entryPerson,
entryDate: form.entryDate,
tempFileIds: tempFileIds,
@@ -857,7 +922,9 @@
customerScale: '',
mainProducts: '',
businessSource: '',
+ contractAmount: '',
description: '',
+ paymentDescription: '',
entryPerson: userStore.nickName,
entryDate: dayjs().format('YYYY-MM-DD')
})
@@ -947,8 +1014,7 @@
onMounted(async () => {
// 鍔犺浇鐢ㄦ埛鍒楄〃渚涙悳绱娇鐢�
- const userLists = await userListNoPage()
- userList.value = userLists.data
+ await loadUserList()
getList()
})
</script>
--
Gitblit v1.9.3