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 @@
...
@@ -423,9 +423,13 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
inventRecordList
=
toJsonData
(
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
rows
,
res
.
data
this
.
inventRecordList
=
toJsonData
(
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
rows
,
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
meta
.
columns
).
map
(
item
=>
{
.
__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
{
return
{
...
item
,
...
item
,
label
:
`
${
item
.
textField
}
_
${
item
.
param3Field
}
`
,
label
:
`
${
item
.
textField
}
_
${
spec
}
`
,
value
:
item
.
valueField
,
value
:
item
.
valueField
,
name
:
item
.
textField
name
:
item
.
textField
}
}
...
@@ -664,7 +668,7 @@
...
@@ -664,7 +668,7 @@
.title
{
.title
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
width
:
2
0
0
upx
;
width
:
2
2
0
upx
;
align-items
:
center
;
align-items
:
center
;
}
}
...
...
pages/picking/add.vue
View file @
00d3aed2
...
@@ -505,10 +505,14 @@
...
@@ -505,10 +505,14 @@
.
__blocks__
.
invent_code_box_block_id
.
meta
.
columns
)
.
__blocks__
.
invent_code_box_block_id
.
meta
.
columns
)
if
(
list
&&
list
.
length
){
if
(
list
&&
list
.
length
){
this
.
inventRecordList
=
list
.
map
(
item
=>
{
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
{
return
{
...
item
,
...
item
,
label
:
`
${
item
.
textField
}
_
${
item
.
param3Field
}
`
,
label
:
`
${
item
.
textField
}
_
${
spec
}
`
,
value
:
item
.
valueField
,
value
:
item
.
valueField
,
name
:
item
.
textField
name
:
item
.
textField
}
}
...
...
pages/picking/edit.vue
View file @
00d3aed2
...
@@ -70,10 +70,11 @@
...
@@ -70,10 +70,11 @@
<text>
存货名称:
</text>
<text>
存货名称:
</text>
</view>
</view>
<view
v-if=
"orderInfo.status=='0'"
class=
"text-blue"
>
<view
v-if=
"orderInfo.status=='0'"
class=
"text-blue"
>
<picker
@
change=
"onInventRecordChange"
:value=
"inventRecordIndex"
:range=
"inventRecordList"
<picker
@
change=
"onInventRecordChange"
:value=
"inventRecordIndex"
range-key=
"label"
>
:range=
"inventRecordList"
range-key=
"label"
>
<view
class=
"uni-input form-item-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>
<text
class=
"cuIcon-right text-blue"
></text>
</view>
</view>
</picker>
</picker>
...
@@ -129,12 +130,13 @@
...
@@ -129,12 +130,13 @@
<text>
数量:
</text>
<text>
数量:
</text>
</view>
</view>
<view
v-if=
"orderInfo.status=='0'"
class=
"text-blue"
>
<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>
<view
v-else
class=
""
>
<view
v-else
class=
""
>
<text>
{{
Number
(
subListObj
.
invQty
)
||
0
}}
</text>
<text>
{{
Number
(
subListObj
.
invQty
)
||
0
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
...
@@ -144,7 +146,7 @@
...
@@ -144,7 +146,7 @@
<view
class=
""
>
<view
class=
""
>
<text>
{{
Number
(
subListObj
.
invUnitWeight
)
||
0
}}
</text>
<text>
{{
Number
(
subListObj
.
invUnitWeight
)
||
0
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"cu-form-group"
>
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
<view
class=
"title"
>
...
@@ -154,7 +156,7 @@
...
@@ -154,7 +156,7 @@
<text>
{{
Number
(
subListObj
.
invWeight
)
||
0
}}
</text>
<text>
{{
Number
(
subListObj
.
invWeight
)
||
0
}}
</text>
</view>
</view>
</view>
</view>
<!--
<view
class=
"cu-form-group"
>
<!--
<view
class=
"cu-form-group"
>
<view
class=
"title"
>
<view
class=
"title"
>
<text
v-if=
"orderInfo.status=='0'"
class=
"text-xl text-red"
>
*
</text>
<text
v-if=
"orderInfo.status=='0'"
class=
"text-xl text-red"
>
*
</text>
<text>
单价:
</text>
<text>
单价:
</text>
...
@@ -246,7 +248,7 @@
...
@@ -246,7 +248,7 @@
submitType
:
1
,
submitType
:
1
,
otherEnterDate
:
[],
otherEnterDate
:
[],
subList
:
[],
subList
:
[],
inventTypeIndex
:
-
1
,
inventTypeIndex
:
-
1
,
inventTypeBoxList
:
[],
inventTypeBoxList
:
[],
inventTypeBoxEnum
:
{},
inventTypeBoxEnum
:
{},
subListObj
:
{
subListObj
:
{
...
@@ -259,9 +261,9 @@
...
@@ -259,9 +261,9 @@
},
},
id
:
''
,
id
:
''
,
subId
:
''
,
subId
:
''
,
inventRecordList
:[],
inventRecordList
:
[],
inventRecordEnum
:{},
inventRecordEnum
:
{},
inventRecordIndex
:
-
1
inventRecordIndex
:
-
1
};
};
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -274,35 +276,35 @@
...
@@ -274,35 +276,35 @@
},
},
methods
:
{
methods
:
{
onNumChange
(
e
){
onNumChange
(
e
)
{
this
.
subListObj
.
invWeight
=
Number
(
e
)
*
Number
(
this
.
subListObj
.
invUnitWeight
);
this
.
subListObj
.
invWeight
=
Number
(
e
)
*
Number
(
this
.
subListObj
.
invUnitWeight
);
},
},
onPriceChange
(
e
){
onPriceChange
(
e
)
{
this
.
subListObj
.
amount
=
Number
(
e
)
*
Number
(
this
.
subListObj
.
invQty
);
this
.
subListObj
.
amount
=
Number
(
e
)
*
Number
(
this
.
subListObj
.
invQty
);
},
},
onInventRecordChange
(
e
){
onInventRecordChange
(
e
)
{
let
index
=
Number
(
e
.
target
.
value
);
let
index
=
Number
(
e
.
target
.
value
);
if
(
this
.
inventRecordIndex
===
index
)
return
if
(
this
.
inventRecordIndex
===
index
)
return
this
.
inventRecordIndex
=
index
;
this
.
inventRecordIndex
=
index
;
let
list
=
this
.
inventRecordList
[
this
.
inventRecordIndex
];
let
list
=
this
.
inventRecordList
[
this
.
inventRecordIndex
];
this
.
subListObj
.
inventType
=
list
.
param1Field
;
this
.
subListObj
.
inventType
=
list
.
param1Field
;
this
.
subListObj
.
inventRecordId
=
list
.
param2Field
;
this
.
subListObj
.
inventRecordId
=
list
.
param2Field
;
this
.
subListObj
.
invSpec
=
list
.
param3Field
;
this
.
subListObj
.
invSpec
=
list
.
param3Field
;
this
.
subListObj
.
invLength
=
list
.
param4Field
;
this
.
subListObj
.
invLength
=
list
.
param4Field
;
this
.
subListObj
.
invWidth
=
list
.
param5Field
;
this
.
subListObj
.
invWidth
=
list
.
param5Field
;
this
.
subListObj
.
invThick
=
list
.
param6Field
;
this
.
subListObj
.
invThick
=
list
.
param6Field
;
this
.
subListObj
.
invQty
=
list
.
param7Field
;
this
.
subListObj
.
invQty
=
list
.
param7Field
;
this
.
subListObj
.
invUnitWeight
=
list
.
param8Field
;
this
.
subListObj
.
invUnitWeight
=
list
.
param8Field
;
this
.
subListObj
.
invWeight
=
list
.
param9Field
;
this
.
subListObj
.
invWeight
=
list
.
param9Field
;
this
.
subListObj
.
inventTypeDetail
=
list
.
param10Field
!==
'null'
?
list
.
param10Field
:
'0'
;
this
.
subListObj
.
inventTypeDetail
=
list
.
param10Field
!==
'null'
?
list
.
param10Field
:
'0'
;
this
.
subListObj
.
inventName
=
list
.
textField
;
this
.
subListObj
.
inventName
=
list
.
textField
;
this
.
subListObj
.
inventCode
=
list
.
value
this
.
subListObj
.
inventCode
=
list
.
value
this
.
subListObj
.
price
=
0
this
.
subListObj
.
price
=
0
this
.
subListObj
.
amount
=
0
this
.
subListObj
.
amount
=
0
this
.
$forceUpdate
();
this
.
$forceUpdate
();
},
},
onSubmit
(
t
)
{
onSubmit
(
t
)
{
...
@@ -318,40 +320,40 @@
...
@@ -318,40 +320,40 @@
this
.
show
=
false
;
this
.
show
=
false
;
if
(
this
.
submitType
==
1
)
{
if
(
this
.
submitType
==
1
)
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
"加载中..."
title
:
"加载中..."
})
})
saveSubList
({
saveSubList
({
...
this
.
subListObj
,
...
this
.
subListObj
,
receiveId
:
this
.
id
,
receiveId
:
this
.
id
,
receiveType
:
0
,
receiveType
:
0
,
whCode
:
this
.
orderInfo
.
whCode
,
whCode
:
this
.
orderInfo
.
whCode
,
companyCode
:
this
.
orderInfo
.
companyCode
companyCode
:
this
.
orderInfo
.
companyCode
}).
then
(
res
=>
{
}).
then
(
res
=>
{
uni
.
hideLoading
();
uni
.
hideLoading
();
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
"success"
,
icon
:
"success"
,
title
:
"提交成功"
title
:
"提交成功"
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
onBack
();
this
.
onBack
();
},
1500
)
},
1500
)
}
}
})
})
}
else
{
}
else
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
"加载中..."
title
:
"加载中..."
})
})
deleteSubInfo
(
this
.
subListObj
).
then
(
res
=>
{
deleteSubInfo
(
this
.
subListObj
).
then
(
res
=>
{
uni
.
hideLoading
();
uni
.
hideLoading
();
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
if
(
res
.
data
.
__sys__
.
status
===
0
)
{
uni
.
showToast
({
uni
.
showToast
({
icon
:
"success"
,
icon
:
"success"
,
title
:
"提交成功"
title
:
"提交成功"
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
onBack
();
this
.
onBack
();
},
1500
)
},
1500
)
}
}
})
})
}
}
...
@@ -392,14 +394,12 @@
...
@@ -392,14 +394,12 @@
value
:
item
.
valueField
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
)
{
if
(
list
&&
list
.
length
)
{
this
.
orderInfo
=
list
[
0
];
this
.
orderInfo
=
list
[
0
];
}
}
this
.
onGetInventInfo
();
this
.
onGetInventInfo
();
if
(
this
.
subId
){
this
.
onGetSubList
();
}
})
})
},
},
onGetSubList
()
{
onGetSubList
()
{
...
@@ -411,29 +411,42 @@
...
@@ -411,29 +411,42 @@
id
:
this
.
subId
id
:
this
.
subId
}).
then
(
res
=>
{
}).
then
(
res
=>
{
uni
.
hideLoading
()
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
)
{
if
(
list
.
length
&&
this
.
subId
)
{
this
.
subListObj
=
list
.
find
(
item
=>
item
.
id
===
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
({
getInventInfo
({
whCode
:
this
.
orderInfo
.
whCode
,
whCode
:
this
.
orderInfo
.
whCode
,
companyCode
:
this
.
orderInfo
.
companyCode
companyCode
:
this
.
orderInfo
.
companyCode
}).
then
(
res
=>
{
}).
then
(
res
=>
{
let
list
=
toJsonData
(
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
rows
,
res
.
data
.
__blocks__
this
.
inventRecordList
=
toJsonData
(
res
.
data
.
__blocks__
.
invent_code_box_block_id
.
rows
,
res
.
data
.
invent_code_box_block_id
.
meta
.
columns
)
.
__blocks__
.
invent_code_box_block_id
.
meta
.
columns
).
map
(
item
=>
{
if
(
list
&&
list
.
length
)
{
this
.
inventRecordEnum
[
item
.
valueField
]
=
`
${
item
.
textField
}
_
${
item
.
param3Field
}
`
this
.
inventRecordList
=
list
.
map
(
item
=>
{
return
{
let
spec
=
item
.
param3Field
;
...
item
,
if
(
!
spec
.
trim
())
{
label
:
`
${
item
.
textField
}
_
${
item
.
param3Field
}
`
,
spec
=
value
:
item
.
valueField
,
`
${
Number
(
item
.
param4Field
)}
*
${
Number
(
item
.
param5Field
)}
*
${
Number
(
item
.
param6Field
)}
`
name
:
item
.
textField
}
}
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 @@
...
@@ -660,11 +673,12 @@
.cu-form-group
{
.cu-form-group
{
height
:
32px
;
height
:
32px
;
min-height
:
32px
;
min-height
:
32px
;
padding
:
1px
10px
1px
30
upx
;
padding
:
1px
10px
1px
30
upx
;
.title
{
.title
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
width
:
2
00
upx
;
width
:
2
36
upx
;
align-items
:
center
;
align-items
:
center
;
}
}
}
}
...
@@ -683,6 +697,7 @@
...
@@ -683,6 +697,7 @@
width
:
100vw
;
width
:
100vw
;
height
:
120
upx
;
height
:
120
upx
;
margin-bottom
:
100
upx
;
margin-bottom
:
100
upx
;
.btn-box
{
.btn-box
{
width
:
80%
;
width
:
80%
;
}
}
...
@@ -749,7 +764,8 @@
...
@@ -749,7 +764,8 @@
width
:
100%
;
width
:
100%
;
padding
:
24
upx
36
upx
;
padding
:
24
upx
36
upx
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
z-index
:
8
;
z-index
:
8
;
.cu-btn
{
.cu-btn
{
display
:
flex
;
display
:
flex
;
flex
:
1
;
flex
:
1
;
...
@@ -762,7 +778,12 @@
...
@@ -762,7 +778,12 @@
display
:
flex
;
display
:
flex
;
background-color
:
transparent
;
background-color
:
transparent
;
justify-content
:
center
;
justify-content
:
center
;
.cu-form-group{
padding
:
2px
20
upx
2
upx
20
upx
;
.title{
width
:
200
upx
;
}
}
}
}
}
}
...
@@ -774,15 +795,18 @@
...
@@ -774,15 +795,18 @@
box-shadow
:
0
4
upx
6
upx
rgba
(
0
,
0
,
0
,
0.34
);
box-shadow
:
0
4
upx
6
upx
rgba
(
0
,
0
,
0
,
0.34
);
margin-bottom
:
120
upx
;
margin-bottom
:
120
upx
;
}
}
.form-item-label
{
.form-item-label
{
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
.text-blue{
.text-blue
{
white-space
:
normal
;
white-space
:
normal
;
}
}
}
}
.cu-form-group
uni-picker
::after
{
.cu-form-group
uni-picker
::after
{
color
:
transparent
;
color
:
transparent
;
}
}
</
style
>
</
style
>
\ No newline at end of file
pages/picking/index.vue
View file @
00d3aed2
...
@@ -802,6 +802,12 @@
...
@@ -802,6 +802,12 @@
display
:
flex
;
display
:
flex
;
background-color
:
transparent
;
background-color
:
transparent
;
justify-content
:
center
;
justify-content
:
center
;
.cu-form-group{
padding
:
2px
20
upx
2
upx
20
upx
;
.title{
width
:
252
upx
;
}
}
}
}
.form-content-box
:last-child
{
.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