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 6a3a968d
authored
Jan 06, 2022
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
ee0e895c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
71 deletions
src/views/beforeSale/editEquity.vue
src/views/beforeSale/equityList.vue
src/views/beforeSale/editEquity.vue
View file @
6a3a968
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
</el-select>
</el-select>
</
template
>
</
template
>
<
template
v-if=
"attr.attributeType == 'datePicker'"
>
<
template
v-if=
"attr.attributeType == 'datePicker'"
>
<el-date-picker
class=
"arrt_pannel"
:picker-options=
"pickerOptions"
:disabled=
"disabled || attr.disabled"
@
change=
"getCurChangeDate($event, item, attr)"
v-model=
"productModal[item.idName][attr.attributeName]"
size=
"small"
type=
"date"
:placeholder=
"'请选择' + attr.attributeDesc"
></el-date-picker>
<el-date-picker
class=
"arrt_pannel"
:picker-options=
"
attr.attributeName=='additional_date'?pickerOptions2:
pickerOptions"
:disabled=
"disabled || attr.disabled"
@
change=
"getCurChangeDate($event, item, attr)"
v-model=
"productModal[item.idName][attr.attributeName]"
size=
"small"
type=
"date"
:placeholder=
"'请选择' + attr.attributeDesc"
></el-date-picker>
</
template
>
</
template
>
</div>
</div>
</div>
</div>
...
@@ -120,15 +120,15 @@
...
@@ -120,15 +120,15 @@
</div>
</div>
<div
class=
"arrt_pannel"
>
<div
class=
"arrt_pannel"
>
<
template
v-if=
"attr.attributeType == 'input'"
>
<
template
v-if=
"attr.attributeType == 'input'"
>
<el-input
class=
"arrt_pannel"
:disabled=
"disabled"
@
input=
"getCurChangeInput($event, item, attr)"
v-model=
"productModal[item.idName][attr.attributeName]"
size=
"small"
:maxlength=
"attr.maxLength"
clearable
:placeholder=
"'请输入' + attr.attributeDesc"
></el-input>
<el-input
class=
"arrt_pannel"
:disabled=
"disabled
|| attr.disabled
"
@
input=
"getCurChangeInput($event, item, attr)"
v-model=
"productModal[item.idName][attr.attributeName]"
size=
"small"
:maxlength=
"attr.maxLength"
clearable
:placeholder=
"'请输入' + attr.attributeDesc"
></el-input>
</
template
>
</
template
>
<
template
v-if=
"attr.attributeType == 'select'"
>
<
template
v-if=
"attr.attributeType == 'select'"
>
<el-select
class=
"arrt_pannel"
:disabled=
"disabled"
size=
"small"
@
change=
"getCurChangeSelect($event, item, attr)"
v-model=
"productModal[item.idName][attr.attributeName]"
clearable
:placeholder=
"'请选择' + attr.attributeDesc"
>
<el-select
class=
"arrt_pannel"
:disabled=
"disabled
|| attr.disabled
"
size=
"small"
@
change=
"getCurChangeSelect($event, item, attr)"
v-model=
"productModal[item.idName][attr.attributeName]"
clearable
:placeholder=
"'请选择' + attr.attributeDesc"
>
<el-option
v-for=
"option in attr.optionList"
:key=
"option.value"
:label=
"option.label"
:value=
"option.value"
></el-option>
<el-option
v-for=
"option in attr.optionList"
:key=
"option.value"
:label=
"option.label"
:value=
"option.value"
></el-option>
</el-select>
</el-select>
</
template
>
</
template
>
<
template
v-if=
"attr.attributeType == 'datePicker'"
>
<
template
v-if=
"attr.attributeType == 'datePicker'"
>
<el-date-picker
class=
"arrt_pannel"
:
disabled=
"
disabled"
@
change=
"getCurChangeDate($event, item, attr)"
v-model=
"productModal[item.idName][attr.attributeName]"
size=
"small"
type=
"date"
:placeholder=
"'请选择' + attr.attributeDesc"
></el-date-picker>
<el-date-picker
class=
"arrt_pannel"
:
picker-options=
"attr.attributeName=='additional_date'?pickerOptions2: pickerOptions"
:disabled=
"disabled || attr.
disabled"
@
change=
"getCurChangeDate($event, item, attr)"
v-model=
"productModal[item.idName][attr.attributeName]"
size=
"small"
type=
"date"
:placeholder=
"'请选择' + attr.attributeDesc"
></el-date-picker>
</
template
>
</
template
>
</div>
</div>
</div>
</div>
...
@@ -209,7 +209,7 @@
...
@@ -209,7 +209,7 @@
</div>
</div>
<!-- 二维码 -->
<!-- 二维码 -->
<qrCode
:bottom=
"320"
phone=
"
189 3890 7441
"
:codeUrl=
"qrcodUrl"
></qrCode>
<qrCode
:bottom=
"320"
phone=
"
400 6123 886
"
:codeUrl=
"qrcodUrl"
></qrCode>
</div>
</div>
</template>
</template>
...
@@ -674,7 +674,9 @@ export default {
...
@@ -674,7 +674,9 @@ export default {
checkCodeList
:
[],
checkCodeList
:
[],
rightDisable
:
false
,
rightDisable
:
false
,
leftDisable
:
false
,
leftDisable
:
false
,
pickerOptions
:{}
pickerOptions
:{},
pickerOptions2
:{},
hotline
:
''
}
}
},
},
...
@@ -688,57 +690,6 @@ export default {
...
@@ -688,57 +690,6 @@ export default {
'editFormPro.additional_price'
(
newValue
,
oldValue
)
{
'editFormPro.additional_price'
(
newValue
,
oldValue
)
{
this
.
editFormPro
.
additional_price
=
limitPrice
(
newValue
,
oldValue
,
6
,
2
)
this
.
editFormPro
.
additional_price
=
limitPrice
(
newValue
,
oldValue
,
6
,
2
)
}
}
// curSelectPro(newValue, oldValue) {
// console.log(newValue);
// if (this.equityRadio == 1) {
// this.checkCodeList = []
// this.curSelectPro = newValue
// newValue.forEach(item => {
// this.productList.forEach(ele => {
// if (item == ele.packageName) {
// this.checkCodeList.push(ele.packageCode)
// for (let key in this.productModal[ele.idName]) {
// ele.groupAttributeList.forEach(attr => {
// if (attr.attributeName == key) {
// this.commonPart(this.productModal[ele.idName][key], ele, attr)
// }
// })
// }
// }
// })
// })
// if (!this.checkCodeList.length) {
// this.formatProduct = {}
// this.tempAttributeList = []
// this.packageCodeList = []
// }
// this.submit = false
// }
// },
// curSelectCustomPro(newValue, oldValue) {
// if (this.equityRadio == 2) {
// this.checkCodeList = []
// this.curSelectPro = newValue
// this.customProductList.forEach(ele => {
// if (newValue == ele.packageName) {
// this.checkCodeList.push(ele.packageCode)
// for (let key in this.productModal[ele.idName]) {
// ele.groupAttributeList.forEach(attr => {
// if (attr.attributeName == key) {
// this.commonPart(this.productModal[ele.idName][key], ele, attr)
// }
// })
// }
// }
// })
// if (!newValue) {
// this.autoFormatProduct = {}
// this.autoAttriButeList = []
// this.autoPackageCodeList = []
// }
// this.submit = false
// }
// }
},
},
components
:
{
components
:
{
...
@@ -749,10 +700,10 @@ export default {
...
@@ -749,10 +700,10 @@ export default {
async
created
()
{
async
created
()
{
this
.
getAllVehicleBrand
()
this
.
getAllVehicleBrand
()
this
.
getCarChildList
(
false
,
true
)
this
.
getCarChildList
(
false
,
true
)
// 测试时使用
this
.
getSpeAgreeOptions
()
this
.
getSpeAgreeOptions
()
this
.
getStoreInfo
()
this
.
pickerOptions
=
this
.
setDateLimit
()
this
.
pickerOptions
=
this
.
setDateLimit
()
this
.
pickerOptions2
=
this
.
setDateLimit2
()
this
.
getHotline
()
},
},
mounted
()
{
mounted
()
{
...
@@ -769,11 +720,21 @@ export default {
...
@@ -769,11 +720,21 @@ export default {
this
.
getOptionsList
(
'editFormDataUser'
,
false
)
this
.
getOptionsList
(
'editFormDataUser'
,
false
)
this
.
getOptionsList
(
'editFormDataOther'
,
false
)
this
.
getOptionsList
(
'editFormDataOther'
,
false
)
this
.
disabled
&&
this
.
setDisabled
()
this
.
disabled
&&
this
.
setDisabled
()
this
.
successDisable
&&
this
.
setDisabled
([
'invoicePrice'
,
'billingDate'
,
'packageCode'
,
'actualSalesPrice'
,
'servicePeriod'
,
'effectiveDate'
])
this
.
successDisable
&&
this
.
setDisabled
([
'invoicePrice'
,
'billingDate'
,
'packageCode'
,
'actualSalesPrice'
,
'servicePeriod'
,
'effectiveDate'
,
'merchantName'
,
'merchantPhone'
,
'merchantAddress'
])
},
},
methods
:
{
methods
:
{
// 设置日期组件时间范围
// 查找服务热线
getHotline
()
{
if
(
this
.
routeInfo
.
addOrEdit
==
3
){
return
}
this
.
$apis
.
beforeSale
.
getHotlineApi
({}).
then
(
res
=>
{
this
.
hotline
=
res
this
.
getStoreInfo
()
})
},
// 设置日期组件时间范围---今天之后
setDateLimit
()
{
setDateLimit
()
{
let
obj
=
{
let
obj
=
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
...
@@ -782,6 +743,15 @@ export default {
...
@@ -782,6 +743,15 @@ export default {
}
}
return
obj
return
obj
},
},
// 设置日期组件时间范围---今天之前
setDateLimit2
()
{
let
obj
=
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
}
}
return
obj
},
// 卡号获取期限
// 卡号获取期限
getDateList
(
seqNo
,
pack
,
attr
)
{
getDateList
(
seqNo
,
pack
,
attr
)
{
this
.
$apis
.
beforeSale
.
dateBycarNo
({
seqNo
}).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
dateBycarNo
({
seqNo
}).
then
(
res
=>
{
...
@@ -809,6 +779,13 @@ export default {
...
@@ -809,6 +779,13 @@ export default {
}
}
})
})
}
}
if
(
item
.
idName
==
'crash'
){
const
customAttr
=
{
attributeGroup
:
'planId'
,
attributeName
:
'planId'
}
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
'planId'
],
item
,
customAttr
)
}
}
else
{
}
else
{
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
packageCodeList
=
this
.
packageCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
packageCodeList
=
this
.
packageCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
...
@@ -826,6 +803,7 @@ export default {
...
@@ -826,6 +803,7 @@ export default {
this
.
checkCodeList
=
[]
this
.
checkCodeList
=
[]
this
.
autoPackageCodeList
=
[]
this
.
autoPackageCodeList
=
[]
this
.
checkCodeList
.
push
(
item
.
packageCode
)
this
.
checkCodeList
.
push
(
item
.
packageCode
)
this
.
autoPackageCodeList
.
push
(
item
.
packageCode
)
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
if
(
attr
.
attributeName
==
key
)
{
...
@@ -843,7 +821,7 @@ export default {
...
@@ -843,7 +821,7 @@ export default {
}
}
this
.
$apis
.
beforeSale
.
merchantInfo
(
para
).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
merchantInfo
(
para
).
then
(
res
=>
{
this
.
editForm
.
merchantName
=
res
.
merchantName
this
.
editForm
.
merchantName
=
res
.
merchantName
this
.
editForm
.
merchantPhone
=
res
.
residentPho
ne
this
.
editForm
.
merchantPhone
=
this
.
hotli
ne
this
.
editForm
.
merchantAddress
=
res
.
merchantAddress
this
.
editForm
.
merchantAddress
=
res
.
merchantAddress
})
})
},
},
...
@@ -984,6 +962,7 @@ export default {
...
@@ -984,6 +962,7 @@ export default {
concactArr
.
forEach
(
item
=>
{
concactArr
.
forEach
(
item
=>
{
this
.
formatProduct
=
Object
.
assign
(
this
.
formatProduct
,
item
)
this
.
formatProduct
=
Object
.
assign
(
this
.
formatProduct
,
item
)
})
})
console
.
log
(
this
.
formatProduct
);
}
else
{
}
else
{
concactArr
.
forEach
(
item
=>
{
concactArr
.
forEach
(
item
=>
{
this
.
autoFormatProduct
=
Object
.
assign
(
this
.
autoFormatProduct
,
item
)
this
.
autoFormatProduct
=
Object
.
assign
(
this
.
autoFormatProduct
,
item
)
...
@@ -1019,6 +998,7 @@ export default {
...
@@ -1019,6 +998,7 @@ export default {
item
.
idName
=
'tire'
item
.
idName
=
'tire'
}
else
if
(
item
.
packageName
.
includes
(
'碰撞无忧'
))
{
}
else
if
(
item
.
packageName
.
includes
(
'碰撞无忧'
))
{
item
.
idName
=
'crash'
item
.
idName
=
'crash'
this
.
productModal
[
item
.
idName
][
'planId'
]
=
item
.
planId
this
.
getCase
(
item
.
planId
)
this
.
getCase
(
item
.
planId
)
}
else
if
(
item
.
packageName
.
includes
(
'盗抢全损无忧'
))
{
}
else
if
(
item
.
packageName
.
includes
(
'盗抢全损无忧'
))
{
item
.
idName
=
'stolen'
item
.
idName
=
'stolen'
...
@@ -1177,16 +1157,30 @@ export default {
...
@@ -1177,16 +1157,30 @@ export default {
this
.
customProductList
.
map
(
item
=>
{
this
.
customProductList
.
map
(
item
=>
{
if
(
item
.
packageCode
!=
this
.
editForm
.
packageCode
)
{
if
(
item
.
packageCode
!=
this
.
editForm
.
packageCode
)
{
item
.
disabled
=
true
item
.
disabled
=
true
return
item
}
else
{
item
.
groupAttributeList
.
map
(
ele
=>
{
if
(
ele
.
attributeName
==
'service_period'
)
{
ele
.
disabled
=
true
}
if
(
ele
.
attributeName
==
'card'
)
{
ele
.
disabled
=
true
}
if
(
ele
.
attributeName
==
'effective_date'
)
{
ele
.
disabled
=
true
}
}
})
})
}
}
return
item
})
}
}
else
{
}
else
{
this
.
equityRadio
=
1
this
.
equityRadio
=
1
this
.
curSelectPro
=
[
targetItem
.
packageName
]
this
.
curSelectPro
=
[
targetItem
.
packageName
]
this
.
editForm
.
attributeList
.
forEach
(
item
=>
{
this
.
editForm
.
attributeList
.
forEach
(
item
=>
{
if
(
item
.
attributeName
.
includes
(
'price'
))
{
if
(
item
.
attributeName
.
includes
(
'price'
))
{
item
.
attributeValue
=
item
.
attributeValue
/
100
item
.
attributeValue
=
item
.
attributeValue
/
100
}
else
if
(
item
.
attributeName
==
'planId'
){
this
.
getCase
(
parseInt
(
item
.
attributeValue
))
}
}
this
.
productModal
[
targetItem
.
idName
][
item
.
attributeName
]
=
item
.
attributeValue
this
.
productModal
[
targetItem
.
idName
][
item
.
attributeName
]
=
item
.
attributeValue
})
})
...
@@ -1478,6 +1472,7 @@ export default {
...
@@ -1478,6 +1472,7 @@ export default {
},
},
// 草稿
// 草稿
handleDraft
()
{
handleDraft
()
{
const
vaidObj
=
this
.
equityRadio
==
1
?
this
.
formatProduct
:
this
.
autoFormatProduct
if
(
this
.
submit
)
{
if
(
this
.
submit
)
{
return
true
return
true
}
}
...
@@ -1494,6 +1489,10 @@ export default {
...
@@ -1494,6 +1489,10 @@ export default {
}
else
{
}
else
{
params
.
contractNo
=
''
params
.
contractNo
=
''
}
}
if
(
!
params
.
attributes
){
params
.
attributes
=
[]
}
params
=
Object
.
assign
(
params
,
vaidObj
)
this
.
updateEquity
(
params
)
this
.
updateEquity
(
params
)
},
},
updateEquity
(
params
)
{
updateEquity
(
params
)
{
...
@@ -1515,7 +1514,7 @@ export default {
...
@@ -1515,7 +1514,7 @@ export default {
return
return
}
}
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/beforeSale/
index
'
,
path
:
'/beforeSale/
checkSet
'
,
// name: 'beforeSale',
// name: 'beforeSale',
params
:
res
params
:
res
})
})
...
@@ -1736,7 +1735,7 @@ export default {
...
@@ -1736,7 +1735,7 @@ export default {
margin-left
:
24px
;
margin-left
:
24px
;
}
}
.child_wrap
{
.child_wrap
{
padding
:
16px
0
0
0
;
padding
:
16px
0
0
0
px
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
.child_wrap_pannel
{
.child_wrap_pannel
{
...
...
src/views/beforeSale/equityList.vue
View file @
6a3a968
...
@@ -190,13 +190,13 @@ export default {
...
@@ -190,13 +190,13 @@ export default {
label
:
'车主姓名'
,
label
:
'车主姓名'
,
prop
:
'customerName'
,
prop
:
'customerName'
,
line
:
1
,
line
:
1
,
width
:
'200px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
customerName
||
'-'
return
cellValue
.
customerName
||
'-'
}
}
},
},
{
{
label
:
'合同号'
,
label
:
'合同号'
,
line
:
1
,
prop
:
'contractNo'
,
prop
:
'contractNo'
,
width
:
'200px'
,
width
:
'200px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -259,7 +259,6 @@ export default {
...
@@ -259,7 +259,6 @@ export default {
},
},
{
{
label
:
'车架号'
,
label
:
'车架号'
,
line
:
1
,
prop
:
'vin'
,
prop
:
'vin'
,
width
:
'200px'
,
width
:
'200px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -268,7 +267,6 @@ export default {
...
@@ -268,7 +267,6 @@ export default {
},
},
{
{
label
:
'电话'
,
label
:
'电话'
,
line
:
1
,
prop
:
'customerPhone'
,
prop
:
'customerPhone'
,
width
:
'160px'
,
width
:
'160px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -277,8 +275,8 @@ export default {
...
@@ -277,8 +275,8 @@ export default {
},
},
{
{
label
:
'产品名称'
,
label
:
'产品名称'
,
line
:
1
,
prop
:
'packageName'
,
prop
:
'packageName'
,
width
:
'200px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
packageName
||
'-'
return
cellValue
.
packageName
||
'-'
}
}
...
@@ -306,7 +304,7 @@ export default {
...
@@ -306,7 +304,7 @@ export default {
line
:
1
,
line
:
1
,
prop
:
'servicePeriod'
,
prop
:
'servicePeriod'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
servicePeriod
?
'1年'
:
'-'
return
cellValue
.
servicePeriod
?
`
${
cellValue
.
servicePeriod
}
年`
:
'-'
}
}
},
},
{
{
...
@@ -661,9 +659,16 @@ export default {
...
@@ -661,9 +659,16 @@ export default {
// )
// )
// return true
// return true
// }
// }
this
.
handlePdfClose
()
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'Loading'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.3)'
})
this
.
$apis
.
beforeSale
.
getPriteApi
({
contractNo
:
row
.
contractNo
}).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
getPriteApi
({
contractNo
:
row
.
contractNo
}).
then
(
res
=>
{
this
.
pdfUrl
=
res
this
.
pdfUrl
=
res
this
.
handlePdfClose
()
loading
.
close
();
})
})
},
},
...
...
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