diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index 364483b8..37fee8c7 100644 --- a/src/api/mall/trade/order/index.ts +++ b/src/api/mall/trade/order/index.ts @@ -141,7 +141,7 @@ export const getExpressTrackList = async (id: number | null) => { } export interface DeliveryVO { - id: number // 订单编号 + id?: number // 订单编号 logisticsId: number | null // 物流公司编号 logisticsNo: string // 物流编号 } diff --git a/src/views/crm/business/status/BusinessStatusForm.vue b/src/views/crm/business/status/BusinessStatusForm.vue index 166fa41b..d6a4d6f8 100644 --- a/src/views/crm/business/status/BusinessStatusForm.vue +++ b/src/views/crm/business/status/BusinessStatusForm.vue @@ -100,7 +100,7 @@ const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的组:create - 新增;update - 修改 const formData = ref({ - id: 0, + id: undefined, name: '', deptIds: [], statuses: [] @@ -168,7 +168,7 @@ const submitForm = async () => { const resetForm = () => { checkStrictly.value = true formData.value = { - id: 0, + id: undefined, name: '', deptIds: [], statuses: [] diff --git a/src/views/erp/product/category/ProductCategoryForm.vue b/src/views/erp/product/category/ProductCategoryForm.vue index ef4a003e..778943f0 100644 --- a/src/views/erp/product/category/ProductCategoryForm.vue +++ b/src/views/erp/product/category/ProductCategoryForm.vue @@ -138,7 +138,7 @@ const resetForm = () => { const getProductCategoryTree = async () => { productCategoryTree.value = [] const data = await ProductCategoryApi.getProductCategoryList() - const root: Tree = { id: 0, name: '顶级产品分类', children: [] } + const root: Tree = { id: undefined, name: '顶级产品分类', children: [] } root.children = handleTree(data, 'id', 'parentId') productCategoryTree.value.push(root) } diff --git a/src/views/infra/demo/demo02/Demo02CategoryForm.vue b/src/views/infra/demo/demo02/Demo02CategoryForm.vue index f4c5f8e2..bc29c151 100644 --- a/src/views/infra/demo/demo02/Demo02CategoryForm.vue +++ b/src/views/infra/demo/demo02/Demo02CategoryForm.vue @@ -107,7 +107,7 @@ const resetForm = () => { const getDemo02CategoryTree = async () => { demo02CategoryTree.value = [] const data = await Demo02CategoryApi.getDemo02CategoryList() - const root: Tree = { id: 0, name: '顶级示例分类', children: [] } + const root: Tree = { id: undefined, name: '顶级示例分类', children: [] } root.children = handleTree(data, 'id', 'parentId') demo02CategoryTree.value.push(root) } diff --git a/src/views/mall/trade/afterSale/form/AfterSaleDisagreeForm.vue b/src/views/mall/trade/afterSale/form/AfterSaleDisagreeForm.vue index 1fa2b0f5..af3ab354 100644 --- a/src/views/mall/trade/afterSale/form/AfterSaleDisagreeForm.vue +++ b/src/views/mall/trade/afterSale/form/AfterSaleDisagreeForm.vue @@ -27,7 +27,7 @@ const message = useMessage() // 消息弹窗 const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = ref({ - id: 0, // 售后订单编号 + id: undefined, // 售后订单编号 auditReason: '' // 审批备注 }) const formRef = ref() // 表单 Ref @@ -62,7 +62,7 @@ const submitForm = async () => { /** 重置表单 */ const resetForm = () => { formData.value = { - id: 0, // 售后订单编号 + id: undefined, // 售后订单编号 auditReason: '' // 审批备注 } formRef.value?.resetFields() diff --git a/src/views/mall/trade/brokerage/user/UpdateBindUserForm.vue b/src/views/mall/trade/brokerage/user/UpdateBindUserForm.vue index 6d407540..77ffac78 100644 --- a/src/views/mall/trade/brokerage/user/UpdateBindUserForm.vue +++ b/src/views/mall/trade/brokerage/user/UpdateBindUserForm.vue @@ -103,7 +103,7 @@ const submitForm = async () => { /** 重置表单 */ const resetForm = () => { formData.value = { - id: 0, + id: undefined, bindUserId: undefined } formRef.value?.resetFields() diff --git a/src/views/mall/trade/order/form/OrderDeliveryForm.vue b/src/views/mall/trade/order/form/OrderDeliveryForm.vue index 2411f1ce..3b98c2e6 100644 --- a/src/views/mall/trade/order/form/OrderDeliveryForm.vue +++ b/src/views/mall/trade/order/form/OrderDeliveryForm.vue @@ -43,7 +43,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const expressType = ref('express') // 如果值是 express,则是快递;none 则是无;未来做同城配送; const formData = ref({ - id: 0, // 订单编号 + id: undefined, // 订单编号 logisticsId: null, // 物流公司编号 logisticsNo: '' // 物流编号 }) @@ -86,7 +86,7 @@ const submitForm = async () => { /** 重置表单 */ const resetForm = () => { formData.value = { - id: 0, // 订单编号 + id: undefined, // 订单编号 logisticsId: null, // 物流公司编号 logisticsNo: '' // 物流编号 } diff --git a/src/views/mall/trade/order/form/OrderUpdateAddressForm.vue b/src/views/mall/trade/order/form/OrderUpdateAddressForm.vue index 9c857064..baedb4a2 100644 --- a/src/views/mall/trade/order/form/OrderUpdateAddressForm.vue +++ b/src/views/mall/trade/order/form/OrderUpdateAddressForm.vue @@ -44,7 +44,7 @@ const message = useMessage() // 消息弹窗 const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = ref({ - id: 0, // 订单编号 + id: undefined, // 订单编号 receiverName: '', // 收件人名称 receiverMobile: '', // 收件人手机 receiverAreaId: null, //收件人地区编号 @@ -82,7 +82,7 @@ const submitForm = async () => { /** 重置表单 */ const resetForm = () => { formData.value = { - id: 0, // 订单编号 + id: undefined, // 订单编号 receiverName: '', // 收件人名称 receiverMobile: '', // 收件人手机 receiverAreaId: null, //收件人地区编号 diff --git a/src/views/mall/trade/order/form/OrderUpdatePriceForm.vue b/src/views/mall/trade/order/form/OrderUpdatePriceForm.vue index 3da8d962..8332e31e 100644 --- a/src/views/mall/trade/order/form/OrderUpdatePriceForm.vue +++ b/src/views/mall/trade/order/form/OrderUpdatePriceForm.vue @@ -31,7 +31,7 @@ const message = useMessage() // 消息弹窗 const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = ref({ - id: 0, // 订单编号 + id: undefined, // 订单编号 adjustPrice: 0, // 订单调价 payPrice: '', // 应付金额(总) newPayPrice: '' // 调价后应付金额(总) @@ -85,7 +85,7 @@ const submitForm = async () => { /** 重置表单 */ const resetForm = () => { formData.value = { - id: 0, // 订单编号 + id: undefined, // 订单编号 adjustPrice: 0, // 订单调价 payPrice: '', // 应付金额(总) newPayPrice: '' // 调价后应付金额(总) diff --git a/src/views/mall/trade/order/form/OrderUpdateRemarkForm.vue b/src/views/mall/trade/order/form/OrderUpdateRemarkForm.vue index 8be1b603..e9795015 100644 --- a/src/views/mall/trade/order/form/OrderUpdateRemarkForm.vue +++ b/src/views/mall/trade/order/form/OrderUpdateRemarkForm.vue @@ -27,7 +27,7 @@ const message = useMessage() // 消息弹窗 const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = ref({ - id: 0, // 订单编号 + id: undefined, // 订单编号 remark: '' // 订单备注 }) const formRef = ref() // 表单 Ref @@ -62,7 +62,7 @@ const submitForm = async () => { /** 重置表单 */ const resetForm = () => { formData.value = { - id: 0, // 订单编号 + id: undefined, // 订单编号 remark: '' // 订单备注 } formRef.value?.resetFields() diff --git a/src/views/system/dept/DeptForm.vue b/src/views/system/dept/DeptForm.vue index c759ef38..f0c8db4f 100644 --- a/src/views/system/dept/DeptForm.vue +++ b/src/views/system/dept/DeptForm.vue @@ -167,7 +167,7 @@ const resetForm = () => { const getTree = async () => { deptTree.value = [] const data = await DeptApi.getSimpleDeptList() - let dept: Tree = { id: 0, name: '顶级部门', children: [] } + let dept: Tree = { id: undefined, name: '顶级部门', children: [] } dept.children = handleTree(data) deptTree.value.push(dept) } diff --git a/src/views/system/menu/MenuForm.vue b/src/views/system/menu/MenuForm.vue index 7eaf6ab6..6f249894 100644 --- a/src/views/system/menu/MenuForm.vue +++ b/src/views/system/menu/MenuForm.vue @@ -130,7 +130,7 @@ const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ - id: 0, + id: undefined, name: '', permission: '', type: SystemMenuTypeEnum.DIR, @@ -223,7 +223,7 @@ const menuTree = ref([]) // 树形结构 const getTree = async () => { menuTree.value = [] const res = await MenuApi.getSimpleMenusList() - let menu: Tree = { id: 0, name: '主类目', children: [] } + let menu: Tree = { id: undefined, name: '主类目', children: [] } menu.children = handleTree(res) menuTree.value.push(menu) } @@ -231,7 +231,7 @@ const getTree = async () => { /** 重置表单 */ const resetForm = () => { formData.value = { - id: 0, + id: undefined, name: '', permission: '', type: SystemMenuTypeEnum.DIR, diff --git a/src/views/system/role/RoleAssignMenuForm.vue b/src/views/system/role/RoleAssignMenuForm.vue index 9304532c..c3294a52 100644 --- a/src/views/system/role/RoleAssignMenuForm.vue +++ b/src/views/system/role/RoleAssignMenuForm.vue @@ -58,7 +58,7 @@ const message = useMessage() // 消息弹窗 const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = reactive({ - id: 0, + id: undefined, name: '', code: '', menuIds: [] @@ -126,7 +126,7 @@ const resetForm = () => { menuExpand.value = false // 重置表单 formData.value = { - id: 0, + id: undefined, name: '', code: '', menuIds: [] diff --git a/src/views/system/role/RoleDataPermissionForm.vue b/src/views/system/role/RoleDataPermissionForm.vue index 22cd086b..476a623c 100644 --- a/src/views/system/role/RoleDataPermissionForm.vue +++ b/src/views/system/role/RoleDataPermissionForm.vue @@ -78,7 +78,7 @@ const message = useMessage() // 消息弹窗 const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = reactive({ - id: 0, + id: undefined, name: '', code: '', dataScope: undefined, @@ -141,7 +141,7 @@ const resetForm = () => { checkStrictly.value = true // 重置表单 formData.value = { - id: 0, + id: undefined, name: '', code: '', dataScope: undefined,