|
@@ -108,6 +108,14 @@
|
|
@click="openRetailRate"
|
|
@click="openRetailRate"
|
|
v-hasPermi="['personnelMr:personnelMr:RetailRate']"
|
|
v-hasPermi="['personnelMr:personnelMr:RetailRate']"
|
|
>批量设置佣金税率</el-button>
|
|
>批量设置佣金税率</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ type="warning"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-s-tools"
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="openAmountRate"
|
|
|
|
+ v-hasPermi="['personnelMr:personnelMr:AmountRate']"
|
|
|
|
+ >批量设置佣金比例</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -146,7 +154,12 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="签约商户号" align="center" prop="unionMid" />
|
|
<el-table-column label="签约商户号" align="center" prop="unionMid" />
|
|
<el-table-column label="签约失败原因" align="center" prop="unionErrReason" />
|
|
<el-table-column label="签约失败原因" align="center" prop="unionErrReason" />
|
|
- <el-table-column label="佣金税率" align="center" prop="type">
|
|
|
|
|
|
+ <el-table-column label="佣金比例" align="center" prop="retailAmountRatio">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{ scope.row.retailAmountRatio }}%</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="佣金税率" align="center" prop="retailRate">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span>{{ scope.row.retailRate }}%</span>
|
|
<span>{{ scope.row.retailRate }}%</span>
|
|
</template>
|
|
</template>
|
|
@@ -339,6 +352,7 @@
|
|
width="650px"
|
|
width="650px"
|
|
:destroy-on-close="true"
|
|
:destroy-on-close="true"
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
|
|
+ @close="closeRetailRate"
|
|
>
|
|
>
|
|
<el-form :model="retailRateForm" ref="retailRateForm" :rules="retailRateFormRules" label-width="120px">
|
|
<el-form :model="retailRateForm" ref="retailRateForm" :rules="retailRateFormRules" label-width="120px">
|
|
<el-form-item label="佣金税率设置" prop="retailRate">
|
|
<el-form-item label="佣金税率设置" prop="retailRate">
|
|
@@ -355,7 +369,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button @click="showRetailRate = false">取消</el-button>
|
|
|
|
|
|
+ <el-button @click="closeRetailRate">取消</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
@click="submitRetailRateForm"
|
|
@click="submitRetailRateForm"
|
|
@@ -369,6 +383,44 @@
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <!-- 佣金比例设置 -->
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="佣金比例设置"
|
|
|
|
+ :visible.sync="isShowRate"
|
|
|
|
+ width="650px"
|
|
|
|
+ :destroy-on-close="true"
|
|
|
|
+ :close-on-click-modal="false"
|
|
|
|
+ @close="closeShowRate"
|
|
|
|
+ >
|
|
|
|
+ <el-form :model="rateForm" ref="rateForm" :rules="rateFormRules" label-width="120px">
|
|
|
|
+ <el-form-item label="佣金比例设置" prop="retailAmountRatio">
|
|
|
|
+ <el-input
|
|
|
|
+ type="number"
|
|
|
|
+ v-model="rateForm.retailAmountRatio"
|
|
|
|
+ placeholder="请输入佣金比例"
|
|
|
|
+ clearable
|
|
|
|
+ @change="retailAmountRatioChange"
|
|
|
|
+ style="width: 260px;"
|
|
|
|
+ >
|
|
|
|
+ <template slot="append">%</template>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="closeShowRate">取消</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="submitRateForm"
|
|
|
|
+ v-loading.fullscreen.lock="loading"
|
|
|
|
+ element-loading-text="请等待..."
|
|
|
|
+ element-loading-spinner="el-icon-loading"
|
|
|
|
+ element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
|
+ >
|
|
|
|
+ <span v-if="loading">提交中...</span>
|
|
|
|
+ <span v-else>保存</span>
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
|
|
<!-- 推广链接内容设置 -->
|
|
<!-- 推广链接内容设置 -->
|
|
<linkSetVue ref="linkSetVue" @refresh="getList" />
|
|
<linkSetVue ref="linkSetVue" @refresh="getList" />
|
|
@@ -383,8 +435,9 @@ import {
|
|
updateStatus,
|
|
updateStatus,
|
|
configUpdate,
|
|
configUpdate,
|
|
getSetInfo,
|
|
getSetInfo,
|
|
- getRetailQrcode ,
|
|
|
|
|
|
+ getRetailQrcode,
|
|
batchUpdateRetailRate,
|
|
batchUpdateRetailRate,
|
|
|
|
+ batchUpdateRate,
|
|
downOrderListXls,
|
|
downOrderListXls,
|
|
updateQrStatusApi
|
|
updateQrStatusApi
|
|
} from '@/api/distribution/personnelMr'
|
|
} from '@/api/distribution/personnelMr'
|
|
@@ -492,6 +545,13 @@ export default {
|
|
],
|
|
],
|
|
},
|
|
},
|
|
handleExportLoading: false,
|
|
handleExportLoading: false,
|
|
|
|
+ isShowRate: false,
|
|
|
|
+ rateForm: {ids:[],retailAmountRatio:undefined},
|
|
|
|
+ rateFormRules: {
|
|
|
|
+ retailAmountRatio: [
|
|
|
|
+ { required: true, message: '请输入佣金比例', trigger: ['change','blur'] },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -568,9 +628,55 @@ export default {
|
|
this.$message.warning("请选择分销商");
|
|
this.$message.warning("请选择分销商");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- console.log('ids',this.ids)
|
|
|
|
|
|
+ // console.log('ids',this.ids)
|
|
this.showRetailRate = true;
|
|
this.showRetailRate = true;
|
|
},
|
|
},
|
|
|
|
+ // 佣金比例输入事件
|
|
|
|
+ retailAmountRatioChange(value) {
|
|
|
|
+ // 检查输入值是否大于0
|
|
|
|
+ if (value <= 0) {
|
|
|
|
+ // 如果小于等于0,则将输入值置为0
|
|
|
|
+ this.rateForm.retailAmountRatio = 0;
|
|
|
|
+ } else {
|
|
|
|
+ // 如果大于0,则保留输入值
|
|
|
|
+ this.rateForm.retailAmountRatio = value;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 佣金比例设置
|
|
|
|
+ openAmountRate() {
|
|
|
|
+ if(this.ids.length == 0){
|
|
|
|
+ this.$message.warning("请选择分销商");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.isShowRate = true;
|
|
|
|
+ },
|
|
|
|
+ // 关闭弹框
|
|
|
|
+ closeShowRate() {
|
|
|
|
+ this.isShowRate = false;
|
|
|
|
+ this.rateForm={ids:[],retailAmountRatio:undefined};
|
|
|
|
+ },
|
|
|
|
+ // 佣金税率设置
|
|
|
|
+ submitRateForm(){
|
|
|
|
+ this.rateForm.ids = this.ids;
|
|
|
|
+ this.$refs["rateForm"].validate(async (valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ try {
|
|
|
|
+ this.loading = true;
|
|
|
|
+ const { code } = await batchUpdateRate({ ...this.rateForm });
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ this.setLoading = false;
|
|
|
|
+ this.$message.success("操作成功!");
|
|
|
|
+ this.getList();
|
|
|
|
+ this.rateForm={ids:[],retailAmountRatio:undefined};
|
|
|
|
+ this.isShowRate = false;
|
|
|
|
+ }
|
|
|
|
+ } catch (error) {
|
|
|
|
+ } finally {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
/** 海报设置按钮操作 */
|
|
/** 海报设置按钮操作 */
|
|
codeSet() {
|
|
codeSet() {
|
|
this.$refs["promotionCode"].openDialog("海报设置", null);
|
|
this.$refs["promotionCode"].openDialog("海报设置", null);
|
|
@@ -645,6 +751,11 @@ export default {
|
|
this.retailRateForm.retailRate = value;
|
|
this.retailRateForm.retailRate = value;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 关闭弹框
|
|
|
|
+ closeRetailRate() {
|
|
|
|
+ this.retailRateForm={ids:[],retailRate:undefined};
|
|
|
|
+ this.showRetailRate = false;
|
|
|
|
+ },
|
|
// 佣金税率设置
|
|
// 佣金税率设置
|
|
submitRetailRateForm(){
|
|
submitRetailRateForm(){
|
|
this.retailRateForm.ids = this.ids;
|
|
this.retailRateForm.ids = this.ids;
|