fix: 修复了一些bug
This commit is contained in:
@@ -48,5 +48,4 @@ export function getPointTypeSelectById(id) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export default { add, edit, del, changeActive, getPointStatusSelectById, getPointTypeSelectById }
|
||||
|
||||
@@ -288,25 +288,33 @@ export default {
|
||||
return true
|
||||
},
|
||||
getSubTypes(id) {
|
||||
console.log('id', id)
|
||||
crudClassstandard.getClassSuperior(id).then(res => {
|
||||
console.log('sub', res)
|
||||
const date = res.content
|
||||
this.buildClass(date)
|
||||
console.log('classes', date)
|
||||
this.classes = date
|
||||
})
|
||||
},
|
||||
getClass() {
|
||||
crudClassstandard.getClass({ enabled: true }).then(res => {
|
||||
this.classes = res.content.map(function(obj) {
|
||||
console.log('obj', obj)
|
||||
if (obj.hasChildren) {
|
||||
console.log(obj.hasChildren)
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
console.log(this.classes)
|
||||
})
|
||||
},
|
||||
buildClass(classes) {
|
||||
console.log('开始构建树')
|
||||
classes.forEach(data => {
|
||||
if (data.children) {
|
||||
console.log(data)
|
||||
this.buildClass(data.children)
|
||||
}
|
||||
if (data.hasChildren && !data.children) {
|
||||
@@ -318,10 +326,11 @@ export default {
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
console.log('load', res)
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
// if (obj.hasChildren) {
|
||||
// obj.children = null
|
||||
// }
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -296,6 +296,9 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具数量" prop="vehicle_qty">
|
||||
<el-input-number :controls="false" class="clear-number-input" v-model="form.vehicle_qty" :min="0" :precision="3" :max="99999" label="载具数量" size="mini" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.point_status === '3'" label="库存数" prop="ivt_qty">
|
||||
<el-input-number :controls="false" class="clear-number-input" v-model="form.ivt_qty" type="number" :min="1" :precision="3" :max="99999" label="库存数" size="mini" />
|
||||
</el-form-item>
|
||||
@@ -402,6 +405,7 @@ const defaultForm = {
|
||||
vehicle_code: null,
|
||||
vehicle_type: null,
|
||||
can_vehicle_types: null,
|
||||
vehicle_qty: null,
|
||||
source_id: null,
|
||||
remark: null,
|
||||
is_used: null,
|
||||
|
||||
Reference in New Issue
Block a user