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 d25d3e34
authored
Dec 31, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
售前
1 parent
6abaf6c8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
426 additions
and
237 deletions
src/api/modules/beforeSale.js
src/components/glsx-combi-form/index.vue
src/setup/qiankun.js
src/views/beforeSale/editEquity.vue
src/views/beforeSale/equityList.vue
src/api/modules/beforeSale.js
View file @
d25d3e3
...
@@ -172,7 +172,7 @@ const getPackageListApi = params => {
...
@@ -172,7 +172,7 @@ const getPackageListApi = params => {
}
}
const
getEquityApi
=
params
=>
{
const
getEquityApi
=
params
=>
{
params
.
method
=
`
${
orderPath
}
detail`
params
.
method
=
`
scrm.api.equity.service.channel.order.
detail`
return
http
({
return
http
({
url
:
'rop-scrm-equity/router'
,
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
method
:
'POST'
,
...
@@ -182,7 +182,7 @@ const getEquityApi = params => {
...
@@ -182,7 +182,7 @@ const getEquityApi = params => {
}
}
const
updateEquityApi
=
params
=>
{
const
updateEquityApi
=
params
=>
{
params
.
method
=
`
${
orderPath
}
insert.or.update`
params
.
method
=
`
scrm.api.equity.service.channel.order.
insert.or.update`
return
http
({
return
http
({
url
:
'rop-scrm-equity/router'
,
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
method
:
'POST'
,
...
...
src/components/glsx-combi-form/index.vue
View file @
d25d3e3
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<el-radio-group
v-else-if=
"item.type === 'radio'"
v-model=
"formObj[item.name]"
:disabled=
"item.isDisabled"
@
change=
"item.handleRadioChange"
>
<el-radio-group
v-else-if=
"item.type === 'radio'"
v-model=
"formObj[item.name]"
:disabled=
"item.isDisabled"
@
change=
"item.handleRadioChange"
>
<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'"
v-model=
"formObj[item.name]"
:type=
"item.dateType || 'daterange'"
:style=
"{ width: item.width || defaultWidth }"
:clearable=
"item.isClear || false"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:picker-options=
"pickerOption[item.pickerOptions]"
></el-date-picker>
<el-date-picker
v-else-if=
"item.type === 'datePicker'"
:disabled=
"item.isDisabled"
v-model=
"formObj[item.name]"
:type=
"item.dateType || 'daterange'"
:style=
"{ width: item.width || defaultWidth }"
:clearable=
"item.isClear || false"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:picker-options=
"pickerOption[item.pickerOptions]"
></el-date-picker>
<
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 || defaultWidth }">
<div
v-if=
"!item.isDisabled"
:style=
"
{ width: item.width || defaultWidth }">
...
...
src/setup/qiankun.js
View file @
d25d3e3
...
@@ -22,8 +22,8 @@ export async function bootstrap({ history, common, messenger, globalState, route
...
@@ -22,8 +22,8 @@ export async function bootstrap({ history, common, messenger, globalState, route
Vue
.
prototype
.
$messageBox
=
messageBox
Vue
.
prototype
.
$messageBox
=
messageBox
Vue
.
prototype
.
$defaultStartDate
=
'2021-07-01'
Vue
.
prototype
.
$defaultStartDate
=
'2021-07-01'
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http = new common.Http({ response, request, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'
0418fc57-bbf6-4e91-b9f4-2c9943ed35f6
'
}
})
Vue
.
prototype
.
$http
=
new
common
.
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'
48b9a3e5-99bc-4b1d-bc7d-d9d9f0ecfbf9
'
}
})
Vue
.
prototype
.
$http_brand
=
new
common
.
Http
({
response
,
request
:
request_brand
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'
0418fc57-bbf6-4e91-b9f4-2c9943ed35f6
'
}
})
Vue
.
prototype
.
$http_brand
=
new
common
.
Http
({
response
,
request
:
request_brand
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
'
48b9a3e5-99bc-4b1d-bc7d-d9d9f0ecfbf9
'
}
})
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
// Vue.prototype.$setGlobalState = globalState.actions.setGlobalState
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
routes
=
getRoutes
(
routesData
)
routes
=
getRoutes
(
routesData
)
...
...
src/views/beforeSale/editEquity.vue
View file @
d25d3e3
...
@@ -39,14 +39,14 @@
...
@@ -39,14 +39,14 @@
<div
class=
"container m-t-10"
>
<div
class=
"container m-t-10"
>
<p
class=
"edit-title"
>
选择产品
</p>
<p
class=
"edit-title"
>
选择产品
</p>
<div
class=
"edit_product_radio_wrap flex_sc"
>
<div
class=
"edit_product_radio_wrap flex_sc"
>
<el-radio
v-model=
"equityRadio"
label=
"1"
>
自选权益
</el-radio>
<el-radio
:disabled=
"disabled"
v-model=
"equityRadio"
:
label=
"1"
>
自选权益
</el-radio>
<div
style=
"width: 112px"
></div>
<div
style=
"width: 112px"
></div>
<el-radio
v-model=
"equityRadio"
label=
"2"
>
定制权益
</el-radio>
<el-radio
:disabled=
"disabled"
v-model=
"equityRadio"
:
label=
"2"
>
定制权益
</el-radio>
</div>
</div>
<!-- 自选权益 -->
<!-- 自选权益 -->
<div
v-if=
"equityRadio == '1'"
class=
"auto_widget"
>
<div
v-if=
"equityRadio == '1'"
class=
"auto_widget"
>
<el-checkbox-group
v-model=
"curSelectPro"
>
<el-checkbox-group
v-model=
"curSelectPro"
:disabled=
"disabled"
>
<div
v-for=
"(item, index) in productList"
:key=
"index"
class=
"product_wrapper"
>
<div
v-for=
"(item, index) in productList"
:key=
"index"
class=
"product_wrapper"
>
<div
style=
"padding-left: 73px"
>
<div
style=
"padding-left: 73px"
>
<el-checkbox
:label=
"item.packageName"
></el-checkbox>
<el-checkbox
:label=
"item.packageName"
></el-checkbox>
...
@@ -61,28 +61,48 @@
...
@@ -61,28 +61,48 @@
</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"
@
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"
@
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"
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"
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"
@
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"
:disabled=
"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>
</div>
</div>
</div>
</div>
</template>
</template>
<!-- 方案 -->
<div
v-if=
"item.packageName.includes('碰撞') && curSelectPro.includes(item.packageName)"
class=
"table_case_wrap"
>
<div
class=
"case_title"
>
方案
</div>
<div
class=
"case_table"
>
<div
class=
"table_th flex_sc"
>
<div
class=
"th_item flex_cc"
style=
"width: 89px"
>
方案
</div>
<div
class=
"th_item flex_cc border-lr"
>
车险定损金额
</div>
<div
class=
"th_item flex_cc max"
style=
"width: 291px"
>
津贴标准(累计及每次事故赔偿限额)
</div>
</div>
<div
class=
"table_tr flex_sc"
>
<div
class=
"tr_item flex_cc min"
>
方案
</div>
<div
class=
"tr_sec_item_wrap"
>
<div
v-for=
"(caseItem, caseindex) in caseTable"
:key=
"caseindex"
class=
"tr_sec_item flex_sc"
>
<div
class=
"sec_item flex_sc h9_title"
:class=
"{ noborder: caseindex == caseTable.length - 1 }"
>
{{ caseItem.money_one }}
</div>
<div
class=
"sec_item flex_sc max h9_title"
:class=
"{ noborder: caseindex == caseTable.length - 1 }"
style=
"width: 291px"
>
{{ caseItem.money_two }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</el-checkbox-group>
</el-checkbox-group>
</div>
</div>
<!-- 定制权益 -->
<!-- 定制权益 -->
<div
v-if=
"equityRadio == '2'"
class=
"auto_widget"
>
<div
v-if=
"equityRadio == '2'"
class=
"auto_widget"
>
<el-radio-group
v-model=
"curSelectCustomPro"
>
<el-radio-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
:label=
"item.packageName"
></el-radio>
<el-radio
:label=
"item.packageName"
></el-radio>
...
@@ -97,15 +117,15 @@
...
@@ -97,15 +117,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"
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"
@
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"
size=
"small
"
v-model=
"productModal[item.idName][attr.attributeName]"
clearable
:placeholder=
"'请选择' + attr.attributeDesc"
>
<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-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"
v-model=
"productModal[item.idName][attr.attributeName]"
size=
"small"
type=
"date"
:placeholder=
"'请选择' + attr.attributeDesc"
></el-date-picker>
<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>
</
template
>
</
template
>
</div>
</div>
</div>
</div>
...
@@ -175,13 +195,13 @@
...
@@ -175,13 +195,13 @@
>
>
<div
class=
"ma_top"
></div>
<div
class=
"ma_top"
></div>
<div
class=
"flex_cc ma_bot"
>
<div
class=
"flex_cc ma_bot"
>
<el-button
size=
"small
"
class=
"custom_black"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
v-if=
"![3, 5].includes(routeInfo.addOrEdit)
"
class=
"custom_black"
@
click=
"handleReset"
>
重置
</el-button>
<div
class=
"mar-10"
></div>
<div
class=
"mar-10"
></div>
<el-button
class=
"custom_blue"
v-
show=
"!['3', '5'].includes(routeInfo.addOrEdit)"
size=
"small
"
@
click=
"handleDraft"
>
草稿
</el-button>
<el-button
class=
"custom_blue"
v-
if=
"![3, 5].includes(routeInfo.addOrEdit)
"
@
click=
"handleDraft"
>
草稿
</el-button>
<div
class=
"mar-10"
></div>
<div
class=
"mar-10"
></div>
<el-button
v-
show=
"routeInfo.addOrEdit != '5'"
size=
"small
"
type=
"primary"
@
click=
"handleConfirm"
>
{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}
</el-button>
<el-button
v-
if=
"routeInfo.addOrEdit != '5'
"
type=
"primary"
@
click=
"handleConfirm"
>
{{ routeInfo.addOrEdit != '3' ? '提单' : '确定' }}
</el-button>
<div
class=
"mar-10"
></div>
<div
class=
"mar-10"
></div>
<el-button
size=
"small"
type=
"default"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
type=
"default"
@
click=
"handleCancel"
>
取消
</el-button>
</div>
</div>
</div>
</div>
...
@@ -195,6 +215,7 @@ import * as dayjs from 'dayjs'
...
@@ -195,6 +215,7 @@ import * as dayjs from 'dayjs'
import
{
limitPrice
}
from
'@/common/constant'
import
{
limitPrice
}
from
'@/common/constant'
import
glsxCombiForm
from
'@/components/glsx-combi-form'
import
glsxCombiForm
from
'@/components/glsx-combi-form'
import
qrCode
from
'@/components/qr-code'
import
qrCode
from
'@/components/qr-code'
import
{
fetchConfig
}
from
'@/config'
export
default
{
export
default
{
name
:
'editEquity'
,
name
:
'editEquity'
,
data
()
{
data
()
{
...
@@ -438,19 +459,19 @@ export default {
...
@@ -438,19 +459,19 @@ export default {
packageList
:
[],
packageList
:
[],
editRulePro
:
{},
editRulePro
:
{},
editFormPro
:
{},
editFormPro
:
{},
editFormDataPro
:
[
//
editFormDataPro: [
{
//
{
label
:
''
,
//
label: '',
name
:
'packageCode'
,
//
name: 'packageCode',
optionList
:
[],
//
optionList: [],
optionId
:
'packageCode'
,
//
optionId: 'packageCode',
optionLabel
:
'packageName'
,
//
optionLabel: 'packageName',
addHtml
:
'packageCode'
,
//
addHtml: 'packageCode',
handleRadioChange
:
val
=>
{
//
handleRadioChange: val => {
this
.
packageAttr
()
//
this.packageAttr()
}
//
}
}
//
}
],
//
],
curSelectPro
:
[],
curSelectPro
:
[],
curSelectCustomPro
:
''
,
curSelectCustomPro
:
''
,
editProductObj
:
{},
editProductObj
:
{},
...
@@ -469,17 +490,16 @@ export default {
...
@@ -469,17 +490,16 @@ export default {
speAgree
:
[{
required
:
false
,
message
:
'请输入特别约定'
,
trigger
:
'change'
}],
speAgree
:
[{
required
:
false
,
message
:
'请输入特别约定'
,
trigger
:
'change'
}],
speContent
:
[{
required
:
false
,
message
:
'请输入约定内容'
,
trigger
:
'change'
}]
speContent
:
[{
required
:
false
,
message
:
'请输入约定内容'
,
trigger
:
'change'
}]
},
},
agreeList
:
[],
editFormDataOther
:
[
editFormDataOther
:
[
{
{
label
:
'设备号'
,
label
:
'设备号'
,
name
:
'
deviceNo
'
,
name
:
'
sn
'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
100
maxlength
:
100
},
},
{
{
label
:
'特别约定'
,
label
:
'特别约定'
,
name
:
'spe
Agree
'
,
name
:
'spe
cialAppointId
'
,
type
:
'select'
,
type
:
'select'
,
noFilter
:
true
,
noFilter
:
true
,
optionList
:
[],
optionList
:
[],
...
@@ -489,33 +509,33 @@ export default {
...
@@ -489,33 +509,33 @@ export default {
},
},
{
{
label
:
'约定内容'
,
label
:
'约定内容'
,
name
:
'spe
Conte
nt'
,
name
:
'spe
cialAppoi
nt'
,
type
:
'input'
,
type
:
'input'
,
inputType
:
'textarea'
inputType
:
'textarea'
}
}
],
],
// 店面信息
// 店面信息
editRuleShop
:
{
editRuleShop
:
{
shop
Name
:
[{
required
:
true
,
message
:
'店面名称'
,
trigger
:
'change'
}],
merchant
Name
:
[{
required
:
true
,
message
:
'店面名称'
,
trigger
:
'change'
}],
shop
Phone
:
[{
required
:
true
,
message
:
'店铺联系号码'
,
trigger
:
'change'
}],
merchant
Phone
:
[{
required
:
true
,
message
:
'店铺联系号码'
,
trigger
:
'change'
}],
shop
Address
:
[{
required
:
true
,
message
:
'店铺联系地址'
,
trigger
:
'change'
}]
merchant
Address
:
[{
required
:
true
,
message
:
'店铺联系地址'
,
trigger
:
'change'
}]
},
},
editFormDataShop
:
[
editFormDataShop
:
[
{
{
label
:
'店面名称'
,
label
:
'店面名称'
,
name
:
'
shop
Name'
,
name
:
'
merchant
Name'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
50
maxlength
:
50
},
},
{
{
label
:
'店铺联系号码'
,
label
:
'店铺联系号码'
,
name
:
'
shop
Phone'
,
name
:
'
merchant
Phone'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
11
maxlength
:
11
},
},
{
{
label
:
'店铺联系地址'
,
label
:
'店铺联系地址'
,
name
:
'
shop
Address'
,
name
:
'
merchant
Address'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
100
maxlength
:
100
}
}
...
@@ -615,15 +635,22 @@ export default {
...
@@ -615,15 +635,22 @@ export default {
value
:
1
,
value
:
1
,
label
:
'全款车'
label
:
'全款车'
}
}
]
],
agreeList
:
[],
},
},
allCarChildList
:
[],
allCarChildList
:
[],
qrcodUrl
:
'https://img01.glsx.com.cn/weapp/resource/saas/scrm/beforesale_equity_code.png'
,
qrcodUrl
:
'https://img01.glsx.com.cn/weapp/resource/saas/scrm/beforesale_equity_code.png'
,
// 权益类型
// 权益类型
equityRadio
:
'1'
,
equityRadio
:
1
,
// 产品属性传参数组
//
自选权益
产品属性传参数组
tempAttributeList
:
[],
tempAttributeList
:
[],
packageCodeList
:
[]
packageCodeList
:
[],
formatProduct
:
{},
// 自定权益
autoAttriButeList
:
[],
autoPackageCodeList
:
[],
autoFormatProduct
:
{},
caseTable
:
[]
}
}
},
},
...
@@ -644,12 +671,11 @@ export default {
...
@@ -644,12 +671,11 @@ export default {
qrCode
qrCode
},
},
created
()
{
async
created
()
{
this
.
getAllVehicleBrand
()
this
.
getAllVehicleBrand
()
this
.
getCarChildList
(
false
,
true
)
this
.
getCarChildList
(
false
,
true
)
// 测试时使用
// 测试时使用
// this.getPackageList()
this
.
getSpeAgreeOptions
()
// this.getSpeAgreeOptions()
},
},
mounted
()
{
mounted
()
{
...
@@ -657,7 +683,6 @@ export default {
...
@@ -657,7 +683,6 @@ export default {
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
const
urlParam
=
this
.
$route
.
params
const
urlParam
=
this
.
$route
.
params
this
.
routeInfo
=
JSON
.
parse
(
decodeURIComponent
(
urlParam
.
id
))
this
.
routeInfo
=
JSON
.
parse
(
decodeURIComponent
(
urlParam
.
id
))
console
.
log
(
this
.
routeInfo
)
this
.
disabled
=
this
.
routeInfo
.
addOrEdit
==
'5'
this
.
disabled
=
this
.
routeInfo
.
addOrEdit
==
'5'
// 提单成功 - 修改
// 提单成功 - 修改
if
(
this
.
routeInfo
.
isSuper
!=
'true'
)
{
if
(
this
.
routeInfo
.
isSuper
!=
'true'
)
{
...
@@ -671,6 +696,12 @@ export default {
...
@@ -671,6 +696,12 @@ export default {
},
},
methods
:
{
methods
:
{
// 获取mock上面配置的方案
async
getCase
(
caseNum
)
{
caseNum
=
caseNum
||
1
const
{
caseList
}
=
await
fetchConfig
()
this
.
caseTable
=
caseList
[
caseNum
-
1
]
},
// 自选权益产品套餐处理参数--日期选择框
// 自选权益产品套餐处理参数--日期选择框
getCurChangeDate
(
e
,
pack
,
attr
)
{
getCurChangeDate
(
e
,
pack
,
attr
)
{
let
temp
=
e
let
temp
=
e
...
@@ -713,23 +744,35 @@ export default {
...
@@ -713,23 +744,35 @@ export default {
...
orgin
,
...
orgin
,
last
:
e
last
:
e
}
}
let
flag
=
this
.
tempAttributeList
.
findIndex
(
val
=>
{
if
(
this
.
equityRadio
==
1
)
{
return
val
.
attributeName
==
attr
.
attributeName
&&
val
.
packageCode
==
pack
.
packageCode
let
flag
=
this
.
tempAttributeList
.
findIndex
(
val
=>
{
})
return
val
.
attributeName
==
attr
.
attributeName
&&
val
.
packageCode
==
pack
.
packageCode
if
(
flag
>
-
1
)
{
})
this
.
tempAttributeList
[
flag
].
attributeValue
=
e
if
(
flag
>
-
1
)
{
this
.
tempAttributeList
[
flag
].
attributeValue
=
e
}
else
{
this
.
tempAttributeList
.
push
(
temp
)
}
this
.
packageCodeList
.
push
(
pack
.
packageCode
)
this
.
handleProductArrParam
(
this
.
tempAttributeList
,
this
.
packageCodeList
)
}
else
{
}
else
{
this
.
tempAttributeList
.
push
(
temp
)
let
flag
=
this
.
autoAttriButeList
.
findIndex
(
val
=>
{
return
val
.
attributeName
==
attr
.
attributeName
&&
val
.
packageCode
==
pack
.
packageCode
})
if
(
flag
>
-
1
)
{
this
.
autoAttriButeList
[
flag
].
attributeValue
=
e
}
else
{
this
.
autoAttriButeList
.
push
(
temp
)
}
this
.
autoPackageCodeList
.
push
(
pack
.
packageCode
)
this
.
handleProductArrParam
(
this
.
autoAttriButeList
,
this
.
autoPackageCodeList
)
}
}
// console.log(this.tempAttributeList)
this
.
packageCodeList
.
push
(
pack
.
packageCode
)
this
.
handleProductArrParam
(
this
.
tempAttributeList
)
},
},
// 处理数据结构对比后台所需的参数
// 处理数据结构对比后台所需的参数
handleProductArrParam
(
arr
)
{
handleProductArrParam
(
arr
,
codearr
)
{
let
newArr
=
[]
let
newArr
=
[]
const
codeList
=
Array
.
from
(
new
Set
(
this
.
packageCodeList
))
const
codeList
=
Array
.
from
(
new
Set
(
codearr
))
let
blackArr
=
[]
let
blackArr
=
[]
for
(
let
i
=
0
;
i
<
codeList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
codeList
.
length
;
i
++
)
{
blackArr
.
push
([])
blackArr
.
push
([])
...
@@ -761,25 +804,42 @@ export default {
...
@@ -761,25 +804,42 @@ export default {
}
}
for
(
let
i
=
0
;
i
<
blackArr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
blackArr
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
blackArr
[
i
].
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
blackArr
[
i
].
length
;
j
++
)
{
let
arrt1
=
`attributes[
${
blackArr
[
i
][
j
].
index
}
].attributeDTOList[
${
j
}
].attributeGroup`
let
arrt1
=
`attributes[
${
blackArr
[
i
][
j
].
index
}
].attributeDTOList[
${
j
}
].attributeGroup`
let
arrt2
=
`attributes[
${
blackArr
[
i
][
j
].
index
}
].attributeDTOList[
${
j
}
].attributeName`
let
arrt2
=
`attributes[
${
blackArr
[
i
][
j
].
index
}
].attributeDTOList[
${
j
}
].attributeName`
let
arrt3
=
`attributes[
${
blackArr
[
i
][
j
].
index
}
].attributeDTOList[
${
j
}
].attributeValue`
let
arrt3
=
`attributes[
${
blackArr
[
i
][
j
].
index
}
].attributeDTOList[
${
j
}
].attributeValue`
let
arrt4
=
`attributes[
${
blackArr
[
i
][
j
].
index
}
].attributeDTOList[
${
j
}
].sort`
let
arrt4
=
`attributes[
${
blackArr
[
i
][
j
].
index
}
].attributeDTOList[
${
j
}
].sort`
let
obj
=
{
let
obj
=
{
[
arrt1
]:
blackArr
[
i
][
j
].
value
.
attributeGroup
,
[
arrt1
]:
blackArr
[
i
][
j
].
value
.
attributeGroup
,
[
arrt2
]:
blackArr
[
i
][
j
].
value
.
attributeName
,
[
arrt2
]:
blackArr
[
i
][
j
].
value
.
attributeName
,
[
arrt3
]:
blackArr
[
i
][
j
].
value
.
attributeValue
,
[
arrt3
]:
this
.
priceFormat
(
blackArr
[
i
][
j
].
value
.
attributeName
,
blackArr
[
i
][
j
].
value
.
attributeValue
)
,
[
arrt4
]:
blackArr
[
i
][
j
].
value
.
sort
[
arrt4
]:
blackArr
[
i
][
j
].
value
.
sort
}
}
newParaArr
.
push
(
obj
)
newParaArr
.
push
(
obj
)
}
}
}
}
console
.
log
(
newParaArr
)
let
concactArr
=
newParaArr
.
concat
(
newArr
)
if
(
this
.
equityRadio
==
1
)
{
concactArr
.
forEach
(
item
=>
{
this
.
formatProduct
=
Object
.
assign
(
this
.
formatProduct
,
item
)
})
}
else
{
concactArr
.
forEach
(
item
=>
{
this
.
autoFormatProduct
=
Object
.
assign
(
this
.
autoFormatProduct
,
item
)
})
}
},
// 处理传参价格问题
priceFormat
(
name
,
value
)
{
let
result
=
value
if
(
name
.
includes
(
'price'
))
{
result
=
parseFloat
(
value
)
*
100
}
return
result
},
},
// 获取特别约定列表
// 获取特别约定列表
getSpeAgreeOptions
()
{
getSpeAgreeOptions
()
{
this
.
$apis
.
beforeSale
.
spaAgressData
({}).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
spaAgressData
({}).
then
(
res
=>
{
this
.
agreeList
=
res
||
[]
this
.
baseData
.
agreeList
=
res
||
[]
})
})
},
},
// 获取产品的数据
// 获取产品的数据
...
@@ -791,6 +851,7 @@ export default {
...
@@ -791,6 +851,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
.
getCase
(
item
.
planId
)
}
else
if
(
item
.
packageName
.
includes
(
'盗抢全损无忧'
))
{
}
else
if
(
item
.
packageName
.
includes
(
'盗抢全损无忧'
))
{
item
.
idName
=
'stolen'
item
.
idName
=
'stolen'
}
else
if
(
item
.
packageName
.
includes
(
'尊享版'
))
{
}
else
if
(
item
.
packageName
.
includes
(
'尊享版'
))
{
...
@@ -827,12 +888,14 @@ export default {
...
@@ -827,12 +888,14 @@ export default {
this
.
customProductList
.
push
(
item
)
this
.
customProductList
.
push
(
item
)
}
}
})
})
this
.
autoGenerate
(
this
.
customProductList
,
this
.
productList
)
},
},
setDisabled
(
partDisabledList
=
[])
{
setDisabled
(
partDisabledList
=
[])
{
var
list
=
[
'Car'
,
'User'
,
'Shop'
,
'Other'
]
var
list
=
[
'Car'
,
'User'
,
'Shop'
,
'Other'
]
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
this
[
'editFormData'
+
list
[
i
]].
forEach
((
item
,
idx
)
=>
{
this
[
'editFormData'
+
list
[
i
]].
forEach
((
item
,
idx
)
=>
{
if
(
!
partDisabledList
.
length
)
{
if
(
!
partDisabledList
.
length
)
{
console
.
log
(
this
[
'editFormData'
+
list
[
i
]][
idx
]);
this
[
'editFormData'
+
list
[
i
]][
idx
].
isDisabled
=
true
this
[
'editFormData'
+
list
[
i
]][
idx
].
isDisabled
=
true
}
else
{
}
else
{
if
(
partDisabledList
.
includes
(
item
.
name
))
{
if
(
partDisabledList
.
includes
(
item
.
name
))
{
...
@@ -864,9 +927,8 @@ export default {
...
@@ -864,9 +927,8 @@ export default {
}
}
})
})
},
},
getInfo
()
{
getInfo
(
productArrData
)
{
this
.
$apis
.
beforeSale
.
getEquityApi
({
contractNo
:
this
.
routeInfo
.
contractNo
}).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
getEquityApi
({
contractNo
:
this
.
routeInfo
.
contractNo
}).
then
(
res
=>
{
// console.log(res)
this
.
editForm
=
{
this
.
editForm
=
{
...
res
...
res
}
}
...
@@ -880,13 +942,13 @@ export default {
...
@@ -880,13 +942,13 @@ export default {
if
(
this
.
editForm
.
actualSalesPrice
)
{
if
(
this
.
editForm
.
actualSalesPrice
)
{
this
.
editForm
.
actualSalesPrice
=
(
this
.
editForm
.
actualSalesPrice
/
100
).
toFixed
(
2
)
this
.
editForm
.
actualSalesPrice
=
(
this
.
editForm
.
actualSalesPrice
/
100
).
toFixed
(
2
)
}
}
if
(
this
.
editForm
.
attributeList
&&
this
.
editForm
.
attributeList
.
length
)
{
//
if (this.editForm.attributeList && this.editForm.attributeList.length) {
var
idxPrice
=
this
.
editForm
.
attributeList
.
findIndex
(
i
=>
i
.
attributeName
==
'additional_price'
)
//
var idxPrice = this.editForm.attributeList.findIndex(i => i.attributeName == 'additional_price')
this
.
editForm
.
attributeList
[
idxPrice
].
attributeValue
=
this
.
editForm
.
attributeList
[
idxPrice
].
attributeValue
?
(
this
.
editForm
.
attributeList
[
idxPrice
].
attributeValue
/
100
).
toFixed
(
2
)
:
''
//
this.editForm.attributeList[idxPrice].attributeValue = this.editForm.attributeList[idxPrice].attributeValue ? (this.editForm.attributeList[idxPrice].attributeValue / 100).toFixed(2) : ''
}
//
}
this
.
editForm
.
vehicle
.
billingDate
=
this
.
editForm
.
vehicle
.
billingDate
?
new
Date
(
this
.
editForm
.
vehicle
.
billingDate
)
:
''
this
.
editForm
.
vehicle
.
billingDate
=
this
.
editForm
.
vehicle
.
billingDate
?
new
Date
(
this
.
editForm
.
vehicle
.
billingDate
)
:
''
this
.
editForm
.
effectiveDate
=
this
.
editForm
.
effectiveDate
?
new
Date
(
this
.
editForm
.
effectiveDate
)
:
''
this
.
editForm
.
effectiveDate
=
this
.
editForm
.
effectiveDate
?
new
Date
(
this
.
editForm
.
effectiveDate
)
:
''
if
([
'2'
,
'3'
,
'4'
].
includes
(
this
.
routeInfo
.
addOrEdit
))
{
if
([
2
,
3
,
4
].
includes
(
this
.
routeInfo
.
addOrEdit
))
{
this
.
editForm
.
vehicle
.
vehicleBrandId
=
this
.
editForm
.
vehicle
.
vehicleBrandId
||
this
.
defaultBrandForm
.
vehicleBrandId
this
.
editForm
.
vehicle
.
vehicleBrandId
=
this
.
editForm
.
vehicle
.
vehicleBrandId
||
this
.
defaultBrandForm
.
vehicleBrandId
this
.
editForm
.
vehicle
.
vehicleSubBrandId
=
this
.
editForm
.
vehicle
.
vehicleSubBrandId
||
this
.
defaultBrandForm
.
vehicleSubBrandId
this
.
editForm
.
vehicle
.
vehicleSubBrandId
=
this
.
editForm
.
vehicle
.
vehicleSubBrandId
||
this
.
defaultBrandForm
.
vehicleSubBrandId
}
}
...
@@ -903,16 +965,15 @@ export default {
...
@@ -903,16 +965,15 @@ export default {
var
idx
=
this
.
editFormDataUser
.
findIndex
(
item
=>
item
.
name
==
'cardNo'
)
var
idx
=
this
.
editFormDataUser
.
findIndex
(
item
=>
item
.
name
==
'cardNo'
)
this
.
editFormDataUser
[
idx
].
label
=
this
.
baseData
.
cardTypeList
.
find
(
item
=>
item
.
confId
==
this
.
editForm
.
customerType
).
confName
this
.
editFormDataUser
[
idx
].
label
=
this
.
baseData
.
cardTypeList
.
find
(
item
=>
item
.
confId
==
this
.
editForm
.
customerType
).
confName
}
}
if
([
'2'
,
'4'
].
includes
(
this
.
routeInfo
.
addOrEdit
))
{
if
([
2
,
4
].
includes
(
this
.
routeInfo
.
addOrEdit
))
{
this
.
editForm
.
effectiveDate
=
new
Date
(
new
Date
().
setDate
(
new
Date
().
getDate
()
+
1
))
this
.
editForm
.
effectiveDate
=
new
Date
(
new
Date
().
setDate
(
new
Date
().
getDate
()
+
1
))
}
}
this
.
editForm
.
packageCode
&&
this
.
packageAttr
(
true
)
this
.
editForm
.
packageCode
&&
this
.
packageAttr
(
true
,
productArrData
)
})
})
},
},
getPackageList
()
{
getPackageList
()
{
this
.
$apis
.
beforeSale
.
getPackageListApi
({}).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
getPackageListApi
({}).
then
(
res
=>
{
this
.
toTestProductData
(
res
)
this
.
toTestProductData
(
res
)
// this.autoGenerate()
})
})
},
},
// 改建议价,实际销售价
// 改建议价,实际销售价
...
@@ -930,39 +991,66 @@ export default {
...
@@ -930,39 +991,66 @@ export default {
})
})
}
}
},
},
packageAttr
(
recovery
=
false
)
{
packageAttr
(
recovery
=
false
,
productArrData
)
{
var
targetItem
=
this
.
packageList
.
find
(
item
=>
item
.
packageCode
==
this
.
editForm
.
packageCode
)
var
targetItem
=
productArrData
.
find
(
item
=>
item
.
packageCode
==
this
.
editForm
.
packageCode
)
this
.
packageToPrice
()
if
(
targetItem
.
packageType
==
1
)
{
var
tempObj
=
this
.
$common
.
utils
.
deepClone
(
this
.
editFormPro
)
this
.
equityRadio
=
2
this
.
editRulePro
=
{}
this
.
curSelectCustomPro
=
targetItem
.
packageName
this
.
editFormPro
=
{}
this
.
editForm
.
attributeList
.
forEach
(
item
=>
{
var
attrName
=
''
if
(
item
.
attributeName
==
'service_period'
)
{
targetItem
&&
item
.
attributeValue
=
item
.
attributeValue
+
'年'
targetItem
.
groupAttributeList
.
forEach
(
item
=>
{
}
else
if
(
item
.
attributeName
==
'buy_car_type'
)
{
if
(
item
.
attributeList
.
length
==
1
)
{
item
.
attributeValue
=
item
.
attributeValue
==
1
?
'全款车'
:
'贷款车'
attrName
=
item
.
attributeList
[
0
].
attributeName
}
else
if
(
item
.
attributeName
.
includes
(
'price'
))
{
this
.
$set
(
this
.
editFormPro
,
attrName
,
tempObj
.
hasOwnProperty
(
attrName
)
?
tempObj
[
attrName
]
:
''
)
item
.
attributeValue
=
(
item
.
attributeValue
/
100
).
toFixed
(
2
)
if
(
item
.
attributeList
[
0
].
required
==
1
)
{
}
this
.
editRulePro
[
item
.
attributeList
[
0
].
attributeName
]
=
[
this
.
productModal
.
vip
[
item
.
attributeName
]
=
item
.
attributeValue
{
})
required
:
true
,
}
else
{
message
:
'请输入'
+
item
.
attributeList
[
0
].
attributeDesc
,
this
.
equityRadio
=
1
trigger
:
'change'
this
.
curSelectPro
=
[
targetItem
.
packageName
]
}
this
.
editForm
.
attributeList
.
forEach
(
item
=>
{
]
if
(
item
.
attributeName
==
'service_period'
)
{
}
item
.
attributeValue
=
item
.
attributeValue
+
'年'
}
else
{
}
else
if
(
item
.
attributeName
==
'buy_car_type'
)
{
for
(
var
i
=
0
;
i
<
item
.
num
;
i
++
)
{
item
.
attributeValue
=
item
.
attributeValue
==
1
?
'全款车'
:
'贷款车'
item
.
attributeList
.
forEach
(
k
=>
{
}
else
if
(
item
.
attributeName
.
includes
(
'price'
))
{
attrName
=
k
.
attributeName
item
.
attributeValue
=
(
item
.
attributeValue
/
100
).
toFixed
(
2
)
this
.
$set
(
this
.
editFormPro
,
attrName
+
i
,
tempObj
.
hasOwnProperty
(
attrName
+
i
)
?
tempObj
[
attrName
+
i
]
:
''
)
})
}
}
}
this
.
productModal
[
targetItem
.
idName
][
item
.
attributeName
]
=
item
.
attributeValue
})
})
if
(
recovery
)
{
this
.
recoveryEditFormPro
()
}
}
// this.packageToPrice()
var
tempObj
=
this
.
$common
.
utils
.
deepClone
(
this
.
editFormPro
)
// this.editRulePro = {}
// this.editFormPro = {}
// var attrName = ''
// targetItem &&
// targetItem.groupAttributeList.forEach(item => {
// if (item.attributeList.length == 1) {
// attrName = item.attributeList[0].attributeName
// this.$set(this.editFormPro, attrName, tempObj.hasOwnProperty(attrName) ? tempObj[attrName] : '')
// if (item.attributeList[0].required == 1) {
// this.editRulePro[item.attributeList[0].attributeName] = [
// {
// required: true,
// message: '请输入' + item.attributeList[0].attributeDesc,
// trigger: 'change'
// }
// ]
// }
// } else {
// for (var i = 0; i < item.num; i++) {
// item.attributeList.forEach(k => {
// attrName = k.attributeName
// this.$set(this.editFormPro, attrName + i, tempObj.hasOwnProperty(attrName + i) ? tempObj[attrName + i] : '')
// })
// }
// }
// })
// if (recovery) {
// this.recoveryEditFormPro()
// }
},
},
recoveryEditFormPro
()
{
recoveryEditFormPro
()
{
this
.
editForm
.
attributeList
.
length
&&
this
.
editForm
.
attributeList
.
length
&&
...
@@ -975,70 +1063,70 @@ export default {
...
@@ -975,70 +1063,70 @@ export default {
})
})
this
.
$set
(
this
.
editFormPro
,
hashObj
[
item
.
attributeName
]
!=
1
?
item
.
attributeName
+
item
.
sort
:
item
.
attributeName
,
item
.
attributeValue
)
this
.
$set
(
this
.
editFormPro
,
hashObj
[
item
.
attributeName
]
!=
1
?
item
.
attributeName
+
item
.
sort
:
item
.
attributeName
,
item
.
attributeValue
)
})
})
// console.log(this.editFormPro)
},
},
autoGenerate
()
{
autoGenerate
(
arr1
,
arr2
)
{
var
tempList
=
[]
const
tempList
=
arr1
.
concat
(
arr2
)
this
.
packageList
.
forEach
(
item
=>
{
this
.
routeInfo
.
addOrEdit
!=
'1'
?
this
.
getInfo
(
tempList
)
:
''
tempList
=
[]
// var tempList = []
item
.
groupAttributeList
.
forEach
((
k
,
idx
)
=>
{
// this.packageList.forEach(item => {
if
(
k
.
attributeList
.
length
==
1
)
{
// tempList = []
tempList
.
push
({
// item.groupAttributeList.forEach((k, idx) => {
label
:
k
.
attributeList
[
0
].
attributeDesc
,
// if (k.attributeList.length == 1) {
name
:
k
.
attributeList
[
0
].
attributeName
,
// tempList.push({
type
:
k
.
attributeList
[
0
].
attributeType
,
// label: k.attributeList[0].attributeDesc,
isDisabled
:
this
.
disabled
||
this
.
successDisable
,
// name: k.attributeList[0].attributeName,
maxlength
:
k
.
attributeList
[
0
].
maxLength
// type: k.attributeList[0].attributeType,
})
// isDisabled: this.disabled || this.successDisable,
if
(
k
.
attributeList
[
0
].
attributeType
==
'datePicker'
)
{
// maxlength: k.attributeList[0].maxLength
tempList
[
idx
].
dateType
=
'date'
// })
;(
tempList
[
idx
].
valueFormat
=
'yyyy-MM-dd'
),
(
tempList
[
idx
].
pickerOptions
=
'beforeRangePickerOptions'
)
// if (k.attributeList[0].attributeType == 'datePicker') {
}
// tempList[idx].dateType = 'date'
}
else
{
// ;(tempList[idx].valueFormat = 'yyyy-MM-dd'), (tempList[idx].pickerOptions = 'beforeRangePickerOptions')
var
tableList
=
[]
// }
for
(
var
i
=
0
;
i
<
k
.
num
;
i
++
)
{
// } else {
tableList
[
i
]
=
[]
// var tableList = []
k
.
attributeList
.
forEach
((
j
,
index
)
=>
{
// for (var i = 0; i < k.num; i++) {
tableList
[
i
].
push
({
// tableList[i] = []
groupName
:
j
.
groupName
,
// k.attributeList.forEach((j, index) => {
attributeDesc
:
j
.
attributeDesc
,
// tableList[i].push({
attributeName
:
j
.
attributeName
,
// groupName: j.groupName,
name
:
j
.
attributeName
+
i
,
// attributeDesc: j.attributeDesc,
sort
:
i
,
// attributeName: j.attributeName,
attributeGroup
:
j
.
attributeGroup
,
// name: j.attributeName + i,
maxlength
:
j
.
maxLength
,
// sort: i,
required
:
j
.
required
,
// attributeGroup: j.attributeGroup,
attributeType
:
j
.
attributeType
,
// maxlength: j.maxLength,
isDisabled
:
this
.
disabled
||
this
.
successDisable
// required: j.required,
})
// attributeType: j.attributeType,
})
// isDisabled: this.disabled || this.successDisable
}
// })
tempList
.
push
({
// })
label
:
''
,
// }
name
:
''
,
// tempList.push({
addHtml
:
'table'
,
// label: '',
attributeList
:
k
.
attributeList
,
// name: '',
tableList
:
tableList
// addHtml: 'table',
})
// attributeList: k.attributeList,
}
// tableList: tableList
})
// })
this
.
editFormDataPro
[
0
].
optionList
.
push
({
// }
packageCode
:
item
.
packageCode
,
// })
packageName
:
item
.
packageName
,
// this.editFormDataPro[0].optionList.push({
serviceItems
:
item
.
serviceItemsList
.
length
?
item
.
serviceItemsList
.
map
(
k
=>
k
.
serviceName
).
join
(
','
)
:
''
,
// packageCode: item.packageCode,
serviceItemsList
:
item
.
serviceItemsList
,
// packageName: item.packageName,
groupAttributeList
:
item
.
groupAttributeList
,
// serviceItems: item.serviceItemsList.length ? item.serviceItemsList.map(k => k.serviceName).join(',') : '',
editFormData
:
this
.
$common
.
utils
.
deepClone
(
tempList
)
// serviceItemsList: item.serviceItemsList,
})
// groupAttributeList: item.groupAttributeList,
})
// editFormData: this.$common.utils.deepClone(tempList)
this
.
routeInfo
.
addOrEdit
!=
'1'
?
this
.
getInfo
()
:
''
// })
// })
},
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
if
(
refreshSigle
)
{
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
var
index
=
this
[
formName
].
findIndex
(
k
=>
k
.
name
==
refreshSigle
)
var
index
=
this
[
formName
].
findIndex
(
k
=>
k
.
name
==
refreshSigle
)
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
]
.
length
&&
this
.
baseData
[
item
.
optionsName
]
[
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
...
@@ -1046,13 +1134,15 @@ export default {
...
@@ -1046,13 +1134,15 @@ export default {
}
}
}
else
{
}
else
{
this
[
formName
].
forEach
((
item
,
index
)
=>
{
this
[
formName
].
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
&&
this
.
baseData
[
item
.
optionsName
].
length
)
{
if
(
item
.
optionsName
)
{
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
item
.
type
===
'select'
&&
this
.
baseData
[
item
.
optionsName
].
length
)
{
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
const
temp
=
{}
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
temp
[
this
[
formName
][
index
].
optionId
]
=
''
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
temp
[
this
[
formName
][
index
].
optionId
]
=
''
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
}
}
}
})
})
...
@@ -1198,6 +1288,7 @@ export default {
...
@@ -1198,6 +1288,7 @@ export default {
updateEquity
(
params
)
{
updateEquity
(
params
)
{
this
.
$apis
.
beforeSale
.
updateEquityApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
updateEquityApi
(
params
).
then
(
res
=>
{
this
.
submit
=
false
this
.
submit
=
false
if
(
res
.
errId
==
'A1307'
)
{
if
(
res
.
errId
==
'A1307'
)
{
this
.
whereToGo
(
'vin'
)
this
.
whereToGo
(
'vin'
)
this
.
$message
({
this
.
$message
({
...
@@ -1205,9 +1296,16 @@ export default {
...
@@ -1205,9 +1296,16 @@ export default {
type
:
'error'
type
:
'error'
})
})
}
else
{
}
else
{
if
(
res
.
code
!=
0
)
{
this
.
$message
({
message
:
res
.
message
,
type
:
'error'
})
return
}
this
.
$router
.
push
({
this
.
$router
.
push
({
//
path: '/beforeSale/index',
path
:
'/beforeSale/index'
,
name
:
'beforeSale'
,
//
name: 'beforeSale',
params
:
res
params
:
res
})
})
}
}
...
@@ -1237,8 +1335,8 @@ export default {
...
@@ -1237,8 +1335,8 @@ export default {
}
}
var
params
=
this
.
getParams
()
var
params
=
this
.
getParams
()
params
.
operationType
=
1
params
.
operationType
=
1
if
([
'2'
,
'3'
,
'4'
].
includes
(
this
.
routeInfo
.
addOrEdit
))
{
if
([
2
,
3
,
4
].
includes
(
this
.
routeInfo
.
addOrEdit
))
{
if
(
this
.
routeInfo
.
addOrEdit
==
'4'
&&
this
.
editForm
.
orderStatus
!=
3
)
{
if
(
this
.
routeInfo
.
addOrEdit
==
4
&&
this
.
editForm
.
orderStatus
!=
3
)
{
params
.
contractNo
=
''
params
.
contractNo
=
''
}
else
{
}
else
{
params
.
contractNo
=
this
.
routeInfo
.
contractNo
params
.
contractNo
=
this
.
routeInfo
.
contractNo
...
@@ -1246,26 +1344,36 @@ export default {
...
@@ -1246,26 +1344,36 @@ export default {
}
else
{
}
else
{
params
.
contractNo
=
''
params
.
contractNo
=
''
}
}
console
.
log
(
params
,
'确定按钮提交的参数'
)
if
(
this
.
equityRadio
==
1
)
{
console
.
log
(
this
.
productModal
,
'产品的参数'
)
params
=
{
// this.$apis.beforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => {
...
params
,
// if (res.code == '0') {
...
this
.
formatProduct
// this.updateEquity(params)
}
// } else {
}
else
{
// this.submit = false
params
=
{
// this.$confirm(res.message, '提示', {
...
params
,
// confirmButtonText: '确定',
...
this
.
autoFormatProduct
// cancelButtonText: '取消',
}
// type: 'warning',
}
// callback: action => {
// if (action == 'confirm') {
this
.
$apis
.
beforeSale
.
checkOrderApi
({
vin
:
this
.
editForm
.
vehicle
.
vin
,
contractNo
:
this
.
routeInfo
.
contractNo
||
''
}).
then
(
res
=>
{
// this.submit = true
if
(
res
.
code
==
'0'
)
{
// this.updateEquity(params)
this
.
updateEquity
(
params
)
// }
}
else
{
// }
this
.
submit
=
false
// })
this
.
$confirm
(
res
.
message
,
'提示'
,
{
// }
confirmButtonText
:
'确定'
,
// })
cancelButtonText
:
'取消'
,
type
:
'warning'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
this
.
submit
=
true
this
.
updateEquity
(
params
)
}
}
})
}
})
},
},
handleReset
()
{
handleReset
()
{
this
.
editForm
=
{
this
.
editForm
=
{
...
@@ -1411,6 +1519,70 @@ export default {
...
@@ -1411,6 +1519,70 @@ export default {
}
}
}
}
}
}
.table_case_wrap
{
display
:
flex
;
.case_title
{
width
:
160px
;
height
:
54px
;
white-space
:
nowrap
;
text-align
:
right
;
box-sizing
:
border-box
;
padding-right
:
12px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#333333
;
}
.case_table
{
.table_th
{
height
:
54px
;
background
:
#f4f6fc
;
.th_item
{
width
:
229px
;
height
:
54px
;
font-size
:
14px
;
font-weight
:
600
;
color
:
#333333
;
}
.border-lr
{
border-right
:
1px
solid
#e8e8ea
;
border-left
:
1px
solid
#e8e8ea
;
}
}
.table_tr
{
border
:
1px
solid
#e8e8ea
;
border-right
:
none
;
.tr_item
{
width
:
88px
;
height
:
160px
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#666
;
border-right
:
1px
solid
#e8e8ea
;
}
.tr_sec_item_wrap
{
.tr_sec_item
{
.sec_item
{
width
:
229px
;
height
:
54px
;
border-right
:
1px
solid
#e8e8ea
;
border-bottom
:
1px
solid
#e8e8ea
;
box-sizing
:
border-box
;
padding-left
:
31px
;
}
.noborder
{
border-bottom
:
none
;
}
}
}
}
.max
{
width
:
291px
;
}
.min
{
width
:
88px
;
}
}
}
}
}
}
}
.before-sale
.edit-sub-title
{
.before-sale
.edit-sub-title
{
...
@@ -1533,6 +1705,8 @@ export default {
...
@@ -1533,6 +1705,8 @@ export default {
background
:
#f4f5fa
;
background
:
#f4f5fa
;
}
}
.ma_bot
{
.ma_bot
{
box-sizing
:
border-box
;
padding
:
0
20px
0
40px
;
height
:
78px
;
height
:
78px
;
.custom_black
{
.custom_black
{
background
:
#ffffff
;
background
:
#ffffff
;
...
...
src/views/beforeSale/equityList.vue
View file @
d25d3e3
...
@@ -7,8 +7,7 @@
...
@@ -7,8 +7,7 @@
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"find_wrap"
>
<div
class=
"find_wrap"
>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:searchSelectObj=
"searchSelectObj"
:formData=
"searchFormData"
></glsx-combi-form>
</glsx-combi-form>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData2"
>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData2"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<el-button
:size=
"size"
class=
"resetBtn"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
class=
"resetBtn"
@
click=
"handleReset"
>
重置
</el-button>
...
@@ -188,14 +187,14 @@ export default {
...
@@ -188,14 +187,14 @@ export default {
{
{
label
:
'车主姓名'
,
label
:
'车主姓名'
,
prop
:
'customerName'
,
prop
:
'customerName'
,
line
:
1
,
line
:
1
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
customerName
||
'-'
return
cellValue
.
customerName
||
'-'
}
}
},
},
{
{
label
:
'合同号'
,
label
:
'合同号'
,
line
:
1
,
line
:
1
,
prop
:
'contractNo'
,
prop
:
'contractNo'
,
width
:
'200px'
,
width
:
'200px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -204,7 +203,7 @@ export default {
...
@@ -204,7 +203,7 @@ export default {
},
},
{
{
label
:
'提单成功时间'
,
label
:
'提单成功时间'
,
line
:
1
,
line
:
1
,
prop
:
'successDate'
,
prop
:
'successDate'
,
width
:
'160px'
,
width
:
'160px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -213,7 +212,7 @@ export default {
...
@@ -213,7 +212,7 @@ export default {
},
},
{
{
label
:
'购车日期'
,
label
:
'购车日期'
,
line
:
1
,
line
:
1
,
prop
:
'billingDate'
,
prop
:
'billingDate'
,
width
:
'130px'
,
width
:
'130px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -222,7 +221,7 @@ export default {
...
@@ -222,7 +221,7 @@ export default {
},
},
{
{
label
:
'店面名称'
,
label
:
'店面名称'
,
line
:
1
,
line
:
1
,
prop
:
'merchantName'
,
prop
:
'merchantName'
,
width
:
'160px'
,
width
:
'160px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -231,7 +230,7 @@ export default {
...
@@ -231,7 +230,7 @@ export default {
},
},
{
{
label
:
'车品牌'
,
label
:
'车品牌'
,
line
:
1
,
line
:
1
,
prop
:
'vehicleBrandName'
,
prop
:
'vehicleBrandName'
,
width
:
'160px'
,
width
:
'160px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -240,25 +239,25 @@ export default {
...
@@ -240,25 +239,25 @@ export default {
},
},
{
{
label
:
'车系'
,
label
:
'车系'
,
line
:
1
,
line
:
1
,
width
:
"160px"
,
width
:
'160px'
,
prop
:
'vehicleSeriesName'
,
prop
:
'vehicleSeriesName'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
vehicleSeriesName
||
'-'
return
cellValue
.
vehicleSeriesName
||
'-'
}
}
},
},
{
{
label
:
'无忧卡卡号'
,
label
:
'无忧卡卡号'
,
line
:
1
,
line
:
1
,
prop
:
'cardSeqNo'
,
prop
:
'cardSeqNo'
,
width
:
'200px'
,
width
:
'200px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
carNo
||
'-'
return
cellValue
.
carNo
||
'-'
}
}
},
},
{
{
label
:
'车架号'
,
label
:
'车架号'
,
line
:
1
,
line
:
1
,
prop
:
'vin'
,
prop
:
'vin'
,
width
:
'200px'
,
width
:
'200px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -267,7 +266,7 @@ export default {
...
@@ -267,7 +266,7 @@ export default {
},
},
{
{
label
:
'电话'
,
label
:
'电话'
,
line
:
1
,
line
:
1
,
prop
:
'customerPhone'
,
prop
:
'customerPhone'
,
width
:
'160px'
,
width
:
'160px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -276,15 +275,15 @@ export default {
...
@@ -276,15 +275,15 @@ export default {
},
},
{
{
label
:
'产品名称'
,
label
:
'产品名称'
,
line
:
1
,
line
:
1
,
prop
:
'packageName'
,
prop
:
'packageName'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
packageName
||
'-'
return
cellValue
.
packageName
||
'-'
}
}
},
},
{
{
label
:
'无忧保障服务费'
,
label
:
'无忧保障服务费'
,
line
:
1
,
line
:
1
,
prop
:
'actualSalesPrice'
,
prop
:
'actualSalesPrice'
,
width
:
'160px'
,
width
:
'160px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -302,7 +301,7 @@ export default {
...
@@ -302,7 +301,7 @@ export default {
// },
// },
{
{
label
:
'服务期限'
,
label
:
'服务期限'
,
line
:
1
,
line
:
1
,
prop
:
'servicePeriod'
,
prop
:
'servicePeriod'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
servicePeriod
?
'1年'
:
'-'
return
cellValue
.
servicePeriod
?
'1年'
:
'-'
...
@@ -310,7 +309,7 @@ export default {
...
@@ -310,7 +309,7 @@ export default {
},
},
{
{
label
:
'生效时间'
,
label
:
'生效时间'
,
line
:
1
,
line
:
1
,
prop
:
'effectiveDate'
,
prop
:
'effectiveDate'
,
width
:
'130px'
,
width
:
'130px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -319,7 +318,7 @@ export default {
...
@@ -319,7 +318,7 @@ export default {
},
},
{
{
label
:
'服务状态'
,
label
:
'服务状态'
,
line
:
1
,
line
:
1
,
prop
:
'orderStatus'
,
prop
:
'orderStatus'
,
width
:
'100px'
,
width
:
'100px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -367,7 +366,7 @@ export default {
...
@@ -367,7 +366,7 @@ export default {
// },
// },
{
{
label
:
'省代'
,
label
:
'省代'
,
line
:
1
,
line
:
1
,
prop
:
'provinceMerchantName'
,
prop
:
'provinceMerchantName'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
provinceMerchantName
||
'-'
return
cellValue
.
provinceMerchantName
||
'-'
...
@@ -375,7 +374,7 @@ export default {
...
@@ -375,7 +374,7 @@ export default {
},
},
{
{
label
:
'市代'
,
label
:
'市代'
,
line
:
1
,
line
:
1
,
prop
:
'cityMerchantName'
,
prop
:
'cityMerchantName'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
cityMerchantName
||
'-'
return
cellValue
.
cityMerchantName
||
'-'
...
@@ -383,7 +382,7 @@ export default {
...
@@ -383,7 +382,7 @@ export default {
},
},
{
{
label
:
'操作人'
,
label
:
'操作人'
,
line
:
1
,
line
:
1
,
prop
:
'updatedBy'
,
prop
:
'updatedBy'
,
width
:
'140px'
,
width
:
'140px'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -458,7 +457,7 @@ export default {
...
@@ -458,7 +457,7 @@ export default {
glsxDialog
,
glsxDialog
,
pdfDialog
pdfDialog
},
},
mounted
()
{
mounted
()
{
this
.
editNotify
=
this
.
$route
.
params
this
.
editNotify
=
this
.
$route
.
params
if
(
this
.
isFirst
&&
this
.
editNotify
.
hasOwnProperty
(
'code'
))
{
if
(
this
.
isFirst
&&
this
.
editNotify
.
hasOwnProperty
(
'code'
))
{
...
@@ -580,13 +579,29 @@ export default {
...
@@ -580,13 +579,29 @@ export default {
apiName
:
apiName
,
apiName
:
apiName
,
apiParams
:
apiParams
apiParams
:
apiParams
}
}
if
(
title
==
'退单'
)
{
this
.
$confirm
(
'是否确认退单??'
,
'退单'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
handleSecondConfirm
()
})
return
}
this
.
handleSecondCancel
()
this
.
handleSecondCancel
()
},
},
handleSecondConfirm
()
{
handleSecondConfirm
()
{
this
.
$apis
[
this
.
secondObj
.
apiModule
][
this
.
secondObj
.
apiName
](
this
.
secondObj
.
apiParams
).
then
(
res
=>
{
this
.
$apis
[
this
.
secondObj
.
apiModule
][
this
.
secondObj
.
apiName
](
this
.
secondObj
.
apiParams
).
then
(
res
=>
{
this
.
handleSecondCancel
()
// this.handleSecondCancel()
this
.
isTipVisible
=
true
// this.isTipVisible = true
if
(
this
.
secondObj
.
title
==
'退单'
)
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
}
this
.
editNotify
=
res
this
.
editNotify
=
res
clearTimeout
(
this
.
timer
)
clearTimeout
(
this
.
timer
)
this
.
timer
=
setTimeout
(
this
.
timer
=
setTimeout
(
...
@@ -809,9 +824,9 @@ export default {
...
@@ -809,9 +824,9 @@ export default {
margin
:
0
20px
;
margin
:
0
20px
;
}
}
}
}
.table_wrapper
{
.table_wrapper
{
margin-top
:
10px
;
margin-top
:
10px
;
background
:
#ffffff
;
background
:
#ffffff
;
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.1
);
padding
:
20px
;
padding
:
20px
;
}
}
...
@@ -860,17 +875,17 @@ export default {
...
@@ -860,17 +875,17 @@ export default {
.before-sale
.el-table
.cell
{
.before-sale
.el-table
.cell
{
line-height
:
16px
;
line-height
:
16px
;
}
}
.before-sale
.table-btns
{
.before-sale
.table-btns
{
display
:
grid
;
display
:
grid
;
grid-template-columns
:
repeat
(
auto-fill
,
33.33%
);
grid-template-columns
:
repeat
(
auto-fill
,
33.33%
);
grid-row-gap
:
10px
;
grid-row-gap
:
10px
;
}
}
.before-sale
.table-btns
.el-button
{
.before-sale
.table-btns
.el-button
{
//
padding
:
0
0
0
5px
;
//
padding
:
0
0
0
5px
;
border-radius
:
0
;
border-radius
:
0
;
border
:
0
;
border
:
0
;
padding
:
0
;
padding
:
0
;
margin
:
0
;
margin
:
0
;
}
}
//
.before-sale
.table-btns
.el-button
:first-child
{
//
.before-sale
.table-btns
.el-button
:first-child
{
...
...
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