Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-ordermanage
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ac957dc7
authored
Jul 26, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增字段
1 parent
05228015
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
114 additions
and
123 deletions
src/views/orderManage/components/carDamage.vue
src/views/orderManage/components/carDamage.vue
View file @
ac957dc
...
...
@@ -2,39 +2,24 @@
<
template
>
<div
class=
"purchase"
>
<div
class=
"container"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"showFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"showFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<div
class=
"table-header"
>
<el-button
type=
"primary"
class=
"btn"
size=
"small"
@
click=
"exportExcel"
>
导出
</el-button>
<el-button
type=
"primary"
class=
"btn"
size=
"small"
@
click=
"exportExcel"
>
导出
</el-button>
</div>
<!-- 表格区域 开始 -->
<GLTable
ref=
"orderRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTable
ref=
"orderRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"[1, 2, 3, -1, 5].includes(scope.scope.orderStatus) || [2].includes(scope.scope.equityOrderStatus)"
@
click=
"handlePrint(scope.scope)"
>
打印
</el-button>
v-if=
"[1, 2, 3, -1, 5].includes(scope.scope.orderStatus) || [2].includes(scope.scope.equityOrderStatus)"
@
click=
"handlePrint(scope.scope)"
>
打印
</el-button>
<el-button
type=
"text"
v-if=
"[2].includes(scope.scope.equityOrderStatus) && [3, 5].includes(scope.scope.orderStatus)"
@
click=
"handlePrintContract(scope.scope)"
>
打印合同
</el-button>
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
详情
</el-button>
v-if=
"[2].includes(scope.scope.equityOrderStatus) && [3, 5].includes(scope.scope.orderStatus)"
@
click=
"handlePrintContract(scope.scope)"
>
打印合同
</el-button>
<el-button
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
详情
</el-button>
</div>
</GLTable>
<!-- 表格区域 end -->
...
...
@@ -49,63 +34,69 @@ import { Util, downLoadFile } from '@/common/util'
import
{
manageTypeList
}
from
'@/common/constant.js'
export
default
{
name
:
'CarDamage'
,
components
:
{
},
components
:
{},
data
()
{
return
{
sessionInfo
:
this
.
$globalState
.
session
,
size
:
'small'
,
url
:
url
,
searchForm
:
{
orderStatus
:
""
,
merchantName
:
""
,
goodsName
:
""
,
createTime
:
""
orderStatus
:
''
,
merchantName
:
''
,
goodsName
:
''
,
createTime
:
''
,
tradeNo
:
''
},
showFormData
:
[
{
label
:
"客户姓名"
,
name
:
"customerName"
,
type
:
"input"
,
label
:
'交易参考号'
,
name
:
'tradeNo'
,
type
:
'input'
,
isClear
:
true
// keyFn: this.keyDowmGetList
},
{
label
:
"服务状态"
,
name
:
"orderStatus"
,
type
:
"select"
,
label
:
'客户姓名'
,
name
:
'customerName'
,
type
:
'input'
,
isClear
:
true
},
{
label
:
'服务状态'
,
name
:
'orderStatus'
,
type
:
'select'
,
optionList
:
[],
optionId
:
"severType"
,
optionLabel
:
"severName"
,
optionsName
:
"severTypeList"
optionId
:
'severType'
,
optionLabel
:
'severName'
,
optionsName
:
'severTypeList'
},
{
label
:
"商户名称"
,
name
:
"merchantName"
,
type
:
"input"
,
maxlength
:
"20"
,
label
:
'商户名称'
,
name
:
'merchantName'
,
type
:
'input'
,
maxlength
:
'20'
,
isClear
:
true
},
{
label
:
"商品名称"
,
name
:
"goodsName"
,
type
:
"input"
,
maxlength
:
"20"
,
label
:
'商品名称'
,
name
:
'goodsName'
,
type
:
'input'
,
maxlength
:
'20'
,
isClear
:
true
},
{
label
:
"车架号"
,
name
:
"carVin"
,
type
:
"input"
,
label
:
'车架号'
,
name
:
'carVin'
,
type
:
'input'
,
isClear
:
true
},
{
label
:
"创建时间"
,
name
:
"createTime"
,
type
:
"datePicker"
,
label
:
'创建时间'
,
name
:
'createTime'
,
type
:
'datePicker'
,
isClear
:
true
,
pickerOptions
:
'beforeRangePickerOptions'
}
,
}
],
tableSearchForm
:
{},
// 表格
...
...
@@ -115,70 +106,69 @@ export default {
tableOption
:
true
,
tableColumns
:
[
{
label
:
"报价单号"
,
prop
:
"orderId"
,
minWidth
:
"200"
label
:
'报价单号'
,
prop
:
'orderId'
,
minWidth
:
'200'
},
{
label
:
'交易参考号'
,
prop
:
'tradeNo'
,
minWidth
:
'200'
},
{
label
:
"客户姓名"
,
prop
:
"customerName"
,
width
:
"200px"
label
:
'客户姓名'
,
prop
:
'customerName'
,
width
:
'200px'
},
{
label
:
"车架号"
,
prop
:
"carVin"
,
width
:
"250px"
label
:
'车架号'
,
prop
:
'carVin'
,
width
:
'250px'
},
{
label
:
"保险公司"
,
prop
:
"insuranceCompany"
,
label
:
'保险公司'
,
prop
:
'insuranceCompany'
,
minWidth
:
100
},
{
label
:
"状态"
,
prop
:
"orderStatus"
,
width
:
"100"
,
formatter
:
(
cellValue
)
=>
{
label
:
'状态'
,
prop
:
'orderStatus'
,
width
:
'100'
,
formatter
:
cellValue
=>
{
if
(
cellValue
.
orderStatus
==
4
)
{
return
"已支付"
return
'已支付'
}
else
{
return
this
.
baseData
.
severTypeList
.
map
((
item
)
=>
item
.
severType
)
.
includes
(
cellValue
.
orderStatus
)
?
this
.
baseData
.
severTypeList
.
find
(
(
item
)
=>
item
.
severType
===
cellValue
.
orderStatus
).
severName
:
"-"
return
this
.
baseData
.
severTypeList
.
map
(
item
=>
item
.
severType
).
includes
(
cellValue
.
orderStatus
)
?
this
.
baseData
.
severTypeList
.
find
(
item
=>
item
.
severType
===
cellValue
.
orderStatus
).
severName
:
'-'
}
}
},
{
label
:
"备注"
,
prop
:
"remark"
label
:
'备注'
,
prop
:
'remark'
},
{
label
:
"商品名称"
,
prop
:
"goodsName"
,
width
:
"200px"
label
:
'商品名称'
,
prop
:
'goodsName'
,
width
:
'200px'
},
{
label
:
"报价金额/元"
,
prop
:
"quotedPrice"
,
width
:
"200px"
label
:
'报价金额/元'
,
prop
:
'quotedPrice'
,
width
:
'200px'
},
{
label
:
"预计权益金额/元"
,
prop
:
"estEquityPrice"
,
width
:
"250px"
label
:
'预计权益金额/元'
,
prop
:
'estEquityPrice'
,
width
:
'250px'
},
{
label
:
"实际权益金额/元"
,
prop
:
"equityPrice"
,
width
:
"250px"
label
:
'实际权益金额/元'
,
prop
:
'equityPrice'
,
width
:
'250px'
},
{
label
:
"商户名称"
,
prop
:
"merchantName"
,
label
:
'商户名称'
,
prop
:
'merchantName'
,
minWidth
:
150
}
]
...
...
@@ -187,27 +177,24 @@ export default {
// 基本数据
baseData
:
{
severTypeList
:
[
{
severName
:
"待报价"
,
severType
:
0
},
{
severName
:
"待确认"
,
severType
:
1
},
{
severName
:
"待支付"
,
severType
:
2
},
{
severName
:
"已支付"
,
severType
:
3
},
{
severName
:
"战败"
,
severType
:
-
1
},
{
severName
:
"已完成"
,
severType
:
5
}
{
severName
:
'待报价'
,
severType
:
0
},
{
severName
:
'待确认'
,
severType
:
1
},
{
severName
:
'待支付'
,
severType
:
2
},
{
severName
:
'已支付'
,
severType
:
3
},
{
severName
:
'战败'
,
severType
:
-
1
},
{
severName
:
'已完成'
,
severType
:
5
}
]
}
,
}
}
},
created
()
{
},
created
()
{
},
mounted
()
{
this
.
getOptionsList
()
},
watch
:
{
},
watch
:
{},
methods
:
{
getParams
()
{
...
...
@@ -220,7 +207,7 @@ export default {
return
params
},
beforeSearchFn
()
{
return
new
Promise
(
(
resolve
)
=>
{
return
new
Promise
(
resolve
=>
{
this
.
tableSearchForm
=
this
.
getParams
()
delete
this
.
tableSearchForm
.
createTime
resolve
()
...
...
@@ -258,10 +245,10 @@ export default {
},
handleReset
()
{
this
.
searchForm
=
{
orderStatus
:
""
,
merchantName
:
""
,
goodsName
:
""
,
createTime
:
""
orderStatus
:
''
,
merchantName
:
''
,
goodsName
:
''
,
createTime
:
''
}
this
.
handleSearch
()
},
...
...
@@ -283,7 +270,7 @@ export default {
// 打印报价单
handlePrint
(
row
)
{
this
.
$apis
.
order
.
quotationPrintApi
({
id
:
row
.
id
}).
then
(
(
res
)
=>
{
this
.
$apis
.
order
.
quotationPrintApi
({
id
:
row
.
id
}).
then
(
res
=>
{
console
.
log
(
res
)
const
oWin
=
window
.
open
(
res
)
oWin
.
document
.
fn
=
function
()
{
...
...
@@ -292,10 +279,7 @@ export default {
oWin
.
close
()
}
}
const
html
=
'<div style="height: 100%;width: 100%;">'
+
`<img src="
${
res
}
" onload="fn()" style="max-height:100%;max-width: 100%;" />`
+
"</div>"
const
html
=
'<div style="height: 100%;width: 100%;">'
+
`<img src="
${
res
}
" onload="fn()" style="max-height:100%;max-width: 100%;" />`
+
'</div>'
oWin
.
document
.
open
()
oWin
.
document
.
write
(
html
)
oWin
.
document
.
close
()
...
...
@@ -305,48 +289,56 @@ export default {
// 打印权益合同
handlePrintContract
(
row
)
{
// 获取权益合同PDF
this
.
$apis
.
order
.
contractExportApi
({
orderId
:
row
.
orderId
}).
then
(
(
res
)
=>
{
this
.
$apis
.
order
.
contractExportApi
({
orderId
:
row
.
orderId
}).
then
(
res
=>
{
window
.
open
(
res
)
})
}
,
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
@import
'@/assets/css/mixin.scss'
;
.purchase
{
.table-header
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
25px
;
margin-top
:
20px
;
h2
{
font-weight
:
600
;
font-size
:
16px
;
color
:
#333
;
}
.glbtn
{
left
:
46px
;
position
:
absolute
;
}
.btn
{
right
:
47px
;
position
:
absolute
;
}
}
.greenSpot
{
@include
dot;
background
:
$
color-green
;
}
.yellowSpot
{
@include
dot;
background
:
$
color-yellow
;
}
.ashSpot
{
@include
dot;
background
:
$
color-gray
;
}
.table-btns
/
deep
/
.el-button--text
{
min-width
:
0
!important
;
padding
:
0
;
...
...
@@ -356,5 +348,4 @@ export default {
font-size
:
14px
;
color
:
#909399
;
}
}
</
style
>
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment