Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
760bab7d
authored
May 07, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修复】全局:id=0导致sqlserver的insert失败
parent
3976e49e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
src/api/erp/product/category/index.ts
+2
-2
src/api/infra/demo/demo02/index.ts
+2
-2
src/views/erp/product/category/ProductCategoryForm.vue
+4
-4
src/views/infra/demo/demo02/Demo02CategoryForm.vue
+1
-1
src/views/system/dept/DeptForm.vue
+1
-1
src/views/system/menu/MenuForm.vue
+1
-1
No files found.
src/api/erp/product/category/index.ts
View file @
760bab7d
...
@@ -13,8 +13,8 @@ export interface ProductCategoryVO {
...
@@ -13,8 +13,8 @@ export interface ProductCategoryVO {
// ERP 产品分类 API
// ERP 产品分类 API
export
const
ProductCategoryApi
=
{
export
const
ProductCategoryApi
=
{
// 查询产品分类列表
// 查询产品分类列表
getProductCategoryList
:
async
(
params
)
=>
{
getProductCategoryList
:
async
()
=>
{
return
await
request
.
get
({
url
:
`/erp/product-category/list`
,
params
})
return
await
request
.
get
({
url
:
`/erp/product-category/list`
})
},
},
// 查询产品分类精简列表
// 查询产品分类精简列表
...
...
src/api/infra/demo/demo02/index.ts
View file @
760bab7d
...
@@ -7,8 +7,8 @@ export interface Demo02CategoryVO {
...
@@ -7,8 +7,8 @@ export interface Demo02CategoryVO {
}
}
// 查询示例分类列表
// 查询示例分类列表
export
const
getDemo02CategoryList
=
async
(
params
)
=>
{
export
const
getDemo02CategoryList
=
async
()
=>
{
return
await
request
.
get
({
url
:
`/infra/demo02-category/list`
,
params
})
return
await
request
.
get
({
url
:
`/infra/demo02-category/list`
})
}
}
// 查询示例分类详情
// 查询示例分类详情
...
...
src/views/erp/product/category/ProductCategoryForm.vue
View file @
760bab7d
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
getIntDictOptions
,
DICT_TYPE
}
from
'@/utils/dict'
import
{
getIntDictOptions
,
DICT_TYPE
}
from
'@/utils/dict'
import
{
ProductCategoryApi
}
from
'@/api/erp/product/category'
import
{
ProductCategoryApi
,
ProductCategoryVO
}
from
'@/api/erp/product/category'
import
{
defaultProps
,
handleTree
}
from
'@/utils/tree'
import
{
defaultProps
,
handleTree
}
from
'@/utils/tree'
import
{
CommonStatusEnum
}
from
'@/utils/constants'
import
{
CommonStatusEnum
}
from
'@/utils/constants'
...
@@ -66,7 +66,7 @@ const formData = ref({
...
@@ -66,7 +66,7 @@ const formData = ref({
name
:
undefined
,
name
:
undefined
,
code
:
undefined
,
code
:
undefined
,
sort
:
undefined
,
sort
:
undefined
,
status
:
undefined
status
:
CommonStatusEnum
.
ENABLE
})
})
const
formRules
=
reactive
({
const
formRules
=
reactive
({
parentId
:
[{
required
:
true
,
message
:
'上级编号不能为空'
,
trigger
:
'blur'
}],
parentId
:
[{
required
:
true
,
message
:
'上级编号不能为空'
,
trigger
:
'blur'
}],
...
@@ -105,7 +105,7 @@ const submitForm = async () => {
...
@@ -105,7 +105,7 @@ const submitForm = async () => {
// 提交请求
// 提交请求
formLoading
.
value
=
true
formLoading
.
value
=
true
try
{
try
{
const
data
=
formData
.
value
as
unknown
as
ProductCategory
Api
.
ProductCategory
VO
const
data
=
formData
.
value
as
unknown
as
ProductCategoryVO
if
(
formType
.
value
===
'create'
)
{
if
(
formType
.
value
===
'create'
)
{
await
ProductCategoryApi
.
createProductCategory
(
data
)
await
ProductCategoryApi
.
createProductCategory
(
data
)
message
.
success
(
t
(
'common.createSuccess'
))
message
.
success
(
t
(
'common.createSuccess'
))
...
@@ -138,7 +138,7 @@ const resetForm = () => {
...
@@ -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
:
undefined
,
name
:
'顶级产品分类'
,
children
:
[]
}
const
root
:
Tree
=
{
id
:
0
,
name
:
'顶级产品分类'
,
children
:
[]
}
root
.
children
=
handleTree
(
data
,
'id'
,
'parentId'
)
root
.
children
=
handleTree
(
data
,
'id'
,
'parentId'
)
productCategoryTree
.
value
.
push
(
root
)
productCategoryTree
.
value
.
push
(
root
)
}
}
...
...
src/views/infra/demo/demo02/Demo02CategoryForm.vue
View file @
760bab7d
...
@@ -107,7 +107,7 @@ const resetForm = () => {
...
@@ -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
:
undefined
,
name
:
'顶级示例分类'
,
children
:
[]
}
const
root
:
Tree
=
{
id
:
0
,
name
:
'顶级示例分类'
,
children
:
[]
}
root
.
children
=
handleTree
(
data
,
'id'
,
'parentId'
)
root
.
children
=
handleTree
(
data
,
'id'
,
'parentId'
)
demo02CategoryTree
.
value
.
push
(
root
)
demo02CategoryTree
.
value
.
push
(
root
)
}
}
...
...
src/views/system/dept/DeptForm.vue
View file @
760bab7d
...
@@ -167,7 +167,7 @@ const resetForm = () => {
...
@@ -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
:
undefined
,
name
:
'顶级部门'
,
children
:
[]
}
let
dept
:
Tree
=
{
id
:
0
,
name
:
'顶级部门'
,
children
:
[]
}
dept
.
children
=
handleTree
(
data
)
dept
.
children
=
handleTree
(
data
)
deptTree
.
value
.
push
(
dept
)
deptTree
.
value
.
push
(
dept
)
}
}
...
...
src/views/system/menu/MenuForm.vue
View file @
760bab7d
...
@@ -223,7 +223,7 @@ const menuTree = ref<Tree[]>([]) // 树形结构
...
@@ -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
:
undefined
,
name
:
'主类目'
,
children
:
[]
}
let
menu
:
Tree
=
{
id
:
0
,
name
:
'主类目'
,
children
:
[]
}
menu
.
children
=
handleTree
(
res
)
menu
.
children
=
handleTree
(
res
)
menuTree
.
value
.
push
(
menu
)
menuTree
.
value
.
push
(
menu
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment