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
5a79881f
Commit
5a79881f
authored
Oct 23, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6
parent
2a33d455
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
135 additions
and
106 deletions
+135
-106
index.vue
src/views/ecw/offer/index.vue
+135
-106
No files found.
src/views/ecw/offer/index.vue
View file @
5a79881f
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
:label=
"$t('编号')"
prop=
"searchNumber"
>
<el-input
v-model
=
"queryParams.searchNumber"
:placeholder=
"$t('请输入报价单号、订单号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model
.trim=
"queryParams.searchNumber"
:placeholder=
"$t('请输入报价单号、订单号')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('客户')"
prop=
"searchCustomer"
>
<el-input
v-model
=
"queryParams.searchCustomer"
:placeholder=
"$t('请输入客户')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model
.trim=
"queryParams.searchCustomer"
:placeholder=
"$t('请输入客户')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('创建时间')"
prop=
"orderNo"
>
<el-date-picker
type=
"datetime"
v-model=
"queryParams.beginCreateTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
{{
$t
(
'
到
'
)
}}
<el-date-picker
v-model=
"queryParams.endCreateTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('创建时间')"
prop=
"orderNo"
>
<el-date-picker
type=
"datetime"
v-model=
"queryParams.beginCreateTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
{{
$t
(
"
到
"
)
}}
<el-date-picker
v-model=
"queryParams.endCreateTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('始发地')"
prop=
"departureId"
>
<el-select
v-model=
"queryParams.departureId"
:placeholder=
"$t('请选择始发地')"
clearable
>
...
...
@@ -27,45 +24,40 @@
</el-form-item>
<el-form-item
:label=
"$t('运输方式')"
prop=
"transportId"
>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportId"
formatter=
"number"
clearable
/>
<dict-selector
:type=
"DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model=
"queryParams.transportId"
multiple
formatter=
"number"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('商品')"
prop=
"prodTitle"
>
<el-input
v-model
=
"queryParams.prodTitle"
:placeholder=
"$t('请输入商品类型、品名或品牌')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model
.trim=
"queryParams.prodTitle"
:placeholder=
"$t('请输入商品类型、品名或品牌')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('控货')"
prop=
"control"
>
<dict-selector
:type=
"DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model=
"queryParams.control"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('客户经理')"
prop=
"followUpSalesmanId"
>
<user-selector
v-model=
"queryParams.followUpSalesmanId"
clearable
/>
<user-selector
v-model=
"queryParams.followUpSalesmanId"
multiple
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('销售阶段')"
prop=
"status"
>
<dict-selector
:type=
"DICT_TYPE.ECW_OFFER_STATUS"
v-model=
"queryParams.status"
clearable
/>
<el-form-item
:label=
"$t('销售阶段')"
prop=
"status"
style=
"width: 600px"
>
<dict-selector
:type=
"DICT_TYPE.ECW_OFFER_STATUS"
multiple
v-model=
"queryParams.status"
clearable
/>
</el-form-item>
<el-form-item
:label=
"$t('报关方式')"
prop=
"customsType"
>
<dict-selector
:type=
"DICT_TYPE.ECW_CUSTOMS_TYPE"
v-model=
"queryParams.customsType"
clearable
/>
</el-form-item>
<div>
<el-form-item
:label=
"$t('预计结束时间')"
prop=
"orderNo"
>
<el-date-picker
type=
"datetime"
v-model=
"queryParams.beginStopTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
{{
$t
(
'
到
'
)
}}
<el-date-picker
type=
"datetime"
v-model=
"queryParams.endStopTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('预计结束时间')"
prop=
"orderNo"
>
<el-date-picker
type=
"datetime"
v-model=
"queryParams.beginStopTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
{{
$t
(
"
到
"
)
}}
<el-date-picker
type=
"datetime"
v-model=
"queryParams.endStopTime"
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
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{
$t
(
'
重置
'
)
}}
</el-button>
<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>
</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:offer:create']"
>
{{
$t
(
'
新增
'
)
}}
</el-button>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:offer:create']"
>
{{
$t
(
"
新增
"
)
}}
</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:offer:export']"
>
{{
$t
(
'
导出
'
)
}}
</el-button>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
:loading=
"exportLoading"
v-hasPermi=
"['ecw:offer:export']"
>
{{
$t
(
"
导出
"
)
}}
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
...
...
@@ -73,15 +65,23 @@
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
border
>
<el-table-column
:label=
"$t('报价单号')"
align=
"left"
prop=
"number"
width=
"200px"
>
<template
slot-scope=
"
{
row
}">
<el-link
type=
"primary"
@
click.native=
"$router.push('detail?offerId=' + row.offerId)"
>
{{
row
.
number
}}
</el-link>
<template
slot-scope=
"
{
row
}">
<el-link
type=
"primary"
@
click.native=
"$router.push('detail?offerId=' + row.offerId)"
>
{{
row
.
number
}}
</el-link>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('订单编号')"
align=
"left"
prop=
"orderNo"
/>
<el-table-column
:label=
"$t('客户名称')"
align=
"left"
prop=
"relationName"
/>
<el-table-column
:label=
"$t('联系人')"
align=
"left"
prop=
"relationName"
/>
<el-table-column
:label=
"$t('联系电话')"
align=
"left"
prop=
"relationPhone"
/>
<el-table-column
:label=
"$t('重要程序')"
align=
"center"
prop=
"importance"
/>
<el-table-column
:label=
"$t('始发地')"
align=
"left"
prop=
"departureName"
/>
<el-table-column
:label=
"$t('目的地')"
align=
"center"
prop=
"objectiveName"
/>
<el-table-column
:label=
"$t('运输方式')"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
{{
$l
(
transportTypes
[
row
.
transportType
],
"
label
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('销售阶段')"
align=
"left"
width=
"180"
>
<
template
slot-scope=
"{
row
}"
>
<
template
slot-scope=
"{
row
}"
>
<dict-tag
:type=
"DICT_TYPE.ECW_OFFER_STATUS"
:value=
"row.status"
/>
</
template
>
</el-table-column>
...
...
@@ -91,21 +91,29 @@
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('运输方式')
"
align
=
"
left
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.ECW_TRANSPORT_TYPE
"
:
value
=
"
scope.row.transportId
"
/>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('预计销售额')
"
align
=
"
left
"
prop
=
"
estCost
"
>
<
template
slot
-
scope
=
"
{
row
}
"
>
<
template
slot
-
scope
=
"
{
row
}
"
>
<
div
class
=
""
v
-
for
=
"
(item, feeIndex) in row.estCostVO.feeDtoList
"
:
key
=
"
feeIndex
"
>
<
dict
-
tag
:
type
=
"
DICT_TYPE.ECW_COST_FEE_TYPE
"
:
value
=
"
item.feeType
"
/>
{{
item
.
amount
}}
{{
currencyMap
[
item
.
currencyId
]
}}
{{
item
.
amount
}}
{{
currencyMap
[
item
.
currencyId
]
}}
<
/div
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('客户经理')
"
align
=
"
left
"
prop
=
"
creatorName
"
>
<
el
-
table
-
column
:
label
=
"
$t('客户经理')
"
align
=
"
left
"
prop
=
"
creatorName
"
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('创建时间')
"
align
=
"
left
"
>
<
template
slot
-
scope
=
"
{ row
}
"
>
<
span
>
{{
parseTime
(
row
.
createTime
,
"
{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
"
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('有效期')
"
align
=
"
left
"
>
<
template
slot
-
scope
=
"
{ row
}
"
>
<
span
>
{{
parseTime
(
row
.
endTime
,
"
{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
"
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('操作')
"
align
=
"
center
"
class
-
name
=
"
small-padding fixed-width
"
>
<
template
slot
-
scope
=
"
scope
"
>
...
...
@@ -122,31 +130,29 @@
<
el
-
dropdown
>
<
el
-
button
icon
=
"
el-icon-plus
"
circle
type
=
"
primary
"
><
/el-button
>
<
el
-
dropdown
-
menu
slot
=
"
dropdown
"
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('detail?offerId=' + scope.row.offerId)
"
v
-
hasPermi
=
"
['ecw:offer:show']
"
>
{{
$t
(
'
详情
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('edit?id=' + scope.row.offerId)
"
v
-
if
=
"
[1,2,3,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:update']
"
>
{{
$t
(
'
编辑
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('logList?offerId=' + scope.row.offerId)
"
v
-
if
=
"
[1,3,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:loglist']
"
>
{{
$t
(
'
跟进
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push(`result?offerId=${scope.row.offerId
}
&number=${scope.row.number
}
`)
"
v
-
if
=
"
[3,
7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:result']
"
>
{{
$t
(
'
结果
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('/offer/special?offerId=' + scope.row.offerId)
"
v
-
if
=
"
[1,3,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:discount','ecw:offer:commission']
"
>
{{
$t
(
'
特价
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
cancel(scope.row.offerId)
"
v
-
if
=
"
[1,3,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:cancel']
"
>
{{
$t
(
'
取消
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
recovery(scope.row.offerId)
"
v
-
if
=
"
[0].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:recovery']
"
>
{{
$t
(
'
恢复
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
deleteOffer(scope.row.offerId)
"
v
-
if
=
"
[0,1,2,3,4,5,6,7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:delete']
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('detail?offerId=' + scope.row.offerId)
"
v
-
hasPermi
=
"
['ecw:offer:show']
"
>
{{
$t
(
"
详情
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('edit?id=' + scope.row.offerId)
"
v
-
if
=
"
[1, 2, 3, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:update']
"
>
{{
$t
(
"
编辑
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('logList?offerId=' + scope.row.offerId)
"
v
-
if
=
"
[1, 3, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:loglist']
"
>
{{
$t
(
"
跟进
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push(`result?offerId=${scope.row.offerId
}
&number=${scope.row.number
}
`)
"
v
-
if
=
"
[3,
7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:result']
"
>
{{
$t
(
"
结果
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
$router.push('/offer/special?offerId=' + scope.row.offerId)
"
v
-
if
=
"
[1, 3, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:discount', 'ecw:offer:commission']
"
>
{{
$t
(
"
特价
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
cancel(scope.row.offerId)
"
v
-
if
=
"
[1, 3, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:cancel']
"
>
{{
$t
(
"
取消
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
recovery(scope.row.offerId)
"
v
-
if
=
"
[0].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:recovery']
"
>
{{
$t
(
"
恢复
"
)
}}
<
/el-dropdown-item
>
<
el
-
dropdown
-
item
@
click
.
native
=
"
deleteOffer(scope.row.offerId)
"
v
-
if
=
"
[0, 1, 2, 3, 4, 5, 6, 7].indexOf(scope.row.status) > -1
"
v
-
hasPermi
=
"
['ecw:offer:delete']
"
>
{{
$t
(
"
删除
"
)
}}
<
/el-dropdown-item
>
<
/el-dropdown-menu
>
<
/el-dropdown
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<!--
分页组件
-->
<
pagination
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.pageNo
"
:
limit
.
sync
=
"
queryParams.pageSize
"
@
pagination
=
"
getList
"
/>
<
pagination
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.pageNo
"
:
limit
.
sync
=
"
queryParams.pageSize
"
@
pagination
=
"
getList
"
/>
<
/div
>
<
/template
>
<
script
>
import
{
deleteOffer
,
getOfferPage
,
exportOfferExcel
,
cancel
,
recovery
,
offerDeptPage
,
exportDeptOfferExcel
}
from
"
@/api/ecw/offer
"
;
import
{
getCurrencyList
}
from
'
@/api/ecw/currency
'
;
import
{
getTradeCityList
}
from
'
@/api/ecw/region
'
import
UserSelector
from
'
@/components/UserSelector
'
import
{
deleteOffer
,
getOfferPage
,
exportOfferExcel
,
cancel
,
recovery
,
offerDeptPage
,
exportDeptOfferExcel
}
from
"
@/api/ecw/offer
"
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
import
{
getTradeCityList
}
from
"
@/api/ecw/region
"
import
UserSelector
from
"
@/components/UserSelector
"
export
default
{
name
:
"
EcwOfferIndex
"
,
components
:
{
...
...
@@ -166,63 +172,78 @@ export default {
list
:
[],
// 查询参数
queryParams
:
{
status
:
[],
pageNo
:
1
,
pageSize
:
10
}
,
currencyList
:
[],
tradeCityList
:[],
dept
:
false
,
// 是否部门订单
}
;
tradeCityList
:
[],
dept
:
false
// 是否部门订单
}
}
,
computed
:{
currencyMap
(){
let
map
=
{
}
this
.
currencyList
.
forEach
(
item
=>
{
map
[
item
.
id
]
=
this
.
$l
(
item
,
'
title
'
)
}
)
return
map
computed
:
{
currencyMap
()
{
let
map
=
{
}
this
.
currencyList
.
forEach
((
item
)
=>
{
map
[
item
.
id
]
=
this
.
$l
(
item
,
"
title
"
)
}
)
return
map
}
,
exportCityList
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
2
)
return
this
.
tradeCityList
.
filter
(
(
item
)
=>
item
.
type
==
2
)
}
,
importCityList
()
{
return
this
.
tradeCityList
.
filter
(
item
=>
item
.
type
==
1
)
return
this
.
tradeCityList
.
filter
(
(
item
)
=>
item
.
type
==
1
)
}
,
transportTypes
()
{
let
obj
=
{
}
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_TRANSPORT_TYPE
).
forEach
((
item
)
=>
{
obj
[
item
.
value
]
=
item
}
)
return
obj
}
}
,
activated
(){
activated
()
{
this
.
getList
()
}
,
created
()
{
console
.
log
(
this
.
getDictDatas
(
this
.
DICT_TYPE
.
ECW_OFFER_STATUS
))
console
.
log
(
"
offer index
"
,
this
.
$route
)
// 部门订单
if
(
this
.
$route
.
fullPath
.
indexOf
(
'
dept
'
)
>
-
1
)
{
if
(
this
.
$route
.
fullPath
.
indexOf
(
"
dept
"
)
>
-
1
)
{
this
.
dept
=
true
}
getTradeCityList
().
then
(
res
=>
this
.
tradeCityList
=
res
.
data
)
getTradeCityList
().
then
(
(
res
)
=>
(
this
.
tradeCityList
=
res
.
data
)
)
getCurrencyList
().
then
(
res
=>
{
getCurrencyList
().
then
(
(
res
)
=>
{
this
.
currencyList
=
res
.
data
}
)
this
.
getList
()
;
this
.
getList
()
}
,
methods
:
{
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
let
func
=
this
.
dept
?
offerDeptPage
:
getOfferPage
// 执行查询
func
(
this
.
queryParams
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
}
);
func
({
...
this
.
queryParams
,
status
:
this
.
queryParams
.
status
.
join
(
"
,
"
),
followUpSalesmanId
:
this
.
queryParams
.
followUpSalesmanId
.
join
(
"
,
"
),
transportId
:
this
.
queryParams
.
transportId
.
join
(
"
,
"
)
}
).
then
((
response
)
=>
{
this
.
list
=
response
.
data
.
list
this
.
total
=
response
.
data
.
total
this
.
loading
=
false
}
)
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
this
.
getList
()
;
this
.
queryParams
.
pageNo
=
1
this
.
getList
()
}
,
/** 重置按钮操作 */
resetQuery
()
{
...
...
@@ -230,62 +251,70 @@ export default {
pageNo
:
1
,
pageSize
:
10
}
this
.
handleQuery
()
;
this
.
handleQuery
()
}
,
/** 新增按钮操作 */
handleAdd
()
{
return
this
.
$router
.
push
(
'
create
'
)
return
this
.
$router
.
push
(
"
create
"
)
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
return
this
.
$router
.
push
(
'
edit?id=
'
+
row
.
offerId
)
return
this
.
$router
.
push
(
"
edit?id=
"
+
row
.
offerId
)
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
offerId
=
row
.
offerId
;
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认删除报价单管理编号为{offerId
}
的数据项?
'
,
{
offerId
}
)).
then
(
function
()
{
return
deleteOffer
(
offerId
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
));
}
).
catch
(()
=>
{
}
);
const
offerId
=
row
.
offerId
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认删除报价单管理编号为{offerId
}
的数据项?
"
,
{
offerId
}
))
.
then
(
function
()
{
return
deleteOffer
(
offerId
)
}
)
.
then
(()
=>
{
this
.
getList
()
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
))
}
)
.
catch
(()
=>
{
}
)
}
,
/** 导出按钮操作 */
handleExport
()
{
// 处理查询参数
let
params
=
{
...
this
.
queryParams
}
;
params
.
pageNo
=
undefined
;
params
.
pageSize
=
undefined
;
let
params
=
{
...
this
.
queryParams
}
params
.
pageNo
=
undefined
params
.
pageSize
=
undefined
// 执行导出
this
.
$confirm
(
this
.
$t
(
'
是否确认导出所有报价单管理数据项?
'
)).
then
(()
=>
{
this
.
exportLoading
=
true
;
if
(
this
.
dept
){
this
.
$confirm
(
this
.
$t
(
"
是否确认导出所有报价单管理数据项?
"
))
.
then
(()
=>
{
this
.
exportLoading
=
true
if
(
this
.
dept
)
{
return
exportDeptOfferExcel
(
params
)
}
else
return
exportOfferExcel
(
params
);
}
).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
报价列表.xls
'
);
this
.
exportLoading
=
false
;
}
).
catch
(()
=>
{
}
);
}
else
return
exportOfferExcel
(
params
)
}
)
.
then
((
response
)
=>
{
this
.
$download
.
excel
(
response
,
"
报价列表.xls
"
)
this
.
exportLoading
=
false
}
)
.
catch
(()
=>
{
}
)
}
,
cancel
(
id
){
this
.
doAction
(
this
.
$t
(
'
确定要取消此报价单么?
'
),
cancel
,
id
);
cancel
(
id
)
{
this
.
doAction
(
this
.
$t
(
"
确定要取消此报价单么?
"
),
cancel
,
id
)
}
,
recovery
(
id
){
this
.
doAction
(
this
.
$t
(
'
确定要恢复此报价单么?
'
),
recovery
,
id
);
recovery
(
id
)
{
this
.
doAction
(
this
.
$t
(
"
确定要恢复此报价单么?
"
),
recovery
,
id
)
}
,
deleteOffer
(
id
){
this
.
doAction
(
this
.
$t
(
'
确定要删除此报价单么?
'
),
deleteOffer
,
id
);
deleteOffer
(
id
)
{
this
.
doAction
(
this
.
$t
(
"
确定要删除此报价单么?
"
),
deleteOffer
,
id
)
}
,
doAction
(
tips
,
action
,
id
){
this
.
$confirm
(
tips
).
then
(
res
=>
{
return
action
(
id
)
}
)
.
then
(()
=>
{
this
.
$message
.
success
(
'
操作成功
'
)
this
.
handleQuery
()
}
)
doAction
(
tips
,
action
,
id
)
{
this
.
$confirm
(
tips
)
.
then
((
res
)
=>
{
return
action
(
id
)
}
)
.
then
(()
=>
{
this
.
$message
.
success
(
"
操作成功
"
)
this
.
handleQuery
()
}
)
}
}
}
;
}
<
/script
>
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