|
|
|
@ -1,54 +1,119 @@
|
|
|
|
|
<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="productName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.productName"
|
|
|
|
|
placeholder="请输入产品名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产品简称" prop="simpleName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.simpleName"
|
|
|
|
|
placeholder="请输入产品简称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="最高额度" prop="maxAmount">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.maxAmount"
|
|
|
|
|
placeholder="请输入最高额度"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="年利率" prop="interestRate">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.interestRate"
|
|
|
|
|
placeholder="请输入年利率"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="上架时间起" prop="listBegin">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="queryParams.listBegin"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择上架时间起">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="上架时间止" prop="listEnd">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="queryParams.listEnd"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择上架时间止">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
|
|
|
|
<el-form-item label="产品名称" prop="productName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.productName"
|
|
|
|
|
placeholder="请输入产品名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产品简称" prop="simpleName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.simpleName"
|
|
|
|
|
placeholder="请输入产品简称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产品类型" prop="productType">
|
|
|
|
|
<el-select v-model="queryParams.productType" placeholder="选择产品类型" clearable @keyup.enter.native="handleQuery">
|
|
|
|
|
<el-option v-for="dict in dict.type.product_type" :key="dict.value" :label="dict.label"
|
|
|
|
|
:value="dict.value"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="还款周期" prop="repaymentCycle">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.repaymentCycle"
|
|
|
|
|
placeholder="请输入还款周期"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="还款方式" prop="repaymentMethod">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.repaymentMethod"
|
|
|
|
|
placeholder="请输入还款方式"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="展业城市" prop="businessCity">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.businessCity"
|
|
|
|
|
placeholder="请输入展业城市"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="综合费率" prop="combinedRates">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.combinedRates"
|
|
|
|
|
placeholder="请输入综合费率"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="状态" prop="status">
|
|
|
|
|
<el-select v-model="queryParams.status" placeholder="选择状态" clearable @keyup.enter.native="handleQuery">
|
|
|
|
|
<el-option v-for="dict in dict.type.product_status" :key="dict.value" :label="dict.label"
|
|
|
|
|
:value="dict.value"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="上架时间" prop="listBegin">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
style="width: 170px"
|
|
|
|
|
v-model="queryParams.listBegin"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择上架时间起">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
-
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
style="width: 170px"
|
|
|
|
|
v-model="queryParams.listEnd"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择上架时间止">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="年利率(单利)" prop="interestRateBegin">
|
|
|
|
|
<el-input-number
|
|
|
|
|
:min="0"
|
|
|
|
|
:precision="2"
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
v-model="queryParams.interestRateBegin"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
-
|
|
|
|
|
<el-input-number
|
|
|
|
|
:min="0"
|
|
|
|
|
:precision="2"
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
v-model="queryParams.interestRateEnd"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="最高额度(元)" prop="maxAmount">
|
|
|
|
|
<el-input-number
|
|
|
|
|
:min="0"
|
|
|
|
|
v-model="queryParams.maxAmountBegin"
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
-
|
|
|
|
|
<el-input-number
|
|
|
|
|
:min="0"
|
|
|
|
|
style="width: 150px"
|
|
|
|
|
v-model="queryParams.maxAmountEnd"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
@ -64,7 +129,8 @@
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
v-hasPermi="['product:info:add']"
|
|
|
|
|
>新增</el-button>
|
|
|
|
|
>新增
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
@ -75,7 +141,8 @@
|
|
|
|
|
:disabled="single"
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
v-hasPermi="['product:info:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
>修改
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
@ -86,7 +153,8 @@
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
@click="handleDelete"
|
|
|
|
|
v-hasPermi="['product:info:remove']"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
@ -96,35 +164,48 @@
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
v-hasPermi="['product:info:export']"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
>导出
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="infoList" @sort-change="handleSortChange" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="产品id" align="center" prop="id" sortable='custom' />
|
|
|
|
|
<el-table-column label="产品名称" align="center" prop="productName" sortable='custom' />
|
|
|
|
|
<el-table-column label="产品简称" align="center" prop="simpleName" sortable='custom' />
|
|
|
|
|
<el-table-column label="产品类型" align="center" prop="productType" sortable='custom' />
|
|
|
|
|
<el-table-column label="产品细类" align="center" prop="productSubtype" sortable='custom' />
|
|
|
|
|
<el-table-column label="最高额度" align="center" prop="maxAmount" sortable='custom' />
|
|
|
|
|
<el-table-column label="年利率" align="center" prop="interestRate" sortable='custom' />
|
|
|
|
|
<el-table-column label="产品简介" align="center" prop="productIntro" sortable='custom' />
|
|
|
|
|
<el-table-column label="产品详情" align="center" prop="productDetail" sortable='custom' />
|
|
|
|
|
<el-table-column label="上架时间起" align="center" prop="listBegin" width="180" sortable='custom'>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.listBegin, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="上架时间止" align="center" prop="listEnd" width="180" sortable='custom'>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.listEnd, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="状态0草稿1上架" align="center" prop="status" sortable='custom' />
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" sortable='custom' />
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<el-table v-loading="loading" :data="infoList" @sort-change="handleSortChange"
|
|
|
|
|
@selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
|
<el-table-column label="产品名称" align="center" prop="productName" sortable='custom'/>
|
|
|
|
|
<el-table-column label="产品简称" align="center" prop="simpleName" sortable='custom'/>
|
|
|
|
|
<el-table-column label="产品类型" align="center" prop="productType" sortable='custom'>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.product_type" :value="scope.row.productType"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="产品细类" align="center" prop="productSubtype" sortable='custom'/>
|
|
|
|
|
<el-table-column label="最高额度(元)" align="center" prop="maxAmount" sortable='custom'/>
|
|
|
|
|
<el-table-column label="年利率(单利)" align="center" prop="interestRate" sortable='custom'/>
|
|
|
|
|
<el-table-column label="产品简介" align="center" prop="productIntro" sortable='custom' show-overflow-tooltip/>
|
|
|
|
|
<el-table-column label="产品详情" align="center" prop="productDetail" sortable='custom' show-overflow-tooltip/>
|
|
|
|
|
<el-table-column label="还款周期" align="center" prop="repaymentCycle" sortable='custom'/>
|
|
|
|
|
<el-table-column label="还款方式" align="center" prop="repaymentMethod" sortable='custom'/>
|
|
|
|
|
<el-table-column label="展业城市" align="center" prop="businessCity" sortable='custom'/>
|
|
|
|
|
<el-table-column label="综合费率" align="center" prop="combinedRates" sortable='custom'/>
|
|
|
|
|
<el-table-column label="上架时间起" align="center" prop="listBegin" width="150" sortable='custom'>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.listBegin, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="上架时间止" align="center" prop="listEnd" width="150" sortable='custom'>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.listEnd, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="状态" align="center" prop="status" sortable='custom'>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.product_status" :value="scope.row.status"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" sortable='custom' show-overflow-tooltip/>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
@ -132,20 +213,21 @@
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['product:info:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
>修改
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
v-hasPermi="['product:info:remove']"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
hide-on-single-page
|
|
|
|
|
:total="total"
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
@ -154,62 +236,126 @@
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改产品信息对话框 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="70%" append-to-body :close-on-click-modal="false">
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="产品名称" prop="productName">
|
|
|
|
|
<el-input v-model="form.productName" placeholder="请输入产品名称" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="产品简称" prop="simpleName">
|
|
|
|
|
<el-input v-model="form.simpleName" placeholder="请输入产品简称" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="最高额度" prop="maxAmount">
|
|
|
|
|
<el-input v-model="form.maxAmount" placeholder="请输入最高额度" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="年利率" prop="interestRate">
|
|
|
|
|
<el-input v-model="form.interestRate" placeholder="请输入年利率" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="产品简介" prop="productIntro">
|
|
|
|
|
<el-input v-model="form.productIntro" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="产品详情" prop="productDetail">
|
|
|
|
|
<el-input v-model="form.productDetail" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="上架时间起" prop="listBegin">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.listBegin"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择上架时间起">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="上架时间止" prop="listEnd">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.listEnd"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择上架时间止">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="115px">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="产品名称" prop="productName">
|
|
|
|
|
<el-input v-model="form.productName" placeholder="请输入产品名称"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="产品简称" prop="simpleName">
|
|
|
|
|
<el-input v-model="form.simpleName" placeholder="请输入产品简称"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="产品类型" prop="productType">
|
|
|
|
|
<el-select style="width: 100%;" v-model="form.productType" placeholder="选择产品类型" clearable>
|
|
|
|
|
<el-option v-for="dict in dict.type.product_type" :key="dict.value" :label="dict.label"
|
|
|
|
|
:value="dict.value"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="产品细类" prop="productSubtype">
|
|
|
|
|
<el-input v-model="form.productSubtype" placeholder="请输入产品细类"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="年利率(单利%)" prop="interestRateBegin">
|
|
|
|
|
<el-input-number v-model="form.interestRateBegin" style="width: 160px;" :min="0" :precision="2"/>
|
|
|
|
|
-
|
|
|
|
|
<el-input-number v-model="form.interestRateEnd" style="width: 160px;" :min="0" :precision="2"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="最高额度(元)" prop="maxAmount">
|
|
|
|
|
<el-input-number v-model="form.maxAmount" placeholder="请输入最高额度(元)" style="width: 100%;" :min="0"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="还款周期" prop="repaymentCycle">
|
|
|
|
|
<el-input v-model="form.repaymentCycle" placeholder="请输入还款周期"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="还款方式" prop="repaymentMethod">
|
|
|
|
|
<el-input v-model="form.repaymentMethod" placeholder="请输入还款方式"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="展业城市" prop="businessCity">
|
|
|
|
|
<el-input v-model="form.businessCity" placeholder="请输入展业城市"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="综合费率" prop="combinedRates">
|
|
|
|
|
<el-input v-model="form.combinedRates" placeholder="请输入综合费率"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="上架时间起" prop="listBegin">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.listBegin"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择上架时间起"
|
|
|
|
|
style="width: 100%;">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="上架时间止" prop="listEnd">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.listEnd"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择上架时间止"
|
|
|
|
|
style="width: 100%;">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="状态" prop="status">
|
|
|
|
|
<el-select style="width: 100%;" v-model="form.status" placeholder="选择状态" clearable>
|
|
|
|
|
<el-option v-for="dict in dict.type.product_status" :key="dict.value" :label="dict.label"
|
|
|
|
|
:value="dict.value"/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="产品简介" prop="productIntro">
|
|
|
|
|
<editor v-model="form.productIntro" :min-height="92"/>
|
|
|
|
|
<!-- <el-input v-model="form.productIntro" type="textarea" placeholder="请输入内容"/>-->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="产品详情" prop="productDetail">
|
|
|
|
|
<editor v-model="form.productDetail" :min-height="152"/>
|
|
|
|
|
<!-- <el-input v-model="form.productDetail" type="textarea" placeholder="请输入内容"/>-->
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
@ -220,205 +366,235 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { pageListInfo, getInfo, delInfo, addInfo, updateInfo } from "@/api/product/info";
|
|
|
|
|
import {pageListInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/product/info";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Info",
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
|
ids: [],
|
|
|
|
|
// 选中名字
|
|
|
|
|
names: [],
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
single: true,
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
multiple: true,
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
showSearch: true,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 产品信息表格数据
|
|
|
|
|
infoList: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
productName: null,
|
|
|
|
|
simpleName: null,
|
|
|
|
|
productType: null,
|
|
|
|
|
productSubtype: null,
|
|
|
|
|
maxAmount: null,
|
|
|
|
|
interestRate: null,
|
|
|
|
|
productIntro: null,
|
|
|
|
|
productDetail: null,
|
|
|
|
|
listBegin: null,
|
|
|
|
|
listEnd: null,
|
|
|
|
|
status: null,
|
|
|
|
|
},
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
productName: [
|
|
|
|
|
{ required: true, message: "产品名称不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
simpleName: [
|
|
|
|
|
{ required: true, message: "产品简称不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
productType: [
|
|
|
|
|
{ required: true, message: "产品类型不能为空", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
productSubtype: [
|
|
|
|
|
{ required: true, message: "产品细类不能为空", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
maxAmount: [
|
|
|
|
|
{ required: true, message: "最高额度不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
interestRate: [
|
|
|
|
|
{ required: true, message: "年利率不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
productIntro: [
|
|
|
|
|
{ required: true, message: "产品简介不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
productDetail: [
|
|
|
|
|
{ required: true, message: "产品详情不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
listBegin: [
|
|
|
|
|
{ required: true, message: "上架时间起不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
listEnd: [
|
|
|
|
|
{ required: true, message: "上架时间止不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
status: [
|
|
|
|
|
{ required: true, message: "状态0草稿1上架不能为空", trigger: "change" }
|
|
|
|
|
],
|
|
|
|
|
remark: [
|
|
|
|
|
{ required: true, message: "备注不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
export default {
|
|
|
|
|
name: "Info",
|
|
|
|
|
dicts: ['product_type', "product_status"],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
|
ids: [],
|
|
|
|
|
// 选中名字
|
|
|
|
|
names: [],
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
single: true,
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
multiple: true,
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
showSearch: true,
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 产品信息表格数据
|
|
|
|
|
infoList: [],
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: "",
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
productName: null,
|
|
|
|
|
simpleName: null,
|
|
|
|
|
productType: null,
|
|
|
|
|
productSubtype: null,
|
|
|
|
|
maxAmount: null,
|
|
|
|
|
interestRate: null,
|
|
|
|
|
productIntro: null,
|
|
|
|
|
productDetail: null,
|
|
|
|
|
listBegin: null,
|
|
|
|
|
listEnd: null,
|
|
|
|
|
status: null,
|
|
|
|
|
maxAmountBegin: undefined,
|
|
|
|
|
maxAmountEnd: undefined,
|
|
|
|
|
},
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
productName: [
|
|
|
|
|
{required: true, message: "产品名称不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
simpleName: [
|
|
|
|
|
{required: true, message: "产品简称不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
productType: [
|
|
|
|
|
{required: true, message: "产品类型不能为空", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
// productSubtype: [
|
|
|
|
|
// {required: true, message: "产品细类不能为空", trigger: "change"}
|
|
|
|
|
// ],
|
|
|
|
|
maxAmount: [
|
|
|
|
|
{required: true, message: "最高额度(元)不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
interestRateBegin: [
|
|
|
|
|
{required: true, message: "年利率(单利)不能为空", trigger: "blur"}
|
|
|
|
|
],
|
|
|
|
|
// productIntro: [
|
|
|
|
|
// {required: true, message: "产品简介不能为空", trigger: "blur"}
|
|
|
|
|
// ],
|
|
|
|
|
// productDetail: [
|
|
|
|
|
// {required: true, message: "产品详情不能为空", trigger: "blur"}
|
|
|
|
|
// ],
|
|
|
|
|
// listBegin: [
|
|
|
|
|
// {required: true, message: "上架时间起不能为空", trigger: "blur"}
|
|
|
|
|
// ],
|
|
|
|
|
// listEnd: [
|
|
|
|
|
// {required: true, message: "上架时间止不能为空", trigger: "blur"}
|
|
|
|
|
// ],
|
|
|
|
|
status: [
|
|
|
|
|
{required: true, message: "状态不能为空", trigger: "change"}
|
|
|
|
|
],
|
|
|
|
|
// remark: [
|
|
|
|
|
// {required: true, message: "备注不能为空", trigger: "blur"}
|
|
|
|
|
// ],
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/** 查询产品信息列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
pageListInfo(this.queryParams).then(response => {
|
|
|
|
|
this.infoList = response.rows;
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
}).catch(e => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
// if (!isNaN(this.queryParams.maxAmountBegin) && !isNaN(this.queryParams.maxAmountEnd)) {
|
|
|
|
|
// pageListInfo(this.queryParams).then(response => {
|
|
|
|
|
// this.infoList = response.rows;
|
|
|
|
|
// this.total = response.total;
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// }).catch(e => {
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// this.$modal.msgWarning("最高额度请输入数字进行搜索")
|
|
|
|
|
// this.queryParams.maxAmountBegin = undefined;
|
|
|
|
|
// this.queryParams.maxAmountEnd = undefined;
|
|
|
|
|
// pageListInfo(this.queryParams).then(response => {
|
|
|
|
|
// this.infoList = response.rows;
|
|
|
|
|
// this.total = response.total;
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// }).catch(e => {
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
id: null,
|
|
|
|
|
productName: null,
|
|
|
|
|
simpleName: null,
|
|
|
|
|
productType: null,
|
|
|
|
|
productSubtype: null,
|
|
|
|
|
maxAmount: null,
|
|
|
|
|
interestRateBegin: null,
|
|
|
|
|
interestRateEnd: null,
|
|
|
|
|
productIntro: null,
|
|
|
|
|
productDetail: null,
|
|
|
|
|
listBegin: null,
|
|
|
|
|
listEnd: null,
|
|
|
|
|
status: null,
|
|
|
|
|
remark: null,
|
|
|
|
|
maxAmountBegin: null,
|
|
|
|
|
maxAmountEnd: null,
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
//排序
|
|
|
|
|
handleSortChange(col) {
|
|
|
|
|
this.$sortBy(col, this.queryParams);
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/** 查询产品信息列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
pageListInfo(this.queryParams).then(response => {
|
|
|
|
|
this.infoList = response.rows;
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
}).catch(e => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
id: null,
|
|
|
|
|
productName: null,
|
|
|
|
|
simpleName: null,
|
|
|
|
|
productType: null,
|
|
|
|
|
productSubtype: null,
|
|
|
|
|
maxAmount: null,
|
|
|
|
|
interestRate: null,
|
|
|
|
|
productIntro: null,
|
|
|
|
|
productDetail: null,
|
|
|
|
|
listBegin: null,
|
|
|
|
|
listEnd: null,
|
|
|
|
|
status: null,
|
|
|
|
|
remark: null,
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
|
//排序
|
|
|
|
|
handleSortChange(col) {
|
|
|
|
|
this.$sortBy(col, this.queryParams);
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
resetQuery() {
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
},
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.id);
|
|
|
|
|
this.names = selection.map(item => item.id);
|
|
|
|
|
this.single = selection.length!==1;
|
|
|
|
|
this.multiple = !selection.length;
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
resetQuery() {
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
this.queryParams.maxAmountBegin = undefined;
|
|
|
|
|
this.queryParams.maxAmountEnd = undefined;
|
|
|
|
|
this.queryParams.interestRateEnd = undefined;
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
},
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.id);
|
|
|
|
|
this.names = selection.map(item => item.id);
|
|
|
|
|
this.single = selection.length !== 1;
|
|
|
|
|
this.multiple = !selection.length;
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加产品信息";
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const id = row.id || this.ids;
|
|
|
|
|
getInfo(id).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加产品信息";
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const id = row.id || this.ids;
|
|
|
|
|
getInfo(id).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改产品信息";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
updateInfo(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addInfo(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.title = "修改产品信息";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.id != null) {
|
|
|
|
|
updateInfo(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addInfo(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const ids = row.id || this.ids;
|
|
|
|
|
const names = row.id || this.names;
|
|
|
|
|
this.$modal.confirm('是否确认删除产品信息为"' + names + '"的数据项?').then(function() {
|
|
|
|
|
return delInfo(ids);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleExport() {
|
|
|
|
|
this.download('product/info/export', {
|
|
|
|
|
...this.queryParams
|
|
|
|
|
}, `info_${new Date().getTime()}.xlsx`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const ids = row.id || this.ids;
|
|
|
|
|
const names = row.id || this.names;
|
|
|
|
|
this.$modal.confirm('是否确认删除产品信息为"' + names + '"的数据项?').then(function () {
|
|
|
|
|
return delInfo(ids);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleExport() {
|
|
|
|
|
this.download('product/info/export', {
|
|
|
|
|
...this.queryParams
|
|
|
|
|
}, `产品信息数据_${new Date().getTime()}.xlsx`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|