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) => {
...
@@ -119,6 +119,11 @@ export const getList = (params,pageData) => {
return
http
.
post
(
url
,
d
)
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
)
=>
{
export
const
getSubList
=
(
params
,
pageData
)
=>
{
let
url
=
`/service/S_SC_RW_06`
let
url
=
`/service/S_SC_RW_06`
...
...
pages/inspection/index.vue
View file @
59067845
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
countData
:{}
countData
:{}
};
};
},
},
on
Load
(
option
)
{
on
Show
(
)
{
this
.
pageData
.
offset
=
0
;
this
.
pageData
.
offset
=
0
;
this
.
onLoading
();
this
.
onLoading
();
},
},
...
...
pages/product-order/edit.vue
View file @
59067845
...
@@ -93,7 +93,18 @@
...
@@ -93,7 +93,18 @@
placeholder=
"请输入任务数量"
placeholder=
"请输入任务数量"
border=
"surround"
border=
"surround"
:disabled=
"true"
: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>
></u--input>
</view>
</view>
<view
class=
"flex-col"
>
<view
class=
"flex-col"
>
...
@@ -111,7 +122,31 @@
...
@@ -111,7 +122,31 @@
<u--input
<u--input
placeholder=
"请输入报工数量"
placeholder=
"请输入报工数量"
border=
"surround"
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>
></u--input>
</view>
</view>
...
@@ -125,7 +160,6 @@
...
@@ -125,7 +160,6 @@
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"flex-col content-part-1"
>
<view
class=
"flex-col content-part-1"
>
...
@@ -149,6 +183,7 @@
...
@@ -149,6 +183,7 @@
}
from
"@/utils/tools.js"
;
}
from
"@/utils/tools.js"
;
import
moment
from
"@/common/moment.js"
;
import
moment
from
"@/common/moment.js"
;
import
{
import
{
getList2
,
orderSave
orderSave
}
from
"@/api/product-order.js"
;
}
from
"@/api/product-order.js"
;
...
@@ -163,19 +198,47 @@
...
@@ -163,19 +198,47 @@
queryData
:
{},
queryData
:
{},
minDate
:
moment
().
subtract
(
1
,
'M'
).
format
(
"YYYY-MM-DD"
),
minDate
:
moment
().
subtract
(
1
,
'M'
).
format
(
"YYYY-MM-DD"
),
fileList
:
[],
fileList
:
[],
id
:
''
,
tipShow
:
false
};
};
},
},
onLoad
()
{
onLoad
(
option
)
{
const
eventChannel
=
this
.
getOpenerEventChannel
();
if
(
option
&&
option
.
id
){
eventChannel
.
on
(
'acceptDataFromOpenerPage'
,
(
data
)
=>
{
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
=
{
this
.
orderInfo
=
{
...
data
.
data
,
...
rows
[
0
]
,
registerDate
:
data
.
data
.
registerDate
?
data
.
data
.
registerDate
:
moment
().
format
(
"YYYY-MM-DD"
)
,
quantity
:
rows
[
0
].
unregisterQuantity
,
finishQuantity
:
''
weight
:
Number
(
rows
[
0
].
unregisterQuantity
)
*
Number
(
rows
[
0
].
singleWeight
)
};
};
}
}
})
})
},
},
methods
:
{
// 删除图片
// 删除图片
deletePic
(
event
)
{
deletePic
(
event
)
{
this
.
fileList
.
splice
(
event
.
index
,
1
)
this
.
fileList
.
splice
(
event
.
index
,
1
)
...
@@ -214,6 +277,13 @@
...
@@ -214,6 +277,13 @@
this
.
show2
=
true
;
this
.
show2
=
true
;
},
},
onOpenTip
(){
onOpenTip
(){
if
(
Number
(
this
.
orderInfo
.
quantity
)
>
Number
(
this
.
orderInfo
.
unregisterQuantity
)
&&
!
this
.
orderInfo
.
exceedReason
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请输入超报原因"
})
return
}
this
.
show
=
true
;
this
.
show
=
true
;
},
},
onCancel
(){
onCancel
(){
...
@@ -231,9 +301,23 @@
...
@@ -231,9 +301,23 @@
title
:
"提交中..."
title
:
"提交中..."
})
})
orderSave
({
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"
),
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
():
''
docId
:
this
.
fileList
&&
this
.
fileList
.
length
?
this
.
fileList
.
map
(
item
=>
item
.
id
).
join
():
''
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
__sys__
.
status
===
0
){
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 @@
...
@@ -54,9 +54,9 @@
<view
class=
"header-title"
>
<view
class=
"header-title"
>
<image
src=
"../../static/icon5.png"
mode=
"widthFix"
></image>
<image
src=
"../../static/icon5.png"
mode=
"widthFix"
></image>
<view
class=
"flex-between"
>
<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"
>
<view
class=
"text-blue"
>
<text
class=
""
>
明细
</text>
<text
class=
""
>
详情
</text>
<text
class=
"cuIcon-right"
></text>
<text
class=
"cuIcon-right"
></text>
</view>
</view>
...
@@ -322,10 +322,7 @@
...
@@ -322,10 +322,7 @@
},
},
onNavToOrderInfo
(
val
){
onNavToOrderInfo
(
val
){
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`/pages/product-order/index?id=`
+
val
.
id
,
url
:
`/pages/product-order/index?id=`
+
val
.
id
success
:
(
res
)
=>
{
res
.
eventChannel
.
emit
(
'acceptDataFromOpenerPage'
,
{
data
:
val
})
}
})
})
}
}
}
}
...
...
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