| | |
| | | <!-- |
| | | * @Date: 2024-01-06 17:40:19 |
| | | * @LastEditors: Sneed |
| | | * @LastEditTime: 2024-01-13 11:33:09 |
| | | * @LastEditTime: 2024-01-18 23:33:58 |
| | | * @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"> |
| | | <span>统一编号</span> |
| | | <el-input class="item-value" v-model="queryInfo.uuid"></el-input> |
| | | <el-input class="item-value" v-model="queryInfo.uuid" clearable></el-input> |
| | | </div> |
| | | <div class="item"> |
| | | <span>设备规格</span> |
| | | <el-input class="item-value" v-model="queryInfo.specification"></el-input> |
| | | <el-input class="item-value" v-model="queryInfo.specification" clearable></el-input> |
| | | </div> |
| | | <div class="item"> |
| | | <span>设备型号</span> |
| | | <el-input class="item-value" v-model="queryInfo.type"></el-input> |
| | | <el-input class="item-value" v-model="queryInfo.type" clearable></el-input> |
| | | </div> |
| | | <div class="item"> |
| | | <span>加工类型</span> |
| | | <el-select class="item-value" v-model="queryInfo.category" placeholder=""> |
| | | <el-select class="item-value" v-model="queryInfo.category" placeholder="" clearable> |
| | | <el-option v-for="item in deviceType" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="item"> |
| | | <span>账务属性</span> |
| | | <el-select class="item-value" v-model="queryInfo.accountingAttribute" placeholder=""> |
| | | <el-option v-for="item in accountingAttribute" :key="item.value" :label="item.label" |
| | | <el-select class="item-value" v-model="queryInfo.accountingAttribute" placeholder="" clearable> |
| | | <el-option v-for="item in financePro" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="item"> |
| | | <span>使用部门</span> |
| | | <el-select class="item-value" v-model="queryInfo.department"> |
| | | <el-select class="item-value" v-model="queryInfo.department" clearable> |
| | | <el-option v-for="item in departmentlist" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="item"> |
| | | <span>设备管理分类</span> |
| | | <el-select class="item-value" v-model="queryInfo.manageType"> |
| | | <el-select class="item-value" v-model="queryInfo.manageType" clearable> |
| | | <el-option value="A">A</el-option> |
| | | <el-option value="B">B</el-option> |
| | | <el-option value="C">C</el-option> |
| | |
| | | </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="选择日期" clearable></el-date-picker> |
| | | </div> |
| | | <div class="item"> |
| | | <span>生产厂家</span> |
| | | <el-input class="item-value" v-model="queryInfo.manufacturer"></el-input> |
| | | <el-input class="item-value" v-model="queryInfo.manufacturer" clearable></el-input> |
| | | </div> |
| | | <div class="item"> |
| | | <span>设备类型</span> |
| | | <el-select class="item-value" v-model="queryInfo.deviceTypeId" placeholder="" clearable> |
| | | <el-option v-for="item in deviceTypeIds" :key="item.id" :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="item" style="flex: 1 1 auto;justify-content: flex-end;"> |
| | | <el-button type="primary" size="small" @click="query">查询</el-button> |
| | | <!-- <div class="query btn" @click="query">查询</div> --> |
| | | </div> |
| | | <div class="item"> |
| | | <el-button type="primary" size="small" @click="reset">重置</el-button> |
| | | <!-- <div class="reset btn" @click="reset">重置</div> --> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <template slot="table-tool"> |
| | |
| | | align="center" |
| | | prop="classes"> |
| | | </el-table-column> --> |
| | | <el-table-column label="使用部门" align="center" prop="department"> |
| | | <el-table-column label="使用部门" align="center" prop="departmentName"> |
| | | </el-table-column> |
| | | <el-table-column label="设备类型" align="center" prop="category"> |
| | | </el-table-column> |
| | |
| | | <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> |
| | | </List> |
| | | <manage-add-update v-if="addOrUpdateVisible" :addVisible="addOrUpdateVisible" @close="close" @confirm="confirm" |
| | | :deviceType="deviceType" :departmentlist="departmentlist" :isselectlist="isselectlist" |
| | | :deviceStatus="deviceStatus" :financePro="financePro" :row="row"></manage-add-update> |
| | | :deviceStatus="deviceStatus" :financePro="financePro" :deviceTypeIds="deviceTypeIds" :row="row"></manage-add-update> |
| | | </div> |
| | | </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: { |
| | |
| | | { value: 'IDLE', label: '空闲' }, |
| | | { value: 'ALARM', label: '报警' } |
| | | ], |
| | | deviceTypeIds: [], |
| | | // 账务属性 |
| | | financePro: [ |
| | | { value: '帐内', label: '帐内' }, |
| | |
| | | manageType: '', |
| | | productionDate: '', |
| | | manufacturer: '', |
| | | deviceTypeId: '' |
| | | }, |
| | | options: [{}], |
| | | row: {}, |
| | |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | getRequest('deviceTypeList').then(res => { |
| | | this.deviceTypeIds = res.data || [] |
| | | }) |
| | | }, |
| | | query() { |
| | | this.$refs.list.pageQuery(this.queryInfo) |
| | | }, |
| | | reset () { |
| | | reset() { |
| | | Object.keys(this.queryInfo).forEach(key => { |
| | | this.queryInfo[key] = '' |
| | | }) |
| | |
| | | addOrUpdateHandle(row) { |
| | | this.row = row |
| | | this.addOrUpdateVisible = true |
| | | }, |
| | | del(row) { |
| | | this.$confirm('确定要永久删除此项?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | getRequest('accountDel', { ids: [row.id] }).then(res => { |
| | | this.query() |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '删除成功!' |
| | | }) |
| | | this.submitForm() |
| | | },() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消删除' |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | |
| | | border: 1px solid #435F9E; |
| | | } |
| | | } |
| | | |
| | | .el-button--mini { |
| | | background: transparent; |
| | | } |
| | | |
| | | .el-button--primary { |
| | | background-color: transparent; |
| | | } |
| | |
| | | |
| | | .nav { |
| | | padding: 10px 30px; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .item { |