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
13fe9053
Commit
13fe9053
authored
Mar 17, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
解决海运冲突
parents
f5728349
0a1f3df5
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1155 additions
and
24 deletions
+1155
-24
deptTarget.js
src/api/ecw/deptTarget.js
+40
-2
product.js
src/api/ecw/product.js
+8
-1
index.vue
src/views/ecw/box/shippingSea/nodePage/tally/index.vue
+10
-1
allAchievement.vue
src/views/ecw/deptTarget/allAchievement.vue
+492
-0
myDeptTarget.vue
src/views/ecw/deptTarget/myDeptTarget.vue
+479
-0
creatCollection.vue
src/views/ecw/financial/creatCollection.vue
+1
-1
prepayDeal.vue
src/views/ecw/order/prepayDeal.vue
+71
-7
index.vue
src/views/ecw/product/index.vue
+54
-12
No files found.
src/api/ecw/deptTarget.js
View file @
13fe9053
...
@@ -9,7 +9,7 @@ export function createDeptTarget(data) {
...
@@ -9,7 +9,7 @@ export function createDeptTarget(data) {
})
})
}
}
// 我的业绩
// 我的
部门
业绩
export
function
myDeptAchievementByPage
(
data
)
{
export
function
myDeptAchievementByPage
(
data
)
{
return
request
({
return
request
({
url
:
'
/sale/dept-target/myDeptAchievementByPage
'
,
url
:
'
/sale/dept-target/myDeptAchievementByPage
'
,
...
@@ -17,7 +17,7 @@ export function myDeptAchievementByPage(data) {
...
@@ -17,7 +17,7 @@ export function myDeptAchievementByPage(data) {
data
:
data
data
:
data
})
})
}
}
// 我的
部门
业绩
// 我的业绩
export
function
myAchievementByPage
(
data
)
{
export
function
myAchievementByPage
(
data
)
{
return
request
({
return
request
({
url
:
'
/sale/dept-target/myAchievementByPage
'
,
url
:
'
/sale/dept-target/myAchievementByPage
'
,
...
@@ -26,6 +26,15 @@ export function myAchievementByPage(data) {
...
@@ -26,6 +26,15 @@ export function myAchievementByPage(data) {
})
})
}
}
// 全部业绩
export
function
allAchievementByPage
(
data
)
{
return
request
({
url
:
'
/sale/dept-target/allAchievementByPage
'
,
method
:
'
post
'
,
data
:
data
})
}
// 更新部门业绩目标设置
// 更新部门业绩目标设置
export
function
updateDeptTarget
(
data
)
{
export
function
updateDeptTarget
(
data
)
{
return
request
({
return
request
({
...
@@ -67,6 +76,15 @@ export function getDeptTargetPage(query) {
...
@@ -67,6 +76,15 @@ export function getDeptTargetPage(query) {
})
})
}
}
// 获得我的部门及以下业绩目标设置分页
export
function
getMyDeptTargetPage
(
query
)
{
return
request
({
url
:
'
/sale/dept-target/deptStatistics/page
'
,
method
:
'
get
'
,
params
:
query
})
}
// 获得个人目标进度分页
// 获得个人目标进度分页
export
function
getPersonTargetPage
(
query
)
{
export
function
getPersonTargetPage
(
query
)
{
return
request
({
return
request
({
...
@@ -85,3 +103,23 @@ export function exportDeptTargetExcel(query) {
...
@@ -85,3 +103,23 @@ export function exportDeptTargetExcel(query) {
responseType
:
'
blob
'
responseType
:
'
blob
'
})
})
}
}
// 导出部门业绩目标设置 Excel
export
function
exportDetailExcel
(
query
)
{
return
request
({
url
:
'
/sale/dept-target/exportDetailExcel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
// 导出部门业绩目标设置 Excel
export
function
exportStatisticsExcel
(
query
)
{
return
request
({
url
:
'
/sale/dept-target/exportStatisticsExcel
'
,
method
:
'
get
'
,
params
:
query
,
responseType
:
'
blob
'
})
}
src/api/ecw/product.js
View file @
13fe9053
...
@@ -78,4 +78,11 @@ export function calculationPrice(data){
...
@@ -78,4 +78,11 @@ export function calculationPrice(data){
method
:
'
post
'
,
method
:
'
post
'
,
data
:
data
data
:
data
})
})
}
}
\ No newline at end of file
//新增商品可用优惠信息列表
export
function
product_coupon_newProd
(){
return
request
({
url
:
'
/product/coupon/newProd/list
'
,
method
:
'
get
'
,
})
}
src/views/ecw/box/shippingSea/nodePage/tally/index.vue
View file @
13fe9053
...
@@ -171,7 +171,16 @@ export default {
...
@@ -171,7 +171,16 @@ export default {
});
});
});
});
});
});
this
.
tallyList
=
list
;
let
relist
=
[]
list
.
forEach
(
l
=>
{
let
index
=
relist
.
findIndex
(
i
=>
i
.
orderId
==
l
.
orderId
&&
i
.
positionNo
==
l
.
positionNo
)
if
(
index
==
-
1
){
relist
.
push
(
l
)
}
else
{
relist
[
index
].
warehouseInInfo
.
cartonsNum
=
parseInt
(
relist
[
index
].
warehouseInInfo
.
cartonsNum
)
+
parseInt
(
l
.
warehouseInInfo
.
cartonsNum
)
}
})
this
.
tallyList
=
relist
;
});
});
},
},
// 选中
// 选中
...
...
src/views/ecw/deptTarget/allAchievement.vue
0 → 100644
View file @
13fe9053
<
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=
"$t('关键字')"
prop=
"transportType"
>
<el-input
v-model=
"queryParams.key"
:placeholder=
"$t('请输入关键字查找')"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportType"
formatter=
"number"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('唛头')"
prop=
"transportType"
>
<el-input
v-model=
"queryParams.marks"
:placeholder=
"$t('请输入关键字查找')"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('资源类型')"
prop=
"customerType"
>
<!--
<el-select
clearable
v-model=
"queryParams.customerType"
:placeholder=
"$t('请选择资源类型')"
clearable
size=
"small"
>
<el-option
v-for=
"dict in getDictDatas(DICT_TYPE.CUSTOMER_ESOURCE_TYPE)"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
-->
<dict-selector
:type=
"DICT_TYPE.CUSTOMER_ESOURCE_TYPE"
v-model=
"queryParams.customerType"
:placeholder=
"$t('请选择资源类型')"
clearable
></dict-selector>
</el-form-item>
<!--
<el-form-item
:label=
"$t('客户经理')"
prop=
"customerService"
>
<el-select
clearable
v-model=
"queryParams.customerService"
:placeholder=
"$t('请选择客户经理')"
clearable
size=
"small"
>
<el-option
v-for=
"dict in customerServiceList"
:key=
"dict.id"
:label=
"dict.nickname"
:value=
"dict.id"
/>
</el-select>
</el-form-item>
-->
<!--
<el-form-item
prop=
"customerService"
>
<el-select
clearable
v-model=
"queryParams.customerService"
clearable
size=
"small"
>
<el-option
:label=
"$t('下单时间')"
value=
"createTime"
/>
<el-option
:label=
"$t('装柜时间')"
value=
"ldBoxTime"
/>
</el-select>
</el-form-item>
-->
<el-form-item>
<el-date-picker
v-model=
"dateFilter"
type=
"datetimerange"
range-separator=
"-"
:start-placeholder=
"$t('开始日期')"
:end-placeholder=
"$t('结束日期')"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
<!--
<el-date-picker
v-model=
"queryParams.beginStartTime"
:placeholder=
"$t('请选择开始时间')"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
-->
</el-form-item>
<!--
<el-form-item
:label=
"$t('结束时间')"
prop=
"endStartTime"
>
-->
<!--
<el-date-picker
v-model=
"queryParams.endStartTime"
:placeholder=
"$t('请选择结束时间')"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
-->
<!--
</el-form-item>
-->
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"resetQuery"
>
{{
$t
(
'
重置
'
)
}}
</el-button>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExportDetail"
:loading=
"exportLoading"
>
{{
$t
(
'
导出明细
'
)
}}
</el-button>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExportStatistics"
:loading=
"exportLoading"
>
{{
$t
(
'
导出统计
'
)
}}
</el-button>
<!--
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
-->
</el-form-item>
</el-form>
<div
class=
"total_num"
>
<span>
{{
$t
(
'
开发客户:
'
)
}}
</span>
<span>
{{
$t
(
'
总箱数
'
)
}}
{{
totalData
.
developNum
}}{{
$t
(
'
箱
'
)
}}
</span>
<span>
{{
$t
(
'
总方数
'
)
}}
{{
totalData
.
developVolume
}}
m³
</span>
<span>
{{
$t
(
'
总重量
'
)
}}
{{
totalData
.
developWeight
}}
KG
</span>
<span>
{{
$t
(
'
公司客户:
'
)
}}
</span>
<span>
{{
$t
(
'
总箱数
'
)
}}
{{
totalData
.
companyNum
}}{{
$t
(
'
箱
'
)
}}
</span>
<span>
{{
$t
(
'
总方数
'
)
}}
{{
totalData
.
companyVolume
}}
m³
</span>
<span>
{{
$t
(
'
总重量
'
)
}}
{{
totalData
.
companyWeight
}}
KG
</span>
<span>
{{
$t
(
'
汇总:
'
)
}}
</span>
<span>
{{
$t
(
'
总箱数
'
)
}}
{{
totalData
.
sumNum
}}{{
$t
(
'
箱
'
)
}}
</span>
<span>
{{
$t
(
'
总方数
'
)
}}
{{
totalData
.
sumVolume
}}
m³
</span>
<span>
{{
$t
(
'
总重量
'
)
}}
{{
totalData
.
sumWeight
}}
KG
</span>
</div>
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
:label=
"$t('序号')"
align=
"center"
type=
"index"
></el-table-column>
-->
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
:label=
"$t('资源类型')"
align=
"center"
>
<template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.CUSTOMER_ESOURCE_TYPE"
:value=
"scope.row.customerType"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('报价单号')"
align=
"center"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
number
}}
</span>
</
template
>
</el-table-column>
<!-- <el-table-column :label="$t('报价结果')" align="center">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ECW_OFFER_STATUS" :value="scope.row.offerStatus"/>
</template>
</el-table-column> -->
<el-table-column
:label=
"$t('订单号')"
align=
"center"
prop=
"orderNo"
/>
<el-table-column
:label=
"$t('客户名称')"
align=
"center"
prop=
"name"
/>
<el-table-column
:label=
"$t('联系方式')"
align=
"center"
prop=
"phoneNew"
/>
<el-table-column
:label=
"$t('唛头')"
align=
"center"
prop=
"marks"
/>
<el-table-column
:label=
"$t('订单状态')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.ORDER_STATUS"
:value=
"scope.row.status"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('是否控货')"
align=
"center"
prop=
"isCargoControl"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
isCargoControl
?
$t
(
'
是
'
):
$t
(
'
否
'
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('重量')"
align=
"center"
prop=
"completeWeight"
/>
<el-table-column
:label=
"$t('方数')"
align=
"center"
prop=
"completeVolume"
/>
<el-table-column
:label=
"$t('下单时间')"
align=
"center"
prop=
"createTime"
/>
<el-table-column
:label=
"$t('装柜时间')"
align=
"center"
prop=
"ldBoxTime"
/>
<el-table-column
:label=
"$t('客户经理')"
align=
"center"
prop=
"userId"
:formatter=
"customerServiceFn"
>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
import
{
createDeptTarget
,
updateDeptTarget
,
deleteDeptTarget
,
getDeptTarget
,
getDeptTargetPage
,
exportDeptTargetExcel
,
exportDetailExcel
,
exportStatisticsExcel
,
getCreateInitData
,
getPersonTargetPage
,
allAchievementByPage
}
from
"
@/api/ecw/deptTarget
"
;
import
{
listSimpleDepts
}
from
"
@/api/system/dept
"
;
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
dayjs
from
"
dayjs
"
;
import
{
listServiceUser
}
from
"
@/api/system/user
"
;
export
default
{
name
:
"
DeptTarget
"
,
components
:
{},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
tableTotal
:
0
,
// 部门业绩目标设置列表
list
:
[],
tableList
:
[],
// 弹出层标题
title
:
""
,
dateFilter
:[],
detail
:
{
deptName
:
null
,
targetType
:
null
,
cubeNum
:
null
,
shippingChannel
:
null
,
transportType
:
null
,
},
// 是否显示弹出层
open
:
false
,
tableOpen
:
false
,
dateRangeCreateTime
:
[],
dateRangeStartTime
:
[],
dateRangeEndTime
:
[],
deptData
:
[],
deptArr
:
[],
channelList
:
[],
monthList
:
[],
quarterList
:
[],
yearList
:
[],
targetPeriod
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
beginStartTime
:
null
,
transportType
:
null
,
shippingChannel
:
null
,
endStartTime
:
null
,
},
tableQueryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
id
:
null
,
},
// 表单参数
form
:
{},
customerServiceList
:[],
// 表单校验
rules
:
{
deptId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
部门ID不能为空
"
),
trigger
:
"
blur
"
}],
targetType
:
[{
required
:
true
,
message
:
this
.
$t
(
"
目标类型不能为空
"
),
trigger
:
"
change
"
}],
cubeNum
:
[{
required
:
true
,
message
:
this
.
$t
(
"
立方数不能为空
"
),
trigger
:
"
blur
"
}],
},
totalData
:{
companyWeight
:
0
,
companyVolume
:
0
,
companyNum
:
0
,
developWeight
:
0
,
developVolume
:
0
,
developNum
:
0
,
sumWeight
:
0
,
sumVolume
:
0
,
sumNum
:
0
,
},
myAchievementData
:{}
};
},
computed
:
{
getShipChannelName
()
{
return
shippingChannelId
=>
{
for
(
let
index
in
this
.
channelList
)
{
let
channelItem
=
this
.
channelList
[
index
];
if
(
channelItem
.
channelId
==
shippingChannelId
)
{
return
this
.
$l
(
channelItem
,
'
name
'
);
}
}
return
'
/
'
}
}
},
created
()
{
this
.
getChannelList
();
this
.
getList
();
listServiceUser
().
then
(
r
=>
{
this
.
customerServiceList
=
r
.
data
;
})
},
methods
:
{
getChannelList
()
{
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
},
dateFormat
(
val
)
{
return
dayjs
(
val
).
format
(
"
YYYY-MM-DD
"
);
},
changeList
(
val
)
{
if
(
val
===
1
)
{
this
.
form
.
targetPeriodName
=
undefined
;
this
.
targetPeriod
=
this
.
monthList
;
}
else
if
(
val
===
2
)
{
this
.
form
.
targetPeriodName
=
undefined
;
this
.
targetPeriod
=
this
.
quarterList
;
}
else
{
this
.
form
.
targetPeriodName
=
undefined
;
this
.
targetPeriod
=
this
.
yearList
;
}
},
setTime
(
item
)
{
this
.
targetPeriod
.
forEach
((
i
,
index
)
=>
{
if
(
i
.
name
===
item
)
{
this
.
form
.
startTime
=
i
.
startDate
;
this
.
form
.
endTime
=
i
.
endDate
;
}
})
},
customerServiceFn
(
val
){
if
(
this
.
customerServiceList
.
length
>
0
){
let
index
=
this
.
customerServiceList
.
findIndex
(
item
=>
item
.
id
===
val
.
userId
);
return
index
!==
-
1
?
this
.
customerServiceList
[
index
]?.
nickname
:
''
}
else
{
return
''
}
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 执行查询
allAchievementByPage
(
this
.
queryParams
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
myAchievementDtos
.
list
;
this
.
total
=
response
.
data
.
myAchievementDtos
.
total
;
this
.
myAchievementData
=
response
.
data
this
.
totalData
.
sumWeight
=
this
.
myAchievementData
.
totalWeight
this
.
totalData
.
sumVolume
=
this
.
myAchievementData
.
totalVolume
this
.
totalData
.
sumNum
=
this
.
myAchievementData
.
totalNum
this
.
totalData
.
companyWeight
=
this
.
myAchievementData
.
companyTotalWeight
this
.
totalData
.
companyVolume
=
this
.
myAchievementData
.
companyTotalVolume
this
.
totalData
.
companyNum
=
this
.
myAchievementData
.
companyTotalNum
this
.
totalData
.
developWeight
=
this
.
myAchievementData
.
devTotalWeight
this
.
totalData
.
developVolume
=
this
.
myAchievementData
.
devTotalVolume
this
.
totalData
.
developNum
=
this
.
myAchievementData
.
devTotalNum
this
.
loading
=
false
;
});
},
/** 取消按钮 */
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
/** 表单重置 */
reset
()
{
this
.
form
=
{
id
:
undefined
,
deptId
:
undefined
,
targetType
:
undefined
,
targetPeriodName
:
undefined
,
startTime
:
undefined
,
endTime
:
undefined
,
transportType
:
undefined
,
shippingChannel
:
undefined
,
cubeNum
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
queryParams
.
beginStartTime
=
this
.
dateFilter
[
0
];
this
.
queryParams
.
endStartTime
=
this
.
dateFilter
[
1
];
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateFilter
=
[]
this
.
dateRangeCreateTime
=
[];
this
.
dateRangeStartTime
=
[];
this
.
dateRangeEndTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
targetPeriod
=
this
.
monthList
;
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
this
.
$t
(
"
添加部门业绩目标设置
"
);
},
/** 查看人员目标情况 */
handleView
(
row
)
{
this
.
detail
=
row
;
this
.
tableQueryParams
.
id
=
row
.
id
;
this
.
getTableList
();
this
.
tableOpen
=
true
;
},
getTableList
()
{
getPersonTargetPage
(
this
.
tableQueryParams
).
then
(
res
=>
{
this
.
tableList
=
res
.
data
.
list
;
this
.
tableTotal
=
res
.
data
.
total
;
});
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
;
getDeptTarget
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
if
(
response
.
data
.
targetType
===
1
)
{
this
.
targetPeriod
=
this
.
monthList
;
}
else
if
(
response
.
data
.
targetType
===
2
)
{
this
.
targetPeriod
=
this
.
quarterList
;
}
else
{
this
.
targetPeriod
=
this
.
yearList
;
}
this
.
open
=
true
;
this
.
title
=
this
.
$t
(
"
修改部门业绩目标设置
"
);
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateDeptTarget
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
));
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createDeptTarget
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
));
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认删除部门业绩目标设置编号为{id}的数据项?
'
,
{
id
})).
then
(
function
()
{
return
deleteDeptTarget
(
id
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
));
}).
catch
(()
=>
{
});
},
handleSelectionChange
(
val
){
if
(
val
&&
val
.
length
>
0
){
var
data
=
{
companyWeight
:
0
,
companyVolume
:
0
,
companyNum
:
0
,
developWeight
:
0
,
developVolume
:
0
,
developNum
:
0
,
sumWeight
:
0
,
sumVolume
:
0
,
sumNum
:
0
,
}
val
.
forEach
(
item
=>
{
if
(
item
.
customerType
==
1
){
data
.
developWeight
+=
item
.
completeWeight
data
.
developVolume
+=
item
.
completeVolume
data
.
developNum
+=
item
.
sumNum
}
else
{
data
.
companyWeight
+=
item
.
completeWeight
data
.
companyVolume
+=
item
.
completeVolume
data
.
companyNum
+=
item
.
sumNum
}
data
.
sumWeight
+=
item
.
completeWeight
data
.
sumVolume
+=
item
.
completeVolume
data
.
sumNum
+=
item
.
sumNum
})
this
.
$set
(
this
,
'
totalData
'
,
data
)
}
else
{
this
.
totalData
.
sumWeight
=
this
.
myAchievementData
.
totalWeight
this
.
totalData
.
sumVolume
=
this
.
myAchievementData
.
totalVolume
this
.
totalData
.
sumNum
=
this
.
myAchievementData
.
totalNum
this
.
totalData
.
companyWeight
=
this
.
myAchievementData
.
companyTotalWeight
this
.
totalData
.
companyVolume
=
this
.
myAchievementData
.
companyTotalVolume
this
.
totalData
.
companyNum
=
this
.
myAchievementData
.
companyTotalNum
this
.
totalData
.
developWeight
=
this
.
myAchievementData
.
devTotalWeight
this
.
totalData
.
developVolume
=
this
.
myAchievementData
.
devTotalVolume
this
.
totalData
.
developNum
=
this
.
myAchievementData
.
devTotalNum
}
},
/** 导出按钮操作 */
handleExportDetail
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
params
.
beginStartTime
=
this
.
dateFilter
[
0
];
params
.
endStartTime
=
this
.
dateFilter
[
1
];
// this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// this.addBeginAndEndTime(params, this.dateRangeStartTime, 'startTime');
// this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
// 执行导出
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认导出所有部门业绩数据项?
'
)).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportDetailExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
`
${
this
.
$t
(
'
业绩明细
'
)}
.xls`
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExportStatistics
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
params
.
beginStartTime
=
this
.
dateFilter
[
0
];
params
.
endStartTime
=
this
.
dateFilter
[
1
];
// this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// this.addBeginAndEndTime(params, this.dateRangeStartTime, 'startTime');
// this.addBeginAndEndTime(params, this.dateRangeEndTime, 'endTime');
// 执行导出
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认导出所有部门业绩统计?
'
)).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportStatisticsExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
`
${
this
.
$t
(
'
业绩统计
'
)}
.xls`
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{
});
}
}
};
</
script
>
<
style
scoped
>
.total_num
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
margin
:
20px
0
;
font-size
:
15px
;
}
.total_num
span
{
margin
:
0
8px
;
}
</
style
>
src/views/ecw/deptTarget/myDeptTarget.vue
0 → 100644
View file @
13fe9053
<
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=
"$t('部门')"
prop=
"deptId"
>
<el-select
v-model=
"queryParams.deptId"
style=
"width: 300px;"
:placeholder=
"$t('请选择部门')"
clearable
>
<el-option
v-for=
"item in this.deptData"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目标类型')"
prop=
"targetType"
>
<dict-selector
:type=
"DICT_TYPE.TARGET_TYPE"
v-model=
"queryParams.targetType"
formatter=
"number"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportType"
formatter=
"number"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannel"
>
<el-select
v-model=
"queryParams.shippingChannel"
:placeholder=
"$t('请选择出货渠道')"
clearable
>
<el-option
v-for=
"item in channelList"
:label=
"item.nameZh"
:value=
"item.channelId"
:key=
"item.channelId"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{
$t
(
'
重置
'
)
}}
</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:dept-target:create']">
{{
$t
(
'
目标设置
'
)
}}
-->
<!--
</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=
"$t('目标名称')"
align=
"center"
width=
"180"
>
<template
slot-scope=
"scope"
>
<router-link
:to=
"
{path: '/deptTarget/empAchievement',query: {row: scope.row}}" class="link-type">
<span>
{{
scope
.
row
.
deptName
}}{{
scope
.
row
.
targetPeriodName
}}{{
$t
(
'
目标
'
)
}}
</span>
</router-link>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('部门')"
align=
"center"
prop=
"deptName"
/>
<el-table-column
:label=
"$t('目标类型')"
align=
"center"
prop=
"targetType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.TARGET_TYPE"
:value=
"scope.row.targetType"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('时间范围')"
align=
"center"
prop=
"targetPeriodName"
>
<
template
slot-scope=
"scope"
>
<span>
{{
dateFormat
(
scope
.
row
.
startTime
)
}}
~
{{
dateFormat
(
scope
.
row
.
endTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('部门人数')"
align=
"center"
prop=
"deptEmpCount"
/>
<el-table-column
:label=
"$t('目标方数')"
align=
"center"
prop=
"cubeNum"
/>
<el-table-column
:label=
"$t('运输方式')"
align=
"center"
prop=
"transportType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.TRANSPORT_TYPE"
:value=
"scope.row.transportType"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('出货渠道')"
align=
"center"
prop=
"shippingChannel"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getShipChannelName
(
scope
.
row
.
shippingChannel
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('已完成方数')"
align=
"center"
prop=
"completeCubeNum"
/>
<el-table-column
:label=
"$t('完成比例')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<span>
{{
(
scope
.
row
.
completeCubeNum
/
scope
.
row
.
cubeNum
*
100
).
toFixed
(
2
)
+
'
%
'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
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:dept-target:update']"
>
{{
$t
(
'
修改
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:dept-target:delete']"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
<!--
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-search"
@
click=
"handleView(scope.row)"
--
>
<!-- v-hasPermi="['ecw:dept-target:create']">
</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=
"$t('部门')"
prop=
"deptId"
>
<el-select
v-model=
"form.deptId"
style=
"width: 300px;"
:placeholder=
"$t('请选择部门')"
>
<el-option
v-for=
"item in this.deptData"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('目标类型')"
prop=
"targetType"
>
<!-- <el-select v-model="form.targetType" :placeholder="$t('请选择运输方式')" @change="changeList">
<el-option v-for="dict in getDictDatas(DICT_TYPE.TARGET_TYPE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)"/>
</el-select> -->
<dict-selector
:type=
"DICT_TYPE.TARGET_TYPE"
v-model=
"form.targetType"
:placeholder=
"$t('请选择目标类型')"
/>
</el-form-item>
<div
class=
"flex"
>
<el-form-item
:label=
"$t('计算周期')"
prop=
"startTime"
>
<el-date-picker
v-model=
"form.startTime"
placeholder=
""
value-format=
"yyyy-MM-dd HH:mm:ss"
class=
"w-150"
></el-date-picker>
</el-form-item>
<div
class=
"ml-10 mr-10 flex flex-center"
style=
"margin-bottom:22px"
>
-
</div>
<el-form-item
prop=
"endTime"
label-width=
"0"
>
<el-date-picker
v-model=
"form.endTime"
placeholder=
""
value-format=
"yyyy-MM-dd HH:mm:ss"
class=
"w-150"
></el-date-picker>
</el-form-item>
</div>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"form.transportType"
formatter=
"number"
@
change=
"showChannel"
/>
</el-form-item>
<el-form-item
:label=
"$t('出货渠道')"
prop=
"shippingChannel"
v-if=
"this.showFlag"
>
<el-select
v-model=
"form.shippingChannel"
:placeholder=
"$t('请选择出货渠道')"
>
<el-option
v-for=
"item in channelList"
:label=
"$l(item, 'name')"
:value=
"item.channelId"
:key=
"item.channelId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('立方数')"
prop=
"cubeNum"
>
<el-input
v-model=
"form.cubeNum"
:placeholder=
"$t('请输入立方数')"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"cancel"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
createDeptTarget
,
updateDeptTarget
,
deleteDeptTarget
,
getDeptTarget
,
getDeptTargetPage
,
exportDeptTargetExcel
,
getCreateInitData
,
getPersonTargetPage
,
getMyDeptTargetPage
}
from
"
@/api/ecw/deptTarget
"
;
import
{
listDept
,
listSimpleDepts
}
from
"
@/api/system/dept
"
;
import
{
getChannelList
}
from
'
@/api/ecw/channel
'
;
import
dayjs
from
"
dayjs
"
;
import
{
parseTime
}
from
'
@/utils/ruoyi
'
;
export
default
{
name
:
"
DeptTarget
"
,
components
:
{},
data
()
{
return
{
// 遮罩层
loading
:
true
,
showFlag
:
false
,
// 导出遮罩层
exportLoading
:
false
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
tableTotal
:
0
,
// 部门业绩目标设置列表
list
:
[],
tableList
:
[],
// 弹出层标题
title
:
""
,
detail
:
{
deptName
:
null
,
targetType
:
null
,
cubeNum
:
null
,
shippingChannel
:
null
,
transportType
:
null
,
},
// 是否显示弹出层
open
:
false
,
tableOpen
:
false
,
dateRangeCreateTime
:
[],
dateRangeStartTime
:
[],
dateRangeEndTime
:
[],
deptData
:
[],
deptArr
:
[],
channelList
:
[],
monthList
:
[],
quarterList
:
[],
yearList
:
[],
targetPeriod
:
[],
// 查询参数
queryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
deptId
:
null
,
targetType
:
null
,
targetPeriodName
:
null
,
transportType
:
null
,
shippingChannel
:
null
,
cubeNum
:
null
,
},
tableQueryParams
:
{
pageNo
:
1
,
pageSize
:
10
,
id
:
null
,
},
// 表单参数
form
:
{},
// 表单校验
rules
:
{
deptId
:
[{
required
:
true
,
message
:
this
.
$t
(
"
部门不能为空
"
),
trigger
:
"
blur
"
}],
targetType
:
[{
required
:
true
,
message
:
this
.
$t
(
"
目标类型不能为空
"
),
trigger
:
"
change
"
}],
targetPeriodName
:
[{
required
:
true
,
message
:
this
.
$t
(
"
计算周期不能为空
"
),
trigger
:
"
change
"
}],
transportType
:
[{
required
:
true
,
message
:
this
.
$t
(
"
运输方式不能为空
"
),
trigger
:
"
change
"
}],
cubeNum
:
[{
required
:
true
,
message
:
this
.
$t
(
"
立方数不能为空
"
),
trigger
:
"
blur
"
}],
startTime
:
[{
required
:
true
,
message
:
this
.
$t
(
"
起始时间不能为空
"
),
trigger
:
"
change
"
}],
endTime
:
[{
required
:
true
,
message
:
this
.
$t
(
"
截止时间不能为空
"
),
trigger
:
"
change
"
}],
}
};
},
computed
:
{
getShipChannelName
()
{
return
shippingChannelId
=>
{
for
(
let
index
in
this
.
channelList
)
{
let
channelItem
=
this
.
channelList
[
index
];
if
(
channelItem
.
channelId
==
shippingChannelId
)
{
return
this
.
$l
(
channelItem
,
'
name
'
);
}
}
return
'
/
'
}
}
},
created
()
{
this
.
getDeptList
();
// listSimpleDepts().then(res => {
// this.deptList = this.handleTree(res, "id");
// console.log("this.deptList:"+JSON.stringify(this.deptList));
// res.data.forEach((item) => {
// if (item.parentId == 0) {
// this.deptArr.push(item)
// }
// else {
// this.deptData.push(item)
// }
// })
// this.deptData.forEach((value) => {
// var dept = this.deptArr.filter(itt => itt.id == value.parentId)
// if (dept.length > 0) {
// value.name = dept[0].name + ' | ' + value.name
// }
//
// })
// });
getCreateInitData
().
then
(
res
=>
{
this
.
monthList
=
res
.
data
.
month
;
this
.
quarterList
=
res
.
data
.
quarter
;
this
.
yearList
=
res
.
data
.
year
;
});
this
.
getChannelList
();
this
.
getList
();
},
methods
:
{
/** 查询部门列表 */
getDeptList
(){
this
.
loading
=
true
;
listDept
(
this
.
queryParams
).
then
(
response
=>
{
this
.
deptList
=
this
.
handleTree
(
response
.
data
,
"
id
"
);
console
.
log
(
"
this.deptList:
"
+
JSON
.
stringify
(
this
.
deptList
));
this
.
deptList
.
forEach
((
item
)
=>
{
this
.
normalizer
(
item
);
// this.deptData.push(item);
// if(item.children!=null&&item.children.length>0){
// item.children.forEach((c) => {
// c.name = item.name +"|"+ c.name;
// this.deptData.push(c);
// });
// }
});
// this.loading = false;
});
},
normalizer
(
item
)
{
this
.
deptData
.
push
(
item
);
if
(
item
.
children
!=
null
&&
item
.
children
.
length
>
0
){
item
.
children
.
forEach
((
c
)
=>
{
c
.
name
=
item
.
name
+
"
|
"
+
c
.
name
;
this
.
normalizer
(
c
);
// this.deptData.push(c);
});
}
return
item
;
},
getChannelList
()
{
getChannelList
().
then
(
res
=>
this
.
channelList
=
res
.
data
)
},
dateFormat
(
val
)
{
return
dayjs
(
val
).
format
(
"
YYYY-MM-DD
"
);
},
changeList
(
val
)
{
if
(
val
===
1
)
{
this
.
form
.
targetPeriodName
=
undefined
;
this
.
targetPeriod
=
this
.
monthList
;
}
else
if
(
val
===
2
)
{
this
.
form
.
targetPeriodName
=
undefined
;
this
.
targetPeriod
=
this
.
quarterList
;
}
else
{
this
.
form
.
targetPeriodName
=
undefined
;
this
.
targetPeriod
=
this
.
yearList
;
}
},
setTime
(
item
)
{
this
.
targetPeriod
.
forEach
((
i
,
index
)
=>
{
if
(
i
.
name
===
item
)
{
this
.
form
.
startTime
=
i
.
startDate
+
"
00:00:00
"
;
this
.
form
.
endTime
=
i
.
endDate
+
"
23:59:59
"
;
}
})
},
showChannel
(
val
){
console
.
log
(
val
);
if
(
val
===
3
||
val
===
4
){
this
.
showFlag
=
true
;
}
else
{
this
.
showFlag
=
false
;
}
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeStartTime
,
'
startTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeEndTime
,
'
endTime
'
);
// 执行查询
getMyDeptTargetPage
(
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
,
deptId
:
undefined
,
targetType
:
undefined
,
targetPeriodName
:
undefined
,
startTime
:
undefined
,
endTime
:
undefined
,
transportType
:
undefined
,
shippingChannel
:
undefined
,
cubeNum
:
undefined
,
};
this
.
resetForm
(
"
form
"
);
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
();
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeCreateTime
=
[];
this
.
dateRangeStartTime
=
[];
this
.
dateRangeEndTime
=
[];
this
.
resetForm
(
"
queryForm
"
);
this
.
handleQuery
();
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
targetPeriod
=
this
.
monthList
;
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
this
.
$t
(
"
添加部门业绩目标设置
"
);
},
/** 查看人员目标情况 */
handleView
(
row
)
{
this
.
detail
=
row
;
this
.
tableQueryParams
.
id
=
row
.
id
;
this
.
getTableList
();
this
.
tableOpen
=
true
;
},
getTableList
()
{
getPersonTargetPage
(
this
.
tableQueryParams
).
then
(
res
=>
{
this
.
tableList
=
res
.
data
.
list
;
this
.
tableTotal
=
res
.
data
.
total
;
});
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
;
getDeptTarget
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
if
(
response
.
data
.
targetType
===
1
)
{
this
.
targetPeriod
=
this
.
monthList
;
}
else
if
(
response
.
data
.
targetType
===
2
)
{
this
.
targetPeriod
=
this
.
quarterList
;
}
else
{
this
.
targetPeriod
=
this
.
yearList
;
}
this
.
form
.
startTime
=
parseTime
(
this
.
form
.
startTime
)
this
.
form
.
endTime
=
parseTime
(
this
.
form
.
endTime
)
this
.
open
=
true
;
this
.
title
=
this
.
$t
(
"
修改部门业绩目标设置
"
);
});
},
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"
form
"
].
validate
(
valid
=>
{
if
(
!
valid
)
{
return
;
}
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateDeptTarget
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
));
this
.
open
=
false
;
this
.
getList
();
});
return
;
}
// 添加的提交
createDeptTarget
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
));
this
.
open
=
false
;
this
.
getList
();
});
});
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认删除部门业绩目标设置编号为{id}的数据项?
'
,
{
id
})).
then
(
function
()
{
return
deleteDeptTarget
(
id
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
));
}).
catch
(()
=>
{
});
},
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{...
this
.
queryParams
};
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeStartTime
,
'
startTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeEndTime
,
'
endTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认导出所有部门业绩目标设置数据项?
'
)).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportDeptTargetExcel
(
params
);
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{
});
}
}
};
</
script
>
src/views/ecw/financial/creatCollection.vue
View file @
13fe9053
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<el-card>
<el-card>
<div
v-if=
"id"
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
修改收款单
'
)
}}
</div>
<div
v-if=
"id"
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
修改收款单
'
)
}}
</div>
<div
v-else
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
新增收款单
'
)
}}
</div>
<div
v-else
slot=
"header"
class=
"card-title"
>
{{
$t
(
'
新增收款单
'
)
}}
</div>
<!--
<el-descriptions
:column=
"3"
border
>
-->
<!--
<el-descriptions
:column=
"3"
border
>
-->
<!--
<el-descriptions-item
>
-->
<!--
<el-descriptions-item
>
-->
<el-form-item
<el-form-item
:label=
"$t('客户')"
:label=
"$t('客户')"
...
...
src/views/ecw/order/prepayDeal.vue
View file @
13fe9053
...
@@ -195,7 +195,49 @@
...
@@ -195,7 +195,49 @@
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('货值')
"
prop
=
"
worth
"
/>
<
el
-
table
-
column
:
label
=
"
$t('货值')
"
prop
=
"
worth
"
/>
<
/el-table
>
<
/el-table
>
<!--
未分配客户经理
-->
<
div
v
-
if
=
"
orderExceptionData.orderExceptionType=='not_customer_service_exception'
"
>
<
el
-
row
:
gutter
=
"
20
"
>
<
el
-
col
:
span
=
"
8
"
v
-
if
=
"
orderData.consignorVO
"
>
<
el
-
descriptions
class
=
"
margin-top
"
border
:
title
=
"
$t('发货人')
"
:
column
=
"
1
"
:
labelStyle
=
"
{width:'150px'
}
"
>
<
el
-
descriptions
-
item
:
label
=
"
$t('发货人')
"
>
{{
orderData
.
consignorVO
.
name
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('发货人电话')
"
>
+
{{
orderData
.
consignorVO
.
countryCode
}}
{{
orderData
.
consignorVO
.
phone
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('发货人邮箱')
"
>
{{
orderData
.
consignorVO
.
email
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('发货人公司名称')
"
>
{{
orderData
.
consignorVO
.
company
}}
<
/el-descriptions-item
>
<
/el-descriptions
>
<
/el-col
>
<
el
-
col
:
span
=
"
16
"
v
-
if
=
"
orderData.consigneeVO
"
>
<
el
-
descriptions
class
=
"
margin-top
"
border
:
title
=
"
$t('收货人')
"
:
column
=
"
2
"
:
labelStyle
=
"
{width:'150px'
}
"
>
<
el
-
descriptions
-
item
:
label
=
"
$t('收货人')
"
>
{{
orderData
.
consigneeVO
.
name
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('收货人电话')
"
>
+
{{
orderData
.
consigneeVO
.
countryCode
}}
{{
orderData
.
consigneeVO
.
phone
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('收货人邮箱')
"
>
{{
orderData
.
consigneeVO
.
email
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('收货人公司名称')
"
>
{{
orderData
.
consigneeVO
.
company
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('收货方式')
"
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.ECW_HARVEST_METHOD
"
:
value
=
"
orderData.consigneeVO.harvestMethod
"
/>
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('收货地区')
"
>
{{
region
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
:
label
=
"
$t('收货地址')
"
>
{{
orderData
.
consigneeVO
.
address
}}
<
/el-descriptions-item
>
<
/el-descriptions
>
<
/el-col
>
<
/el-row
>
<
div
class
=
"
link-text
"
>
<
router
-
link
:
to
=
"
{path: '/customer/query/'+orderData.customerId
}
"
class
=
"
link-type
"
>
<
span
>
{{
$t
(
'
归属客户
'
)
}}
:{{
customerData
.
name
||
''
}}
<
/span><span>{{$t
(
'客户编号'
)
}}
:{{ customerData.number||''
}}
</
span
>
<
/router-link
>
<
/div
>
<
/div
>
<
el
-
form
:
model
=
"
handlerParams
"
ref
=
"
queryForms
"
size
=
"
small
"
:
inline
=
"
true
"
label
-
width
=
"
120px
"
class
=
"
card
"
>
<
el
-
form
:
model
=
"
handlerParams
"
ref
=
"
queryForms
"
size
=
"
small
"
:
inline
=
"
true
"
label
-
width
=
"
120px
"
class
=
"
card
"
>
<
el
-
row
v
-
if
=
"
orderExceptionData.orderExceptionType=='order_pay_exception'
"
>
<
el
-
row
v
-
if
=
"
orderExceptionData.orderExceptionType=='order_pay_exception'
"
>
<
el
-
form
-
item
:
label
=
"
$t('订单总金额')+':'
"
>
<
el
-
form
-
item
:
label
=
"
$t('订单总金额')+':'
"
>
...
@@ -273,7 +315,7 @@
...
@@ -273,7 +315,7 @@
<
/template
>
<
/template
>
<
/el-form-item
>
<
/el-form-item
>
<!--
预付异常的备选需要根据接口数据过滤
-->
<!--
预付异常的备选需要根据接口数据过滤
-->
<
el
-
row
v
-
if
=
"
orderExceptionData.orderExceptionType=='order_pay_exception'
"
>
<
el
-
row
v
-
if
=
"
orderExceptionData.orderExceptionType=='order_pay_exception'
||orderExceptionData.orderExceptionType=='not_customer_service_exception'
"
>
<
el
-
form
-
item
:
label
=
"
$t('处理结果')+':'
"
required
>
<
el
-
form
-
item
:
label
=
"
$t('处理结果')+':'
"
required
>
<
el
-
select
v
-
model
=
"
handlerParams.orderExceptionHandlerResult
"
:
placeholder
=
"
$t('请选择')
"
clearable
>
<
el
-
select
v
-
model
=
"
handlerParams.orderExceptionHandlerResult
"
:
placeholder
=
"
$t('请选择')
"
clearable
>
<
template
v
-
for
=
"
dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')
"
>
<
template
v
-
for
=
"
dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')
"
>
...
@@ -289,10 +331,16 @@
...
@@ -289,10 +331,16 @@
<
el
-
option
:
disabled
=
"
dict.value=='pending'
"
:
key
=
"
dict.value
"
:
label
=
"
$l(dict, 'label')
"
:
value
=
"
dict.value
"
/>
<
el
-
option
:
disabled
=
"
dict.value=='pending'
"
:
key
=
"
dict.value
"
:
label
=
"
$l(dict, 'label')
"
:
value
=
"
dict.value
"
/>
<
/template
>
<
/template
>
<
/el-select
>
<
/el-select
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-row
>
<
/el-row
>
<
el
-
row
v
-
if
=
"
orderExceptionData.orderExceptionType=='not_customer_service_exception'&&handlerParams.orderExceptionHandlerResult=='allocate'
"
>
<
el
-
form
-
item
:
label
=
"
$t('移交客户经理')+':'
"
required
>
<
el
-
select
v
-
model
=
"
handlerParams.customerService
"
:
placeholder
=
"
$t('请选择客户经理')
"
clearable
>
<
el
-
option
v
-
for
=
"
dict in customerServiceList
"
:
key
=
"
dict.id
"
:
label
=
"
dict.nickname
"
:
value
=
"
dict.id
"
/>
<
/el-select
>
<
/el-form-item
>
<
/el-row
>
<!--
代收货款
时需要填写代收金额
-->
<!--
代收货款
时需要填写代收金额
-->
<
el
-
row
v
-
if
=
"
handlerParams.orderExceptionHandlerResult == 'cod'
"
>
<
el
-
row
v
-
if
=
"
handlerParams.orderExceptionHandlerResult == 'cod'
"
>
<
el
-
form
-
item
:
label
=
"
$t('代收金额')+':'
"
size
=
"
medium
"
required
>
<
el
-
form
-
item
:
label
=
"
$t('代收金额')+':'
"
size
=
"
medium
"
required
>
...
@@ -314,7 +362,7 @@
...
@@ -314,7 +362,7 @@
<
/el-select
>
<
/el-select
>
<
/el-form-item
>
<
/el-form-item
>
<
/el-row
>
<
/el-row
>
<
el
-
row
:
span
=
"
8
"
>
<
el
-
row
:
span
=
"
8
"
v
-
if
=
"
orderExceptionData.orderExceptionType!='not_customer_service_exception'
"
>
<
el
-
form
-
item
:
label
=
"
$t('备注')+':'
"
size
=
"
medium
"
>
<
el
-
form
-
item
:
label
=
"
$t('备注')+':'
"
size
=
"
medium
"
>
<
el
-
input
style
=
"
width: 500px;
"
type
=
"
textarea
"
v
-
model
=
"
handlerParams.orderExceptionHandlerRemark
"
/>
<
el
-
input
style
=
"
width: 500px;
"
type
=
"
textarea
"
v
-
model
=
"
handlerParams.orderExceptionHandlerRemark
"
/>
<
/el-form-item
>
<
/el-form-item
>
...
@@ -393,7 +441,9 @@
...
@@ -393,7 +441,9 @@
import
{
getFirstReceivableListByOrderId
}
from
'
@/api/ecw/financial
'
import
{
getFirstReceivableListByOrderId
}
from
'
@/api/ecw/financial
'
import
WorkFlow
from
'
@/components/WorkFlow
'
import
WorkFlow
from
'
@/components/WorkFlow
'
import
{
listByIds
}
from
'
@/api/ecw/region
'
import
{
listByIds
}
from
'
@/api/ecw/region
'
import
{
listServiceUser
}
from
"
@/api/system/user
"
;
import
{
cancelProcessInstance
}
from
'
@/api/bpm/processInstance
'
import
{
cancelProcessInstance
}
from
'
@/api/bpm/processInstance
'
import
{
getCustomer
}
from
'
@/api/ecw/customer
'
export
default
{
export
default
{
name
:
"
PrepayDeal
"
,
name
:
"
PrepayDeal
"
,
components
:
{
components
:
{
...
@@ -428,7 +478,9 @@
...
@@ -428,7 +478,9 @@
timers
:
""
,
//时间戳
timers
:
""
,
//时间戳
FilePreAll
:[],
// 预览数组
FilePreAll
:[],
// 预览数组
TragetPic
:{
}
,
TragetPic
:{
}
,
region
:
''
region
:
''
,
customerData
:{
}
,
//归属客户
customerServiceList
:[],
//客户经理
}
;
}
;
}
,
}
,
created
()
{
created
()
{
...
@@ -438,6 +490,9 @@
...
@@ -438,6 +490,9 @@
this
.
getList
()
this
.
getList
()
}
}
listServiceUser
().
then
(
r
=>
{
this
.
customerServiceList
=
r
.
data
;
}
)
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
}
,
}
,
watch
:{
watch
:{
...
@@ -491,7 +546,7 @@
...
@@ -491,7 +546,7 @@
that
.
orderExceptionData
=
response
.
data
;
that
.
orderExceptionData
=
response
.
data
;
// that.orderExceptionData.orderExceptionType = 'order_other_exception'
// that.orderExceptionData.orderExceptionType = 'order_other_exception'
// that.orderExceptionData.orderExceptionType = 'order_miss_exception'
// that.orderExceptionData.orderExceptionType = 'order_miss_exception'
// that.orderExceptionData.orderExceptionType = 'order_pay
_exception'
// that.orderExceptionData.orderExceptionType = 'not_customer_service
_exception'
that
.
loading
=
false
;
that
.
loading
=
false
;
that
.
orderId
=
response
.
data
.
orderId
that
.
orderId
=
response
.
data
.
orderId
that
.
getOrderData
()
that
.
getOrderData
()
...
@@ -515,8 +570,16 @@
...
@@ -515,8 +570,16 @@
getOrderData
(){
getOrderData
(){
getOrder
(
this
.
orderId
).
then
(
response
=>
{
getOrder
(
this
.
orderId
).
then
(
response
=>
{
this
.
orderData
=
response
.
data
this
.
orderData
=
response
.
data
if
(
response
.
data
.
customerId
){
this
.
getCustomerData
(
response
.
data
.
customerId
)
}
}
);
}
);
}
,
}
,
getCustomerData
(
id
){
getCustomer
(
id
).
then
(
res
=>
{
this
.
customerData
=
res
.
data
}
)
}
,
getOrderFeeByIdData
(){
getOrderFeeByIdData
(){
getOrderFeeById
({
id
:
this
.
orderId
}
).
then
(
response
=>
{
getOrderFeeById
({
id
:
this
.
orderId
}
).
then
(
response
=>
{
this
.
orderFee
=
response
.
data
this
.
orderFee
=
response
.
data
...
@@ -636,6 +699,7 @@
...
@@ -636,6 +699,7 @@
.
link
-
text
span
{
.
link
-
text
span
{
font
-
size
:
16
px
;
font
-
size
:
16
px
;
font
-
weight
:
600
;
font
-
weight
:
600
;
margin
-
right
:
20
px
;
}
}
.
card
-
title
{
.
card
-
title
{
font
-
size
:
18
px
;
font
-
size
:
18
px
;
...
...
src/views/ecw/product/index.vue
View file @
13fe9053
...
@@ -106,9 +106,9 @@
...
@@ -106,9 +106,9 @@
<el-table-column
:label=
"$t('修改时间')"
align=
"center"
>
<el-table-column
:label=
"$t('修改时间')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</span>
<span>
{{
parseTime
(
scope
.
row
.
updateTime
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<!-- <el-table-column prop="status" align="center" :label="$t('状态')" width="120">
<!-- <el-table-column prop="status" align="center" :label="$t('状态')" width="120">
<template slot-scope="scope">
<template slot-scope="scope">
...
@@ -206,11 +206,24 @@
...
@@ -206,11 +206,24 @@
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
{{$t('是')}}
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
{{$t('是')}}
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
{{$t('否')}}
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
{{$t('否')}}
</el-radio>
</el-form-item>
</el-form-item>
<!-- <el-form-item :label="$t('可参与优惠活动')" prop="you">
<el-form-item
v-if=
"this.form.id == null "
:label=
"$t('可参与优惠')"
>
<el-select v-model="form.you" :placeholder="$t('可参与优惠活动')" clearable>
<!-- <el-select multiple v-model="form.couponlds" size="5" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px">-->
<el-option v-for="packageItem in packagingList" :key="packageItem.value" :label="packageItem.label" :value="packageItem.value" />
<!-- <el-option v-for="item in preferentialList" :value="item.couponId" :label="item.titleZh" :key="item.couponId" :disabled="item.mandatory">{{item.titleZh}}</el-option>-->
</el-select>
<!-- </el-select>-->
</el-form-item> -->
<div
style=
"width: 300px;height: 400px;border: 1px solid;overflow-y: auto"
>
<div
@
click=
"selectMoveAbout(item)"
style=
"display: flex;justify-content: space-between; align-items: center;"
:style=
"{'cursor':item.mandatory ? 'no-drop' : 'pointer' }"
v-for=
"item in preferentialList"
>
<div>
{{$l(item, 'title')}}
</div>
<i
v-if=
"form.couponIds.includes(item.couponId)"
style=
"margin-right: 20px;"
class=
"el-icon-check"
></i>
</div>
</div>
</el-form-item>
<!-- <el-form-item :label="$t('可参与优惠活动')" prop="you">
<el-select v-model="form.you" :placeholder="$t('可参与优惠活动')" clearable>
<el-option v-for="packageItem in packagingList" :key="packageItem.value" :label="packageItem.label" :value="packageItem.value" />
</el-select>
</el-form-item> -->
<el-form-item
:label=
"$t('每日入仓上限')"
prop=
"dayLimit"
v-if=
"form.needBook==1"
>
<el-form-item
:label=
"$t('每日入仓上限')"
prop=
"dayLimit"
v-if=
"form.needBook==1"
>
<el-input
v-model.number=
"form.dayLimit"
type=
"number"
>
<el-input
v-model.number=
"form.dayLimit"
type=
"number"
>
<
template
slot=
"append"
>
{{
$t
(
'
立方米
'
)
}}
</
template
>
<
template
slot=
"append"
>
{{
$t
(
'
立方米
'
)
}}
</
template
>
...
@@ -227,7 +240,15 @@
...
@@ -227,7 +240,15 @@
</template>
</template>
<
script
>
<
script
>
import
{
createProduct
,
updateProduct
,
deleteProduct
,
getProduct
,
getProductPage
,
exportProductExcel
}
from
"
@/api/ecw/product
"
;
import
{
createProduct
,
updateProduct
,
deleteProduct
,
getProduct
,
getProductPage
,
exportProductExcel
,
product_coupon_newProd
}
from
"
@/api/ecw/product
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
...
@@ -305,7 +326,8 @@ export default {
...
@@ -305,7 +326,8 @@ export default {
auditStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
AUDIT_STATUS
),
auditStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
AUDIT_STATUS
),
materialList
:
getDictDatas
(
DICT_TYPE
.
ECW_PRODUCT_MATERIAL
),
materialList
:
getDictDatas
(
DICT_TYPE
.
ECW_PRODUCT_MATERIAL
),
packagingList
:
getDictDatas
(
DICT_TYPE
.
ECW_PACKAGING_TYPE
),
packagingList
:
getDictDatas
(
DICT_TYPE
.
ECW_PACKAGING_TYPE
),
locationList
:
getDictDatas
(
DICT_TYPE
.
ECW_CONTAINER_LOCATION
)
locationList
:
getDictDatas
(
DICT_TYPE
.
ECW_CONTAINER_LOCATION
),
preferentialList
:[],
};
};
},
},
...
@@ -360,6 +382,10 @@ export default {
...
@@ -360,6 +382,10 @@ export default {
this
.
getAttrList
();
this
.
getAttrList
();
this
.
getTypeList
();
this
.
getTypeList
();
this
.
getList
();
this
.
getList
();
product_coupon_newProd
().
then
(
r
=>
{
this
.
preferentialList
=
r
.
data
this
.
reset
()
})
},
},
methods
:
{
methods
:
{
/** 获取产品属性列表 */
/** 获取产品属性列表 */
...
@@ -433,8 +459,11 @@ export default {
...
@@ -433,8 +459,11 @@ export default {
auditStatus
:
undefined
,
auditStatus
:
undefined
,
status
:
undefined
,
status
:
undefined
,
requirements
:
0
,
requirements
:
0
,
needBook
:
0
needBook
:
0
,
couponIds
:[],
};
};
let
c
=
this
.
preferentialList
.
filter
(
i
=>
i
.
isDefault
).
map
(
i
=>
i
.
couponId
)
this
.
form
.
couponIds
=
c
this
.
resetForm
(
"
form
"
);
this
.
resetForm
(
"
form
"
);
},
},
/** 搜索按钮操作 */
/** 搜索按钮操作 */
...
@@ -485,7 +514,6 @@ export default {
...
@@ -485,7 +514,6 @@ export default {
}
}
//商品特性转字符串
//商品特性转字符串
this
.
form
.
attrId
=
this
.
form
.
attrArray
.
join
(
'
,
'
);
this
.
form
.
attrId
=
this
.
form
.
attrArray
.
join
(
'
,
'
);
// 修改的提交
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateProduct
(
this
.
form
).
then
(
response
=>
{
updateProduct
(
this
.
form
).
then
(
response
=>
{
...
@@ -576,7 +604,21 @@ export default {
...
@@ -576,7 +604,21 @@ export default {
ids
:
this
.
ids
ids
:
this
.
ids
}
}
});
});
},
selectMoveAbout
(
val
){
if
(
!
val
.
mandatory
){
let
index
=
this
.
form
.
couponIds
.
findIndex
(
i
=>
val
.
couponId
==
i
)
if
(
index
>=
0
){
this
.
form
.
couponIds
.
splice
(
index
,
1
)
}
else
{
this
.
form
.
couponIds
.
push
(
val
.
couponId
)
}
}
}
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
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