Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-appreciation
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 fe6f38f4
authored
Feb 20, 2024
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
加改装件
1 parent
22eea678
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
189 additions
and
11 deletions
src/components/glsx-combi-form/index.vue
src/views/beforeSale/editEquity.vue
src/views/ghPreSale/equityList.vue
src/components/glsx-combi-form/index.vue
View file @
fe6f38f
...
...
@@ -67,7 +67,8 @@
<p
class=
"photo-top-tips"
>
{{
item
.
topTips
}}
</p>
<div
v-if=
"!item.isDisabled"
:style=
"
{ width: item.width || defaultWidth }">
<div
v-if=
"Array.isArray(formObj[item.name]) ? formObj[item.name].length
< item
.
maxPhotoNum
:
!
formObj
[
item
.
name
]"
class=
"activity-img img-w-h"
>
<div
class=
"add"
:style=
"
{ top: item.maxPhotoNum == 1 ? '50%' : '40%' }">+
</div>
<div
class=
"add"
>
+
</div>
<div
class=
"add-label"
>
上传图片
</div>
<span
v-if=
"item.maxPhotoNum > 1"
class=
"number"
>
{{
formObj
[
item
.
name
].
length
}}
/
{{
item
.
maxPhotoNum
}}
</span>
<input
v-if=
"item.uploadType == 'video'"
type=
"file"
style=
"opacity: 0;"
:id=
"item.name + 'file'"
ref=
"file"
class=
"activity-img img-w-h"
accept=
"video/mp4"
@
change=
"e => handleUploadChange(e, item)"
/>
<input
v-else
type=
"file"
style=
"opacity: 0;"
:id=
"item.name + 'file'"
ref=
"file"
class=
"activity-img img-w-h"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
@
change=
"e => handleUploadChange(e, item)"
/>
...
...
@@ -365,15 +366,18 @@ export default {
color
:
#999999
;
}
.glsx-combi-form
.img-w-h
{
width
:
80px
;
height
:
80px
;
width
:
104px
;
height
:
104px
;
border-radius
:
4px
;
box-sizing
:
border-box
;
}
.glsx-combi-form
.activity-img
{
position
:
relative
;
color
:
#999999
;
background
-color
:
#f7f7f7
;
border
:
1px
dotted
#
d9d9d9
;
background
:
#0000000
a
;
border
:
1px
dotted
#
00000026
;
cursor
:
pointer
;
border-radius
:
4px
;
}
.glsx-combi-form
.activity-Input
{
...
...
@@ -389,12 +393,21 @@ export default {
.activity-img
.add
{
position
:
absolute
;
top
:
4
0%
;
font-size
:
4
0px
;
top
:
3
0%
;
font-size
:
3
0px
;
left
:
50%
;
transform
:
translate3d
(
-50%
,
-50%
,
0
);
}
.add-label
{
position
:
absolute
;
top
:
50%
;
font-size
:
14px
;
left
:
50%
;
white-space
:
nowrap
;
transform
:
translateX
(
-50%
);
}
.activity-img
.number
{
position
:
absolute
;
bottom
:
0
;
...
...
@@ -406,8 +419,9 @@ export default {
display
:
none
;
height
:
100%
;
position
:
absolute
;
width
:
80px
;
height
:
80px
;
width
:
104px
;
height
:
104px
;
border-radius
:
4px
;
left
:
0
;
top
:
0
;
z-index
:
2
;
...
...
src/views/beforeSale/editEquity.vue
View file @
fe6f38f
...
...
@@ -241,6 +241,13 @@
<
template
v-if=
"showUploadInfo"
>
<uploadInfo
:imgsQuery=
"attachmentListQuery"
:disabled=
"disabled"
:cardImg=
"cardImg"
:uploadMessage=
"uploadMessage"
@
getAttachmentList=
"getAttachmentList"
></uploadInfo>
</
template
>
<!-- 改装件信息 -->
<div
v-if=
"(refitFormObj.customFlag && equityRadio == '2') || (refitFormObj.autoFlag && equityRadio == '1') || refitFormObj.showFlag"
class=
"container m-t-10"
>
<p
class=
"edit-title"
>
改装件信息
</p>
<div
style=
"padding: 20px 20px 1px;"
><glsx-combi-form
ref=
"refitRef"
:isEdit=
"true"
:isInline=
"false"
defaultWidth=
"320px"
:formObj=
"refitFormObj"
:formData=
"refitFormData"
:formRules=
"refitRules"
></glsx-combi-form></div>
</div>
<!-- 其他信息 -->
<div
class=
"container m-t-10"
id=
"otherInfo"
>
<p
class=
"edit-title"
>
其他信息
</p>
...
...
@@ -260,7 +267,7 @@
<div
class=
"mar-10"
></div>
<el-button
plain
v-if=
"![3, 5].includes(routeInfo.addOrEdit)"
@
click=
"handleDraft"
>
草稿
</el-button>
<div
class=
"mar-10"
></div>
<el-button
v-if=
"routeInfo.addOrEdit != '5'"
type=
"primary"
@
click=
"
handleConfirm
"
>
{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}
</el-button>
<el-button
v-if=
"routeInfo.addOrEdit != '5'"
type=
"primary"
@
click=
"
checkRefitInfo()
"
>
{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}
</el-button>
<div
class=
"mar-10"
></div>
</div>
</div>
...
...
@@ -583,6 +590,96 @@ export default {
tire
:
{},
glass
:
{}
},
refitRules
:
{
addOnsFlag
:
[{
required
:
true
,
message
:
'请选择含加改装件'
,
trigger
:
'change'
}],
invoice
:
[
{
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
refitFormObj
.
addOnsFlag
&&
!
value
)
{
callback
(
new
Error
(
'请上传发票或收据'
))
}
else
{
callback
()
}
},
trigger
:
'change'
}
],
refitImg
:
[
{
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
refitFormObj
.
addOnsFlag
&&
!
value
)
{
callback
(
new
Error
(
'请上传加改装部位照片'
))
}
else
{
callback
()
}
},
trigger
:
'change'
}
]
},
refitFormObj
:
{
autoFlag
:
0
,
customFlag
:
0
,
showFlag
:
false
,
addOnsFlag
:
1
,
invoice
:
''
,
refitImg
:
''
},
refitFormData
:
[
{
label
:
'含加改装件'
,
name
:
'addOnsFlag'
,
type
:
'radio'
,
optionList
:
[
{
confId
:
1
,
confName
:
'是'
},
{
confId
:
0
,
confName
:
'否'
}
],
optionId
:
'confId'
,
optionLabel
:
'confName'
},
{
label
:
'发票或收据'
,
name
:
'invoice'
,
type
:
'upload'
,
isHide
:
false
,
maxPhotoNum
:
1
,
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
const
imgFile
=
e
.
target
.
result
const
base64
=
file
.
name
.
split
(
'.'
).
pop
()
+
'@'
+
imgFile
.
split
(
','
)[
1
]
this
.
$apis
.
beforeSale
.
uploadImgApi
({
file
:
base64
,
fileType
:
'image'
}).
then
(
res
=>
{
if
(
res
)
{
this
.
refitFormObj
.
invoice
=
res
this
.
$refs
.
refitRef
.
$refs
.
formRef
.
validateField
(
'invoice'
)
}
})
}
},
{
label
:
'加改装部位照片'
,
name
:
'refitImg'
,
isHide
:
false
,
type
:
'upload'
,
maxPhotoNum
:
1
,
handleUpload
:
(
e
,
file
,
targetItem
)
=>
{
const
imgFile
=
e
.
target
.
result
const
base64
=
file
.
name
.
split
(
'.'
).
pop
()
+
'@'
+
imgFile
.
split
(
','
)[
1
]
this
.
$apis
.
beforeSale
.
uploadImgApi
({
file
:
base64
,
fileType
:
'image'
}).
then
(
res
=>
{
if
(
res
)
{
this
.
refitFormObj
.
refitImg
=
res
this
.
$refs
.
refitRef
.
$refs
.
formRef
.
validateField
(
'refitImg'
)
}
})
}
}
],
// 其他信息
editRuleOther
:
{
deviceNo
:
[{
required
:
false
,
message
:
'请输入设备号'
,
trigger
:
'change'
}],
...
...
@@ -839,6 +936,16 @@ export default {
},
watch
:
{
'refitFormObj.addOnsFlag'
:
{
handler
(
newValue
,
oldValue
)
{
this
.
refitFormData
.
forEach
(
item
=>
{
if
(
item
.
type
==
'upload'
)
{
item
.
isHide
=
!
newValue
}
})
},
immediate
:
true
},
'editForm.vehicle.invoicePrice'
(
newValue
,
oldValue
)
{
this
.
editForm
.
vehicle
.
invoicePrice
=
limitPrice
(
newValue
,
oldValue
,
7
,
2
,
0
,
2000000
)
if
(
this
.
currentVaildItem
)
{
...
...
@@ -1096,6 +1203,8 @@ export default {
})
}
}
let
hasRefitFlagList
=
this
.
allProdList
.
filter
(
item
=>
this
.
packageCodeList
.
includes
(
item
.
packageCode
))
this
.
refitFormObj
.
autoFlag
=
!!
hasRefitFlagList
?.
find
(
item
=>
item
.
qsFlag
)
},
changeRaido
(
e
,
item
)
{
if
(
e
)
{
...
...
@@ -1138,6 +1247,8 @@ export default {
this
.
showUploadInfo
=
false
}
}
let
hasRefitFlagList
=
this
.
allProdList
.
filter
(
item
=>
this
.
autoPackageCodeList
.
includes
(
item
.
packageCode
))
this
.
refitFormObj
.
customFlag
=
!!
hasRefitFlagList
?.
find
(
item
=>
item
.
qsFlag
)
},
// 获取店铺信息
getStoreInfo
()
{
...
...
@@ -1534,6 +1645,19 @@ export default {
},
getInfo
(
productArrData
)
{
this
.
$apis
.
beforeSale
.
getEquityApi
({
contractNo
:
this
.
routeInfo
.
contractNo
,
repeatedFlag
:
this
.
routeInfo
.
addOrEdit
==
4
?
1
:
0
}).
then
(
res
=>
{
this
.
refitFormObj
.
addOnsFlag
=
res
.
addOnsFlag
this
.
refitFormObj
.
showFlag
=
res
.
addOnsFlag
!==
null
let
attachmentList
=
[]
res
.
attachmentList
?.
forEach
(
item
=>
{
if
(
item
.
attachmentCode
==
'QS0001'
)
{
this
.
refitFormObj
.
invoice
=
item
.
attachmentFile
}
else
if
(
item
.
attachmentCode
==
'QS0002'
)
{
this
.
refitFormObj
.
refitImg
=
item
.
attachmentFile
}
else
{
attachmentList
.
push
(
item
)
}
})
res
.
attachmentList
=
attachmentList
this
.
editForm
=
{
...
res
}
...
...
@@ -2042,7 +2166,24 @@ export default {
if
(
!
params
.
sn
)
{
delete
params
.
sn
}
const
{
customFlag
,
autoFlag
,
showFlag
,
addOnsFlag
,
invoice
,
refitImg
}
=
this
.
refitFormObj
if
((
customFlag
&&
this
.
equityRadio
==
'2'
)
||
(
autoFlag
&&
this
.
equityRadio
==
'1'
)
||
showFlag
)
{
params
.
addOnsFlag
=
addOnsFlag
if
(
addOnsFlag
)
{
let
invoiceItem
=
{
attachmentCode
:
'QS0001'
,
attachmentFile
:
invoice
,
attachmentType
:
'IMG'
}
params
.
attachmentList
.
push
(
invoiceItem
)
let
refitImgItem
=
{
attachmentCode
:
'QS0002'
,
attachmentFile
:
refitImg
,
attachmentType
:
'IMG'
}
params
.
attachmentList
.
push
(
refitImgItem
)
}
}
params
.
dataSource
=
this
.
editForm
.
dataSource
||
''
this
.
$apis
.
beforeSale
.
updateEquityApi
(
params
).
then
(
res
=>
{
this
.
submit
=
false
...
...
@@ -2111,6 +2252,17 @@ export default {
}
return
isEmpty
},
checkRefitInfo
()
{
if
(
this
.
$refs
?.
refitRef
?.
$refs
?.
formRef
)
{
this
.
$refs
?.
refitRef
?.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
handleConfirm
()
}
})
}
else
{
this
.
handleConfirm
()
}
},
handleConfirm
()
{
try
{
this
.
vaildGlassParams
()
...
...
@@ -2196,6 +2348,14 @@ export default {
}
},
handleReset
()
{
this
.
refitFormObj
=
{
autoFlag
:
0
,
customFlag
:
0
,
showFlag
:
false
,
addOnsFlag
:
1
,
invoice
:
''
,
refitImg
:
''
}
this
.
editForm
=
{
packageCode
:
''
,
suggestedSellingPrice
:
''
,
...
...
src/views/ghPreSale/equityList.vue
View file @
fe6f38f
...
...
@@ -1706,6 +1706,10 @@ export default {
}
&
:last-child
{
width
:
330px
;
.muti-imgs
{
width
:
80px
;
height
:
80px
;
}
.img-btns
,
img
{
width
:
64px
;
...
...
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