Commit aad455dc by zhaopanyu

zpy 10.11

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