Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-front
Overview
Overview
Details
Activity
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
platform
hg-front
Commits
00d3aed2
Commit
00d3aed2
authored
Sep 04, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
32fc8895
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
116 additions
and
77 deletions
+116
-77
add-sub.vue
pages/picking/add-sub.vue
+6
-2
add.vue
pages/picking/add.vue
+6
-2
edit.vue
pages/picking/edit.vue
+98
-73
index.vue
pages/picking/index.vue
+6
-0
No files found.
pages/picking/add-sub.vue
View file @
00d3aed2
...
...
@@ -423,9 +423,13 @@
}).
then
(
res
=>
{
this
.
inventRecordList
=
toJsonData
(
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
rows
,
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
meta
.
columns
).
map
(
item
=>
{
let
spec
=
item
.
param3Field
;
if
(
!
spec
.
trim
()){
spec
=
`
${
Number
(
item
.
param4Field
)}
*
${
Number
(
item
.
param5Field
)}
*
${
Number
(
item
.
param6Field
)}
`
}
return
{
...
item
,
label
:
`
${
item
.
textField
}
_
${
item
.
param3Field
}
`
,
label
:
`
${
item
.
textField
}
_
${
spec
}
`
,
value
:
item
.
valueField
,
name
:
item
.
textField
}
...
...
@@ -664,7 +668,7 @@
.title
{
display
:
flex
;
flex-direction
:
row
;
width
:
2
0
0
upx
;
width
:
2
2
0
upx
;
align-items
:
center
;
}
...
...
pages/picking/add.vue
View file @
00d3aed2
...
...
@@ -505,10 +505,14 @@
.
__blocks__
.
invent_code_box_block_id
.
meta
.
columns
)
if
(
list
&&
list
.
length
){
this
.
inventRecordList
=
list
.
map
(
item
=>
{
this
.
inventRecordEnum
[
item
.
valueField
]
=
`
${
item
.
textField
}
_
${
item
.
param3Field
}
`
let
spec
=
item
.
param3Field
;
if
(
!
spec
.
trim
()){
spec
=
`
${
Number
(
item
.
param4Field
)}
*
${
Number
(
item
.
param5Field
)}
*
${
Number
(
item
.
param6Field
)}
`
}
this
.
inventRecordEnum
[
item
.
valueField
]
=
`
${
item
.
textField
}
_
${
spec
}
`
return
{
...
item
,
label
:
`
${
item
.
textField
}
_
${
item
.
param3Field
}
`
,
label
:
`
${
item
.
textField
}
_
${
spec
}
`
,
value
:
item
.
valueField
,
name
:
item
.
textField
}
...
...
pages/picking/edit.vue
View file @
00d3aed2
...
...
@@ -70,10 +70,11 @@
<text>
存货名称:
</text>
</view>
<view
v-if=
"orderInfo.status=='0'"
class=
"text-blue"
>
<picker
@
change=
"onInventRecordChange"
:value=
"inventRecordIndex"
:range=
"inventRecordList"
range-key=
"label"
>
<picker
@
change=
"onInventRecordChange"
:value=
"inventRecordIndex"
:range=
"inventRecordList"
range-key=
"label"
>
<view
class=
"uni-input form-item-label"
>
<text
class=
"text-blue"
>
{{
inventRecordIndex
>=
0
?
inventRecordList
[
inventRecordIndex
].
label
:
'请选择存货名称'
}}
</text>
<text
class=
"text-blue"
>
{{
inventRecordIndex
>=
0
?
inventRecordList
[
inventRecordIndex
].
label
:
'请选择存货名称'
}}
</text>
<text
class=
"cuIcon-right text-blue"
></text>
</view>
</picker>
...
...
@@ -129,12 +130,13 @@
<text>
数量:
</text>
</view>
<view
v-if=
"orderInfo.status=='0'"
class=
"text-blue"
>
<u-input
v-model=
"subListObj.invQty"
color=
"#0081ff"
inputAlign=
"right"
@
change=
"onNumChange"
type=
"text"
:border=
"border"
placeholder=
"请输入数量"
/>
<u-input
v-model=
"subListObj.invQty"
color=
"#0081ff"
inputAlign=
"right"
@
change=
"onNumChange"
type=
"text"
:border=
"border"
placeholder=
"请输入数量"
/>
</view>
<view
v-else
class=
""
>
<text>
{{
Number
(
subListObj
.
invQty
)
||
0
}}
</text>
</view>
</view>
<view
class=
"cu-form-group"
>
...
...
@@ -144,7 +146,7 @@
<view
class=
""
>
<text>
{{
Number
(
subListObj
.
invUnitWeight
)
||
0
}}
</text>
</view>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
...
...
@@ -154,7 +156,7 @@
<text>
{{
Number
(
subListObj
.
invWeight
)
||
0
}}
</text>
</view>
</view>
<!--
<view
class=
"cu-form-group"
>
<!--
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
<text
v-if=
"orderInfo.status=='0'"
class=
"text-xl text-red"
>
*
</text>
<text>
单价:
</text>
...
...
@@ -246,7 +248,7 @@
submitType
:
1
,
otherEnterDate
:
[],
subList
:
[],
inventTypeIndex
:
-
1
,
inventTypeIndex
:
-
1
,
inventTypeBoxList
:
[],
inventTypeBoxEnum
:
{},
subListObj
:
{
...
...
@@ -259,9 +261,9 @@
},
id
:
''
,
subId
:
''
,
inventRecordList
:[],
inventRecordEnum
:{},
inventRecordIndex
:
-
1
inventRecordList
:
[],
inventRecordEnum
:
{},
inventRecordIndex
:
-
1
};
},
onLoad
(
option
)
{
...
...
@@ -274,35 +276,35 @@
},
methods
:
{
onNumChange
(
e
){
onNumChange
(
e
)
{
this
.
subListObj
.
invWeight
=
Number
(
e
)
*
Number
(
this
.
subListObj
.
invUnitWeight
);
},
onPriceChange
(
e
){
onPriceChange
(
e
)
{
this
.
subListObj
.
amount
=
Number
(
e
)
*
Number
(
this
.
subListObj
.
invQty
);
},
onInventRecordChange
(
e
){
onInventRecordChange
(
e
)
{
let
index
=
Number
(
e
.
target
.
value
);
if
(
this
.
inventRecordIndex
===
index
)
return
this
.
inventRecordIndex
=
index
;
let
list
=
this
.
inventRecordList
[
this
.
inventRecordIndex
];
this
.
subListObj
.
inventType
=
list
.
param1Field
;
this
.
subListObj
.
inventRecordId
=
list
.
param2Field
;
this
.
subListObj
.
invSpec
=
list
.
param3Field
;
this
.
subListObj
.
invLength
=
list
.
param4Field
;
this
.
subListObj
.
invWidth
=
list
.
param5Field
;
this
.
subListObj
.
invThick
=
list
.
param6Field
;
this
.
subListObj
.
invQty
=
list
.
param7Field
;
this
.
subListObj
.
invUnitWeight
=
list
.
param8Field
;
this
.
subListObj
.
invWeight
=
list
.
param9Field
;
this
.
subListObj
.
inventTypeDetail
=
list
.
param10Field
!==
'null'
?
list
.
param10Field
:
'0'
;
this
.
subListObj
.
inventName
=
list
.
textField
;
this
.
subListObj
.
inventCode
=
list
.
value
this
.
subListObj
.
invSpec
=
list
.
param3Field
;
this
.
subListObj
.
invLength
=
list
.
param4Field
;
this
.
subListObj
.
invWidth
=
list
.
param5Field
;
this
.
subListObj
.
invThick
=
list
.
param6Field
;
this
.
subListObj
.
invQty
=
list
.
param7Field
;
this
.
subListObj
.
invUnitWeight
=
list
.
param8Field
;
this
.
subListObj
.
invWeight
=
list
.
param9Field
;
this
.
subListObj
.
inventTypeDetail
=
list
.
param10Field
!==
'null'
?
list
.
param10Field
:
'0'
;
this
.
subListObj
.
inventName
=
list
.
textField
;
this
.
subListObj
.
inventCode
=
list
.
value
this
.
subListObj
.
price
=
0
this
.
subListObj
.
amount
=
0
this
.
$forceUpdate
();
},
onSubmit
(
t
)
{
...
...
@@ -318,40 +320,40 @@
this
.
show
=
false
;
if
(
this
.
submitType
==
1
)
{
uni
.
showLoading
({
title
:
"加载中..."
title
:
"加载中..."
})
saveSubList
({
saveSubList
({
...
this
.
subListObj
,
receiveId
:
this
.
id
,
receiveType
:
0
,
whCode
:
this
.
orderInfo
.
whCode
,
companyCode
:
this
.
orderInfo
.
companyCode
}).
then
(
res
=>
{
receiveId
:
this
.
id
,
receiveType
:
0
,
whCode
:
this
.
orderInfo
.
whCode
,
companyCode
:
this
.
orderInfo
.
companyCode
}).
then
(
res
=>
{
uni
.
hideLoading
();
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
uni
.
showToast
({
icon
:
"success"
,
title
:
"提交成功"
uni
.
showToast
({
icon
:
"success"
,
title
:
"提交成功"
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
onBack
();
},
1500
)
},
1500
)
}
})
}
else
{
uni
.
showLoading
({
title
:
"加载中..."
title
:
"加载中..."
})
deleteSubInfo
(
this
.
subListObj
).
then
(
res
=>
{
deleteSubInfo
(
this
.
subListObj
).
then
(
res
=>
{
uni
.
hideLoading
();
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
uni
.
showToast
({
icon
:
"success"
,
title
:
"提交成功"
uni
.
showToast
({
icon
:
"success"
,
title
:
"提交成功"
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
onBack
();
},
1500
)
},
1500
)
}
})
}
...
...
@@ -392,14 +394,12 @@
value
:
item
.
valueField
}
});
let
list
=
toJsonData
(
res
.
data
.
__blocks__
.
result
.
rows
,
res
.
data
.
__blocks__
.
result
.
meta
.
columns
);
let
list
=
toJsonData
(
res
.
data
.
__blocks__
.
result
.
rows
,
res
.
data
.
__blocks__
.
result
.
meta
.
columns
);
if
(
list
&&
list
.
length
)
{
this
.
orderInfo
=
list
[
0
];
}
this
.
onGetInventInfo
();
if
(
this
.
subId
){
this
.
onGetSubList
();
}
})
},
onGetSubList
()
{
...
...
@@ -411,29 +411,42 @@
id
:
this
.
subId
}).
then
(
res
=>
{
uni
.
hideLoading
()
let
list
=
toJsonData
(
res
.
data
.
__blocks__
.
result
.
rows
,
res
.
data
.
__blocks__
.
result
.
meta
.
columns
);
let
list
=
toJsonData
(
res
.
data
.
__blocks__
.
result
.
rows
,
res
.
data
.
__blocks__
.
result
.
meta
.
columns
);
if
(
list
.
length
&&
this
.
subId
)
{
this
.
subListObj
=
list
.
find
(
item
=>
item
.
id
===
this
.
subId
);
this
.
inventRecordIndex
=
this
.
inventRecordList
.
findIndex
(
item
=>
item
.
value
===
this
.
subListObj
.
inventCode
);
this
.
inventRecordIndex
=
this
.
inventRecordList
.
findIndex
(
item
=>
item
.
value
===
this
.
subListObj
.
inventCode
);
}
})
},
onGetInventInfo
(){
onGetInventInfo
()
{
getInventInfo
({
whCode
:
this
.
orderInfo
.
whCode
,
companyCode
:
this
.
orderInfo
.
companyCode
whCode
:
this
.
orderInfo
.
whCode
,
companyCode
:
this
.
orderInfo
.
companyCode
}).
then
(
res
=>
{
this
.
inventRecordList
=
toJsonData
(
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
rows
,
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
meta
.
columns
).
map
(
item
=>
{
this
.
inventRecordEnum
[
item
.
valueField
]
=
`
${
item
.
textField
}
_
${
item
.
param3Field
}
`
return
{
...
item
,
label
:
`
${
item
.
textField
}
_
${
item
.
param3Field
}
`
,
value
:
item
.
valueField
,
name
:
item
.
textField
}
});
let
list
=
toJsonData
(
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
rows
,
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
meta
.
columns
)
if
(
list
&&
list
.
length
)
{
this
.
inventRecordList
=
list
.
map
(
item
=>
{
let
spec
=
item
.
param3Field
;
if
(
!
spec
.
trim
())
{
spec
=
`
${
Number
(
item
.
param4Field
)}
*
${
Number
(
item
.
param5Field
)}
*
${
Number
(
item
.
param6Field
)}
`
}
this
.
inventRecordEnum
[
item
.
valueField
]
=
`
${
item
.
textField
}
_
${
spec
}
`
return
{
...
item
,
label
:
`
${
item
.
textField
}
_
${
spec
}
`
,
value
:
item
.
valueField
,
name
:
item
.
textField
}
});
}
if
(
this
.
subId
&&
this
.
inventRecordIndex
===-
1
)
{
this
.
onGetSubList
();
}
})
}
}
...
...
@@ -660,11 +673,12 @@
.cu-form-group
{
height
:
32px
;
min-height
:
32px
;
padding
:
1px
10px
1px
30
upx
;
padding
:
1px
10px
1px
30
upx
;
.title
{
display
:
flex
;
flex-direction
:
row
;
width
:
2
00
upx
;
width
:
2
36
upx
;
align-items
:
center
;
}
}
...
...
@@ -683,6 +697,7 @@
width
:
100vw
;
height
:
120
upx
;
margin-bottom
:
100
upx
;
.btn-box
{
width
:
80%
;
}
...
...
@@ -749,7 +764,8 @@
width
:
100%
;
padding
:
24
upx
36
upx
;
background-color
:
#ffffff
;
z-index
:
8
;
z-index
:
8
;
.cu-btn
{
display
:
flex
;
flex
:
1
;
...
...
@@ -762,7 +778,12 @@
display
:
flex
;
background-color
:
transparent
;
justify-content
:
center
;
.cu-form-group{
padding
:
2px
20
upx
2
upx
20
upx
;
.title{
width
:
200
upx
;
}
}
}
}
...
...
@@ -774,15 +795,18 @@
box-shadow
:
0
4
upx
6
upx
rgba
(
0
,
0
,
0
,
0.34
);
margin-bottom
:
120
upx
;
}
.form-item-label
{
.form-item-label
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
.text-blue{
.text-blue
{
white-space
:
normal
;
}
}
.cu-form-group
uni-picker
::after
{
.cu-form-group
uni-picker
::after
{
color
:
transparent
;
}
</
style
>
\ No newline at end of file
pages/picking/index.vue
View file @
00d3aed2
...
...
@@ -802,6 +802,12 @@
display
:
flex
;
background-color
:
transparent
;
justify-content
:
center
;
.cu-form-group{
padding
:
2px
20
upx
2
upx
20
upx
;
.title{
width
:
252
upx
;
}
}
}
.form-content-box
:last-child
{
...
...
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