Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
67248afc
Commit
67248afc
authored
Jun 24, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 配件选择API对接
parent
755531e2
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
137 additions
and
185 deletions
+137
-185
parts.js
src/common/api/parts.js
+19
-3
adjust.md
src/components/select-parts/adjust.md
+3
-3
adjust.vue
src/components/select-parts/adjust.vue
+1
-1
index.md
src/components/select-parts/index.md
+12
-12
index.vue
src/components/select-parts/index.vue
+4
-4
addParts.vue
src/pages/parts/addParts.vue
+98
-162
No files found.
src/common/api/parts.js
View file @
67248afc
let
partsApiFun
=
function
(
vm
){
let
partsApiFun
=
function
(
vm
){
// 接口公共前缀
// 接口公共前缀
const
prefix
=
'/wxh-worker-rest/rest/'
const
prefix
=
'/wxh-worker-rest/rest/'
let
coverage
=
'/wxh-worker-rest/rest/coverage/'
const
coverage
=
'/wxh-worker-rest/rest/coverage/'
let
parts
=
'/wxh-worker-rest/rest/parts/'
const
parts
=
'/wxh-worker-rest/rest/parts/'
const
base
=
'/wxh-worker-rest/rest/base/'
/**
/**
* 配件申请单-查询网点地址信息
* 配件申请单-查询网点地址信息
*/
*/
let
getSiteAddress
=
async
()
=>
await
vm
.
$u
.
get
(
coverage
+
vm
.
vuex_token
+
'/getSiteAddress'
);
let
getSiteAddress
=
async
()
=>
await
vm
.
$u
.
get
(
coverage
+
vm
.
vuex_token
+
'/getSiteAddress'
);
/**
* 配件过滤-品类列表
*/
let
getCategoryList
=
async
()
=>
await
vm
.
$u
.
get
(
base
+
vm
.
vuex_token
+
'/allow/category/list'
);
/**
* 配件过滤-品牌列表
*/
let
getBrandList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
base
+
vm
.
vuex_token
+
'/allow/brand/list'
,
params
);
/**
* 查询配件列表
*/
let
getPartsList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
parts
+
vm
.
vuex_token
+
'/parts'
,
params
);
const
partsApi
=
{
const
partsApi
=
{
getSiteAddress
getSiteAddress
,
getCategoryList
,
getBrandList
,
getPartsList
}
}
return
partsApi
return
partsApi
}
}
...
...
src/components/select-parts/adjust.md
View file @
67248afc
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
```
json
```
json
{
{
"name"
:
"正泰漏保"
,
//
配件名称
"name"
:
"正泰漏保"
,
//
配件名称
"
num
"
:
1
,
//
配件数量
"
quantity
"
:
1
,
//
配件数量
"min"
:
1
,
//
数量最小值
"min"
:
1
,
//
数量最小值
"max"
:
100
//
数量最大值
"max"
:
100
//
数量最大值
}
}
...
@@ -56,14 +56,14 @@ export default {
...
@@ -56,14 +56,14 @@ export default {
{
{
id
:
1
,
id
:
1
,
name
:
"正泰漏保"
,
name
:
"正泰漏保"
,
num
:
1
,
quantity
:
1
,
min
:
1
,
min
:
1
,
max
:
100
,
max
:
100
,
},
},
{
{
id
:
1
,
id
:
1
,
name
:
"挚达广汽充电桩"
,
name
:
"挚达广汽充电桩"
,
num
:
3
,
quantity
:
3
,
min
:
1
,
min
:
1
,
max
:
5
,
max
:
5
,
},
},
...
...
src/components/select-parts/adjust.vue
View file @
67248afc
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
{{
info
.
name
}}
{{
info
.
name
}}
</view>
</view>
<view
class=
"num"
>
<view
class=
"num"
>
<u-number-box
v-if=
"!disabled"
v-model=
"info.
num"
:min=
"info.min || 0"
:max=
"info.max || info.num
"
@
change=
"numChange"
></u-number-box>
<u-number-box
v-if=
"!disabled"
v-model=
"info.
quantity"
:min=
"info.min || 0"
:max=
"info.max || info.quantity
"
@
change=
"numChange"
></u-number-box>
<text
class=
"nums"
v-else
>
x
{{
info
.
num
||
1
}}
</text>
<text
class=
"nums"
v-else
>
x
{{
info
.
num
||
1
}}
</text>
</view>
</view>
</view>
</view>
...
...
src/components/select-parts/index.md
View file @
67248afc
...
@@ -19,12 +19,12 @@
...
@@ -19,12 +19,12 @@
{
{
id
:
1
,
id
:
1
,
name
:
"正泰漏保"
,
//
名称
name
:
"正泰漏保"
,
//
名称
no
:
'NO.
202006170015
'
,
//
编号
code
:
'NO.
202006170015
'
,
//
编号
desc
:
'这个空开盒子和其他的空开有什么不一样,这里可以写一下'
,
//
描述
remark
:
'这个空开盒子和其他的空开有什么不一样,这里可以写一下'
,
//
描述
num
:
1
,
//
默认数量
quantity
:
1
,
//
默认数量
min
:
1
,
//
数量最小值
min
:
1
,
//
数量最小值
max
:
100
,
//
数量最大值
max
:
100
,
//
数量最大值
im
g
:
"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
,
//
图片
im
ages
:
"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
,
//
图片
checked
:
false
,
//
是否勾选
checked
:
false
,
//
是否勾选
disabled
:
true
//
是否禁用数量调整,如果禁用则会显示添加申请按钮
disabled
:
true
//
是否禁用数量调整,如果禁用则会显示添加申请按钮
}
}
...
@@ -66,24 +66,24 @@ export default {
...
@@ -66,24 +66,24 @@ export default {
{
{
id
:
1
,
id
:
1
,
name
:
"正泰漏保"
,
name
:
"正泰漏保"
,
no
:
'NO.202006170015'
,
code
:
'NO.202006170015'
,
desc
:
'这个空开盒子和其他的空开有什么不一样,这里可以写一下'
,
remark
:
'这个空开盒子和其他的空开有什么不一样,这里可以写一下'
,
num
:
1
,
quantity
:
1
,
min
:
1
,
min
:
1
,
max
:
100
,
max
:
100
,
im
g
:
"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
,
im
age
:
"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
,
checked
:
false
,
checked
:
false
,
disabled
:
true
disabled
:
true
},
},
{
{
id
:
1
,
id
:
1
,
name
:
"挚达广汽充电桩"
,
name
:
"挚达广汽充电桩"
,
no
:
'NO.202006170014'
,
code
:
'NO.202006170014'
,
desc
:
'这个空开盒子和其他的空开有什么不一样,这里可以写一下'
,
remark
:
'这个空开盒子和其他的空开有什么不一样,这里可以写一下'
,
num
:
3
,
quantity
:
3
,
min
:
1
,
min
:
1
,
max
:
5
,
max
:
5
,
im
g
:
"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
,
im
age
:
"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
,
checked
:
false
,
checked
:
false
,
disabled
:
true
disabled
:
true
},
},
...
...
src/components/select-parts/index.vue
View file @
67248afc
...
@@ -5,17 +5,17 @@
...
@@ -5,17 +5,17 @@
</view>
</view>
<view
class=
"u-flex right"
>
<view
class=
"u-flex right"
>
<view
class=
"right-img"
>
<view
class=
"right-img"
>
<u-image
:src=
"info.im
g
"
width=
"200rpx"
height=
"200rpx"
/>
<u-image
:src=
"info.im
ages
"
width=
"200rpx"
height=
"200rpx"
/>
</view>
</view>
<view
class=
"u-flex right-content"
>
<view
class=
"u-flex right-content"
>
<view
class=
"right-content-name"
>
{{
info
.
name
}}
</view>
<view
class=
"right-content-name"
>
{{
info
.
name
}}
</view>
<view
class=
"right-content-desc"
>
{{
info
.
desc
}}
</view>
<view
class=
"right-content-desc"
>
{{
info
.
remark
}}
</view>
<view
class=
"u-flex right-content-opera"
>
<view
class=
"u-flex right-content-opera"
>
<view
class=
"no"
>
<view
class=
"no"
>
{{
info
.
no
}}
{{
info
.
code
}}
</view>
</view>
<view
class=
"num"
>
<view
class=
"num"
>
<u-number-box
v-if=
"!info.disabled"
v-model=
"info.
num"
:min=
"info.min || 0"
:max=
"info.max || info.num
"
@
change=
"numChange"
></u-number-box>
<u-number-box
v-if=
"!info.disabled"
v-model=
"info.
quantity"
:min=
"info.min || 0"
:max=
"info.max || info.quantity
"
@
change=
"numChange"
></u-number-box>
<u-button
v-if=
"info.disabled"
type=
"primary"
size=
"mini"
shape=
"circle"
@
click=
"addApply"
>
加入申请
</u-button>
<u-button
v-if=
"info.disabled"
type=
"primary"
size=
"mini"
shape=
"circle"
@
click=
"addApply"
>
加入申请
</u-button>
</view>
</view>
</view>
</view>
...
...
src/pages/parts/addParts.vue
View file @
67248afc
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment