|
@@ -18,15 +18,11 @@
|
|
|
|
|
|
<el-table-column label="客户名称" width="150" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.customerName }}</span>
|
|
|
+ <!-- <span>{{ scope.row.customerName }}</span> -->
|
|
|
+ <el-button type="text" @click="hookLook(scope.row)">{{ scope.row.customerName }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="客户简称" align="center" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ scope.row.shorterName }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
|
|
|
<el-table-column label="状态" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
@@ -35,6 +31,11 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
+ <el-table-column label="客户简称" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="productLook(scope.row)">{{ scope.row.shorterName }}</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
<el-table-column label="帐号余额" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
@@ -75,10 +76,10 @@
|
|
|
<el-dropdown-menu slot="dropdown" >
|
|
|
<el-dropdown-item >
|
|
|
<el-button style="margin:5px" v-if="scope.row.status === 1" size="small" icon="el-icon-close" plain type="info" @click="ModifyStatus(scope.row,2)">暂停</el-button>
|
|
|
- <el-button style="margin:5px" v-if="scope.row.status === 2" size="small" icon="el-icon-check" plain type="success" @click="ModifyStatus(scope.row,1)">有效</el-button>
|
|
|
+ <el-button style="margin:5px" v-if="scope.row.status === 2" size="small" icon="el-icon-check" plain type="success" @click="ModifyStatus(scope.row,1)">正常</el-button>
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item>
|
|
|
- <el-button style="margin:5px" size="small" icon="el-icon-edit" type="primary" plain @click="product(scope.row)">产品</el-button>
|
|
|
+ <el-button style="margin:5px" size="small" icon="el-icon-edit" type="primary" plain v-if="scope.row.status == 2 " @click="AddProduct(scope.row)">产品</el-button>
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item>
|
|
|
<el-button style="margin:5px" size="small" icon="el-icon-edit" type="warning" plain @click="ModifyEdit(scope.row)">编辑</el-button>
|
|
@@ -191,7 +192,7 @@
|
|
|
</el-row>
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
- <el-form-item label="是否有效" :label-width="formLabelWidth" >
|
|
|
+ <!-- <el-form-item label="是否有效" :label-width="formLabelWidth" >
|
|
|
<el-select size="small" v-model="dataForm.status">
|
|
|
<el-option
|
|
|
v-for="item in status"
|
|
@@ -200,12 +201,64 @@
|
|
|
:value="item.id"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
</div>
|
|
|
</el-card>
|
|
|
+ <el-card shadow="hover" v-if="!operation">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="topClass">客户银行账户信息</span>
|
|
|
+ <el-button style="float: right;" type="primary" plain @click="addCards(dataForm.supplierId)">添加银行卡</el-button>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <!-- 添加银行卡 -->
|
|
|
+ <el-table :data="dataForm.bankCards" >
|
|
|
+
|
|
|
+ <el-table-column label="银行卡" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <el-input v-model="scope.row.cardNo"></el-input>
|
|
|
+ <!-- <span v-else>{{ scope.row.cardNo }}</span> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="开户行" width="140" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.bankDeposit"></el-input>
|
|
|
+ <!-- <span v-else>{{ scope.row.bankDeposit }}</span> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="全称" width="170" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.account"></el-input>
|
|
|
+ <!-- <span v-else>{{ scope.row.bankDeposit }}</span> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="创建者" width="150" align="center" show-overflow-tooltip >
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-model="scope.row.creator"></el-input> -->
|
|
|
+ <span >{{ scope.row.creator }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="创建时间" align="center" show-overflow-tooltip >
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-if="editable[scope.$index]" @input="onBurl(scope.row.facePrice,scope.row.payPrice)" v-model="scope.row.creator"></el-input> -->
|
|
|
+ <i class="el-icon-time"></i>
|
|
|
+ <span >{{ scope.row.createTime }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="操作" width="165" min-width="150" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="danger" icon="el-icon-delete" @click="CardsDelete(scope.row,scope.$index,$event)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
@@ -213,14 +266,385 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+<!-- 查看对话框 -->
|
|
|
+ <el-dialog title="查看客户" width="85%" :visible.sync="dialogFormLook" center>
|
|
|
+ <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
|
|
|
+ <!-- 客户基本信息 -->
|
|
|
+ <el-card shadow="never" >
|
|
|
+ <!-- <el-card shadow="hover" > -->
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="topClass">客户基本信息</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="客户名称" :label-width="formLabelWidth" >
|
|
|
+ <el-input v-model="dataForm.customerName" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="授信额度" :label-width="formLabelWidth" >
|
|
|
+ <el-input disabled v-model="dataForm.creditAmount" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="账号余额" :label-width="formLabelWidth">
|
|
|
+ <el-input v-model="dataForm.balance" disabled />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="客户简称" :label-width="formLabelWidth">
|
|
|
+ <el-input v-model="dataForm.shorterName" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <!-- 客户服务联系人信息 -->
|
|
|
+ <el-card shadow="never" >
|
|
|
+ <!-- <el-card shadow="hover" > -->
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="topClass">客户服务联系人信息</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="联系人姓名" :label-width="formLabelWidth" >
|
|
|
+ <el-input v-model="dataForm.linkmanName" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="联系人电话" :label-width="formLabelWidth" >
|
|
|
+ <el-input v-model="dataForm.linkmanMobile" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="联系人邮箱" :label-width="formLabelWidth">
|
|
|
+ <el-input v-model="dataForm.linkmanEmail" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="联系人地址" :label-width="formLabelWidth" >
|
|
|
+ <el-input v-model="dataForm.address" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <!-- 其他 -->
|
|
|
+ <el-card shadow="never" >
|
|
|
+ <!-- <el-card shadow="hover" > -->
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="topClass">其他</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="代理商提成比例" :label-width="formLabelWidth" >
|
|
|
+ <el-input v-model="dataForm.partnerCommission" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="合作伙伴ID" :label-width="formLabelWidth" >
|
|
|
+ <el-input v-model="dataForm.partnerId" disabled />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="价格校验" :label-width="formLabelWidth">
|
|
|
+ <!-- <el-input v-model="dataForm.priceCheck" /> -->
|
|
|
+ <el-select size="small" disabled v-model="dataForm.priceCheck">
|
|
|
+ <el-option
|
|
|
+ v-for="item in priceCheck"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="是否有效" :label-width="formLabelWidth" >
|
|
|
+ <el-select size="small" disabled v-model="dataForm.status">
|
|
|
+ <el-option
|
|
|
+ v-for="item in status"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ <el-card shadow="hover" >
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="topClass">客户银行账户信息</span>
|
|
|
+ <!-- <el-button style="float: right;" type="primary" plain @click="addCards(dataForm.supplierId)">添加银行卡</el-button> -->
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <!-- 添加银行卡 -->
|
|
|
+ <el-table :data="dataForm.bankCards" >
|
|
|
+
|
|
|
+ <el-table-column label="银行卡" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-model="scope.row.cardNo"></el-input> -->
|
|
|
+ <span >{{ scope.row.cardNo }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="开户行" width="140" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- <el-input v-model="scope.row.bankDeposit"></el-input> -->
|
|
|
+ <span >{{ scope.row.bankDeposit }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="全称" width="170" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- <el-input v-model="scope.row.account"></el-input> -->
|
|
|
+ <span >{{ scope.row.account }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="创建者" width="150" align="center" show-overflow-tooltip >
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-model="scope.row.creator"></el-input> -->
|
|
|
+ <span >{{ scope.row.creator }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="创建时间" align="center" show-overflow-tooltip >
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-if="editable[scope.$index]" @input="onBurl(scope.row.facePrice,scope.row.payPrice)" v-model="scope.row.creator"></el-input> -->
|
|
|
+ <i class="el-icon-time"></i>
|
|
|
+ <span >{{ scope.row.createTime }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogFormLook = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="dialogFormLook = false">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 查看产品 -->
|
|
|
+ <el-dialog :title="productData.customerName+' 产品'" width="85%" :visible.sync="LookProduct" center>
|
|
|
+ <!-- 添加 -->
|
|
|
+ <el-table ref="multipleTable" :data="channelProductInfos" >
|
|
|
+
|
|
|
+
|
|
|
+ <el-table-column label="产品Id" align="center" width="100" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-model="scope.row.packageId"></el-input> -->
|
|
|
+ <span>{{ scope.row.packageId }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="客户产品名称" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-model="scope.row.channelProductName"></el-input> -->
|
|
|
+ <span >{{ scope.row.productName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="面额" width="100" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-model="scope.row.price"></el-input> -->
|
|
|
+ <span >{{ scope.row.facePrice }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="结算价格" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-model="scope.row.price"></el-input> -->
|
|
|
+ <span >{{ scope.row.price }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="折扣" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <div v-if="scope.row.disCount" >{{ ((scope.row.disCount ) * 100).toFixed(2)}} </div> -->
|
|
|
+ <div v-if="scope.row.disCount" >{{ parseFloat(scope.row.disCount * 100).toFixed(4)}} %</div>
|
|
|
+ <!-- <el-input v-model="scope.row.price"></el-input> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="是否有效" align="center" show-overflow-tooltip >
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <span v-if="scope.row.isEffective == 0">无效</span>
|
|
|
+ <span v-if="scope.row.isEffective == 1">有效</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="LookProduct = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="LookProduct = false">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 添加产品 -->
|
|
|
<el-dialog :title="productData.customerName+' 产品'" width="85%" :visible.sync="productShow" center>
|
|
|
- test
|
|
|
+ <el-form ref="infoForm" style="marginBottom:20px" :model="infoForm" :rules="rules2" label-width="80px" size="small" label-position="right">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="客户名称" prop="channelName" :label-width="formLabelWidth" >
|
|
|
+ <el-input v-model="productData.customerName" disabled placeholder="请输入产品" />
|
|
|
+ <!-- <span class="textSpan">{{productData.customerName}}</span> -->
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" :xs="24" :sm="12" :md="12" :lg="8">
|
|
|
+ <el-form-item label="折扣(%)" prop="discount" :label-width="formLabelWidth" >
|
|
|
+ <el-input v-model="infoForm.discount" placeholder="请输入折扣" @change="clicklong(infoForm.discount)" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <!-- 添加产品 -->
|
|
|
+ <el-card shadow="hover" >
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="topClass">客户产品信息</span>
|
|
|
+ <el-button style="float: right;" type="primary" plain @click="addprice(productData.customerId)">添加客户产品</el-button>
|
|
|
+ <el-button style="marginRight:20px;float: right;" type="success" plain @click="editpricing">结算价格批量定价</el-button>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <!-- 添加 -->
|
|
|
+ <el-table ref="multipleTable" :data="channelProductInfos" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ width="55">
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="产品Id" align="center" width="100" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-model="scope.row.packageId"></el-input> -->
|
|
|
+ <span>{{ scope.row.packageId }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+<!--
|
|
|
+ <el-table-column label="通道产品ID" width="150" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.channelProductId"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
+
|
|
|
+ <el-table-column label="客户产品名称" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-model="scope.row.channelProductName"></el-input> -->
|
|
|
+ <span >{{ scope.row.productName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="面额" width="100" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <el-input v-model="scope.row.price"></el-input> -->
|
|
|
+ <span >{{ scope.row.facePrice }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="结算价格" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <el-input v-model="scope.row.price"></el-input>
|
|
|
+ <!-- <span >{{ scope.row.account }}</span> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="折扣" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <!-- <div v-if="scope.row.disCount" >{{ ((scope.row.disCount ) * 100).toFixed(2)}} </div> -->
|
|
|
+ <div v-if="scope.row.disCount" >{{ parseFloat(scope.row.disCount * 100).toFixed(4)}} %</div>
|
|
|
+ <div v-else >{{ parseFloat(scope.row.price / scope.row.facePrice * 100).toFixed(4)}} %</div>
|
|
|
+ <!-- <el-input v-model="scope.row.price"></el-input> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="是否有效" align="center" show-overflow-tooltip >
|
|
|
+ <template slot-scope="scope" >
|
|
|
+ <el-select size="small" v-model="scope.row.isEffective" placeholder="请选择是否有效" style="width: 90%" >
|
|
|
+ <el-option
|
|
|
+ v-for="item in isEffective"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <!-- <span >{{ scope.row.aaa }}</span> -->
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="操作" width="165" min-width="150" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="danger" plain icon="el-icon-delete" @click="priceDelete(scope.row,scope.$index,$event)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-card>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="productShow = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="productSubmit">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <!-- 结算价格批量定价 -->
|
|
|
+ <el-dialog
|
|
|
+ title="结算价格批量定价"
|
|
|
+ :visible.sync="pricingVisible"
|
|
|
+ width="40%"
|
|
|
+ modal
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <div style="text-align:center;">
|
|
|
+ <el-input v-model="morePricing" @keyup.enter.native="pricingClike" style="width:200px"></el-input>
|
|
|
+ <span>
|
|
|
+ %
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <!-- <el-button @click="">取 消</el-button> -->
|
|
|
+ <el-button type="primary" @click="pricingClike">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 产品选择 -->
|
|
|
+ <el-dialog
|
|
|
+ title="添加产品"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="58%"
|
|
|
+ >
|
|
|
+ <div class="edit_dev">
|
|
|
+
|
|
|
+ <el-transfer
|
|
|
+ v-model="value"
|
|
|
+ filterable
|
|
|
+ :props="{
|
|
|
+ key: 'productId',
|
|
|
+ label: 'productName'
|
|
|
+ }"
|
|
|
+ :format="{
|
|
|
+ noChecked: '${total}',
|
|
|
+ hasChecked: '${checked}/${total}'
|
|
|
+ }"
|
|
|
+ :titles="['话费','话费']"
|
|
|
+ :data="data">
|
|
|
+ </el-transfer>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="clickeAddprice">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<!-- 分页 -->
|
|
|
<div class="pagination">
|
|
|
<el-pagination
|
|
@@ -249,9 +673,13 @@ export default {
|
|
|
size: 10,
|
|
|
current: 1
|
|
|
},
|
|
|
+ isEffective:[
|
|
|
+ {id:0,name:"无效"},
|
|
|
+ {id:1,name:"有效"}
|
|
|
+ ],
|
|
|
status:[
|
|
|
- {id:1,name:"正常"},
|
|
|
- {id:2,name:"暂停"}
|
|
|
+ {id:2,name:"正常"},
|
|
|
+ {id:1,name:"暂停"}
|
|
|
],
|
|
|
priceCheck:[
|
|
|
{id:0,name:"关闭"},
|
|
@@ -259,21 +687,34 @@ export default {
|
|
|
],
|
|
|
operation: false, // true:新增, false:编辑
|
|
|
dialogFormVisible: false, // 控制弹出框
|
|
|
+ pricingVisible:false, //批量折扣弹框
|
|
|
+ dialogFormLook:false, //查看弹框
|
|
|
+ LookProduct:false, //查看产品
|
|
|
+ dialogVisible:false,
|
|
|
formLabelWidth: '120px', //新增宽度
|
|
|
dataForm:{
|
|
|
userId:4,
|
|
|
+ },
|
|
|
+ infoForm:{
|
|
|
+
|
|
|
},
|
|
|
productShow:false,
|
|
|
productData:{}, // 产品查看时的基本数据的数据
|
|
|
rules2:{
|
|
|
shorterName: [{ required: true, message: '请输入客户简称', trigger: 'blur' }],
|
|
|
customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
|
|
|
+ discount: [{ required: true, message: '请输入折扣', trigger: 'blur' }],
|
|
|
},
|
|
|
loading:false,
|
|
|
total: 1,
|
|
|
tableData: [
|
|
|
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ morePricing:"",
|
|
|
+ data:[],
|
|
|
+ value:[],
|
|
|
+ batch:[], //批量所选的数据
|
|
|
+ channelProductInfos:[] //添加产品列表
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -292,7 +733,15 @@ export default {
|
|
|
ModifyEdit(row) {
|
|
|
this.operation = false
|
|
|
this.dialogFormVisible = true
|
|
|
- this.dataForm = row
|
|
|
+ if(row.bankCards == undefined){
|
|
|
+ //修改弹框时如果银行卡字段为undefined的时候赋值为空
|
|
|
+ row.bankCards = []
|
|
|
+ }
|
|
|
+ let newObj=JSON.parse(JSON.stringify(row))
|
|
|
+ this.dataForm = newObj
|
|
|
+ if(this.$refs['dataForm']){
|
|
|
+ this.$refs['dataForm'].resetFields();
|
|
|
+ }
|
|
|
},
|
|
|
ModifyDelete(row) {
|
|
|
this.$confirm('此操作将删除客户:' + row.customerName, '提示', {
|
|
@@ -331,14 +780,260 @@ export default {
|
|
|
this.total = res.data.data.total
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- product(row){
|
|
|
+ //获取产品信息
|
|
|
+ AddProduct(row){
|
|
|
this.productShow = true
|
|
|
this.productData = row
|
|
|
+ let info={
|
|
|
+ customerId:row.customerId,
|
|
|
+ type: 1, // 1:话费
|
|
|
+ }
|
|
|
+ api.index.paroductDetails(info).then((res)=>{
|
|
|
+ let list = res.data.data
|
|
|
+ list.map((res)=>{
|
|
|
+ res.price = (res.price / 10000).toFixed(4)
|
|
|
+ res.facePrice = res.facePrice / 10000
|
|
|
+ return res
|
|
|
+ })
|
|
|
+ this.channelProductInfos = list
|
|
|
+ })
|
|
|
+ this.infoForm={
|
|
|
+ discount:"100"
|
|
|
+ }
|
|
|
},
|
|
|
+ //查看弹框
|
|
|
+ hookLook(row){
|
|
|
+ console.log(row)
|
|
|
+ this.dialogFormLook = true
|
|
|
+ this.dataForm={
|
|
|
+
|
|
|
+ }
|
|
|
+ let newObj=JSON.parse(JSON.stringify(row))
|
|
|
+ this.dataForm = newObj
|
|
|
+ },
|
|
|
+ //查看产品
|
|
|
+ productLook(row){
|
|
|
+ this.productData = row
|
|
|
+ let info={
|
|
|
+ customerId:row.customerId,
|
|
|
+ type: 1, // 1:话费
|
|
|
+ }
|
|
|
+ api.index.paroductDetails(info).then((res)=>{
|
|
|
+ let list = res.data.data
|
|
|
+ list.map((res)=>{
|
|
|
+ res.price = (res.price / 10000).toFixed(4)
|
|
|
+ res.facePrice = res.facePrice / 10000
|
|
|
+ return res
|
|
|
+ })
|
|
|
+ this.channelProductInfos = list
|
|
|
+ })
|
|
|
+ this.LookProduct = true
|
|
|
+ },
|
|
|
+ //多选
|
|
|
+ handleSelectionChange(rows){
|
|
|
+ this.batch = rows
|
|
|
+ },
|
|
|
+ //结算价格批量定价
|
|
|
+ editpricing(){
|
|
|
+ console.log(this.batch)
|
|
|
+ if(this.batch.length == 0){
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: "请至少选择一项"
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.pricingVisible = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //折扣批量
|
|
|
+ pricingClike(){
|
|
|
+ // console.log(this.batch)
|
|
|
+ let morePricing = this.morePricing
|
|
|
+ let code = this.batch
|
|
|
+ if(!morePricing){
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: "请输入结算价格批量定价"
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ let info = []
|
|
|
+ let data = this.channelProductInfos
|
|
|
+ let arry= code.forEach((res)=>{
|
|
|
+ //结算价格 * 折扣(%) * 0.01
|
|
|
+ res.price=(res.facePrice * morePricing * 0.01).toFixed(4)
|
|
|
+ return res
|
|
|
+ })
|
|
|
+ this.pricingVisible = false
|
|
|
+
|
|
|
+ }
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
+ },
|
|
|
+ //新增产品
|
|
|
+ addprice(row){
|
|
|
+ api.index.userProduct(row).then(res=>{
|
|
|
+ let dataForm=this.channelProductInfos
|
|
|
+ let code = res.data.data
|
|
|
+ if(dataForm.length == 0){
|
|
|
+ this.data=code
|
|
|
+ }else{
|
|
|
+ // 去重产品
|
|
|
+ var set=dataForm.map(item=>item.productName)
|
|
|
+ var resArr=code.filter(item=>!set.includes(item.productName))
|
|
|
+ this.data=resArr
|
|
|
+ console.log(resArr)
|
|
|
+ }
|
|
|
+ // console.log(code)
|
|
|
+ this.dialogVisible = true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //确认产品
|
|
|
+ clickeAddprice(){
|
|
|
+ let customerId=this.productData.customerId
|
|
|
+ let value = this.value;
|
|
|
+ let data =this.data;
|
|
|
+ let code= value.map(item1=>{
|
|
|
+ let arry= data.map(item2=>{
|
|
|
+
|
|
|
+ if(item1 == item2.productId){
|
|
|
+ let form = {
|
|
|
+ customerId:customerId,
|
|
|
+ price : item2.productPrice,
|
|
|
+ facePrice : item2.productPrice,
|
|
|
+ productName:item2.productName,
|
|
|
+ packageId:item2.packageId,
|
|
|
+ isEffective:1,
|
|
|
+ type:1,
|
|
|
+ }
|
|
|
+ console.log(form)
|
|
|
+ // console.log(form)
|
|
|
+ this.channelProductInfos.push(form)
|
|
|
+ }
|
|
|
+ // return info
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.value = []
|
|
|
+ },
|
|
|
+ //添加银行卡
|
|
|
+ addCards(relationId){
|
|
|
+ this.dataForm.bankCards.push({
|
|
|
+ cardNo:"", //银行卡
|
|
|
+ bankDeposit:"", //开户行
|
|
|
+ account:'', //供应商账户
|
|
|
+ relationId:relationId,
|
|
|
+ distinguish:2
|
|
|
+ // creator:"" //创建者
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //删除银行卡
|
|
|
+ CardsDelete(row,index,e){
|
|
|
+ let relationId=this.dataForm.relationId
|
|
|
+ this.$confirm('此操作将删除:' + row.account, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ if(row.id){
|
|
|
+ let info = {
|
|
|
+ id:row.id
|
|
|
+ }
|
|
|
+ api.index.supplierDelete(row.id).then((res)=>{
|
|
|
+ this.dataForm.bankCards.splice(index,1)
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.dataForm.bankCards.splice(index,1)
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let target=e.target;
|
|
|
+ if(target.nodeName == 'SPAN' || target.nodeName == 'I'){
|
|
|
+ target = e.target.parentNode;
|
|
|
+ }
|
|
|
+ target.blur();
|
|
|
+ },
|
|
|
+ //文本框折扣编辑
|
|
|
+ clicklong(row){
|
|
|
+ let code = this.channelProductInfos
|
|
|
+ let info = []
|
|
|
+ let arry= code.forEach((res)=>{
|
|
|
+ //结算价格 * 折扣(%) * 0.01
|
|
|
+ res.price=(res.facePrice * row * 0.01).toFixed(4)
|
|
|
+ info.push(res)
|
|
|
+ })
|
|
|
+ this.channelProductInfos = info
|
|
|
+ console.log(info)
|
|
|
+ // console.log(number)
|
|
|
+ },
|
|
|
+ //API
|
|
|
productSubmit(){
|
|
|
- productShow = false
|
|
|
+ this.$refs['infoForm'].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ let channelProductInfos = this.channelProductInfos
|
|
|
+ // let row=channelProductInfos.map((res)=>{
|
|
|
+ // if(res.price > 10000){
|
|
|
+ // return res
|
|
|
+ // }else{
|
|
|
+ // res.price = res.price * 10000
|
|
|
+ // res.facePrice = res.facePrice * 10000
|
|
|
+ // return res
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ api.index.AddCustomer(channelProductInfos).then((res)=>{
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '操作成功'
|
|
|
+ })
|
|
|
+ this.productShow = false
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: res.data.msg
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
+ //产品删除
|
|
|
+ priceDelete(row,index,e){
|
|
|
+ this.$confirm('此操作将删除:' + row.productName, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+
|
|
|
+ if(row.customerProductId){
|
|
|
+ api.index.delectCustomer(row.customerProductId).then((res)=>{
|
|
|
+ this.channelProductInfos.splice(index,1)
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.channelProductInfos.splice(index,1)
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let target=e.target;
|
|
|
+ if(target.nodeName == 'SPAN' || target.nodeName == 'I'){
|
|
|
+ target = e.target.parentNode;
|
|
|
+ }
|
|
|
+ target.blur();
|
|
|
+ },
|
|
|
//新增或修改API
|
|
|
submitForm(){
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
@@ -392,7 +1087,7 @@ export default {
|
|
|
let code = JSON.parse(JSON.stringify(row))
|
|
|
code.status = i // 2:暂停 1:有效
|
|
|
api.index.update(code).then(response => {
|
|
|
- if (response.data.status === 200) {
|
|
|
+ if (response.status === 200) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: '操作成功'
|
|
@@ -409,7 +1104,7 @@ export default {
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
- message: '已取消删除'
|
|
|
+ message: '已取消'
|
|
|
});
|
|
|
});
|
|
|
|
|
@@ -437,4 +1132,8 @@ export default {
|
|
|
.el-card {
|
|
|
border: 0px solid #fff;
|
|
|
}
|
|
|
+
|
|
|
+.edit_dev >>> .el-transfer-panel {
|
|
|
+ width:250px;
|
|
|
+ }
|
|
|
</style>
|