fix: id=0导致sqlserver的insert失败

This commit is contained in:
dhb52 2024-05-06 23:28:33 +08:00
parent 0222eef6b5
commit 0fb70607d9
14 changed files with 24 additions and 24 deletions

View File

@ -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 // 物流编号
} }

View File

@ -100,7 +100,7 @@ const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
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: []

View File

@ -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)
} }

View File

@ -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)
} }

View File

@ -27,7 +27,7 @@ const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
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()

View File

@ -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()

View File

@ -43,7 +43,7 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const expressType = ref('express') // expressnone const expressType = ref('express') // expressnone
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: '' //
} }

View File

@ -44,7 +44,7 @@ const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
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, //

View File

@ -31,7 +31,7 @@ const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
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: '' // ()

View File

@ -27,7 +27,7 @@ const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
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()

View File

@ -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)
} }

View File

@ -130,7 +130,7 @@ const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
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,

View File

@ -58,7 +58,7 @@ const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
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: []

View File

@ -78,7 +78,7 @@ const message = useMessage() // 消息弹窗
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
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,