init
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
|
||||
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
placeholder="年度"
|
||||
value-format="yyyy"
|
||||
format="yyyy年"
|
||||
v-model="pageForm.year"
|
||||
type="year">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" clearable @keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 120px;">
|
||||
<el-option label="内容" value="zcmc"></el-option>
|
||||
<el-option label="编号" value="zcbh"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.contentCode" clearable placeholder="所属类别">
|
||||
<el-option v-for="item in lbList" :label="item.content+'('+item.contentCode+')'"
|
||||
:value="item.contentCode"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="资产折旧信息" :app="this"></table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
searchName: 'zcmc'
|
||||
},
|
||||
lbList: [],
|
||||
tableColumns: [
|
||||
{prop: 'zcbh', label: '编号'},
|
||||
{prop: 'zcmc', label: '名称'},
|
||||
{prop: 'zcxh', label: '型号规格'},
|
||||
{prop: 'content', label: '资产所属类别'},
|
||||
{prop: 'zcgzrq', label: '购置日期'},
|
||||
{prop: 'zcrksj', label: '入库日期'},
|
||||
{prop: 'zdrDepreciationDate', label: '折旧到期时间'},
|
||||
{prop: 'surplus', label: '折旧到期时间(月)'},
|
||||
{prop: 'operationTime', label: '折旧时间'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('确定要删除当前折旧信息吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const data = await $.post(loc()+"/doDelete", {id:id})
|
||||
if (data.code == 0) {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'success'
|
||||
});
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const data = await $.post("/platform/zcgl/zclb/queryLb")
|
||||
this.lbList = data.data
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user