Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 fe4f38f9
authored
May 23, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 权益下单配置功能开发
1 parent
d95fea61
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
15 deletions
src/api/shopConfig.js
src/views/systemConfig/ShopConfig/components/equitySet.vue
src/api/shopConfig.js
View file @
fe4f38f
...
@@ -97,3 +97,15 @@ export function getResidentStaffList(data) {
...
@@ -97,3 +97,15 @@ export function getResidentStaffList(data) {
data
.
method
=
`
${
path
}
merchant.staff.list`
data
.
method
=
`
${
path
}
merchant.staff.list`
return
request
(
data
,
"post"
)
return
request
(
data
,
"post"
)
}
}
// 查询门店录单设置
export
function
orderFieldSettingList
(
data
)
{
data
.
method
=
`
${
path
}
order.field.setting.list`
return
request
(
data
,
"post"
)
}
// 更新门店录单设置
export
function
orderFieldSettingUpdate
(
data
)
{
data
.
method
=
`
${
path
}
order.field.setting.update`
return
request
(
data
,
"post"
)
}
src/views/systemConfig/ShopConfig/components/equitySet.vue
View file @
fe4f38f
...
@@ -18,8 +18,8 @@
...
@@ -18,8 +18,8 @@
v-model=
"formData[item.prop]"
v-model=
"formData[item.prop]"
@
change=
"changeType()"
@
change=
"changeType()"
>
>
<el-radio
:label=
"
1
"
>
必填
</el-radio>
<el-radio
:label=
"
true
"
>
必填
</el-radio>
<el-radio
:label=
"
0
"
>
非必填
</el-radio>
<el-radio
:label=
"
false
"
>
非必填
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
...
@@ -48,57 +48,110 @@
...
@@ -48,57 +48,110 @@
</template>
</template>
<
script
>
<
script
>
import
{
orderFieldSettingList
,
orderFieldSettingUpdate
}
from
"@/api/shopConfig.js"
export
default
{
export
default
{
name
:
"EquitySet"
,
name
:
"EquitySet"
,
data
()
{
data
()
{
return
{
return
{
settingInfo
:
[],
formData
:
{
formData
:
{
car
Type
:
0
,
car
Brand
:
false
,
vin
:
0
,
carNo
:
false
,
id
CardNum
:
0
id
Number
:
false
},
},
rules
:
{
rules
:
{
car
Type
:
[
car
Brand
:
[
{
required
:
true
,
message
:
"请选择车型:"
,
trigger
:
"change"
}
{
required
:
true
,
message
:
"请选择车型:"
,
trigger
:
"change"
}
],
],
vin
:
[
carNo
:
[
{
required
:
true
,
message
:
"请车架号(VIN)码:"
,
trigger
:
"change"
}
{
required
:
true
,
message
:
"请车架号(VIN)码:"
,
trigger
:
"change"
}
],
],
id
CardNum
:
[
id
Number
:
[
{
required
:
true
,
message
:
"请证件号码:"
,
trigger
:
"change"
}
{
required
:
true
,
message
:
"请证件号码:"
,
trigger
:
"change"
}
]
]
},
},
formList
:
[
formList
:
[
{
{
name
:
"选择车型:"
,
name
:
"选择车型:"
,
prop
:
"car
Type
"
prop
:
"car
Brand
"
},
},
{
{
name
:
"车架号(VIN)码:"
,
name
:
"车架号(VIN)码:"
,
prop
:
"
vin
"
prop
:
"
carNo
"
},
},
{
{
name
:
"证件号码:"
,
name
:
"证件号码:"
,
prop
:
"id
CardNum
"
prop
:
"id
Number
"
}
}
]
]
}
}
},
},
computed
:
{
merchantId
()
{
const
info
=
JSON
.
parse
(
this
.
$route
.
query
.
info
)
return
info
.
merchantId
},
merchantName
()
{
const
info
=
JSON
.
parse
(
this
.
$route
.
query
.
info
)
return
info
.
merchantName
}
},
props
:
{},
props
:
{},
mounted
(){
mounted
()
{
console
.
log
(
this
.
$route
,
this
.
merchantId
)
this
.
getEquitySet
()
},
},
methods
:
{
methods
:
{
getEquitySet
()
{
orderFieldSettingList
({
merchantId
:
this
.
merchantId
,
scene
:
0
})
.
then
((
res
)
=>
{
console
.
log
(
res
)
res
.
map
((
item
)
=>
{
this
.
formData
[
item
.
fieldKey
]
=
item
.
isRequired
})
this
.
settingInfo
=
res
// formData
console
.
log
(
this
.
formData
)
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
changeType
(
e
)
{},
changeType
(
e
)
{},
comfirm
()
{
comfirm
()
{
console
.
log
(
this
.
formData
)
console
.
log
(
this
.
formData
)
const
settings
=
this
.
settingInfo
.
map
((
item
)
=>
{
item
.
isRequired
=
this
.
formData
[
item
.
fieldKey
]
return
item
})
const
params
=
{
merchantId
:
this
.
merchantId
,
scene
:
0
,
merchantName
:
this
.
merchantName
,
settings
}
console
.
log
(
params
,
"params"
)
orderFieldSettingUpdate
(
params
)
.
then
((
res
)
=>
{
this
.
notice
.
okTips
(
"操作成功"
)
this
.
cancel
()
console
.
log
(
res
)
})
.
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
},
cancel
()
{
cancel
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
"shopConfig"
,
name
:
"shopConfig"
,
params
:
{
params
:
{
activeName
:
'equitySetting'
activeName
:
"equitySetting"
}
}
})
})
this
.
close
({
tagName
:
"/setWorkorderDetail"
})
this
.
close
({
tagName
:
"/setWorkorderDetail"
})
...
...
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