This commit is contained in:
2022-07-18 17:08:56 +08:00
parent 6f064aa378
commit d183f004d7
2 changed files with 29 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ export function getClass(params) {
}
export function getClassSuperior(ids) {
const data = ids.length || ids.length === 0 ? ids : Array.of(ids)
const data = ids
return request({
url: 'api/Classstandard/superior',
method: 'post',
@@ -41,6 +41,14 @@ export function getClassSuperior(ids) {
})
}
export function getClassSuperior2(data) {
return request({
url: 'api/Classstandard/superior2',
method: 'post',
data
})
}
export function getClassType(params) {
return request({
url: 'api/Classstandard/getClass',
@@ -48,6 +56,7 @@ export function getClassType(params) {
params
})
}
export function queryClassById(params) {
return request({
url: 'api/Classstandard/queryClassById',
@@ -55,6 +64,7 @@ export function queryClassById(params) {
params
})
}
// 传入分类标识和级别
export function getType(params) {
return request({
@@ -72,4 +82,15 @@ export function getClassTable(params) {
})
}
export default { add, edit, del, getClass, getClassSuperior, getClassType, getClassTable, getType, queryClassById }
export default {
add,
edit,
del,
getClass,
getClassSuperior,
getClassSuperior2,
getClassType,
getClassTable,
getType,
queryClassById
}

View File

@@ -235,11 +235,15 @@ export default {
if (!form.device_bom_code) {
this.queryClassId()
} else {
this.getSubTypes(form.material_type_id)
const data = {}
data.id = form.material_type_id
data.goal_id = '1503644361789935616'
this.getSubTypes(data)
}
},
getSubTypes(id) {
crudClassstandard.getClassSuperior(id).then(res => {
debugger
crudClassstandard.getClassSuperior2(id).then(res => {
debugger
const date = res.content
this.buildClass(date)