|
@@ -1,6 +1,13 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="170px">
|
|
|
+ <el-form
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryForm"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ v-show="showSearch"
|
|
|
+ label-width="170px"
|
|
|
+ >
|
|
|
<!-- <el-form-item label="单据编号" prop="orderNumber">
|
|
|
<el-input
|
|
|
v-model="queryParams.orderNumber"
|
|
@@ -10,14 +17,27 @@
|
|
|
/>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="资产编号" prop="assetNumber">
|
|
|
- <el-input
|
|
|
- v-model="queryParams.assetNumber"
|
|
|
- placeholder="请输入资产编号"
|
|
|
- clearable
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
- />
|
|
|
+ <template>
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.assetNumber"
|
|
|
+ filterable
|
|
|
+ placeholder="请输入资产编号"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in informationList"
|
|
|
+ :key="item.number"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.number"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧管理人" prop="allocationOldResponsiblePerson">
|
|
|
+ <el-form-item
|
|
|
+ v-if="orderInfo.orderType === 2"
|
|
|
+ label="【调拨】旧管理人"
|
|
|
+ prop="allocationOldResponsiblePerson"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="queryParams.allocationOldResponsiblePerson"
|
|
|
placeholder="请输入【调拨】旧管理人"
|
|
@@ -25,7 +45,11 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧功能位置编号" prop="allocationOldLocationNumber">
|
|
|
+ <el-form-item
|
|
|
+ v-if="orderInfo.orderType === 2"
|
|
|
+ label="【调拨】旧功能位置编号"
|
|
|
+ prop="allocationOldLocationNumber"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="queryParams.allocationOldLocationNumber"
|
|
|
placeholder="请输入【调拨】旧功能位置编号"
|
|
@@ -33,7 +57,11 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</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="queryParams.allocationNewResponsiblePerson"
|
|
|
placeholder="请输入【调拨】新管理人"
|
|
@@ -41,8 +69,15 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】新功能位置编号" prop="allocationNewLocationNumber">
|
|
|
- <el-select v-model="queryParams.allocationNewLocationNumber" placeholder="请选择【调拨】新功能位置">
|
|
|
+ <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"
|
|
@@ -51,23 +86,39 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 3" label="【借出】预计归还时间" prop="lendReturnDate">
|
|
|
- <el-date-picker clearable
|
|
|
+ <el-form-item
|
|
|
+ v-if="orderInfo.orderType === 3"
|
|
|
+ label="【借出】预计归还时间"
|
|
|
+ prop="lendReturnDate"
|
|
|
+ >
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
v-model="queryParams.lendReturnDate"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选择【借出】预计归还时间">
|
|
|
+ placeholder="请选择【借出】预计归还时间"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 3" label="【借出】实际归还时间" prop="lendActualReturnDate">
|
|
|
- <el-date-picker clearable
|
|
|
+ <el-form-item
|
|
|
+ v-if="orderInfo.orderType === 3"
|
|
|
+ label="【借出】实际归还时间"
|
|
|
+ prop="lendActualReturnDate"
|
|
|
+ >
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
v-model="queryParams.lendActualReturnDate"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选择【借出】实际归还时间">
|
|
|
+ placeholder="请选择【借出】实际归还时间"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 3" label="【借出】归还经手人" prop="lendBySponsor">
|
|
|
+ <el-form-item
|
|
|
+ v-if="orderInfo.orderType === 3"
|
|
|
+ label="【借出】归还经手人"
|
|
|
+ prop="lendBySponsor"
|
|
|
+ >
|
|
|
<el-input
|
|
|
v-model="queryParams.lendBySponsor"
|
|
|
placeholder="请输入【借出】归还经手人"
|
|
@@ -76,13 +127,24 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuery"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
+ >重置</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
- <el-col :span="1.5" v-if="orderInfo.id === null || orderInfo.recordStatus < 1">
|
|
|
+ <el-col
|
|
|
+ :span="1.5"
|
|
|
+ v-if="orderInfo.id === null || orderInfo.recordStatus < 1"
|
|
|
+ >
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
plain
|
|
@@ -90,9 +152,13 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['order:detail:add']"
|
|
|
- >新增</el-button>
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5" v-if="orderInfo.id === null || orderInfo.recordStatus < 1">
|
|
|
+ <el-col
|
|
|
+ :span="1.5"
|
|
|
+ v-if="orderInfo.id === null || orderInfo.recordStatus < 1"
|
|
|
+ >
|
|
|
<el-button
|
|
|
type="success"
|
|
|
plain
|
|
@@ -101,9 +167,13 @@
|
|
|
:disabled="single"
|
|
|
@click="handleUpdate"
|
|
|
v-hasPermi="['order:detail:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5" v-if="orderInfo.id === null || orderInfo.recordStatus < 1">
|
|
|
+ <el-col
|
|
|
+ :span="1.5"
|
|
|
+ v-if="orderInfo.id === null || orderInfo.recordStatus < 1"
|
|
|
+ >
|
|
|
<el-button
|
|
|
type="danger"
|
|
|
plain
|
|
@@ -112,7 +182,8 @@
|
|
|
:disabled="multiple"
|
|
|
@click="handleDelete"
|
|
|
v-hasPermi="['order:detail:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
@@ -122,33 +193,88 @@
|
|
|
size="mini"
|
|
|
@click="handleExport"
|
|
|
v-hasPermi="['order:detail:export']"
|
|
|
- >导出</el-button>
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange">
|
|
|
+ <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="assetNumber" />
|
|
|
- <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 === 3" label="【借出】预计归还时间" align="center" prop="lendReturnDate" width="180">
|
|
|
+ <el-table-column label="资产编号" align="center" prop="assetNumber" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.assetNumber != null ? getAssetName(scope.row.assetNumber) : ""}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <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 === 3"
|
|
|
+ label="【借出】预计归还时间"
|
|
|
+ align="center"
|
|
|
+ prop="lendReturnDate"
|
|
|
+ width="180"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.lendReturnDate, '{y}-{m}-{d}') }}</span>
|
|
|
+ <span>{{ parseTime(scope.row.lendReturnDate, "{y}-{m}-{d}") }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="orderInfo.orderType === 3" 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>
|
|
|
+ <span>{{
|
|
|
+ parseTime(scope.row.lendActualReturnDate, "{y}-{m}-{d}")
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="orderInfo.orderType === 3" 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">
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
v-if="orderInfo.orderType === 3 && orderInfo.recordStatus > 1"
|
|
@@ -157,7 +283,8 @@
|
|
|
icon="el-icon-position"
|
|
|
@click="onReturn(scope.row)"
|
|
|
v-hasPermi="['order:order:edit']"
|
|
|
- >归还</el-button>
|
|
|
+ >归还</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
:disabled="orderInfo.recordStatus > 0"
|
|
|
size="mini"
|
|
@@ -165,7 +292,8 @@
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['order:detail:edit']"
|
|
|
- >修改</el-button>
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
:disabled="orderInfo.recordStatus > 0"
|
|
|
size="mini"
|
|
@@ -173,13 +301,14 @@
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['order:detail:remove']"
|
|
|
- >删除</el-button>
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
-
|
|
|
+
|
|
|
<pagination
|
|
|
- v-show="total>0"
|
|
|
+ v-show="total > 0"
|
|
|
:total="total"
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
:limit.sync="queryParams.pageSize"
|
|
@@ -190,16 +319,51 @@
|
|
|
<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="请输入单据编号" disabled/>
|
|
|
+ <el-input
|
|
|
+ v-model="form.orderNumber"
|
|
|
+ placeholder="请输入单据编号"
|
|
|
+ disabled
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="资产编号" prop="assetNumber">
|
|
|
- <el-input v-model="form.assetNumber" placeholder="请输入资产编号" :disabled="orderInfo.recordStatus > 0"/>
|
|
|
+ <template>
|
|
|
+ <el-select
|
|
|
+ v-model="form.assetNumber"
|
|
|
+ filterable
|
|
|
+ placeholder="请输入资产编号"
|
|
|
+ :disabled="orderInfo.recordStatus > 0"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in informationList"
|
|
|
+ :key="item.number"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.number"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】旧管理人" prop="allocationOldResponsiblePerson">
|
|
|
- <el-input v-model="form.allocationOldResponsiblePerson" placeholder="系统自动补充" disabled/>
|
|
|
+ <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-select v-model="form.allocationOldLocationNumber" placeholder="系统自动补充" disabled>
|
|
|
+ <el-form-item
|
|
|
+ v-if="orderInfo.orderType === 2"
|
|
|
+ label="【调拨】旧功能位置"
|
|
|
+ prop="allocationOldLocationNumber"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="form.allocationOldLocationNumber"
|
|
|
+ placeholder="系统自动补充"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in locationList"
|
|
|
:key="item.number"
|
|
@@ -208,11 +372,25 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 2" label="【调拨】新管理人" prop="allocationNewResponsiblePerson">
|
|
|
- <el-input v-model="form.allocationNewResponsiblePerson" placeholder="请输入【调拨】新管理人" />
|
|
|
+ <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-select 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"
|
|
@@ -221,29 +399,53 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 3" label="【借出】预计归还时间" prop="lendReturnDate">
|
|
|
- <el-date-picker clearable
|
|
|
+ <el-form-item
|
|
|
+ v-if="orderInfo.orderType === 3"
|
|
|
+ label="【借出】预计归还时间"
|
|
|
+ prop="lendReturnDate"
|
|
|
+ >
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
:disabled="orderInfo.recordStatus > 0"
|
|
|
v-model="form.lendReturnDate"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选择【借出】预计归还时间">
|
|
|
+ placeholder="请选择【借出】预计归还时间"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 3" label="【借出】实际归还时间" prop="lendActualReturnDate">
|
|
|
- <el-date-picker clearable
|
|
|
+ <el-form-item
|
|
|
+ v-if="orderInfo.orderType === 3"
|
|
|
+ label="【借出】实际归还时间"
|
|
|
+ prop="lendActualReturnDate"
|
|
|
+ >
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
:disabled="orderInfo.recordStatus < 2"
|
|
|
v-model="form.lendActualReturnDate"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选择【借出】实际归还时间">
|
|
|
+ placeholder="请选择【借出】实际归还时间"
|
|
|
+ >
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item v-if="orderInfo.orderType === 3" label="【借出】归还经手人" prop="lendBySponsor">
|
|
|
- <el-input v-model="form.lendBySponsor" placeholder="请输入【借出】归还经手人" :disabled="orderInfo.recordStatus < 2"/>
|
|
|
+ <el-form-item
|
|
|
+ v-if="orderInfo.orderType === 3"
|
|
|
+ label="【借出】归还经手人"
|
|
|
+ prop="lendBySponsor"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="form.lendBySponsor"
|
|
|
+ placeholder="请输入【借出】归还经手人"
|
|
|
+ :disabled="orderInfo.recordStatus < 2"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
- <el-input v-model="form.remark" placeholder="请输入备注" :disabled="orderInfo.recordStatus > 0"/>
|
|
|
+ <el-input
|
|
|
+ v-model="form.remark"
|
|
|
+ placeholder="请输入备注"
|
|
|
+ :disabled="orderInfo.recordStatus > 0"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -255,14 +457,21 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listDetail, getDetail, delDetail, addDetail, updateDetail } from "@/api/order/detail";
|
|
|
+import {
|
|
|
+ listDetail,
|
|
|
+ getDetail,
|
|
|
+ delDetail,
|
|
|
+ addDetail,
|
|
|
+ updateDetail,
|
|
|
+} from "@/api/order/detail";
|
|
|
import { listLocation } from "@/api/asset/location";
|
|
|
+import { listInformation } from "@/api/asset/information";
|
|
|
export default {
|
|
|
name: "Detail",
|
|
|
props: {
|
|
|
orderInfo: {
|
|
|
type: Object,
|
|
|
- default: () => {
|
|
|
+ default: () => {
|
|
|
return {
|
|
|
id: null,
|
|
|
orderNumber: null,
|
|
@@ -283,10 +492,10 @@ export default {
|
|
|
preparedBy: null,
|
|
|
preparedDepartment: null,
|
|
|
corporation: null,
|
|
|
- recordStatus: null
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ recordStatus: null,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -306,6 +515,8 @@ export default {
|
|
|
detailList: [],
|
|
|
// 所属位置表格数据
|
|
|
locationList: [],
|
|
|
+ // 资产信息表格数据
|
|
|
+ informationList: [],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
@@ -332,21 +543,24 @@ export default {
|
|
|
// { required: true, message: "单据编号不能为空", trigger: "blur" }
|
|
|
// ],
|
|
|
assetNumber: [
|
|
|
- { required: true, message: "资产编号不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "资产编号不能为空", trigger: "blur" },
|
|
|
],
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- console.log('单据明细-单据信息:', this.orderInfo)
|
|
|
- this.getLocation()
|
|
|
+ console.log("单据明细-单据信息:", this.orderInfo);
|
|
|
+ this.getLocation();
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询单据明细列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- listDetail(this.queryParams).then(response => {
|
|
|
+ listInformation().then((response) => {
|
|
|
+ this.informationList = response.rows;
|
|
|
+ });
|
|
|
+ listDetail(this.queryParams).then((response) => {
|
|
|
this.detailList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
@@ -358,6 +572,10 @@ export default {
|
|
|
this.locationList = response.rows;
|
|
|
});
|
|
|
},
|
|
|
+ getAssetName(val){
|
|
|
+ let arr = this.informationList.filter(item => item.number===val);
|
|
|
+ return arr[0].name
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|
|
@@ -376,7 +594,7 @@ export default {
|
|
|
lendReturnDate: null,
|
|
|
lendActualReturnDate: null,
|
|
|
lendBySponsor: null,
|
|
|
- remark: null
|
|
|
+ remark: null,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -392,22 +610,22 @@ export default {
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
- this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
- this.multiple = !selection.length
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleAdd() {
|
|
|
this.reset();
|
|
|
- this.form.orderNumber = this.orderInfo.orderNumber
|
|
|
+ this.form.orderNumber = this.orderInfo.orderNumber;
|
|
|
this.open = true;
|
|
|
this.title = "添加单据明细";
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
|
- const id = row.id || this.ids
|
|
|
- getDetail(id).then(response => {
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getDetail(id).then((response) => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改单据明细";
|
|
@@ -415,8 +633,8 @@ export default {
|
|
|
},
|
|
|
onReturn(row) {
|
|
|
this.reset();
|
|
|
- const id = row.id || this.ids
|
|
|
- getDetail(id).then(response => {
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getDetail(id).then((response) => {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "归还单据信息";
|
|
@@ -424,16 +642,16 @@ export default {
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
- updateDetail(this.form).then(response => {
|
|
|
+ updateDetail(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- addDetail(this.form).then(response => {
|
|
|
+ addDetail(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -445,29 +663,37 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除单据明细编号为"' + ids + '"的数据项?').then(function() {
|
|
|
- return delDetail(ids);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ this.$modal
|
|
|
+ .confirm('是否确认删除单据明细编号为"' + ids + '"的数据项?')
|
|
|
+ .then(function () {
|
|
|
+ return delDetail(ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- this.download('order/detail/export', {
|
|
|
- ...this.queryParams
|
|
|
- }, `detail_${new Date().getTime()}.xlsx`)
|
|
|
- }
|
|
|
- }
|
|
|
+ this.download(
|
|
|
+ "order/detail/export",
|
|
|
+ {
|
|
|
+ ...this.queryParams,
|
|
|
+ },
|
|
|
+ `detail_${new Date().getTime()}.xlsx`
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-/deep/ .vue-treeselect{
|
|
|
- display:inline-block;
|
|
|
+/deep/ .vue-treeselect {
|
|
|
+ display: inline-block;
|
|
|
}
|
|
|
-.queryForm{
|
|
|
- /deep/ .vue-treeselect{
|
|
|
+.queryForm {
|
|
|
+ /deep/ .vue-treeselect {
|
|
|
width: 205px;
|
|
|
height: 32px;
|
|
|
}
|