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
59067845
Commit
59067845
authored
Aug 16, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节优化
parent
dfcad55f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
167 additions
and
154 deletions
+167
-154
product-order.js
api/product-order.js
+5
-0
index.vue
pages/inspection/index.vue
+1
-1
edit.vue
pages/product-order/edit.vue
+96
-12
index.vue
pages/product-order/index.vue
+62
-135
list.vue
pages/product-order/list.vue
+3
-6
No files found.
api/product-order.js
View file @
59067845
...
...
@@ -119,6 +119,11 @@ export const getList = (params,pageData) => {
return
http
.
post
(
url
,
d
)
}
export
const
getList2
=
(
params
,
pageData
)
=>
{
let
url
=
`/service/S_SC_RW_02`
let
d
=
setParamsData
(
params
,
pageData
)
return
http
.
post
(
url
,
d
)
}
export
const
getSubList
=
(
params
,
pageData
)
=>
{
let
url
=
`/service/S_SC_RW_06`
...
...
pages/inspection/index.vue
View file @
59067845
...
...
@@ -228,7 +228,7 @@
countData
:{}
};
},
on
Load
(
option
)
{
on
Show
(
)
{
this
.
pageData
.
offset
=
0
;
this
.
onLoading
();
},
...
...
pages/product-order/edit.vue
View file @
59067845
...
...
@@ -93,7 +93,18 @@
placeholder=
"请输入任务数量"
border=
"surround"
:disabled=
"true"
v-model=
"orderInfo.quantity"
v-model=
"orderInfo.taskQuantity"
></u--input>
</view>
<view
class=
"flex-col"
>
<view
class=
"margin-sm"
>
<text
class=
"text-black text-title text-lg"
>
任务重量:
</text>
</view>
<u--input
placeholder=
"请输入任务数量"
border=
"surround"
:disabled=
"true"
v-model=
"orderInfo.taskWeight"
></u--input>
</view>
<view
class=
"flex-col"
>
...
...
@@ -111,7 +122,31 @@
<u--input
placeholder=
"请输入报工数量"
border=
"surround"
v-model=
"orderInfo.finishQuantity"
v-model=
"orderInfo.quantity"
@
change=
"onChange"
></u--input>
</view>
<view
class=
"flex-col"
>
<view
class=
"margin-sm"
>
<text
class=
"text-black text-title text-lg"
>
报工重量:
</text>
</view>
<u--input
placeholder=
"请输入报工重量"
border=
"surround"
:disabled=
"true"
v-model=
"orderInfo.weight"
></u--input>
</view>
<view
v-if=
"tipShow"
class=
"flex-col"
>
<view
class=
"margin-sm"
>
<text
class=
"text-red"
>
*
</text>
<text
class=
"text-black text-title text-lg"
>
超报原因:
</text>
</view>
<u--input
placeholder=
"请输入超报原因"
border=
"surround"
v-model=
"orderInfo.exceedReason"
></u--input>
</view>
...
...
@@ -125,7 +160,6 @@
</view>
</view>
</view>
</view>
<view
class=
"flex-col content-part-1"
>
...
...
@@ -149,6 +183,7 @@
}
from
"@/utils/tools.js"
;
import
moment
from
"@/common/moment.js"
;
import
{
getList2
,
orderSave
}
from
"@/api/product-order.js"
;
...
...
@@ -163,19 +198,47 @@
queryData
:
{},
minDate
:
moment
().
subtract
(
1
,
'M'
).
format
(
"YYYY-MM-DD"
),
fileList
:
[],
id
:
''
,
tipShow
:
false
};
},
onLoad
()
{
const
eventChannel
=
this
.
getOpenerEventChannel
();
eventChannel
.
on
(
'acceptDataFromOpenerPage'
,
(
data
)
=>
{
onLoad
(
option
)
{
if
(
option
&&
option
.
id
){
this
.
id
=
option
.
id
this
.
onLoading
()
}
},
methods
:
{
onChange
(
e
){
console
.
log
(
e
,
99999
)
this
.
orderInfo
.
weight
=
e
*
Number
(
this
.
orderInfo
.
singleWeight
);
if
(
e
>
Number
(
this
.
orderInfo
.
unregisterQuantity
)){
this
.
tipShow
=
true
}
else
{
this
.
tipShow
=
false
this
.
orderInfo
.
exceedReason
=
''
}
},
onLoading
(){
uni
.
showLoading
({
title
:
"加载中"
})
getList2
({
taskId
:
this
.
id
}).
then
(
res
=>
{
uni
.
hideLoading
();
if
(
res
.
data
.
__sys__
.
status
===
0
){
let
rows
=
toJsonData
(
res
.
data
.
__blocks__
.
result
.
rows
,
res
.
data
.
__blocks__
.
result
.
meta
.
columns
)
if
(
rows
&&
rows
.
length
){
this
.
orderInfo
=
{
...
data
.
data
,
registerDate
:
data
.
data
.
registerDate
?
data
.
data
.
registerDate
:
moment
().
format
(
"YYYY-MM-DD"
)
,
finishQuantity
:
''
...
rows
[
0
]
,
quantity
:
rows
[
0
].
unregisterQuantity
,
weight
:
Number
(
rows
[
0
].
unregisterQuantity
)
*
Number
(
rows
[
0
].
singleWeight
)
};
}
}
})
},
methods
:
{
// 删除图片
deletePic
(
event
)
{
this
.
fileList
.
splice
(
event
.
index
,
1
)
...
...
@@ -214,6 +277,13 @@
this
.
show2
=
true
;
},
onOpenTip
(){
if
(
Number
(
this
.
orderInfo
.
quantity
)
>
Number
(
this
.
orderInfo
.
unregisterQuantity
)
&&
!
this
.
orderInfo
.
exceedReason
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请输入超报原因"
})
return
}
this
.
show
=
true
;
},
onCancel
(){
...
...
@@ -231,9 +301,23 @@
title
:
"提交中..."
})
orderSave
({
taskId
:
this
.
orderInfo
.
id
,
taskId
:
this
.
id
,
productCode
:
this
.
orderInfo
.
productCode
,
productName
:
this
.
orderInfo
.
productName
,
spec
:
this
.
orderInfo
.
spec
,
length
:
this
.
orderInfo
.
length
,
singleWeight
:
this
.
orderInfo
.
singleWeight
,
taskQuantity
:
this
.
orderInfo
.
taskQuantity
,
taskWeight
:
this
.
orderInfo
.
taskWeight
,
processName
:
this
.
orderInfo
.
processName
,
registeredQuantity
:
this
.
orderInfo
.
taskQuantity
-
this
.
orderInfo
.
unregisterQuantity
,
registeredWeight
:
this
.
orderInfo
.
registeredWeight
,
unregisterQuantity
:
this
.
orderInfo
.
unregisterQuantity
,
unregisterWeight
:
this
.
orderInfo
.
unregisterWeight
,
groupName
:
this
.
orderInfo
.
groupCode
,
quantity
:
this
.
orderInfo
.
quantity
,
exceedReason
:
this
.
orderInfo
.
exceedReason
||
' '
,
registerDate
:
this
.
orderInfo
.
registerDate
||
moment
().
format
(
"YYYY-MM-DD"
),
quantity
:
this
.
orderInfo
.
finishQuantity
,
docId
:
this
.
fileList
&&
this
.
fileList
.
length
?
this
.
fileList
.
map
(
item
=>
item
.
id
).
join
():
''
}).
then
(
res
=>
{
if
(
res
.
data
.
__sys__
.
status
===
0
){
...
...
pages/product-order/index.vue
View file @
59067845
This diff is collapsed.
Click to expand it.
pages/product-order/list.vue
View file @
59067845
...
...
@@ -54,9 +54,9 @@
<view
class=
"header-title"
>
<image
src=
"../../static/icon5.png"
mode=
"widthFix"
></image>
<view
class=
"flex-between"
>
<text
class=
"text-black text-bold"
>
{{
item
.
productName
||
''
}}
</text>
<text
class=
"text-black text-bold"
>
{{
item
.
productName
||
''
}}
-
{{
item
.
productCode
}}
</text>
<view
class=
"text-blue"
>
<text
class=
""
>
明细
</text>
<text
class=
""
>
详情
</text>
<text
class=
"cuIcon-right"
></text>
</view>
...
...
@@ -322,10 +322,7 @@
},
onNavToOrderInfo
(
val
){
uni
.
navigateTo
({
url
:
`/pages/product-order/index?id=`
+
val
.
id
,
success
:
(
res
)
=>
{
res
.
eventChannel
.
emit
(
'acceptDataFromOpenerPage'
,
{
data
:
val
})
}
url
:
`/pages/product-order/index?id=`
+
val
.
id
})
}
}
...
...
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