|
@@ -25,6 +25,9 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="盘点地点" prop="inventoryLocation">
|
|
|
+ <treeselect v-model="queryParams.inventoryLocation" :options="locationOption" placeholder="选择位置" @keyup.enter.native="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="盘点人" prop="inventoryBy">
|
|
|
<el-input
|
|
|
v-model="queryParams.inventoryBy"
|
|
@@ -221,14 +224,15 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="盘点位置" prop="inventoryLocation">
|
|
|
- <el-select v-model="form.inventoryLocation" placeholder="请选择盘点位置">
|
|
|
+ <!-- <el-select v-model="form.inventoryLocation" placeholder="请选择盘点位置">
|
|
|
<el-option
|
|
|
v-for="item in locationList"
|
|
|
:key="item.number"
|
|
|
:label="item.name"
|
|
|
:value="item.number"
|
|
|
></el-option>
|
|
|
- </el-select>
|
|
|
+ </el-select> -->
|
|
|
+ <treeselect v-model="form.inventoryLocation" :options="locationOption" placeholder="选择位置" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
|
@@ -254,7 +258,7 @@
|
|
|
<script>
|
|
|
import { deptTreeSelect } from '@/api/system/user.js'
|
|
|
import { listInventory, getInventory, delInventory, addInventory, updateInventory } from "@/api/inventory/inventory";
|
|
|
-import { listLocation } from "@/api/asset/location";
|
|
|
+import { treeSelect } from "@/api/asset/location";
|
|
|
import { listDept } from "@/api/system/dept";
|
|
|
import UserSearch from '@/components/SysUserSearch/index.vue'
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
@@ -283,7 +287,7 @@ export default {
|
|
|
total: 0,
|
|
|
// 资产盘点记录表格数据
|
|
|
inventoryList: [],
|
|
|
- locationList: [],
|
|
|
+ locationOption: [],
|
|
|
// 部门树选项
|
|
|
deptOptions: [],
|
|
|
arr: [],
|
|
@@ -349,9 +353,7 @@ export default {
|
|
|
/** 查询资产盘点记录列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listLocation().then((response) => {
|
|
|
- this.locationList = response.rows;
|
|
|
- });
|
|
|
+ this.getTreeSelect()
|
|
|
listDept().then((response) => {
|
|
|
this.arr = response.data
|
|
|
});
|
|
@@ -361,6 +363,12 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ getTreeSelect() {
|
|
|
+ treeSelect().then(res => {
|
|
|
+ console.log('下拉树结果', res)
|
|
|
+ this.locationOption = res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取公司名
|
|
|
companyName(val){
|
|
|
let num = parseInt(val)
|