gaosp
2024-01-14 0d626ae57149d5ed40a32bd8b808ca6069aa6d5e
src/container/ledger/index.vue
@@ -1,12 +1,12 @@
<!--
 * @Date: 2024-01-06 17:40:19
 * @LastEditors: Sneed
 * @LastEditTime: 2024-01-13 11:33:09
 * @LastEditTime: 2024-01-14 16:31:53
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/container/ledger/index.vue
-->
<template>
    <div class="maintenance">
        <div class="nav">设备保养/日常保养</div>
        <div class="nav">台账</div>
        <List ref="list" url="/account/pageQuery">
            <template slot="search">
                <div class="item">
@@ -53,7 +53,8 @@
                </div>
                <div class="item">
                    <span>投产日期</span>
                    <el-date-picker class="item-value" format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="queryInfo.productionDate" type="date" clearable placeholder="选择日期"></el-date-picker>
                    <el-date-picker class="item-value" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
                        v-model="queryInfo.productionDate" type="date" clearable placeholder="选择日期"></el-date-picker>
                </div>
                <div class="item">
                    <span>生产厂家</span>
@@ -128,6 +129,7 @@
                <el-table-column fixed="right" align="center" label="操作">
                    <template slot-scope="scope">
                        <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row)">编辑</el-button>
                        <el-button type="text" size="small" @click="del(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </template>
@@ -139,7 +141,7 @@
</template>
<script>
import ManageAddUpdate from './Manage-add-update'
import { getUseDpts } from '@/api/Api'
import { getUseDpts, getRequest } from '@/api/Api'
import List from '../list/index.vue'
export default {
    components: {
@@ -218,7 +220,7 @@
        query() {
            this.$refs.list.pageQuery(this.queryInfo)
        },
        reset () {
        reset() {
            Object.keys(this.queryInfo).forEach(key => {
                this.queryInfo[key] = ''
            })
@@ -237,6 +239,26 @@
        addOrUpdateHandle(row) {
            this.row = row
            this.addOrUpdateVisible = true
        },
        del(row) {
            this.$confirm('确定要永久删除此项?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(() => {
                getRequest('accountDel', { ids: [row.id].join(',') }).then(res => {
                    this.$message({
                        type: 'success',
                        message: '删除成功!'
                    })
                    this.submitForm()
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消删除'
                    })
                })
            })
        }
    },
}
@@ -250,9 +272,11 @@
            border: 1px solid #435F9E;
        }
    }
    .el-button--mini {
        background: transparent;
    }
    .el-button--primary {
        background-color: transparent;
    }
@@ -269,6 +293,7 @@
    .nav {
        padding: 10px 30px;
        font-size: 14px;
    }
    .item {