Commit aad455dc by zhaopanyu

zpy 10.11

parent 63dc7a74
......@@ -20,7 +20,11 @@
<el-table stripe :data="tableData" border style="width: 98%">
<el-table-column align="center" type="index" label="序号" width="55" />
<el-table-column align="center" prop="borrowBy" label="申请人" />
<el-table-column align="center" prop="borrowState" label="借用状态" />
<el-table-column align="center" prop="borrowState" label="借用状态">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.borrow_state, row.borrowState) }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="schoolTeacherBorrowDetailList" label="借用明细">
<template slot-scope="{ row }">
<div v-for="detail in row.schoolTeacherBorrowDetailList" :key="detail.id">
......@@ -34,10 +38,14 @@
<el-table-column align="center" prop="remark" label="备注" />
<el-table-column align="center" fixed="right" label="操作">
<template slot-scope="scope">
<el-button @click="handleLook(scope.row)" type="text" size="small">详情</el-button>
<el-button @click="processItem(scope.row)" type="text" size="small">借用</el-button>
<el-button @click="returnItem(scope.row)" type="text" size="small">归还</el-button>
<el-button v-if="scope.row.borrowState === '0' || scope.row.borrowState === '1'"
@click="handleLook(scope.row)" type="text" size="small">详情</el-button>
<el-button v-if="scope.row.borrowState === '0'" @click="returnItem(scope.row)" type="text"
size="small">归还</el-button>
<el-button v-if="scope.row.borrowState === '2'" @click="processItem(scope.row)" type="text"
size="small">借用</el-button>
</template>
</el-table-column>
</el-table>
......@@ -203,6 +211,7 @@ import {
} from '@/api/smartSchool/InstrumentDrugAdministration/instrumentBorrowManagement/warehouseEquipmentLoan'
export default {
name: 'warehouseEquipmentLoan',
dicts: ['borrow_state'],
data() {
return {
queryForm: {
......
......@@ -21,8 +21,6 @@
</el-col>
</el-row>
<!-- 表格 -->
<el-table :data="tableData" v-loading="loading" row-key="id" :default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
......@@ -120,8 +118,8 @@ export default {
queryForm: {
pageNum: 1,
pageSize: 10,
instrumentTypeName: "",
id: "",
instrumentTypeName: null,
id: null,
},
selectedRows: [], // 用于存储选择的行数据
//表格数据
......@@ -132,8 +130,8 @@ export default {
title: '',
// 弹窗
form: {
instrumentTypeName: "",
parentId: "",
instrumentTypeName: null,
parentId: null,
orderNum: "",
isConsumables: "",
remark: "",
......@@ -178,6 +176,7 @@ export default {
this.loading = false;
})
},
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
......@@ -193,8 +192,8 @@ export default {
this.queryForm = {
pageNum: 1,
pageSize: 10,
instrumentTypeName: "",
id: "",
instrumentTypeName: null,
id: null,
},
this.getList();
},
......@@ -203,8 +202,8 @@ export default {
handleOption(type, item) {
this.form = {
id: '',
instrumentTypeName: "",
parentId: "",
instrumentTypeName: null,
parentId: null,
orderNum: "",
isConsumables: "",
remark: "",
......@@ -266,7 +265,7 @@ export default {
// 这里需要重置对话框表单
this.form = {
instrumentTypeName: "",
parentId: "",
parentId: null,
orderNum: "",
isConsumables: "",
remark: "",
......
......@@ -59,7 +59,7 @@ export default {
pageNum: 1,
pageSize: 10,
instrumentName: "",
instrumentTypeId: "",
instrumentTypeId: null,
daterange: "",
startTime: "",
endTime: "",
......@@ -99,6 +99,8 @@ export default {
},
/** 转换分类编码数据结构 */
normalizer(node) {
console.log('queryForm.instrumentTypeId', this.queryForm.instrumentTypeId);
console.log('node', node);
if (node.children && !node.children.length) {
delete node.children;
}
......@@ -114,7 +116,7 @@ export default {
pageNum: 1,
pageSize: 10,
instrumentName: "",
instrumentTypeId: "",
instrumentTypeId: null,
startTime: "",
endTime: "",
},
......
......@@ -177,7 +177,7 @@ export default {
pageNum: 1,
pageSize: 10,
instrumentName: "",
instrumentTypeId: "",
instrumentTypeId: null,
},
//表格数据
tableData: [
......@@ -199,7 +199,7 @@ export default {
form: {
instrumentName: "",
instrumentTypeId: "",
instrumentTypeName: "",
instrumentTypeName: null,
instrumentModel: "",
instrumentNum: "",
remark: "",
......@@ -289,7 +289,7 @@ export default {
pageNum: 1,
pageSize: 10,
instrumentName: "",
instrumentTypeId: "",
instrumentTypeId: null,
},
this.getList();
},
......@@ -426,7 +426,7 @@ export default {
this.form = {
id: null,
instrumentName: null,
instrumentTypeId: null,
instrumentTypeId: '',
instrumentTypeName: null,
instrumentModel: null,
instrumentNum: null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment