fix: id=0导致sqlserver的insert失败
This commit is contained in:
parent
0222eef6b5
commit
0fb70607d9
@ -141,7 +141,7 @@ export const getExpressTrackList = async (id: number | null) => {
|
||||
}
|
||||
|
||||
export interface DeliveryVO {
|
||||
id: number // 订单编号
|
||||
id?: number // 订单编号
|
||||
logisticsId: number | null // 物流公司编号
|
||||
logisticsNo: string // 物流编号
|
||||
}
|
||||
|
@ -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: []
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -103,7 +103,7 @@ const submitForm = async () => {
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: 0,
|
||||
id: undefined,
|
||||
bindUserId: undefined
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
|
@ -43,7 +43,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const expressType = ref('express') // 如果值是 express,则是快递;none 则是无;未来做同城配送;
|
||||
const formData = ref<TradeOrderApi.DeliveryVO>({
|
||||
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: '' // 物流编号
|
||||
}
|
||||
|
@ -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, //收件人地区编号
|
||||
|
@ -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: '' // 调价后应付金额(总)
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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<Tree[]>([]) // 树形结构
|
||||
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,
|
||||
|
@ -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: []
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user