|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="140px">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="140px" class="queryForm">
|
|
|
<el-form-item label="单据类型" prop="orderType">
|
|
|
<el-select v-model="queryParams.orderType" placeholder="请选择单据类型" @change="onQueryTypeChange">
|
|
|
<el-option
|
|
@@ -28,12 +28,12 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="申请部门" prop="applicationDepartment">
|
|
|
- <el-input
|
|
|
+ <treeselect
|
|
|
v-model="queryParams.applicationDepartment"
|
|
|
- placeholder="请输入申请部门"
|
|
|
- clearable
|
|
|
+ :options="deptOptions"
|
|
|
+ placeholder="请选择申请部门"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="queryParams.orderType === '1'" label="【调整】资产编号" prop="adjustmentAssetNumber">
|
|
|
<el-input
|
|
@@ -44,12 +44,12 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="queryParams.orderType === '2'" label="【调拨】调出部门" prop="allocationCallOutDepartment">
|
|
|
- <el-input
|
|
|
+ <treeselect
|
|
|
v-model="queryParams.allocationCallOutDepartment"
|
|
|
- placeholder="请输入【调拨】调出部门"
|
|
|
- clearable
|
|
|
+ :options="deptOptions"
|
|
|
+ placeholder="请选择【调拨】调出部门"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="queryParams.orderType === '2'" label="【调拨】调出经办人" prop="allocationCallOutBy">
|
|
|
<el-input
|
|
@@ -68,12 +68,12 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="queryParams.orderType === '2'" label="【调拨】调入部门" prop="allocationCallInDepartment">
|
|
|
- <el-input
|
|
|
+ <treeselect
|
|
|
v-model="queryParams.allocationCallInDepartment"
|
|
|
- placeholder="请输入【调拨】调入部门"
|
|
|
- clearable
|
|
|
+ :options="deptOptions"
|
|
|
+ placeholder="请选择【调拨】调入部门"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="queryParams.orderType === '2'" label="【调拨】调入经办人" prop="allocationCallInBy">
|
|
|
<el-input
|
|
@@ -92,12 +92,12 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="queryParams.orderType === '3'" label="【借出】借出部门" prop="lendDepartment">
|
|
|
- <el-input
|
|
|
+ <treeselect
|
|
|
v-model="queryParams.lendDepartment"
|
|
|
- placeholder="请输入【借出】借出部门"
|
|
|
- clearable
|
|
|
+ :options="deptOptions"
|
|
|
+ placeholder="请选择【借出】借出部门"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="queryParams.orderType === '3'" label="【借出】经手人" prop="lendBySponsor">
|
|
|
<el-input
|
|
@@ -115,14 +115,14 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="原因说明" prop="reason">
|
|
|
+ <!-- <el-form-item label="原因说明" prop="reason">
|
|
|
<el-input
|
|
|
v-model="queryParams.reason"
|
|
|
placeholder="请输入原因说明"
|
|
|
clearable
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item label="制单人" prop="preparedBy">
|
|
|
<el-input
|
|
|
v-model="queryParams.preparedBy"
|
|
@@ -132,20 +132,20 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="制单部门" prop="preparedDepartment">
|
|
|
- <el-input
|
|
|
+ <treeselect
|
|
|
v-model="queryParams.preparedDepartment"
|
|
|
- placeholder="请输入制单部门"
|
|
|
- clearable
|
|
|
+ :options="deptOptions"
|
|
|
+ placeholder="请选择制单部门"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="所属公司" prop="corporation">
|
|
|
- <el-input
|
|
|
+ <treeselect
|
|
|
v-model="queryParams.corporation"
|
|
|
- placeholder="请输入所属公司"
|
|
|
- clearable
|
|
|
+ :options="deptOptions"
|
|
|
+ placeholder="请选择所属公司"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="记录状态" prop="recordStatus">
|
|
|
<el-select v-model="queryParams.recordStatus" placeholder="请选择记录状态" clearable>
|
|
@@ -324,7 +324,12 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="申请部门" prop="applicationDepartment">
|
|
|
- <el-input v-model="form.applicationDepartment" placeholder="请输入申请部门" />
|
|
|
+ <treeselect
|
|
|
+ v-model="form.applicationDepartment"
|
|
|
+ :options="deptOptions"
|
|
|
+ placeholder="请选择申请部门"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="form.orderType === 1" label="【调整】资产编号" prop="adjustmentAssetNumber">
|
|
|
<el-input v-model="form.adjustmentAssetNumber" placeholder="请输入【调整】资产编号" />
|
|
@@ -333,7 +338,12 @@
|
|
|
<el-input v-model="form.adjustmentOriginalAssetInfo" type="textarea" placeholder="系统自动补充" disabled/>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="form.orderType === 2" label="【调拨】调出部门" prop="allocationCallOutDepartment">
|
|
|
- <el-input v-model="form.allocationCallOutDepartment" placeholder="请输入【调拨】调出部门" />
|
|
|
+ <treeselect
|
|
|
+ v-model="form.allocationCallOutDepartment"
|
|
|
+ :options="deptOptions"
|
|
|
+ placeholder="请选择【调拨】调出部门"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="form.orderType === 2" label="【调拨】调出经办人" prop="allocationCallOutBy">
|
|
|
<el-input v-model="form.allocationCallOutBy" placeholder="请输入【调拨】调出经办人" />
|
|
@@ -347,7 +357,12 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="form.orderType === 2" label="【调拨】调入部门" prop="allocationCallInDepartment">
|
|
|
- <el-input v-model="form.allocationCallInDepartment" placeholder="请输入【调拨】调入部门" />
|
|
|
+ <treeselect
|
|
|
+ v-model="form.allocationCallInDepartment"
|
|
|
+ :options="deptOptions"
|
|
|
+ placeholder="请选择【调拨】调入部门"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="form.orderType === 2" label="【调拨】调入经办人" prop="allocationCallInBy">
|
|
|
<el-input v-model="form.allocationCallInBy" placeholder="请输入【调拨】调入经办人" />
|
|
@@ -367,7 +382,12 @@
|
|
|
<el-input v-model="form.allocationNewLocationNumber" placeholder="请输入【调拨】新功能位置编号" />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="form.orderType === 3" label="【借出】借出部门" prop="lendDepartment">
|
|
|
- <el-input v-model="form.lendDepartment" placeholder="请输入【借出】借出部门" />
|
|
|
+ <treeselect
|
|
|
+ v-model="form.lendDepartment"
|
|
|
+ :options="deptOptions"
|
|
|
+ placeholder="请选择【借出】借出部门"
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="form.orderType === 3" label="【借出】经手人" prop="lendBySponsor">
|
|
|
<el-input v-model="form.lendBySponsor" placeholder="请输入【借出】经手人" />
|
|
@@ -414,12 +434,15 @@
|
|
|
|
|
|
<script>
|
|
|
import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/order/order";
|
|
|
-
|
|
|
+import { deptTreeSelect } from "@/api/system/user";
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
export default {
|
|
|
name: "Order",
|
|
|
dicts: ['asset_order_type', 'asset_record_status'],
|
|
|
components: {
|
|
|
- AssetInfo: () => import('@/components/asset/assetCard.vue')
|
|
|
+ AssetInfo: () => import('@/components/asset/assetCard.vue'),
|
|
|
+ Treeselect,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -441,6 +464,8 @@ export default {
|
|
|
// 资产原信息
|
|
|
openAdjustment: false,
|
|
|
adjustmentOriginalAssetInfo: null,
|
|
|
+ // 部门树选项
|
|
|
+ deptOptions: undefined,
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
@@ -503,6 +528,7 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.orderType = 1
|
|
|
+ this.getDeptTree()
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
@@ -515,6 +541,12 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
+ getDeptTree() {
|
|
|
+ deptTreeSelect().then(response => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
@@ -672,3 +704,15 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+/deep/ .vue-treeselect{
|
|
|
+ display:inline-block;
|
|
|
+}
|
|
|
+.queryForm{
|
|
|
+ /deep/ .vue-treeselect{
|
|
|
+ width: 205px;
|
|
|
+ height: 32px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|