Browse Source

fix: 基础分类vue-treeselect不显示的问题

master
李永德 3 months ago
parent
commit
791a300d7a
  1. 5
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/standard/service/dao/ClassStandard.java
  2. 1
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/standard/service/dto/ClassStandardTrees.java
  3. 44
      lms/nladmin-ui/src/views/wms/basedata/master/storagevehicleinfo/index.vue

5
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/standard/service/dao/ClassStandard.java

@ -4,14 +4,11 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
/**
* 基础分类实体
* @Author: lyd
* @Date: 2024/10/15
*/

1
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/standard/service/dto/ClassStandardTrees.java

@ -11,6 +11,7 @@ import java.io.Serializable;
import java.util.List;
/**
* vue-tree-select所需要的实体
* @Author: lyd
* @Description: vue-tree-select所需要的实体
* @Date: 2023/5/12

44
lms/nladmin-ui/src/views/wms/basedata/master/storagevehicleinfo/index.vue

@ -42,7 +42,7 @@
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation/>
<rrOperation />
</el-form>
</div>
@ -68,7 +68,7 @@
width="450px"
>
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
<el-form-item label="载具类型" v-if="crud.status.add > 0" prop="storagevehicle_type">
<el-form-item v-if="crud.status.add > 0" label="载具类型" prop="storagevehicle_type">
<treeselect
v-model="form.storagevehicle_type"
:load-options="loadChildNodes"
@ -78,14 +78,14 @@
/>
</el-form-item>
<br>
<el-form-item label="载具数量" v-if="crud.status.add > 0" prop="num">
<el-input-number v-model="form.num" v-if="crud.status.add > 0" :precision="0" style="width: 150px;"/>
<el-form-item v-if="crud.status.add > 0" label="载具数量" prop="num">
<el-input-number v-if="crud.status.add > 0" v-model="form.num" :precision="0" style="width: 150px;" />
</el-form-item>
<el-form-item label="载具重量" v-if="crud.status.edit > 0" prop="qty">
<el-input-number v-model="form.qty" :precision="1" style="width: 150px;"/>
<el-form-item v-if="crud.status.edit > 0" label="载具重量" prop="qty">
<el-input-number v-model="form.qty" :precision="1" style="width: 150px;" />
</el-form-item>
<el-form-item label="绑定物料" v-if="crud.status.edit > 0" prop="pcsn">
<el-input v-model="form.pcsn" :precision="0" style="width: 150px;"/>
<el-form-item v-if="crud.status.edit > 0" label="绑定物料" prop="pcsn">
<el-input v-model="form.pcsn" :precision="0" style="width: 150px;" />
</el-form-item>
<el-form-item label="是否启用">
<el-radio v-model="form.is_used" label="0"></el-radio>
@ -107,17 +107,17 @@
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55"/>
<el-table-column v-if="false" prop="storagevehicle_id" label="载具标识"/>
<el-table-column prop="storagevehicle_type_name" label="载具类型"/>
<el-table-column prop="storagevehicle_code" label="载具编码"/>
<el-table-column prop="storagevehicle_name" label="载具名称"/>
<!-- <el-table-column prop="is_task" label="是否搬运中" :formatter="formatIsTask"/>-->
<el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="storagevehicle_id" label="载具标识" />
<el-table-column prop="storagevehicle_type_name" label="载具类型" />
<el-table-column prop="storagevehicle_code" label="载具编码" />
<el-table-column prop="storagevehicle_name" label="载具名称" />
<!-- <el-table-column prop="is_task" label="是否搬运中" :formatter="formatIsTask"/>-->
<!--<el-table-column prop="point_code" label="当前点位" width="120px"/>
<el-table-column prop="start_point_code" label="起点" width="120px"/>
<el-table-column prop="next_point_code" label="终点" width="120px"/>-->
<el-table-column prop="pcsn" label="绑定物料"/>
<el-table-column prop="qty" label="托盘重量"/>
<el-table-column prop="pcsn" label="绑定物料" />
<el-table-column prop="qty" label="托盘重量" />
<el-table-column label="是否启用" align="center" prop="is_used">
<template slot-scope="scope">
<el-switch
@ -128,8 +128,8 @@
/>
</template>
</el-table-column>
<el-table-column prop="create_name" label="创建人"/>
<el-table-column prop="create_time" label="创建时间" width="150px"/>
<el-table-column prop="create_name" label="创建人" />
<el-table-column prop="create_time" label="创建时间" width="150px" />
<el-table-column
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
label="操作"
@ -146,7 +146,7 @@
</el-table-column>
</el-table>
<!--分页组件-->
<pagination/>
<pagination />
</div>
</div>
</template>
@ -291,7 +291,7 @@ export default {
parent_class_code: 'vehicle_type'
}
crudClassstandard.getClassType(param).then(res => {
const data = res.content
const data = res
this.buildTree(data)
this.classes1 = data
})
@ -307,10 +307,10 @@ export default {
})
},
//
loadChildNodes({ action, parentNode, callback }) {
loadChildNodes({ action, parentNode, callback }) { //
if (action === LOAD_CHILDREN_OPTIONS) {
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
parentNode.children = res.content.map(function(obj) {
parentNode.children = res.map(function(obj) {
if (obj.hasChildren) {
obj.children = null
}

Loading…
Cancel
Save