Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-services
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 b1474b8c
authored
Nov 22, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
权益
1 parent
b4e75df9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
234 additions
and
2 deletions
src/api/modules/beforeSale.js
src/components/glsx-combi-form/index.vue
src/views/beforeSale/equityList.vue
src/views/beforeSale/pdfDialog.vue
src/api/modules/beforeSale.js
View file @
b1474b8
...
@@ -23,6 +23,17 @@ const getExportApi = params => {
...
@@ -23,6 +23,17 @@ const getExportApi = params => {
})
})
}
}
// 打印合同
const
getPriteApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
order.prite`
return
http
({
url
:
'rop-scrm-equity/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
getCarBrandListApi
=
params
=>
{
const
getCarBrandListApi
=
params
=>
{
// params.method = 'dj.api.car.series.list'
// params.method = 'dj.api.car.series.list'
params
.
method
=
'scrm.api.carlife.common.getCarBrandList'
params
.
method
=
'scrm.api.carlife.common.getCarBrandList'
...
@@ -129,4 +140,49 @@ const createCodeApi = params => {
...
@@ -129,4 +140,49 @@ const createCodeApi = params => {
})
})
}
}
export
default
{
getListApi
,
getExportApi
,
getCarBrandListApi
,
getCarChildListApi
,
getCarTypeListApi
,
getCarSeriesListApi
,
getHotlineApi
,
updateHotlineApi
,
getPackageListApi
,
getEquityApi
,
updateEquityApi
,
createCodeApi
}
// 获取套菜附件属性
const
getOrderAttrApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
order.attachment.get`
return
http
({
url
:
'rop-scrm-equity/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
// 获取套菜附件属性
const
getOrderValueApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
order.attachment.value.get`
return
http
({
url
:
'rop-scrm-equity/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
// 更新套菜附件属性
const
updateOrderApi
=
params
=>
{
params
.
method
=
`
${
orderPath
}
attachment.update`
return
http
({
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
const
uploadImgApi
=
params
=>
{
params
.
method
=
'scrm.api.equity.common.upload.image'
return
http
({
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
noSignAttr
:
[
'file'
]
})
}
export
default
{
getListApi
,
getExportApi
,
getPriteApi
,
getCarBrandListApi
,
getCarChildListApi
,
getCarTypeListApi
,
getCarSeriesListApi
,
getHotlineApi
,
updateHotlineApi
,
getPackageListApi
,
getEquityApi
,
updateEquityApi
,
createCodeApi
,
getOrderAttrApi
,
getOrderValueApi
,
updateOrderApi
,
uploadImgApi
}
src/components/glsx-combi-form/index.vue
View file @
b1474b8
...
@@ -54,6 +54,14 @@
...
@@ -54,6 +54,14 @@
<el-radio
v-for=
"subItem in item.optionList"
:key=
"subItem[item.optionId]"
:label=
"subItem[item.optionId]"
>
{{ subItem[item.optionLabel] }}
</el-radio>
<el-radio
v-for=
"subItem in item.optionList"
:key=
"subItem[item.optionId]"
:label=
"subItem[item.optionId]"
>
{{ subItem[item.optionLabel] }}
</el-radio>
</el-radio-group>
</el-radio-group>
<el-date-picker
v-else-if=
"item.type === 'datePicker'"
:value-format=
"item.valueFormat"
:style=
"{ width: item.selectWidth || defaultWidth }"
v-model=
"formObj[item.name]"
:type=
"item.dateType || 'daterange'"
:clearable=
"item.isClear || false"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:placeholder=
"item.placeholder || '请选择' + item.label"
:picker-options=
"pickerOption[item.pickerOptions]"
@
change=
"e => handleDateChange(e, item)"
></el-date-picker>
<el-date-picker
v-else-if=
"item.type === 'datePicker'"
:value-format=
"item.valueFormat"
:style=
"{ width: item.selectWidth || defaultWidth }"
v-model=
"formObj[item.name]"
:type=
"item.dateType || 'daterange'"
:clearable=
"item.isClear || false"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:placeholder=
"item.placeholder || '请选择' + item.label"
:picker-options=
"pickerOption[item.pickerOptions]"
@
change=
"e => handleDateChange(e, item)"
></el-date-picker>
<
template
v-else-if=
"item.type === 'uploadBtn'"
>
<el-button
type=
"primary"
>
上传
<input
type=
"file"
style=
"opacity: 0;"
:id=
"item.name + 'file'"
ref=
"file"
class=
"upload-img-btn"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"e => handleUploadChange(e, item)"
/>
</el-button>
<!--
<el-button
v-show=
"formObj[item.name]"
type=
"primary"
>
查看
</el-button>
-->
<el-button
type=
"primary"
>
查看
{{
formObj
}}
</el-button>
</
template
>
<
template
v-else-if=
"item.type === 'upload'"
>
<
template
v-else-if=
"item.type === 'upload'"
>
<p
class=
"photo-top-tips"
>
{{
item
.
topTips
}}
</p>
<p
class=
"photo-top-tips"
>
{{
item
.
topTips
}}
</p>
<div
v-if=
"!item.isDisabled"
:style=
"
{ width: item.width || '100%' }">
<div
v-if=
"!item.isDisabled"
:style=
"
{ width: item.width || '100%' }">
...
@@ -312,6 +320,14 @@ export default {
...
@@ -312,6 +320,14 @@ export default {
/* .glsx-combi-form .tips {
/* .glsx-combi-form .tips {
margin: 0;
margin: 0;
} */
} */
.glsx-combi-form
.upload-img-btn
{
width
:
62px
;
height
:
32px
;
position
:
absolute
;
left
:
0
;
top
:
0
;
cursor
:
pointer
;
}
/* 图片上传 */
/* 图片上传 */
.glsx-combi-form
.photo-top-tips
{
.glsx-combi-form
.photo-top-tips
{
/* height: 36px; */
/* height: 36px; */
...
...
src/views/beforeSale/equityList.vue
View file @
b1474b8
...
@@ -29,12 +29,18 @@
...
@@ -29,12 +29,18 @@
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
</div>
</div>
<pdf-dialog
:isVisible=
"isPdfVisible"
title=
"合同"
:pdfUrl=
"pdfUrl"
@
closeDialog=
"handlePdfClose"
></pdf-dialog>
<glsx-dialog
title=
"上传资料"
:isVisible
.
sync=
"isFileVisible"
width=
"70%"
@
confirmDialog=
"handleUploadFileConfirm"
@
closeDialog=
"handleUploadFileClose"
>
<glsx-combi-form
labelWidth=
"300px"
isBlock=
"true"
ref=
"uploadFormRef"
formRef=
"uploadChildRef"
:formRules=
"uploadRule"
:formObj
.
sync=
"uploadForm"
:formData=
"uploadFormData"
></glsx-combi-form>
</glsx-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
*
as
dayjs
from
'dayjs'
import
*
as
dayjs
from
'dayjs'
import
glsxCombiForm
from
'@/components/glsx-combi-form'
import
glsxCombiForm
from
'@/components/glsx-combi-form'
import
glsxDialog
from
'@/components/glsx-dialog'
import
pdfDialog
from
'./pdfDialog'
export
default
{
export
default
{
name
:
'equityList'
,
name
:
'equityList'
,
data
()
{
data
()
{
...
@@ -47,6 +53,15 @@ export default {
...
@@ -47,6 +53,15 @@ export default {
effectiveDate
:
[]
effectiveDate
:
[]
},
},
tableSearchForm
:
{},
tableSearchForm
:
{},
// 合同打印
isPdfVisible
:
false
,
pdfUrl
:
''
,
// 上传资料
isFileVisible
:
false
,
packageList
:
[],
uploadRule
:
{},
uploadForm
:
{},
uploadFormData
:
[],
// 搜索
// 搜索
searchFormData
:
[
searchFormData
:
[
{
{
...
@@ -256,7 +271,9 @@ export default {
...
@@ -256,7 +271,9 @@ export default {
},
},
components
:
{
components
:
{
glsxCombiForm
glsxCombiForm
,
glsxDialog
,
pdfDialog
},
},
mounted
()
{
mounted
()
{
...
@@ -338,6 +355,91 @@ export default {
...
@@ -338,6 +355,91 @@ export default {
addOrEdit
==
1
?
this
.
$router
.
push
(
'/beforeSale/editEquity/'
+
addOrEdit
+
'/'
+
-
1
)
:
this
.
$router
.
push
(
'/beforeSale/editEquity/'
+
addOrEdit
+
'/'
+
row
.
contractNo
)
addOrEdit
==
1
?
this
.
$router
.
push
(
'/beforeSale/editEquity/'
+
addOrEdit
+
'/'
+
-
1
)
:
this
.
$router
.
push
(
'/beforeSale/editEquity/'
+
addOrEdit
+
'/'
+
row
.
contractNo
)
},
},
handlePdfClose
()
{
this
.
isPdfVisible
=
!
this
.
isPdfVisible
},
// 打印
handlePdf
(
row
)
{
// this.pdfUrl = 'C:/Users/zhoujj/AppData/Local/Temp/baiduyunguanjia/onlinedit/cache/39d5d49441f9884a432cb59ed2443ef7/2111189f54f808c9e8946e.pdf'
this
.
handlePdfClose
()
this
.
$apis
.
beforeSale
.
getPriteApi
({
contractNo
:
row
.
contractNo
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
pdfUrl
=
res
})
},
uploadFile
(
imgUrl
,
targetItem
)
{
var
params
=
{
contractNo
:
this
.
uploadForm
.
contractNo
,
attachmentCode
:
targetItem
.
name
,
attachmentFile
:
imgUrl
,
attachmentType
:
'IMG'
}
this
.
$apis
.
beforeSale
.
updateOrderApi
(
params
).
then
(
res
=>
{
// this.uploadForm[targetItem.name] = imgUrl
console
.
log
(
targetItem
)
this
.
$set
(
this
.
uploadForm
,
targetItem
.
name
,
'https://img0.baidu.com/it/u=1027006618,1872310278&fm=26&fmt=auto'
)
// this.uploadForm[targetItem.name] = 'https://img0.baidu.com/it/u=1027006618,1872310278&fm=26&fmt=auto'
console
.
log
(
this
.
uploadForm
)
})
},
// 上传资料
autoGenerate
()
{
var
tempList
=
[]
this
.
uploadForm
=
{}
this
.
uploadFormData
=
[]
this
.
packageList
.
forEach
(
item
=>
{
// item.groupAttributeList.forEach((k, idx) => {
// this.uploadForm[item.attachmentCode] = ''
this
.
$set
(
this
.
uploadForm
,
item
.
attachmentCode
,
''
)
this
.
uploadFormData
.
push
({
label
:
item
.
attachmentName
,
name
:
item
.
attachmentCode
,
type
:
'uploadBtn'
,
limitSize
:
20
,
maxPhotoNum
:
1
,
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
const
imgFile
=
e
.
target
.
result
const
base64
=
file
.
name
.
split
(
'.'
)[
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
var
imgUrl
=
''
this
.
$apis
.
beforeSale
.
uploadImgApi
({
file
:
base64
,
fileType
:
'image'
}).
then
(
res
=>
{
this
.
uploadFile
(
res
,
targetItem
)
})
}
})
if
(
item
.
required
==
1
)
{
this
.
uploadRule
[
item
.
attachmentCode
]
=
[
{
required
:
true
,
message
:
'请选择'
+
item
.
attachmentName
,
trigger
:
'change'
}
]
}
})
this
.
handleUploadFileClose
()
},
handleUploadFileClose
()
{
this
.
isFileVisible
=
!
this
.
isFileVisible
},
handleUpload
(
row
)
{
console
.
log
(
row
)
this
.
$apis
.
beforeSale
.
getOrderAttrApi
({
packageCode
:
row
.
packageCode
}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
packageList
=
res
this
.
uploadForm
.
contractNo
=
row
.
contractNo
// this.packageList.forEach(item => {
// this.$apis.beforeSale.getOrderValueApi({ contractNo: row.contractNo, attachmentCode: item.attachmentCode }).then(res => {
// console.log(res)
// this.uploadForm[item.attachmentCode] = res
// })
// })
this
.
autoGenerate
()
})
},
handleDelete
(
row
)
{
handleDelete
(
row
)
{
this
.
secondConfirm
(
'删除'
,
'是否确认删除该专区?'
,
'zoneList'
,
'deleteZoneApi'
,
{
contractNo
:
row
.
contractNo
})
this
.
secondConfirm
(
'删除'
,
'是否确认删除该专区?'
,
'zoneList'
,
'deleteZoneApi'
,
{
contractNo
:
row
.
contractNo
})
},
},
...
...
src/views/beforeSale/pdfDialog.vue
0 → 100644
View file @
b1474b8
<!-- 查看详情 -->
<
template
>
<div
class=
"pdfDialog"
>
<el-dialog
:visible
.
sync=
"isVisible"
:title=
"title"
:before-close=
"handleClose"
:close-on-click-modal=
"false"
width=
"860px"
>
<iframe
width=
"100%"
height=
"700px"
scrolling=
"yes"
frameborder=
"0"
:src=
"pdfUrl"
></iframe>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
name
:
'pdfDialog'
,
data
()
{
return
{
}
},
props
:
{
isVisible
:
{
type
:
Boolean
,
default
:
false
},
title
:
String
,
pdfUrl
:
String
},
mounted
()
{},
methods
:
{
handleClose
()
{
this
.
$emit
(
'closeDialog'
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
.pdfDialog
{
.el-dialog__header
{
padding
:
10px
16px
4px
;
background-color
:
#141516
;
.el-dialog__title{
color
:
#fff
;
font-size
:
16px
;
}
}
.el-dialog__body
{
padding
:
0
;
background-color
:
#202223
}
}
</
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