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 | 146 ++++++++++++++++++++++++++++++++++++++----------
1 files changed, 115 insertions(+), 31 deletions(-)
diff --git a/src/views/salesManagement/opportunityManagement/index.vue b/src/views/salesManagement/opportunityManagement/index.vue
index b656b88..c7d7dd3 100644
--- a/src/views/salesManagement/opportunityManagement/index.vue
+++ b/src/views/salesManagement/opportunityManagement/index.vue
@@ -23,6 +23,22 @@
@change="handleQuery"
/>
</el-form-item>
+ <el-form-item label="鐘舵��">
+ <el-select
+ v-model="searchForm.status"
+ placeholder="璇烽�夋嫨鐘舵��"
+ clearable
+ style="width: 160px"
+ @change="handleQuery"
+ >
+ <el-option
+ v-for="item in statusOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item>
<el-form-item label="褰曞叆浜�">
<el-select
v-model="searchForm.entryPerson"
@@ -86,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
@@ -102,7 +118,7 @@
size="small"
@click="handleAddOperation(row)"
>
- 娣诲姞鎻忚堪
+ 娣诲姞鏀归�犲唴瀹�
</el-button>
<el-button
link
@@ -184,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">
@@ -201,8 +242,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="淇℃伅鍖栫幇鐘�">
- <el-input v-model="form.informationState" placeholder="璇疯緭鍏ヤ俊鎭寲鐜扮姸" clearable :disabled="operationType === 'detail' || operationType === 'addOperation'" />
+ <el-form-item label="涓昏惀浜у搧">
+ <el-input v-model="form.mainProducts" placeholder="璇疯緭鍏ヤ富钀ヤ骇鍝�" clearable :disabled="operationType === 'detail' || operationType === 'addOperation'" />
</el-form-item>
</el-col>
</el-row>
@@ -222,23 +263,42 @@
<el-row :gutter="20">
<el-col :span="24">
- <el-form-item label="涓昏惀浜у搧">
- <el-input v-model="form.mainProducts" placeholder="璇疯緭鍏ヤ富钀ヤ骇鍝�" clearable :disabled="operationType === 'detail' || operationType === 'addOperation'" />
+ <el-form-item label="淇℃伅鍖栫幇鐘�">
+ <el-input v-model="form.informationState" placeholder="璇疯緭鍏ヤ俊鎭寲鐜扮姸" clearable :disabled="operationType === 'detail' || operationType === 'addOperation'" />
</el-form-item>
</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>
@@ -324,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>
@@ -379,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({
@@ -391,6 +470,7 @@
const searchForm = reactive({
customerName: '',
city: '',
+ status: '',
entryPerson: '',
entryDate: [],
entryDateStart: '',
@@ -413,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([])
@@ -518,6 +602,7 @@
Object.assign(searchForm, {
customerName: '',
city: '',
+ status: '',
entryPerson: '',
entryDate: [],
entryDateStart: '',
@@ -586,8 +671,7 @@
resetForm()
// 鍔犺浇鐢ㄦ埛鍒楄〃鍜屽鎴峰垪琛�
- let userLists = await userListNoPage()
- userList.value = userLists.data
+ await loadUserList()
customerList().then((res) => {
customerOption.value = res
})
@@ -608,8 +692,7 @@
operationType.value = 'addOperation'
// 鍔犺浇鐢ㄦ埛鍒楄〃鍜屽鎴峰垪琛�
- let userLists = await userListNoPage()
- userList.value = userLists.data
+ await loadUserList()
customerList().then((res) => {
customerOption.value = res
})
@@ -619,6 +702,7 @@
// 淇濈暀鍘熷鍟嗘満ID锛岀敤浜庡叧鑱旀搷浣滆褰�
status: row.status,
description: '', // 娓呯┖瀹㈡埛鎻忚堪锛屽厑璁搁噸鏂板~鍐�
+ paymentDescription: '', // 娓呯┖浠樻鎻忚堪锛屽厑璁搁噸鏂板~鍐�
entryPerson: userStore.nickName, // 璁剧疆褰曞叆浜轰负褰撳墠璐﹀彿
entryDate: dayjs().format('YYYY-MM-DD') // 璁剧疆褰曞叆鏃堕棿涓哄綋澶�
})
@@ -630,8 +714,7 @@
operationType.value = 'detail'
// 鍔犺浇鐢ㄦ埛鍒楄〃鍜屽鎴峰垪琛�
- let userLists = await userListNoPage()
- userList.value = userLists.data
+ await loadUserList()
customerList().then((res) => {
customerOption.value = res
})
@@ -673,8 +756,7 @@
operationType.value = 'edit'
// 鍔犺浇鐢ㄦ埛鍒楄〃鍜屽鎴峰垪琛�
- let userLists = await userListNoPage()
- userList.value = userLists.data
+ await loadUserList()
customerList().then((res) => {
customerOption.value = res
})
@@ -762,6 +844,7 @@
submitData = {
status: form.status,
description: form.description,
+ paymentDescription: form.paymentDescription,
entryPerson: form.entryPerson,
entryDate: form.entryDate,
tempFileIds: tempFileIds,
@@ -839,7 +922,9 @@
customerScale: '',
mainProducts: '',
businessSource: '',
+ contractAmount: '',
description: '',
+ paymentDescription: '',
entryPerson: userStore.nickName,
entryDate: dayjs().format('YYYY-MM-DD')
})
@@ -929,8 +1014,7 @@
onMounted(async () => {
// 鍔犺浇鐢ㄦ埛鍒楄〃渚涙悳绱娇鐢�
- const userLists = await userListNoPage()
- userList.value = userLists.data
+ await loadUserList()
getList()
})
</script>
--
Gitblit v1.9.3