Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
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 fd9127cf
authored
Jul 21, 2023
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
售前权益
1 parent
c1f56276
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
161 additions
and
190 deletions
src/config/index.js
src/views/beforeSale/editEquity.vue
src/config/index.js
View file @
fd9127c
...
@@ -21,7 +21,8 @@ export const fetchConfig = function (common) {
...
@@ -21,7 +21,8 @@ export const fetchConfig = function (common) {
// Object.assign(request, { timeout })
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// return Promise.resolve(cfg)
// }
// }
return
new
Http
({
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}).
get
(
' https://oss-config.test.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config'
)
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get(' https://oss-config.test.glsx.com.cn/mock/618f5cc91072f92988f05a26/services/config')
return
new
Http
({
Headers
:
{
refererurl
:
location
.
href
},
request
:
{
timeout
:
30000
}
}).
get
(
'https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=services'
)
//return window.fetch('https://', {}).then(res => res.json())
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
// return common.utils.getConfig(params)
// return common.utils.getConfig(params)
...
...
src/views/beforeSale/editEquity.vue
View file @
fd9127c
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
</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 || attr.disabled || (attr.attributeName == 'compensation_name' && compensationNameDisable)"
@
input=
"getCurChangeInput($event, item, attr, index, attrindex,1)"
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 || (attr.attributeName == 'compensation_name' && compensationNameDisable)"
@
input=
"getCurChangeInput($event, item, attr, index, attrindex,
1)"
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 || attr.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"
>
...
@@ -112,74 +112,44 @@
...
@@ -112,74 +112,44 @@
<!-- 定制权益 -->
<!-- 定制权益 -->
<div
v-if=
"equityRadio == '2'"
class=
"auto_widget"
>
<div
v-if=
"equityRadio == '2'"
class=
"auto_widget"
>
<el-
radio
-group
v-model=
"curSelectCustomPro"
:disabled=
"disabled"
>
<el-
checkbox
-group
v-model=
"curSelectCustomPro"
:disabled=
"disabled"
>
<div
v-for=
"(item, index) in customProductList"
:key=
"index"
class=
"product_wrapper"
>
<div
v-for=
"(item, index) in customProductList"
:key=
"index"
class=
"product_wrapper"
>
<div
style=
"padding-left: 73px"
>
<div
style=
"padding-left: 73px"
>
<el-radio
@
change=
"changeRaido($event, item)"
:disabled=
"item.disabled"
:label=
"item.packageName"
></el-radio>
<el-checkbox
@
change=
"changeRaido($event, item, index)"
:label=
"item.packageName"
:disabled=
"item.disabled"
>
<div>
{{ item.packageName }}
</div>
</el-checkbox>
<p
class=
"h20_title product_intro"
>
包括服务项目:{{ item.serviceItems }}
</p>
<p
class=
"h20_title product_intro"
>
包括服务项目:{{ item.serviceItems }}
</p>
</div>
</div>
<div
v-if=
"curSelectCustomPro == item.packageName"
:key=
"indexs"
class=
"child_wrap"
>
<div
class=
"customer-form"
>
<div
class=
"child_wrap_pannel"
v-for=
"(attr, attrindex) in item.groupAttributeList"
:key=
"attrindex"
>
<
template
v-for=
"(ele, indexs) in curSelectCustomPro"
>
<div
class=
"attr_wrapper flex_sc"
>
<div
v-if=
"ele == item.packageName"
:key=
"indexs"
class=
"child_wrap"
>
<div
class=
"attr_label h13_title"
>
<div
class=
"child_wrap_pannel"
v-for=
"(attr, attrindex) in item.groupAttributeList"
:key=
"attrindex"
>
<span
v-if=
"attr.required == 1"
style=
"color: red"
>
*
</span>
<div
class=
"attr_wrapper flex_sc"
>
{{ attr.attributeDesc }}
<div
class=
"attr_label h13_title"
>
</div>
<span
v-if=
"attr.required == 1"
style=
"color: red"
>
*
</span>
<div
class=
"arrt_pannel"
>
{{
attr
.
attributeDesc
}}
<
template
v-if=
"attr.attributeType == 'input'"
>
</div>
<el-input
class=
"arrt_pannel"
:disabled=
"disabled || attr.disabled || (attr.attributeName == 'compensation_name' && compensationNameDisable)"
@
input=
"getCurChangeInput($event, item, attr,index, attrindex,2)"
v-model=
"productModal[item.idName][attr.attributeName]"
size=
"small"
:maxlength=
"attr.maxLength"
clearable
:placeholder=
"'请输入' + attr.attributeDesc"
></el-input>
<div
class=
"arrt_pannel"
>
</
template
>
<template
v-if=
"attr.attributeType == 'input'"
>
<
template
v-if=
"attr.attributeType == 'select'"
>
<el-input
class=
"arrt_pannel"
:disabled=
"disabled || attr.disabled || (attr.attributeName == 'compensation_name' && compensationNameDisable)"
@
input=
"getCurChangeInput($event, item, attr, index, attrindex, 2)"
v-model=
"productModal[item.idName][attr.attributeName]"
size=
"small"
:maxlength=
"attr.maxLength"
clearable
:placeholder=
"'请输入' + attr.attributeDesc"
></el-input>
<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"
>
</
template
>
<el-option
v-for=
"option in attr.optionList"
:key=
"option.value"
:label=
"option.label"
:value=
"option.value"
></el-option>
<
template
v-if=
"attr.attributeType == 'select'"
>
</el-select>
<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"
>
</
template
>
<el-option
v-for=
"option in attr.optionList"
:key=
"option.value"
:label=
"option.label"
:value=
"option.value"
></el-option>
<
template
v-if=
"attr.attributeType == 'datePicker'"
>
</el-select>
<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
>
<
template
v-if=
"attr.attributeType == 'datePicker'"
>
<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
>
</div>
</div>
</div>
</div>
</div>
</div>
</
div
>
</
template
>
</div>
</div>
</div>
</div>
</el-
radio
-group>
</el-
checkbox
-group>
</div>
</div>
<!-- <div v-if="equityRadio == '2'" class="auto_widget">
<glsx-combi-form class="edit-form-container" :isEdit="true" defaultWidth="320px" :formObj="editForm" :formData="editFormDataPro">
<template slot="packageCode" slot-scope="scope">
<el-radio-group class="package-code-box" v-model="editForm[scope.scope.name]" :disabled="scope.scope.isDisabled" @change="scope.scope.handleRadioChange">
<el-radio class="package-code" v-for="subItem in scope.scope.optionList" :key="subItem[scope.scope.optionId]" :label="subItem[scope.scope.optionId]">
<span class="package-title">{{ subItem[scope.scope.optionLabel] }}</span>
<div class="radio-add-block" @click.stop.prevent="e => handleCancelBubble(e)">
<p class="package-subtitle">{{ subItem.serviceItems }}</p>
<div v-if="editForm.packageCode == subItem[scope.scope.optionId]">
<glsx-combi-form class="edit-form-container" ref="editFormRefPro" :isEdit="true" defaultWidth="320px" formRef="editChildRefPro" :isBlock="isBlock" :formObj="editFormPro" :formData="subItem.editFormData" :formRules="editRulePro">
<template slot="table" slot-scope="scope">
<table class="table-style">
<tbody>
<tr>
<td v-for="(m, n) in scope.scope.attributeList" :key="n" :style="{ width: 100 / scope.scope.attributeList.length + '%' }">{{ m.attributeDesc }}</td>
</tr>
<tr v-for="(m, n) in scope.scope.tableList" :key="n">
<td v-for="(i, j) in m" :key="j" :style="{ width: 100 / scope.scope.attributeList.length + '%' }">
<el-input :disabled="i.isDisabled" :class="{ 'border-red': !editFormPro[i.name] }" placeholder="请输入" v-model="editFormPro[i.name]" :maxlength="i.maxlength">
<el-popover v-show="!editFormPro[i.name]" slot="suffix" placement="top" title="" width="90" trigger="hover" :content="i.attributeDesc + '是必填项'">
<i class="el-icon-warning color-red" slot="reference"></i>
</el-popover>
</el-input>
</td>
</tr>
</tbody>
</table>
</template>
</glsx-combi-form>
</div>
</div>
</el-radio>
</el-radio-group>
</template>
</glsx-combi-form>
</div> -->
</div>
</div>
<!-- 其他信息 -->
<!-- 其他信息 -->
...
@@ -480,7 +450,7 @@ export default {
...
@@ -480,7 +450,7 @@ export default {
// }
// }
// ],
// ],
curSelectPro
:
[],
curSelectPro
:
[],
curSelectCustomPro
:
''
,
curSelectCustomPro
:
[]
,
editProductObj
:
{},
editProductObj
:
{},
productList
:
[],
productList
:
[],
customProductList
:
[],
customProductList
:
[],
...
@@ -489,7 +459,6 @@ export default {
...
@@ -489,7 +459,6 @@ export default {
crash
:
{},
crash
:
{},
stolen
:
{},
stolen
:
{},
tire
:
{},
tire
:
{},
vip
:
{},
glass
:
{}
glass
:
{}
},
},
// 其他信息
// 其他信息
...
@@ -848,7 +817,7 @@ export default {
...
@@ -848,7 +817,7 @@ export default {
this
.
vaildGlassParams
()
this
.
vaildGlassParams
()
}
else
{
}
else
{
this
.
errGlassName
=
''
this
.
errGlassName
=
''
if
(
this
.
vailIndex
!=
undefined
)
this
.
$set
(
this
.
productList
[
this
.
vailIndex
],
'disabled'
,
false
)
if
(
this
.
vailIndex
!=
undefined
)
this
.
$set
(
this
.
productList
[
this
.
vailIndex
],
'disabled'
,
false
)
if
(
this
.
vail_sale_price_index
)
this
.
$set
(
this
.
productList
[
this
.
vailIndex
].
groupAttributeList
[
this
.
vail_sale_price_index
],
'disabled'
,
false
)
if
(
this
.
vail_sale_price_index
)
this
.
$set
(
this
.
productList
[
this
.
vailIndex
].
groupAttributeList
[
this
.
vail_sale_price_index
],
'disabled'
,
false
)
}
}
}
else
{
}
else
{
...
@@ -857,18 +826,18 @@ export default {
...
@@ -857,18 +826,18 @@ export default {
}
}
},
},
// 轮胎玻璃提单参数处理
// 轮胎玻璃提单参数处理
vaildGlassParams
(){
vaildGlassParams
()
{
if
(
this
.
equityRadio
==
1
&&
this
.
tempAttributeList
.
length
&&
this
.
packageCodeList
.
length
&&
this
.
errGlassName
)
{
if
(
this
.
equityRadio
==
1
&&
this
.
tempAttributeList
.
length
&&
this
.
packageCodeList
.
length
&&
this
.
errGlassName
)
{
if
(
this
.
packageCodeList
.
indexOf
(
this
.
vailGlassCode
)
!=-
1
)
{
if
(
this
.
packageCodeList
.
indexOf
(
this
.
vailGlassCode
)
!=
-
1
)
{
let
arr1
=
[]
let
arr1
=
[]
let
arr2
=
[]
let
arr2
=
[]
this
.
tempAttributeList
.
forEach
(
ele
=>
{
this
.
tempAttributeList
.
forEach
(
ele
=>
{
if
(
ele
.
packageCode
!=
this
.
vailGlassCode
)
{
if
(
ele
.
packageCode
!=
this
.
vailGlassCode
)
{
arr1
.
push
(
ele
)
arr1
.
push
(
ele
)
}
}
})
})
this
.
packageCodeList
.
forEach
(
ele
=>
{
this
.
packageCodeList
.
forEach
(
ele
=>
{
if
(
ele
!=
this
.
vailGlassCode
)
{
if
(
ele
!=
this
.
vailGlassCode
)
{
arr2
.
push
(
ele
)
arr2
.
push
(
ele
)
}
}
})
})
...
@@ -912,10 +881,12 @@ export default {
...
@@ -912,10 +881,12 @@ export default {
},
},
changeRaido
(
e
,
item
)
{
changeRaido
(
e
,
item
)
{
if
(
e
)
{
if
(
e
)
{
this
.
checkCodeList
=
[]
//
this.checkCodeList = []
this
.
autoPackageCodeList
=
[]
//
this.autoPackageCodeList = []
this
.
checkCodeList
.
push
(
item
.
packageCode
)
this
.
checkCodeList
.
push
(
item
.
packageCode
)
this
.
autoPackageCodeList
.
push
(
item
.
packageCode
)
this
.
autoPackageCodeList
.
push
(
item
.
packageCode
)
this
.
checkCodeList
=
Array
.
from
(
new
Set
(
this
.
checkCodeList
))
this
.
autoPackageCodeList
=
Array
.
from
(
new
Set
(
this
.
autoPackageCodeList
))
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
)
{
...
@@ -927,7 +898,17 @@ export default {
...
@@ -927,7 +898,17 @@ export default {
attributeGroup
:
'planId'
,
attributeGroup
:
'planId'
,
attributeName
:
'planId'
attributeName
:
'planId'
}
}
this
.
commonPart
(
this
.
productModal
[
'vip'
][
'planId'
],
item
,
customAttr
)
this
.
commonPart
(
this
.
productModal
[
`vip
${
item
.
packageCode
}
`
][
'planId'
],
item
,
customAttr
)
}
else
{
this
.
checkCodeList
=
this
.
checkCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
this
.
autoPackageCodeList
=
this
.
autoPackageCodeList
.
filter
(
t
=>
t
!=
item
.
packageCode
)
for
(
let
key
in
this
.
productModal
[
item
.
idName
])
{
item
.
groupAttributeList
.
forEach
(
attr
=>
{
if
(
attr
.
attributeName
==
key
)
{
this
.
commonPart
(
this
.
productModal
[
item
.
idName
][
key
],
item
,
attr
)
}
})
}
}
}
},
},
// 获取店铺信息
// 获取店铺信息
...
@@ -973,7 +954,7 @@ export default {
...
@@ -973,7 +954,7 @@ export default {
this
.
compensationNameDisable
=
false
this
.
compensationNameDisable
=
false
},
},
// 自选权益产品套餐处理参数---输入框
// 自选权益产品套餐处理参数---输入框
getCurChangeInput
(
e
,
pack
,
attr
,
faIndex
,
childIndex
,
radio
)
{
getCurChangeInput
(
e
,
pack
,
attr
,
faIndex
,
childIndex
,
radio
)
{
if
(
!
e
)
{
if
(
!
e
)
{
return
return
}
}
...
@@ -986,7 +967,7 @@ export default {
...
@@ -986,7 +967,7 @@ export default {
}
}
}
}
if
(
attr
.
attributeName
==
'card'
)
{
if
(
attr
.
attributeName
==
'card'
)
{
let
_tempArr
=
radio
==
2
?
this
.
customProductList
[
faIndex
]:
this
.
productList
[
faIndex
]
let
_tempArr
=
radio
==
2
?
this
.
customProductList
[
faIndex
]
:
this
.
productList
[
faIndex
]
_tempArr
.
groupAttributeList
.
map
(
el
=>
{
_tempArr
.
groupAttributeList
.
map
(
el
=>
{
if
(
el
.
attributeName
==
'service_period'
)
{
if
(
el
.
attributeName
==
'service_period'
)
{
el
.
disabled
=
true
el
.
disabled
=
true
...
@@ -1049,8 +1030,11 @@ export default {
...
@@ -1049,8 +1030,11 @@ export default {
const
newParaArr
=
[]
const
newParaArr
=
[]
codeList
.
forEach
((
item
,
index
)
=>
{
codeList
.
forEach
((
item
,
index
)
=>
{
let
attrStr
=
`attributes[
${
index
}
].packageCode`
let
attrStr
=
`attributes[
${
index
}
].packageCode`
// 2023 7月底版本 多商品
let
contractNoStr
=
`attributes[
${
index
}
].contractNo`
let
obj
=
{
let
obj
=
{
[
attrStr
]:
item
[
attrStr
]:
item
,
[
contractNoStr
]:
this
.
routeInfo
.
contractNo
&&
this
.
routeInfo
.
contractNo
>
-
1
?
this
.
routeInfo
.
contractNo
:
''
}
}
newArr
.
push
(
obj
)
newArr
.
push
(
obj
)
})
})
...
@@ -1094,6 +1078,7 @@ export default {
...
@@ -1094,6 +1078,7 @@ export default {
})
})
// console.log(this.formatProduct, '自选权益')
// console.log(this.formatProduct, '自选权益')
}
else
{
}
else
{
this
.
autoFormatProduct
=
{}
concactArr
.
forEach
(
item
=>
{
concactArr
.
forEach
(
item
=>
{
this
.
autoFormatProduct
=
Object
.
assign
(
this
.
autoFormatProduct
,
item
)
this
.
autoFormatProduct
=
Object
.
assign
(
this
.
autoFormatProduct
,
item
)
})
})
...
@@ -1121,35 +1106,13 @@ export default {
...
@@ -1121,35 +1106,13 @@ export default {
})
})
},
},
// 获取产品的数据
// 获取产品的数据
toGetProductData
(
arr
)
{
toGetProductData
(
arr
)
{
arr
.
forEach
(
item
=>
{
arr
.
forEach
(
item
=>
{
// if (item.packageName.includes('整车全损')) {
// item.idName = 'car'
// } else if (item.packageName.includes('轮胎')) {
// item.idName = 'tire'
// } else if (item.packageName.includes('碰撞')) {
// item.idName = 'crash'
// this.productModal[item.idName]['planId'] = item.planId
// this.productModal['vip']['planId'] = item.planId
// this.getCase(item.planId)
// } else if (item.packageName.includes('盗抢')) {
// item.idName = 'stolen'
// } else if (item.packageName.includes('尊享版')) {
// item.idName = 'vip'
// } else if (item.packageName.includes('舒享版')) {
// item.idName = 'vip'
// } else if (item.packageName.includes('优享版')) {
// item.idName = 'vip'
// } else if (item.packageType == 1) {
// item.idName = 'vip'
// } else if (item.packageName.includes('玻璃')) {
// this.vailGlassName = item.packageName // 备用
// this.vailGlassCode = item.packageCode
// item.idName = 'glass'
// }
if
(
item
.
packageType
==
1
)
{
if
(
item
.
packageType
==
1
)
{
//定制权益
//定制权益
item
.
idName
=
'vip'
item
.
idName
=
`vip
${
item
.
packageCode
}
`
this
.
$set
(
this
.
productModal
,
item
.
idName
,{})
this
.
productModal
[
item
.
idName
][
'planId'
]
=
item
.
planId
}
else
{
}
else
{
// 自选权益
// 自选权益
if
(
item
.
packageName
.
includes
(
'整车全损'
))
{
if
(
item
.
packageName
.
includes
(
'整车全损'
))
{
...
@@ -1159,7 +1122,6 @@ export default {
...
@@ -1159,7 +1122,6 @@ export default {
}
else
if
(
item
.
packageName
.
includes
(
'碰撞'
))
{
}
else
if
(
item
.
packageName
.
includes
(
'碰撞'
))
{
item
.
idName
=
'crash'
item
.
idName
=
'crash'
this
.
productModal
[
item
.
idName
][
'planId'
]
=
item
.
planId
this
.
productModal
[
item
.
idName
][
'planId'
]
=
item
.
planId
this
.
productModal
[
'vip'
][
'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'
...
@@ -1190,25 +1152,24 @@ export default {
...
@@ -1190,25 +1152,24 @@ export default {
}
else
if
(
e
.
attributeDesc
==
'购车类型'
)
{
}
else
if
(
e
.
attributeDesc
==
'购车类型'
)
{
e
.
optionList
=
this
.
baseData
.
buyCarTypeList
e
.
optionList
=
this
.
baseData
.
buyCarTypeList
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'0'
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'0'
}
else
if
((
item
.
idName
==
'tire'
||
item
.
idName
==
'crash'
||
item
.
idName
==
'vip'
||
item
.
idName
==
'glass'
)
&&
e
.
attributeDesc
==
'服务期限'
)
{
}
else
if
((
item
.
idName
==
'tire'
||
item
.
idName
==
'crash'
||
item
.
idName
==
`vip
${
item
.
packageCode
}
`
||
item
.
idName
==
'glass'
)
&&
e
.
attributeDesc
==
'服务期限'
)
{
if
(
item
.
idName
==
'tire'
||
item
.
idName
==
'crash'
)
{
if
(
item
.
idName
==
'tire'
||
item
.
idName
==
'crash'
)
{
e
.
optionList
=
this
.
baseData
.
servicePeriodList
e
.
optionList
=
this
.
baseData
.
servicePeriodList
}
else
{
}
else
{
e
.
optionList
=
this
.
baseData
.
servicePeriodList2
e
.
optionList
=
this
.
baseData
.
servicePeriodList2
}
}
// this.productModal[item.idName][e.attributeName] = '1'
e
.
disabled
=
true
e
.
disabled
=
true
// v3.1.2--新版的定制权益-服务期限--改为1,2,3年---旧版的依然是一年
// v3.1.2--新版的定制权益-服务期限--改为1,2,3年---旧版的依然是一年
let
isOld
=
item
.
packageName
.
includes
(
'尊享版'
)
||
item
.
packageName
.
includes
(
'舒享版'
)
||
item
.
packageName
.
includes
(
'优享版'
)
let
isOld
=
item
.
packageName
.
includes
(
'尊享版'
)
||
item
.
packageName
.
includes
(
'舒享版'
)
||
item
.
packageName
.
includes
(
'优享版'
)
if
(
item
.
idName
==
'vip'
&&
!
isOld
)
{
if
(
item
.
idName
==
`vip
${
item
.
packageCode
}
`
&&
!
isOld
)
{
e
.
disabled
=
false
e
.
disabled
=
false
e
.
optionList
=
this
.
baseData
.
servicePeriodList
e
.
optionList
=
this
.
baseData
.
servicePeriodList
}
}
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'1'
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
'1'
}
else
if
(
e
.
attributeDesc
==
'生效日期'
)
{
}
else
if
(
e
.
attributeDesc
==
'生效日期'
)
{
let
nextDay
=
new
Date
().
getTime
()
+
24
*
60
*
60
*
1000
let
nextDay
=
new
Date
().
getTime
()
+
24
*
60
*
60
*
1000
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
utils
.
dateFormat
(
nextDay
)
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
utils
.
dateFormat
(
nextDay
)
if
(
item
.
idName
==
'glass'
)
{
if
(
item
.
idName
==
'glass'
)
{
let
tAdd2
=
new
Date
().
getTime
()
+
24
*
60
*
60
*
1000
*
2
let
tAdd2
=
new
Date
().
getTime
()
+
24
*
60
*
60
*
1000
*
2
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
utils
.
dateFormat
(
tAdd2
)
this
.
productModal
[
item
.
idName
][
e
.
attributeName
]
=
utils
.
dateFormat
(
tAdd2
)
e
.
disabled
=
true
e
.
disabled
=
true
...
@@ -1340,94 +1301,103 @@ export default {
...
@@ -1340,94 +1301,103 @@ export default {
})
})
}
}
},
},
packageAttr
(
recovery
=
false
,
productArrData
,
detailInfo
)
{
packageAttr
(
recovery
=
false
,
productArrData
,
detailInfo
)
{
var
targetItem
=
productArrData
.
find
(
item
=>
item
.
packageCode
==
this
.
editForm
.
packageCode
)
// 2023 7月底版本 改版
if
(
targetItem
.
packageType
==
1
)
{
let
attrList
=
[],
this
.
equityRadio
=
2
packCode
=
[]
this
.
curSelectCustomPro
=
targetItem
.
packageName
detailInfo
.
attributes
.
forEach
(
item
=>
{
this
.
editForm
.
attributeList
.
forEach
(
item
=>
{
let
targetItem
=
productArrData
.
find
(
k
=>
k
.
packageCode
==
item
.
packageCode
)
if
(
item
.
attributeName
.
includes
(
'price'
))
{
if
(
targetItem
.
packageType
==
1
)
{
item
.
attributeValue
=
item
.
attributeValue
/
100
this
.
equityRadio
=
2
}
this
.
curSelectCustomPro
.
push
(
targetItem
.
packageName
)
if
(
item
.
attributeName
==
'buy_car_type'
&&
item
.
attributeValue
==
1
)
{
item
.
attributeDTOList
.
forEach
(
a
=>
{
this
.
compensationNameDisable
=
true
if
(
a
.
attributeName
.
includes
(
'price'
))
{
}
a
.
attributeValue
=
a
.
attributeValue
/
100
this
.
productModal
.
vip
[
item
.
attributeName
]
=
item
.
attributeValue
}
})
if
(
a
.
attributeName
==
'tireScale'
&&
a
.
sort
==
1
)
{
if
(
this
.
routeInfo
.
addOrEdit
==
3
)
{
a
.
attributeName
=
'afterTireScale'
this
.
leftDisable
=
true
}
this
.
customProductList
.
map
(
item
=>
{
if
(
a
.
attributeName
==
'buy_car_type'
&&
a
.
attributeValue
==
1
)
{
item
.
disabled
=
true
this
.
compensationNameDisable
=
true
item
.
groupAttributeList
.
map
(
ele
=>
{
}
if
(
ele
.
attributeName
==
'service_period'
)
{
this
.
productModal
[
`vip
${
item
.
packageCode
}
`
][
a
.
attributeName
]
=
a
.
attributeValue
ele
.
disabled
=
true
}
if
(
ele
.
attributeName
==
'card'
)
{
ele
.
disabled
=
true
}
if
(
ele
.
attributeName
==
'effective_date'
)
{
ele
.
disabled
=
true
}
})
return
item
})
})
}
if
(
this
.
routeInfo
.
addOrEdit
==
3
)
{
}
else
{
this
.
leftDisable
=
true
this
.
equityRadio
=
1
this
.
customProductList
.
map
(
c
=>
{
this
.
curSelectPro
=
[
targetItem
.
packageName
]
c
.
disabled
=
true
this
.
editForm
.
attributeList
.
forEach
(
item
=>
{
c
.
groupAttributeList
.
map
(
ele
=>
{
if
(
item
.
attributeName
.
includes
(
'price'
))
{
if
(
ele
.
attributeName
==
'service_period'
)
{
item
.
attributeValue
=
item
.
attributeValue
/
100
ele
.
disabled
=
true
}
else
if
(
item
.
attributeName
==
'planId'
)
{
}
this
.
getCase
(
parseInt
(
item
.
attributeValue
))
if
(
ele
.
attributeName
==
'card'
)
{
}
ele
.
disabled
=
true
if
(
item
.
attributeName
==
'buy_car_type'
&&
item
.
attributeValue
==
1
)
{
}
this
.
compensationNameDisable
=
true
if
(
ele
.
attributeName
==
'effective_date'
)
{
ele
.
disabled
=
true
}
})
return
c
})
}
}
this
.
productModal
[
targetItem
.
idName
][
item
.
attributeName
]
=
item
.
attributeValue
}
else
{
})
this
.
equityRadio
=
1
if
(
this
.
routeInfo
.
addOrEdit
==
3
)
{
this
.
curSelectPro
.
push
(
targetItem
.
packageName
)
this
.
rightDisable
=
true
item
.
attributeDTOList
.
forEach
(
b
=>
{
this
.
productList
.
map
(
item
=>
{
if
(
b
.
attributeName
.
includes
(
'price'
))
{
item
.
disabled
=
true
b
.
attributeValue
=
b
.
attributeValue
/
100
}
else
if
(
b
.
attributeName
==
'planId'
)
{
item
.
groupAttributeList
.
map
(
ele
=>
{
this
.
getCase
(
parseInt
(
b
.
attributeValue
))
if
(
ele
.
attributeName
==
'service_period'
)
{
}
ele
.
disabled
=
true
if
(
b
.
attributeName
==
'tireScale'
&&
b
.
sort
==
1
)
{
}
b
.
attributeName
=
'afterTireScale'
if
(
ele
.
attributeName
==
'card'
)
{
}
ele
.
disabled
=
true
if
(
b
.
attributeName
==
'buy_car_type'
&&
b
.
attributeValue
==
1
)
{
}
this
.
compensationNameDisable
=
true
if
(
ele
.
attributeName
==
'effective_date'
)
{
}
ele
.
disabled
=
true
this
.
productModal
[
targetItem
.
idName
][
b
.
attributeName
]
=
b
.
attributeValue
}
})
if
(
ele
.
attributeName
==
'buy_car_type'
&&
ele
.
attributeValue
==
1
)
{
if
(
this
.
routeInfo
.
addOrEdit
==
3
)
{
ele
.
disabled
=
true
this
.
rightDisable
=
true
}
this
.
productList
.
map
(
d
=>
{
d
.
disabled
=
true
d
.
groupAttributeList
.
map
(
elee
=>
{
if
(
elee
.
attributeName
==
'service_period'
)
{
elee
.
disabled
=
true
}
if
(
elee
.
attributeName
==
'card'
)
{
elee
.
disabled
=
true
}
if
(
elee
.
attributeName
==
'effective_date'
)
{
elee
.
disabled
=
true
}
if
(
elee
.
attributeName
==
'buy_car_type'
&&
elee
.
attributeValue
==
1
)
{
elee
.
disabled
=
true
}
})
return
d
})
})
}
}
return
item
packCode
.
push
(
item
.
packageCode
)
item
.
attributeDTOList
.
forEach
(
el
=>
{
attrList
.
push
({
...
el
,
packageCode
:
item
.
packageCode
,
contractNo
:
item
.
contractNo
})
})
}
}
// this.packageToPrice()
// var tempObj = this.$common.utils.deepClone(this.editFormPro)
let
attrList
=
[]
detailInfo
.
attributeList
.
forEach
(
item
=>
{
attrList
.
push
({
...
item
,
packageCode
:
detailInfo
.
packageCode
})
})
})
})
if
(
this
.
equityRadio
==
1
)
{
if
(
this
.
equityRadio
==
1
)
{
this
.
tempAttributeList
=
attrList
this
.
tempAttributeList
=
attrList
this
.
packageCodeList
=
[
detailInfo
.
packageCode
]
this
.
packageCodeList
=
packCode
}
else
{
}
else
{
this
.
autoAttriButeList
=
attrList
this
.
autoAttriButeList
=
attrList
this
.
autoPackageCodeList
=
[
detailInfo
.
packageCode
]
this
.
autoPackageCodeList
=
packCode
}
}
this
.
checkCodeList
=
[
detailInfo
.
packageCode
]
this
.
checkCodeList
=
packCode
this
.
handleProductArrParam
(
attrList
,
[
detailInfo
.
packageCode
]
)
this
.
handleProductArrParam
(
attrList
,
packCode
)
// this.editRulePro = {}
// this.editRulePro = {}
// this.editFormPro = {}
// this.editFormPro = {}
// var attrName = ''
// var attrName = ''
...
@@ -1705,6 +1675,7 @@ export default {
...
@@ -1705,6 +1675,7 @@ export default {
delete
params
.
sn
delete
params
.
sn
}
}
params
.
isOss
=
1
params
.
isOss
=
1
params
.
dataSource
=
this
.
editForm
.
dataSource
||
''
this
.
$apis
.
beforeSale
.
updateEquityApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
updateEquityApi
(
params
).
then
(
res
=>
{
this
.
submit
=
false
this
.
submit
=
false
...
@@ -1841,13 +1812,12 @@ export default {
...
@@ -1841,13 +1812,12 @@ export default {
this
.
autoFormatProduct
=
{}
this
.
autoFormatProduct
=
{}
this
.
equityRadio
=
1
this
.
equityRadio
=
1
this
.
curSelectPro
=
[]
this
.
curSelectPro
=
[]
this
.
curSelectCustomPro
=
''
this
.
curSelectCustomPro
=
[]
this
.
productModal
=
{
this
.
productModal
=
{
car
:
{},
car
:
{},
crash
:
{},
crash
:
{},
stolen
:
{},
stolen
:
{},
tire
:
{},
tire
:
{},
vip
:
{},
glass
:
{}
glass
:
{}
}
}
this
.
customProductList
=
[]
this
.
customProductList
=
[]
...
...
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