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
0bf7a62a
Commit
0bf7a62a
authored
Mar 20, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改选择打印模板
parent
5cce97f6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
278 additions
and
128 deletions
+278
-128
http.api.js
common/http.api.js
+9
-5
printTemplate.vue
pages/mes/prodReport/components/printTemplate.vue
+102
-0
index.vue
pages/mes/prodReport/index.vue
+78
-47
zb-table.vue
uni_modules/zb-table/components/zb-table/zb-table.vue
+89
-76
No files found.
common/http.api.js
View file @
0bf7a62a
...
...
@@ -156,9 +156,9 @@ const install = (Vue, vm) => {
params
),
//人员绑定打印机
getUserPrint
:
(
params
=
{})
=>
getUserPrint
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/system/printerConfig/userList'
,
params
),
addUserPrint
:
(
params
=
{})
=>
addUserPrint
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
config
.
adminPath
+
'/system/print'
,
params
),
//投料验证
...
...
@@ -257,7 +257,10 @@ const install = (Vue, vm) => {
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/pro/workorder/list'
,
params
),
//查看生产工单
getWorkorderWithSizeAndDirective
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/pro/workorder/listWithSizeAndDirective'
,
params
),
vm
.
$u
.
get
(
config
.
adminPath
+
'/mes/pro/workorder/listWithSizeAndDirective'
,
params
),
logout
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/mobile/login/logout'
,
params
),
...
...
@@ -282,7 +285,8 @@ const install = (Vue, vm) => {
vm
.
$u
.
post
(
'/account/getRegValidCode'
,
params
),
saveRegByValidCode
:
(
params
=
{})
=>
vm
.
$u
.
post
(
'/account/saveRegByValidCode'
,
params
),
getPrintTemplateList
:
(
params
=
{})
=>
vm
.
$u
.
get
(
config
.
adminPath
+
'/ureportM/list'
,
params
),
// APP公共服务
upgradeCheck
:
()
=>
vm
.
$u
.
post
(
'/app/upgrade/check'
,
{
...
...
pages/mes/prodReport/components/printTemplate.vue
0 → 100644
View file @
0bf7a62a
<
template
>
<view
class=
"dmodel-table"
>
<zb-table
ref=
"zbTable"
rowKey=
"id"
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleRowSelection=
"toggleRowSelection"
>
<template
slot=
"slot"
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_report_type"
:value=
"scope.row.reportType"
/>
</
template
>
</zb-table>
</view>
</template>
<
script
>
export
default
{
dicts
:
[
"sys_report_type"
],
props
:
{
data
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
tableData
:
[],
tableSelectData
:
[],
tableColumn
:
[{
type
:
'radio'
,
width
:
80
},
{
name
:
'name'
,
label
:
'模版名称'
,
width
:
160
,
},
{
type
:
'slot'
,
name
:
'reportType'
,
label
:
'模版类型'
,
width
:
200
,
},
{
name
:
'remark'
,
label
:
'备注'
,
width
:
100
,
}
],
}
},
// computed: {
// tableData() {
// return this.data || []
// }
// },
mounted
()
{
this
.
getList
()
// this.data.workstationName
},
methods
:
{
async
getList
()
{
let
params
=
{
pageNum
:
1
,
pageSize
:
10000
,
reportType
:
'package_label'
}
const
res
=
await
this
.
$u
.
api
.
getPrintTemplateList
(
params
)
console
.
log
(
res
,
'res'
)
if
(
res
.
code
==
200
)
{
this
.
tableData
=
res
.
rows
.
map
(
item
=>
{
return
{
...
item
,
workstationName
:
this
.
data
.
workstationName
}
})
}
},
toggleRowSelection
(
checked
,
arr
)
{
console
.
log
(
arr
,
'arrs'
)
this
.
tableSelectData
=
arr
},
}
}
</
script
>
<
style
scoped
>
.dmodel-table
{
height
:
500
rpx
;
margin-top
:
20
rpx
;
padding
:
0
20
rpx
;
}
.search
{
display
:
flex
;
margin-bottom
:
20
rpx
;
align-items
:
center
;
.u-search{
width
:
400
rpx
!important
;
margin-right
:
20
rpx
!important
;
}
}
</
style
>
pages/mes/prodReport/index.vue
View file @
0bf7a62a
...
...
@@ -106,7 +106,7 @@
<!--查看图片查询的生产工单-->
<u-modal
title=
"生产报工"
@
confirm=
"
feedback()
"
@
confirm=
"
handleSubmitfeedback
"
show-cancel-button
:title-style=
"
{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="open"
...
...
@@ -206,11 +206,31 @@
<u-number-box
:min=
"0"
:positive-integer=
"false"
:input-width=
"190"
v-model=
"feedback.netWeight"
></u-number-box>
</u-form-item>
</u-col>
<u-col
span=
"6"
>
<u-form-item
label=
"打印模板"
prop=
"printTemplate"
>
<u-input
v-model=
"feedback.printTemplate"
disabled
placeholder=
"请选择打印模板"
></u-input>
<u-button
@
tap=
"getPrintTemplate(feedback)"
type=
"success"
size=
"mini"
>
选择打印模板
</u-button>
</u-form-item>
</u-col>
</u-row>
</view>
</u-form>
</view>
</u-modal>
<u-modal
title=
"选择打印模板"
@
confirm=
"handleSubmitPrintTemplate"
show-cancel-button
:title-style=
"
{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="printTemplateVisible"
width="1300rpx"
>
<print-template
ref=
"printTemplateRef"
:data=
"printTemplateData"
/>
</u-modal>
<u-modal
title=
"刀模版上下机"
...
...
@@ -630,6 +650,7 @@
import
SearchInput
from
'@/components/ScanInput/index.vue'
;
import
dModelList
from
'./components/dModelList.vue'
;
import
userPersonnel
from
'./components/userPersonnel.vue'
;
import
printTemplate
from
'./components/printTemplate.vue'
;
import
UButton
from
'../../../uview-ui/components/u-button/u-button.vue'
;
import
{
handleError
}
from
"vue"
;
export
default
{
...
...
@@ -638,6 +659,7 @@ export default {
SearchInput
,
dModelList
,
userPersonnel
,
printTemplate
,
UButton
},
data
()
{
...
...
@@ -948,9 +970,9 @@ export default {
applyNum
:
null
,
workorderCode
:
null
},
userTempVisible
:
false
,
printTemplateData
:
null
,
printTemplateVisible
:
false
,
userTempVisible
:
false
,
materialReturnFormVisible
:
false
,
materialReturnSelected
:
{},
tableDetailColumn
:
[
...
...
@@ -1504,6 +1526,14 @@ userTempVisible: false,
quantityChanged
()
{
this
.
feedbackForm
.
quantity
=
this
.
feedbackForm
.
quantityQualify
+
this
.
feedbackForm
.
quantityUnqualify
;
},
getPrintTemplate
(
row
)
{
this
.
printTemplateData
=
row
this
.
printTemplateVisible
=
true
},
handleSubmitPrintTemplate
()
{
this
.
printTemplateData
.
printTemplate
=
this
.
$refs
.
printTemplateRef
.
tableSelectData
[
0
].
name
this
.
printTemplateVisible
=
false
},
doFeedback
()
{
// this.reset();
this
.
feedbackForms
=
[];
...
...
@@ -1519,7 +1549,7 @@ userTempVisible: false,
taskWorkunitId
:
item
.
taskWorkunitId
,
feedbackChannel
:
'PAD'
,
quantity
:
item
.
quantity
,
quantityQualify
:
defQualify
,
//默认为排产数量-合格数-不合格数
quantityQualify
:
Number
(
defQualify
)
,
//默认为排产数量-合格数-不合格数
quantityUnqualify
:
0
,
printName
:
''
,
lastProcess
:
item
.
isLastProcess
==
1
,
//未工序
...
...
@@ -1528,7 +1558,7 @@ userTempVisible: false,
workorderCode
:
null
,
workorderSoDirectiveId
:
''
,
workorderSoSizeItemId
:
''
,
netWeight
:
''
,
netWeight
:
0
,
workorderList
:
[],
workorderOption
:
[],
directiveList
:[],
...
...
@@ -1537,6 +1567,7 @@ userTempVisible: false,
sizeData
:
{},
printContents
:
item
.
arrangeCode
,
whether
:
''
,
printTemplate
:
''
};
this
.
getWorkorderWithSizeAndDirective
(
feedback
);
this
.
feedbackForms
.
push
(
feedback
);
...
...
@@ -1575,7 +1606,7 @@ userTempVisible: false,
cancel
()
{
this
.
open
=
false
;
},
feedback
()
{
handleSubmit
feedback
()
{
this
.
open
=
true
;
this
.
feedbackForms
.
forEach
((
item
)
=>
{
if
(
item
.
quantityQualify
===
0
&&
item
.
quantityUnqualify
===
0
)
{
...
...
uni_modules/zb-table/components/zb-table/zb-table.vue
View file @
0bf7a62a
...
...
@@ -79,6 +79,7 @@
:style=
" `height: calc(100% - ${showSummary?80:40}px)`"
>
<view
class=
"zb-table-fixed"
>
<view
class=
"zb-table-tbody"
>
<radio-group
@
change=
"handleRadio"
>
<view
:class=
"['item-tr',highlight&&isHighlight(item,index)?'current-row':'', isTrClassStyle&&isTrClassStyle(item,index)? 'trbg': '']"
@
click
.
stop=
"rowClick(item,index)"
v-for=
"(item,index) in transData"
:key=
"item.key"
>
...
...
@@ -124,6 +125,11 @@
:checked=
"item.checked"
/>
</view>
</
template
>
<
template
v-else-if=
"ite.type==='radio'"
>
<view
class=
"checkbox-item"
>
<radio
:value=
"item[rowKey]+ ''"
/>
</view>
</
template
>
<
template
v-else-if=
"ite.type==='index'"
>
{{
index
+
1
}}
</
template
>
...
...
@@ -158,6 +164,7 @@
</
template
>
</view>
</view>
</radio-group>
</view>
</view>
</scroll-view>
...
...
@@ -843,6 +850,12 @@ export default {
this
.
$emit
(
'toggleRowSelection'
,
true
,
this
.
selectArr
)
}
},
handleRadio
(
event
)
{
const
items
=
this
.
data
.
find
(
v
=>
v
[
this
.
rowKey
]
==
event
.
target
.
value
)
this
.
selectArr
=
[]
this
.
selectArr
[
0
]
=
items
this
.
$emit
(
'toggleRowSelection'
,
true
,
this
.
selectArr
)
},
rowClick
(
row
,
index
)
{
this
.
isDisable
=
true
setTimeout
(()
=>
{
...
...
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