!441 fix: id=0导致sqlserver的insert失败
Merge pull request !441 from dhb52/dev
This commit is contained in:
commit
e8e1467f27
@ -141,7 +141,7 @@ export const getExpressTrackList = async (id: number | null) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface DeliveryVO {
|
export interface DeliveryVO {
|
||||||
id: number // 订单编号
|
id?: number // 订单编号
|
||||||
logisticsId: number | null // 物流公司编号
|
logisticsId: number | null // 物流公司编号
|
||||||
logisticsNo: string // 物流编号
|
logisticsNo: string // 物流编号
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ const dialogTitle = ref('') // 弹窗的标题
|
|||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的组:create - 新增;update - 修改
|
const formType = ref('') // 表单的组:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: 0,
|
id: undefined,
|
||||||
name: '',
|
name: '',
|
||||||
deptIds: [],
|
deptIds: [],
|
||||||
statuses: []
|
statuses: []
|
||||||
@ -168,7 +168,7 @@ const submitForm = async () => {
|
|||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
checkStrictly.value = true
|
checkStrictly.value = true
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: 0,
|
id: undefined,
|
||||||
name: '',
|
name: '',
|
||||||
deptIds: [],
|
deptIds: [],
|
||||||
statuses: []
|
statuses: []
|
||||||
|
@ -138,7 +138,7 @@ const resetForm = () => {
|
|||||||
const getProductCategoryTree = async () => {
|
const getProductCategoryTree = async () => {
|
||||||
productCategoryTree.value = []
|
productCategoryTree.value = []
|
||||||
const data = await ProductCategoryApi.getProductCategoryList()
|
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')
|
root.children = handleTree(data, 'id', 'parentId')
|
||||||
productCategoryTree.value.push(root)
|
productCategoryTree.value.push(root)
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ const resetForm = () => {
|
|||||||
const getDemo02CategoryTree = async () => {
|
const getDemo02CategoryTree = async () => {
|
||||||
demo02CategoryTree.value = []
|
demo02CategoryTree.value = []
|
||||||
const data = await Demo02CategoryApi.getDemo02CategoryList()
|
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')
|
root.children = handleTree(data, 'id', 'parentId')
|
||||||
demo02CategoryTree.value.push(root)
|
demo02CategoryTree.value.push(root)
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ const message = useMessage() // 消息弹窗
|
|||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: 0, // 售后订单编号
|
id: undefined, // 售后订单编号
|
||||||
auditReason: '' // 审批备注
|
auditReason: '' // 审批备注
|
||||||
})
|
})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
@ -62,7 +62,7 @@ const submitForm = async () => {
|
|||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: 0, // 售后订单编号
|
id: undefined, // 售后订单编号
|
||||||
auditReason: '' // 审批备注
|
auditReason: '' // 审批备注
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
|
@ -103,7 +103,7 @@ const submitForm = async () => {
|
|||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: 0,
|
id: undefined,
|
||||||
bindUserId: undefined
|
bindUserId: undefined
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
|
@ -43,7 +43,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
|
|||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const expressType = ref('express') // 如果值是 express,则是快递;none 则是无;未来做同城配送;
|
const expressType = ref('express') // 如果值是 express,则是快递;none 则是无;未来做同城配送;
|
||||||
const formData = ref<TradeOrderApi.DeliveryVO>({
|
const formData = ref<TradeOrderApi.DeliveryVO>({
|
||||||
id: 0, // 订单编号
|
id: undefined, // 订单编号
|
||||||
logisticsId: null, // 物流公司编号
|
logisticsId: null, // 物流公司编号
|
||||||
logisticsNo: '' // 物流编号
|
logisticsNo: '' // 物流编号
|
||||||
})
|
})
|
||||||
@ -86,7 +86,7 @@ const submitForm = async () => {
|
|||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: 0, // 订单编号
|
id: undefined, // 订单编号
|
||||||
logisticsId: null, // 物流公司编号
|
logisticsId: null, // 物流公司编号
|
||||||
logisticsNo: '' // 物流编号
|
logisticsNo: '' // 物流编号
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ const message = useMessage() // 消息弹窗
|
|||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: 0, // 订单编号
|
id: undefined, // 订单编号
|
||||||
receiverName: '', // 收件人名称
|
receiverName: '', // 收件人名称
|
||||||
receiverMobile: '', // 收件人手机
|
receiverMobile: '', // 收件人手机
|
||||||
receiverAreaId: null, //收件人地区编号
|
receiverAreaId: null, //收件人地区编号
|
||||||
@ -82,7 +82,7 @@ const submitForm = async () => {
|
|||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: 0, // 订单编号
|
id: undefined, // 订单编号
|
||||||
receiverName: '', // 收件人名称
|
receiverName: '', // 收件人名称
|
||||||
receiverMobile: '', // 收件人手机
|
receiverMobile: '', // 收件人手机
|
||||||
receiverAreaId: null, //收件人地区编号
|
receiverAreaId: null, //收件人地区编号
|
||||||
|
@ -31,7 +31,7 @@ const message = useMessage() // 消息弹窗
|
|||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: 0, // 订单编号
|
id: undefined, // 订单编号
|
||||||
adjustPrice: 0, // 订单调价
|
adjustPrice: 0, // 订单调价
|
||||||
payPrice: '', // 应付金额(总)
|
payPrice: '', // 应付金额(总)
|
||||||
newPayPrice: '' // 调价后应付金额(总)
|
newPayPrice: '' // 调价后应付金额(总)
|
||||||
@ -85,7 +85,7 @@ const submitForm = async () => {
|
|||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: 0, // 订单编号
|
id: undefined, // 订单编号
|
||||||
adjustPrice: 0, // 订单调价
|
adjustPrice: 0, // 订单调价
|
||||||
payPrice: '', // 应付金额(总)
|
payPrice: '', // 应付金额(总)
|
||||||
newPayPrice: '' // 调价后应付金额(总)
|
newPayPrice: '' // 调价后应付金额(总)
|
||||||
|
@ -27,7 +27,7 @@ const message = useMessage() // 消息弹窗
|
|||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: 0, // 订单编号
|
id: undefined, // 订单编号
|
||||||
remark: '' // 订单备注
|
remark: '' // 订单备注
|
||||||
})
|
})
|
||||||
const formRef = ref() // 表单 Ref
|
const formRef = ref() // 表单 Ref
|
||||||
@ -62,7 +62,7 @@ const submitForm = async () => {
|
|||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: 0, // 订单编号
|
id: undefined, // 订单编号
|
||||||
remark: '' // 订单备注
|
remark: '' // 订单备注
|
||||||
}
|
}
|
||||||
formRef.value?.resetFields()
|
formRef.value?.resetFields()
|
||||||
|
@ -167,7 +167,7 @@ const resetForm = () => {
|
|||||||
const getTree = async () => {
|
const getTree = async () => {
|
||||||
deptTree.value = []
|
deptTree.value = []
|
||||||
const data = await DeptApi.getSimpleDeptList()
|
const data = await DeptApi.getSimpleDeptList()
|
||||||
let dept: Tree = { id: 0, name: '顶级部门', children: [] }
|
let dept: Tree = { id: undefined, name: '顶级部门', children: [] }
|
||||||
dept.children = handleTree(data)
|
dept.children = handleTree(data)
|
||||||
deptTree.value.push(dept)
|
deptTree.value.push(dept)
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ const dialogTitle = ref('') // 弹窗的标题
|
|||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: 0,
|
id: undefined,
|
||||||
name: '',
|
name: '',
|
||||||
permission: '',
|
permission: '',
|
||||||
type: SystemMenuTypeEnum.DIR,
|
type: SystemMenuTypeEnum.DIR,
|
||||||
@ -223,7 +223,7 @@ const menuTree = ref<Tree[]>([]) // 树形结构
|
|||||||
const getTree = async () => {
|
const getTree = async () => {
|
||||||
menuTree.value = []
|
menuTree.value = []
|
||||||
const res = await MenuApi.getSimpleMenusList()
|
const res = await MenuApi.getSimpleMenusList()
|
||||||
let menu: Tree = { id: 0, name: '主类目', children: [] }
|
let menu: Tree = { id: undefined, name: '主类目', children: [] }
|
||||||
menu.children = handleTree(res)
|
menu.children = handleTree(res)
|
||||||
menuTree.value.push(menu)
|
menuTree.value.push(menu)
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ const getTree = async () => {
|
|||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: 0,
|
id: undefined,
|
||||||
name: '',
|
name: '',
|
||||||
permission: '',
|
permission: '',
|
||||||
type: SystemMenuTypeEnum.DIR,
|
type: SystemMenuTypeEnum.DIR,
|
||||||
|
@ -58,7 +58,7 @@ const message = useMessage() // 消息弹窗
|
|||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: 0,
|
id: undefined,
|
||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
menuIds: []
|
menuIds: []
|
||||||
@ -126,7 +126,7 @@ const resetForm = () => {
|
|||||||
menuExpand.value = false
|
menuExpand.value = false
|
||||||
// 重置表单
|
// 重置表单
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: 0,
|
id: undefined,
|
||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
menuIds: []
|
menuIds: []
|
||||||
|
@ -78,7 +78,7 @@ const message = useMessage() // 消息弹窗
|
|||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: 0,
|
id: undefined,
|
||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
dataScope: undefined,
|
dataScope: undefined,
|
||||||
@ -141,7 +141,7 @@ const resetForm = () => {
|
|||||||
checkStrictly.value = true
|
checkStrictly.value = true
|
||||||
// 重置表单
|
// 重置表单
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: 0,
|
id: undefined,
|
||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
dataScope: undefined,
|
dataScope: undefined,
|
||||||
|
Loading…
Reference in New Issue
Block a user