|
|
@@ -14,7 +14,7 @@
|
|
|
placeholder="请输入编码"
|
|
|
></el-input>
|
|
|
<el-button type="primary" @click="doSearch">搜索</el-button>
|
|
|
- <el-button type="primary" @click="reset">重置</el-button>
|
|
|
+ <el-button type="primary" @click="reset">重置</el-button>
|
|
|
</div>
|
|
|
<el-row style="height: 80vh">
|
|
|
<el-col class="tree-col" :span="6">
|
|
|
@@ -25,6 +25,7 @@
|
|
|
:type="type"
|
|
|
:paramsType="'type'"
|
|
|
ref="treeList"
|
|
|
+ id="4"
|
|
|
/>
|
|
|
</el-col>
|
|
|
<el-col :span="18">
|
|
|
@@ -36,8 +37,8 @@
|
|
|
style="width: 100%; overflow: auto"
|
|
|
height="80vh"
|
|
|
border
|
|
|
- @select-all="onSelectAll"
|
|
|
- @selection-change="selectItem"
|
|
|
+ @select-all="onSelectAll"
|
|
|
+ @selection-change="selectItem"
|
|
|
:header-cell-style="{ background: '#F0F3F3' }"
|
|
|
>
|
|
|
<el-table-column prop="code" label="物品编码"></el-table-column>
|
|
|
@@ -71,7 +72,7 @@
|
|
|
<script>
|
|
|
import AssetTree from '@/components/AssetTree';
|
|
|
// import { getList as getCategoryList } from '@/api/classifyManage/itemInformation';
|
|
|
- import { getAssetList } from '@/api/ledgerAssets';
|
|
|
+ import { getAssetList } from '@/api/ledgerAssets';
|
|
|
import { tableHeader } from '@/utils/category.js';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
export default {
|
|
|
@@ -92,10 +93,10 @@
|
|
|
default: () => []
|
|
|
}
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
dialogVisible: false,
|
|
|
- code:'',
|
|
|
+ code: '',
|
|
|
tableLoading: false,
|
|
|
tableData: [],
|
|
|
currentTreeData: {},
|
|
|
@@ -103,51 +104,51 @@
|
|
|
rootId: null
|
|
|
};
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
this.requestDict('类型用途');
|
|
|
},
|
|
|
computed: {
|
|
|
- typeName () {
|
|
|
+ typeName() {
|
|
|
return this.getDictValue('类型用途', this.type);
|
|
|
},
|
|
|
- tableHeader () {
|
|
|
+ tableHeader() {
|
|
|
return tableHeader(this.type);
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- open () {
|
|
|
+ open() {
|
|
|
this.selectionList = [];
|
|
|
this.dialogVisible = true;
|
|
|
},
|
|
|
|
|
|
- async doSearch () {
|
|
|
+ async doSearch() {
|
|
|
+ this._getClassificationList();
|
|
|
+ },
|
|
|
+
|
|
|
+ async reset() {
|
|
|
+ this.code = '';
|
|
|
this._getClassificationList();
|
|
|
},
|
|
|
-
|
|
|
- async reset(){
|
|
|
- this.code = ''
|
|
|
- this._getClassificationList();
|
|
|
- },
|
|
|
|
|
|
// 获取根节点id
|
|
|
- setRootId (id) {
|
|
|
+ setRootId(id) {
|
|
|
this.rootId = id;
|
|
|
},
|
|
|
|
|
|
// 树结构点击事件
|
|
|
- async handleNodeClick (data, node) {
|
|
|
+ async handleNodeClick(data, node) {
|
|
|
this.currentTreeData = data;
|
|
|
this._getClassificationList();
|
|
|
},
|
|
|
// 获取添物品信息表格数据
|
|
|
- async _getClassificationList () {
|
|
|
+ async _getClassificationList() {
|
|
|
this.tableLoading = true;
|
|
|
let params = {
|
|
|
pageNum: 1,
|
|
|
- size: -1,
|
|
|
+ size: 10,
|
|
|
categoryLevelId: this.currentTreeData.id,
|
|
|
- rootCategoryLevelId:this.rootId,
|
|
|
- code:this.code
|
|
|
+ rootCategoryLevelId: this.rootId,
|
|
|
+ code: this.code
|
|
|
};
|
|
|
const res = await getAssetList(params);
|
|
|
this.tableLoading = false;
|
|
|
@@ -189,12 +190,12 @@
|
|
|
},
|
|
|
|
|
|
// 关闭弹窗
|
|
|
- handleClose () {
|
|
|
+ handleClose() {
|
|
|
this.$refs.dialogMultipleTable.clearSelection();
|
|
|
this.dialogVisible = false;
|
|
|
},
|
|
|
|
|
|
- async submit () {
|
|
|
+ async submit() {
|
|
|
this.$emit('success', this.selectionList[0].id);
|
|
|
this.handleClose();
|
|
|
// this.form.exportList = this.selectionList
|