Commit c1f9694e by yuzhenWang

Merge branch 'feature-20251125wyz-做产品上架' into 'test'

Feature 20251125wyz 做产品上架

See merge request !9
parents 1b3b4d75 3270a8b4
......@@ -3,19 +3,31 @@
<el-row style="margin-bottom: 20px">
<el-col style="display: flex; justify-content: space-between">
<div>
<el-button type="primary" plain icon="Refresh" @click="updateSpecies('update')">更新规格</el-button>
<el-button type="primary" plain icon="Refresh" @click="updateSpecies('update')"
>更新规格</el-button
>
</div>
</el-col>
</el-row>
<el-table :data="tableData" :span-method="objectSpanMethod" border style="width: 100%; margin-top: 20px"
row-key="rowKey">
<el-table
:data="tableData"
:span-method="objectSpanMethod"
border
style="width: 100%; margin-top: 20px"
row-key="rowKey"
>
<!-- 动态生成所有列 -->
<template v-for="column in tableColumns" :key="column.prop">
<el-table-column :prop="column.prop" :label="column.label" />
</template>
<!-- 固定操作列 -->
<el-table-column label="操作" :width="tableData.length > 0 ? 180 : 0" align="center" fixed="right">
<el-table-column
label="操作"
:width="tableData.length > 0 ? 180 : 0"
align="center"
fixed="right"
>
<template #default="scope">
<el-button type="primary" size="small" @click="handleCommissionSetting(scope.row)">
佣金设置
......@@ -23,21 +35,43 @@
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
@pagination="getSpeciesList" style="margin-top: 10px" />
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getSpeciesList"
style="margin-top: 10px"
/>
<!-- 佣金设置 -->
<el-dialog title="佣金设置" v-model="showCommisionSetting" width="1200px" append-to-body :close-on-click-modal="false">
<el-dialog
title="佣金设置"
v-model="showCommisionSetting"
width="1200px"
append-to-body
:close-on-click-modal="false"
>
<!-- 表格数据 -->
<el-table v-loading="settingLoading" :data="settingList" border ref="settingTableRef">
<el-table-column label="序号 " width="55" align="center" type="index" fixed="left"></el-table-column>
<el-table-column
label="序号 "
width="55"
align="center"
type="index"
fixed="left"
></el-table-column>
<el-table-column label="费用名称" prop="expenseName" width="150" fixed="left">
<template #header>
<span class="required-label">费用名称</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.expenseName" placeholder="请选择">
<el-option v-for="item in commission_cost_type" :key="item.value" :label="item.label"
:value="item.value" />
<el-option
v-for="item in commission_cost_type"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
......@@ -46,9 +80,15 @@
<span class="required-label">佣金年限(起)</span>
</template>
<template #default="scope">
<el-input v-model="scope.row.startPeriod" type="number" placeholder="请输入" :min="1" clearable
<el-input
v-model="scope.row.startPeriod"
type="number"
placeholder="请输入"
:min="1"
clearable
@input="handleNumberInput(scope.row, 'startPeriod', 'positive')"
@blur="handlePeriodBlur(scope.row, scope.$index, 'startPeriod')" />
@blur="handlePeriodBlur(scope.row, scope.$index, 'startPeriod')"
/>
</template>
</el-table-column>
<el-table-column label="佣金年限(止)" prop="endPeriod" width="120">
......@@ -56,9 +96,15 @@
<span class="required-label">佣金年限(止)</span>
</template>
<template #default="scope">
<el-input v-model="scope.row.endPeriod" type="number" :min="1" placeholder="请输入" clearable
<el-input
v-model="scope.row.endPeriod"
type="number"
:min="1"
placeholder="请输入"
clearable
@input="handleNumberInput(scope.row, 'endPeriod', 'positive')"
@blur="handlePeriodBlur(scope.row, scope.$index, 'endPeriod')" />
@blur="handlePeriodBlur(scope.row, scope.$index, 'endPeriod')"
/>
</template>
</el-table-column>
......@@ -67,8 +113,14 @@
<span class="required-label">佣金率(%)</span>
</template>
<template #default="scope">
<el-input v-model="scope.row.commissionRate" type="number" :min="0" placeholder="请输入" clearable
@input="handleNumberInput(scope.row, 'commissionRate', 'non-negative')" />
<el-input
v-model="scope.row.commissionRate"
type="number"
:min="0"
placeholder="请输入"
clearable
@input="handleNumberInput(scope.row, 'commissionRate', 'non-negative')"
/>
</template>
</el-table-column>
<el-table-column label="折标系数(%)" prop="discountRatio" width="120">
......@@ -76,8 +128,14 @@
<span class="required-label">折标系数(%)</span>
</template>
<template #default="scope">
<el-input v-model="scope.row.discountRatio" type="number" :min="0" placeholder="请输入" clearable
@input="handleNumberInput(scope.row, 'discountRatio', 'non-negative')" />
<el-input
v-model="scope.row.discountRatio"
type="number"
:min="0"
placeholder="请输入"
clearable
@input="handleNumberInput(scope.row, 'discountRatio', 'non-negative')"
/>
</template>
</el-table-column>
<el-table-column label="生效日期(起)" prop="effectiveStart" width="150">
......@@ -85,8 +143,15 @@
<span class="required-label">生效日期(起)</span>
</template>
<template #default="scope">
<el-date-picker v-model="scope.row.effectiveStart" style="width: 100%" type="date" placeholder="请选择日期"
format="YYYY-MM-DD" value-format="YYYY-MM-DD" @change="handleStartDateChange(scope.row, scope.$index)" />
<el-date-picker
v-model="scope.row.effectiveStart"
style="width: 100%"
type="date"
placeholder="请选择日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@change="handleStartDateChange(scope.row, scope.$index)"
/>
</template>
</el-table-column>
<el-table-column label="生效日期(止)" prop="effectiveEnd" width="150">
......@@ -94,8 +159,15 @@
<span class="required-label">生效日期(止)</span>
</template>
<template #default="scope">
<el-date-picker v-model="scope.row.effectiveEnd" style="width: 100%" type="date" placeholder="请选择日期"
format="YYYY-MM-DD" value-format="YYYY-MM-DD" @change="handleEndDateChange(scope.row, scope.$index)" />
<el-date-picker
v-model="scope.row.effectiveEnd"
style="width: 100%"
type="date"
placeholder="请选择日期"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
@change="handleEndDateChange(scope.row, scope.$index)"
/>
</template>
</el-table-column>
......@@ -104,8 +176,18 @@
<span class="required-label">是否受汇率影响</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.isExchangeRate" style="width: 100%" placeholder="请选择" clearable>
<el-option v-for="item in sys_no_yes" :key="item.value" :label="item.label" :value="item.value" />
<el-select
v-model="scope.row.isExchangeRate"
style="width: 100%"
placeholder="请选择"
clearable
>
<el-option
v-for="item in sys_no_yes"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
......@@ -114,8 +196,18 @@
<span class="required-label">结算币种</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.currency" style="width: 100%" placeholder="请选择" clearable>
<el-option v-for="item in bx_currency_type" :key="item.value" :label="item.label" :value="item.value" />
<el-select
v-model="scope.row.currency"
style="width: 100%"
placeholder="请选择"
clearable
>
<el-option
v-for="item in bx_currency_type"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
......@@ -124,22 +216,50 @@
<span class="required-label">是否直签</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.isDirectSign" style="width: 100%" placeholder="请选择" clearable
@change="scope.row.reconciliationCompanyName = ''">
<el-option v-for="item in sys_no_yes" :key="item.value" :label="item.label" :value="item.value" />
<el-select
v-model="scope.row.isDirectSign"
style="width: 100%"
placeholder="请选择"
clearable
@change="scope.row.reconciliationCompanyName = ''"
>
<el-option
v-for="item in sys_no_yes"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column label="对账公司" prop="reconciliationCompanyName" align="center" width="150">
<el-table-column
label="对账公司"
prop="reconciliationCompanyName"
align="center"
width="150"
>
<template #header>
<span class="required-label">对账公司</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.reconciliationCompanyName" filterable remote reserve-keyword
placeholder="请输入关键词搜索" :remote-method="query => searchSelectList(query, 'reconciliationCompanyName', scope.row.isDirectSign)"
:loading="searchLoadingStates['reconciliationCompanyName']">
<el-option v-for="item in searchOptions['reconciliationCompanyName'] || []" :key="item.id"
:label="item.label" :value="item.value" />
<el-select
v-model="scope.row.reconciliationCompanyName"
filterable
remote
reserve-keyword
placeholder="请输入关键词搜索"
:remote-method="
query =>
searchSelectList(query, 'reconciliationCompanyName', scope.row.isDirectSign)
"
:loading="searchLoadingStates['reconciliationCompanyName']"
>
<el-option
v-for="item in searchOptions['reconciliationCompanyName'] || []"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
......@@ -148,11 +268,21 @@
<span class="required-label">销售组织</span>
</template>
<template #default="scope">
<el-select v-model="scope.row.salesOrgName" filterable remote reserve-keyword placeholder="请输入关键词搜索"
<el-select
v-model="scope.row.salesOrgName"
filterable
remote
reserve-keyword
placeholder="请输入关键词搜索"
:remote-method="query => searchSelectList(query, 'salesOrgName')"
:loading="searchLoadingStates['salesOrgName']">
<el-option v-for="item in searchOptions['salesOrgName'] || []" :key="item.id" :label="item.label"
:value="item.value" />
:loading="searchLoadingStates['salesOrgName']"
>
<el-option
v-for="item in searchOptions['salesOrgName'] || []"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
......@@ -176,8 +306,12 @@
</el-select>
</template> -->
<template #default="scope">
<el-switch v-model="scope.row.status" active-value="1" inactive-value="0"
@change="switchChange(scope.row)" />
<el-switch
v-model="scope.row.status"
active-value="1"
inactive-value="0"
@change="switchChange(scope.row)"
/>
<span style="margin-left: 8px">
{{ scope.row.status === '1' ? '启用' : '禁用' }}
</span>
......@@ -197,11 +331,22 @@
<el-table-column label="操作" width="120" align="center" fixed="right">
<template #default="scope">
<div class="btnCon">
<el-button v-if="scope.$index == settingList.length - 1" @click="handleAddCommission(scope.row)" text
size="small" type="primary">新增</el-button>
<el-button text size="small" type="danger"
@click="handleDeleteCommission(scope.row, scope.$index)">删除</el-button>
<el-button
v-if="scope.$index == settingList.length - 1"
@click="handleAddCommission(scope.row)"
text
size="small"
type="primary"
>新增</el-button
>
<el-button
text
size="small"
type="danger"
@click="handleDeleteCommission(scope.row, scope.$index)"
>删除</el-button
>
</div>
</template>
</el-table-column>
......@@ -215,7 +360,9 @@
</template>
</el-dialog>
<el-dialog title="佣金设置错误提示" v-model="errorTip" width="500px" append-to-body>
<div style="margin-bottom: 10px" v-for="(item, index) in settingErrorTip" :key="index">{{ item }}</div>
<div style="margin-bottom: 10px" v-for="(item, index) in settingErrorTip" :key="index">
{{ item }}
</div>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="errorTip = false">去修改</el-button>
......@@ -294,7 +441,7 @@ const switchChange = row => {
}
}
// 搜索方法
const searchSelectList = async (query, fieldKey, isDirectSign=0) => {
const searchSelectList = async (query, fieldKey, isDirectSign = 0) => {
// 设置该字段的加载状态
searchLoadingStates.value[fieldKey] = true
try {
......@@ -308,7 +455,7 @@ const searchSelectList = async (query, fieldKey, isDirectSign=0) => {
response.data.records = response.data.records.map(item => {
return {
...item,
label: item.abbreviation,
label: item.fullName,
value: item.insuranceCompanyBizId
}
})
......@@ -381,7 +528,7 @@ const handleDeleteCommission = (row, index) => {
}
proxy.$modal.msgSuccess('删除成功')
})
.catch(() => { })
.catch(() => {})
}
const handleNumberInput = (row, field, type = 'positive') => {
const value = row[field]
......@@ -845,16 +992,19 @@ function getSpeciesList() {
function updateSpecies(type) {
loading.value = true
if (type == 'update') {
proxy.$modal.confirm('确认更新来佣管理-规格数据吗,此操作会重置佣金数据', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 用户点击了确定按钮,执行更新操作
updateSpecies()
}).catch(() => {
// 用户点击了取消按钮,不执行任何操作
})
proxy.$modal
.confirm('确认更新来佣管理-规格数据吗,此操作会重置佣金数据', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
// 用户点击了确定按钮,执行更新操作
updateSpecies()
})
.catch(() => {
// 用户点击了取消按钮,不执行任何操作
})
} else {
comeExpectedSpecies({ productLaunchBizId: route.query.productLaunchBizId }).then(response => {
if (response.code === 200) {
......@@ -869,7 +1019,6 @@ function updateSpecies(type) {
}
})
}
}
//========多选下拉框悬停效果结束=========
......@@ -919,7 +1068,6 @@ watch(
/* 闪烁动画吸引用户注意力 */
@keyframes highlight {
0%,
50% {
background-color: #fff2f0;
......
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