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
01d7cc6c
Commit
01d7cc6c
authored
Sep 14, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-1.5.0' into test
parents
48c6d3aa
47fd0bc1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
35 deletions
+69
-35
XhParts.vue
src/components/createCom/XhParts.vue
+45
-32
index.vue
src/components/select-parts/index.vue
+7
-1
w-navbar.vue
src/components/w-navbar/w-navbar.vue
+4
-0
parts.vue
src/pages/order/parts.vue
+1
-0
addParts.vue
src/pages/parts/addParts.vue
+3
-1
address.vue
src/pages/parts/address.vue
+9
-1
No files found.
src/components/createCom/XhParts.vue
View file @
01d7cc6c
<!-- ******************* 物料选择 ******************* -->
<!-- ******************* 物料选择 ******************* -->
<
template
>
<
template
>
<view>
<view>
<view
class=
"list u-flex u-row-between"
>
<view
class=
"u-flex load"
v-show=
"loading"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<u-loading
mode=
"circle"
class=
"loading"
></u-loading>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-flex-1 add-parts"
@
click=
"toParts"
v-if=
"!disabled && lists.length > 0"
>
添加物料
<u-icon
name=
"arrow-right"
color=
"#2979ff"
size=
"30"
></u-icon>
</view>
</view>
</view>
<view
class=
"complete-part"
>
<view
v-show=
"!loading"
>
<view
v-if=
"lists.length > 0"
>
<view
class=
"list u-flex u-row-between"
>
<adjust-parts
<!--
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
v-for=
"(item, index) in lists"
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
-->
:key=
"index"
<view
:info=
"item"
class=
"u-flex-1 add-parts"
@
change=
"partsChange($event, index)"
@
click=
"toParts"
@
minusValue=
"minusValue($event, index)"
v-if=
"!disabled && lists.length > 0"
:disabled=
"disabled"
>
></adjust-parts>
添加物料
<u-icon
name=
"arrow-right"
color=
"#2979ff"
size=
"30"
></u-icon>
</view>
<view
class=
"u-flex select-part"
v-else
>
<view
class=
"img"
>
<image
:src=
"noPartsImage"
class=
"part-icon"
/>
</view>
</view>
<view
class=
"u-flex content"
>
</view>
<text
class=
"title"
>
暂无物料信息
</text>
<view
class=
"complete-part"
>
<text
class=
"desc"
>
可选择物料仓物料
</text>
<view
v-if=
"lists.length > 0"
>
<adjust-parts
v-for=
"(item, index) in lists"
:key=
"index"
:info=
"item"
@
change=
"partsChange($event, index)"
@
minusValue=
"minusValue($event, index)"
:disabled=
"disabled"
></adjust-parts>
</view>
</view>
<view
class=
"btn"
>
<view
class=
"u-flex select-part"
v-else
>
<u-button
shape=
"circle"
:custom-style=
"customStyle"
@
click=
"toParts"
>
<view
class=
"img"
>
去选择
<image
:src=
"noPartsImage"
class=
"part-icon"
/>
</u-button>
</view>
<view
class=
"u-flex content"
>
<text
class=
"title"
>
暂无物料信息
</text>
<text
class=
"desc"
>
可选择物料仓物料
</text>
</view>
<view
class=
"btn"
>
<u-button
shape=
"circle"
:custom-style=
"customStyle"
@
click=
"toParts"
:disabled=
"disabled"
>
去选择
</u-button>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -70,6 +75,7 @@ export default {
...
@@ -70,6 +75,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
loading
:
true
,
lists
:
[],
lists
:
[],
}
}
},
},
...
@@ -103,6 +109,7 @@ export default {
...
@@ -103,6 +109,7 @@ export default {
orderNumber
:
this
.
orderNumber
orderNumber
:
this
.
orderNumber
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
loading
=
false
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
const
data
=
res
.
data
||
[]
const
data
=
res
.
data
||
[]
this
.
lists
=
lists
.
map
(
v
=>
{
this
.
lists
=
lists
.
map
(
v
=>
{
...
@@ -112,7 +119,6 @@ export default {
...
@@ -112,7 +119,6 @@ export default {
}
}
return
v
return
v
})
})
console
.
log
(
"this.lists"
,
this
.
lists
)
}
}
})
})
},
},
...
@@ -128,6 +134,7 @@ export default {
...
@@ -128,6 +134,7 @@ export default {
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
this
.
lists
.
splice
(
index
,
1
)
this
.
lists
.
splice
(
index
,
1
)
this
.
valueChange
(
JSON
.
stringify
(
this
.
lists
))
}
else
if
(
res
.
cancel
)
{
}
else
if
(
res
.
cancel
)
{
this
.
partsChange
(
1
,
index
)
this
.
partsChange
(
1
,
index
)
}
}
...
@@ -160,6 +167,12 @@ export default {
...
@@ -160,6 +167,12 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.load
{
width
:
100%
;
.loading
{
margin
:
0
auto
;
}
}
.item-image
{
.item-image
{
width
:
24rpx
;
width
:
24rpx
;
height
:
24rpx
;
height
:
24rpx
;
...
...
src/components/select-parts/index.vue
View file @
01d7cc6c
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<view
class=
"right-content-name u-line-2"
>
{{
info
.
name
}}
</view>
<view
class=
"right-content-name u-line-2"
>
{{
info
.
name
}}
</view>
<view
class=
"right-content-desc u-line-2"
>
{{
info
.
remark
}}
</view>
<view
class=
"right-content-desc u-line-2"
>
{{
info
.
remark
}}
</view>
<view
class=
"u-flex right-content-opera"
>
<view
class=
"u-flex right-content-opera"
>
<view
class=
"no"
v-if=
"
info.max
"
>
<view
class=
"no"
v-if=
"
maxShow
"
>
可用
{{
info
.
max
}}
件
可用
{{
info
.
max
}}
件
</view>
</view>
<view
class=
"num"
>
<view
class=
"num"
>
...
@@ -43,6 +43,12 @@
...
@@ -43,6 +43,12 @@
default
()
{
default
()
{
return
false
return
false
}
}
},
maxShow
:
{
// 是否显示可用数量
type
:
Boolean
,
default
()
{
return
true
}
}
}
},
},
data
()
{
data
()
{
...
...
src/components/w-navbar/w-navbar.vue
View file @
01d7cc6c
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
:is-back=
"isBack"
:is-back=
"isBack"
:is-fixed=
"isFixed"
:is-fixed=
"isFixed"
:title-bold=
"true"
:title-bold=
"true"
:custom-back=
"customBack"
:border-bottom=
"false"
>
:border-bottom=
"false"
>
</u-navbar>
</u-navbar>
</
template
>
</
template
>
...
@@ -61,6 +62,9 @@
...
@@ -61,6 +62,9 @@
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
},
},
customBack
:
{
type
:
Function
}
},
},
data
()
{
data
()
{
return
{
return
{
...
...
src/pages/order/parts.vue
View file @
01d7cc6c
...
@@ -153,6 +153,7 @@ export default {
...
@@ -153,6 +153,7 @@ export default {
skuId
:
v
.
skuId
,
skuId
:
v
.
skuId
,
quantity
:
v
.
quantity
,
quantity
:
v
.
quantity
,
cost
:
v
.
cost
||
0
,
cost
:
v
.
cost
||
0
,
max
:
v
.
max
}
}
})
})
...
...
src/pages/parts/addParts.vue
View file @
01d7cc6c
...
@@ -104,6 +104,7 @@
...
@@ -104,6 +104,7 @@
:key=
"index"
:key=
"index"
:info=
"item"
:info=
"item"
:show-checked=
"false"
:show-checked=
"false"
:maxShow=
"false"
@
numChange=
"numChange($event, item, index)"
@
numChange=
"numChange($event, item, index)"
@
apply=
"apply(item, index)"
@
apply=
"apply(item, index)"
></select-parts>
></select-parts>
...
@@ -383,8 +384,9 @@ export default {
...
@@ -383,8 +384,9 @@ export default {
},
},
// 点击选择三级分类
// 点击选择三级分类
selectModel
(
item
,
index
)
{
selectModel
(
item
,
index
)
{
this
.
scrollModelId
=
''
this
.
scrollModelId
=
`model
${
item
.
id
}
`
this
.
modelId
=
item
.
id
this
.
modelId
=
item
.
id
this
.
showMore
=
false
this
.
lists
=
[]
this
.
lists
=
[]
this
.
pageNumber
=
1
this
.
pageNumber
=
1
this
.
getPartsList
()
this
.
getPartsList
()
...
...
src/pages/parts/address.vue
View file @
01d7cc6c
<
template
>
<
template
>
<view
class=
"u-flex address-wrap"
>
<view
class=
"u-flex address-wrap"
>
<w-navbar
title=
"收货地址"
></w-navbar>
<w-navbar
:customBack=
"customBack"
title=
"收货地址"
></w-navbar>
<view
class=
"lists"
>
<view
class=
"lists"
>
<view
class=
"body"
v-for=
"(item, index) in lists"
:key=
"item.id"
>
<view
class=
"body"
v-for=
"(item, index) in lists"
:key=
"item.id"
>
<w-address
@
editSite=
"toEditSite(item)"
@
selectSite=
"selectSite(item)"
@
setDefault=
"setDefault(item, index)"
@
remove=
"remove(item)"
:info=
"item"
:is-default=
"item.enable === 1"
:showRemove=
"true"
/>
<w-address
@
editSite=
"toEditSite(item)"
@
selectSite=
"selectSite(item)"
@
setDefault=
"setDefault(item, index)"
@
remove=
"remove(item)"
:info=
"item"
:is-default=
"item.enable === 1"
:showRemove=
"true"
/>
...
@@ -47,6 +47,14 @@ export default {
...
@@ -47,6 +47,14 @@ export default {
this
.
getData
();
this
.
getData
();
},
},
methods
:
{
methods
:
{
customBack
()
{
let
pages
=
getCurrentPages
();
let
prevPage
=
pages
[
pages
.
length
-
2
]
prevPage
.
$vm
.
loadAddress
()
this
.
$u
.
route
({
type
:
'back'
})
},
getData
()
{
getData
()
{
this
.
getMineSite
()
this
.
getMineSite
()
},
},
...
...
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