Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
03cf1515
Commit
03cf1515
authored
Jul 15, 2022
by
黄卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
储位选择弹窗 交互
parent
3a60611b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
164 additions
and
19 deletions
+164
-19
index.vue
src/views/ecw/order/index.vue
+2
-0
warehouse-area-dialog.vue
...cw/order/warehousing/components/warehouse-area-dialog.vue
+149
-14
index.vue
src/views/ecw/order/warehousing/index.vue
+13
-5
No files found.
src/views/ecw/order/index.vue
View file @
03cf1515
...
@@ -130,6 +130,8 @@
...
@@ -130,6 +130,8 @@
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:order:update']"
>
编辑
</el-button>
v-hasPermi=
"['ecw:order:update']"
>
编辑
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"$router.push('/order/warehousing?id=' + scope.row.orderId)"
v-hasPermi=
"['ecw:order:update']"
>
入仓
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:order:update']"
>
退仓
</el-button>
v-hasPermi=
"['ecw:order:update']"
>
退仓
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
...
...
src/views/ecw/order/warehousing/components/warehouse-area-dialog.vue
View file @
03cf1515
...
@@ -6,16 +6,16 @@
...
@@ -6,16 +6,16 @@
width=
"600px"
width=
"600px"
:before-close=
"handleClose()"
:before-close=
"handleClose()"
>
>
<el-tabs
v-model=
"activeName"
type=
"card"
>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"activeWarehouse =
{}"
>
<el-tab-pane
:label=
"item.name"
:name=
"'' + index"
v-for=
"(item, index) in area"
:key=
"index"
>
<el-tab-pane
:label=
"item.name"
:name=
"'' + index"
v-for=
"(item, index) in area"
:key=
"index"
>
<div>
<div>
<div
style=
"text-align: center"
>
区域
</div>
<div
style=
"text-align: center"
>
区域
</div>
<div
style=
"background-color: #efefef;padding: 10px 10px 0;border: #dcdcdc solid 1px;border-radius: 2px"
>
<div
style=
"background-color: #efefef;padding: 10px 10px 0;border: #dcdcdc solid 1px;border-radius: 2px"
>
<el-row
:gutter=
"
1
0"
>
<el-row
:gutter=
"
2
0"
>
<el-col
:span=
"12"
v-for=
"(warehouse, i) in item.children"
:key=
"i"
>
<el-col
:span=
"12"
v-for=
"(warehouse, i) in item.children"
:key=
"i"
>
<div
<div
class=
"warehouse-block
warehouse-block-selected
"
class=
"warehouse-block"
:class=
"
{
active: selected.find(domain => domain.pid === warehouse.id)
}"
:class=
"
{
'warehouse-block-selected': warehouse.selected, 'warehouse-block-active': warehouse.id === activeWarehouse.id
}"
@click="handleSelectWarehouse(warehouse)"
@click="handleSelectWarehouse(warehouse)"
>
>
{{
warehouse
.
name
}}
{{
warehouse
.
name
}}
...
@@ -26,10 +26,20 @@
...
@@ -26,10 +26,20 @@
</div>
</div>
<div>
<div>
<div
style=
"text-align: center"
>
仓位
</div>
<div
style=
"text-align: center"
>
仓位
</div>
<div
class=
"position-group"
>
<div
class=
"position"
v-for=
"position in activeWarehouse.positionList"
:key=
"item.id"
>
<div
class=
"position-item"
v-for=
"item in position.children"
@
click=
"handleSelectPosition(item)"
:class=
"
{'position-item-active': item.selected}">
{{
item
.
code
}}
</div>
</div>
</div>
</div>
</div>
<el-divider></el-divider>
<el-divider></el-divider>
已选择:
已选择:
{{
selected
.
join
(
'
,
'
)
}}
<el-divider></el-divider>
<el-divider></el-divider>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
...
@@ -58,9 +68,12 @@ export default {
...
@@ -58,9 +68,12 @@ export default {
opened
:
false
,
opened
:
false
,
key
:
0
,
key
:
0
,
orderId
:
''
,
area
:
[],
area
:
[],
activeName
:
'
0
'
,
activeName
:
'
0
'
,
selected
:
[]
selectedWarehouse
:
[],
selectedPosition
:
[],
activeWarehouse
:
{}
};
};
},
},
...
@@ -82,7 +95,46 @@ export default {
...
@@ -82,7 +95,46 @@ export default {
methods
:
{
methods
:
{
handleClose
()
{},
handleClose
()
{},
handleSelectWarehouse
(
warehouse
)
{
handleSelectWarehouse
(
warehouse
)
{
console
.
log
(
warehouse
)
this
.
activeWarehouse
=
warehouse
if
(
!!
warehouse
.
selected
)
{
warehouse
.
selected
=
false
}
else
{
warehouse
.
selected
=
true
// 区域被选,清空该区域下的位置
warehouse
.
positionList
.
forEach
(
g
=>
{
g
.
children
.
forEach
(
k
=>
{
k
.
selected
=
false
})
})
}
},
handleSelectPosition
(
position
)
{
if
(
!!
position
.
selected
)
{
position
.
selected
=
false
// 反选位置时,检查父区域下是否所有位置被反选,若是,选父区域
const
parentAre
=
this
.
area
.
find
(
e
=>
e
.
id
===
position
.
domainId
).
children
.
find
(
f
=>
f
.
id
===
position
.
areaId
)
if
(
!
parentAre
.
selected
)
{
// 检查父区域下是否所有位置被反选
let
hasSelected
=
false
parentAre
.
positionList
.
forEach
(
g
=>
{
// 位置
g
.
children
.
forEach
(
k
=>
{
// 子位置
if
(
k
.
selected
)
hasSelected
=
true
})
})
// 所有子位置被反选,选父区域
if
(
!
hasSelected
)
parentAre
.
selected
=
true
}
}
else
{
position
.
selected
=
true
// 选位置时,父区域反选
this
.
area
.
find
(
e
=>
e
.
id
===
position
.
domainId
).
children
.
find
(
f
=>
f
.
id
===
position
.
areaId
).
selected
=
false
}
}
}
},
},
...
@@ -92,9 +144,48 @@ export default {
...
@@ -92,9 +144,48 @@ export default {
}
}
getByWarehouseId
().
then
(
r
=>
{
getByWarehouseId
().
then
(
r
=>
{
this
.
area
=
r
.
data
const
area
=
r
.
data
area
.
forEach
(
e
=>
{
// 仓库
e
.
children
.
forEach
(
f
=>
{
// 区域
f
.
selected
=
false
f
.
positionList
.
forEach
(
g
=>
{
// 位置
g
.
children
.
forEach
(
k
=>
{
// 子位置
k
.
selected
=
false
})
})
})
})
this
.
area
=
area
})
})
},
},
computed
:
{
selected
()
{
const
result
=
[]
this
.
area
.
forEach
(
e
=>
{
// 仓库
e
.
children
.
forEach
(
f
=>
{
// 区域
if
(
f
.
selected
)
result
.
push
(
f
.
code
)
f
.
positionList
.
forEach
(
g
=>
{
// 位置
g
.
children
.
forEach
(
k
=>
{
// 子位置
if
(
k
.
selected
)
result
.
push
(
k
.
code
)
})
})
})
})
return
result
}
}
}
}
</
script
>
</
script
>
...
@@ -105,14 +196,58 @@ export default {
...
@@ -105,14 +196,58 @@ export default {
height
:
42px
;
height
:
42px
;
line-height
:
42px
;
line-height
:
42px
;
text-align
:
center
;
text-align
:
center
;
margin-bottom
:
1
0
px
;
margin-bottom
:
1
5
px
;
cursor
:
pointer
;
cursor
:
pointer
;
transition
:
0.5s
;
box-shadow
:
#bfbfbf
3px
3px
14px
0
;
}
}
.warehouse-block
:hover
,
.warehouse-block
.active
{
.warehouse-block
:hover
{
color
:
#ffffff
;
opacity
:
0.9
;
background-color
:
#388fe5
;
transition
:
0.5s
;
transform
:
scale
(
1.02
);
box-shadow
:
#8f8f8f
7px
5px
14px
0
;
}
.warehouse-block-active
{
box-shadow
:
#7e9dbd
7px
5px
14px
0
;
transform
:
scale
(
1.04
);
}
}
.warehouse-block-selected
{
.warehouse-block-selected
{
border
:
#388fe5
solid
5px
;
color
:
#ffffff
;
background-color
:
#4085e3
;
}
.position-group
{
display
:
flex
;
background-color
:
#EFEFEF
;
border
:
1px
#EFEFEF
solid
;
gap
:
1px
;
min-height
:
64px
;
}
.position
{
width
:
20%
;
height
:
64px
;
display
:
flex
;
flex-direction
:
column
;
gap
:
1px
;
}
.position-item
{
width
:
100%
;
background-color
:
#FFFFFF
;
flex
:
1
;
cursor
:
pointer
;
text-align
:
center
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.position-item
:hover
{
background-color
:
#d7dbe3
;
}
.position-item-active
{
background-color
:
#4085e3
;
color
:
white
;
}
.position-item-active
:hover
{
background-color
:
#4085e3
;
opacity
:
0.8
;
}
}
</
style
>
</
style
>
src/views/ecw/order/warehousing/index.vue
View file @
03cf1515
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<h2>
入仓操作-
NC1231231N
</h2>
<h2>
入仓操作-
{{
order
.
orderNo
}}
</h2>
<order-base-info
:order=
"order"
></order-base-info>
<order-base-info
:order=
"order"
></order-base-info>
<div
style=
"margin-top:
1
0px"
>
<div
style=
"margin-top:
2
0px"
>
<span>
储位:
</span><el-button
type=
"primary"
size=
"mini"
>
选择
</el-button>
<span>
储位:
</span><el-button
type=
"primary"
size=
"mini"
@
click=
"areaVisible = true"
>
选择
</el-button>
</div>
</div>
<h2>
货物信息
</h2>
<h2>
货物信息
</h2>
...
@@ -154,6 +154,8 @@
...
@@ -154,6 +154,8 @@
<el-button
type=
"primary"
>
完成入仓
</el-button>
<el-button
type=
"primary"
>
完成入仓
</el-button>
</div>
</div>
</el-form>
</el-form>
<warehouse-area-dialog
:visible.sync=
"areaVisible"
></warehouse-area-dialog>
</div>
</div>
</template>
</template>
...
@@ -161,20 +163,26 @@
...
@@ -161,20 +163,26 @@
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
import
{
getOrder
}
from
"
@/api/ecw/order
"
import
{
getOrder
}
from
"
@/api/ecw/order
"
import
orderBaseInfo
from
"
@/views/ecw/order/warehousing/components/orderBaseInfo
"
import
orderBaseInfo
from
"
@/views/ecw/order/warehousing/components/orderBaseInfo
"
import
WarehouseAreaDialog
from
'
@/views/ecw/order/warehousing/components/warehouse-area-dialog
'
export
default
{
export
default
{
name
:
"
Warehousing
"
,
name
:
"
Warehousing
"
,
components
:
{
components
:
{
orderBaseInfo
orderBaseInfo
,
WarehouseAreaDialog
},
},
mounted
()
{
mounted
()
{
if
(
this
.
$route
.
query
.
id
){
this
.
orderId
=
this
.
$route
.
query
.
id
getOrder
(
this
.
orderId
).
then
(
r
=>
this
.
order
=
r
.
data
)
}
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getCurrencyList
().
then
(
res
=>
this
.
currencyList
=
res
.
data
)
getOrder
(
15
).
then
(
r
=>
this
.
order
=
r
.
data
)
},
},
data
()
{
data
()
{
return
{
return
{
areaVisible
:
false
,
form
:
{
form
:
{
a
:
''
,
a
:
''
,
b
:
3
b
:
3
...
...
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