Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-middle-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-middle-front
Commits
f00a7e93
Commit
f00a7e93
authored
Jan 07, 2026
by
Sweet Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对账公司接口更换,佣金设置增加是否直签
parent
64042940
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
262 additions
and
401 deletions
+262
-401
package.json
+3
-3
src/api/common.js
+17
-0
src/api/product/index.js
+2
-2
src/views/merchandise/addProduce.vue
+29
-36
src/views/merchandise/components/comeInfo.vue
+136
-193
src/views/merchandise/components/sendInfo.vue
+75
-167
No files found.
package.json
View file @
f00a7e93
{
"name"
:
"
ruoyi
"
,
"name"
:
"
yd
"
,
"version"
:
"3.9.0"
,
"description"
:
"
若依管理
系统"
,
"author"
:
"
若依
"
,
"description"
:
"
银盾中台
系统"
,
"author"
:
"
银盾
"
,
"license"
:
"
MIT
"
,
"type"
:
"module"
,
"scripts"
:
{
...
...
src/api/common.js
View file @
f00a7e93
...
...
@@ -34,3 +34,20 @@ export function getAllCompanys(data) {
data
:
data
})
}
// 获取保险对账公司
export
function
getReconciliationCompany
(
data
)
{
return
request
({
url
:
'/insurance/base/api/insuranceReconciliationCompany/page'
,
method
:
'post'
,
data
:
data
})
}
// 获取保险公司列表
export
function
getInsuranceCompany
(
data
)
{
return
request
({
url
:
'/insurance/base/api/insuranceCompany/page'
,
method
:
'post'
,
data
:
data
})
}
src/api/product/index.js
View file @
f00a7e93
...
...
@@ -110,7 +110,7 @@ export function deleteCommission(announcementCommissionRatioBizId) {
method
:
'delete'
})
}
// 获得来佣
列表的
数据
// 获得来佣
规格
数据
export
function
comeCommissionList
(
data
)
{
return
request
({
url
:
'/product/api/expectedSpecies/page'
,
...
...
@@ -118,7 +118,7 @@ export function comeCommissionList(data) {
data
:
data
})
}
//
获得来佣列表的
数据
//
更新产品规格
数据
export
function
comeExpectedSpecies
(
data
)
{
return
request
({
url
:
'/product/api/expectedSpecies/import/species'
,
...
...
src/views/merchandise/addProduce.vue
View file @
f00a7e93
...
...
@@ -7,25 +7,11 @@
<el-row>
<el-col
:span=
"12"
>
<div
class=
"commonHeader"
>
产品标题
</div>
<el-select
v-model=
"queryParams.productName"
filterable
remote
allow-create
default-first-option
:reserve-keyword=
"false"
placeholder=
"请选择产品名称"
@
blur=
"handleSelectChange"
:remote-method=
"searchProduct"
clearable
remote-show-suffix
>
<el-option
v-for=
"item in productList"
:key=
"item.productBizId"
:label=
"item.productName"
:value=
"item.productBizId"
/>
<el-select
v-model=
"queryParams.productName"
filterable
remote
allow-create
default-first-option
:reserve-keyword=
"false"
placeholder=
"请选择产品名称"
@
blur=
"handleSelectChange"
:remote-method=
"searchProduct"
clearable
remote-show-suffix
>
<el-option
v-for=
"item in productList"
:key=
"item.productBizId"
:label=
"item.productName"
:value=
"item.productBizId"
/>
</el-select>
</el-col>
<el-col
:span=
"24"
>
...
...
@@ -47,29 +33,21 @@
</el-col>
<el-col
:span=
"24"
v-if=
"showNameTip"
>
<div
class=
"tipCon"
>
<el-icon
color=
"red"
:size=
"20"
style=
"margin-right: 5px"
><Warning
/></el-icon>
<el-icon
color=
"red"
:size=
"20"
style=
"margin-right: 5px"
>
<Warning
/>
</el-icon>
<span>
标题信息过少,请至少输入5个有效字数(含中文、英文、数字)
</span>
</div>
</el-col>
<el-col
:span=
"24"
style=
"margin: 20px 0"
>
<div
class=
"commonHeader"
>
图片和视频
<span
style=
"color: rgb(111, 111, 111); font-size: 15px"
>
({{ imageInfo.count }}/9)
</span
>
<span
style=
"color: rgb(111, 111, 111); font-size: 15px"
>
({{ imageInfo.count }}/9)
</span>
</div>
<image-upload
v-model=
"queryParams.picture"
:action=
"'/oss/api/oss/upload'"
:limit=
"9"
:image-size=
"10"
:video-size=
"500"
:file-type=
"['png', 'jpg', 'jpeg', 'mp4']"
:is-show-tip=
"false"
@
change=
"handleImageChange"
@
file-change=
"handleFileChange"
/>
<image-upload
v-model=
"queryParams.picture"
:action=
"'/oss/api/oss/upload'"
:limit=
"9"
:image-size=
"10"
:video-size=
"500"
:file-type=
"['png', 'jpg', 'jpeg', 'mp4']"
:is-show-tip=
"false"
@
change=
"handleImageChange"
@
file-change=
"handleFileChange"
/>
</el-col>
<el-col
:span=
"24"
>
<div
v-for=
"(item, index) in imageRequireList"
:key=
"item.key"
class=
"imgTip"
>
...
...
@@ -90,7 +68,9 @@
</el-col>
<el-col
:span=
"24"
v-if=
"imageInfo.count > 0 && imageInfo.count < 3"
>
<div
class=
"tipCon"
>
<el-icon
color=
"red"
:size=
"20"
style=
"margin-right: 5px"
><Warning
/></el-icon>
<el-icon
color=
"red"
:size=
"20"
style=
"margin-right: 5px"
>
<Warning
/>
</el-icon>
<span>
请上传至少3张产品主图
</span>
</div>
</el-col>
...
...
@@ -338,6 +318,10 @@ function submitProduct() {
})
}
if
(
imageInfo
.
value
.
fileList
&&
imageInfo
.
value
.
fileList
.
length
>
0
)
{
if
(
imageInfo
.
value
.
fileList
.
length
<
3
)
{
proxy
.
$modal
.
msgError
(
'请上传3张产品图片'
)
return
}
imageInfo
.
value
.
fileList
.
forEach
(
item
=>
{
mainUrlsList
.
push
(
item
.
url
)
})
...
...
@@ -354,7 +338,7 @@ function submitProduct() {
})
})
}
if
(
categoryBizIdList
.
length
===
0
)
{
proxy
.
$modal
.
msgError
(
'请选择产品类目'
)
return
...
...
@@ -395,6 +379,7 @@ searchProduct()
overflow: hidden;
overflow-y: scroll; */
}
.form-content
{
width
:
100%
;
box-sizing
:
border-box
;
...
...
@@ -404,15 +389,18 @@ searchProduct()
/* padding: 20px; */
/* background-color: #fff; */
}
.formHeader
{
margin-bottom
:
20px
;
font-size
:
22px
;
font-weight
:
600
;
}
.nameTip
{
font-size
:
13px
;
margin-top
:
10px
;
}
.tipCon
{
/* width: 450px; */
width
:
fit-content
;
...
...
@@ -426,23 +414,28 @@ searchProduct()
font-size
:
14px
;
display
:
flex
;
align-items
:
center
;
span
{
color
:
rgb
(
111
111
111
);
}
}
.commonHeader
{
font-size
:
16px
;
margin-bottom
:
15px
;
}
.imgTip
{
color
:
#ccc
;
font-size
:
14px
;
margin-bottom
:
10px
;
}
.classTip
{
color
:
#ccc
;
font-size
:
14px
;
}
.bottomBtn
{
border-top
:
1px
solid
rgb
(
247
247
247
);
width
:
100%
;
...
...
src/views/merchandise/components/comeInfo.vue
View file @
f00a7e93
<
template
>
<div
class=
"app-container"
>
<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"
>
更新规格
</el-button>
<el-col
style=
"display: flex; justify-content: space-between"
>
<div>
<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)"
>
佣金设置
...
...
@@ -33,43 +23,21 @@
</
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>
...
...
@@ -78,15 +46,9 @@
<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"
>
...
...
@@ -94,15 +56,9 @@
<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>
...
...
@@ -111,14 +67,8 @@
<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"
>
...
...
@@ -126,14 +76,8 @@
<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"
>
...
...
@@ -141,15 +85,8 @@
<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"
>
...
...
@@ -157,15 +94,8 @@
<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>
...
...
@@ -174,18 +104,8 @@
<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>
...
...
@@ -194,46 +114,32 @@
<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>
<el-table-column
label=
"对账公司"
prop=
"reconciliationCompanyName"
align=
"center"
width=
"150"
>
<el-table-column
label=
"是否直签"
prop=
"isDirectSign"
width=
"150"
>
<
template
#
header
>
<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>
</
template
>
</el-table-column>
<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')"
: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>
...
...
@@ -242,21 +148,11 @@
<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>
...
...
@@ -280,12 +176,8 @@
</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>
...
...
@@ -305,22 +197,11 @@
<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>
...
...
@@ -334,7 +215,7 @@
</
template
>
</el-dialog>
<el-dialog
title=
"佣金设置错误提示"
v-model=
"errorTip"
width=
"500px"
append-to-body
>
<div
style=
"margin-bottom: 10px"
v-for=
"
item in settingErrorTip
"
>
{{ 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>
...
...
@@ -353,7 +234,7 @@ import {
deleteComeCommission
,
changeComeStatus
}
from
'@/api/product/index'
import
{
getAllCompanys
}
from
'@/api/common'
import
{
getAllCompanys
,
getReconciliationCompany
,
getInsuranceCompany
}
from
'@/api/common'
import
{
ref
,
watch
}
from
'vue'
const
props
=
defineProps
({
...
...
@@ -413,13 +294,50 @@ const switchChange = row => {
}
}
// 搜索方法
const
searchSelectList
=
async
(
query
,
fieldKey
)
=>
{
const
searchSelectList
=
async
(
query
,
fieldKey
,
isDirectSign
=
0
)
=>
{
// 设置该字段的加载状态
searchLoadingStates
.
value
[
fieldKey
]
=
true
try
{
if
(
fieldKey
===
'reconciliationCompanyName'
)
{
debugger
;
if
(
isDirectSign
==
1
)
{
getInsuranceCompany
({
queryContent
:
query
.
trim
(),
pageNo
:
1
,
pageSize
:
10
}).
then
(
response
=>
{
response
.
data
.
records
=
response
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
abbreviation
,
value
:
item
.
insuranceCompanyBizId
}
})
searchOptions
.
value
[
fieldKey
]
=
response
.
data
.
records
})
return
}
else
{
getReconciliationCompany
({
name
:
query
.
trim
(),
pageNo
:
1
,
pageSize
:
10
}).
then
(
response
=>
{
response
.
data
.
records
=
response
.
data
.
records
.
map
(
item
=>
{
return
{
...
item
,
label
:
item
.
name
,
value
:
item
.
reconciliationCompanyBizId
}
})
searchOptions
.
value
[
fieldKey
]
=
response
.
data
.
records
})
}
return
}
// 根据不同的字段key调用不同的API
if
(
fieldKey
===
'
reconciliationCompanyName'
||
fieldKey
===
'
salesOrgName'
)
{
if
(
fieldKey
===
'salesOrgName'
)
{
const
params
=
{
deptName
:
query
.
trim
(),
pageNo
:
1
,
...
...
@@ -464,7 +382,7 @@ const handleDeleteCommission = (row, index) => {
}
proxy
.
$modal
.
msgSuccess
(
'删除成功'
)
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
}
const
handleNumberInput
=
(
row
,
field
,
type
=
'positive'
)
=>
{
const
value
=
row
[
field
]
...
...
@@ -882,7 +800,7 @@ const handleCommissionSetting = row => {
getSettingList
()
}
/** 获得规格数据 */
/** 获得
来佣
规格数据 */
function
getSpeciesList
()
{
loading
.
value
=
true
comeCommissionList
(
queryParams
.
value
).
then
(
response
=>
{
...
...
@@ -891,7 +809,9 @@ function getSpeciesList() {
total
.
value
=
response
.
data
.
total
loading
.
value
=
false
if
(
originalData
.
value
.
length
==
0
)
{
proxy
.
$modal
.
msgError
(
'该商品暂无规格数据,请先更新规格数据'
)
// 如果来佣表没有规格数据,那么同步产品规格数据
updateSpecies
()
// proxy.$modal.msgError('该商品暂无规格数据,请先更新规格数据')
}
else
{
let
codeArr
=
[]
// 自定义没有typeCode影响表格得展示
...
...
@@ -922,17 +842,35 @@ function getSpeciesList() {
}
})
}
/** 更新规格数据 */
function
updateSpecies
()
{
/** 更新
产品
规格数据 */
function
updateSpecies
(
type
)
{
loading
.
value
=
true
comeExpectedSpecies
({
productLaunchBizId
:
route
.
query
.
productLaunchBizId
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
proxy
.
$modal
.
msgSuccess
(
'来佣管理-规格更新成功'
)
getSpeciesList
()
}
else
{
proxy
.
$modal
.
msgError
(
response
.
msg
)
}
})
if
(
type
==
'update'
)
{
proxy
.
$modal
.
confirm
(
'确认更新来佣管理-规格数据吗,此操作会重置佣金数据'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
// 用户点击了确定按钮,执行更新操作
updateSpecies
()
}).
catch
(()
=>
{
// 用户点击了取消按钮,不执行任何操作
})
}
else
{
comeExpectedSpecies
({
productLaunchBizId
:
route
.
query
.
productLaunchBizId
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
if
(
type
==
'update'
)
{
proxy
.
$modal
.
msgSuccess
(
'来佣管理-规格更新成功'
)
}
else
{
console
.
log
(
'初始化规格数据'
)
}
getSpeciesList
()
}
else
{
proxy
.
$modal
.
msgError
(
response
.
msg
)
}
})
}
}
//========多选下拉框悬停效果结束=========
...
...
@@ -952,11 +890,13 @@ watch(
color
:
#f56c6c
;
margin-right
:
4px
;
}
.btnCon
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
/* 错误行样式 */
.error-row
{
background-color
:
#fff2f0
!important
;
...
...
@@ -980,14 +920,17 @@ watch(
/* 闪烁动画吸引用户注意力 */
@keyframes
highlight
{
0
%,
50
%
{
background-color
:
#fff2f0
;
}
25
%,
75
%
{
background-color
:
#ffeaea
;
}
100
%
{
background-color
:
#fff2f0
;
}
...
...
src/views/merchandise/components/sendInfo.vue
View file @
f00a7e93
<
template
>
<div
class=
"app-container"
>
<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"
>
更新规格
</el-button>
<el-col
style=
"display: flex; justify-content: space-between"
>
<div>
<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)"
>
佣金设置
...
...
@@ -33,22 +23,10 @@
</
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-form
:model=
"settingQueryParams"
ref=
"settingQueryRef"
:inline=
"true"
label-width=
"68px"
>
<!-- <el-form-item label="项目名称" prop="projectName">
<el-input
...
...
@@ -66,25 +44,15 @@
<!-- 表格数据 -->
<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>
...
...
@@ -93,15 +61,9 @@
<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"
>
...
...
@@ -109,15 +71,9 @@
<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>
...
...
@@ -126,14 +82,8 @@
<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"
>
...
...
@@ -141,14 +91,8 @@
<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"
>
...
...
@@ -156,15 +100,8 @@
<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"
>
...
...
@@ -172,15 +109,8 @@
<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>
<el-table-column
label=
"适用范围"
prop=
"scope"
width=
"300"
>
...
...
@@ -188,22 +118,10 @@
<span
class=
"required-label"
>
适用范围
</span>
</
template
>
<
template
#
default=
"scope"
>
<el-select
v-model=
"scope.row.scope"
style=
"width: 100%"
multiple
collapse-tags
collapse-tags-tooltip
:max-collapse-tags=
"2"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"item in commission_scope_type"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
<el-select
v-model=
"scope.row.scope"
style=
"width: 100%"
multiple
collapse-tags
collapse-tags-tooltip
:max-collapse-tags=
"2"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"item in commission_scope_type"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</
template
>
</el-table-column>
...
...
@@ -212,18 +130,8 @@
<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>
...
...
@@ -232,18 +140,8 @@
<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>
...
...
@@ -252,12 +150,8 @@
<span
class=
"required-label"
>
状态
</span>
</
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>
...
...
@@ -277,22 +171,11 @@
<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>
...
...
@@ -405,7 +288,7 @@ const handleDeleteCommission = (row, index) => {
}
proxy
.
$modal
.
msgSuccess
(
'删除成功'
)
})
.
catch
(()
=>
{})
.
catch
(()
=>
{
})
}
const
handleNumberInput
=
(
row
,
field
,
type
=
'positive'
)
=>
{
const
value
=
row
[
field
]
...
...
@@ -823,7 +706,9 @@ function getSpeciesList() {
total
.
value
=
response
.
data
.
total
loading
.
value
=
false
if
(
originalData
.
value
.
length
==
0
)
{
proxy
.
$modal
.
msgError
(
'该商品暂无规格数据,请先更新规格数据'
)
// 如果发佣表没有规格数据,那么同步产品规格数据
updateSpecies
()
// proxy.$modal.msgError('该商品暂无规格数据,请先更新规格数据')
}
else
{
let
codeArr
=
[]
// 自定义没有typeCode影响表格得展示
...
...
@@ -853,16 +738,34 @@ function getSpeciesList() {
})
}
/** 更新规格数据 */
function
updateSpecies
()
{
function
updateSpecies
(
type
)
{
loading
.
value
=
true
exportSpecies
({
productLaunchBizId
:
route
.
query
.
productLaunchBizId
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
proxy
.
$modal
.
msgSuccess
(
'发佣管理-规格更新成功'
)
getSpeciesList
()
}
else
{
proxy
.
$modal
.
msgError
(
response
.
msg
)
}
})
if
(
type
==
'update'
)
{
proxy
.
$modal
.
confirm
(
'确认更新发佣管理-规格数据吗,此操作会重置佣金数据'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
// 用户点击了确定按钮,执行更新操作
updateSpecies
()
}).
catch
(()
=>
{
// 用户点击了取消按钮,不执行任何操作
})
}
else
{
exportSpecies
({
productLaunchBizId
:
route
.
query
.
productLaunchBizId
}).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
if
(
type
==
'update'
)
{
proxy
.
$modal
.
msgSuccess
(
'发佣管理-规格更新成功'
)
}
else
{
console
.
log
(
'初始化规格数据'
)
}
getSpeciesList
()
}
else
{
proxy
.
$modal
.
msgError
(
response
.
msg
)
}
})
}
}
//========多选下拉框悬停效果结束=========
...
...
@@ -882,11 +785,13 @@ watch(
color
:
#f56c6c
;
margin-right
:
4px
;
}
.btnCon
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
/* 错误行样式 */
.error-row
{
background-color
:
#fff2f0
!important
;
...
...
@@ -910,14 +815,17 @@ watch(
/* 闪烁动画吸引用户注意力 */
@keyframes
highlight
{
0
%,
50
%
{
background-color
:
#fff2f0
;
}
25
%,
75
%
{
background-color
:
#ffeaea
;
}
100
%
{
background-color
:
#fff2f0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment