Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pad
Project
Project
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
ximai
mes-pad
Commits
1ee48538
Commit
1ee48538
authored
Mar 25, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改生产报工加上size和指令页签
parent
82f117ad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
239 additions
and
127 deletions
+239
-127
config.js
common/config.js
+3
-2
index.vue
pages/mes/prodReport/index.vue
+236
-125
No files found.
common/config.js
View file @
1ee48538
...
@@ -21,9 +21,10 @@ const config = {
...
@@ -21,9 +21,10 @@ const config = {
}
}
// 设置后台接口服务的基础地址
// 设置后台接口服务的基础地址
// config.baseUrl = 'http://192.168.25.105:8080';
// config.baseUrl = 'http://192.168.3.91:8080';
config
.
baseUrl
=
'http://192.168.3.91:8080'
;
//测试环境
// config.baseUrl = 'http://192.168.3.91:8080';
//config.baseUrl = "http://101.43.244.58:8080/";
//config.baseUrl = "http://101.43.244.58:8080/";
config
.
baseUrl
=
"/api"
;
//config.baseUrl = "http://101.200.162.168:8080";
//config.baseUrl = "http://101.200.162.168:8080";
export
default
config
;
export
default
config
;
pages/mes/prodReport/index.vue
View file @
1ee48538
...
@@ -109,9 +109,11 @@
...
@@ -109,9 +109,11 @@
@
confirm=
"handleSubmitfeedback"
@
confirm=
"handleSubmitfeedback"
show-cancel-button
show-cancel-button
:title-style=
"
{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
:title-style=
"
{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="
open
"
v-model="
proVisible
"
width="1800rpx"
width="1800rpx"
>
>
<view>
<scroll-view
style=
"max-height:600px;"
scroll-y=
"true"
class=
"scroll-Y"
>
<view
class=
"feedback-card"
v-for=
"(feedback,i) in feedbackForms"
:key=
"i"
>
<view
class=
"feedback-card"
v-for=
"(feedback,i) in feedbackForms"
:key=
"i"
>
<u-form
label-width=
"100px"
:model=
"feedback"
:rules=
"rules"
>
<u-form
label-width=
"100px"
:model=
"feedback"
:rules=
"rules"
>
<u-row>
<u-row>
...
@@ -220,6 +222,19 @@
...
@@ -220,6 +222,19 @@
</u-row>
</u-row>
</view>
</view>
</u-form>
</u-form>
<view>
<u-tabs
:list=
"listTabPro"
:is-scroll=
"false"
:show-bar=
"false"
:current=
"feedback.currentTabPro"
@
change=
"handleChangeTabPro($event, feedback)"
></u-tabs>
<!-- 指令列表 -->
<view
v-show=
"feedback.currentTabPro === 0"
class=
"feedback-card"
>
<zb-table
:columns=
"feedback.tableDirectiveColumn"
:stripe=
"true"
:border=
"true"
:data=
"feedback.tableDirectiveData"
></zb-table>
</view>
<!-- SIZE列表 -->
<view
v-show=
"feedback.currentTabPro === 1"
class=
"feedback-card"
>
<zb-table
:columns=
"feedback.tableSizeColumn"
:stripe=
"true"
:border=
"true"
:data=
"feedback.tableSizeData"
></zb-table>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</u-modal>
</u-modal>
<u-modal
<u-modal
...
@@ -295,7 +310,7 @@
...
@@ -295,7 +310,7 @@
@
confirm=
"newlyAddss()"
@
confirm=
"newlyAddss()"
show-cancel-button
show-cancel-button
:title-style=
"
{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '60px', 'padding-top': '0px' }"
:title-style=
"
{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '60px', 'padding-top': '0px' }"
v-model="
aopen
"
v-model="
errorVisible
"
width="1300rpx"
width="1300rpx"
>
>
<view
class=
"feedback-card"
>
<view
class=
"feedback-card"
>
...
@@ -588,7 +603,7 @@
...
@@ -588,7 +603,7 @@
<zb-table
:columns=
"tableDetailColumn"
:stripe=
"true"
:border=
"true"
:data=
"tableDataDetail"
></zb-table>
<zb-table
:columns=
"tableDetailColumn"
:stripe=
"true"
:border=
"true"
:data=
"tableDataDetail"
></zb-table>
</view>
</view>
</u-modal>
</u-modal>
//查询图片生产工单
<!-- //查询图片生产工单 -->
<u-modal
<u-modal
title=
"生产工单"
title=
"生产工单"
@
confirm=
"materialReturnSave()"
@
confirm=
"materialReturnSave()"
...
@@ -666,6 +681,13 @@ export default {
...
@@ -666,6 +681,13 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
listTabPro
:
[
{
name
:
'指令列表'
},
{
name
:
'SIZE列表'
}
],
tableParams
:
{
tableParams
:
{
allowProduce
:
1
,
allowProduce
:
1
,
workorderCode
:
''
,
workorderCode
:
''
,
...
@@ -688,8 +710,8 @@ export default {
...
@@ -688,8 +710,8 @@ export default {
screenHeight
:
768
,
screenHeight
:
768
,
usePersonData
:
{},
usePersonData
:
{},
title
:
'生产报工'
,
title
:
'生产报工'
,
open
:
false
,
proVisible
:
false
,
aopen
:
false
,
errorVisible
:
false
,
form
:
{},
form
:
{},
feedbackForm
:
{},
feedbackForm
:
{},
tableData
:
[],
tableData
:
[],
...
@@ -1044,6 +1066,9 @@ export default {
...
@@ -1044,6 +1066,9 @@ export default {
uni
.
$off
(
'taskStatusChanged'
);
uni
.
$off
(
'taskStatusChanged'
);
},
},
methods
:
{
methods
:
{
handleChangeTabPro
(
index
,
row
)
{
row
.
currentTabPro
=
index
},
onPreviewTap
(
url
)
{
onPreviewTap
(
url
)
{
uni
.
previewImage
({
uni
.
previewImage
({
current
:
url
,
current
:
url
,
...
@@ -1290,7 +1315,13 @@ export default {
...
@@ -1290,7 +1315,13 @@ export default {
row
.
workorderSoSizeItemId
=
''
;
row
.
workorderSoSizeItemId
=
''
;
row
.
printContents
=
row
.
arrangeCode
row
.
printContents
=
row
.
arrangeCode
row
.
workorderSoDirectiveId
=
''
;
row
.
workorderSoDirectiveId
=
''
;
row
.
tableDirectiveData
=
[]
row
.
tableSizeColumn
=
[]
row
.
tableSizeData
=
[]
return
;
return
;
}
else
{
this
.
getWorkorderDirectiveList
(
id
,
index
)
this
.
getWorkorderSizeList
(
id
,
index
)
}
}
row
.
workorderId
=
id
;
row
.
workorderId
=
id
;
const
items
=
row
.
workorderList
.
find
((
item
)
=>
item
.
workorderId
===
id
);
const
items
=
row
.
workorderList
.
find
((
item
)
=>
item
.
workorderId
===
id
);
...
@@ -1338,7 +1369,7 @@ export default {
...
@@ -1338,7 +1369,7 @@ export default {
});
});
});
});
},
},
getWorkorderWithSizeAndDirective
(
item
)
{
getWorkorderWithSizeAndDirective
(
item
,
index
)
{
this
.
$u
.
api
this
.
$u
.
api
.
getWorkorderWithSizeAndDirective
({
.
getWorkorderWithSizeAndDirective
({
pageNum
:
1
,
pageNum
:
1
,
...
@@ -1347,13 +1378,13 @@ export default {
...
@@ -1347,13 +1378,13 @@ export default {
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
item
.
workorderList
=
res
.
rows
;
item
.
workorderList
=
res
.
rows
;
if
(
res
.
rows
.
length
===
1
)
{
item
.
printContents
=
res
.
rows
[
0
].
workorderCode
}
//如果只关联一个订单,默认选中
//如果只关联一个订单,默认选中
if
(
res
.
rows
.
length
==
1
){
if
(
res
.
rows
.
length
==
1
){
item
.
printContents
=
res
.
rows
[
0
].
workorderCode
item
.
workorderId
=
res
.
rows
[
0
].
workorderId
;
item
.
workorderId
=
res
.
rows
[
0
].
workorderId
;
item
.
workorderCode
=
res
.
rows
[
0
].
workorderCode
;
item
.
workorderCode
=
res
.
rows
[
0
].
workorderCode
;
this
.
getWorkorderDirectiveList
(
res
.
rows
[
0
].
workorderId
,
index
)
this
.
getWorkorderSizeList
(
res
.
rows
[
0
].
workorderId
,
index
)
if
(
res
.
rows
[
0
].
sizeList2
!=
null
){
if
(
res
.
rows
[
0
].
sizeList2
!=
null
){
item
.
sizeList
=
res
.
rows
[
0
].
sizeList2
.
map
(
temp2
=>
{
item
.
sizeList
=
res
.
rows
[
0
].
sizeList2
.
map
(
temp2
=>
{
return
{
return
{
...
@@ -1545,7 +1576,7 @@ export default {
...
@@ -1545,7 +1576,7 @@ export default {
doFeedback
()
{
doFeedback
()
{
// this.reset();
// this.reset();
this
.
feedbackForms
=
[];
this
.
feedbackForms
=
[];
this
.
tableSelectData
.
forEach
((
item
)
=>
{
this
.
tableSelectData
.
forEach
((
item
,
index
)
=>
{
let
defQualify
=
item
.
quantity
-
item
.
quantityQualify
-
item
.
quantityUnqualify
;
let
defQualify
=
item
.
quantity
-
item
.
quantityQualify
-
item
.
quantityUnqualify
;
defQualify
=
defQualify
<
0
?
0
:
defQualify
;
defQualify
=
defQualify
<
0
?
0
:
defQualify
;
defQualify
=
defQualify
>
item
.
quantityWait
?
item
.
quantityWait
:
defQualify
;
defQualify
=
defQualify
>
item
.
quantityWait
?
item
.
quantityWait
:
defQualify
;
...
@@ -1575,12 +1606,86 @@ export default {
...
@@ -1575,12 +1606,86 @@ export default {
sizeData
:
{},
sizeData
:
{},
printContents
:
item
.
arrangeCode
,
printContents
:
item
.
arrangeCode
,
whether
:
''
,
whether
:
''
,
printTemplate
:
''
printTemplate
:
''
,
tableDirectiveColumn
:
[
{
name
:
'clientCmd'
,
label
:
'指令号'
,
width
:
130
},
{
name
:
'lossNum'
,
label
:
'LOSS数'
,
width
:
130
},
{
name
:
'sizeGroup'
,
label
:
'尺码组'
,
width
:
130
},
{
name
:
'quantity'
,
label
:
'数量'
,
width
:
130
},
{
name
:
'quantityQualify'
,
label
:
'合格品数量'
,
width
:
130
},
],
tableDirectiveData
:
[],
tableSizeColumn
:
[],
tableSizeData
:
[],
currentTabPro
:
0
};
};
this
.
getWorkorderWithSizeAndDirective
(
feedback
);
this
.
getWorkorderWithSizeAndDirective
(
feedback
,
index
);
this
.
feedbackForms
.
push
(
feedback
);
this
.
feedbackForms
.
push
(
feedback
);
});
});
this
.
open
=
true
;
this
.
proVisible
=
true
;
},
// 获取指令列表
getWorkorderDirectiveList
(
id
,
index
)
{
let
row
=
this
.
feedbackForms
[
index
];
this
.
$u
.
api
.
workOrderSoDirectiveApi
({
workorderId
:
id
})
.
then
((
res
)
=>
{
console
.
log
(
res
,
'88999res'
)
if
(
res
.
code
===
200
)
{
row
.
tableDirectiveData
=
res
.
rows
}
// row.tableDirectiveData = []
// row.tableSizeColumn = []
// row.tableSizeData = []
})
},
// 获取SIZE列表
getWorkorderSizeList
(
id
,
index
)
{
let
row
=
this
.
feedbackForms
[
index
];
this
.
$u
.
api
.
workOrderSoSizeItemApi
({
workorderId
:
id
})
.
then
((
res
)
=>
{
console
.
log
(
res
,
'88999resSize'
)
let
columns
=
[]
if
(
res
.
code
===
200
)
{
for
(
const
key
in
res
.
data
.
columns
)
{
if
(
res
.
data
.
columns
.
hasOwnProperty
.
call
(
res
.
data
.
columns
,
key
))
{
const
element
=
res
.
data
.
columns
[
key
];
let
obj
=
{
name
:
key
,
label
:
element
}
columns
.
push
(
obj
)
}
}
row
.
tableSizeColumn
=
columns
row
.
tableSizeData
=
res
.
data
.
sizeList
}
})
},
},
doException
()
{
doException
()
{
...
@@ -1602,7 +1707,7 @@ export default {
...
@@ -1602,7 +1707,7 @@ export default {
abnormalReason
:
''
,
abnormalReason
:
''
,
abnormalTime
:
''
abnormalTime
:
''
});
});
this
.
aopen
=
true
;
this
.
errorVisible
=
true
;
},
},
async
newlyAddss
()
{
async
newlyAddss
()
{
...
@@ -1612,10 +1717,10 @@ export default {
...
@@ -1612,10 +1717,10 @@ export default {
},
},
cancel
()
{
cancel
()
{
this
.
open
=
false
;
this
.
proVisible
=
false
;
},
},
handleSubmitfeedback
()
{
handleSubmitfeedback
()
{
this
.
open
=
true
;
this
.
proVisible
=
true
;
this
.
feedbackForms
.
forEach
((
item
)
=>
{
this
.
feedbackForms
.
forEach
((
item
)
=>
{
if
(
item
.
quantityQualify
===
0
&&
item
.
quantityUnqualify
===
0
)
{
if
(
item
.
quantityQualify
===
0
&&
item
.
quantityUnqualify
===
0
)
{
this
.
$u
.
toast
(
'请填写合格/不合格产品数量!'
);
this
.
$u
.
toast
(
'请填写合格/不合格产品数量!'
);
...
@@ -1668,7 +1773,9 @@ export default {
...
@@ -1668,7 +1773,9 @@ export default {
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
;
this
.
proVisible
=
false
;
if
(
res
.
msg
===
'操作成功'
)
{
this
.
$u
.
toast
(
'上报成功'
);
if
(
item
.
printTemplate
)
{
if
(
item
.
printTemplate
)
{
let
params
=
{}
let
params
=
{}
res
.
data
.
forEach
(
datas
=>
{
res
.
data
.
forEach
(
datas
=>
{
...
@@ -1918,7 +2025,7 @@ export default {
...
@@ -1918,7 +2025,7 @@ export default {
const
rst
=
[];
const
rst
=
[];
const
t
=
this
;
const
t
=
this
;
this
.
materialReturnList
.
forEach
((
s
)
=>
{
this
.
materialReturnList
.
forEach
((
s
)
=>
{
if
(
s
.
applyNum
!=
null
)
{
if
(
s
.
applyNum
)
{
rst
.
push
({
rst
.
push
({
itemId
:
s
.
itemId
,
itemId
:
s
.
itemId
,
taskId
:
taskInfo
.
taskId
,
taskId
:
taskInfo
.
taskId
,
...
@@ -1933,6 +2040,10 @@ export default {
...
@@ -1933,6 +2040,10 @@ export default {
});
});
}
}
});
});
if
(
rst
.
length
===
0
)
{
this
.
$u
.
toast
(
'数量不存在,无法保存'
)
return
}
this
.
$u
.
api
.
addMaterialReturn
(
rst
).
then
((
res
)
=>
{
this
.
$u
.
api
.
addMaterialReturn
(
rst
).
then
((
res
)
=>
{
t
.
materialReturnFormVisible
=
false
;
t
.
materialReturnFormVisible
=
false
;
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
...
...
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