diff --git a/src/api/crm/business/status/index.ts b/src/api/crm/business/status/index.ts
index cddaa5a2c..a4fe8fad9 100644
--- a/src/api/crm/business/status/index.ts
+++ b/src/api/crm/business/status/index.ts
@@ -1,14 +1,18 @@
import request from '@/config/axios'
export interface BusinessStatusTypeVO {
- id: number
+ id?: number
name: string
deptIds: number[]
- statuses?: {
- id: number
- name: string
- percent: number
- }
+ statuses: BusinessStatusVO[]
+}
+
+export interface BusinessStatusVO {
+ id?: number
+ name: string
+ percent?: number
+ endStatus?: number
+ key?: string
}
export const DEFAULT_STATUSES = [
@@ -30,7 +34,7 @@ export const DEFAULT_STATUSES = [
name: '无效',
percent: 0
}
-]
+] satisfies BusinessStatusVO[]
// 查询商机状态组列表
export const getBusinessStatusPage = async (params: any) => {
diff --git a/src/api/iot/ota/task/index.ts b/src/api/iot/ota/task/index.ts
index 454405c55..a09068ff0 100644
--- a/src/api/iot/ota/task/index.ts
+++ b/src/api/iot/ota/task/index.ts
@@ -6,8 +6,8 @@ export interface OtaTask {
name: string // 任务名称
description?: string // 任务描述
firmwareId?: number // 固件编号
- status: number // 任务状态
- deviceScope?: number // 升级范围
+ status?: number // 任务状态
+ deviceScope: number // 升级范围
deviceIds?: number[] // 指定设备ID列表(当升级范围为指定设备时使用)
deviceTotalCount?: number // 设备总共数量
deviceSuccessCount?: number // 设备成功数量
diff --git a/src/views/bpm/form/index.vue b/src/views/bpm/form/index.vue
index 57b44a36b..345d4ed45 100644
--- a/src/views/bpm/form/index.vue
+++ b/src/views/bpm/form/index.vue
@@ -28,7 +28,12 @@
重置
-
+
新增
@@ -114,7 +119,7 @@ const { currentRoute, push } = useRouter() // 路由
const loading = ref(true) // 列表的加载中
const total = ref(0) // 列表的总页数
-const list = ref([]) // 列表的数据
+const list = ref([]) // 列表的数据
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
diff --git a/src/views/bpm/model/form/FormDesign.vue b/src/views/bpm/model/form/FormDesign.vue
index 13488dc2b..6a9d85163 100644
--- a/src/views/bpm/model/form/FormDesign.vue
+++ b/src/views/bpm/model/form/FormDesign.vue
@@ -85,13 +85,11 @@ import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import * as FormApi from '@/api/bpm/form'
import { setConfAndFields2 } from '@/utils/formCreate'
import { BpmModelFormType } from '@/utils/constants'
+import type { Rule } from '@form-create/element-ui'
-const props = defineProps({
- formList: {
- type: Array,
- required: true
- }
-})
+defineProps<{
+ formList: FormApi.FormVO[]
+}>()
const formRef = ref()
@@ -101,7 +99,7 @@ const modelData = defineModel()
// 表单预览数据
const formPreview = ref({
formData: {},
- rule: [],
+ rule: [] as Rule[],
option: {
submitBtn: false,
resetBtn: false,
@@ -117,7 +115,7 @@ watch(
const data = await FormApi.getForm(newFormId)
setConfAndFields2(formPreview.value, data.conf, data.fields)
// 设置只读
- formPreview.value.rule.forEach((item: any) => {
+ formPreview.value.rule.forEach((item) => {
item.props = { ...item.props, disabled: true }
})
} else {
diff --git a/src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue b/src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
index 72181db45..305a6ff91 100644
--- a/src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
+++ b/src/views/bpm/processInstance/create/ProcessDefinitionDetail.vue
@@ -83,7 +83,7 @@ import {
import ProcessInstanceBpmnViewer from '../detail/ProcessInstanceBpmnViewer.vue'
import ProcessInstanceSimpleViewer from '../detail/ProcessInstanceSimpleViewer.vue'
import ProcessInstanceTimeline from '../detail/ProcessInstanceTimeline.vue'
-import type { ApiAttrs } from '@form-create/element-ui/types/config'
+import type { Api as FormCreateApi } from '@form-create/element-ui'
import { useTagsViewStore } from '@/store/modules/tagsView'
import * as ProcessInstanceApi from '@/api/bpm/processInstance'
import * as DefinitionApi from '@/api/bpm/definition'
@@ -105,7 +105,7 @@ const detailForm: any = ref({
option: {},
value: {}
}) // 流程表单详情
-const fApi = ref()
+const fApi = ref()
// 指定审批人
const startUserSelectTasks: any = ref([]) // 发起人需要选择审批人或抄送人的任务列表
const startUserSelectAssignees = ref({}) // 发起人选择审批人的数据
@@ -234,12 +234,10 @@ const getApprovalDetail = async (row: any) => {
const setFieldPermission = (field: string, permission: string) => {
if (permission === FieldPermissionType.READ) {
// 1. 设置字段为只读
- //@ts-ignore
fApi.value?.disabled(true, field)
// 2. 只读字段, 去掉验证规则
// fApi.value?.updateValidate(field, []); 这个方法貌似不起作用,
try {
- //@ts-ignore
const rule = fApi.value?.getRule(field)
if (rule) {
// 必填验证设置为false
@@ -254,11 +252,9 @@ const setFieldPermission = (field: string, permission: string) => {
}
}
if (permission === FieldPermissionType.WRITE) {
- //@ts-ignore
fApi.value?.disabled(false, field)
}
if (permission === FieldPermissionType.NONE) {
- //@ts-ignore
fApi.value?.hidden(true, field)
}
}
diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue
index 8690e58f4..708c0acc0 100644
--- a/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue
+++ b/src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue
@@ -48,7 +48,7 @@
diff --git a/src/views/crm/business/status/BusinessStatusForm.vue b/src/views/crm/business/status/BusinessStatusForm.vue
index 6eaf3cf46..a85883240 100644
--- a/src/views/crm/business/status/BusinessStatusForm.vue
+++ b/src/views/crm/business/status/BusinessStatusForm.vue
@@ -32,7 +32,7 @@
>
- 阶段 {{ scope.$index + 1 }}
+ 阶段 {{ scope.$index + 1 }}
结束
@@ -94,7 +94,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
const formType = ref('') // 表单的组:create - 新增;update - 修改
-const formData = ref({
+const formData = ref({
id: undefined,
name: '',
deptIds: [],
@@ -142,7 +142,7 @@ const submitForm = async () => {
// 提交请求
formLoading.value = true
try {
- const data = formData.value as unknown as BusinessStatusApi.BusinessStatusTypeVO
+ const data = formData.value
data.deptIds = treeRef.value.getCheckedKeys(false)
if (formType.value === 'create') {
await BusinessStatusApi.createBusinessStatus(data)
diff --git a/src/views/crm/contract/ContractForm.vue b/src/views/crm/contract/ContractForm.vue
index 67c03a497..881887e7d 100644
--- a/src/views/crm/contract/ContractForm.vue
+++ b/src/views/crm/contract/ContractForm.vue
@@ -257,7 +257,7 @@ watch(
const totalProductPrice = val.products.reduce((prev, curr) => prev + curr.totalPrice, 0)
const discountPrice =
val.discountPercent != null
- ? erpPriceMultiply(totalProductPrice, val.discountPercent / 100.0)
+ ? (erpPriceMultiply(totalProductPrice, (val.discountPercent ?? 0) / 100.0) ?? 0)
: 0
const totalPrice = totalProductPrice - discountPrice
// 赋值
diff --git a/src/views/crm/contract/components/ContractList.vue b/src/views/crm/contract/components/ContractList.vue
index f693c9ab1..1f0f27cff 100644
--- a/src/views/crm/contract/components/ContractList.vue
+++ b/src/views/crm/contract/components/ContractList.vue
@@ -77,7 +77,8 @@ const list = ref([]) // 列表的数据
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
- customerId: undefined as unknown // 允许 undefined + number
+ customerId: undefined as number | undefined,
+ businessId: undefined as number | undefined
})
/** 查询列表 */
@@ -86,6 +87,7 @@ const getList = async () => {
try {
// 置空参数
queryParams.customerId = undefined
+ queryParams.businessId = undefined
// 执行查询
let data = { list: [], total: 0 }
switch (props.bizType) {
diff --git a/src/views/crm/followup/index.vue b/src/views/crm/followup/index.vue
index 720af8671..d929bd807 100644
--- a/src/views/crm/followup/index.vue
+++ b/src/views/crm/followup/index.vue
@@ -33,7 +33,7 @@
:src="url"
:preview-src-list="scope.row.picUrls"
class="w-10 h-10 mr-1"
- :initial-index="index"
+ :initial-index="Number(index)"
fit="cover"
preview-teleported
/>
diff --git a/src/views/crm/receivable/ReceivableForm.vue b/src/views/crm/receivable/ReceivableForm.vue
index e74d4532e..365b73b8b 100644
--- a/src/views/crm/receivable/ReceivableForm.vue
+++ b/src/views/crm/receivable/ReceivableForm.vue
@@ -84,7 +84,7 @@
@@ -207,7 +207,9 @@ const open = async (
formData.value.customerId = receivablePlan.customerId
await handleCustomerChange(receivablePlan.customerId)
formData.value.contractId = receivablePlan.contractId
- await handleContractChange(receivablePlan.contractId)
+ if (receivablePlan.contractId) {
+ await handleContractChange(receivablePlan.contractId)
+ }
if (receivablePlan.id) {
formData.value.planId = receivablePlan.id
formData.value.price = receivablePlan.price
diff --git a/src/views/crm/receivable/detail/index.vue b/src/views/crm/receivable/detail/index.vue
index 394b2c2bd..7fa87d8a2 100644
--- a/src/views/crm/receivable/detail/index.vue
+++ b/src/views/crm/receivable/detail/index.vue
@@ -93,7 +93,7 @@ onMounted(async () => {
close()
return
}
- receivableId.value = id
+ receivableId.value = Number(id)
await getReceivable(receivableId.value)
})
diff --git a/src/views/crm/statistics/funnel/components/BusinessInversionRateSummary.vue b/src/views/crm/statistics/funnel/components/BusinessInversionRateSummary.vue
index 541d6fc47..aaeee1d85 100644
--- a/src/views/crm/statistics/funnel/components/BusinessInversionRateSummary.vue
+++ b/src/views/crm/statistics/funnel/components/BusinessInversionRateSummary.vue
@@ -180,7 +180,6 @@ const echartsOption = reactive({
type: 'value',
name: '赢单转化率',
axisTick: {
- alignWithLabel: true,
lineStyle: { width: 0 }
},
axisLabel: {
@@ -199,7 +198,6 @@ const echartsOption = reactive({
type: 'value',
name: '商机数',
axisTick: {
- alignWithLabel: true,
lineStyle: { width: 0 }
},
axisLabel: {
diff --git a/src/views/crm/statistics/performance/components/ContractCountPerformance.vue b/src/views/crm/statistics/performance/components/ContractCountPerformance.vue
index fa5a897ba..42728c9e0 100644
--- a/src/views/crm/statistics/performance/components/ContractCountPerformance.vue
+++ b/src/views/crm/statistics/performance/components/ContractCountPerformance.vue
@@ -120,7 +120,6 @@ const echartsOption = reactive({
type: 'value',
name: '',
axisTick: {
- alignWithLabel: true,
lineStyle: {
width: 0
}
@@ -195,8 +194,12 @@ const loadData = async () => {
}
// 初始化数据
-const columnsData = reactive([])
-const tableData = reactive([
+type TableColumn = { label: string; prop: string }
+
+type TableRow = { title: string; [key: string]: string | number }
+
+const columnsData = reactive([])
+const tableData = reactive([
{ title: '当月合同数量统计(个)' },
{ title: '上月合同数量统计(个)' },
{ title: '去年当月合同数量统计(个)' },
diff --git a/src/views/crm/statistics/performance/components/ContractPricePerformance.vue b/src/views/crm/statistics/performance/components/ContractPricePerformance.vue
index dd52d9fb3..18f5b7208 100644
--- a/src/views/crm/statistics/performance/components/ContractPricePerformance.vue
+++ b/src/views/crm/statistics/performance/components/ContractPricePerformance.vue
@@ -120,7 +120,6 @@ const echartsOption = reactive({
type: 'value',
name: '',
axisTick: {
- alignWithLabel: true,
lineStyle: {
width: 0
}
@@ -195,8 +194,12 @@ const loadData = async () => {
}
// 初始化数据
-const columnsData = reactive([])
-const tableData = reactive([
+type TableColumn = { label: string; prop: string }
+
+type TableRow = { title: string; [key: string]: string | number }
+
+const columnsData = reactive([])
+const tableData = reactive([
{ title: '当月合同金额统计(元)' },
{ title: '上月合同金额统计(元)' },
{ title: '去年当月合同金额统计(元)' },
diff --git a/src/views/crm/statistics/performance/components/ReceivablePricePerformance.vue b/src/views/crm/statistics/performance/components/ReceivablePricePerformance.vue
index 169f074b8..65cc5c3a0 100644
--- a/src/views/crm/statistics/performance/components/ReceivablePricePerformance.vue
+++ b/src/views/crm/statistics/performance/components/ReceivablePricePerformance.vue
@@ -120,7 +120,6 @@ const echartsOption = reactive({
type: 'value',
name: '',
axisTick: {
- alignWithLabel: true,
lineStyle: {
width: 0
}
@@ -195,8 +194,12 @@ const loadData = async () => {
}
// 初始化数据
-const columnsData = reactive([])
-const tableData = reactive([
+type TableColumn = { label: string; prop: string }
+
+type TableRow = { title: string; [key: string]: string | number }
+
+const columnsData = reactive([])
+const tableData = reactive([
{ title: '当月回款金额统计(元)' },
{ title: '上月回款金额统计(元)' },
{ title: '去年当月回款金额统计(元)' },
diff --git a/src/views/crm/statistics/performance/index.vue b/src/views/crm/statistics/performance/index.vue
index 822afec9b..cceee54ab 100644
--- a/src/views/crm/statistics/performance/index.vue
+++ b/src/views/crm/statistics/performance/index.vue
@@ -15,7 +15,6 @@
class="!w-240px"
type="year"
value-format="YYYY"
- :default-time="[new Date().getFullYear()]"
/>
diff --git a/src/views/iot/ota/firmware/detail/index.vue b/src/views/iot/ota/firmware/detail/index.vue
index 00e75781b..e5c5ee064 100644
--- a/src/views/iot/ota/firmware/detail/index.vue
+++ b/src/views/iot/ota/firmware/detail/index.vue
@@ -87,8 +87,9 @@
diff --git a/src/views/iot/ota/task/OtaTaskDetail.vue b/src/views/iot/ota/task/OtaTaskDetail.vue
index 950a3f97c..f0ee06ad9 100644
--- a/src/views/iot/ota/task/OtaTaskDetail.vue
+++ b/src/views/iot/ota/task/OtaTaskDetail.vue
@@ -6,10 +6,10 @@
{{ task.id }}
{{ task.name }}
-
+
-
+
{{ task.createTime ? formatDate(task.createTime) : '-' }}
diff --git a/src/views/mall/promotion/components/SpuSelect.vue b/src/views/mall/promotion/components/SpuSelect.vue
index 648a86356..94a55f121 100644
--- a/src/views/mall/promotion/components/SpuSelect.vue
+++ b/src/views/mall/promotion/components/SpuSelect.vue
@@ -150,7 +150,7 @@ const spuListRef = ref>()
const skuListRef = ref>() // 商品属性选择 Ref
const spuData = ref() // 商品详情
const isExpand = ref(false) // 控制 SKU 列表显示
-const expandRowKeys = ref() // 控制展开行需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。
+const expandRowKeys = ref() // 控制展开行需要设置 row-key 属性才能使用,该属性为展开行的 keys 数组。
//============ 商品选择相关 ============
const selectedSpuId = ref(0) // 选中的商品 spuId
@@ -210,7 +210,7 @@ const expandChange = async (row: ProductSpuApi.Spu, expandedRows?: ProductSpuApi
if (selectedSpuId.value !== 0) {
if (row.id !== selectedSpuId.value) {
message.warning('你已选择商品请先取消')
- expandRowKeys.value = [selectedSpuId.value]
+ expandRowKeys.value = [String(selectedSpuId.value)]
return
}
// 如果已展开 skuList 则选择此对应的 spu 不需要重新获取渲染 skuList
@@ -238,7 +238,7 @@ const expandChange = async (row: ProductSpuApi.Spu, expandedRows?: ProductSpuApi
propertyList.value = getPropertyList(res)
spuData.value = res
isExpand.value = true
- expandRowKeys.value = [row.id!]
+ expandRowKeys.value = [String(row.id!)]
}
// 确认选择时的触发事件
diff --git a/src/views/member/user/detail/UserAddressList.vue b/src/views/member/user/detail/UserAddressList.vue
index 479bd96a6..b67014af9 100644
--- a/src/views/member/user/detail/UserAddressList.vue
+++ b/src/views/member/user/detail/UserAddressList.vue
@@ -3,7 +3,7 @@
-
+
diff --git a/src/views/member/user/detail/UserSignList.vue b/src/views/member/user/detail/UserSignList.vue
index c89727416..214fc7f60 100644
--- a/src/views/member/user/detail/UserSignList.vue
+++ b/src/views/member/user/detail/UserSignList.vue
@@ -8,15 +8,6 @@
:inline="true"
label-width="68px"
>
-
-
-