Commit 80007896 authored by 我在何方's avatar 我在何方

添加品牌授权

parent 2ee167b2
...@@ -7,16 +7,16 @@ ...@@ -7,16 +7,16 @@
width="1080px" width="1080px"
:before-close="handleClose()"> :before-close="handleClose()">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="未授权客户" name="first"> <el-tab-pane :label="$t('未授权客户')" name="first">
<div class="brand"> <div class="brand">
<el-radio-group v-model="productBrank.unauthChargingModel" @change="changeModel"> <el-radio-group v-model="productBrank.unauthChargingModel" @change="changeModel">
<el-radio label="0">统一收费标准</el-radio> <el-radio label="0">{{$t('统一收费标准')}}</el-radio>
<el-radio label="1">针对客户收费标准</el-radio> <el-radio label="1">{{$t('针对客户收费标准')}}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div v-if="productBrank.unauthChargingModel==0" class="brand"> <div v-if="productBrank.unauthChargingModel==0" class="brand">
<span>针对所有未授权客户的收费模式</span> <span>{{$t('针对所有未授权客户的收费模式')}}</span>
<el-select v-model="productBrank.unauthDefaultFeeType" placeholder="请选择" size="small" style="margin-right: 10px;"> <el-select v-model="productBrank.unauthDefaultFeeType" :placeholder="$t('请选择')" size="small" style="margin-right: 10px;">
<el-option <el-option
v-for="(item,index) in feeType" v-for="(item,index) in feeType"
:key="index" :key="index"
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<el-button type="primary" @click="updateBrank">确定修改</el-button> <el-button type="primary" @click="updateBrank">{{$t('确定修改')}}</el-button>
</div> </div>
<el-form :inline="true" class="demo-form-inline"> <el-form :inline="true" class="demo-form-inline">
<el-form-item label="关键字"> <el-form-item :label="$t('关键字')">
<el-input v-model="list1QueryParams.customerKey" placeholder="请填入关键字"></el-input> <el-input v-model="list1QueryParams.customerKey" :placeholder="$t('请填入关键字')"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="filterCustomer">查询</el-button> <el-button type="primary" @click="filterCustomer">{{$t('查询')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -40,27 +40,27 @@ ...@@ -40,27 +40,27 @@
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="customerName" prop="customerName"
label="客户名称"> :label="$t('客户名称')">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="phone" prop="phone"
:formatter="(row, column, cellValue) => '+' + cellValue" :formatter="(row, column, cellValue) => '+' + cellValue"
label="客户号码"> :label="$t('客户号码')">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="feeScale" prop="feeScale"
label="收费类型"> :label="$t('收费类型')">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag v-if="productBrank.unauthChargingModel==1&&scope.row.feeScale" :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL" :value="scope.row.feeScale" /> <dict-tag v-if="productBrank.unauthChargingModel==1&&scope.row.feeScale" :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL" :value="scope.row.feeScale" />
<span v-else-if="productBrank.unauthDefaultFeeType">{{productBrank.unauthDefaultFeeType==1?'有牌价':'中性价'}}</span> <span v-else-if="productBrank.unauthDefaultFeeType">{{productBrank.unauthDefaultFeeType==1?$t('有牌价'):$t('中性价')}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="200px" width="200px"
label="操作"> :label="$t('操作')">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button type="primary" size="mini" @click="handleAdd(row)">添加授权</el-button> <el-button type="primary" size="mini" @click="handleAdd(row)">{{$t('添加授权')}}</el-button>
<el-button v-if="productBrank.unauthChargingModel=='1'" type="primary" size="mini" @click="editAdd(row)">修改收费</el-button> <el-button v-if="productBrank.unauthChargingModel=='1'" type="primary" size="mini" @click="editAdd(row)">{{$t('修改收费')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -69,26 +69,26 @@ ...@@ -69,26 +69,26 @@
<pagination v-show="total1 > 0" :total="total1" :page.sync="list1QueryParams.pageNo" :limit.sync="list1QueryParams.pageSize" <pagination v-show="total1 > 0" :total="total1" :page.sync="list1QueryParams.pageNo" :limit.sync="list1QueryParams.pageSize"
@pagination="getList1" style="height: 40px"/> @pagination="getList1" style="height: 40px"/>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="已授权客户" name="second"> <el-tab-pane :label="$t('已授权客户')" name="second">
<el-table <el-table
:data="list2" :data="list2"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="customerName" prop="customerName"
label="客户名称"> :label="$t('客户名称')">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="phone" prop="phone"
:formatter="(row, column, cellValue) => '+' + cellValue" :formatter="(row, column, cellValue) => '+' + cellValue"
label="客户号码"> :label="$t('客户号码')">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="fileUrl" prop="fileUrl"
label="授权证明"> :label="$t('授权证明')">
<template v-slot="{row}"> <template v-slot="{row}">
<div v-if="!!row.fileUrl && row.fileUrl.length > 0"> <div v-if="!!row.fileUrl && row.fileUrl.length > 0">
<span v-for="(item, index) in row.fileUrl.split(',')"> <span v-for="(item, index) in row.fileUrl.split(',')">
<a :href="item" target="_blank">附件{{ index + 1 }}</a>, <a :href="item" target="_blank">{{$t('附件')}}{{ index + 1 }}</a>,
</span> </span>
</div> </div>
</template> </template>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<el-table-column <el-table-column
prop="startTime" prop="startTime"
width="200px" width="200px"
label="授权时间"> :label="$t('授权时间')">
<template v-slot="{row}"> <template v-slot="{row}">
<span >{{row.startTime?(parseTime(row.startTime, '{y}-{m}-{d}') + ' - ' + parseTime(row.endTime, '{y}-{m}-{d}')):'永久'}}</span> <span >{{row.startTime?(parseTime(row.startTime, '{y}-{m}-{d}') + ' - ' + parseTime(row.endTime, '{y}-{m}-{d}')):'永久'}}</span>
</template> </template>
...@@ -105,17 +105,17 @@ ...@@ -105,17 +105,17 @@
<el-table-column <el-table-column
prop="feeScale" prop="feeScale"
:formatter="(row) => getDictDataLabel(DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL, row.feeScale)" :formatter="(row) => getDictDataLabel(DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL, row.feeScale)"
label="收费标准"> :label="$t('收费标准')">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createUsername" prop="createUsername"
label="添加人"> :label="$t('添加人')">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="100px" width="100px"
label="操作"> :label="$t('操作')">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button type="danger" size="mini" @click="handleDelete(row.id)">删除</el-button> <el-button type="danger" size="mini" @click="handleDelete(row.id)">{{$t('删除')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -128,16 +128,16 @@ ...@@ -128,16 +128,16 @@
<!-- 添加弹窗 --> <!-- 添加弹窗 -->
<el-dialog <el-dialog
title="添加" :title="$t('添加')"
:visible.sync="addDialog.dialogVisible" :visible.sync="addDialog.dialogVisible"
width="600px"> width="600px">
<el-form ref="form" :model="addDialog.form" label-width="80px"> <el-form ref="form" :model="addDialog.form" label-width="80px">
<el-form-item label="客户名称">{{ addDialog.form.customerName }}</el-form-item> <el-form-item :label="$t('客户名称')">{{ addDialog.form.customerName }}</el-form-item>
<el-form-item label="收费模式"> <el-form-item :label="$t('收费模式')">
<dict-selector v-model="addDialog.form.authType" :type="DICT_TYPE.ECW_AUTH_TYPE"></dict-selector> <dict-selector v-model="addDialog.form.authType" :type="DICT_TYPE.ECW_AUTH_TYPE"></dict-selector>
</el-form-item> </el-form-item>
<el-form-item label="授权时间" v-if="addDialog.form.authType==1"> <el-form-item :label="$t('授权时间')" v-if="addDialog.form.authType==1">
<!-- <el-date-picker <!-- <el-date-picker
v-model="addDialog.dateRange" v-model="addDialog.dateRange"
@chang="handleDatePick" @chang="handleDatePick"
...@@ -148,31 +148,31 @@ ...@@ -148,31 +148,31 @@
end-placeholder="结束日期"> end-placeholder="结束日期">
</el-date-picker> --> </el-date-picker> -->
<el-date-picker clearable v-model="addDialog.form.startTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('请选择开始日期')" /> <el-date-picker clearable v-model="addDialog.form.startTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('请选择开始日期')" />
<span style="margin: 0 8px;"></span> <span style="margin: 0 8px;">{{$t('')}}</span>
<el-date-picker clearable v-model="addDialog.form.endTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('请选择结束日期')" /> <el-date-picker clearable v-model="addDialog.form.endTime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" type="datetime" :placeholder="$t('请选择结束日期')" />
</el-form-item> </el-form-item>
<el-form-item label="收费模式"> <el-form-item :label="$t('收费模式')">
<dict-selector v-model="addDialog.form.feeScale" :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL"></dict-selector> <dict-selector v-model="addDialog.form.feeScale" :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL"></dict-selector>
</el-form-item> </el-form-item>
<el-form-item label="授权证明"> <el-form-item :label="$t('授权证明')">
<file-upload v-model="addDialog.form.fileUrl"></file-upload> <file-upload v-model="addDialog.form.fileUrl"></file-upload>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="addDialog.dialogVisible = false"> </el-button> <el-button @click="addDialog.dialogVisible = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="handleAddSubmit"> </el-button> <el-button type="primary" @click="handleAddSubmit">{{$t('确定')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 添加弹窗 --> <!-- 添加弹窗 -->
<el-dialog <el-dialog
title="修改单个客户收费模式" :title="$t('修改单个客户收费模式')"
:visible.sync="editDialog.dialogVisible" :visible.sync="editDialog.dialogVisible"
width="500px"> width="500px">
<el-form ref="form" :model="editDialog.form" label-width="80px"> <el-form ref="form" :model="editDialog.form" label-width="80px">
<el-form-item label="客户名称">{{ editDialog.customerName }}</el-form-item> <el-form-item :label="$t('客户名称')">{{ editDialog.customerName }}</el-form-item>
<el-form-item label="收费模式"> <el-form-item :label="$t('收费模式')">
<el-select v-model="editDialog.form.feeScale" placeholder="请选择" size="small" style="margin-right: 10px;"> <el-select v-model="editDialog.form.feeScale" :placeholder="$t('请选择')" size="small" style="margin-right: 10px;">
<el-option <el-option
v-for="item in feeType" v-for="item in feeType"
:key="item.value" :key="item.value"
...@@ -184,8 +184,8 @@ ...@@ -184,8 +184,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleEditSubmit"> </el-button> <el-button type="primary" @click="handleEditSubmit">{{$t('确定修改')}}</el-button>
<el-button @click="editDialog.dialogVisible = false"> </el-button> <el-button @click="editDialog.dialogVisible = false">{{$t('关闭窗口')}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -233,10 +233,10 @@ export default { ...@@ -233,10 +233,10 @@ export default {
list1: [], list1: [],
list2: [], list2: [],
feeType:[{ feeType:[{
label:'有牌价', label:this.$t('有牌价'),
value:1 value:1
},{ },{
label:'中性价', label:this.$t('中性价'),
value:2 value:2
}], }],
unauthChargingModel:0, unauthChargingModel:0,
...@@ -345,7 +345,7 @@ export default { ...@@ -345,7 +345,7 @@ export default {
this.getList1() this.getList1()
this.getList2() this.getList2()
this.getBrank() this.getBrank()
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess(this.$t("修改成功"));
}) })
}, },
changeModel(){ changeModel(){
...@@ -367,9 +367,9 @@ export default { ...@@ -367,9 +367,9 @@ export default {
this.editDialog.dialogVisible = true this.editDialog.dialogVisible = true
}, },
handleDelete(id) { handleDelete(id) {
this.$confirm('确认删除该用户的授权?', '提示', { this.$confirm(this.$t('确认删除该用户的授权')+'?', this.$t('提示'), {
confirmButtonText: '确定', confirmButtonText: this.$t('确定'),
cancelButtonText: '取消', cancelButtonText: this.$t('取消'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
deleteProductBrandEmpower(id).then(r => { deleteProductBrandEmpower(id).then(r => {
...@@ -377,13 +377,13 @@ export default { ...@@ -377,13 +377,13 @@ export default {
this.getList2() this.getList2()
this.$message({ this.$message({
type: 'success', type: 'success',
message: '撤销授权成功!' message: this.$t('撤销授权成功')
}); });
}) })
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消删除' message: this.$t('已取消删除')
}); });
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment