资产管理初始化
This commit is contained in:
parent
3c156cc146
commit
888ff1fb07
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@ selenium-debug.log
|
||||
*.local
|
||||
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
|
53
src/api/base/property/position.js
Normal file
53
src/api/base/property/position.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建企业管理-资产存放位置
|
||||
export function createPropertyPos(data) {
|
||||
return request({
|
||||
url: '/company/property-pos/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新企业管理-资产存放位置
|
||||
export function updatePropertyPos(data) {
|
||||
return request({
|
||||
url: '/company/property-pos/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除企业管理-资产存放位置
|
||||
export function deletePropertyPos(id) {
|
||||
return request({
|
||||
url: '/company/property-pos/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得企业管理-资产存放位置
|
||||
export function getPropertyPos(id) {
|
||||
return request({
|
||||
url: '/company/property-pos/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得企业管理-资产存放位置分页
|
||||
export function getPropertyPosPage(params) {
|
||||
return request({
|
||||
url: '/company/property-pos/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 导出企业管理-资产存放位置 Excel
|
||||
export function exportPropertyPosExcel(params) {
|
||||
return request({
|
||||
url: '/company/property-pos/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
53
src/api/base/property/property.js
Normal file
53
src/api/base/property/property.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建企业管理-资产
|
||||
export function createProperty(data) {
|
||||
return request({
|
||||
url: '/company/property/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新企业管理-资产
|
||||
export function updateProperty(data) {
|
||||
return request({
|
||||
url: '/company/property/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除企业管理-资产
|
||||
export function deleteProperty(id) {
|
||||
return request({
|
||||
url: '/company/property/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得企业管理-资产
|
||||
export function getProperty(id) {
|
||||
return request({
|
||||
url: '/company/property/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得企业管理-资产分页
|
||||
export function getPropertyPage(params) {
|
||||
return request({
|
||||
url: '/company/property/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 导出企业管理-资产 Excel
|
||||
export function exportPropertyExcel(params) {
|
||||
return request({
|
||||
url: '/company/property/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
53
src/api/base/property/propertydeal.js
Normal file
53
src/api/base/property/propertydeal.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建企业管理-资产处置单/变动单
|
||||
export function createPropertyDeal(data) {
|
||||
return request({
|
||||
url: '/company/property-deal/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新企业管理-资产处置单/变动单
|
||||
export function updatePropertyDeal(data) {
|
||||
return request({
|
||||
url: '/company/property-deal/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除企业管理-资产处置单/变动单
|
||||
export function deletePropertyDeal(id) {
|
||||
return request({
|
||||
url: '/company/property-deal/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得企业管理-资产处置单/变动单
|
||||
export function getPropertyDeal(id) {
|
||||
return request({
|
||||
url: '/company/property-deal/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得企业管理-资产处置单/变动单分页
|
||||
export function getPropertyDealPage(params) {
|
||||
return request({
|
||||
url: '/company/property-deal/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 导出企业管理-资产处置单/变动单 Excel
|
||||
export function exportPropertyDealExcel(params) {
|
||||
return request({
|
||||
url: '/company/property-deal/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
53
src/api/base/property/propertydealitem.js
Normal file
53
src/api/base/property/propertydealitem.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建企业管理-资产处置子
|
||||
export function createPropertyDealItem(data) {
|
||||
return request({
|
||||
url: '/company/property-deal-item/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新企业管理-资产处置子
|
||||
export function updatePropertyDealItem(data) {
|
||||
return request({
|
||||
url: '/company/property-deal-item/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除企业管理-资产处置子
|
||||
export function deletePropertyDealItem(id) {
|
||||
return request({
|
||||
url: '/company/property-deal-item/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得企业管理-资产处置子
|
||||
export function getPropertyDealItem(id) {
|
||||
return request({
|
||||
url: '/company/property-deal-item/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得企业管理-资产处置子分页
|
||||
export function getPropertyDealItemPage(params) {
|
||||
return request({
|
||||
url: '/company/property-deal-item/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 导出企业管理-资产处置子 Excel
|
||||
export function exportPropertyDealItemExcel(params) {
|
||||
return request({
|
||||
url: '/company/property-deal-item/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
53
src/api/base/property/propertykeep.js
Normal file
53
src/api/base/property/propertykeep.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 创建资产维修/保养记录
|
||||
export function createPropertyKeep(data) {
|
||||
return request({
|
||||
url: '/company/property-keep/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新资产维修/保养记录
|
||||
export function updatePropertyKeep(data) {
|
||||
return request({
|
||||
url: '/company/property-keep/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除资产维修/保养记录
|
||||
export function deletePropertyKeep(id) {
|
||||
return request({
|
||||
url: '/company/property-keep/delete?id=' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得资产维修/保养记录
|
||||
export function getPropertyKeep(id) {
|
||||
return request({
|
||||
url: '/company/property-keep/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得资产维修/保养记录分页
|
||||
export function getPropertyKeepPage(params) {
|
||||
return request({
|
||||
url: '/company/property-keep/page',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 导出资产维修/保养记录 Excel
|
||||
export function exportPropertyKeepExcel(params) {
|
||||
return request({
|
||||
url: '/company/property-keep/export-excel',
|
||||
method: 'get',
|
||||
params,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
@ -1,22 +1,27 @@
|
||||
<!-- 二级维护 -->
|
||||
<!-- 车辆基础信息 -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="发动机号码" prop="engineNumber">
|
||||
<el-input v-model="queryParams.engineNumber" placeholder="请输入发动机号码" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车架号" prop="vin">
|
||||
<el-input v-model="queryParams.vin" placeholder="请输入车架号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="licenseNumber">
|
||||
<el-input v-model="queryParams.licenseNumber" placeholder="请输入车牌号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆型号" prop="carModel">
|
||||
<el-input v-model="queryParams.carModel" placeholder="请输入车辆型号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-form-item label="发动机号码" prop="engineNumber" label-width="90">
|
||||
<el-input v-model="queryParams.engineNumber" placeholder="请输入发动机号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌型号" prop="engineNumber" label-width="90">
|
||||
<CarBrandSelector v-model="queryParams.brandAndModel" ref="brandForm" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="车架号" prop="vin">
|
||||
<el-input v-model="queryParams.vin" placeholder="请输入车架号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
|
||||
<!-- <el-form-item label="车辆型号" prop="carModel" label-width="90">
|
||||
<el-input v-model="queryParams.carModel" placeholder="请输入车辆型号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="保养日期" prop="maintenanceDate">
|
||||
<el-date-picker v-model="queryParams.maintenanceDate" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
@ -41,32 +46,31 @@
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车辆品牌" prop="carBrand">
|
||||
<!-- <el-form-item label="车辆品牌" prop="carBrand" label-width="90">
|
||||
<el-input v-model="queryParams.carBrand" placeholder="请输入车辆品牌" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车辆性质" prop="carNature" label-width="90">
|
||||
<el-input v-model="queryParams.carNature" placeholder="请输入车辆性质" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆性质" prop="carNature">
|
||||
<el-input v-model="queryParams.carNature" placeholder="请输入车辆性质" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆注册日期" prop="carRegisterDate">
|
||||
<!-- <el-form-item label="注册日期" prop="carRegisterDate">
|
||||
<el-date-picker v-model="queryParams.carRegisterDate" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最近办理业务" prop="recentlyHandledBusiness">
|
||||
<el-input v-model="queryParams.recentlyHandledBusiness" placeholder="请输入最近办理业务" clearable
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="最近业务" prop="recentlyHandledBusiness">
|
||||
<el-input v-model="queryParams.recentlyHandledBusiness" placeholder="请输入最近业务" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最近办理业务的时间" prop="recentlyHandleBusinessTime">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="最近业务时间" prop="recentlyHandleBusinessTime">
|
||||
<el-date-picker v-model="queryParams.recentlyHandleBusinessTime" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="登记时间" prop="createTime">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="登记时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
@ -86,18 +90,26 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" >
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<!-- <el-table-column label="主键标识" align="center" prop="id" /> -->
|
||||
|
||||
<el-table-column label="序号" align="center" prop="num" >
|
||||
<el-table-column label="序号" align="center" prop="num">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ queryParams.pageSize * (queryParams.pageNo - 1) + scope.$index + 1 }}</span>
|
||||
<span style="margin-left: 10px">{{ queryParams.pageSize * (queryParams.pageNo - 1) + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发动机号码" align="center" prop="engineNumber" />
|
||||
<el-table-column label="车架号" align="center" prop="vin" />
|
||||
<el-table-column label="车牌号" align="center" prop="licenseNumber" />
|
||||
<el-table-column label="车辆型号" align="center" prop="carModel" />
|
||||
<el-table-column label="车牌号" align="center" prop="licenseNumber" width="150">
|
||||
<template v-slot="scope">
|
||||
<router-link :to="'./check/' + scope.row.id" class="link-type">
|
||||
<span>{{ scope.row.licenseNumber }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发动机号码" align="center" prop="engineNumber" width="180" />
|
||||
<el-table-column label="车架号" align="center" prop="vin" width="150" />
|
||||
<el-table-column label="车辆品牌" align="center" prop="brandStr" />
|
||||
<el-table-column label="车辆型号" align="center" prop="modelStr" />
|
||||
<!-- <el-table-column label="保养日期" align="center" prop="maintenanceDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.maintenanceDate,'{y}-{m}-{d}') }}</span>
|
||||
@ -119,37 +131,62 @@
|
||||
<span>{{ parseTime(scope.row.checkDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="车辆品牌" align="center" prop="carBrand" />
|
||||
<el-table-column label="车辆性质" align="center" prop="carNature" />
|
||||
<el-table-column label="车辆注册日期" align="center" prop="carRegisterDate" width="180">
|
||||
|
||||
<el-table-column label="车辆类别" align="center" prop="carCategory">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.carRegisterDate,'{y}-{m}-{d}') }}</span>
|
||||
<dict-tag :type="DICT_TYPE.DICT_CAR_CATEGORY" :value="scope.row.carCategory" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近办理业务" align="center" prop="recentlyHandledBusiness" />
|
||||
<el-table-column label="最近办理业务的时间" align="center" prop="recentlyHandleBusinessTime" width="180">
|
||||
<el-table-column label="车辆性质" align="center" prop="carNature">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.recentlyHandleBusinessTime,'{y}-{m}-{d}') }}</span>
|
||||
<dict-tag :type="DICT_TYPE.DICT_CAR_NATURE" :value="scope.row.carNature" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车辆注册日期" align="center" prop="carRegisterDate" width="130">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.carRegisterDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近办理业务" align="center" prop="recentlyHandledBusiness" width="130">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.DICT_CUS_BUSI_TYPE" :value="scope.row.recentlyHandledBusiness" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近办理业务的时间" align="center" prop="recentlyHandleBusinessTime" width="150">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.recentlyHandleBusinessTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="行驶证图片" align="center" prop="carLicenseImg" /> -->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<el-table-column label="登记时间" align="center" prop="createTime" width="120">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime,'{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template v-slot="scope">
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">查看详情</el-button> -->
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">打标签</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">查看详情</el-button>
|
||||
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">推送提醒</el-button> -->
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:car-main:delete']">删除</el-button>
|
||||
|
||||
<el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)"
|
||||
v-hasPermi="['base:car-main:update']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="bindCustomer" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:car-main:bindCustomer']">绑定客户</el-dropdown-item>
|
||||
<el-dropdown-item command="markSign" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:car-main:markSign']">打标签</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
|
||||
</el-dropdown>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -158,16 +195,25 @@
|
||||
@pagination="getList" />
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<CarMainForm ref="formRef" @success="getList" />
|
||||
<CustomerCarForm ref="bindCustomerFormRef" @success="getList" />
|
||||
<CarLabelForm ref="labelFormRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CarBrandSelector from '@/layout/components/CarBrandSelector';
|
||||
import CustomerCarForm from '@/views/base/carmain/components/CustomerCarForm.vue';
|
||||
import CarLabelForm from '@/views/base/carmain/components/CarLabelForm.vue';
|
||||
import * as CarMainApi from '@/api/base/carmain';
|
||||
import CarMainForm from './CarMainForm.vue';
|
||||
import { getDictDatas, DICT_TYPE, getDictData } from '@/utils/dict';
|
||||
export default {
|
||||
name: "CarMain",
|
||||
components: {
|
||||
CarMainForm,
|
||||
CustomerCarForm,
|
||||
CarLabelForm,
|
||||
CarBrandSelector,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -212,11 +258,32 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**更多操作*/
|
||||
handleCommand(command, index, row) {
|
||||
switch (command) {
|
||||
|
||||
//打标签
|
||||
case 'markSign': this.bindLabel(row.id); break;
|
||||
|
||||
//绑定客户信息
|
||||
case 'bindCustomer': this.openFormBindCustomer(row.id); break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
},
|
||||
openFormBindCustomer(id) {
|
||||
this.$refs["bindCustomerFormRef"].open(id);
|
||||
},
|
||||
/**打标签*/
|
||||
bindLabel(id) {
|
||||
this.$refs["labelFormRef"].open(id);
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
debugger;
|
||||
|
||||
try {
|
||||
debugger;
|
||||
|
||||
this.loading = true;
|
||||
const res = await CarMainApi.getCarMainPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
@ -227,7 +294,7 @@ export default {
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
debugger;
|
||||
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
@ -243,12 +310,58 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除车辆信息编号为"' + id + '"的数据项?')
|
||||
try {
|
||||
await CarMainApi.deleteCarMain(id);
|
||||
await this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch { }
|
||||
|
||||
let optionValue = 0;
|
||||
await this.$confirm('是否确认删除该条车辆信息?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
optionValue = 1;
|
||||
}).catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消删除'
|
||||
// });
|
||||
});
|
||||
//如果确认删除
|
||||
if (optionValue == 1) {
|
||||
//判断是否发生过业务
|
||||
if (row.recentlyHandledBusiness != null && row.recentlyHandledBusiness != "") {
|
||||
let businessObj = getDictData(DICT_TYPE.DICT_CUS_BUSI_TYPE, row.recentlyHandledBusiness);
|
||||
this.$confirm('该车曾于 "' + this.parseTime(row.recentlyHandleBusinessTime, '{y}-{m}-{d}') + '" 发生过 "' + businessObj.label + '" 业务,是否继续删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
|
||||
CarMainApi.deleteCarMain(id).then(() => {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
CarMainApi.deleteCarMain(id).then(() => {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
|
@ -1,22 +1,24 @@
|
||||
<!-- 年检 -->
|
||||
<!-- 车辆年检信息 -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="发动机号码" prop="engineNumber">
|
||||
<el-input v-model="queryParams.engineNumber" placeholder="请输入发动机号码" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车架号" prop="vin">
|
||||
<el-input v-model="queryParams.vin" placeholder="请输入车架号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="licenseNumber">
|
||||
<el-input v-model="queryParams.licenseNumber" placeholder="请输入车牌号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆型号" prop="carModel">
|
||||
<el-input v-model="queryParams.carModel" placeholder="请输入车辆型号" clearable @keyup.enter.native="handleQuery" />
|
||||
|
||||
<el-form-item label="品牌型号" prop="engineNumber" label-width="90">
|
||||
<CarBrandSelector v-model="queryParams.brandAndModel" ref="brandForm" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="车架号" prop="vin">
|
||||
<el-input v-model="queryParams.vin" placeholder="请输入车架号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
|
||||
<!-- <el-form-item label="车辆型号" prop="carModel" label-width="90">
|
||||
<el-input v-model="queryParams.carModel" placeholder="请输入车辆型号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="保养日期" prop="maintenanceDate">
|
||||
<el-date-picker v-model="queryParams.maintenanceDate" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
@ -41,32 +43,31 @@
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车辆品牌" prop="carBrand">
|
||||
<!-- <el-form-item label="车辆品牌" prop="carBrand" label-width="90">
|
||||
<el-input v-model="queryParams.carBrand" placeholder="请输入车辆品牌" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车辆性质" prop="carNature" label-width="90">
|
||||
<el-input v-model="queryParams.carNature" placeholder="请输入车辆性质" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆性质" prop="carNature">
|
||||
<el-input v-model="queryParams.carNature" placeholder="请输入车辆性质" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆注册日期" prop="carRegisterDate">
|
||||
<!-- <el-form-item label="注册日期" prop="carRegisterDate">
|
||||
<el-date-picker v-model="queryParams.carRegisterDate" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最近办理业务" prop="recentlyHandledBusiness">
|
||||
<el-input v-model="queryParams.recentlyHandledBusiness" placeholder="请输入最近办理业务" clearable
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="最近业务" prop="recentlyHandledBusiness">
|
||||
<el-input v-model="queryParams.recentlyHandledBusiness" placeholder="请输入最近业务" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最近办理业务的时间" prop="recentlyHandleBusinessTime">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="最近业务时间" prop="recentlyHandleBusinessTime">
|
||||
<el-date-picker v-model="queryParams.recentlyHandleBusinessTime" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="登记时间" prop="createTime">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="登记时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
@ -86,70 +87,69 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" >
|
||||
<!-- <el-table-column label="主键标识" align="center" prop="id" /> -->
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
|
||||
<el-table-column label="序号" align="center" prop="num" >
|
||||
<el-table-column label="序号" align="center" prop="num">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ queryParams.pageSize * (queryParams.pageNo - 1) + scope.$index + 1 }}</span>
|
||||
<span style="margin-left: 10px">{{ queryParams.pageSize * (queryParams.pageNo - 1) + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发动机号码" align="center" prop="engineNumber" />
|
||||
<el-table-column label="车架号" align="center" prop="vin" />
|
||||
<el-table-column label="车牌号" align="center" prop="licenseNumber" />
|
||||
<el-table-column label="车辆型号" align="center" prop="carModel" />
|
||||
<!-- <el-table-column label="保养日期" align="center" prop="maintenanceDate" width="180">
|
||||
<el-table-column label="车牌号" align="center" prop="licenseNumber" width="150">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.maintenanceDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="保养里程" align="center" prop="maintenanceMileage" /> -->
|
||||
<!-- <el-table-column label="年检日期" align="center" prop="inspectionDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.inspectionDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="保险日期" align="center" prop="insuranceDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.insuranceDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="二级维护时间" align="center" prop="checkDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.checkDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="车辆品牌" align="center" prop="carBrand" />
|
||||
<el-table-column label="车辆性质" align="center" prop="carNature" />
|
||||
<el-table-column label="车辆注册日期" align="center" prop="carRegisterDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.carRegisterDate,'{y}-{m}-{d}') }}</span>
|
||||
<router-link :to="'./check/' + scope.row.id" class="link-type">
|
||||
<span>{{ scope.row.licenseNumber }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近办理业务" align="center" prop="recentlyHandledBusiness" />
|
||||
<el-table-column label="最近办理业务的时间" align="center" prop="recentlyHandleBusinessTime" width="180">
|
||||
<el-table-column label="车辆品牌" align="center" prop="brandStr" />
|
||||
<el-table-column label="车辆型号" align="center" prop="modelStr" />
|
||||
|
||||
<el-table-column label="年检日期" align="center" prop="inspectionDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.recentlyHandleBusinessTime,'{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.inspectionDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="行驶证图片" align="center" prop="carLicenseImg" /> -->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
|
||||
<el-table-column label="车辆类别" align="center" prop="carCategory">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime,'{y}-{m}-{d}') }}</span>
|
||||
<dict-tag :type="DICT_TYPE.DICT_CAR_CATEGORY" :value="scope.row.carCategory" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="车辆性质" align="center" prop="carNature">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.DICT_CAR_NATURE" :value="scope.row.carNature" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="最近办理业务" align="center" prop="recentlyHandledBusiness" width="130">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.DICT_CUS_BUSI_TYPE" :value="scope.row.recentlyHandledBusiness" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近办理业务的时间" align="center" prop="recentlyHandleBusinessTime" width="150">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.recentlyHandleBusinessTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template v-slot="scope">
|
||||
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">打标签</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">查看详情</el-button>
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">推送提醒</el-button> -->
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:car-main:delete']">删除</el-button>
|
||||
v-hasPermi="['base:car-main:update']">推送提醒</el-button>
|
||||
|
||||
<!-- <el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)"
|
||||
v-hasPermi="['base:car-main:update']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="bindCustomer" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:car-main:bindCustomer']">绑定客户</el-dropdown-item>
|
||||
<el-dropdown-item command="markSign" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:car-main:markSign']">打标签</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown> -->
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -158,16 +158,25 @@
|
||||
@pagination="getList" />
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<CarMainForm ref="formRef" @success="getList" />
|
||||
<CustomerCarForm ref="bindCustomerFormRef" @success="getList" />
|
||||
<CarLabelForm ref="labelFormRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CarBrandSelector from '@/layout/components/CarBrandSelector';
|
||||
import CustomerCarForm from '@/views/base/carmain/components/CustomerCarForm.vue';
|
||||
import CarLabelForm from '@/views/base/carmain/components/CarLabelForm.vue';
|
||||
import * as CarMainApi from '@/api/base/carmain';
|
||||
import CarMainForm from './CarMainForm.vue';
|
||||
import { getDictDatas, DICT_TYPE, getDictData } from '@/utils/dict';
|
||||
export default {
|
||||
name: "CarMain",
|
||||
components: {
|
||||
CarMainForm,
|
||||
CustomerCarForm,
|
||||
CarLabelForm,
|
||||
CarBrandSelector,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -212,11 +221,32 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**更多操作*/
|
||||
handleCommand(command, index, row) {
|
||||
switch (command) {
|
||||
|
||||
//打标签
|
||||
case 'markSign': this.bindLabel(row.id); break;
|
||||
|
||||
//绑定客户信息
|
||||
case 'bindCustomer': this.openFormBindCustomer(row.id); break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
},
|
||||
openFormBindCustomer(id) {
|
||||
this.$refs["bindCustomerFormRef"].open(id);
|
||||
},
|
||||
/**打标签*/
|
||||
bindLabel(id) {
|
||||
this.$refs["labelFormRef"].open(id);
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
debugger;
|
||||
|
||||
try {
|
||||
debugger;
|
||||
|
||||
this.loading = true;
|
||||
const res = await CarMainApi.getCarMainPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
@ -227,7 +257,7 @@ export default {
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
debugger;
|
||||
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
@ -243,12 +273,58 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除车辆信息编号为"' + id + '"的数据项?')
|
||||
try {
|
||||
await CarMainApi.deleteCarMain(id);
|
||||
await this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch { }
|
||||
|
||||
let optionValue = 0;
|
||||
await this.$confirm('是否确认删除该条车辆信息?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
optionValue = 1;
|
||||
}).catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消删除'
|
||||
// });
|
||||
});
|
||||
//如果确认删除
|
||||
if (optionValue == 1) {
|
||||
//判断是否发生过业务
|
||||
if (row.recentlyHandledBusiness != null && row.recentlyHandledBusiness != "") {
|
||||
let businessObj = getDictData(DICT_TYPE.DICT_CUS_BUSI_TYPE, row.recentlyHandledBusiness);
|
||||
this.$confirm('该车曾于 "' + this.parseTime(row.recentlyHandleBusinessTime, '{y}-{m}-{d}') + '" 发生过 "' + businessObj.label + '" 业务,是否继续删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
|
||||
CarMainApi.deleteCarMain(id).then(() => {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
CarMainApi.deleteCarMain(id).then(() => {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
|
@ -1,22 +1,24 @@
|
||||
<!-- 保险 -->
|
||||
<!-- 车辆保险信息 -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="发动机号码" prop="engineNumber">
|
||||
<el-input v-model="queryParams.engineNumber" placeholder="请输入发动机号码" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车架号" prop="vin">
|
||||
<el-input v-model="queryParams.vin" placeholder="请输入车架号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="licenseNumber">
|
||||
<el-input v-model="queryParams.licenseNumber" placeholder="请输入车牌号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆型号" prop="carModel">
|
||||
<el-input v-model="queryParams.carModel" placeholder="请输入车辆型号" clearable @keyup.enter.native="handleQuery" />
|
||||
|
||||
<el-form-item label="品牌型号" prop="engineNumber" label-width="90">
|
||||
<CarBrandSelector v-model="queryParams.brandAndModel" ref="brandForm" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="车架号" prop="vin">
|
||||
<el-input v-model="queryParams.vin" placeholder="请输入车架号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
|
||||
<!-- <el-form-item label="车辆型号" prop="carModel" label-width="90">
|
||||
<el-input v-model="queryParams.carModel" placeholder="请输入车辆型号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="保养日期" prop="maintenanceDate">
|
||||
<el-date-picker v-model="queryParams.maintenanceDate" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
@ -41,32 +43,31 @@
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车辆品牌" prop="carBrand">
|
||||
<!-- <el-form-item label="车辆品牌" prop="carBrand" label-width="90">
|
||||
<el-input v-model="queryParams.carBrand" placeholder="请输入车辆品牌" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车辆性质" prop="carNature" label-width="90">
|
||||
<el-input v-model="queryParams.carNature" placeholder="请输入车辆性质" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆性质" prop="carNature">
|
||||
<el-input v-model="queryParams.carNature" placeholder="请输入车辆性质" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆注册日期" prop="carRegisterDate">
|
||||
<!-- <el-form-item label="注册日期" prop="carRegisterDate">
|
||||
<el-date-picker v-model="queryParams.carRegisterDate" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最近办理业务" prop="recentlyHandledBusiness">
|
||||
<el-input v-model="queryParams.recentlyHandledBusiness" placeholder="请输入最近办理业务" clearable
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="最近业务" prop="recentlyHandledBusiness">
|
||||
<el-input v-model="queryParams.recentlyHandledBusiness" placeholder="请输入最近业务" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最近办理业务的时间" prop="recentlyHandleBusinessTime">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="最近业务时间" prop="recentlyHandleBusinessTime">
|
||||
<el-date-picker v-model="queryParams.recentlyHandleBusinessTime" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="登记时间" prop="createTime">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="登记时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
@ -86,70 +87,69 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" >
|
||||
<!-- <el-table-column label="主键标识" align="center" prop="id" /> -->
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
|
||||
<el-table-column label="序号" align="center" prop="num" >
|
||||
<el-table-column label="序号" align="center" prop="num">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ queryParams.pageSize * (queryParams.pageNo - 1) + scope.$index + 1 }}</span>
|
||||
<span style="margin-left: 10px">{{ queryParams.pageSize * (queryParams.pageNo - 1) + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发动机号码" align="center" prop="engineNumber" />
|
||||
<el-table-column label="车架号" align="center" prop="vin" />
|
||||
<el-table-column label="车牌号" align="center" prop="licenseNumber" />
|
||||
<el-table-column label="车辆型号" align="center" prop="carModel" />
|
||||
<!-- <el-table-column label="保养日期" align="center" prop="maintenanceDate" width="180">
|
||||
<el-table-column label="车牌号" align="center" prop="licenseNumber" width="150">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.maintenanceDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="保养里程" align="center" prop="maintenanceMileage" /> -->
|
||||
<!-- <el-table-column label="年检日期" align="center" prop="inspectionDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.inspectionDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="保险日期" align="center" prop="insuranceDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.insuranceDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="二级维护时间" align="center" prop="checkDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.checkDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="车辆品牌" align="center" prop="carBrand" />
|
||||
<el-table-column label="车辆性质" align="center" prop="carNature" />
|
||||
<el-table-column label="车辆注册日期" align="center" prop="carRegisterDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.carRegisterDate,'{y}-{m}-{d}') }}</span>
|
||||
<router-link :to="'./check/' + scope.row.id" class="link-type">
|
||||
<span>{{ scope.row.licenseNumber }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近办理业务" align="center" prop="recentlyHandledBusiness" />
|
||||
<el-table-column label="最近办理业务的时间" align="center" prop="recentlyHandleBusinessTime" width="180">
|
||||
<el-table-column label="车辆品牌" align="center" prop="brandStr" />
|
||||
<el-table-column label="车辆型号" align="center" prop="modelStr" />
|
||||
|
||||
<el-table-column label="保险日期" aln="center" prop="insuranceDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.recentlyHandleBusinessTime,'{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.insuranceDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="行驶证图片" align="center" prop="carLicenseImg" /> -->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
|
||||
<el-table-column label="车辆类别" align="center" prop="carCategory">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime,'{y}-{m}-{d}') }}</span>
|
||||
<dict-tag :type="DICT_TYPE.DICT_CAR_CATEGORY" :value="scope.row.carCategory" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="车辆性质" align="center" prop="carNature">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.DICT_CAR_NATURE" :value="scope.row.carNature" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="最近办理业务" align="center" prop="recentlyHandledBusiness" width="130">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.DICT_CUS_BUSI_TYPE" :value="scope.row.recentlyHandledBusiness" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近办理业务的时间" align="center" prop="recentlyHandleBusinessTime" width="150">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.recentlyHandleBusinessTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template v-slot="scope">
|
||||
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">打标签</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">查看详情</el-button>
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">推送提醒</el-button> -->
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:car-main:delete']">删除</el-button>
|
||||
v-hasPermi="['base:car-main:update']">推送提醒</el-button>
|
||||
|
||||
<!-- <el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)"
|
||||
v-hasPermi="['base:car-main:update']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="bindCustomer" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:car-main:bindCustomer']">绑定客户</el-dropdown-item>
|
||||
<el-dropdown-item command="markSign" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:car-main:markSign']">打标签</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown> -->
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -158,16 +158,25 @@
|
||||
@pagination="getList" />
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<CarMainForm ref="formRef" @success="getList" />
|
||||
<CustomerCarForm ref="bindCustomerFormRef" @success="getList" />
|
||||
<CarLabelForm ref="labelFormRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CarBrandSelector from '@/layout/components/CarBrandSelector';
|
||||
import CustomerCarForm from '@/views/base/carmain/components/CustomerCarForm.vue';
|
||||
import CarLabelForm from '@/views/base/carmain/components/CarLabelForm.vue';
|
||||
import * as CarMainApi from '@/api/base/carmain';
|
||||
import CarMainForm from './CarMainForm.vue';
|
||||
import { getDictDatas, DICT_TYPE, getDictData } from '@/utils/dict';
|
||||
export default {
|
||||
name: "CarMain",
|
||||
components: {
|
||||
CarMainForm,
|
||||
CustomerCarForm,
|
||||
CarLabelForm,
|
||||
CarBrandSelector,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -212,11 +221,32 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**更多操作*/
|
||||
handleCommand(command, index, row) {
|
||||
switch (command) {
|
||||
|
||||
//打标签
|
||||
case 'markSign': this.bindLabel(row.id); break;
|
||||
|
||||
//绑定客户信息
|
||||
case 'bindCustomer': this.openFormBindCustomer(row.id); break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
},
|
||||
openFormBindCustomer(id) {
|
||||
this.$refs["bindCustomerFormRef"].open(id);
|
||||
},
|
||||
/**打标签*/
|
||||
bindLabel(id) {
|
||||
this.$refs["labelFormRef"].open(id);
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
debugger;
|
||||
|
||||
try {
|
||||
debugger;
|
||||
|
||||
this.loading = true;
|
||||
const res = await CarMainApi.getCarMainPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
@ -227,7 +257,7 @@ export default {
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
debugger;
|
||||
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
@ -243,12 +273,58 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除车辆信息编号为"' + id + '"的数据项?')
|
||||
try {
|
||||
await CarMainApi.deleteCarMain(id);
|
||||
await this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch { }
|
||||
|
||||
let optionValue = 0;
|
||||
await this.$confirm('是否确认删除该条车辆信息?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
optionValue = 1;
|
||||
}).catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消删除'
|
||||
// });
|
||||
});
|
||||
//如果确认删除
|
||||
if (optionValue == 1) {
|
||||
//判断是否发生过业务
|
||||
if (row.recentlyHandledBusiness != null && row.recentlyHandledBusiness != "") {
|
||||
let businessObj = getDictData(DICT_TYPE.DICT_CUS_BUSI_TYPE, row.recentlyHandledBusiness);
|
||||
this.$confirm('该车曾于 "' + this.parseTime(row.recentlyHandleBusinessTime, '{y}-{m}-{d}') + '" 发生过 "' + businessObj.label + '" 业务,是否继续删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
|
||||
CarMainApi.deleteCarMain(id).then(() => {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
CarMainApi.deleteCarMain(id).then(() => {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
|
@ -1,22 +1,23 @@
|
||||
<!-- 保养 -->
|
||||
<!-- 车辆保养信息 -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="发动机号码" prop="engineNumber">
|
||||
<el-input v-model="queryParams.engineNumber" placeholder="请输入发动机号码" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车架号" prop="vin">
|
||||
<el-input v-model="queryParams.vin" placeholder="请输入车架号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号" prop="licenseNumber">
|
||||
<el-input v-model="queryParams.licenseNumber" placeholder="请输入车牌号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆型号" prop="carModel">
|
||||
<el-input v-model="queryParams.carModel" placeholder="请输入车辆型号" clearable @keyup.enter.native="handleQuery" />
|
||||
<el-form-item label="品牌型号" prop="engineNumber" label-width="90">
|
||||
<CarBrandSelector v-model="queryParams.brandAndModel" ref="brandForm" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="车架号" prop="vin">
|
||||
<el-input v-model="queryParams.vin" placeholder="请输入车架号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
|
||||
<!-- <el-form-item label="车辆型号" prop="carModel" label-width="90">
|
||||
<el-input v-model="queryParams.carModel" placeholder="请输入车辆型号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="保养日期" prop="maintenanceDate">
|
||||
<el-date-picker v-model="queryParams.maintenanceDate" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
@ -41,32 +42,31 @@
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车辆品牌" prop="carBrand">
|
||||
<!-- <el-form-item label="车辆品牌" prop="carBrand" label-width="90">
|
||||
<el-input v-model="queryParams.carBrand" placeholder="请输入车辆品牌" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="车辆性质" prop="carNature" label-width="90">
|
||||
<el-input v-model="queryParams.carNature" placeholder="请输入车辆性质" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆性质" prop="carNature">
|
||||
<el-input v-model="queryParams.carNature" placeholder="请输入车辆性质" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆注册日期" prop="carRegisterDate">
|
||||
<!-- <el-form-item label="注册日期" prop="carRegisterDate">
|
||||
<el-date-picker v-model="queryParams.carRegisterDate" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最近办理业务" prop="recentlyHandledBusiness">
|
||||
<el-input v-model="queryParams.recentlyHandledBusiness" placeholder="请输入最近办理业务" clearable
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="最近业务" prop="recentlyHandledBusiness">
|
||||
<el-input v-model="queryParams.recentlyHandledBusiness" placeholder="请输入最近业务" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="最近办理业务的时间" prop="recentlyHandleBusinessTime">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="最近业务时间" prop="recentlyHandleBusinessTime">
|
||||
<el-date-picker v-model="queryParams.recentlyHandleBusinessTime" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="登记时间" prop="createTime">
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="登记时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
@ -86,70 +86,71 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" >
|
||||
<!-- <el-table-column label="主键标识" align="center" prop="id" /> -->
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
|
||||
<el-table-column label="序号" align="center" prop="num" >
|
||||
<el-table-column label="序号" align="center" prop="num">
|
||||
<template slot-scope="scope">
|
||||
<span style="margin-left: 10px">{{ queryParams.pageSize * (queryParams.pageNo - 1) + scope.$index + 1 }}</span>
|
||||
<span style="margin-left: 10px">{{ queryParams.pageSize * (queryParams.pageNo - 1) + scope.$index + 1
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发动机号码" align="center" prop="engineNumber" />
|
||||
<el-table-column label="车架号" align="center" prop="vin" />
|
||||
<el-table-column label="车牌号" align="center" prop="licenseNumber" />
|
||||
<el-table-column label="车辆型号" align="center" prop="carModel" />
|
||||
<!-- <el-table-column label="保养日期" align="center" prop="maintenanceDate" width="180">
|
||||
<el-table-column label="车牌号" align="center" prop="licenseNumber" width="150">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.maintenanceDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="保养里程" align="center" prop="maintenanceMileage" /> -->
|
||||
<!-- <el-table-column label="年检日期" align="center" prop="inspectionDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.inspectionDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="保险日期" align="center" prop="insuranceDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.insuranceDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="二级维护时间" align="center" prop="checkDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.checkDate,'{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="车辆品牌" align="center" prop="carBrand" />
|
||||
<el-table-column label="车辆性质" align="center" prop="carNature" />
|
||||
<el-table-column label="车辆注册日期" align="center" prop="carRegisterDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.carRegisterDate,'{y}-{m}-{d}') }}</span>
|
||||
<router-link :to="'./check/' + scope.row.id" class="link-type">
|
||||
<span>{{ scope.row.licenseNumber }}</span>
|
||||
</router-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近办理业务" align="center" prop="recentlyHandledBusiness" />
|
||||
<el-table-column label="最近办理业务的时间" align="center" prop="recentlyHandleBusinessTime" width="180">
|
||||
<el-table-column label="车辆品牌" align="center" prop="brandStr" />
|
||||
<el-table-column label="车辆型号" align="center" prop="modelStr" />
|
||||
|
||||
<el-table-column label="保养日期" align="center" prop="maintenanceDate" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.recentlyHandleBusinessTime,'{y}-{m}-{d}') }}</span>
|
||||
<span>{{ parseTime(scope.row.maintenanceDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="行驶证图片" align="center" prop="carLicenseImg" /> -->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<el-table-column label="保养里程" align="center" prop="maintenanceMileage" />
|
||||
|
||||
|
||||
<el-table-column label="车辆类别" align="center" prop="carCategory">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime,'{y}-{m}-{d}') }}</span>
|
||||
<dict-tag :type="DICT_TYPE.DICT_CAR_CATEGORY" :value="scope.row.carCategory" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="车辆性质" align="center" prop="carNature">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.DICT_CAR_NATURE" :value="scope.row.carNature" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="最近办理业务" align="center" prop="recentlyHandledBusiness" width="130">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.DICT_CUS_BUSI_TYPE" :value="scope.row.recentlyHandledBusiness" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最近办理业务的时间" align="center" prop="recentlyHandleBusinessTime" width="150">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.recentlyHandleBusinessTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template v-slot="scope">
|
||||
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">打标签</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">查看详情</el-button>
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['base:car-main:update']">推送提醒</el-button> -->
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['base:car-main:delete']">删除</el-button>
|
||||
v-hasPermi="['base:car-main:update']">推送提醒</el-button>
|
||||
|
||||
<!-- <el-dropdown @command="(command) => handleCommand(command, scope.$index, scope.row)"
|
||||
v-hasPermi="['base:car-main:update']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="bindCustomer" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:car-main:bindCustomer']">绑定客户</el-dropdown-item>
|
||||
<el-dropdown-item command="markSign" size="mini" type="text" icon="el-icon-truck"
|
||||
v-hasPermi="['base:car-main:markSign']">打标签</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown> -->
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -158,16 +159,25 @@
|
||||
@pagination="getList" />
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<CarMainForm ref="formRef" @success="getList" />
|
||||
<CustomerCarForm ref="bindCustomerFormRef" @success="getList" />
|
||||
<CarLabelForm ref="labelFormRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CarBrandSelector from '@/layout/components/CarBrandSelector';
|
||||
import CustomerCarForm from '@/views/base/carmain/components/CustomerCarForm.vue';
|
||||
import CarLabelForm from '@/views/base/carmain/components/CarLabelForm.vue';
|
||||
import * as CarMainApi from '@/api/base/carmain';
|
||||
import CarMainForm from './CarMainForm.vue';
|
||||
import { getDictDatas, DICT_TYPE, getDictData } from '@/utils/dict';
|
||||
export default {
|
||||
name: "CarMain",
|
||||
components: {
|
||||
CarMainForm,
|
||||
CustomerCarForm,
|
||||
CarLabelForm,
|
||||
CarBrandSelector,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -212,11 +222,32 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**更多操作*/
|
||||
handleCommand(command, index, row) {
|
||||
switch (command) {
|
||||
|
||||
//打标签
|
||||
case 'markSign': this.bindLabel(row.id); break;
|
||||
|
||||
//绑定客户信息
|
||||
case 'bindCustomer': this.openFormBindCustomer(row.id); break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
},
|
||||
openFormBindCustomer(id) {
|
||||
this.$refs["bindCustomerFormRef"].open(id);
|
||||
},
|
||||
/**打标签*/
|
||||
bindLabel(id) {
|
||||
this.$refs["labelFormRef"].open(id);
|
||||
},
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
debugger;
|
||||
|
||||
try {
|
||||
debugger;
|
||||
|
||||
this.loading = true;
|
||||
const res = await CarMainApi.getCarMainPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
@ -227,7 +258,7 @@ export default {
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
debugger;
|
||||
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
@ -243,12 +274,58 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除车辆信息编号为"' + id + '"的数据项?')
|
||||
try {
|
||||
await CarMainApi.deleteCarMain(id);
|
||||
await this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch { }
|
||||
|
||||
let optionValue = 0;
|
||||
await this.$confirm('是否确认删除该条车辆信息?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
optionValue = 1;
|
||||
}).catch(() => {
|
||||
// this.$message({
|
||||
// type: 'info',
|
||||
// message: '已取消删除'
|
||||
// });
|
||||
});
|
||||
//如果确认删除
|
||||
if (optionValue == 1) {
|
||||
//判断是否发生过业务
|
||||
if (row.recentlyHandledBusiness != null && row.recentlyHandledBusiness != "") {
|
||||
let businessObj = getDictData(DICT_TYPE.DICT_CUS_BUSI_TYPE, row.recentlyHandledBusiness);
|
||||
this.$confirm('该车曾于 "' + this.parseTime(row.recentlyHandleBusinessTime, '{y}-{m}-{d}') + '" 发生过 "' + businessObj.label + '" 业务,是否继续删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
|
||||
|
||||
CarMainApi.deleteCarMain(id).then(() => {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
CarMainApi.deleteCarMain(id).then(() => {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
|
244
src/views/base/property/PropertyForm.vue
Normal file
244
src/views/base/property/PropertyForm.vue
Normal file
@ -0,0 +1,244 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="100px">
|
||||
<el-form-item label="企业id" prop="corpId">
|
||||
<el-input v-model="formData.corpId" placeholder="请输入企业id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门id" prop="deptId">
|
||||
<el-input v-model="formData.deptId" placeholder="请输入部门id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="存放位置" prop="posId">
|
||||
<el-input v-model="formData.posId" placeholder="请输入存放位置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="使用人id" prop="userId">
|
||||
<el-input v-model="formData.userId" placeholder="请输入使用人id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产编号" prop="propNo">
|
||||
<el-input v-model="formData.propNo" placeholder="请输入资产编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产名称" prop="propName">
|
||||
<el-input v-model="formData.propName" placeholder="请输入资产名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产分类" prop="propCatg">
|
||||
<el-input v-model="formData.propCatg" placeholder="请输入资产分类" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预计使用年限" prop="useYear">
|
||||
<el-input v-model="formData.useYear" placeholder="请输入预计使用年限" />
|
||||
</el-form-item>
|
||||
<el-form-item label="价值类型" prop="costType">
|
||||
<el-select v-model="formData.costType" placeholder="请选择价值类型">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMPANY_COST_TYPE)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="资产数量" prop="propNum">
|
||||
<el-input v-model="formData.propNum" placeholder="请输入资产数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产原值(元)" prop="costTotal">
|
||||
<el-input v-model="formData.costTotal" placeholder="请输入资产原值(元)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产状态" prop="propStatus">
|
||||
<el-select v-model="formData.propStatus" placeholder="请选择资产状态">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMPANY_PROP_STATUS)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌" prop="brand">
|
||||
<el-input v-model="formData.brand" placeholder="请输入品牌" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="spec">
|
||||
<el-input v-model="formData.spec" placeholder="请输入规格型号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产厂家" prop="factory">
|
||||
<el-input v-model="formData.factory" placeholder="请输入生产厂家" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出场序列号/编号" prop="serialNo">
|
||||
<el-input v-model="formData.serialNo" placeholder="请输入出场序列号/编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量计量单位" prop="unit">
|
||||
<el-input v-model="formData.unit" placeholder="请输入数量计量单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="取得日期" prop="getDate">
|
||||
<el-date-picker clearable v-model="formData.getDate" type="date" value-format="timestamp"
|
||||
placeholder="选择取得日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂日期" prop="prodDate">
|
||||
<el-date-picker clearable v-model="formData.prodDate" type="date" value-format="timestamp"
|
||||
placeholder="选择出厂日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplier">
|
||||
<el-input v-model="formData.supplier" placeholder="请输入供应商" />
|
||||
</el-form-item>
|
||||
<el-form-item label="启用日期" prop="openDate">
|
||||
<el-date-picker clearable v-model="formData.openDate" type="date" value-format="timestamp"
|
||||
placeholder="选择启用日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="净值(元)" prop="netValue">
|
||||
<el-input v-model="formData.netValue" placeholder="请输入净值(元)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="凭证号" prop="voucherNo">
|
||||
<el-input v-model="formData.voucherNo" placeholder="请输入凭证号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="维修/保养周期单位" prop="keepCycleType">
|
||||
<el-select v-model="formData.keepCycleType" placeholder="请选择维修/保养周期单位">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="维修/保养周期" prop="keepCycle">
|
||||
<el-input v-model="formData.keepCycle" placeholder="请输入维修/保养周期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上次维修/保养日期" prop="lastKeepDate">
|
||||
<el-date-picker clearable v-model="formData.lastKeepDate" type="date" value-format="timestamp"
|
||||
placeholder="选择上次维修/保养日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下次维修/保养日期" prop="nextKeepDate">
|
||||
<el-date-picker clearable v-model="formData.nextKeepDate" type="date" value-format="timestamp"
|
||||
placeholder="选择下次维修/保养日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件urls">
|
||||
<FileUpload v-model="formData.fileUrls" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as PropertyApi from '@/api/base/property/property';
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
export default {
|
||||
name: "PropertyForm",
|
||||
components: {
|
||||
FileUpload,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 弹出层标题
|
||||
dialogTitle: "",
|
||||
// 是否显示弹出层
|
||||
dialogVisible: false,
|
||||
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
formLoading: false,
|
||||
// 表单参数
|
||||
formData: {
|
||||
id: undefined,
|
||||
corpId: undefined,
|
||||
deptId: undefined,
|
||||
posId: undefined,
|
||||
userId: undefined,
|
||||
propNo: undefined,
|
||||
propName: undefined,
|
||||
propCatg: undefined,
|
||||
useYear: undefined,
|
||||
costType: undefined,
|
||||
propNum: undefined,
|
||||
costTotal: undefined,
|
||||
propStatus: undefined,
|
||||
brand: undefined,
|
||||
spec: undefined,
|
||||
factory: undefined,
|
||||
serialNo: undefined,
|
||||
unit: undefined,
|
||||
getDate: undefined,
|
||||
prodDate: undefined,
|
||||
supplier: undefined,
|
||||
openDate: undefined,
|
||||
netValue: undefined,
|
||||
voucherNo: undefined,
|
||||
keepCycleType: undefined,
|
||||
keepCycle: undefined,
|
||||
lastKeepDate: undefined,
|
||||
nextKeepDate: undefined,
|
||||
fileUrls: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
formRules: {
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/** 打开弹窗 */
|
||||
async open(id) {
|
||||
this.dialogVisible = true;
|
||||
this.reset();
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const res = await PropertyApi.getProperty(id);
|
||||
this.formData = res.data;
|
||||
this.title = "修改企业管理-资产";
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
}
|
||||
this.title = "新增企业管理-资产";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
async submitForm() {
|
||||
// 校验主表
|
||||
await this.$refs["formRef"].validate();
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const data = this.formData;
|
||||
// 修改的提交
|
||||
if (data.id) {
|
||||
await PropertyApi.updateProperty(data);
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
await PropertyApi.createProperty(data);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.formData = {
|
||||
id: undefined,
|
||||
corpId: undefined,
|
||||
deptId: undefined,
|
||||
posId: undefined,
|
||||
userId: undefined,
|
||||
propNo: undefined,
|
||||
propName: undefined,
|
||||
propCatg: undefined,
|
||||
useYear: undefined,
|
||||
costType: undefined,
|
||||
propNum: undefined,
|
||||
costTotal: undefined,
|
||||
propStatus: undefined,
|
||||
brand: undefined,
|
||||
spec: undefined,
|
||||
factory: undefined,
|
||||
serialNo: undefined,
|
||||
unit: undefined,
|
||||
getDate: undefined,
|
||||
prodDate: undefined,
|
||||
supplier: undefined,
|
||||
openDate: undefined,
|
||||
netValue: undefined,
|
||||
voucherNo: undefined,
|
||||
keepCycleType: undefined,
|
||||
keepCycle: undefined,
|
||||
lastKeepDate: undefined,
|
||||
nextKeepDate: undefined,
|
||||
fileUrls: undefined,
|
||||
};
|
||||
this.resetForm("formRef");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
305
src/views/base/property/index.vue
Normal file
305
src/views/base/property/index.vue
Normal file
@ -0,0 +1,305 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="企业id" prop="corpId">
|
||||
<el-input v-model="queryParams.corpId" placeholder="请输入企业id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门id" prop="deptId">
|
||||
<el-input v-model="queryParams.deptId" placeholder="请输入部门id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="存放位置" prop="posId">
|
||||
<el-input v-model="queryParams.posId" placeholder="请输入存放位置" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="使用人id" prop="userId">
|
||||
<el-input v-model="queryParams.userId" placeholder="请输入使用人id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产编号" prop="propNo">
|
||||
<el-input v-model="queryParams.propNo" placeholder="请输入资产编号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产名称" prop="propName">
|
||||
<el-input v-model="queryParams.propName" placeholder="请输入资产名称" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产分类" prop="propCatg">
|
||||
<el-input v-model="queryParams.propCatg" placeholder="请输入资产分类" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预计使用年限" prop="useYear">
|
||||
<el-input v-model="queryParams.useYear" placeholder="请输入预计使用年限" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="价值类型" prop="costType">
|
||||
<el-select v-model="queryParams.costType" placeholder="请选择价值类型" clearable size="small">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMPANY_COST_TYPE)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="资产数量" prop="propNum">
|
||||
<el-input v-model="queryParams.propNum" placeholder="请输入资产数量" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产原值(元)" prop="costTotal">
|
||||
<el-input v-model="queryParams.costTotal" placeholder="请输入资产原值(元)" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产状态" prop="propStatus">
|
||||
<el-select v-model="queryParams.propStatus" placeholder="请选择资产状态" clearable size="small">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMPANY_PROP_STATUS)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌" prop="brand">
|
||||
<el-input v-model="queryParams.brand" placeholder="请输入品牌" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="spec">
|
||||
<el-input v-model="queryParams.spec" placeholder="请输入规格型号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产厂家" prop="factory">
|
||||
<el-input v-model="queryParams.factory" placeholder="请输入生产厂家" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出场序列号/编号" prop="serialNo">
|
||||
<el-input v-model="queryParams.serialNo" placeholder="请输入出场序列号/编号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量计量单位" prop="unit">
|
||||
<el-input v-model="queryParams.unit" placeholder="请输入数量计量单位" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="取得日期" prop="getDate">
|
||||
<el-date-picker v-model="queryParams.getDate" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂日期" prop="prodDate">
|
||||
<el-date-picker v-model="queryParams.prodDate" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplier">
|
||||
<el-input v-model="queryParams.supplier" placeholder="请输入供应商" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="启用日期" prop="openDate">
|
||||
<el-date-picker v-model="queryParams.openDate" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="净值(元)" prop="netValue">
|
||||
<el-input v-model="queryParams.netValue" placeholder="请输入净值(元)" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="凭证号" prop="voucherNo">
|
||||
<el-input v-model="queryParams.voucherNo" placeholder="请输入凭证号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="维修/保养周期单位" prop="keepCycleType">
|
||||
<el-select v-model="queryParams.keepCycleType" placeholder="请选择维修/保养周期单位" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="维修/保养周期" prop="keepCycle">
|
||||
<el-input v-model="queryParams.keepCycle" placeholder="请输入维修/保养周期" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上次维修/保养日期" prop="lastKeepDate">
|
||||
<el-date-picker v-model="queryParams.lastKeepDate" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下次维修/保养日期" prop="nextKeepDate">
|
||||
<el-date-picker v-model="queryParams.nextKeepDate" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
|
||||
v-hasPermi="['company:property:create']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
:loading="exportLoading" v-hasPermi="['company:property:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="主键标识" align="center" prop="id" />
|
||||
<el-table-column label="企业id" align="center" prop="corpId" />
|
||||
<el-table-column label="部门id" align="center" prop="deptId" />
|
||||
<el-table-column label="存放位置" align="center" prop="posId" />
|
||||
<el-table-column label="使用人id" align="center" prop="userId" />
|
||||
<el-table-column label="资产编号" align="center" prop="propNo" />
|
||||
<el-table-column label="资产名称" align="center" prop="propName" />
|
||||
<el-table-column label="资产分类" align="center" prop="propCatg" />
|
||||
<el-table-column label="预计使用年限" align="center" prop="useYear" />
|
||||
<el-table-column label="价值类型" align="center" prop="costType">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.COMPANY_COST_TYPE" :value="scope.row.costType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产数量" align="center" prop="propNum" />
|
||||
<el-table-column label="资产原值(元)" align="center" prop="costTotal" />
|
||||
<el-table-column label="资产状态" align="center" prop="propStatus">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.COMPANY_PROP_STATUS" :value="scope.row.propStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="品牌" align="center" prop="brand" />
|
||||
<el-table-column label="规格型号" align="center" prop="spec" />
|
||||
<el-table-column label="生产厂家" align="center" prop="factory" />
|
||||
<el-table-column label="出场序列号/编号" align="center" prop="serialNo" />
|
||||
<el-table-column label="数量计量单位" align="center" prop="unit" />
|
||||
<el-table-column label="取得日期" align="center" prop="getDate" />
|
||||
<el-table-column label="出厂日期" align="center" prop="prodDate" />
|
||||
<el-table-column label="供应商" align="center" prop="supplier" />
|
||||
<el-table-column label="启用日期" align="center" prop="openDate" />
|
||||
<el-table-column label="净值(元)" align="center" prop="netValue" />
|
||||
<el-table-column label="凭证号" align="center" prop="voucherNo" />
|
||||
<el-table-column label="维修/保养周期单位" align="center" prop="keepCycleType" />
|
||||
<el-table-column label="维修/保养周期" align="center" prop="keepCycle" />
|
||||
<el-table-column label="上次维修/保养日期" align="center" prop="lastKeepDate" />
|
||||
<el-table-column label="下次维修/保养日期" align="center" prop="nextKeepDate" />
|
||||
<el-table-column label="附件urls" align="center" prop="fileUrls" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['company:property:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['company:property:delete']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<PropertyForm ref="formRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as PropertyApi from '@/api/base/property/property';
|
||||
import PropertyForm from './PropertyForm.vue';
|
||||
export default {
|
||||
name: "Property",
|
||||
components: {
|
||||
PropertyForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 企业管理-资产列表
|
||||
list: [],
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
// 选中行
|
||||
currentRow: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
corpId: null,
|
||||
deptId: null,
|
||||
posId: null,
|
||||
userId: null,
|
||||
propNo: null,
|
||||
propName: null,
|
||||
propCatg: null,
|
||||
useYear: null,
|
||||
costType: null,
|
||||
propNum: null,
|
||||
costTotal: null,
|
||||
propStatus: null,
|
||||
brand: null,
|
||||
spec: null,
|
||||
factory: null,
|
||||
serialNo: null,
|
||||
unit: null,
|
||||
getDate: [],
|
||||
prodDate: [],
|
||||
supplier: null,
|
||||
openDate: [],
|
||||
netValue: null,
|
||||
voucherNo: null,
|
||||
keepCycleType: null,
|
||||
keepCycle: null,
|
||||
lastKeepDate: [],
|
||||
nextKeepDate: [],
|
||||
createTime: [],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true;
|
||||
const res = await PropertyApi.getPropertyPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total;
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 添加/修改操作 */
|
||||
openForm(id) {
|
||||
this.$refs["formRef"].open(id);
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除企业管理-资产编号为"' + id + '"的数据项?')
|
||||
try {
|
||||
await PropertyApi.deleteProperty(id);
|
||||
await this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch { }
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
await this.$modal.confirm('是否确认导出所有企业管理-资产数据项?');
|
||||
try {
|
||||
this.exportLoading = true;
|
||||
const data = await PropertyApi.exportPropertyExcel(this.queryParams);
|
||||
this.$download.excel(data, '企业管理-资产.xls');
|
||||
} catch {
|
||||
} finally {
|
||||
this.exportLoading = false;
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
123
src/views/base/property/position/PropertyPosForm.vue
Normal file
123
src/views/base/property/position/PropertyPosForm.vue
Normal file
@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="100px">
|
||||
<el-form-item label="企业id(base_company表中的id)" prop="corpId">
|
||||
<el-input v-model="formData.corpId" placeholder="请输入企业id(base_company表中的id)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门id(system_dept表中的id,用来做数据权限控制)" prop="deptId">
|
||||
<el-input v-model="formData.deptId" placeholder="请输入部门id(system_dept表中的id,用来做数据权限控制)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="存放地名称" prop="posName">
|
||||
<el-input v-model="formData.posName" placeholder="请输入存放地名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="存放地地址" prop="address">
|
||||
<el-input v-model="formData.address" placeholder="请输入存放地地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="面积" prop="area">
|
||||
<el-input v-model="formData.area" placeholder="请输入面积" />
|
||||
</el-form-item>
|
||||
<el-form-item label="存放类型" prop="depositType">
|
||||
<el-select v-model="formData.depositType" placeholder="请选择存放类型">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMPANY_DEPOSIT_TYPE)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import * as PropertyPosApi from '@/api/base/property/position';
|
||||
export default {
|
||||
name: "PropertyPosForm",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 弹出层标题
|
||||
dialogTitle: "",
|
||||
// 是否显示弹出层
|
||||
dialogVisible: false,
|
||||
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
formLoading: false,
|
||||
// 表单参数
|
||||
formData: {
|
||||
id: undefined,
|
||||
corpId: undefined,
|
||||
deptId: undefined,
|
||||
posName: undefined,
|
||||
address: undefined,
|
||||
area: undefined,
|
||||
depositType: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
formRules: {
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/** 打开弹窗 */
|
||||
async open(id) {
|
||||
this.dialogVisible = true;
|
||||
this.reset();
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const res = await PropertyPosApi.getPropertyPos(id);
|
||||
this.formData = res.data;
|
||||
this.title = "修改企业管理-资产存放位置";
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
}
|
||||
this.title = "新增企业管理-资产存放位置";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
async submitForm() {
|
||||
// 校验主表
|
||||
await this.$refs["formRef"].validate();
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const data = this.formData;
|
||||
// 修改的提交
|
||||
if (data.id) {
|
||||
await PropertyPosApi.updatePropertyPos(data);
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
await PropertyPosApi.createPropertyPos(data);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.formData = {
|
||||
id: undefined,
|
||||
corpId: undefined,
|
||||
deptId: undefined,
|
||||
posName: undefined,
|
||||
address: undefined,
|
||||
area: undefined,
|
||||
depositType: undefined,
|
||||
};
|
||||
this.resetForm("formRef");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
179
src/views/base/property/position/index.vue
Normal file
179
src/views/base/property/position/index.vue
Normal file
@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="企业id(base_company表中的id)" prop="corpId">
|
||||
<el-input v-model="queryParams.corpId" placeholder="请输入企业id(base_company表中的id)" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门id(system_dept表中的id,用来做数据权限控制)" prop="deptId">
|
||||
<el-input v-model="queryParams.deptId" placeholder="请输入部门id(system_dept表中的id,用来做数据权限控制)" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="存放地名称" prop="posName">
|
||||
<el-input v-model="queryParams.posName" placeholder="请输入存放地名称" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="存放地地址" prop="address">
|
||||
<el-input v-model="queryParams.address" placeholder="请输入存放地地址" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="面积" prop="area">
|
||||
<el-input v-model="queryParams.area" placeholder="请输入面积" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="存放类型" prop="depositType">
|
||||
<el-select v-model="queryParams.depositType" placeholder="请选择存放类型" clearable size="small">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMPANY_DEPOSIT_TYPE)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
|
||||
v-hasPermi="['company:property-pos:create']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
:loading="exportLoading" v-hasPermi="['company:property-pos:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="主键标识" align="center" prop="id" />
|
||||
<el-table-column label="企业id(base_company表中的id)" align="center" prop="corpId" />
|
||||
<el-table-column label="部门id(system_dept表中的id,用来做数据权限控制)" align="center" prop="deptId" />
|
||||
<el-table-column label="存放地名称" align="center" prop="posName" />
|
||||
<el-table-column label="存放地地址" align="center" prop="address" />
|
||||
<el-table-column label="面积" align="center" prop="area" />
|
||||
<el-table-column label="存放类型" align="center" prop="depositType">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.COMPANY_DEPOSIT_TYPE" :value="scope.row.depositType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['company:property-pos:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['company:property-pos:delete']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<PropertyPosForm ref="formRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as PropertyPosApi from '@/api/base/property/position';
|
||||
import PropertyPosForm from './PropertyPosForm.vue';
|
||||
export default {
|
||||
name: "PropertyPos",
|
||||
components: {
|
||||
PropertyPosForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 企业管理-资产存放位置列表
|
||||
list: [],
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
// 选中行
|
||||
currentRow: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
corpId: null,
|
||||
deptId: null,
|
||||
posName: null,
|
||||
address: null,
|
||||
area: null,
|
||||
depositType: null,
|
||||
createTime: [],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true;
|
||||
const res = await PropertyPosApi.getPropertyPosPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total;
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 添加/修改操作 */
|
||||
openForm(id) {
|
||||
this.$refs["formRef"].open(id);
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除企业管理-资产存放位置编号为"' + id + '"的数据项?')
|
||||
try {
|
||||
await PropertyPosApi.deletePropertyPos(id);
|
||||
await this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch { }
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
await this.$modal.confirm('是否确认导出所有企业管理-资产存放位置数据项?');
|
||||
try {
|
||||
this.exportLoading = true;
|
||||
const data = await PropertyPosApi.exportPropertyPosExcel(this.queryParams);
|
||||
this.$download.excel(data, '企业管理-资产存放位置.xls');
|
||||
} catch {
|
||||
} finally {
|
||||
this.exportLoading = false;
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
119
src/views/base/property/propertydeal/PropertyDealForm.vue
Normal file
119
src/views/base/property/propertydeal/PropertyDealForm.vue
Normal file
@ -0,0 +1,119 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="100px">
|
||||
<el-form-item label="企业id(base_company表中的id)" prop="corpId">
|
||||
<el-input v-model="formData.corpId" placeholder="请输入企业id(base_company表中的id)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门id(system_dept表中的id,用来做数据权限控制)" prop="deptId">
|
||||
<el-input v-model="formData.deptId" placeholder="请输入部门id(system_dept表中的id,用来做数据权限控制)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据类型" prop="dataType">
|
||||
<el-select v-model="formData.dataType" placeholder="请选择数据类型">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.PROPERTY_DATA_TYPE)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="处置/变动单号" prop="dealNo">
|
||||
<el-input v-model="formData.dealNo" placeholder="请输入处置/变动单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="处置/变动日期" prop="dealDate">
|
||||
<el-date-picker clearable v-model="formData.dealDate" type="date" value-format="timestamp"
|
||||
placeholder="选择处置/变动日期" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as PropertyDealApi from '@/api/base/property/propertydeal';
|
||||
|
||||
export default {
|
||||
name: "PropertyDealForm",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 弹出层标题
|
||||
dialogTitle: "",
|
||||
// 是否显示弹出层
|
||||
dialogVisible: false,
|
||||
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
formLoading: false,
|
||||
// 表单参数
|
||||
formData: {
|
||||
id: undefined,
|
||||
corpId: undefined,
|
||||
deptId: undefined,
|
||||
dataType: undefined,
|
||||
dealNo: undefined,
|
||||
dealDate: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
formRules: {
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/** 打开弹窗 */
|
||||
async open(id) {
|
||||
this.dialogVisible = true;
|
||||
this.reset();
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const res = await PropertyDealApi.getPropertyDeal(id);
|
||||
this.formData = res.data;
|
||||
this.title = "修改企业管理-资产处置单/变动单";
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
}
|
||||
this.title = "新增企业管理-资产处置单/变动单";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
async submitForm() {
|
||||
// 校验主表
|
||||
await this.$refs["formRef"].validate();
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const data = this.formData;
|
||||
// 修改的提交
|
||||
if (data.id) {
|
||||
await PropertyDealApi.updatePropertyDeal(data);
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
await PropertyDealApi.createPropertyDeal(data);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.formData = {
|
||||
id: undefined,
|
||||
corpId: undefined,
|
||||
deptId: undefined,
|
||||
dataType: undefined,
|
||||
dealNo: undefined,
|
||||
dealDate: undefined,
|
||||
};
|
||||
this.resetForm("formRef");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
177
src/views/base/property/propertydeal/index.vue
Normal file
177
src/views/base/property/propertydeal/index.vue
Normal file
@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="企业id(base_company表中的id)" prop="corpId">
|
||||
<el-input v-model="queryParams.corpId" placeholder="请输入企业id(base_company表中的id)" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门id(system_dept表中的id,用来做数据权限控制)" prop="deptId">
|
||||
<el-input v-model="queryParams.deptId" placeholder="请输入部门id(system_dept表中的id,用来做数据权限控制)" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数据类型" prop="dataType">
|
||||
<el-select v-model="queryParams.dataType" placeholder="请选择数据类型" clearable size="small">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.PROPERTY_DATA_TYPE)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="处置/变动单号" prop="dealNo">
|
||||
<el-input v-model="queryParams.dealNo" placeholder="请输入处置/变动单号" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="处置/变动日期" prop="dealDate">
|
||||
<el-date-picker v-model="queryParams.dealDate" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
|
||||
v-hasPermi="['company:property-deal:create']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
:loading="exportLoading" v-hasPermi="['company:property-deal:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="主键标识" align="center" prop="id" />
|
||||
<el-table-column label="企业id(base_company表中的id)" align="center" prop="corpId" />
|
||||
<el-table-column label="部门id(system_dept表中的id,用来做数据权限控制)" align="center" prop="deptId" />
|
||||
<el-table-column label="数据类型" align="center" prop="dataType">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.PROPERTY_DATA_TYPE" :value="scope.row.dataType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处置/变动单号" align="center" prop="dealNo" />
|
||||
<el-table-column label="处置/变动日期" align="center" prop="dealDate" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['company:property-deal:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['company:property-deal:delete']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<PropertyDealForm ref="formRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import * as PropertyDealApi from '@/api/base/property/propertydeal';
|
||||
import PropertyDealForm from './PropertyDealForm.vue';
|
||||
export default {
|
||||
name: "PropertyDeal",
|
||||
components: {
|
||||
PropertyDealForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 企业管理-资产处置单/变动单列表
|
||||
list: [],
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
// 选中行
|
||||
currentRow: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
corpId: null,
|
||||
deptId: null,
|
||||
dataType: null,
|
||||
dealNo: null,
|
||||
dealDate: [],
|
||||
createTime: [],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true;
|
||||
const res = await PropertyDealApi.getPropertyDealPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total;
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 添加/修改操作 */
|
||||
openForm(id) {
|
||||
this.$refs["formRef"].open(id);
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除企业管理-资产处置单/变动单编号为"' + id + '"的数据项?')
|
||||
try {
|
||||
await PropertyDealApi.deletePropertyDeal(id);
|
||||
await this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch { }
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
await this.$modal.confirm('是否确认导出所有企业管理-资产处置单/变动单数据项?');
|
||||
try {
|
||||
this.exportLoading = true;
|
||||
const data = await PropertyDealApi.exportPropertyDealExcel(this.queryParams);
|
||||
this.$download.excel(data, '企业管理-资产处置单/变动单.xls');
|
||||
} catch {
|
||||
} finally {
|
||||
this.exportLoading = false;
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="100px">
|
||||
<el-form-item label="处置单/变动单id" prop="dealId">
|
||||
<el-input v-model="formData.dealId" placeholder="请输入处置单/变动单id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产id" prop="propertyId">
|
||||
<el-input v-model="formData.propertyId" placeholder="请输入资产id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="处置方式" prop="dealWay">
|
||||
<el-select v-model="formData.dealWay" placeholder="请选择处置方式">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMPANY_DEAL_WAY)" :key="dict.value"
|
||||
:label="dict.label" :value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="原企业id" prop="oldCorpId">
|
||||
<el-input v-model="formData.oldCorpId" placeholder="请输入原企业id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调入企业id" prop="corpId">
|
||||
<el-input v-model="formData.corpId" placeholder="请输入调入企业id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原部门id" prop="oldDeptId">
|
||||
<el-input v-model="formData.oldDeptId" placeholder="请输入原部门id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调入部门id" prop="deptId">
|
||||
<el-input v-model="formData.deptId" placeholder="请输入调入部门id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原存放地id" prop="oldPosId">
|
||||
<el-input v-model="formData.oldPosId" placeholder="请输入原存放地id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调入存放地id" prop="posId">
|
||||
<el-input v-model="formData.posId" placeholder="请输入调入存放地id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原使用人id" prop="oldUserId">
|
||||
<el-input v-model="formData.oldUserId" placeholder="请输入原使用人id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调入使用人id" prop="userId">
|
||||
<el-input v-model="formData.userId" placeholder="请输入调入使用人id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as PropertyDealItemApi from '@/api/base/property/propertydealitem';
|
||||
|
||||
export default {
|
||||
name: "PropertyDealItemForm",
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 弹出层标题
|
||||
dialogTitle: "",
|
||||
// 是否显示弹出层
|
||||
dialogVisible: false,
|
||||
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
formLoading: false,
|
||||
// 表单参数
|
||||
formData: {
|
||||
id: undefined,
|
||||
dealId: undefined,
|
||||
propertyId: undefined,
|
||||
dealWay: undefined,
|
||||
oldCorpId: undefined,
|
||||
corpId: undefined,
|
||||
oldDeptId: undefined,
|
||||
deptId: undefined,
|
||||
oldPosId: undefined,
|
||||
posId: undefined,
|
||||
oldUserId: undefined,
|
||||
userId: undefined,
|
||||
remark: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
formRules: {
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/** 打开弹窗 */
|
||||
async open(id) {
|
||||
this.dialogVisible = true;
|
||||
this.reset();
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const res = await PropertyDealItemApi.getPropertyDealItem(id);
|
||||
this.formData = res.data;
|
||||
this.title = "修改企业管理-资产处置子";
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
}
|
||||
this.title = "新增企业管理-资产处置子";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
async submitForm() {
|
||||
// 校验主表
|
||||
await this.$refs["formRef"].validate();
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const data = this.formData;
|
||||
// 修改的提交
|
||||
if (data.id) {
|
||||
await PropertyDealItemApi.updatePropertyDealItem(data);
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
await PropertyDealItemApi.createPropertyDealItem(data);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.formData = {
|
||||
id: undefined,
|
||||
dealId: undefined,
|
||||
propertyId: undefined,
|
||||
dealWay: undefined,
|
||||
oldCorpId: undefined,
|
||||
corpId: undefined,
|
||||
oldDeptId: undefined,
|
||||
deptId: undefined,
|
||||
oldPosId: undefined,
|
||||
posId: undefined,
|
||||
oldUserId: undefined,
|
||||
userId: undefined,
|
||||
remark: undefined,
|
||||
};
|
||||
this.resetForm("formRef");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
208
src/views/base/property/propertydealitem/index.vue
Normal file
208
src/views/base/property/propertydealitem/index.vue
Normal file
@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="处置单/变动单id" prop="dealId">
|
||||
<el-input v-model="queryParams.dealId" placeholder="请输入处置单/变动单id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="资产id" prop="propertyId">
|
||||
<el-input v-model="queryParams.propertyId" placeholder="请输入资产id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="处置方式" prop="dealWay">
|
||||
<el-select v-model="queryParams.dealWay" placeholder="请选择处置方式" clearable size="small">
|
||||
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.COMPANY_DEAL_WAY)" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="原企业id" prop="oldCorpId">
|
||||
<el-input v-model="queryParams.oldCorpId" placeholder="请输入原企业id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调入企业id" prop="corpId">
|
||||
<el-input v-model="queryParams.corpId" placeholder="请输入调入企业id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原部门id" prop="oldDeptId">
|
||||
<el-input v-model="queryParams.oldDeptId" placeholder="请输入原部门id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调入部门id" prop="deptId">
|
||||
<el-input v-model="queryParams.deptId" placeholder="请输入调入部门id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原存放地id" prop="oldPosId">
|
||||
<el-input v-model="queryParams.oldPosId" placeholder="请输入原存放地id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调入存放地id" prop="posId">
|
||||
<el-input v-model="queryParams.posId" placeholder="请输入调入存放地id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原使用人id" prop="oldUserId">
|
||||
<el-input v-model="queryParams.oldUserId" placeholder="请输入原使用人id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调入使用人id" prop="userId">
|
||||
<el-input v-model="queryParams.userId" placeholder="请输入调入使用人id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
|
||||
v-hasPermi="['company:property-deal-item:create']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
:loading="exportLoading" v-hasPermi="['company:property-deal-item:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="主键标识" align="center" prop="id" />
|
||||
<el-table-column label="处置单/变动单id" align="center" prop="dealId" />
|
||||
<el-table-column label="资产id" align="center" prop="propertyId" />
|
||||
<el-table-column label="处置方式" align="center" prop="dealWay">
|
||||
<template v-slot="scope">
|
||||
<dict-tag :type="DICT_TYPE.COMPANY_DEAL_WAY" :value="scope.row.dealWay" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原企业id" align="center" prop="oldCorpId" />
|
||||
<el-table-column label="调入企业id" align="center" prop="corpId" />
|
||||
<el-table-column label="原部门id" align="center" prop="oldDeptId" />
|
||||
<el-table-column label="调入部门id" align="center" prop="deptId" />
|
||||
<el-table-column label="原存放地id" align="center" prop="oldPosId" />
|
||||
<el-table-column label="调入存放地id" align="center" prop="posId" />
|
||||
<el-table-column label="原使用人id" align="center" prop="oldUserId" />
|
||||
<el-table-column label="调入使用人id" align="center" prop="userId" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['company:property-deal-item:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['company:property-deal-item:delete']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<PropertyDealItemForm ref="formRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as PropertyDealItemApi from '@/api/base/property/propertydealitem';
|
||||
|
||||
import PropertyDealItemForm from './PropertyDealItemForm.vue';
|
||||
export default {
|
||||
name: "PropertyDealItem",
|
||||
components: {
|
||||
PropertyDealItemForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 企业管理-资产处置子列表
|
||||
list: [],
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
// 选中行
|
||||
currentRow: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
dealId: null,
|
||||
propertyId: null,
|
||||
dealWay: null,
|
||||
oldCorpId: null,
|
||||
corpId: null,
|
||||
oldDeptId: null,
|
||||
deptId: null,
|
||||
oldPosId: null,
|
||||
posId: null,
|
||||
oldUserId: null,
|
||||
userId: null,
|
||||
remark: null,
|
||||
createTime: [],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true;
|
||||
const res = await PropertyDealItemApi.getPropertyDealItemPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total;
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 添加/修改操作 */
|
||||
openForm(id) {
|
||||
this.$refs["formRef"].open(id);
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除企业管理-资产处置子编号为"' + id + '"的数据项?')
|
||||
try {
|
||||
await PropertyDealItemApi.deletePropertyDealItem(id);
|
||||
await this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch { }
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
await this.$modal.confirm('是否确认导出所有企业管理-资产处置子数据项?');
|
||||
try {
|
||||
this.exportLoading = true;
|
||||
const data = await PropertyDealItemApi.exportPropertyDealItemExcel(this.queryParams);
|
||||
this.$download.excel(data, '企业管理-资产处置子.xls');
|
||||
} catch {
|
||||
} finally {
|
||||
this.exportLoading = false;
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
112
src/views/base/property/propertykeep/PropertyKeepForm.vue
Normal file
112
src/views/base/property/propertykeep/PropertyKeepForm.vue
Normal file
@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="45%" v-dialogDrag append-to-body>
|
||||
<el-form ref="formRef" :model="formData" :rules="formRules" v-loading="formLoading" label-width="100px">
|
||||
<el-form-item label="资产id" prop="propertyId">
|
||||
<el-input v-model="formData.propertyId" placeholder="请输入资产id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="维修/保养日期" prop="keepDate">
|
||||
<el-date-picker clearable v-model="formData.keepDate" type="date" value-format="timestamp"
|
||||
placeholder="选择维修/保养日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件urls">
|
||||
<FileUpload v-model="formData.fileUrls" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="formLoading">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as PropertyKeepApi from '@/api/base/property/propertykeep';
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
export default {
|
||||
name: "PropertyKeepForm",
|
||||
components: {
|
||||
FileUpload,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 弹出层标题
|
||||
dialogTitle: "",
|
||||
// 是否显示弹出层
|
||||
dialogVisible: false,
|
||||
// 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
formLoading: false,
|
||||
// 表单参数
|
||||
formData: {
|
||||
id: undefined,
|
||||
propertyId: undefined,
|
||||
keepDate: undefined,
|
||||
remark: undefined,
|
||||
fileUrls: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
formRules: {
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/** 打开弹窗 */
|
||||
async open(id) {
|
||||
this.dialogVisible = true;
|
||||
this.reset();
|
||||
// 修改时,设置数据
|
||||
if (id) {
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const res = await PropertyKeepApi.getPropertyKeep(id);
|
||||
this.formData = res.data;
|
||||
this.title = "修改资产维修/保养记录";
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
}
|
||||
this.title = "新增资产维修/保养记录";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
async submitForm() {
|
||||
// 校验主表
|
||||
await this.$refs["formRef"].validate();
|
||||
this.formLoading = true;
|
||||
try {
|
||||
const data = this.formData;
|
||||
// 修改的提交
|
||||
if (data.id) {
|
||||
await PropertyKeepApi.updatePropertyKeep(data);
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
await PropertyKeepApi.createPropertyKeep(data);
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.dialogVisible = false;
|
||||
this.$emit('success');
|
||||
} finally {
|
||||
this.formLoading = false;
|
||||
}
|
||||
},
|
||||
/** 表单重置 */
|
||||
reset() {
|
||||
this.formData = {
|
||||
id: undefined,
|
||||
propertyId: undefined,
|
||||
keepDate: undefined,
|
||||
remark: undefined,
|
||||
fileUrls: undefined,
|
||||
};
|
||||
this.resetForm("formRef");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
159
src/views/base/property/propertykeep/index.vue
Normal file
159
src/views/base/property/propertykeep/index.vue
Normal file
@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="资产id" prop="propertyId">
|
||||
<el-input v-model="queryParams.propertyId" placeholder="请输入资产id" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="维修/保养日期" prop="keepDate">
|
||||
<el-date-picker v-model="queryParams.keepDate" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 操作工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="openForm(undefined)"
|
||||
v-hasPermi="['company:property-keep:create']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
:loading="exportLoading" v-hasPermi="['company:property-keep:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
<el-table-column label="主键标识" align="center" prop="id" />
|
||||
<el-table-column label="资产id" align="center" prop="propertyId" />
|
||||
<el-table-column label="维修/保养日期" align="center" prop="keepDate" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="附件urls" align="center" prop="fileUrls" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="openForm(scope.row.id)"
|
||||
v-hasPermi="['company:property-keep:update']">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['company:property-keep:delete']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<!-- 对话框(添加 / 修改) -->
|
||||
<PropertyKeepForm ref="formRef" @success="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as PropertyKeepApi from '@/api/base/property/propertykeep';
|
||||
import PropertyKeepForm from './PropertyKeepForm.vue';
|
||||
export default {
|
||||
name: "PropertyKeep",
|
||||
components: {
|
||||
PropertyKeepForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 资产维修/保养记录列表
|
||||
list: [],
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
// 选中行
|
||||
currentRow: {},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
propertyId: null,
|
||||
keepDate: [],
|
||||
remark: null,
|
||||
fileUrls: null,
|
||||
createTime: [],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询列表 */
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true;
|
||||
const res = await PropertyKeepApi.getPropertyKeepPage(this.queryParams);
|
||||
this.list = res.data.records;
|
||||
this.total = res.data.total;
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 添加/修改操作 */
|
||||
openForm(id) {
|
||||
this.$refs["formRef"].open(id);
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
async handleDelete(row) {
|
||||
const id = row.id;
|
||||
await this.$modal.confirm('是否确认删除资产维修/保养记录编号为"' + id + '"的数据项?')
|
||||
try {
|
||||
await PropertyKeepApi.deletePropertyKeep(id);
|
||||
await this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
} catch { }
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
async handleExport() {
|
||||
await this.$modal.confirm('是否确认导出所有资产维修/保养记录数据项?');
|
||||
try {
|
||||
this.exportLoading = true;
|
||||
const data = await PropertyKeepApi.exportPropertyKeepExcel(this.queryParams);
|
||||
this.$download.excel(data, '资产维修/保养记录.xls');
|
||||
} catch {
|
||||
} finally {
|
||||
this.exportLoading = false;
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -34,8 +34,8 @@
|
||||
<!-- 列表 -->
|
||||
<el-table v-loading="loading" :data="tableList">
|
||||
<el-table-column label="数据源" align="center" :formatter="dataSourceConfigNameFormat"/>
|
||||
<el-table-column label="表名称" align="center" prop="tableName" width="200"/>
|
||||
<el-table-column label="表描述" align="center" prop="tableComment" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="表名称" align="center" prop="tableName" width="240"/>
|
||||
<el-table-column label="表描述" align="center" prop="tableComment" :show-overflow-tooltip="true" width="240"/>
|
||||
<el-table-column label="实体" align="center" prop="className" width="200"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
|
Loading…
Reference in New Issue
Block a user