|
@@ -12,30 +12,44 @@
|
|
>
|
|
>
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="经销商编码" prop="">
|
|
|
|
- <el-input placeholder="请输入"></el-input>
|
|
|
|
|
|
+ <el-form-item label="经销商编码" prop="customerNumber">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="searchForm.customerNumber"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="经销商名称" prop="">
|
|
|
|
- <el-input placeholder="请输入"></el-input>
|
|
|
|
|
|
+ <el-form-item label="经销商名称" prop="customerName">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="searchForm.customerName"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="关联钱包" prop="">
|
|
|
|
- <el-input placeholder="请输入"></el-input>
|
|
|
|
|
|
+ <el-form-item label="关联钱包" prop="walletName">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="searchForm.walletName"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
<el-col :xs="24" :sm="12" :lg="6">
|
|
- <el-form-item label="总信用额度" prop="">
|
|
|
|
- <el-input placeholder="请输入"></el-input>
|
|
|
|
|
|
+ <el-form-item label="总信用额度" prop="amount">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="searchForm.amount"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ ></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
<el-col :xs="24" :sm="24" :lg="24">
|
|
<el-form-item label="" class="fr">
|
|
<el-form-item label="" class="fr">
|
|
- <el-button size="small">清空</el-button>
|
|
|
|
- <el-button size="small" type="primary">搜索</el-button>
|
|
|
|
|
|
+ <el-button size="small" @click="clearFn">清空</el-button>
|
|
|
|
+ <el-button size="small" type="primary" @click="searchFn"
|
|
|
|
+ >搜索</el-button
|
|
|
|
+ >
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -47,12 +61,11 @@
|
|
<el-button type="primary" size="small" @click="showAddFn"
|
|
<el-button type="primary" size="small" @click="showAddFn"
|
|
>新建</el-button
|
|
>新建</el-button
|
|
>
|
|
>
|
|
- <el-button type="primary" size="small" @click="recordFn"
|
|
|
|
- >详情</el-button
|
|
|
|
- >
|
|
|
|
</div>
|
|
</div>
|
|
<div class="fr">
|
|
<div class="fr">
|
|
- <el-button type="primary" size="small">导出</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="small" @click="exportList"
|
|
|
|
+ >导出</el-button
|
|
|
|
+ >
|
|
<el-button type="primary" size="small">打印</el-button>
|
|
<el-button type="primary" size="small">打印</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -71,41 +84,35 @@
|
|
<el-table-column
|
|
<el-table-column
|
|
label="序号"
|
|
label="序号"
|
|
align="center"
|
|
align="center"
|
|
- min-width="100"
|
|
|
|
|
|
+ type="index"
|
|
|
|
+ width="100"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
></el-table-column>
|
|
></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
align="center"
|
|
align="center"
|
|
label="经销商编码"
|
|
label="经销商编码"
|
|
- prop=""
|
|
|
|
|
|
+ prop="customerNumber"
|
|
min-width="160"
|
|
min-width="160"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
></el-table-column>
|
|
></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
align="center"
|
|
align="center"
|
|
label="经销商名称"
|
|
label="经销商名称"
|
|
- prop=""
|
|
|
|
- min-width="160"
|
|
|
|
- show-overflow-tooltip
|
|
|
|
- ></el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- align="center"
|
|
|
|
- label="当前信用额度"
|
|
|
|
- prop=""
|
|
|
|
|
|
+ prop="customerName"
|
|
min-width="160"
|
|
min-width="160"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
></el-table-column>
|
|
></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
align="center"
|
|
align="center"
|
|
- label="上次额度"
|
|
|
|
- prop=""
|
|
|
|
|
|
+ label="总信用额度"
|
|
|
|
+ prop="amount"
|
|
min-width="160"
|
|
min-width="160"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
></el-table-column>
|
|
></el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
align="center"
|
|
align="center"
|
|
label="关联钱包"
|
|
label="关联钱包"
|
|
- prop=""
|
|
|
|
|
|
+ prop="customerWalletName"
|
|
min-width="160"
|
|
min-width="160"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
></el-table-column>
|
|
></el-table-column>
|
|
@@ -115,11 +122,17 @@
|
|
min-width="160"
|
|
min-width="160"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
>
|
|
>
|
|
- <template slot-scope="">
|
|
|
|
- <el-button type="text" class="textColor" slot="reference"
|
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ class="textColor"
|
|
|
|
+ @click="editFn(scope.row)"
|
|
>设置额度</el-button
|
|
>设置额度</el-button
|
|
>
|
|
>
|
|
- <el-button type="text" class="textColor" slot="reference"
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ class="textColor"
|
|
|
|
+ @click="recordFn(scope.row)"
|
|
>记录</el-button
|
|
>记录</el-button
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
@@ -129,6 +142,8 @@
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
<div class="fr">
|
|
<div class="fr">
|
|
<el-pagination
|
|
<el-pagination
|
|
|
|
+ @size-change="handleSizeChange"
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
:current-page="currentPage"
|
|
:current-page="currentPage"
|
|
:page-sizes="[10, 20, 30, 50]"
|
|
:page-sizes="[10, 20, 30, 50]"
|
|
:page-size="10"
|
|
:page-size="10"
|
|
@@ -139,31 +154,81 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <CreditListDetail v-else />
|
|
|
|
|
|
+ <CreditListDetail :recordsList="recordsList" v-else />
|
|
<!-- 新增弹窗 -->
|
|
<!-- 新增弹窗 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
- title="提货人档案"
|
|
|
|
|
|
+ title="新增"
|
|
:visible.sync="dialogForm"
|
|
:visible.sync="dialogForm"
|
|
width="30%"
|
|
width="30%"
|
|
:show-close="false"
|
|
:show-close="false"
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
>
|
|
>
|
|
- <el-form label-width="120px">
|
|
|
|
|
|
+ <el-form
|
|
|
|
+ ref="addForm"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ :model="addForm"
|
|
|
|
+ label-width="120px"
|
|
|
|
+ >
|
|
<el-form-item label="经销商名称" prop="customerId" label-width="120px">
|
|
<el-form-item label="经销商名称" prop="customerId" label-width="120px">
|
|
- <el-select class="selectStyle" placeholder="请选择">
|
|
|
|
- <el-option> </el-option>
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="addForm.customerId"
|
|
|
|
+ class="selectStyle"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ filterable
|
|
|
|
+ @change="customerChangeFn"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="v in customerList"
|
|
|
|
+ :key="v.id"
|
|
|
|
+ :label="v.name"
|
|
|
|
+ :value="v.id"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="信用变更额度" prop="">
|
|
|
|
- <el-input></el-input>
|
|
|
|
|
|
+ <el-form-item label="信用变更额度" prop="amount">
|
|
|
|
+ <el-input v-model.number="addForm.amount"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="关联钱包" prop="customerId">
|
|
|
|
- <el-select class="selectStyle" placeholder="请选择">
|
|
|
|
- <el-option> </el-option>
|
|
|
|
|
|
+ <el-form-item label="关联钱包" prop="customerWalletId">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="addForm.customerWalletId"
|
|
|
|
+ class="selectStyle"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ filterable
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="v in customerWalletList"
|
|
|
|
+ :key="v.customerWalletId"
|
|
|
|
+ :label="v.mainName"
|
|
|
|
+ :value="v.customerWalletId"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="开始时间" prop="startTime">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ class="selectStyle"
|
|
|
|
+ v-model="addForm.startTime"
|
|
|
|
+ type="datetime"
|
|
|
|
+ placeholder="选择日期时间"
|
|
|
|
+ default-time="00:00:00"
|
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
+ >
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="结束时间" prop="endTime">
|
|
|
|
+ <el-date-picker
|
|
|
|
+ class="selectStyle"
|
|
|
|
+ v-model="addForm.endTime"
|
|
|
|
+ type="datetime"
|
|
|
|
+ placeholder="选择日期时间"
|
|
|
|
+ default-time="00:00:00"
|
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
+ >
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click="cancelFn">取 消</el-button>
|
|
<el-button @click="cancelFn">取 消</el-button>
|
|
@@ -174,7 +239,15 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { getWalletCustomerList } from "@/api/finance/change_apply";
|
|
|
|
+import { getDealerList } from "@/api/basic_data/dealer";
|
|
|
|
+import {
|
|
|
|
+ getCreditListAdd,
|
|
|
|
+ getCreditList,
|
|
|
|
+ getCreditListEdit,
|
|
|
|
+} from "@/api/finance/credit_list";
|
|
import CreditListDetail from "./components/credit_list-detail";
|
|
import CreditListDetail from "./components/credit_list-detail";
|
|
|
|
+import { downloadFiles } from "@/utils/util";
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
CreditListDetail,
|
|
CreditListDetail,
|
|
@@ -185,24 +258,182 @@ export default {
|
|
pageSize: 10, // 每页数量
|
|
pageSize: 10, // 每页数量
|
|
listTotal: 0, // 列表总数
|
|
listTotal: 0, // 列表总数
|
|
dataList: [], // 列表数据
|
|
dataList: [], // 列表数据
|
|
- searchForm: {}, //搜索表单
|
|
|
|
|
|
+ searchForm: {
|
|
|
|
+ customerNumber: "",
|
|
|
|
+ customerName: "",
|
|
|
|
+ amount: "",
|
|
|
|
+ walletName: "",
|
|
|
|
+ }, //搜索表单
|
|
listLoading: false, // 列表加载loading
|
|
listLoading: false, // 列表加载loading
|
|
showRecord: true,
|
|
showRecord: true,
|
|
dialogForm: false, //弹窗表单
|
|
dialogForm: false, //弹窗表单
|
|
|
|
+ addForm: {
|
|
|
|
+ startTime: "",
|
|
|
|
+ endTime: "",
|
|
|
|
+ amount: null,
|
|
|
|
+ customerId: "",
|
|
|
|
+ customerWalletId: "",
|
|
|
|
+ },
|
|
|
|
+ customerList: [], //经销商列表数据
|
|
|
|
+ customerWalletList: [], //经销商钱包列表
|
|
|
|
+ recordsList: {}, //记录数据
|
|
|
|
+ customerWalletCreditId: null, //设置额度ID
|
|
|
|
+ rules: {
|
|
|
|
+ startTime: [
|
|
|
|
+ { required: true, message: "请选择开始时间", trigger: "blur" },
|
|
|
|
+ ],
|
|
|
|
+ endTime: [
|
|
|
|
+ { required: true, message: "请选择结束时间", trigger: "blur" },
|
|
|
|
+ ],
|
|
|
|
+ amount: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ message: "请输入数字",
|
|
|
|
+ type: "number",
|
|
|
|
+ trigger: "blur",
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ customerId: [
|
|
|
|
+ { required: true, message: "请选择经销商", trigger: "blur" },
|
|
|
|
+ ],
|
|
|
|
+ customerWalletId: [
|
|
|
|
+ { required: true, message: "请选择钱包", trigger: "blur" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
|
|
|
|
+ this.getDealerData({ pageSize: -1, pageNum: 1 });
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 更改每页数量
|
|
|
|
+ handleSizeChange(val) {
|
|
|
|
+ this.pageSize = val;
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.getDataList({ pageNum: 1, pageSize: this.pageSize });
|
|
|
|
+ },
|
|
|
|
+ // 更改当前页
|
|
|
|
+ handleCurrentChange(val) {
|
|
|
|
+ this.currentPage = val;
|
|
|
|
+ this.getDataList({ pageNum: val, pageSize: 10 });
|
|
|
|
+ },
|
|
|
|
+ //设置额度
|
|
|
|
+ editFn(value) {
|
|
|
|
+ this.customerWalletCreditId = value.id;
|
|
|
|
+
|
|
|
|
+ this.addForm = {
|
|
|
|
+ startTime: "",
|
|
|
|
+ endTime: "",
|
|
|
|
+ amount: value.amount,
|
|
|
|
+ customerId: value.customerId,
|
|
|
|
+ customerWalletId: value.customerWalletId,
|
|
|
|
+ };
|
|
|
|
+ this.getWalletData({ type: "COMMONLY", customerId: value.customerId });
|
|
|
|
+
|
|
|
|
+ this.dialogForm = true;
|
|
|
|
+ },
|
|
|
|
+ //导出
|
|
|
|
+ exportList() {
|
|
|
|
+ let screenData = {
|
|
|
|
+ amount: this.searchForm.amount,
|
|
|
|
+ customerNumber: this.searchForm.customerNumber,
|
|
|
|
+ customerName: this.searchForm.customerName,
|
|
|
|
+ walletName: this.searchForm.walletName,
|
|
|
|
+ };
|
|
|
|
+ downloadFiles("/credit/exportData", screenData);
|
|
|
|
+ },
|
|
|
|
+ //清空
|
|
|
|
+ clearFn() {
|
|
|
|
+ this.$refs.searchForm.resetFields();
|
|
|
|
+ },
|
|
|
|
+ //搜索
|
|
|
|
+ searchFn() {
|
|
|
|
+ this.getDataList({
|
|
|
|
+ ...this.searchForm,
|
|
|
|
+ pageSize: this.pageSize,
|
|
|
|
+ pageNum: this.currentPage,
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 更改每页数量
|
|
|
|
+ handleSizeChange(val) {
|
|
|
|
+ this.pageSize = val;
|
|
|
|
+ this.currentPage = 1;
|
|
|
|
+ this.getDataList({ pageNum: 1, pageSize: this.pageSize });
|
|
|
|
+ },
|
|
|
|
+ // 更改当前页
|
|
|
|
+ handleCurrentChange(val) {
|
|
|
|
+ this.currentPage = val;
|
|
|
|
+ this.getDataList({ pageNum: val, pageSize: 10 });
|
|
|
|
+ },
|
|
|
|
+ //列表数据
|
|
|
|
+ async getDataList(data) {
|
|
|
|
+ const res = await getCreditList(data);
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.dataList = res.data.records;
|
|
|
|
+ this.listTotal = res.data.total;
|
|
|
|
+ },
|
|
|
|
+ //下拉框数据
|
|
|
|
+ customerChangeFn(value) {
|
|
|
|
+ this.getWalletData({ type: "COMMONLY", customerId: value });
|
|
|
|
+ },
|
|
|
|
+ //获取经销商钱包列表
|
|
|
|
+ async getWalletData(data) {
|
|
|
|
+ const res = await getWalletCustomerList(data);
|
|
|
|
+
|
|
|
|
+ this.customerWalletList = res.data;
|
|
|
|
+ },
|
|
|
|
+ //获取经销商列表
|
|
|
|
+ async getDealerData(data) {
|
|
|
|
+ const res = await getDealerList(data);
|
|
|
|
+
|
|
|
|
+ this.customerList = res.data.records;
|
|
|
|
+ },
|
|
//新建
|
|
//新建
|
|
showAddFn() {
|
|
showAddFn() {
|
|
this.dialogForm = true;
|
|
this.dialogForm = true;
|
|
},
|
|
},
|
|
//确定
|
|
//确定
|
|
- addDataFn() {},
|
|
|
|
|
|
+ async addDataFn() {
|
|
|
|
+ await this.$refs.addForm.validate();
|
|
|
|
+
|
|
|
|
+ if (this.customerWalletCreditId) {
|
|
|
|
+ await getCreditListEdit({
|
|
|
|
+ ...this.addForm,
|
|
|
|
+ customerWalletCreditId: this.customerWalletCreditId,
|
|
|
|
+ });
|
|
|
|
+ this.$message.success("设置成功");
|
|
|
|
+ } else {
|
|
|
|
+ await getCreditListAdd({ ...this.addForm });
|
|
|
|
+ this.$message.success("新增成功");
|
|
|
|
+ }
|
|
|
|
+ this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
|
|
|
|
+ this.addForm = {
|
|
|
|
+ startTime: "",
|
|
|
|
+ endTime: "",
|
|
|
|
+ amount: null,
|
|
|
|
+ customerId: "",
|
|
|
|
+ customerWalletId: "",
|
|
|
|
+ };
|
|
|
|
+ this.customerWalletCreditId = null;
|
|
|
|
+ this.dialogForm = false;
|
|
|
|
+ },
|
|
//取消
|
|
//取消
|
|
- cancelFn() {
|
|
|
|
|
|
+ async cancelFn() {
|
|
|
|
+ // this.addForm = {
|
|
|
|
+ // startTime: "",
|
|
|
|
+ // endTime: "",
|
|
|
|
+ // amount: null,
|
|
|
|
+ // customerId: "",
|
|
|
|
+ // customerWalletId: "",
|
|
|
|
+ // };
|
|
|
|
+ await this.$refs.addForm.resetFields();
|
|
|
|
+ this.customerWalletCreditId = null;
|
|
this.dialogForm = false;
|
|
this.dialogForm = false;
|
|
},
|
|
},
|
|
- recordFn() {
|
|
|
|
|
|
+ //记录
|
|
|
|
+ recordFn(v) {
|
|
|
|
+ this.recordsList = v;
|
|
this.showRecord = false;
|
|
this.showRecord = false;
|
|
},
|
|
},
|
|
},
|
|
},
|