| | |
| | | @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" |
| | |
| | | {{ 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 |
| | |
| | | size="small" |
| | | @click="handleAddOperation(row)" |
| | | > |
| | | 添加描述 |
| | | 添加改造内容 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | |
| | | </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"> |
| | |
| | | </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> |
| | |
| | | |
| | | <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> |
| | | |
| | |
| | | </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> |
| | |
| | | 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({ |
| | |
| | | const searchForm = reactive({ |
| | | customerName: '', |
| | | city: '', |
| | | status: '', |
| | | entryPerson: '', |
| | | entryDate: [], |
| | | entryDateStart: '', |
| | |
| | | customerScale: '', |
| | | mainProducts: '', |
| | | businessSource: '', |
| | | contractAmount: '', |
| | | description: '', |
| | | paymentDescription: '', |
| | | entryPerson: userStore.nickName, |
| | | entryDate: dayjs().format('YYYY-MM-DD') |
| | | }) |
| | | |
| | | const renovationPlaceholder = '1.标准化:\n2.定制化:\n3.外采:' |
| | | |
| | | // 变更记录数据(模拟数据) |
| | | const changeHistory = ref([]) |
| | |
| | | Object.assign(searchForm, { |
| | | customerName: '', |
| | | city: '', |
| | | status: '', |
| | | entryPerson: '', |
| | | entryDate: [], |
| | | entryDateStart: '', |
| | |
| | | resetForm() |
| | | |
| | | // 加载用户列表和客户列表 |
| | | let userLists = await userListNoPage() |
| | | userList.value = userLists.data |
| | | await loadUserList() |
| | | customerList().then((res) => { |
| | | customerOption.value = res |
| | | }) |
| | |
| | | operationType.value = 'addOperation' |
| | | |
| | | // 加载用户列表和客户列表 |
| | | let userLists = await userListNoPage() |
| | | userList.value = userLists.data |
| | | await loadUserList() |
| | | customerList().then((res) => { |
| | | customerOption.value = res |
| | | }) |
| | |
| | | // 保留原始商机ID,用于关联操作记录 |
| | | status: row.status, |
| | | description: '', // 清空客户描述,允许重新填写 |
| | | paymentDescription: '', // 清空付款描述,允许重新填写 |
| | | entryPerson: userStore.nickName, // 设置录入人为当前账号 |
| | | entryDate: dayjs().format('YYYY-MM-DD') // 设置录入时间为当天 |
| | | }) |
| | |
| | | operationType.value = 'detail' |
| | | |
| | | // 加载用户列表和客户列表 |
| | | let userLists = await userListNoPage() |
| | | userList.value = userLists.data |
| | | await loadUserList() |
| | | customerList().then((res) => { |
| | | customerOption.value = res |
| | | }) |
| | |
| | | operationType.value = 'edit' |
| | | |
| | | // 加载用户列表和客户列表 |
| | | let userLists = await userListNoPage() |
| | | userList.value = userLists.data |
| | | await loadUserList() |
| | | customerList().then((res) => { |
| | | customerOption.value = res |
| | | }) |
| | |
| | | submitData = { |
| | | status: form.status, |
| | | description: form.description, |
| | | paymentDescription: form.paymentDescription, |
| | | entryPerson: form.entryPerson, |
| | | entryDate: form.entryDate, |
| | | tempFileIds: tempFileIds, |
| | |
| | | customerScale: '', |
| | | mainProducts: '', |
| | | businessSource: '', |
| | | contractAmount: '', |
| | | description: '', |
| | | paymentDescription: '', |
| | | entryPerson: userStore.nickName, |
| | | entryDate: dayjs().format('YYYY-MM-DD') |
| | | }) |
| | |
| | | |
| | | onMounted(async () => { |
| | | // 加载用户列表供搜索使用 |
| | | const userLists = await userListNoPage() |
| | | userList.value = userLists.data |
| | | await loadUserList() |
| | | getList() |
| | | }) |
| | | </script> |