Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
1c95a56a
Commit
1c95a56a
authored
Jun 20, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator
into dev
parents
e25c40bf
0d8d7960
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
3025 additions
and
460 deletions
+3025
-460
customerCommission.js
src/api/ecw/customerCommission.js
+55
-0
customerCommissionInfo.js
src/api/ecw/customerCommissionInfo.js
+17
-1
node.js
src/api/ecw/node.js
+9
-0
index.js
src/router/index.js
+38
-1
dict.js
src/utils/dict.js
+6
-0
edit.vue
src/views/ecw/customer/edit.vue
+496
-0
index.vue
src/views/ecw/customer/index.vue
+140
-70
view.vue
src/views/ecw/customer/view.vue
+34
-0
index.vue
src/views/ecw/customerCommission/index.vue
+348
-0
customSelectorsDictionary.vue
.../ecw/customerCommissionInfo/customSelectorsDictionary.vue
+44
-0
darkServantAndProduct.vue
...iews/ecw/customerCommissionInfo/darkServantAndProduct.vue
+90
-0
darkServantAndRebate.vue
...views/ecw/customerCommissionInfo/darkServantAndRebate.vue
+72
-0
index.vue
src/views/ecw/customerCommissionInfo/index.vue
+155
-363
mingServantAndDarkServant.vue
.../ecw/customerCommissionInfo/mingServantAndDarkServant.vue
+91
-0
index.vue
src/views/ecw/messageLeave/index.vue
+72
-13
index.vue
src/views/ecw/oceanCustomer/index.vue
+486
-0
index.vue
src/views/ecw/product/index.vue
+2
-1
index.vue
src/views/ecw/productBrank/index.vue
+32
-9
blacklist.vue
src/views/ecw/productPrice/blacklist.vue
+824
-0
index.vue
src/views/ecw/productPrice/index.vue
+14
-2
No files found.
src/api/ecw/customerCommission.js
0 → 100644
View file @
1c95a56a
import
request
from
'
@/utils/request
'
// 创建客户佣金类型
export
function
createCustomerCommission
(
data
)
{
return
request
({
url
:
'
/ecw/customer-commission/create
'
,
method
:
'
post
'
,
data
:
data
})
}
// 更新客户佣金类型
export
function
updateCustomerCommission
(
data
)
{
return
request
({
url
:
'
/ecw/customer-commission/update
'
,
method
:
'
put
'
,
data
:
data
})
}
// 删除客户佣金类型
export
function
deleteCustomerCommission
(
id
)
{
return
request
({
url
:
'
/ecw/customer-commission/delete?id=
'
+
id
,
method
:
'
delete
'
})
}
// 获得客户佣金类型
export
function
getCustomerCommission
(
id
)
{
return
request
({
url
:
'
/ecw/customer-commission/get?id=
'
+
id
,
method
:
'
get
'
})
}
// 获得客户佣金类型分页
export
function
getCustomerCommissionPage
(
query
)
{
return
request
({
url
:
'
/ecw/customer-commission/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 导出客户佣金类型 Excel
export
function
exportCustomerCommissionExcel
(
query
)
{
return
request
({
url
:
'
/ecw/customer-commission/export-excel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
src/api/ecw/customerCommissionInfo.js
View file @
1c95a56a
...
@@ -48,7 +48,23 @@ export function exportCustomerCommissionInfoExcel(query) {
...
@@ -48,7 +48,23 @@ export function exportCustomerCommissionInfoExcel(query) {
return
request
({
return
request
({
url
:
'
/ecw/customer-commission-info/export-excel
'
,
url
:
'
/ecw/customer-commission-info/export-excel
'
,
method
:
'
get
'
,
method
:
'
get
'
,
params
:
query
,
query
:
query
,
responseType
:
'
blob
'
responseType
:
'
blob
'
})
})
}
}
//商品类型列表
export
function
itemTypeListApi
(
query
){
return
request
({
url
:
'
/ecw/product-attr/list
'
,
method
:
'
get
'
,
query
:
query
})
}
//
export
function
customerDropDownList
(
query
){
return
request
({
url
:
'
/ecw/customer/select
'
,
method
:
'
get
'
,
query
,
})
}
src/api/ecw/node.js
View file @
1c95a56a
...
@@ -34,6 +34,15 @@ export function getNode(id) {
...
@@ -34,6 +34,15 @@ export function getNode(id) {
})
})
}
}
// 获得服务网点分页
export
function
getNodeList
(
query
)
{
return
request
({
url
:
'
/ecw/node/list
'
,
method
:
'
get
'
,
params
:
query
})
}
// 获得服务网点分页
// 获得服务网点分页
export
function
getNodePage
(
query
)
{
export
function
getNodePage
(
query
)
{
return
request
({
return
request
({
...
...
src/router/index.js
View file @
1c95a56a
...
@@ -91,6 +91,16 @@ export const constantRoutes = [
...
@@ -91,6 +91,16 @@ export const constantRoutes = [
meta
:
{
title
:
'
字典数据
'
,
icon
:
''
,
activeMenu
:
'
/system/dict
'
}
meta
:
{
title
:
'
字典数据
'
,
icon
:
''
,
activeMenu
:
'
/system/dict
'
}
}
}
]
]
},
{
path
:
'
/c
'
,
component
:
Layout
,
hidden
:
true
,
children
:
[{
path
:
'
ecw/customer/edit/:customerId(
\\
d+)
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/ecw/customer/edit
'
],
resolve
),
name
:
'
Data
'
,
meta
:
{
title
:
'
字典数据
'
,
icon
:
''
,
activeMenu
:
'
/system/dict
'
}
}]
},
{
},
{
path
:
'
/job
'
,
path
:
'
/job
'
,
component
:
Layout
,
component
:
Layout
,
...
@@ -204,6 +214,21 @@ export const constantRoutes = [
...
@@ -204,6 +214,21 @@ export const constantRoutes = [
]
]
},
},
// {
// path: '/product',
// component: Layout,
// hidden: true,
// redirect: 'noredirect',
// children: [{
// path: 'product-black',
// component: (resolve) => require(['@/views/ecw/productPrice/index'], resolve),
// name: 'ProductPrice',
// meta: {title: '黑名单产品列表', activeMenu: '/product/product-black'}
// }
// ]
// },
{
{
path
:
'
/shelf
'
,
path
:
'
/shelf
'
,
component
:
Layout
,
component
:
Layout
,
...
@@ -216,7 +241,19 @@ export const constantRoutes = [
...
@@ -216,7 +241,19 @@ export const constantRoutes = [
meta
:
{
title
:
'
货架设置
'
,
activeMenu
:
'
/warehouse/shelf
'
}
meta
:
{
title
:
'
货架设置
'
,
activeMenu
:
'
/warehouse/shelf
'
}
}
}
]
]
}
},
{
path
:
'
/customer
'
,
component
:
Layout
,
hidden
:
true
,
redirect
:
'
noredirect
'
,
children
:
[{
path
:
'
/customerCommissionInfo/:dictId(
\\
d+)
'
,
component
:
(
resolve
)
=>
require
([
'
@/views/ecw/customerCommissionInfo/index
'
],
resolve
),
name
:
'
customerCommissionInfo
'
,
meta
:
{
title
:
'
佣金详情
'
,
icon
:
''
,
activeMenu
:
'
/customer/customerCommissionInfo
'
}
}]
},
]
]
// 防止连续点击多次路由报错
// 防止连续点击多次路由报错
...
...
src/utils/dict.js
View file @
1c95a56a
...
@@ -100,6 +100,12 @@ export const DICT_TYPE = {
...
@@ -100,6 +100,12 @@ export const DICT_TYPE = {
AREA_CODE
:
'
area_code
'
,
// 区号
AREA_CODE
:
'
area_code
'
,
// 区号
SOCIAL
:
'
customer_social_tools
'
,
// 社交软件
SOCIAL
:
'
customer_social_tools
'
,
// 社交软件
IS_DEFAULT
:
'
is_default
'
,
// 默认联系人
IS_DEFAULT
:
'
is_default
'
,
// 默认联系人
COMMISSION_PRODUCT_APPROVAL
:
'
commission_product_approval
'
,
//佣金备案
SHIPPING_DECLARATION_TYPE
:
'
shipping_declaration_type
'
,
//出货报关方式(与订单报关方式相同)
COMMISSION_TYPE
:
'
commission_type
'
,
//佣金类型
COMMISSION_DARK_TYPE
:
'
commission_dark_type
'
,
//暗涌类型
COMMISSION_CURRENCY_TYPE
:
'
commission_currency_type
'
,
//佣金货币类型
COMMISSION_UNIT
:
'
commission_unit
'
//佣金货物单位
}
}
...
...
src/views/ecw/customer/edit.vue
0 → 100644
View file @
1c95a56a
<
template
>
<div>
<el-row
type=
"flex"
style=
"margin-top: 15px;margin-bottom: 15px"
justify=
"center"
>
<el-col
:xs=
"24"
:sm=
"24"
:md=
"24"
:lg=
"20"
:xl=
"16"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
placeholder=
"请输入客户名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"国家"
prop=
"country"
>
<el-select
v-model=
"form.country"
placeholder=
"请选择国家"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.COUNTRY)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户等级"
prop=
"level"
>
<el-select
v-model=
"form.level"
placeholder=
"请选择客户等级"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系地址"
prop=
"address"
>
<el-input
v-model=
"form.address"
placeholder=
"请输入联系地址"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户类别"
prop=
"type"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择客户类别"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<!--
<el-col
:span=
"12"
>
-->
<!--
<el-form-item
label=
"所属代理"
prop=
"agentId"
>
-->
<!--
<el-select
v-model=
"form.agentId"
placeholder=
"请选择所属代理"
>
-->
<!--
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
--
>
<!-- :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />-->
<!--
</el-select>
-->
<!--
</el-form-item>
-->
<!--
</el-col>
-->
<el-col
:span=
"12"
>
<el-form-item
label=
"常用提货网点"
prop=
"pickupPoint"
>
<el-select
v-model=
"form.pickupPoint"
placeholder=
"请输入常用提货网点"
>
<el-option
v-for=
"node in nodeList"
:key=
"node.id"
:label=
"node.titleZh"
:value=
"node.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"公司名称"
prop=
"company"
>
<el-input
v-model=
"form.company"
placeholder=
"请输入公司名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户生日"
prop=
"birthday"
>
<el-date-picker
v-model=
"form.birthday"
type=
"date"
value-format=
"timestamp"
placeholder=
"请输入客户生日"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"主营类别"
prop=
"productType"
>
<el-cascader
:options=
"productTypeList"
:props=
"
{label: 'titleZh', value: 'id', lazy: true, lazyLoad}">
</el-cascader>
<el-row
:gutter=
"10"
>
<el-col
:span=
"11"
>
<el-select
v-model=
"form.productType"
placeholder=
"请选择产品类别"
>
<!--
<el-option
label=
"请选择字典生成"
value=
""
/>
-->
</el-select>
</el-col>
<el-col
:span=
"11"
>
<el-select
v-model=
"form.productType"
placeholder=
"请选择主营类别"
>
<!--
<el-option
label=
"请选择字典生成"
value=
""
/>
-->
</el-select>
</el-col>
</el-row>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户来源"
prop=
"source"
>
<el-select
v-model=
"form.source"
placeholder=
"请选择客户来源"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"结算方式"
prop=
"balance"
>
<el-select
v-model=
"form.balance"
placeholder=
"请选择结算方式"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"跟进客服"
prop=
"customerService"
>
<el-select
v-model=
"form.customerService"
placeholder=
"请选择跟进客服"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"图片"
prop=
"picture"
>
<upload
v-model=
"form.picture"
:limit=
"1"
></upload>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户状态"
prop=
"status"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择客户状态"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"推介人"
prop=
"promoter"
>
<el-input
v-model=
"form.promoter"
placeholder=
"请输入推介人"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建人"
prop=
"founder"
>
<el-input
v-model=
"form.founder"
placeholder=
"请输入创建人"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建时间"
prop=
"founder"
>
<el-date-picker
v-model=
"form.createTime"
type=
"datetime"
value-format=
"timestamp"
placeholder=
"选择创建时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"到仓确认"
prop=
"arrivalConfirm"
>
<el-switch
v-model=
"form.arrivalConfirm"
:active-value=
"0"
:inactive-value=
"1"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"重货标准(CBM)"
prop=
"weightUnit"
>
<el-input
v-model=
"form.weightUnit"
placeholder=
"请输入重货标准(CBM)"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"指定线路"
prop=
"line"
>
<el-switch
v-model=
"showLine"
></el-switch>
<el-table
v-show=
"showLine"
border
:data=
"form.customerLines"
style=
"width: 500px"
>
<el-table-column
prop=
"departureId"
label=
"始发地"
>
</el-table-column>
<el-table-column
prop=
"objectiveId"
label=
"目的地"
>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-row>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
联系人
</span>
<el-button
style=
"float: right;"
size=
"small"
type=
"primary"
@
click=
"form.customerContacts.push(
{department: undefined})">+
</el-button>
</div>
<el-table
:data=
"form.customerContacts"
style=
"width: 100%"
>
<el-table-column
prop=
"department"
label=
"部门"
width=
""
>
<template
v-slot=
"
{ row, column, $index }">
<el-input
v-model=
"row.department"
placeholder=
"请输入部门"
size=
"mini"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"position"
label=
"职位"
width=
""
>
<
template
v-slot=
"{row}"
>
<el-input
v-model=
"row.position"
placeholder=
"请输入职位"
size=
"mini"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"联系人"
>
<
template
v-slot:header
>
联系人
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
v-slot=
"{row}"
>
<el-input
v-model=
"row.name"
placeholder=
"请输入联系人"
size=
"mini"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"areaCode"
label=
"区号"
>
<
template
v-slot:header
>
区号
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
v-slot=
"{row}"
>
<el-select
v-model=
"row.areaCode"
placeholder=
"请选择区号"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.AREA_CODE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</
template
>
</el-table-column>
<el-table-column
prop=
"phoneNew"
label=
"联系方式"
>
<
template
v-slot:header
>
联系方式
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
v-slot=
"{row}"
>
<el-input
v-model=
"row.phoneNew"
placeholder=
"请输入联系方式"
size=
"mini"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
""
label=
"关联账号"
>
</el-table-column>
<el-table-column
prop=
"social"
label=
"社交软件"
>
<
template
v-slot=
"{row}"
>
<el-select
v-model=
"row.social"
placeholder=
"请选择社交软件"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</
template
>
</el-table-column>
<el-table-column
prop=
"socialNumber"
label=
"社交软件号码"
>
<
template
v-slot=
"{row}"
>
<el-input
v-model=
"row.socialNumber"
placeholder=
"请输入社交软件号码"
size=
"mini"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"email"
label=
"邮箱"
>
<
template
v-slot=
"{row}"
>
<el-input
v-model=
"row.email"
placeholder=
"请输入邮箱"
size=
"mini"
/>
</
template
>
</el-table-column>
<el-table-column
prop=
"isDefault"
label=
"设为默认"
>
<
template
v-slot=
"{row}"
>
<el-select
v-model=
"row.isDefault"
placeholder=
"设为默认"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.isDefault)"
/>
</el-select>
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"操作"
>
<
template
v-slot=
"{ row, column, $index }"
>
<el-button
type=
"danger"
@
click=
"form.customerContacts.splice($index, 1)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</el-card>
<el-row
:gutter=
"10"
style=
"margin-top: 15px"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"发票抬头"
prop=
"invoiceTitle"
>
<el-input
v-model=
"form.invoiceTitle"
placeholder=
"请输入发票抬头"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"纳税人识别号"
prop=
"licenseNumber"
>
<el-input
v-model=
"form.licenseNumber"
placeholder=
"请输入纳税人识别号"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"开户行"
prop=
"bank"
>
<el-input
v-model=
"form.bank"
placeholder=
"请输入开户行"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"账户"
prop=
"bankNumber"
>
<el-input
v-model=
"form.bankNumber"
placeholder=
"请输入账户"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"项目"
prop=
"project"
>
<el-input
v-model=
"form.project"
placeholder=
"请输入项目"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"开票地址"
prop=
"billingAddress"
>
<el-input
v-model=
"form.billingAddress"
placeholder=
"请输入开票地址"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"开票电话"
prop=
"billingTell"
>
<el-input
v-model=
"form.billingTell"
placeholder=
"请输入开票电话"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"税率"
prop=
"taxRate"
>
<el-input
v-model=
"form.taxRate"
placeholder=
"请输入税率"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
style=
"text-align: right"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-col>
</el-row>
</div>
</template>
<
script
>
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
upload
from
'
@/components/ImageUpload
'
import
{
createCustomer
,
getCustomer
,
updateCustomer
}
from
'
@/api/ecw/customer
'
import
{
getNodeList
}
from
"
@/api/ecw/node
"
import
{
getProductTypeList
}
from
'
@/api/ecw/productType
'
export
default
{
name
:
"
edit
"
,
components
:
{
upload
},
created
()
{
this
.
customerId
=
this
.
$route
.
params
&&
this
.
$route
.
params
.
customerId
;
console
.
log
(
this
.
customerId
)
if
(
!!
this
.
customerId
)
this
.
getCustomer
(
this
.
customerId
)
getNodeList
().
then
(
r
=>
{
this
.
nodeList
=
r
.
data
})
getProductTypeList
().
then
(
r
=>
{
this
.
productTypeList
=
r
.
data
})
},
data
(){
return
{
customerId
:
undefined
,
getDictDatas
,
DICT_TYPE
,
// 表单参数
form
:
{},
// 表单校验
rules
:
{
name
:
[{
required
:
true
,
message
:
"
客户名称不能为空
"
,
trigger
:
"
blur
"
}],
country
:
[{
required
:
true
,
message
:
"
国家不能为空
"
,
trigger
:
"
blur
"
}],
level
:
[{
required
:
true
,
message
:
"
客户等级不能为空
"
,
trigger
:
"
blur
"
}],
type
:
[{
required
:
true
,
message
:
"
客户类别不能为空
"
,
trigger
:
"
blur
"
}],
// createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }],
source
:
[{
required
:
true
,
message
:
"
客户来源不能为空
"
,
trigger
:
"
blur
"
}],
customerService
:
[{
required
:
true
,
message
:
"
跟进客服不能为空
"
,
trigger
:
"
blur
"
}],
status
:
[{
required
:
true
,
message
:
"
客户状态不能为空
"
,
trigger
:
"
blur
"
}],
founder
:
[{
required
:
true
,
message
:
"
创建人不能为空
"
,
trigger
:
"
blur
"
}],
},
// 网点
nodeList
:
[],
productTypeList
:
[],
showLine
:
false
}
},
methods
:
{
lazyLoad
(
node
,
resolve
)
{
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
// return;
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateCustomer
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createCustomer
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
id
:
undefined
,
number
:
undefined
,
name
:
undefined
,
level
:
undefined
,
country
:
undefined
,
type
:
undefined
,
agentId
:
undefined
,
company
:
undefined
,
address
:
undefined
,
productType
:
undefined
,
productId
:
undefined
,
pickupPoint
:
undefined
,
memberId
:
undefined
,
birthday
:
undefined
,
balance
:
undefined
,
source
:
undefined
,
picture
:
undefined
,
customerService
:
undefined
,
customerContacts
:
[],
customerLines
:
[],
promoter
:
undefined
,
status
:
undefined
,
founder
:
undefined
,
department
:
undefined
,
invoiceTitle
:
undefined
,
licenseNumber
:
undefined
,
bank
:
undefined
,
bankNumber
:
undefined
,
project
:
undefined
,
billingAddress
:
undefined
,
billingTell
:
undefined
,
taxRate
:
undefined
,
remarks
:
undefined
,
arrivalConfirm
:
undefined
,
weightUnit
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
getCustomer
(
id
)
{
this
.
reset
();
getCustomer
(
id
).
then
(
response
=>
{
this
.
form
=
{
...
this
.
form
,
...
response
.
data
};
this
.
open
=
true
;
this
.
title
=
"
修改客户
"
;
});
},
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/customer/index.vue
View file @
1c95a56a
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"国家"
align=
"center"
prop=
"country"
>
<el-table-column
label=
"国家"
align=
"center"
prop=
"country"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CO
MMON_STATUS
"
:value=
"scope.row.country"
/>
<dict-tag
:type=
"DICT_TYPE.CO
UNTRY
"
:value=
"scope.row.country"
/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"跟进客服"
align=
"center"
prop=
"customerService"
>
<el-table-column
label=
"跟进客服"
align=
"center"
prop=
"customerService"
>
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
@
pagination=
"getList"
/>
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"
1000px
"
append-to-body
:close-on-click-modal=
"false"
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"
90%
"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -127,14 +127,6 @@
...
@@ -127,14 +127,6 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"所属代理"
prop=
"agentId"
>
<el-select
v-model=
"form.agentId"
placeholder=
"请选择所属代理"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系地址"
prop=
"address"
>
<el-form-item
label=
"联系地址"
prop=
"address"
>
<el-input
v-model=
"form.address"
placeholder=
"请输入联系地址"
/>
<el-input
v-model=
"form.address"
placeholder=
"请输入联系地址"
/>
...
@@ -148,10 +140,19 @@
...
@@ -148,10 +140,19 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item label="所属代理" prop="agentId">-->
<!-- <el-select v-model="form.agentId" placeholder="请选择所属代理">-->
<!-- <el-option v-for="dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"-->
<!-- :key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"常用提货网点"
prop=
"pickupPoint"
>
<el-form-item
label=
"常用提货网点"
prop=
"pickupPoint"
>
<el-select
v-model=
"form.pickupPoint"
placeholder=
"请输入常用提货网点"
>
<el-select
v-model=
"form.pickupPoint"
placeholder=
"请输入常用提货网点"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
<el-option
v-for=
"node in nodeList"
:key=
"node.value"
:label=
"node.label"
:value=
"node.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -164,21 +165,31 @@
...
@@ -164,21 +165,31 @@
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户生日"
prop=
"birthday"
>
<el-form-item
label=
"客户生日"
prop=
"birthday"
>
<el-input
v-model=
"form.birthday"
placeholder=
"请输入客户生日"
/>
<el-date-picker
v-model=
"form.birthday"
type=
"date"
value-format=
"timestamp"
placeholder=
"请输入客户生日"
>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"产品类型"
prop=
"productType"
>
<el-form-item
label=
"主营类别"
prop=
"productType"
>
<el-select
v-model=
"form.productType"
placeholder=
"请选择产品类型"
>
<el-row
:gutter=
"10"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
<el-col
:span=
"11"
>
</el-select>
<el-select
v-model=
"form.productType"
placeholder=
"请选择产品类别"
>
</el-form-item>
<!-- <el-option label="请选择字典生成" value="" />-->
<el-form-item
label=
"产品id"
prop=
"productId"
>
</el-select>
<el-input
v-model=
"form.productId"
placeholder=
"请输入产品id"
/>
</el-col>
<el-col
:span=
"11"
>
<el-select
v-model=
"form.productType"
placeholder=
"请选择主营类别"
>
<!-- <el-option label="请选择字典生成" value="" />-->
</el-select>
</el-col>
</el-row>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户来源"
prop=
"source"
>
<el-form-item
label=
"客户来源"
prop=
"source"
>
<el-select
v-model=
"form.source"
placeholder=
"请选择客户来源"
>
<el-select
v-model=
"form.source"
placeholder=
"请选择客户来源"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
...
@@ -187,7 +198,6 @@
...
@@ -187,7 +198,6 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"结算方式"
prop=
"balance"
>
<el-form-item
label=
"结算方式"
prop=
"balance"
>
<el-select
v-model=
"form.balance"
placeholder=
"请选择结算方式"
>
<el-select
v-model=
"form.balance"
placeholder=
"请选择结算方式"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
...
@@ -196,7 +206,6 @@
...
@@ -196,7 +206,6 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"跟进客服"
prop=
"customerService"
>
<el-form-item
label=
"跟进客服"
prop=
"customerService"
>
<el-select
v-model=
"form.customerService"
placeholder=
"请选择跟进客服"
>
<el-select
v-model=
"form.customerService"
placeholder=
"请选择跟进客服"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
...
@@ -205,9 +214,8 @@
...
@@ -205,9 +214,8 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"图片"
prop=
"picture"
>
<el-form-item
label=
"图片"
prop=
"picture"
>
<
el-input
v-model=
"form.picture"
placeholder=
"请输入图片"
/
>
<
upload
v-model=
"form.picture"
:limit=
"1"
></upload
>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -231,7 +239,12 @@
...
@@ -231,7 +239,12 @@
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建时间"
prop=
"founder"
>
<el-form-item
label=
"创建时间"
prop=
"founder"
>
<el-input
v-model=
"form.founder"
placeholder=
"请输入创建人"
/>
<el-date-picker
v-model=
"form.createTime"
type=
"datetime"
value-format=
"timestamp"
placeholder=
"选择创建时间"
>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -249,16 +262,27 @@
...
@@ -249,16 +262,27 @@
<el-input
v-model=
"form.weightUnit"
placeholder=
"请输入重货标准(CBM)"
/>
<el-input
v-model=
"form.weightUnit"
placeholder=
"请输入重货标准(CBM)"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"指定线路"
prop=
"line"
>
<el-switch
v-model=
"showLine"
></el-switch>
<el-table
v-show=
"showLine"
border
:data=
"form.customerLines"
style=
"width: 500px"
>
<el-table-column
prop=
"departureId"
label=
"始发地"
>
</el-table-column>
<el-table-column
prop=
"objectiveId"
label=
"目的地"
>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-row>
</el-row>
<el-form-item
label=
"关联会员账号"
prop=
"memberId"
>
<el-input
v-model=
"form.memberId"
placeholder=
"请输入关联会员账号"
/>
</el-form-item>
<el-form-item
label=
"部门"
prop=
"department"
>
<el-input
v-model=
"form.department"
placeholder=
"请输入部门"
/>
</el-form-item>
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
联系人
</span>
<span>
联系人
</span>
...
@@ -290,6 +314,9 @@
...
@@ -290,6 +314,9 @@
prop=
"name"
prop=
"name"
label=
"联系人"
label=
"联系人"
>
>
<
template
v-slot:header
>
联系人
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
<el-input
v-model=
"row.name"
placeholder=
"请输入联系人"
size=
"mini"
/>
<el-input
v-model=
"row.name"
placeholder=
"请输入联系人"
size=
"mini"
/>
</
template
>
</
template
>
...
@@ -298,6 +325,9 @@
...
@@ -298,6 +325,9 @@
prop=
"areaCode"
prop=
"areaCode"
label=
"区号"
label=
"区号"
>
>
<
template
v-slot:header
>
区号
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
<el-select
v-model=
"row.areaCode"
placeholder=
"请选择区号"
>
<el-select
v-model=
"row.areaCode"
placeholder=
"请选择区号"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.AREA_CODE)"
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.AREA_CODE)"
...
@@ -309,6 +339,9 @@
...
@@ -309,6 +339,9 @@
prop=
"phoneNew"
prop=
"phoneNew"
label=
"联系方式"
label=
"联系方式"
>
>
<
template
v-slot:header
>
联系方式
<span
style=
"color: #ff0000"
>
*
</span>
</
template
>
<
template
v-slot=
"{row}"
>
<
template
v-slot=
"{row}"
>
<el-input
v-model=
"row.phoneNew"
placeholder=
"请输入联系方式"
size=
"mini"
/>
<el-input
v-model=
"row.phoneNew"
placeholder=
"请输入联系方式"
size=
"mini"
/>
</
template
>
</
template
>
...
@@ -367,30 +400,48 @@
...
@@ -367,30 +400,48 @@
</el-table>
</el-table>
</el-card>
</el-card>
<el-form-item
label=
"发票抬头"
prop=
"invoiceTitle"
>
<el-row
:gutter=
"10"
style=
"margin-top: 15px"
>
<el-input
v-model=
"form.invoiceTitle"
placeholder=
"请输入发票抬头"
/>
<el-col
:span=
"12"
>
</el-form-item>
<el-form-item
label=
"发票抬头"
prop=
"invoiceTitle"
>
<el-form-item
label=
"纳税人识别号"
prop=
"licenseNumber"
>
<el-input
v-model=
"form.invoiceTitle"
placeholder=
"请输入发票抬头"
/>
<el-input
v-model=
"form.licenseNumber"
placeholder=
"请输入纳税人识别号"
/>
</el-form-item>
</el-form-item>
</el-col>
<el-form-item
label=
"开户行"
prop=
"bank"
>
<el-col
:span=
"12"
>
<el-input
v-model=
"form.bank"
placeholder=
"请输入开户行"
/>
<el-form-item
label=
"纳税人识别号"
prop=
"licenseNumber"
>
</el-form-item>
<el-input
v-model=
"form.licenseNumber"
placeholder=
"请输入纳税人识别号"
/>
<el-form-item
label=
"账户"
prop=
"bankNumber"
>
</el-form-item>
<el-input
v-model=
"form.bankNumber"
placeholder=
"请输入账户"
/>
</el-col>
</el-form-item>
<el-col
:span=
"12"
>
<el-form-item
label=
"项目"
prop=
"project"
>
<el-form-item
label=
"开户行"
prop=
"bank"
>
<el-input
v-model=
"form.project"
placeholder=
"请输入项目"
/>
<el-input
v-model=
"form.bank"
placeholder=
"请输入开户行"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"开票地址"
prop=
"billingAddress"
>
</el-col>
<el-input
v-model=
"form.billingAddress"
placeholder=
"请输入开票地址"
/>
<el-col
:span=
"12"
>
</el-form-item>
<el-form-item
label=
"账户"
prop=
"bankNumber"
>
<el-form-item
label=
"开票电话"
prop=
"billingTell"
>
<el-input
v-model=
"form.bankNumber"
placeholder=
"请输入账户"
/>
<el-input
v-model=
"form.billingTell"
placeholder=
"请输入开票电话"
/>
</el-form-item>
</el-form-item>
</el-col>
<el-form-item
label=
"税率"
prop=
"taxRate"
>
<el-col
:span=
"12"
>
<el-input
v-model=
"form.taxRate"
placeholder=
"请输入税率"
/>
<el-form-item
label=
"项目"
prop=
"project"
>
</el-form-item>
<el-input
v-model=
"form.project"
placeholder=
"请输入项目"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"开票地址"
prop=
"billingAddress"
>
<el-input
v-model=
"form.billingAddress"
placeholder=
"请输入开票地址"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"开票电话"
prop=
"billingTell"
>
<el-input
v-model=
"form.billingTell"
placeholder=
"请输入开票电话"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"税率"
prop=
"taxRate"
>
<el-input
v-model=
"form.taxRate"
placeholder=
"请输入税率"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
...
@@ -407,10 +458,13 @@ import { getDictDatas, DICT_TYPE } from '@/utils/dict';
...
@@ -407,10 +458,13 @@ import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import
{
CommonStatusEnum
}
from
'
@/utils/constants
'
import
{
CommonStatusEnum
}
from
'
@/utils/constants
'
import
{
uploadFile
}
from
"
@/api/infra/file
"
;
import
{
uploadFile
}
from
"
@/api/infra/file
"
;
import
upload
from
'
@/components/ImageUpload
'
import
{
getNodeList
}
from
"
@/api/ecw/node
"
export
default
{
export
default
{
name
:
"
Customer
"
,
name
:
"
Customer
"
,
components
:
{
components
:
{
upload
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -448,12 +502,25 @@ export default {
...
@@ -448,12 +502,25 @@ export default {
// 表单校验
// 表单校验
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"
客户名称不能为空
"
,
trigger
:
"
blur
"
}],
name
:
[{
required
:
true
,
message
:
"
客户名称不能为空
"
,
trigger
:
"
blur
"
}],
weightUnit
:
[{
required
:
true
,
message
:
"
重货标准(CBM)不能为空
"
,
trigger
:
"
blur
"
}],
country
:
[{
required
:
true
,
message
:
"
国家不能为空
"
,
trigger
:
"
blur
"
}],
}
level
:
[{
required
:
true
,
message
:
"
客户等级不能为空
"
,
trigger
:
"
blur
"
}],
type
:
[{
required
:
true
,
message
:
"
客户类别不能为空
"
,
trigger
:
"
blur
"
}],
// createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }],
source
:
[{
required
:
true
,
message
:
"
客户来源不能为空
"
,
trigger
:
"
blur
"
}],
customerService
:
[{
required
:
true
,
message
:
"
跟进客服不能为空
"
,
trigger
:
"
blur
"
}],
status
:
[{
required
:
true
,
message
:
"
客户状态不能为空
"
,
trigger
:
"
blur
"
}],
founder
:
[{
required
:
true
,
message
:
"
创建人不能为空
"
,
trigger
:
"
blur
"
}],
},
// 网点
nodeList
:
[],
showLine
:
false
};
};
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
// getNodeList().then(r => {
// this.nodeList = r.data
// })
},
},
methods
:
{
methods
:
{
/** 查询列表 */
/** 查询列表 */
...
@@ -496,6 +563,7 @@ export default {
...
@@ -496,6 +563,7 @@ export default {
picture
:
undefined
,
picture
:
undefined
,
customerService
:
undefined
,
customerService
:
undefined
,
customerContacts
:
[],
customerContacts
:
[],
customerLines
:
[],
promoter
:
undefined
,
promoter
:
undefined
,
status
:
undefined
,
status
:
undefined
,
founder
:
undefined
,
founder
:
undefined
,
...
@@ -527,25 +595,27 @@ export default {
...
@@ -527,25 +595,27 @@ export default {
},
},
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
$router
.
push
(
'
/customer/edit/0
'
)
this
.
open
=
true
;
// this.reset();
this
.
title
=
"
添加客户
"
;
// this.open = true;
// this.title = "添加客户";
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
();
this
.
$router
.
push
(
'
/customer/edit/
'
+
row
.
id
)
const
id
=
row
.
id
;
// this.reset();
getCustomer
(
id
).
then
(
response
=>
{
// const id = row.id;
this
.
form
=
{
...
this
.
form
,
...
response
.
data
};
// getCustomer(id).then(response => {
this
.
open
=
true
;
// this.form = { ...this.form, ...response.data };
this
.
title
=
"
修改客户
"
;
// this.open = true;
});
// this.title = "修改客户";
// });
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
if
(
!
valid
)
{
return
;
//
return;
}
}
// 修改的提交
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
...
...
src/views/ecw/customer/view.vue
0 → 100644
View file @
1c95a56a
<
template
>
<view>
<el-row
type=
"flex"
style=
"margin-top: 15px;margin-bottom: 15px"
justify=
"center"
>
<el-col
:xs=
"24"
:sm=
"24"
:md=
"24"
:lg=
"20"
:xl=
"16"
>
<h2></h2>
<el-row
:gutter=
"10"
>
<el-col>
<h2>
查看
</h2>
</el-col>
<el-col>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"primary"
>
主要按钮
</el-button>
<el-button
type=
"danger"
>
危险按钮
</el-button>
</el-col>
</el-row>
</el-col>
</el-row>
</view>
</
template
>
<
script
>
export
default
{
name
:
'
view
'
}
</
script
>
<
style
scoped
>
</
style
>
src/views/ecw/customerCommission/index.vue
0 → 100644
View file @
1c95a56a
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"客户名称"
prop=
"customerId"
>
<el-input
v-model=
"queryParams.customerId"
placeholder=
"请选择客户id"
clearable
size=
"small"
>
</el-input>
</el-form-item>
<el-form-item
label=
"联系电话"
prop=
"type"
>
<el-input
v-model=
"queryParams.defaultContactPhone"
placeholder=
"请输入电话"
clearable
size=
"small"
>
</el-input>
</el-form-item>
<el-form-item
label=
"佣金类型"
prop=
"transportId"
>
<el-select
v-model=
"queryParams.type"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.TRANSPORT_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"运输方式"
prop=
"departureId"
>
<el-select
v-model=
"queryParams.departureId"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"objectiveId"
>
<el-select
v-model=
"queryParams.objectiveId"
clearable
size=
"small"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"customsType"
>
<el-select
v-model=
"queryParams.customsType"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.CUSTOMS_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"报关方式"
prop=
"approval"
>
<el-select
v-model=
"queryParams.approval"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"备案"
prop=
"darkReturnType"
>
<el-select
v-model=
"queryParams.darkReturnType"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_DARK_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<div
style=
"width:100%;display: flex;justify-content: space-between;margin-bottom: 50px;"
>
<div
style=
"flex: 1"
>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button></div>
<div
style=
"flex: 1; text-align: right;"
>
<router-link
:to=
"'/customerCommissionInfo/'+ 0 "
>
<el-button>
佣金设置
</el-button>
</router-link>
</div>
</div>
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:customer-commission:create']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:customer-commission:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
label=
"佣金编码"
align=
"center"
prop=
"customerId"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"customerName"
>
</el-table-column>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"transportId"
>
<template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.TRANSPORT_TYPE"
:value=
"scope.row.transportId"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"佣金类型"
align=
"center"
prop=
"departureId"
/>
<el-table-column
label=
"暗佣返佣类型"
align=
"center"
prop=
"objectiveId"
/>
<el-table-column
label=
"运输方式"
align=
"center"
prop=
"customsType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMS_TYPE"
:value=
"scope.row.customsType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"始发地/目的地 "
align=
"center"
prop=
"approval"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_PRODUCT_APPROVAL"
:value=
"scope.row.approval"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"报关方式"
align=
"center"
prop=
"darkReturnType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_DARK_TYPE"
:value=
"scope.row.darkReturnType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"备案"
align=
"center"
prop=
"darkReturnType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_DARK_TYPE"
:value=
"scope.row.darkReturnType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"未付佣金"
align=
"center"
prop=
"darkReturnType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_DARK_TYPE"
:value=
"scope.row.darkReturnType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"已付佣金"
align=
"center"
prop=
"darkReturnType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_DARK_TYPE"
:value=
"scope.row.darkReturnType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:customer-commission:update']"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:customer-commission:delete']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"客户id"
prop=
"customerId"
>
<el-select
v-model=
"form.customerId"
placeholder=
"请选择客户id"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"佣金类型"
prop=
"type"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择佣金类型"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"运输方式"
prop=
"transportId"
>
<el-select
v-model=
"form.transportId"
placeholder=
"请选择运输方式"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.TRANSPORT_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"始发地id"
prop=
"departureId"
>
<el-select
v-model=
"form.departureId"
placeholder=
"请选择始发地id"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地id"
prop=
"objectiveId"
>
<el-select
v-model=
"form.objectiveId"
placeholder=
"请选择目的地id"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"报关类别:我司全代:1,自单代报:2,混合报关:3"
prop=
"customsType"
>
<el-select
v-model=
"form.customsType"
placeholder=
"请选择报关类别:我司全代:1,自单代报:2,混合报关:3"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.CUSTOMS_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"产品备案"
prop=
"approval"
>
<el-select
v-model=
"form.approval"
placeholder=
"请选择产品备案"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"暗佣类型 1产品2达标"
prop=
"darkReturnType"
>
<el-select
v-model=
"form.darkReturnType"
placeholder=
"请选择暗佣类型 1产品2达标"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_DARK_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
createCustomerCommission
,
updateCustomerCommission
,
deleteCustomerCommission
,
getCustomerCommission
,
getCustomerCommissionPage
,
exportCustomerCommissionExcel
}
from
"
@/api/ecw/customerCommission
"
;
export
default
{
name
:
"
CustomerCommission
"
,
components
:
{
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 客户佣金类型列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
customerId
:
null
,
//客户id
type
:
null
,
// 佣金类型
transportId
:
null
,
// 运输方式
departureId
:
null
,
//始发地id
objectiveId
:
null
,
//目的地id
customsType
:
null
,
//报关类别
approval
:
null
,
//产品备案
darkReturnType
:
null
,
//暗佣类型 1产品2达标
defaultContactPhone
:
null
,
//主联系电话
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
customerId
:
[{
required
:
true
,
message
:
"
客户id不能为空
"
,
trigger
:
"
change
"
}],
type
:
[{
required
:
true
,
message
:
"
佣金类型不能为空
"
,
trigger
:
"
change
"
}],
darkReturnType
:
[{
required
:
true
,
message
:
"
暗佣类型 1产品2达标不能为空
"
,
trigger
:
"
change
"
}],
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
// 执行查询
getCustomerCommissionPage
(
params
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
id
:
undefined
,
customerId
:
undefined
,
type
:
undefined
,
transportId
:
undefined
,
departureId
:
undefined
,
objectiveId
:
undefined
,
customsType
:
undefined
,
approval
:
undefined
,
darkReturnType
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加客户佣金类型
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
;
getCustomerCommission
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改客户佣金类型
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateCustomerCommission
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createCustomerCommission
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除客户佣金类型编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteCustomerCommission
(
id
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有客户佣金类型数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportCustomerCommissionExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
};
</
script
>
src/views/ecw/customerCommissionInfo/customSelectorsDictionary.vue
0 → 100644
View file @
1c95a56a
<
template
>
<el-select
v-if=
"options"
v-model=
"selectVal"
placeholder=
"请选择"
>
<el-option
v-for=
"item in options"
:key=
"item[valueKey]"
:label=
"item[labelKey]"
:value=
"item[valueKey]"
>
</el-option>
</el-select>
</
template
>
<
script
>
export
default
{
name
:
"
customSelectorsDictionary
"
,
props
:{
options
:{
type
:
Array
,
default
:()
=>
[]
},
value
:
String
,
labelKey
:{
type
:
String
,
default
:
'
label
'
},
valueKey
:{
type
:
String
,
default
:
'
value
'
,
},
},
data
(){
return
{
selectVal
:
''
}
},
watch
:{
selectVal
(
val
){
this
.
$emit
(
'
input
'
,
val
)
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
</
style
>
src/views/ecw/customerCommissionInfo/darkServantAndProduct.vue
0 → 100644
View file @
1c95a56a
<
template
>
<el-form>
<el-form-item
label=
"商品类型"
>
<div
class=
"shanping-type"
>
<div
class=
"tool"
>
<el-input
placeholder=
"商品"
></el-input>
</div>
<div
class=
"box"
>
<div
class=
"label"
>
商品类型
</div>
<div
class=
"custom"
>
<custom-selectors-dictionary
label-key=
"attrName"
value-key=
"id"
:options=
"commodityType"
></custom-selectors-dictionary>
</div>
</div>
<div
class=
"box"
>
<div
class=
"label"
>
佣金
</div>
<div
class=
"custom"
>
<el-input></el-input>
</div>
<div
class=
"custom"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
></custom-selectors-dictionary>
</div>
<div
class=
"custom"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
></custom-selectors-dictionary>
</div>
</div>
<div>
<el-button
type=
"primary"
>
添加
</el-button>
</div>
</div>
</el-form-item>
</el-form>
</
template
>
<
script
>
//暗涌加产品
import
{
DICT_TYPE
,
getDictDatas
}
from
"
@/utils/dict
"
;
import
customSelectorsDictionary
from
"
@/views/ecw/customerCommissionInfo/customSelectorsDictionary
"
;
export
default
{
name
:
"
darkServantAndProduct
"
,
components
:{
customSelectorsDictionary
},
props
:{
commodityType
:{
type
:
Array
,
default
:()
=>
[]
}
},
data
(){
return
{
DICT_TYPE
,
getDictDatas
,
}
},
mounted
()
{
console
.
log
(
this
.
commodityType
,
'
commodityType
'
)
},
watch
:{
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.shanping-type
{
display
:
flex
;
.tool
{
width
:
150px
;
}
.box
{
margin-left
:
20px
;
display
:
flex
;
.label
{
width
:
80px
;
vertical-align
:
middle
;
font-size
:
14px
;
color
:
#606266
;
font-weight
:
700
;
}
.custom
{
width
:
150px
;
margin-right
:
10px
;
}
}
}
</
style
>
src/views/ecw/customerCommissionInfo/darkServantAndRebate.vue
0 → 100644
View file @
1c95a56a
<
template
>
<div>
<div
class=
"column"
>
<div
class=
"label"
>
佣金:
</div>
<div
class=
"content"
>
<div
class=
"item label"
>
满
</div>
<div
class=
"item"
><el-input></el-input></div>
<div
class=
"item"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
></custom-selectors-dictionary></div>
<div
class=
"item"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
></custom-selectors-dictionary>
</div>
</div>
<div
class=
"content"
>
<div
class=
"item label"
>
返
</div>
<div
class=
"item"
><el-input></el-input></div>
<div
class=
"item"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
></custom-selectors-dictionary></div>
<div
class=
"item"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
></custom-selectors-dictionary>
</div>
</div>
<el-button>
添加
</el-button>
</div>
</div>
</
template
>
<
script
>
//暗佣-达标返佣
import
customSelectorsDictionary
from
"
@/views/ecw/customerCommissionInfo/customSelectorsDictionary
"
;
import
{
DICT_TYPE
,
getDictDatas
}
from
"
@/utils/dict
"
;
export
default
{
name
:
"
darkServantAndRebate
"
,
components
:{
customSelectorsDictionary
},
data
(){
return
{
DICT_TYPE
,
getDictDatas
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.column
{
display
:
flex
;
align-items
:
center
;
.label
{
width
:
50px
;
white-space
:
nowrap
;
vertical-align
:
middle
;
font-size
:
14px
;
color
:
#606266
;
font-weight
:
700
;
}
}
.content
{
display
:
flex
;
align-items
:
center
;
margin-right
:
10px
;
.item
{
text-align
:
right
;
width
:
150px
;
margin
:
0
5px
;
}
.label
{
width
:
50px
;
}
}
</
style
>
src/views/ecw/customerCommissionInfo/index.vue
View file @
1c95a56a
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:inline=
"true"
>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"客户名称"
>
<el-select
v-model=
"customerForm.name"
filterable
remote
reserve-keyword
placeholder=
"请输入关键词"
:remote-method=
"remoteMethod"
>
<el-option
v-for=
"item in customeList"
:key=
"item.id"
:value=
"item.id.toString()"
:label=
"item.name"
>
{{
item
.
number
}}
|
{{
item
.
name
}}
|
{{
item
.
defaultContactPhone
}}
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"5"
>
<el-form-item
label=
"运输方式"
>
<div
style=
"width: 130px;"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE)"
></custom-selectors-dictionary>
</div>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"始发地"
>
<div
style=
"width: 130px;"
>
<custom-selectors-dictionary
v-model=
"value"
:options=
"getDictDatas(DICT_TYPE.COUNTRY)"
></custom-selectors-dictionary>
</div>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"目的地"
>
<div
style=
"width: 130px;"
>
<custom-selectors-dictionary
v-model=
"value"
:options=
"getDictDatas(DICT_TYPE.COUNTRY)"
></custom-selectors-dictionary>
</div>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
label=
"报关方式"
>
<div
style=
"width: 130px;"
>
<custom-selectors-dictionary
v-model=
"value"
:options=
"getDictDatas(DICT_TYPE.SHIPPING_DECLARATION_TYPE)"
></custom-selectors-dictionary>
</div>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label=
"备案"
>
<div
style=
"width: 130px;"
>
<custom-selectors-dictionary
v-model=
"value"
:options=
"getDictDatas(DICT_TYPE.COMMISSION_PRODUCT_APPROVAL)"
></custom-selectors-dictionary>
<!-- 搜索工作栏 -->
</div>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
</el-form-item>
<el-form-item
label=
"佣金表id"
prop=
"commissionId"
>
</el-col>
<el-input
v-model=
"queryParams.commissionId"
placeholder=
"请输入佣金表id"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-row>
</el-form-item>
<el-row>
<el-form-item
label=
"产品类型"
prop=
"productType"
>
<el-col
:span=
"24"
>
<el-select
v-model=
"queryParams.productType"
placeholder=
"请选择产品类型"
clearable
size=
"small"
>
<el-form-item
label=
"佣金类型(明佣、暗佣)"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
<el-radio-group
v-model=
"form.type"
>
</el-select>
<el-radio
v-for=
"(item,index) in getDictDatas(DICT_TYPE.COMMISSION_TYPE)"
:label=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</el-radio>
</el-form-item>
</el-radio-group>
<el-form-item
label=
"产品属性"
prop=
"productAttr"
>
</el-form-item>
<el-select
v-model=
"queryParams.productAttr"
placeholder=
"请选择产品属性"
clearable
size=
"small"
>
</el-col>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-row>
</el-select>
<el-row>
</el-form-item>
<el-col
:span=
"24"
>
<el-form-item
label=
"暗佣佣金"
prop=
"darkCommission"
>
<el-form-item
label=
"返佣类型"
>
<el-input
v-model=
"queryParams.darkCommission"
placeholder=
"请输入暗佣佣金"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-radio-group
v-model=
"form.darkReturnType"
>
</el-form-item>
<el-radio
v-for=
"(item,index) in getDictDatas(DICT_TYPE.COMMISSION_DARK_TYPE)"
:label=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</el-radio>
<el-form-item
label=
"暗佣货币"
prop=
"darkCurrency"
>
</el-radio-group>
<el-select
v-model=
"queryParams.darkCurrency"
placeholder=
"请选择暗佣货币"
clearable
size=
"small"
>
</el-form-item>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
</el-col>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-row>
</el-select>
<el-row>
</el-form-item>
<el-col
:span=
"24"
>
<el-form-item
label=
"暗佣单位"
prop=
"darkUnit"
>
<dark-servant-and-product
:commodityType=
"commodityType"
></dark-servant-and-product>
<el-select
v-model=
"queryParams.darkUnit"
placeholder=
"请选择暗佣单位"
clearable
size=
"small"
>
<dark-servant-and-rebate></dark-servant-and-rebate>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
<ming-servant-and-dark-servant></ming-servant-and-dark-servant>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-col>
</el-select>
</el-row>
</el-form-item>
<el-row
:gutter=
"50"
>
<el-form-item
label=
"暗佣上调"
prop=
"darkAdjustCommission"
>
<el-col
:span=
"12"
style=
"text-align: right"
>
<el-input
v-model=
"queryParams.darkAdjustCommission"
placeholder=
"请输入暗佣上调"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-button
type=
"primary"
>
确定
</el-button>
</el-form-item>
</el-col>
<el-form-item
label=
"暗佣货币上调"
prop=
"darkAdjustCurrency"
>
<el-col
:span=
"12"
>
<el-select
v-model=
"queryParams.darkAdjustCurrency"
placeholder=
"请选择暗佣货币上调"
clearable
size=
"small"
>
<el-button>
取消
</el-button>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
</el-col>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-row>
</el-select>
</el-form-item>
<el-form-item
label=
"暗佣单位上调"
prop=
"darkAdjustUnit"
>
<el-select
v-model=
"queryParams.darkAdjustUnit"
placeholder=
"请选择暗佣单位上调"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"满减"
prop=
"amount"
>
<el-input
v-model=
"queryParams.amount"
placeholder=
"请输入满减"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"满的货多少币"
prop=
"amountCurrency"
>
<el-select
v-model=
"queryParams.amountCurrency"
placeholder=
"请选择满的货多少币"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"满多少的单位"
prop=
"amountUnit"
>
<el-select
v-model=
"queryParams.amountUnit"
placeholder=
"请选择满多少的单位"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"返佣金的货币"
prop=
"refundCurrency"
>
<el-select
v-model=
"queryParams.refundCurrency"
placeholder=
"请选择返佣金的货币"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"满返"
prop=
"refund"
>
<el-input
v-model=
"queryParams.refund"
placeholder=
"请输入满返"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"返佣金的单位"
prop=
"refundUnit"
>
<el-select
v-model=
"queryParams.refundUnit"
placeholder=
"请选择返佣金的单位"
clearable
size=
"small"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
v-model=
"dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:customer-commission-info:create']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:customer-commission-info:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"佣金表id"
align=
"center"
prop=
"commissionId"
/>
<el-table-column
label=
"产品类型"
align=
"center"
prop=
"productType"
/>
<el-table-column
label=
"产品属性"
align=
"center"
prop=
"productAttr"
/>
<el-table-column
label=
"暗佣佣金"
align=
"center"
prop=
"darkCommission"
/>
<el-table-column
label=
"暗佣货币"
align=
"center"
prop=
"darkCurrency"
>
<template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_CURRENCY_TYPE"
:value=
"scope.row.darkCurrency"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"暗佣单位"
align=
"center"
prop=
"darkUnit"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_UNIT"
:value=
"scope.row.darkUnit"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"暗佣上调"
align=
"center"
prop=
"darkAdjustCommission"
/>
<el-table-column
label=
"暗佣货币上调"
align=
"center"
prop=
"darkAdjustCurrency"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_CURRENCY_TYPE"
:value=
"scope.row.darkAdjustCurrency"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"暗佣单位上调"
align=
"center"
prop=
"darkAdjustUnit"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_UNIT"
:value=
"scope.row.darkAdjustUnit"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"满减"
align=
"center"
prop=
"amount"
/>
<el-table-column
label=
"满的货多少币"
align=
"center"
prop=
"amountCurrency"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_CURRENCY_TYPE"
:value=
"scope.row.amountCurrency"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"满多少的单位"
align=
"center"
prop=
"amountUnit"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_UNIT"
:value=
"scope.row.amountUnit"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"返佣金的货币"
align=
"center"
prop=
"refundCurrency"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_CURRENCY_TYPE"
:value=
"scope.row.refundCurrency"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"满返"
align=
"center"
prop=
"refund"
/>
<el-table-column
label=
"返佣金的单位"
align=
"center"
prop=
"refundUnit"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMISSION_UNIT"
:value=
"scope.row.refundUnit"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:customer-commission-info:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:customer-commission-info:delete']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form-item
label=
"佣金表id"
prop=
"commissionId"
>
<el-input
v-model=
"form.commissionId"
placeholder=
"请输入佣金表id"
/>
</el-form-item>
<el-form-item
label=
"产品类型"
prop=
"productType"
>
<el-select
v-model=
"form.productType"
placeholder=
"请选择产品类型"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"产品属性"
prop=
"productAttr"
>
<el-select
v-model=
"form.productAttr"
placeholder=
"请选择产品属性"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"暗佣佣金"
prop=
"darkCommission"
>
<el-input
v-model=
"form.darkCommission"
placeholder=
"请输入暗佣佣金"
/>
</el-form-item>
<el-form-item
label=
"暗佣货币"
prop=
"darkCurrency"
>
<el-select
v-model=
"form.darkCurrency"
placeholder=
"请选择暗佣货币"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"暗佣单位"
prop=
"darkUnit"
>
<el-select
v-model=
"form.darkUnit"
placeholder=
"请选择暗佣单位"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"暗佣上调"
prop=
"darkAdjustCommission"
>
<el-input
v-model=
"form.darkAdjustCommission"
placeholder=
"请输入暗佣上调"
/>
</el-form-item>
<el-form-item
label=
"暗佣货币上调"
prop=
"darkAdjustCurrency"
>
<el-select
v-model=
"form.darkAdjustCurrency"
placeholder=
"请选择暗佣货币上调"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"暗佣单位上调"
prop=
"darkAdjustUnit"
>
<el-select
v-model=
"form.darkAdjustUnit"
placeholder=
"请选择暗佣单位上调"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"满减"
prop=
"amount"
>
<el-input
v-model=
"form.amount"
placeholder=
"请输入满减"
/>
</el-form-item>
<el-form-item
label=
"满的货多少币"
prop=
"amountCurrency"
>
<el-select
v-model=
"form.amountCurrency"
placeholder=
"请选择满的货多少币"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"满多少的单位"
prop=
"amountUnit"
>
<el-select
v-model=
"form.amountUnit"
placeholder=
"请选择满多少的单位"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"返佣金的货币"
prop=
"refundCurrency"
>
<el-select
v-model=
"form.refundCurrency"
placeholder=
"请选择返佣金的货币"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"满返"
prop=
"refund"
>
<el-input
v-model=
"form.refund"
placeholder=
"请输入满返"
/>
</el-form-item>
<el-form-item
label=
"返佣金的单位"
prop=
"refundUnit"
>
<el-select
v-model=
"form.refundUnit"
placeholder=
"请选择返佣金的单位"
>
<el-option
v-for=
"dict in this.getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
createCustomerCommissionInfo
,
updateCustomerCommissionInfo
,
deleteCustomerCommissionInfo
,
getCustomerCommissionInfo
,
getCustomerCommissionInfoPage
,
exportCustomerCommissionInfoExcel
}
from
"
@/api/ecw/customerCommissionInfo
"
;
import
{
itemTypeListApi
,
customerDropDownList
}
from
"
@/api/ecw/customerCommissionInfo
"
;
import
{
DICT_TYPE
,
getDictDatas
}
from
"
@/utils/dict
"
;
import
customSelectorsDictionary
from
"
./customSelectorsDictionary
"
import
darkServantAndProduct
from
"
./darkServantAndProduct
"
import
darkServantAndRebate
from
"
@/views/ecw/customerCommissionInfo/darkServantAndRebate
"
;
import
mingServantAndDarkServant
from
"
@/views/ecw/customerCommissionInfo/mingServantAndDarkServant
"
;
export
default
{
export
default
{
name
:
"
CustomerCommissionInfo
"
,
name
:
"
CustomerCommissionInfo
"
,
components
:
{
components
:
{
customSelectorsDictionary
,
darkServantAndProduct
,
darkServantAndRebate
,
mingServantAndDarkServant
},
},
data
()
{
data
()
{
return
{
return
{
// 遮罩层
value
:
''
,
loading
:
true
,
getDictDatas
,
// 导出遮罩层
DICT_TYPE
,
exportLoading
:
false
,
commodityType
:[],
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 客户佣金详情列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
dateRangeCreateTime
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
commissionId
:
null
,
productType
:
null
,
productAttr
:
null
,
darkCommission
:
null
,
darkCurrency
:
null
,
darkUnit
:
null
,
darkAdjustCommission
:
null
,
darkAdjustCurrency
:
null
,
darkAdjustUnit
:
null
,
amount
:
null
,
amountCurrency
:
null
,
amountUnit
:
null
,
refundCurrency
:
null
,
refund
:
null
,
refundUnit
:
null
,
},
// 表单参数
// 表单参数
form
:
{},
form
:
{
approval
:
""
,
// 产品备案
customerCommissionInfoBaseVOList
:[],
// 佣金详情
customerId
:
''
,
//客户id
customsType
:
''
,
//报关类别:我司全代:1,自单代报:2,混合报关:3
darkReturnType
:
this
.
getDictDatas
(
this
.
DICT_TYPE
.
COMMISSION_DARK_TYPE
),
// 暗佣类型 1产品2达标
departureId
:
''
,
// 始发地id
objectiveId
:
""
,
// 运输方式
type
:
this
.
getDictDatas
(
this
.
DICT_TYPE
.
COMMISSION_TYPE
)[
0
].
value
,
// 佣金类型
},
customerForm
:{
defaultContactName
:
undefined
,
defaultContactPhone
:
undefined
,
name
:
undefined
,
number
:
undefined
,
},
customeList
:[],
// 表单校验
// 表单校验
rules
:
{
rules
:
{
commissionId
:
[{
required
:
true
,
message
:
"
佣金表id不能为空
"
,
trigger
:
"
blur
"
}],
commissionId
:
[{
required
:
true
,
message
:
"
佣金表id不能为空
"
,
trigger
:
"
blur
"
}],
}
},
customerShow
:
true
};
};
},
},
created
()
{
created
()
{
this
.
get
List
();
this
.
get
ItemType
();
},
},
methods
:
{
methods
:
{
/
** 查询列表
*/
/
/ /** 查询列表客户
*/
getList
()
{
get
Custome
List
()
{
this
.
loading
=
true
;
customerDropDownList
(
this
.
customerForm
).
then
(
res
=>
{
// 处理查询参数
console
.
log
(
res
);
let
params
=
{...
this
.
queryParams
};
if
(
res
.
code
===
0
){
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
this
.
customeList
=
res
.
data
// 执行查询
}
getCustomerCommissionInfoPage
(
params
).
then
(
response
=>
{
})
this
.
list
=
response
.
data
.
list
;
},
this
.
total
=
response
.
data
.
total
;
remoteMethod
(
val
){
this
.
loading
=
false
;
this
.
customerForm
.
name
=
val
;
}
);
this
.
getCustomeList
(
);
},
},
/** 取消按钮 */
/** 取消按钮 */
cancel
()
{
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
},
/** 表单重置 */
/** 表单重置 */
reset
()
{
reset
()
{
...
@@ -349,80 +193,28 @@ export default {
...
@@ -349,80 +193,28 @@ export default {
},
},
/** 搜索按钮操作 */
/** 搜索按钮操作 */
handleQuery
()
{
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
},
/** 重置按钮操作 */
/** 重置按钮操作 */
resetQuery
()
{
resetQuery
()
{
this
.
dateRangeCreateTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
},
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加客户佣金详情
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
;
getCustomerCommissionInfo
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改客户佣金详情
"
;
});
},
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateCustomerCommissionInfo
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createCustomerCommissionInfo
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
// 商品类型
const
id
=
row
.
id
;
getItemType
(){
this
.
$modal
.
confirm
(
'
是否确认删除客户佣金详情编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
itemTypeListApi
().
then
(
res
=>
{
return
deleteCustomerCommissionInfo
(
id
);
if
(
res
.
code
===
0
){
}).
then
(()
=>
{
this
.
commodityType
=
res
.
data
;
this
.
getList
();
}
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
})
}).
catch
(()
=>
{});
},
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有客户佣金详情数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportCustomerCommissionInfoExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
src/views/ecw/customerCommissionInfo/mingServantAndDarkServant.vue
0 → 100644
View file @
1c95a56a
<
template
>
<div>
<div
class=
"mingServantAndDarkServant"
>
<div
class=
"box"
>
<div
class=
"label"
>
暗佣佣金:
</div>
<div
class=
"content"
>
<div
class=
"item"
>
<el-input></el-input>
</div>
<div
class=
"item"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
></custom-selectors-dictionary>
</div>
<div
class=
"item"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
></custom-selectors-dictionary>
</div>
</div>
</div>
<div
class=
"title"
>
<span
class=
"label"
>
成本价:
</span>
原价-暗佣佣金
</div>
<div
class=
"box"
>
<div
class=
"label"
>
销售价上调:
</div>
<div
class=
"content"
>
<div
class=
"item"
>
<el-input></el-input>
</div>
<div
class=
"item"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.COMMISSION_CURRENCY_TYPE)"
></custom-selectors-dictionary>
</div>
<div
class=
"item"
>
<custom-selectors-dictionary
:options=
"getDictDatas(DICT_TYPE.COMMISSION_UNIT)"
></custom-selectors-dictionary>
</div>
</div>
</div>
<div
class=
"title"
>
<span
class=
"label"
>
实际佣金返点:
</span>
销售价-成本价
</div>
</div>
</div>
</
template
>
<
script
>
//暗佣+明佣
import
customSelectorsDictionary
from
"
@/views/ecw/customerCommissionInfo/customSelectorsDictionary
"
;
import
{
DICT_TYPE
,
getDictDatas
}
from
"
@/utils/dict
"
;
export
default
{
name
:
"
mingServantAndDarkServant
"
,
components
:{
customSelectorsDictionary
},
data
(){
return
{
getDictDatas
,
DICT_TYPE
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.mingServantAndDarkServant
{
margin-top
:
10px
;
.box
{
display
:
flex
;
align-items
:
center
;
.label
{
vertical-align
:
middle
;
font-size
:
14px
;
color
:
#606266
;
font-weight
:
700
;
}
.content
{
display
:
flex
;
align-items
:
center
;
.item
{
margin-right
:
20px
;
}
}
}
.title
{
margin
:
15px
0
;
.label
{
vertical-align
:
middle
;
font-size
:
14px
;
color
:
#606266
;
font-weight
:
700
;
}
}
}
</
style
>
src/views/ecw/messageLeave/index.vue
View file @
1c95a56a
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:message-leave:update']"
>
修改
</el-button>
v-hasPermi=
"['ecw:message-leave:update']"
>
查看
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:message-leave:delete']"
>
删除
</el-button>
v-hasPermi=
"['ecw:message-leave:delete']"
>
删除
</el-button>
</
template
>
</
template
>
...
@@ -119,13 +119,55 @@
...
@@ -119,13 +119,55 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 留言详情-->
<el-dialog
title=
"留言详情"
:visible.sync=
"leavingShow"
width=
"500px"
append-to-body
>
<el-row
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
客户编号:
</el-col><el-col
:span=
"12"
>
{{}}
</el-col>
</el-row>
<el-row
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
姓名:
</el-col><el-col
:span=
"12"
>
{{messageVal.name ? messageVal.name : ''}}
</el-col>
</el-row>
<el-row
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
联系方式:
</el-col><el-col
:span=
"12"
>
{{messageVal.phone}}
</el-col>
</el-row>
<el-row
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
当前状态:
</el-col><el-col
:span=
"12"
>
{{messageVal.status === 1 ? '待回复' : '已回复'}}
</el-col>
</el-row>
<el-row
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
订单编号:
</el-col><el-col
:span=
"12"
>
{{messageVal.orderCode}}
</el-col>
</el-row>
<el-row
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
留言类型:
</el-col><el-col
:span=
"12"
>
{{messageVal.type === 1 ? '咨询':'建议'}}
</el-col>
</el-row>
<div
style=
"background-color:#cccccc;padding:10px 20px;"
>
<el-row
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
{{messageVal.type === 1 ? '咨询':'建议'}}时间:
</el-col><el-col
:span=
"12"
>
{{parseTime(messageVal.createTime)}}
</el-col>
</el-row>
<el-row
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
{{messageVal.type === 1 ? '咨询':'建议'}}类容:
</el-col><el-col
:span=
"12"
>
{{messageVal.content}}
</el-col>
</el-row>
</div>
<div
style=
"background-color:#f6f6f6;padding:10px 20px;margin-top: 20px;"
>
<el-row
v-if=
"messageVal.status === 2"
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
回复人:
</el-col><el-col
:span=
"12"
>
{{messageVal.replyUserId}}
</el-col>
</el-row>
<el-row
v-if=
"messageVal.status === 2"
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
回复时间:
</el-col><el-col
:span=
"12"
>
{{parseTime(messageVal.replyTime)}}
</el-col>
</el-row>
<el-row
class=
"el-row-leaving"
:gutter=
"10"
>
<el-col
:span=
"4"
>
回复类容:
</el-col><el-col
:span=
"12"
><el-input
type=
"textarea"
v-model=
"messageVal.replyContent"
:disabled=
"messageVal.status === 2"
></el-input></el-col><el-col
:span=
"4"
><el-button
v-if=
"messageVal.status === 1"
@
click=
"replyFn"
>
回复
</el-button></el-col>
</el-row>
</div>
<div
slot=
"footer"
style=
"text-align: center;"
>
<el-button
type=
"primary"
@
click=
"leavingShow = false;"
>
关 闭
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
createMessageLeave
,
replyMessageLeave
,
updateReply
,
deleteMessageLeave
,
getMessageLeave
,
getMessageLeavePage
,
exportMessageLeaveExcel
}
from
"
@/api/ecw/messageLeave
"
import
{
createMessageLeave
,
replyMessageLeave
,
updateReply
,
deleteMessageLeave
,
getMessageLeave
,
getMessageLeavePage
,
exportMessageLeaveExcel
}
from
"
@/api/ecw/messageLeave
"
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
export
default
{
export
default
{
name
:
"
MessageLeave
"
,
name
:
"
MessageLeave
"
,
components
:
{
components
:
{
...
@@ -133,6 +175,7 @@ export default {
...
@@ -133,6 +175,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
leavingShow
:
false
,
//留言详请弹窗
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
// 导出遮罩层
// 导出遮罩层
...
@@ -160,6 +203,19 @@ export default {
...
@@ -160,6 +203,19 @@ export default {
},
},
// 表单参数
// 表单参数
form
:
{},
form
:
{},
messageVal
:{
content
:
""
,
createTime
:
""
,
id
:
undefined
,
name
:
""
,
orderCode
:
""
,
phone
:
""
,
replyContent
:
""
,
replyTime
:
""
,
replyUserId
:
undefined
,
status
:
0
,
type
:
0
},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
}
}
...
@@ -226,8 +282,8 @@ export default {
...
@@ -226,8 +282,8 @@ export default {
const
id
=
row
.
id
;
const
id
=
row
.
id
;
getMessageLeave
(
id
).
then
(
response
=>
{
getMessageLeave
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
messageVal
=
response
.
data
;
this
.
title
=
"
修改留言
"
;
this
.
leavingShow
=
true
;
});
});
},
},
/** 提交按钮 */
/** 提交按钮 */
...
@@ -236,15 +292,6 @@ export default {
...
@@ -236,15 +292,6 @@ export default {
if
(
!
valid
)
{
if
(
!
valid
)
{
return
;
return
;
}
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
replyMessageLeave
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
// 添加的提交
createMessageLeave
(
this
.
form
).
then
(
response
=>
{
createMessageLeave
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
...
@@ -278,7 +325,19 @@ export default {
...
@@ -278,7 +325,19 @@ export default {
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
},
replyFn
(){
replyMessageLeave
({
id
:
this
.
messageVal
.
id
,
replyContent
:
this
.
messageVal
.
replyContent
,}).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
leavingShow
=
false
;
this
.
getList
();
});
}
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.el-row-leaving
{
margin-bottom
:
10px
;
}
</
style
>
src/views/ecw/oceanCustomer/index.vue
0 → 100644
View file @
1c95a56a
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"客户编号"
prop=
"number"
>
<el-input
v-model=
"queryParams.number"
placeholder=
"请输入客户编号"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"客户名称"
prop=
"name"
>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入客户名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"客户等级"
prop=
"level"
>
<el-select
v-model=
"queryParams.level"
placeholder=
"请选择客户等级"
clearable
size=
"small"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"客户来源"
prop=
"source"
>
<el-select
v-model=
"queryParams.source"
placeholder=
"请选择客户来源"
clearable
size=
"small"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"跟进客服"
prop=
"customerService"
>
<el-select
v-model=
"queryParams.customerService"
placeholder=
"请选择跟进客服"
clearable
size=
"small"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"客户状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择客户状态"
clearable
size=
"small"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"部门"
prop=
"department"
>
<el-input
v-model=
"queryParams.department"
placeholder=
"请输入部门"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"创建时间"
>
<el-date-picker
v-model=
"dateRangeCreateTime"
style=
"width: 240px"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"-"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:customer:create']"
>
新增
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:customer:export']"
>
导出
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"客户编号"
align=
"center"
prop=
"number"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"客户等级"
align=
"center"
prop=
"level"
>
<template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_LEVEL"
:value=
"scope.row.level"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"国家"
align=
"center"
prop=
"country"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMON_STATUS"
:value=
"scope.row.country"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"跟进客服"
align=
"center"
prop=
"customerService"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMON_STATUS"
:value=
"scope.row.customerService"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"客户状态"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_STATUS"
:value=
"scope.row.status"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"部门"
align=
"center"
prop=
"department"
/>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:customer:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:customer:delete']"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"900px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"150px"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
placeholder=
"请输入客户名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"国家"
prop=
"country"
>
<el-select
v-model=
"form.country"
placeholder=
"请选择国家"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户等级"
prop=
"level"
>
<el-select
v-model=
"form.level"
placeholder=
"请选择客户等级"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_LEVEL)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"所属代理"
prop=
"agentId"
>
<el-select
v-model=
"form.agentId"
placeholder=
"请选择所属代理"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"联系地址"
prop=
"address"
>
<el-input
v-model=
"form.address"
placeholder=
"请输入联系地址"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户类别"
prop=
"type"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择客户类别"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"常用提货网点"
prop=
"pickupPoint"
>
<el-select
v-model=
"form.pickupPoint"
placeholder=
"请输入常用提货网点"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"公司名称"
prop=
"company"
>
<el-input
v-model=
"form.company"
placeholder=
"请输入公司名称"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户生日"
prop=
"birthday"
>
<el-input
v-model=
"form.birthday"
placeholder=
"请输入客户生日"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"产品类型"
prop=
"productType"
>
<el-select
v-model=
"form.productType"
placeholder=
"请选择产品类型"
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"产品id"
prop=
"productId"
>
<el-input
v-model=
"form.productId"
placeholder=
"请输入产品id"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户来源"
prop=
"source"
>
<el-select
v-model=
"form.source"
placeholder=
"请选择客户来源"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"结算方式"
prop=
"balance"
>
<el-select
v-model=
"form.balance"
placeholder=
"请选择结算方式"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_BALANCE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"跟进客服"
prop=
"customerService"
>
<el-select
v-model=
"form.customerService"
placeholder=
"请选择跟进客服"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"图片"
prop=
"picture"
>
<el-input
v-model=
"form.picture"
placeholder=
"请输入图片"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"客户状态"
prop=
"status"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择客户状态"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_STATUS)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"推介人"
prop=
"promoter"
>
<el-input
v-model=
"form.promoter"
placeholder=
"请输入推介人"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建人"
prop=
"founder"
>
<el-input
v-model=
"form.founder"
placeholder=
"请输入创建人"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"创建时间"
prop=
"founder"
>
<el-input
v-model=
"form.founder"
placeholder=
"请输入创建人"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"form.remarks"
placeholder=
"请输入备注"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"到仓确认"
prop=
"arrivalConfirm"
>
<el-switch
v-model=
"form.arrivalConfirm"
:active-value=
"0"
:inactive-value=
"1"
/>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"重货标准(CBM)"
prop=
"weightUnit"
>
<el-input
v-model=
"form.weightUnit"
placeholder=
"请输入重货标准(CBM)"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item
label=
"关联会员账号"
prop=
"memberId"
>
<el-input
v-model=
"form.memberId"
placeholder=
"请输入关联会员账号"
/>
</el-form-item>
<el-form-item
label=
"部门"
prop=
"department"
>
<el-input
v-model=
"form.department"
placeholder=
"请输入部门"
/>
</el-form-item>
<el-form-item
label=
"发票抬头"
prop=
"invoiceTitle"
>
<el-input
v-model=
"form.invoiceTitle"
placeholder=
"请输入发票抬头"
/>
</el-form-item>
<el-form-item
label=
"纳税人识别号"
prop=
"licenseNumber"
>
<el-input
v-model=
"form.licenseNumber"
placeholder=
"请输入纳税人识别号"
/>
</el-form-item>
<el-form-item
label=
"开户行"
prop=
"bank"
>
<el-input
v-model=
"form.bank"
placeholder=
"请输入开户行"
/>
</el-form-item>
<el-form-item
label=
"账户"
prop=
"bankNumber"
>
<el-input
v-model=
"form.bankNumber"
placeholder=
"请输入账户"
/>
</el-form-item>
<el-form-item
label=
"项目"
prop=
"project"
>
<el-input
v-model=
"form.project"
placeholder=
"请输入项目"
/>
</el-form-item>
<el-form-item
label=
"开票地址"
prop=
"billingAddress"
>
<el-input
v-model=
"form.billingAddress"
placeholder=
"请输入开票地址"
/>
</el-form-item>
<el-form-item
label=
"开票电话"
prop=
"billingTell"
>
<el-input
v-model=
"form.billingTell"
placeholder=
"请输入开票电话"
/>
</el-form-item>
<el-form-item
label=
"税率"
prop=
"taxRate"
>
<el-input
v-model=
"form.taxRate"
placeholder=
"请输入税率"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
createCustomer
,
updateCustomer
,
deleteCustomer
,
getCustomer
,
getCustomerPage
,
exportCustomerExcel
,
getPublicList
}
from
"
@/api/ecw/customer
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
{
CommonStatusEnum
}
from
'
@/utils/constants
'
import
{
uploadFile
}
from
"
@/api/infra/file
"
;
export
default
{
name
:
"
oceanCustomer
"
,
components
:
{
},
data
()
{
return
{
getDictDatas
,
DICT_TYPE
,
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 客户列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
dateRangeCreateTime
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
number
:
null
,
name
:
null
,
level
:
null
,
source
:
null
,
customerService
:
null
,
status
:
null
,
department
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
name
:
[{
required
:
true
,
message
:
"
客户名称不能为空
"
,
trigger
:
"
blur
"
}],
weightUnit
:
[{
required
:
true
,
message
:
"
重货标准(CBM)不能为空
"
,
trigger
:
"
blur
"
}],
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行查询
getPublicList
(
params
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
id
:
undefined
,
number
:
undefined
,
name
:
undefined
,
level
:
undefined
,
country
:
undefined
,
type
:
undefined
,
agentId
:
undefined
,
company
:
undefined
,
address
:
undefined
,
productType
:
undefined
,
productId
:
undefined
,
pickupPoint
:
undefined
,
memberId
:
undefined
,
birthday
:
undefined
,
balance
:
undefined
,
source
:
undefined
,
picture
:
undefined
,
customerService
:
undefined
,
promoter
:
undefined
,
status
:
undefined
,
founder
:
undefined
,
department
:
undefined
,
invoiceTitle
:
undefined
,
licenseNumber
:
undefined
,
bank
:
undefined
,
bankNumber
:
undefined
,
project
:
undefined
,
billingAddress
:
undefined
,
billingTell
:
undefined
,
taxRate
:
undefined
,
remarks
:
undefined
,
arrivalConfirm
:
undefined
,
weightUnit
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeCreateTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加客户
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
;
getCustomer
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改客户
"
;
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateCustomer
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createCustomer
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除客户编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteCustomer
(
id
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有客户数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportCustomerExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
};
</
script
>
src/views/ecw/product/index.vue
View file @
1c95a56a
...
@@ -338,7 +338,8 @@ export default {
...
@@ -338,7 +338,8 @@ export default {
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'
ProductPrice
'
,
name
:
'
ProductPrice
'
,
query
:
{
query
:
{
product_id
:
row
.
id
product_id
:
row
.
id
,
product_type
:
row
.
typeId
}
}
})
})
},
},
...
...
src/views/ecw/productBrank/index.vue
View file @
1c95a56a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
68
px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"
120
px"
>
<el-form-item
label=
"品牌中文标题"
prop=
"titleZh"
>
<el-form-item
label=
"品牌中文标题"
prop=
"titleZh"
>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入品牌中文标题"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入品牌中文标题"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
</el-form-item>
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<!--
</el-form-item>
-->
<!--
</el-form-item>
-->
<el-form-item
label=
"是否备案"
prop=
"filing"
>
<el-form-item
label=
"是否备案"
prop=
"filing"
>
<el-select
v-model=
"queryParams.filing"
placeholder=
"请选择是否备案"
clearable
size=
"small"
>
<el-select
v-model=
"queryParams.filing"
placeholder=
"请选择是否备案"
clearable
size=
"small"
>
<el-option
v-for=
"dict in
this.
getDictDatas(DICT_TYPE.BRAND_REG_TYPE)"
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.BRAND_REG_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -79,8 +79,8 @@
...
@@ -79,8 +79,8 @@
@
pagination=
"getList"
/>
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
:close-on-click-modal=
"false"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
8
0px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
12
0px"
>
<el-form-item
label=
"品牌中文标题"
prop=
"titleZh"
>
<el-form-item
label=
"品牌中文标题"
prop=
"titleZh"
>
<el-input
v-model=
"form.titleZh"
placeholder=
"请输入品牌中文标题"
/>
<el-input
v-model=
"form.titleZh"
placeholder=
"请输入品牌中文标题"
/>
</el-form-item>
</el-form-item>
...
@@ -98,12 +98,32 @@
...
@@ -98,12 +98,32 @@
<!-- </el-form-item>-->
<!-- </el-form-item>-->
<el-form-item
label=
"是否备案"
prop=
"filing"
>
<el-form-item
label=
"是否备案"
prop=
"filing"
>
<el-select
v-model=
"form.filing"
placeholder=
"请选择是否备案"
>
<el-select
v-model=
"form.filing"
placeholder=
"请选择是否备案"
>
<el-option
v-for=
"dict in this.
getDictDatas(DICT_TYPE.BRAND_REG_TYPE)"
<el-option
v-for=
"dict in
getDictDatas(DICT_TYPE.BRAND_REG_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<h3>
包含商标列表
</h3>
<el-form
ref=
"form"
:model=
"brand"
label-width=
"80px"
v-for=
"(brand, index) in brands"
:key=
"index"
>
<el-form-item
label=
"商标"
>
<el-input
v-model=
"brand.name"
placeholder=
"商标"
></el-input>
</el-form-item>
<el-form-item
label=
"商标分类"
>
<el-select
v-model=
"brand.type"
placeholder=
"placeholder"
>
<el-option
v-for=
"item in []"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
...
@@ -124,6 +144,8 @@ export default {
...
@@ -124,6 +144,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
getDictDatas
,
DICT_TYPE
,
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
// 导出遮罩层
// 导出遮罩层
...
@@ -154,6 +176,7 @@ export default {
...
@@ -154,6 +176,7 @@ export default {
rules
:
{
rules
:
{
},
},
recordStatus
:
getDictDatas
(
DICT_TYPE
.
BRAND_REG_TYPE
),
recordStatus
:
getDictDatas
(
DICT_TYPE
.
BRAND_REG_TYPE
),
brands
:
[{
name
:
''
,
type
:
''
}]
};
};
},
},
created
()
{
created
()
{
...
...
src/views/ecw/productPrice/blacklist.vue
0 → 100644
View file @
1c95a56a
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"商品编码"
prop=
"productCode"
>
<el-input
v-model=
"queryParams.productCode"
placeholder=
"请输入商品编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"海关编码"
prop=
"customsCode"
>
<el-input
v-model=
"queryParams.customsCode"
placeholder=
"请输入海关编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"商品名称"
prop=
"titleZh"
>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入商品名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"商品类型"
prop=
"typeId"
>
<el-select
v-model=
"queryParams.typeId"
placeholder=
"选择商品类型"
clearable
>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"商品特性"
prop=
"attrId"
>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择商品特性"
clearable
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"始发地"
prop=
"startCityId"
>
<el-select
v-model=
"queryParams.startCityId"
clearable
>
<el-option
v-for=
"city in startCityList"
:key=
"city.id"
:label=
"city.titleZh"
:value=
"city.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"目的地"
prop=
"destCityId"
>
<el-select
v-model=
"queryParams.destCityId"
clearable
>
<el-option
v-for=
"city in destCityList"
:key=
"city.id"
:label=
"city.titleZh"
:value=
"city.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"空运渠道"
prop=
"shippingChannelId"
>
<el-select
v-model=
"queryParams.shippingChannelId"
clearable
>
<el-option
v-for=
"item in channelList"
:key=
"item.id"
:label=
"item.nameZh"
:value=
"item.channelId"
/>
</el-select>
</el-form-item>
<el-form-item
label=
""
prop=
"blacklist"
v-if=
"false"
>
<el-checkbox
v-model=
"queryParams.blacklist"
:true-label=
"1"
:false-label=
"0"
>
黑名单
</el-checkbox>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:product-price:create']"
>
新增
</el-button>
</el-col>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:product-price:export']"
>
导出
</el-button>
</el-col>
-->
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"序号"
prop=
"id"
width=
"50"
/>
<el-table-column
label=
"商品编码"
align=
"center"
prop=
"productCode"
>
<template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
productDO
.
productCode
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"海关编码"
align=
"center"
prop=
"customsCode"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
productDO
.
customsCode
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"商品类型"
align=
"center"
prop=
"typeId"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getTypeName
(
scope
.
row
.
productDO
.
typeId
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"商品名称"
align=
"center"
prop=
"productName"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
productDO
.
titleZh
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"tansportType"
label=
"运输方式"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<div>
{{
transportName
(
scope
.
row
.
warehouseLineDO
.
transportType
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"tansportType"
label=
"出货渠道"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"{row}"
>
<div>
{{
channelName
(
row
.
shippingChannelId
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"startDestTitle"
label=
"始发地/目的地"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
warehouseLineDO
.
startTitleZh
}}
<br
/>
{{
scope
.
row
.
warehouseLineDO
.
destTitleZh
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"price"
label=
"价格"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<div>
海运费:
{{
getCurrencySymbol
(
scope
.
row
.
transportPriceUnit
)
+
scope
.
row
.
transportPrice
}}
{{
getCurrencyTitle
(
scope
.
row
.
transportPriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
transportVolumeUnit
)
}}
<br
/>
清关费:
{{
getCurrencySymbol
(
scope
.
row
.
clearancePriceUnit
)
+
scope
.
row
.
clearancePrice
}}
{{
getCurrencyTitle
(
scope
.
row
.
clearancePriceUnit
)
+
'
/
'
+
getUnitTitle
(
scope
.
row
.
clearanceVolumeUnit
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"auditStatus"
align=
"center"
label=
"状态"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<div>
{{
statusName
(
scope
.
row
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"advanceStatus"
label=
"预付"
align=
"center"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<div>
{{
getAdvanceStatuTitle
(
scope
.
row
.
advanceStatus
)
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"140"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:product-price:update']"
>
修改
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'blacklist')"
v-hasPermi=
"['ecw:product-price:update']"
>
{{
scope
.
row
.
blacklist
==
0
?
'
加入黑名单
'
:
'
移除黑名单
'
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"updateStatus(scope.row, 'auditStatus')"
v-hasPermi=
"['ecw:product-price:update']"
>
{{
scope
.
row
.
auditStatus
==
AuditStatusEnum
.
PASS
?
'
下架
'
:
'
上架
'
}}
</el-button>
<!--
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:product-price:delete']"
>
删除
</el-button>
-->
</
template
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"900px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"110px"
>
<el-form-item
label=
"商品类型"
prop=
"typeId"
>
<el-select
v-model=
"form.typeId"
placeholder=
"选择产品类型"
disabled
>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"商品名称"
prop=
"titleZh"
>
<el-input
v-model=
"form.titleZh"
disabled
/>
</el-form-item>
<el-form-item
label=
"英文名称"
prop=
"titleEn"
>
<el-input
v-model=
"form.titleEn"
disabled
/>
</el-form-item>
<el-row
:gutter=
"20"
v-if=
"!form.id"
>
<el-col
:span=
"6"
>
<el-form-item
label=
"运输方式"
prop=
"transportType"
>
<el-select
v-model=
"form.transportType"
clearable
@
change=
"transportTypeChange"
>
<el-option
v-for=
"dict in transportDatas"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"始发地"
prop=
"startCityId"
>
<el-select
v-model=
"form.startCityId"
clearable
@
change=
"startCityChange"
>
<el-option
v-for=
"city in startCityList"
:key=
"city.id"
:label=
"city.titleZh"
:value=
"city.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"6"
>
<el-form-item
label=
"目的地"
prop=
"destCityId"
>
<el-select
v-model=
"form.destCityId"
clearable
@
change=
"destCityChange"
>
<el-option
v-for=
"city in destCityList"
:key=
"city.id"
:label=
"city.titleZh"
:value=
"city.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-table
ref=
"routeTable"
:data=
"routedList"
tooltip-effect=
"dark"
max-height=
"250"
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
:selectable=
"checkSelectable"
width=
"55"
>
</el-table-column>
<el-table-column
label=
"线路"
width=
"800"
>
<
template
slot-scope=
"scope"
>
{{
transportName
(
scope
.
row
.
transportType
)
+
'
从【
'
+
scope
.
row
.
startTitleZh
+
'
】发往【
'
+
scope
.
row
.
destTitleZh
+
'
】
'
}}
</
template
>
</el-table-column>
</el-table>
<br
/>
<el-form-item
label=
"海运费"
prop=
"transportPrice"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.transportPriceUnit"
>
<el-option
v-for=
"currency in currecyList"
:key=
"currency.id"
:label=
"currency.titleZh"
:value=
"currency.id"
/>
</el-select>
</el-col>
<el-col
:span=
"6"
>
<el-input
v-model.number=
"form.transportPrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.transportVolumeUnit"
>
<el-option
v-for=
"unit in unitList"
:key=
"unit.id"
:label=
"unit.titleZh"
:value=
"unit.id"
/>
</el-select>
</el-col>
</el-row>
</el-form-item>
<el-form-item
label=
"清关费"
prop=
"clearancePrice"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.clearancePriceUnit"
>
<el-option
v-for=
"currency in currecyList"
:key=
"currency.id"
:label=
"currency.titleZh"
:value=
"currency.id"
/>
</el-select>
</el-col>
<el-col
:span=
"6"
>
<el-input
v-model.number=
"form.clearancePrice"
type=
"number"
placeholder=
"整数或者两位小数"
/>
</el-col>
<el-col
:span=
"4"
>
<el-select
v-model=
"form.clearanceVolumeUnit"
>
<el-option
v-for=
"unit in unitList"
:key=
"unit.id"
:label=
"unit.titleZh"
:value=
"unit.id"
/>
</el-select>
</el-col>
</el-row>
</el-form-item>
<el-form-item
label=
"是否预付"
prop=
"advanceStatus"
>
<el-radio-group
v-model=
"form.advanceStatus"
>
<el-radio
v-for=
"advanceDict in advanceStatusDictDatas"
:key=
"advanceDict.value"
:label=
"parseInt(advanceDict.value)"
>
{{advanceDict.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<div
style=
"font-size:20px;"
>
基础信息
</div>
<el-form-item
label=
"需要预约入仓"
prop=
"needBook"
>
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
否
</el-radio>
</el-form-item>
<el-form-item
label=
"每日入仓上限"
prop=
"dayLimit"
>
<el-input
v-model.number=
"form.dayLimit"
type=
"number"
>
<
template
slot=
"append"
>
立方米
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"货柜位置"
prop=
"containerLocation"
>
<el-select
v-model=
"form.containerLocation"
placeholder=
"选择货柜位置"
clearable
>
<el-option
v-for=
"locationItem in locationList"
:key=
"locationItem.value"
:label=
"locationItem.label"
:value=
"locationItem.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"方数要求"
prop=
"square"
>
<el-input
v-model.number=
"form.square"
type=
"number"
>
<!-- <template slot="append">立方米</template> -->
</el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
createProductPrice
,
updateProductPrice
,
deleteProductPrice
,
getProductPrice
,
getProductPricePage
,
exportProductPriceExcel
}
from
"
@/api/ecw/productPrice
"
;
import
{
openedRouterList
}
from
"
@/api/ecw/warehouse
"
;
import
{
getCityList
}
from
"
@/api/ecw/region
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getUnitList
}
from
'
@/api/ecw/unit
'
;
import
{
AuditStatusEnum
}
from
'
@/utils/constants
'
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
DictTag
from
'
@/components/DictTag
'
import
{
arrryToKeyedObjectBy
}
from
'
@/utils/index
'
export
default
{
name
:
"
ProductPrice
"
,
components
:
{
DictTag
},
data
()
{
return
{
//特性列表
attrList
:[],
typeList
:
[],
product
:
null
,
startCityList
:
[],
//始发地城市
destCityList
:
[],
//目的地城市
routedList
:
[],
//已开头路线列表
currecyList
:
[],
//货币列表
unitList
:
[],
//单位列表
channelList
:[]
,
// 渠道
routeParams
:{},
//路线搜索条件
isUpdate
:
false
,
//更新操作
//货柜位置
locationList
:[],
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 产品价格列表
list
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
dateRangeCreateTime
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
productId
:
null
,
warehouseLineId
:
null
,
transportType
:
null
,
transportPrice
:
null
,
transportPriceUnit
:
null
,
transportVolumeUnit
:
null
,
clearancePrice
:
null
,
clearancePriceUnit
:
null
,
clearanceVolumeUnit
:
null
,
shippingChannelId
:
null
,
status
:
null
,
},
// 表单参数
form
:
{
typeId
:
null
,
titleZh
:
null
},
// 表单校验
rules
:
{
typeId
:
[{
required
:
true
,
message
:
"
产品类型不能为空
"
,
trigger
:
"
blur
"
}],
titleZh
:
[{
required
:
true
,
message
:
"
产品名称不能为空
"
,
trigger
:
"
blur
"
}],
titleEn
:
[{
required
:
true
,
message
:
"
英文名称不能为空
"
,
trigger
:
"
blur
"
}],
transportPrice
:
[{
required
:
true
,
message
:
"
海运费不能为空
"
,
trigger
:
"
blur
"
}],
clearancePrice
:
[{
required
:
true
,
message
:
"
清关费不能为空
"
,
trigger
:
"
blur
"
}],
advanceStatus
:
[{
required
:
true
,
message
:
"
是否预付不能为空
"
,
trigger
:
"
blur
"
}],
containerLocation
:[{
required
:
true
,
message
:
"
货柜位置不能为空
"
,
trigger
:
"
blur
"
}],
square
:[{
required
:
true
,
message
:
"
方数不能为空
"
,
trigger
:
"
blur
"
}],
needBook
:[{
required
:
true
,
message
:
"
预约入仓不能为空
"
,
trigger
:
"
blur
"
}],
},
lineList
:
[],
transportDatas
:
getDictDatas
(
DICT_TYPE
.
ECW_TRANSPORT_TYPE
),
advanceStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
ADVANCE_STATUS
),
AuditStatusEnum
:
AuditStatusEnum
,
locationList
:
getDictDatas
(
DICT_TYPE
.
ECW_CONTAINER_LOCATION
),
};
},
computed
:
{
keyedChannel
(){
return
arrryToKeyedObjectBy
(
this
.
channelList
,
'
channelId
'
)
},
channelName
(){
return
id
=>
{
return
this
.
keyedChannel
[
id
]
?
this
.
keyedChannel
[
id
].
nameZh
:
null
}
},
getTypeName
()
{
return
typeId
=>
{
for
(
let
index
in
this
.
typeList
)
{
let
typeItem
=
this
.
typeList
[
index
];
if
(
typeItem
.
id
==
typeId
)
{
return
typeItem
.
titleZh
;
}
}
}
},
statusName
()
{
return
row
=>
{
if
(
row
.
blacklist
)
return
'
黑名单
'
;
if
(
row
.
auditStatus
===
AuditStatusEnum
.
PASS
)
return
'
已审核
'
;
return
'
已下架
'
;
}
},
transportName
()
{
return
transportType
=>
{
return
this
.
getDictDataLabel
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
,
transportType
)
/* for(let index in this.transportDatas) {
let transportItem = this.transportDatas[index];
if(transportItem.value == transportType) {
return transportItem.label;
}
} */
}
},
getCurrencySymbol
()
{
return
currencyId
=>
{
for
(
let
index
in
this
.
currecyList
)
{
let
currecyItem
=
this
.
currecyList
[
index
];
if
(
currecyItem
.
id
==
currencyId
)
{
return
currecyItem
.
fuhao
;
}
}
}
},
getCurrencyTitle
()
{
return
currencyId
=>
{
for
(
let
index
in
this
.
currecyList
)
{
let
currecyItem
=
this
.
currecyList
[
index
];
if
(
currecyItem
.
id
==
currencyId
)
{
return
currecyItem
.
titleZh
;
}
}
}
},
getUnitTitle
()
{
return
unitId
=>
{
for
(
let
index
in
this
.
unitList
)
{
let
unitItem
=
this
.
unitList
[
index
];
if
(
unitItem
.
id
==
unitId
)
{
return
unitItem
.
titleZh
;
}
}
}
},
getAdvanceStatuTitle
()
{
return
value
=>
{
for
(
let
index
in
this
.
advanceStatusDictDatas
)
{
let
dictItem
=
this
.
advanceStatusDictDatas
[
index
];
if
(
dictItem
.
value
===
''
+
value
)
{
return
dictItem
.
label
;
}
}
}
}
},
created
()
{
this
.
queryParams
.
blacklist
=
1
;
// this.transportDatas = getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE);
// console.log(this.transportDatas);
let
productJson
=
localStorage
.
getItem
(
'
product
'
);
// console.log(productJson);
this
.
product
=
eval
(
'
(
'
+
productJson
+
'
)
'
);
let
typeListJson
=
localStorage
.
getItem
(
'
typeList
'
);
if
(
typeListJson
)
{
this
.
typeList
=
eval
(
'
(
'
+
typeListJson
+
'
)
'
);
}
else
{
this
.
getTypeList
();
}
this
.
getChannelList
()
this
.
getAttrList
();
this
.
getList
();
//获取城市列表
this
.
getAllCityList
();
//获取货币列表
this
.
requestCurrencyList
();
//获取单位列表
this
.
requestUnitList
();
},
methods
:
{
getChannelList
(){
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
},
/** 获取产品属性列表 */
getAttrList
()
{
getProductAttrList
().
then
(
response
=>
{
this
.
attrList
=
response
.
data
;
})
},
/** 获取产品类型列表 */
getTypeList
()
{
getProductTypeList
().
then
(
response
=>
{
this
.
typeList
=
response
.
data
;
})
},
/**获取所有城市列表 */
getAllCityList
()
{
getCityList
({}).
then
(
response
=>
{
let
cityList
=
response
.
data
;
for
(
let
index
in
cityList
)
{
let
city
=
cityList
[
index
];
if
(
city
.
type
==
'
1
'
)
{
//进口,目的地
this
.
destCityList
.
push
(
city
);
}
else
if
(
city
.
type
==
'
2
'
)
{
//出口,始发地
this
.
startCityList
.
push
(
city
);
}
else
if
(
city
.
type
==
'
3
'
)
{
//进出口
this
.
destCityList
.
push
(
city
);
this
.
startCityList
.
push
(
city
);
}
}
})
},
/**获取已开通路线列表 */
getOpenedRouterList
()
{
openedRouterList
(
this
.
routeParams
).
then
(
response
=>
{
this
.
routedList
=
response
.
data
;
this
.
setDefaultSelect
();
})
},
/**获取所有货币列表 */
requestCurrencyList
()
{
getCurrencyList
().
then
(
response
=>
{
this
.
currecyList
=
response
.
data
;
})
},
/**获取所有单位列表 */
requestUnitList
()
{
getUnitList
().
then
(
response
=>
{
this
.
unitList
=
response
.
data
;
})
},
handleSelectionChange
(
val
)
{
this
.
lineList
=
val
;
},
/**运输线路改变 */
transportTypeChange
(
newVal
)
{
this
.
routeParams
.
transportType
=
this
.
form
.
transportType
;
this
.
getOpenedRouterList
();
},
/**始发地改变 */
startCityChange
(
newVal
)
{
this
.
routeParams
.
startCityId
=
this
.
form
.
startCityId
;
this
.
getOpenedRouterList
();
},
/**目的地改变 */
destCityChange
(
newVal
)
{
this
.
routeParams
.
destCityId
=
this
.
form
.
destCityId
;
this
.
getOpenedRouterList
();
},
handleStatusChange
(
row
)
{
updateProductPrice
(
row
).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
}).
catch
(
function
()
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
});
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行查询
getProductPricePage
(
params
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
});
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
id
:
undefined
,
productId
:
undefined
,
warehouseLineId
:
undefined
,
transportPrice
:
undefined
,
transportPriceUnit
:
undefined
,
transportVolumeUnit
:
undefined
,
clearancePrice
:
undefined
,
clearancePriceUnit
:
undefined
,
clearanceVolumeUnit
:
undefined
,
status
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeCreateTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
return
this
.
$router
.
push
(
'
product-price/edit?
'
+
(
new
URLSearchParams
(
this
.
$route
.
query
)).
toString
())
this
.
reset
();
this
.
routeParams
=
{};
this
.
getOpenedRouterList
();
this
.
form
.
typeId
=
this
.
product
.
typeId
;
this
.
form
.
titleZh
=
this
.
product
.
titleZh
;
this
.
form
.
titleEn
=
this
.
product
.
titleEn
;
this
.
form
.
needBook
=
this
.
product
.
needBook
;
this
.
form
.
dayLimit
=
this
.
product
.
dayLimit
;
this
.
form
.
containerLocation
=
this
.
product
.
containerLocation
;
this
.
form
.
square
=
this
.
product
.
square
;
if
(
this
.
currecyList
)
{
let
priceUnitId
=
this
.
currecyList
[
0
].
id
;
this
.
form
.
transportPriceUnit
=
priceUnitId
;
this
.
form
.
clearancePriceUnit
=
priceUnitId
;
}
if
(
this
.
unitList
)
{
let
volumeUnitId
=
this
.
unitList
[
0
].
id
;
this
.
form
.
transportVolumeUnit
=
volumeUnitId
;
this
.
form
.
clearanceVolumeUnit
=
volumeUnitId
;
}
this
.
isUpdate
=
false
;
this
.
open
=
true
;
this
.
title
=
"
添加路线价格
"
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
return
this
.
$router
.
push
(
'
product-price/edit?id=
'
+
row
.
id
)
this
.
reset
();
const
id
=
row
.
id
;
let
lineId
=
row
.
warehouseLineId
;
this
.
routeParams
=
{
lineId
:
lineId
};
this
.
getOpenedRouterList
();
getProductPrice
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
.
typeId
=
this
.
product
.
typeId
;
this
.
form
.
titleZh
=
this
.
product
.
titleZh
;
this
.
form
.
titleEn
=
this
.
product
.
titleEn
;
this
.
isUpdate
=
true
;
// console.log(this.form);
this
.
open
=
true
;
this
.
title
=
"
修改路线价格
"
;
});
},
updateStatus
(
row
,
type
)
{
if
(
type
==
'
blacklist
'
)
{
row
.
blacklist
=
row
.
blacklist
==
0
?
1
:
0
;
}
else
if
(
type
==
'
auditStatus
'
)
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
}
updateProductPrice
(
row
).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
}).
catch
(
function
()
{
if
(
statusType
==
'
blacklist
'
)
{
row
.
blacklist
=
row
.
blacklist
===
1
?
0
:
1
;
}
else
{
row
.
auditStatus
=
row
.
auditStatus
===
AuditStatusEnum
.
PASS
?
AuditStatusEnum
.
NOT_PASS
:
AuditStatusEnum
.
PASS
;
}
});
},
checkSelectable
()
{
return
!
this
.
isUpdate
;
},
setDefaultSelect
()
{
let
vm
=
this
;
setTimeout
(()
=>
{
// 修改线路价格,选中已经选择的
if
(
vm
.
isUpdate
&&
vm
.
routedList
&&
vm
.
routedList
.
length
)
{
vm
.
$refs
.
routeTable
.
toggleRowSelection
(
vm
.
routedList
[
0
]);
}
},
300
);
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
if
(
!
this
.
lineList
||
!
this
.
lineList
.
length
)
{
this
.
$message
.
error
(
'
请选择线路
'
);
return
;
}
let
lineChannelList
=
[];
//TODO ,lineChannelList实体空运的时候需要传出货渠道ID--shippingChannelId
this
.
lineList
.
map
((
item
)
=>
{
lineChannelList
.
push
({
lineId
:
item
.
id
});
return
item
;
});
this
.
form
.
lineChannelList
=
lineChannelList
;
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateProductPrice
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
this
.
form
.
productId
=
this
.
product
.
id
;
createProductPrice
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
请求成功
"
);
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除产品价格编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteProductPrice
(
id
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有产品价格数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportProductPriceExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}
}
};
</
script
>
src/views/ecw/productPrice/index.vue
View file @
1c95a56a
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
""
prop=
"blacklist"
>
<el-form-item
label=
""
prop=
"blacklist"
v-if=
"false"
>
<el-checkbox
v-model=
"queryParams.blacklist"
<el-checkbox
v-model=
"queryParams.blacklist"
:true-label=
"1"
:false-label=
"0"
>
黑名单
</el-checkbox>
:true-label=
"1"
:false-label=
"0"
>
黑名单
</el-checkbox>
</el-form-item>
</el-form-item>
...
@@ -506,12 +506,24 @@ export default {
...
@@ -506,12 +506,24 @@ export default {
}
}
},
},
created
()
{
activated
()
{
let
typeId
=
this
.
$route
.
query
.
product_type
;
if
(
typeId
)
{
if
(
!
this
.
queryParams
.
typeId
||
this
.
queryParams
.
typeId
!=
typeId
)
this
.
$set
(
this
.
queryParams
,
'
typeId
'
,
typeId
);
// this.queryParams.typeId = typeId;
this
.
getList
();
}
},
created
()
{
// this.transportDatas = getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE);
// this.transportDatas = getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE);
// console.log(this.transportDatas);
// console.log(this.transportDatas);
let
productJson
=
localStorage
.
getItem
(
'
product
'
);
let
productJson
=
localStorage
.
getItem
(
'
product
'
);
// console.log(productJson);
// console.log(productJson);
this
.
product
=
eval
(
'
(
'
+
productJson
+
'
)
'
);
this
.
product
=
eval
(
'
(
'
+
productJson
+
'
)
'
);
let
typeListJson
=
localStorage
.
getItem
(
'
typeList
'
);
let
typeListJson
=
localStorage
.
getItem
(
'
typeList
'
);
if
(
typeListJson
)
{
if
(
typeListJson
)
{
...
...
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