|
@@ -13,8 +13,10 @@
|
|
|
</div>
|
|
|
<div class="flexend">
|
|
|
<el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
|
|
|
- <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="Search">新增</el-button>
|
|
|
+ <el-button class="classitem" style="marginRight:50px" type="primary" plain icon="el-icon-plus" @click="dataFormAdd">新增</el-button>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 表格数据 -->
|
|
|
<el-table v-loading="loading" :data="tableData" border style="width: 100%">
|
|
|
|
|
|
<el-table-column label="通道ID" align="center" show-overflow-tooltip>
|
|
@@ -25,7 +27,7 @@
|
|
|
|
|
|
<el-table-column label="通道名称" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope" @click="hookLook(scope.row)">
|
|
|
- <span @click="hookLook(scope.row)">{{ scope.row.channelName }}</span>
|
|
|
+ <el-button type="text" @click="hookLook(scope.row)">{{ scope.row.channelName }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
@@ -43,14 +45,14 @@
|
|
|
|
|
|
<el-table-column label="是否有效" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-tag v-if="scope.row.isValid==0" size="warning">无效</el-tag>
|
|
|
+ <el-tag v-if="scope.row.isValid==0" type="danger" size="warning">无效</el-tag>
|
|
|
<el-tag v-if="scope.row.isValid==1" size="small">有效</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="供应商编码" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column label="供应商名称" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.supplierId }}</span>
|
|
|
+ <span>{{ scope.row.supplierName }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
@@ -65,7 +67,7 @@
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
-
|
|
|
+ <!-- 分页 -->
|
|
|
<div class="pagination">
|
|
|
<el-pagination
|
|
|
current-page.sync="body.current"
|
|
@@ -79,6 +81,254 @@
|
|
|
@current-change="handleCurrentChange"
|
|
|
/>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 新增与修改 -->
|
|
|
+ <el-dialog :title="operation?'新增通道':'编辑通道'" :visible.sync="dialogFormVisible" width="85%" center>
|
|
|
+ <el-form ref="dataForm" :model="dataForm" :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="通道名称" :label-width="formLabelWidth" >
|
|
|
+ <el-input v-model="dataForm.channelName" placeholder="请输入供应商ID" />
|
|
|
+ </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.supplierName" placeholder="请输入供应商名称" />
|
|
|
+ </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-select size="small" v-model="body.phoneOperator" clearable placeholder="请选择运营商" style="width: 100%" >
|
|
|
+ <el-option
|
|
|
+ v-for="item in mobileOperator"
|
|
|
+ :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" prop="isValid" >
|
|
|
+ <el-select size="small" v-model="dataForm.isValid" placeholder="请选择是否有效" style="width: 100%" >
|
|
|
+ <el-option
|
|
|
+ v-for="item in status"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </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.discount" placeholder="请输入折扣" />
|
|
|
+ </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.remark" placeholder="请输入备注" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <!-- -->
|
|
|
+ <el-card shadow="hover" >
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="topClass">通道产品信息</span>
|
|
|
+ <el-button style="float: right;" type="primary" plain @click="addprice">添加通道产品</el-button>
|
|
|
+ <el-button style="marginRight:20px;float: right;" type="success" plain @click="addprice">结算价格批量定价</el-button>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <!-- 添加 -->
|
|
|
+ <el-table :data="dataForm.bankCards" >
|
|
|
+
|
|
|
+ <el-table-column label="话费名称" width="210" 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="通道产品ID" width="150" 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="150" 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.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.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)">删除</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>
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 产品选择 -->
|
|
|
+ <el-dialog
|
|
|
+ title="添加产品"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="60%"
|
|
|
+ >
|
|
|
+ <div class="edit_dev">
|
|
|
+
|
|
|
+ <el-transfer
|
|
|
+ v-model="value"
|
|
|
+ filterable
|
|
|
+ :props="{
|
|
|
+ key: 'packageName',
|
|
|
+ label: 'packageName'
|
|
|
+ }"
|
|
|
+ :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="dialogVisible = false">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <!-- 查看 -->
|
|
|
+ <el-dialog title="详情" :visible.sync="dialogFormLook" width="85%" center>
|
|
|
+ <el-form ref="dataForm" :model="dataForm" :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="通道名称" :label-width="formLabelWidth" >
|
|
|
+ <el-input v-model="dataForm.supplierCode" placeholder="请输入供应商ID" />
|
|
|
+ </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.channelName" placeholder="请输入供应商名称" />
|
|
|
+ </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.email" placeholder="请选择适用区域" />
|
|
|
+ </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" prop="isValid" >
|
|
|
+ <el-select size="small" v-model="dataForm.isValid" placeholder="请选择是否有效" style="width: 90%" >
|
|
|
+ <el-option
|
|
|
+ v-for="item in status"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </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.discount" placeholder="请输入折扣" />
|
|
|
+ </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.remark" placeholder="请输入备注" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-card shadow="hover" >
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span class="topClass">通道产品信息</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <!-- 添加 -->
|
|
|
+ <el-table :data="dataForm.bankCards" >
|
|
|
+
|
|
|
+ <el-table-column label="银行卡" width="210" 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="150" 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="150" 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.aaa }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="创建时间" width="150" 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" plain icon="el-icon-delete" @click="priceDelete(scope.row,scope.$index)">删除</el-button>
|
|
|
+ </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>
|
|
|
+
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
@@ -94,8 +344,32 @@ export default {
|
|
|
current:1,
|
|
|
channelName:""
|
|
|
},
|
|
|
+ data:[{id:1,creator:"wangdz",createTime:"2020-12-11 22:21:32",updator:"",updateTime:null,packageId:"DXHF1",packageName:"全国电信话费卡_1元",operatorCode:"DX",oprPackageId:"DXHF",activePeriod:6,flowAmount:1.0,zone:"00",zoneDesc:"全国",comboPackageStr:"",isCombo:"2"},{id:2,creator:"wangdz",createTime:"2020-12-11 22:21:32",updator:"",updateTime:null,packageId:"DXHF1",packageName:"全国电信话费卡_12元",operatorCode:"DX",oprPackageId:"DXHF",activePeriod:20,flowAmount:1.0,zone:"00",zoneDesc:"全国",comboPackageStr:"",isCombo:"2"},{id:3,creator:"wangdz",createTime:"2020-12-11 22:21:32",updator:"",updateTime:null,packageId:"DXHF1",packageName:"全国电信话费卡_13元",operatorCode:"DX",oprPackageId:"DXHF",activePeriod:3,flowAmount:1.0,zone:"00",zoneDesc:"全国",comboPackageStr:"",isCombo:"2"},{id:4,creator:"wangdz",createTime:"2020-12-11 22:21:32",updator:"",updateTime:null,packageId:"DXHF1",packageName:"全国电信话费卡_14元",operatorCode:"DX",oprPackageId:"DXHF",activePeriod:5,flowAmount:1.0,zone:"00",zoneDesc:"全国",comboPackageStr:"",isCombo:"2"},{id:5,creator:"wangdz",createTime:"2020-12-11 22:21:32",updator:"",updateTime:null,packageId:"DXHF1",packageName:"全国电信话费卡_15元",operatorCode:"DX",oprPackageId:"DXHF",activePeriod:6,flowAmount:1.0,zone:"00",zoneDesc:"全国",comboPackageStr:"",isCombo:"2"},{id:6,creator:"wangdz",createTime:"2020-12-11 22:21:32",updator:"",updateTime:null,packageId:"DXHF1",packageName:"全国电信话费卡_16元",operatorCode:"DX",oprPackageId:"DXHF",activePeriod:5,flowAmount:1.0,zone:"00",zoneDesc:"全国",comboPackageStr:"",isCombo:"2"}],
|
|
|
+ value: [],
|
|
|
tableData:[],
|
|
|
- total:0
|
|
|
+ total:0,
|
|
|
+ operation: false, // true:新增, false:编辑
|
|
|
+ dialogVisible:false, //新增产品
|
|
|
+ dialogFormVisible: false, // 控制弹出框
|
|
|
+ dialogFormLook:false, //查看弹出框
|
|
|
+ formLabelWidth: '100px', //新增宽度
|
|
|
+ loading:false,
|
|
|
+ dataForm:{
|
|
|
+
|
|
|
+ },
|
|
|
+ mobileOperator:[
|
|
|
+ {id:1,name:"移动"},
|
|
|
+ {id:3,name:"联通"},
|
|
|
+ {id:2,name:"电信"},
|
|
|
+ ],
|
|
|
+ rules2:[],
|
|
|
+ status:[{
|
|
|
+ id:1,
|
|
|
+ name:"有效"
|
|
|
+ },{
|
|
|
+ id:0,
|
|
|
+ name:"无效"
|
|
|
+ }],
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -111,7 +385,60 @@ export default {
|
|
|
this.total = res.data.data.total
|
|
|
})
|
|
|
},
|
|
|
+ //新增弹框
|
|
|
+ dataFormAdd(){
|
|
|
+ this.operation = true // true:新增, false:编辑
|
|
|
+ this.dialogFormVisible = true // 控制弹出框
|
|
|
+ },
|
|
|
+ //编辑弹框
|
|
|
+ handleEdit(row){
|
|
|
+ this.operation = true // true:新增, false:编辑
|
|
|
+ this.dataForm = row
|
|
|
+ this.dialogFormVisible = true // 控制弹出框
|
|
|
+ },
|
|
|
+ //删除API
|
|
|
+ ModifyDelete(row){
|
|
|
+ const that = this
|
|
|
+ that.$confirm('此操作将删除该通道, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ api.channelDelete(row.channelId).then((res)=>{
|
|
|
+ if (response.status === 200) {
|
|
|
+ that.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功'
|
|
|
+ })
|
|
|
+ that.Search()
|
|
|
+ } else {
|
|
|
+ that.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: response.data.msg
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //查看弹框
|
|
|
+ hookLook(row){
|
|
|
+ console.log(row)
|
|
|
+ this.dialogFormLook = true
|
|
|
+ this.dataForm={
|
|
|
|
|
|
+ }
|
|
|
+ let newObj=JSON.parse(JSON.stringify(row))
|
|
|
+ this.dataForm = newObj
|
|
|
+ },
|
|
|
+ //新增和修改API
|
|
|
+ submitForm(){
|
|
|
+
|
|
|
+ },
|
|
|
+ //新增产品
|
|
|
+ addprice(){
|
|
|
+ this.dialogVisible = true
|
|
|
+ },
|
|
|
// 搜索
|
|
|
Search(){
|
|
|
this.body.current = 1
|
|
@@ -121,19 +448,7 @@ export default {
|
|
|
ModifyState(operator){
|
|
|
operator.isValid ^= 1
|
|
|
},
|
|
|
- // 删除
|
|
|
- ModifyDelete(operator){
|
|
|
-
|
|
|
- },
|
|
|
- // 编辑
|
|
|
- handleEdit(){
|
|
|
-
|
|
|
- },
|
|
|
- // 查看详细
|
|
|
- hookLook(){
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
handleSizeChange: function(val) {
|
|
@@ -148,7 +463,7 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style scoped>
|
|
|
.flex{
|
|
|
width: 90%;
|
|
|
display: flex;
|
|
@@ -166,4 +481,11 @@ export default {
|
|
|
/* margin: 0 auto; */
|
|
|
padding-bottom: 20px;
|
|
|
}
|
|
|
+.el-card {
|
|
|
+ border: 0px solid #e6ebf5;
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
+.edit_dev >>> .el-transfer-panel {
|
|
|
+ width:250px;
|
|
|
+ }
|
|
|
</style>
|