|
|
@@ -23,7 +23,7 @@
|
|
|
v-model="formData.extInfo.assetType"
|
|
|
@itemChange="handleChange"
|
|
|
/> -->
|
|
|
- <el-select
|
|
|
+ <!-- <el-select
|
|
|
:disabled="
|
|
|
!!(warehousingMaterialList && warehousingMaterialList.length)
|
|
|
"
|
|
|
@@ -37,7 +37,25 @@
|
|
|
:label="item.dictValue"
|
|
|
:value="item.dictCode"
|
|
|
></el-option>
|
|
|
- </el-select>
|
|
|
+ </el-select> -->
|
|
|
+ <selectTree
|
|
|
+ ref="tree"
|
|
|
+ class="form-ipt"
|
|
|
+ :isBindPlan="
|
|
|
+ !!(warehousingMaterialList && warehousingMaterialList.length)
|
|
|
+ "
|
|
|
+ size="medium"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
+ :options="codeList"
|
|
|
+ :props="{
|
|
|
+ value: 'id',
|
|
|
+ label: 'name',
|
|
|
+ children: 'children'
|
|
|
+ }"
|
|
|
+ @getValue="codeListValue"
|
|
|
+ :isAll="false"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
@@ -872,11 +890,17 @@
|
|
|
});
|
|
|
console.log('sasasasa===>>>', this.warehousingMaterialList);
|
|
|
},
|
|
|
+ codeListValue(val) {
|
|
|
+ console.log(val);
|
|
|
+ this.formData.extInfo.assetType = val.id;
|
|
|
+ this.$forceUpdate();
|
|
|
+ this.title = val?.name;
|
|
|
+ this.selectEquiType = val?.id;
|
|
|
+ console.log(this.title);
|
|
|
+ },
|
|
|
async initData() {
|
|
|
const { data } = await getTreeByPid(0);
|
|
|
- this.codeList = data.map((item) => {
|
|
|
- return { dictCode: item.id, dictValue: item.name };
|
|
|
- });
|
|
|
+ this.codeList = data;
|
|
|
const res = await warehouseDefinition.tree();
|
|
|
this.treeList = this.$util.toTreeData({
|
|
|
data: res,
|