|
@@ -1,14 +1,14 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="170px">
|
|
|
- <el-form-item label="单据编号" prop="orderNumber">
|
|
|
+ <!-- <el-form-item label="单据编号" prop="orderNumber">
|
|
|
<el-input
|
|
|
v-model="queryParams.orderNumber"
|
|
|
placeholder="请输入单据编号"
|
|
|
clearable
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item label="资产编号" prop="assetNumber">
|
|
|
<el-input
|
|
|
v-model="queryParams.assetNumber"
|
|
@@ -17,7 +17,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="【调拨】旧管理人" prop="allocationOldResponsiblePerson">
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧管理人" prop="allocationOldResponsiblePerson">
|
|
|
<el-input
|
|
|
v-model="queryParams.allocationOldResponsiblePerson"
|
|
|
placeholder="请输入【调拨】旧管理人"
|
|
@@ -25,7 +25,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="【调拨】旧功能位置编号" prop="allocationOldLocationNumber">
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧功能位置编号" prop="allocationOldLocationNumber">
|
|
|
<el-input
|
|
|
v-model="queryParams.allocationOldLocationNumber"
|
|
|
placeholder="请输入【调拨】旧功能位置编号"
|
|
@@ -33,7 +33,7 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="【调拨】新管理人" prop="allocationNewResponsiblePerson">
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】新管理人" prop="allocationNewResponsiblePerson">
|
|
|
<el-input
|
|
|
v-model="queryParams.allocationNewResponsiblePerson"
|
|
|
placeholder="请输入【调拨】新管理人"
|
|
@@ -41,15 +41,17 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="【调拨】新功能位置编号" prop="allocationNewLocationNumber">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.allocationNewLocationNumber"
|
|
|
- placeholder="请输入【调拨】新功能位置编号"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】新功能位置编号" prop="allocationNewLocationNumber">
|
|
|
+ <el-select v-model="queryParams.allocationNewLocationNumber" placeholder="请选择【调拨】新功能位置">
|
|
|
+ <el-option
|
|
|
+ v-for="item in locationList"
|
|
|
+ :key="item.number"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.number"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="【借出】预计归还时间" prop="lendReturnDate">
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 3" label="【借出】预计归还时间" prop="lendReturnDate">
|
|
|
<el-date-picker clearable
|
|
|
v-model="queryParams.lendReturnDate"
|
|
|
type="date"
|
|
@@ -57,7 +59,7 @@
|
|
|
placeholder="请选择【借出】预计归还时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="【借出】实际归还时间" prop="lendActualReturnDate">
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 3" label="【借出】实际归还时间" prop="lendActualReturnDate">
|
|
|
<el-date-picker clearable
|
|
|
v-model="queryParams.lendActualReturnDate"
|
|
|
type="date"
|
|
@@ -65,7 +67,7 @@
|
|
|
placeholder="请选择【借出】实际归还时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="【借出】归还经手人" prop="lendBySponsor">
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 3" label="【借出】归还经手人" prop="lendBySponsor">
|
|
|
<el-input
|
|
|
v-model="queryParams.lendBySponsor"
|
|
|
placeholder="请输入【借出】归还经手人"
|
|
@@ -80,7 +82,7 @@
|
|
|
</el-form>
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5">
|
|
|
+ <el-col :span="1.5" v-if="orderInfo.id === null || orderInfo.recordStatus < 1">
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
plain
|
|
@@ -90,7 +92,7 @@
|
|
|
v-hasPermi="['order:detail:add']"
|
|
|
>新增</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
+ <el-col :span="1.5" v-if="orderInfo.id === null || orderInfo.recordStatus < 1">
|
|
|
<el-button
|
|
|
type="success"
|
|
|
plain
|
|
@@ -101,7 +103,7 @@
|
|
|
v-hasPermi="['order:detail:edit']"
|
|
|
>修改</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
+ <el-col :span="1.5" v-if="orderInfo.id === null || orderInfo.recordStatus < 1">
|
|
|
<el-button
|
|
|
type="danger"
|
|
|
plain
|
|
@@ -128,23 +130,23 @@
|
|
|
<el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="编号" align="center" prop="id" />
|
|
|
- <el-table-column label="单据编号" align="center" prop="orderNumber" />
|
|
|
+ <!-- <el-table-column label="单据编号" align="center" prop="orderNumber" /> -->
|
|
|
<el-table-column label="资产编号" align="center" prop="assetNumber" />
|
|
|
- <el-table-column label="【调拨】旧管理人" align="center" prop="allocationOldResponsiblePerson" />
|
|
|
- <el-table-column label="【调拨】旧功能位置编号" align="center" prop="allocationOldLocationNumber" />
|
|
|
- <el-table-column label="【调拨】新管理人" align="center" prop="allocationNewResponsiblePerson" />
|
|
|
- <el-table-column label="【调拨】新功能位置编号" align="center" prop="allocationNewLocationNumber" />
|
|
|
- <el-table-column label="【借出】预计归还时间" align="center" prop="lendReturnDate" width="180">
|
|
|
+ <el-table-column v-if="orderInfo.orderType === 2" label="【调拨】旧管理人" align="center" prop="allocationOldResponsiblePerson" />
|
|
|
+ <el-table-column v-if="orderInfo.orderType === 2" label="【调拨】旧功能位置编号" align="center" prop="allocationOldLocationNumber" />
|
|
|
+ <el-table-column v-if="orderInfo.orderType === 2" label="【调拨】新管理人" align="center" prop="allocationNewResponsiblePerson" />
|
|
|
+ <el-table-column v-if="orderInfo.orderType === 2" label="【调拨】新功能位置编号" align="center" prop="allocationNewLocationNumber" />
|
|
|
+ <el-table-column v-if="orderInfo.orderType === 2" label="【借出】预计归还时间" align="center" prop="lendReturnDate" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.lendReturnDate, '{y}-{m}-{d}') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="【借出】实际归还时间" align="center" prop="lendActualReturnDate" width="180">
|
|
|
+ <el-table-column v-if="orderInfo.orderType === 3" label="【借出】实际归还时间" align="center" prop="lendActualReturnDate" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.lendActualReturnDate, '{y}-{m}-{d}') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="【借出】归还经手人" align="center" prop="lendBySponsor" />
|
|
|
+ <el-table-column v-if="orderInfo.orderType === 3" label="【借出】归还经手人" align="center" prop="lendBySponsor" />
|
|
|
<el-table-column label="备注" align="center" prop="remark" />
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
@@ -175,27 +177,34 @@
|
|
|
/>
|
|
|
|
|
|
<!-- 添加或修改单据明细对话框 -->
|
|
|
- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="170px">
|
|
|
<el-form-item label="单据编号" prop="orderNumber">
|
|
|
- <el-input v-model="form.orderNumber" placeholder="请输入单据编号" />
|
|
|
+ <el-input v-model="form.orderNumber" placeholder="请输入单据编号" disabled/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="资产编号" prop="assetNumber">
|
|
|
<el-input v-model="form.assetNumber" placeholder="请输入资产编号" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === '2'" label="【调拨】旧管理人" prop="allocationOldResponsiblePerson">
|
|
|
- <el-input v-model="form.allocationOldResponsiblePerson" placeholder="请输入【调拨】旧管理人" />
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧管理人" prop="allocationOldResponsiblePerson">
|
|
|
+ <el-input v-model="form.allocationOldResponsiblePerson" placeholder="系统自动补充" disabled/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === '2'" label="【调拨】旧功能位置编号" prop="allocationOldLocationNumber">
|
|
|
- <el-input v-model="form.allocationOldLocationNumber" placeholder="请输入【调拨】旧功能位置编号" />
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧功能位置" prop="allocationOldLocationNumber">
|
|
|
+ <el-input v-model="form.allocationOldLocationNumber" placeholder="系统自动补充" disabled/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === '2'" label="【调拨】新管理人" prop="allocationNewResponsiblePerson">
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】新管理人" prop="allocationNewResponsiblePerson">
|
|
|
<el-input v-model="form.allocationNewResponsiblePerson" placeholder="请输入【调拨】新管理人" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === '2'" label="【调拨】新功能位置编号" prop="allocationNewLocationNumber">
|
|
|
- <el-input v-model="form.allocationNewLocationNumber" placeholder="请输入【调拨】新功能位置编号" />
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】新功能位置" prop="allocationNewLocationNumber">
|
|
|
+ <el-select v-model="form.allocationNewLocationNumber" placeholder="请选择【调拨】新功能位置">
|
|
|
+ <el-option
|
|
|
+ v-for="item in locationList"
|
|
|
+ :key="item.number"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.number"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="【借出】预计归还时间" prop="lendReturnDate">
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 3" label="【借出】预计归还时间" prop="lendReturnDate">
|
|
|
<el-date-picker clearable
|
|
|
v-model="form.lendReturnDate"
|
|
|
type="date"
|
|
@@ -203,7 +212,7 @@
|
|
|
placeholder="请选择【借出】预计归还时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="【借出】实际归还时间" prop="lendActualReturnDate">
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 3" label="【借出】实际归还时间" prop="lendActualReturnDate">
|
|
|
<el-date-picker clearable
|
|
|
v-model="form.lendActualReturnDate"
|
|
|
type="date"
|
|
@@ -211,7 +220,7 @@
|
|
|
placeholder="请选择【借出】实际归还时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="【借出】归还经手人" prop="lendBySponsor">
|
|
|
+ <el-form-item v-if="orderInfo.orderType === 3" label="【借出】归还经手人" prop="lendBySponsor">
|
|
|
<el-input v-model="form.lendBySponsor" placeholder="请输入【借出】归还经手人" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="remark">
|
|
@@ -228,33 +237,35 @@
|
|
|
|
|
|
<script>
|
|
|
import { listDetail, getDetail, delDetail, addDetail, updateDetail } from "@/api/order/detail";
|
|
|
-
|
|
|
+import { listLocation } from "@/api/asset/location";
|
|
|
export default {
|
|
|
name: "Detail",
|
|
|
props: {
|
|
|
orderInfo: {
|
|
|
type: Object,
|
|
|
- default: {
|
|
|
- id: null,
|
|
|
- orderNumber: null,
|
|
|
- orderType: null,
|
|
|
- applicationDate: null,
|
|
|
- applicationDepartment: null,
|
|
|
- adjustmentAssetNumber: null,
|
|
|
- allocationCallOutDepartment: null,
|
|
|
- allocationCallOutBy: null,
|
|
|
- allocationCallOutDate: null,
|
|
|
- allocationCallInDepartment: null,
|
|
|
- allocationCallInBy: null,
|
|
|
- allocationCallInDate: null,
|
|
|
- lendDepartment: null,
|
|
|
- lendBySponsor: null,
|
|
|
- lendPassingUnit: null,
|
|
|
- reason: null,
|
|
|
- preparedBy: null,
|
|
|
- preparedDepartment: null,
|
|
|
- corporation: null,
|
|
|
- recordStatus: null
|
|
|
+ default: () => {
|
|
|
+ return {
|
|
|
+ id: null,
|
|
|
+ orderNumber: null,
|
|
|
+ orderType: null,
|
|
|
+ applicationDate: null,
|
|
|
+ applicationDepartment: null,
|
|
|
+ adjustmentAssetNumber: null,
|
|
|
+ allocationCallOutDepartment: null,
|
|
|
+ allocationCallOutBy: null,
|
|
|
+ allocationCallOutDate: null,
|
|
|
+ allocationCallInDepartment: null,
|
|
|
+ allocationCallInBy: null,
|
|
|
+ allocationCallInDate: null,
|
|
|
+ lendDepartment: null,
|
|
|
+ lendBySponsor: null,
|
|
|
+ lendPassingUnit: null,
|
|
|
+ reason: null,
|
|
|
+ preparedBy: null,
|
|
|
+ preparedDepartment: null,
|
|
|
+ corporation: null,
|
|
|
+ recordStatus: null
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -274,6 +285,8 @@ export default {
|
|
|
total: 0,
|
|
|
// 单据明细表格数据
|
|
|
detailList: [],
|
|
|
+ // 所属位置表格数据
|
|
|
+ locationList: [],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
@@ -282,7 +295,7 @@ export default {
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- orderNumber: null,
|
|
|
+ orderNumber: this.orderInfo.orderNumber,
|
|
|
assetNumber: null,
|
|
|
allocationOldResponsiblePerson: null,
|
|
|
allocationOldLocationNumber: null,
|
|
@@ -296,9 +309,9 @@ export default {
|
|
|
form: {},
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
- orderNumber: [
|
|
|
- { required: true, message: "单据编号不能为空", trigger: "blur" }
|
|
|
- ],
|
|
|
+ // orderNumber: [
|
|
|
+ // { required: true, message: "单据编号不能为空", trigger: "blur" }
|
|
|
+ // ],
|
|
|
assetNumber: [
|
|
|
{ required: true, message: "资产编号不能为空", trigger: "blur" }
|
|
|
],
|
|
@@ -306,6 +319,8 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
+ console.log('单据明细-单据信息:', this.orderInfo)
|
|
|
+ this.getLocation()
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
@@ -318,6 +333,12 @@ export default {
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
+ /** 获取所属位置 */
|
|
|
+ getLocation() {
|
|
|
+ listLocation().then((response) => {
|
|
|
+ this.locationList = response.rows;
|
|
|
+ });
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
@@ -327,7 +348,7 @@ export default {
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
- orderNumber: null,
|
|
|
+ orderNumber: this.orderInfo.orderNumber,
|
|
|
assetNumber: null,
|
|
|
allocationOldResponsiblePerson: null,
|
|
|
allocationOldLocationNumber: null,
|
|
@@ -359,6 +380,7 @@ export default {
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
+ this.form.orderNumber = this.orderInfo.orderNumber
|
|
|
this.open = true;
|
|
|
this.title = "添加单据明细";
|
|
|
},
|
|
@@ -411,3 +433,15 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+/deep/ .vue-treeselect{
|
|
|
+ display:inline-block;
|
|
|
+}
|
|
|
+.queryForm{
|
|
|
+ /deep/ .vue-treeselect{
|
|
|
+ width: 205px;
|
|
|
+ height: 32px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|