代码提交
This commit is contained in:
parent
6eb8116333
commit
ea105bf895
|
|
@ -105,7 +105,7 @@
|
||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
:rules="queryRules"
|
:rules="queryRules"
|
||||||
style="margin-top: 20px"
|
style="margin-top: 10px"
|
||||||
>
|
>
|
||||||
<!-- 始终显示的查询条件 -->
|
<!-- 始终显示的查询条件 -->
|
||||||
<el-row :gutter="15">
|
<el-row :gutter="15">
|
||||||
|
|
@ -232,7 +232,7 @@
|
||||||
clearable
|
clearable
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="0"
|
:min="0"
|
||||||
style="width: 120px"
|
style="width: 150px"
|
||||||
/>
|
/>
|
||||||
<span> - </span>
|
<span> - </span>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
|
@ -241,7 +241,7 @@
|
||||||
clearable
|
clearable
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:min="0"
|
:min="0"
|
||||||
style="width: 120px"
|
style="width: 150px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -314,64 +314,6 @@
|
||||||
<span class="table-count"> 共 {{ total }} 条记录</span>
|
<span class="table-count"> 共 {{ total }} 条记录</span>
|
||||||
</div>
|
</div>
|
||||||
<span>
|
<span>
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
style="margin-left: 20px"
|
|
||||||
size="mini"
|
|
||||||
icon="el-icon-ship"
|
|
||||||
@click="onHandleOut"
|
|
||||||
class="operation-btn"
|
|
||||||
>
|
|
||||||
自用出库
|
|
||||||
</el-button>
|
|
||||||
<!-- <el-button type="primary" size="mini" @click="onHandleIn" class="operation-btn">
|
|
||||||
<i class="el-icon-box"></i> 退库
|
|
||||||
</el-button> -->
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
size="mini"
|
|
||||||
icon="el-icon-help"
|
|
||||||
@click="onHandleRepair"
|
|
||||||
class="operation-btn"
|
|
||||||
>
|
|
||||||
装备维修
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
size="mini"
|
|
||||||
icon="el-icon-document-delete"
|
|
||||||
@click="onHandleRetire"
|
|
||||||
class="operation-btn"
|
|
||||||
>
|
|
||||||
装备退役
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
size="mini"
|
|
||||||
icon="el-icon-document-checked"
|
|
||||||
@click="onHandleReturn"
|
|
||||||
class="operation-btn"
|
|
||||||
>
|
|
||||||
装备退库
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
size="mini"
|
|
||||||
icon="el-icon-arrow-down"
|
|
||||||
@click="onHandleDeviceDown"
|
|
||||||
class="operation-btn"
|
|
||||||
>
|
|
||||||
装备下架
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
size="mini"
|
|
||||||
icon="el-icon-arrow-up"
|
|
||||||
@click="onHandleDeviceUp"
|
|
||||||
class="operation-btn"
|
|
||||||
>
|
|
||||||
装备上架
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
style="float: right"
|
style="float: right"
|
||||||
|
|
@ -389,11 +331,11 @@
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
:max-height="tableHeight"
|
|
||||||
:key="Date.now()"
|
:key="Date.now()"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
v-loading="tableLoading"
|
v-loading="tableLoading"
|
||||||
border stripe
|
border stripe
|
||||||
|
style="height: 55vh;overflow-y: auto;"
|
||||||
>
|
>
|
||||||
<el-table-column align="center" show-overflow-tooltip type="selection" width="50"/>
|
<el-table-column align="center" show-overflow-tooltip type="selection" width="50"/>
|
||||||
<el-table-column align="center" show-overflow-tooltip type="index" label="序号" width="50"/>
|
<el-table-column align="center" show-overflow-tooltip type="index" label="序号" width="50"/>
|
||||||
|
|
@ -403,6 +345,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
align="center"
|
align="center"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
|
min-width="200"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:prop="item.prop"
|
:prop="item.prop"
|
||||||
>
|
>
|
||||||
|
|
@ -424,7 +367,7 @@
|
||||||
<el-tag v-if="row.status == 2" size="mini">自用</el-tag>
|
<el-tag v-if="row.status == 2" size="mini">自用</el-tag>
|
||||||
<el-tag v-if="row.status == 3" size="mini">共享</el-tag>
|
<el-tag v-if="row.status == 3" size="mini">共享</el-tag>
|
||||||
<el-tag v-if="row.status == 4" size="mini" type="danger">退役</el-tag>
|
<el-tag v-if="row.status == 4" size="mini" type="danger">退役</el-tag>
|
||||||
<el-tag v-if="row.status == 5" size="mini" type="warning" >维修</el-tag>
|
<el-tag v-if="row.status == 5" size="mini" type="warning">维修</el-tag>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot="{ row }" v-else-if="item.prop == 'appearanceImages'">
|
<template v-slot="{ row }" v-else-if="item.prop == 'appearanceImages'">
|
||||||
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 1)">查看</span>
|
<span style="color: #00a288; cursor: pointer" @click="handleView(row, 1)">查看</span>
|
||||||
|
|
@ -445,17 +388,11 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" fixed="right" min-width="200" label="操作">
|
<el-table-column align="center" fixed="right" min-width="200" label="操作">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="mini" @click="onHandlePreview(scope.row)">
|
<el-button type="text" @click="onHandlePreview(scope.row)">
|
||||||
<i class="el-icon-view"></i> 查看
|
<i class="el-icon-view"></i> 查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button type="text" size="mini" @click="onHandleEdit(scope.row)">
|
|
||||||
<i class="el-icon-edit"></i> 编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button type="text" size="mini" @click="onHandleDelete(scope.row)">
|
|
||||||
<i class="el-icon-delete"></i> 删除
|
|
||||||
</el-button> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -775,7 +712,7 @@
|
||||||
|
|
||||||
<!-- 弹框 -->
|
<!-- 弹框 -->
|
||||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
|
||||||
<el-table :data="dialogList" fit highlight-current-row style="width: 100%" :max-height="500">
|
<el-table :data="dialogList" fit highlight-current-row style="width: 100%" :max-height="500">
|
||||||
<el-table-column type="index" width="55" label="序号" align="center"/>
|
<el-table-column type="index" width="55" label="序号" align="center"/>
|
||||||
<el-table-column label="附件名称" prop="fileName" align="center">
|
<el-table-column label="附件名称" prop="fileName" align="center">
|
||||||
<!-- 插槽 -->
|
<!-- 插槽 -->
|
||||||
|
|
@ -1652,7 +1589,7 @@ export default {
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.app-container {
|
.app-container {
|
||||||
padding: 20px;
|
padding: 12px;
|
||||||
background-color: #f5f7fa;
|
background-color: #f5f7fa;
|
||||||
height: calc(100vh - 84px);
|
height: calc(100vh - 84px);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -689,15 +689,66 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 提交申请(新增/编辑,devType随数据传递)
|
// 提交申请(新增/编辑,devType随数据传递)
|
||||||
|
// 提交
|
||||||
async submit() {
|
async submit() {
|
||||||
this.$refs.queryForm.validate(async(valid) => {
|
this.$refs.queryForm.validate(async(valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.tableList.length === 0) {
|
|
||||||
return this.$message.error('请至少添加一项申请设备');
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$confirm('是否确定提交申请?', '提示', {
|
this.$confirm('是否确定提交申请?', '提示', {
|
||||||
confirmButtonText: '确定'
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(async() => {
|
||||||
|
this.isLoading = true
|
||||||
|
try {
|
||||||
|
//新增
|
||||||
|
if (!this.routerParams.id) {
|
||||||
|
this.queryParams.type = 2
|
||||||
|
this.queryParams.leaseType = 0
|
||||||
|
const tempTableList = this.tableList.map(item => ({
|
||||||
|
...item,
|
||||||
|
category: null
|
||||||
|
}))
|
||||||
|
const params = {
|
||||||
|
devInfo: this.queryParams,
|
||||||
|
devDetailsList: tempTableList
|
||||||
|
}
|
||||||
|
const res = await addApplyApi(params)
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '添加成功!'
|
||||||
|
})
|
||||||
|
this.$router.go(-1)
|
||||||
|
// this.$tab.closeOpenPage({ path: '/business/applyList' })
|
||||||
|
}
|
||||||
|
} else if (this.routerParams.id) {
|
||||||
|
// 修改
|
||||||
|
this.queryParams.type = 2
|
||||||
|
this.queryParams.leaseType = 0
|
||||||
|
const tempTableList = this.tableList.map(item => ({
|
||||||
|
...item,
|
||||||
|
category: null
|
||||||
|
}))
|
||||||
|
const params = {
|
||||||
|
devInfo: this.queryParams,
|
||||||
|
devDetailsList: tempTableList
|
||||||
|
}
|
||||||
|
const res = await editApplyApi(params)
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '修改成功!'
|
||||||
|
})
|
||||||
|
this.$router.go(-1)
|
||||||
|
// this.$tab.closeOpenPage({ path: '/business/applyList' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.log('🚀 ~ error:', error)
|
||||||
|
} finally {
|
||||||
|
this.isLoading = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue