Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
Project
Project
Details
Activity
Releases
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
张伯涛
NLT-e-cigarette
Commits
cd5af226
Commit
cd5af226
authored
Jun 08, 2022
by
秦嘉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料和工单
parent
bbd0c09c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
249 additions
and
9 deletions
+249
-9
material.js
src/api/material.js
+10
-0
workOrder.vue
src/views/ProductionProcess/workOrder.vue
+207
-4
MaterialFile.vue
src/views/productionInfo/MaterialFile.vue
+32
-5
No files found.
src/api/material.js
View file @
cd5af226
...
@@ -47,3 +47,13 @@ export function updateMaterial(data) {
...
@@ -47,3 +47,13 @@ export function updateMaterial(data) {
}
}
})
})
}
}
// 导出物料信息
export
function
exportMater
(
query
)
{
return
request
({
url
:
'/nltifsmaterial/exportMaterial'
,
method
:
'get'
,
params
:
query
,
responseType
:
'blob'
})
}
src/views/ProductionProcess/workOrder.vue
View file @
cd5af226
<
template
>
<
template
>
<div>
工单作业
</div>
<div
class=
"app-container"
>
<div
class=
"workOrderSearch"
style=
"margin-left: 10px"
>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
:model=
"queryParams"
:inline=
"true"
>
<el-form-item
label=
"工单编号"
prop=
"orderNo"
>
<div
slot=
"label"
class=
"labelClass"
>
<div>
工单编号
</div>
<div>
Order No.
</div>
</div>
<el-input
v-model=
"queryParams.orderNo"
:maxlength=
"30"
placeholder=
"请输入工单编号"
clearable
size=
"small"
/>
</el-form-item>
<el-form-item
label=
"成品料号"
prop=
"partNo"
>
<div
slot=
"label"
class=
"labelClass"
>
<div>
成品料号
</div>
<div>
Part No.
</div>
</div>
<el-input
v-model=
"queryParams.partNo"
:maxlength=
"30"
placeholder=
"请输入成品料号"
clearable
size=
"small"
/>
</el-form-item>
<el-form-item>
<el-button
class=
"redBtn"
type=
"danger"
size=
"small"
style=
"margin-left: 30px"
@
click=
"handleQuery"
>
查询 Query
</el-button>
<el-button
class=
"resetBtn"
size=
"small"
@
click=
"resetQuery"
>
重置 Reset
</el-button>
</el-form-item>
</el-form>
</div>
<div
class=
"placeholder"
/>
<div
style=
"padding:10px"
>
<div
style=
"float: right;position: relative;bottom: 10px"
>
<el-button
class=
"blackBtn"
type=
"danger"
size=
"small"
@
click=
"handleExport"
>
导出 Export
</el-button>
<el-button
class=
"redBtn"
type=
"danger"
size=
"small"
@
click=
"handleImport"
>
手动导入 Import
</el-button>
</div>
<div
class=
"mb12 font-small-bold"
>
生产工单列表
</div>
<el-table
v-loading=
"Loading"
:data=
"orderList"
border
>
<el-table-column
type=
"index"
width=
"50"
>
<template
slot=
"header"
>
<div>
序号
</div>
<div>
No.
</div>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"orderNo"
>
<
template
slot=
"header"
>
<div>
工单编号
</div>
<div>
Order No.
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
orderNo
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"partNo"
>
<
template
slot=
"header"
>
<div>
成品料号
</div>
<div>
Part No.
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
partNo
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"revisedQtyDue"
>
<
template
slot=
"header"
>
<div>
待生产数量
</div>
<div>
Production Qty
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
revisedQtyDue
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"revisedStartDate"
>
<
template
slot=
"header"
>
<div>
计划开工时间
</div>
<div>
Start Time
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
revisedStartDate
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"revisedDueDate"
>
<
template
slot=
"header"
>
<div>
计划完工时间
</div>
<div>
End Time
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
revisedDueDate
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"createDate"
>
<
template
slot=
"header"
>
<div>
创建时间
</div>
<div>
Build Time
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
createDate
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"updateBy"
>
<
template
slot=
"header"
>
<div>
操作人
</div>
<div>
Operator
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
updateBy
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"updateBy"
>
<
template
slot=
"header"
>
<div>
状态
</div>
<div>
Status
</div>
</
template
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
updateBy
||
'-'
}}
</span>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Template
from
'@/views/instance/Template'
export
default
{
export
default
{
name
:
'WorkOrder'
name
:
'WorkOrder'
,
components
:
{
Template
},
data
()
{
return
{
// 搜索栏显示(默认显示)
showSearch
:
true
,
// 搜索框参数
queryParams
:
{
page
:
1
,
rows
:
10
,
orderNo
:
undefined
,
partNo
:
undefined
},
// 遮罩标志
Loading
:
false
,
// 生产工单表格数据
orderList
:
[]
}
},
created
()
{
},
methods
:
{
/** 查询按钮方法 */
handleQuery
()
{},
/** 重置按钮方法 */
resetQuery
()
{},
/** 导出按钮方法 */
handleExport
()
{},
/** 导入按钮方法 */
handleImport
()
{}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
lang=
"scss"
>
.app-container
{
font-size
:
18px
;
padding
:
0
;
.workOrderSearch
{
.el-form-item--small
.el-form-item__label
{
line-height
:
17px
;
}
.labelClass
{
text-align
:
center
;
}
}
.placeholder
{
height
:
1
.3vh
;
background-color
:
#F4F4F4
;
margin-bottom
:
10px
}
.el-table
th
.cell
{
display
:
inline-block
!
important
;
}
.table-drop
{
vertical-align
:
2px
;
line-height
:
20px
;
margin-left
:
15px
}
.el-switch
{
margin-left
:
15px
;
}
}
</
style
>
</
style
>
src/views/productionInfo/MaterialFile.vue
View file @
cd5af226
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<el-form-item
label=
"物料描述"
prop=
"materDesc"
>
<el-form-item
label=
"物料描述"
prop=
"materDesc"
>
<div
slot=
"label"
class=
"labelClass"
>
<div
slot=
"label"
class=
"labelClass"
>
<div>
物料描述
</div>
<div>
物料描述
</div>
<div>
Description
r
</div>
<div>
Description
</div>
</div>
</div>
<el-input
<el-input
v-model=
"queryParams.materDesc"
v-model=
"queryParams.materDesc"
...
@@ -97,13 +97,16 @@
...
@@ -97,13 +97,16 @@
<span>
{{
scope
.
row
.
materUnit
||
'-'
}}
</span>
<span>
{{
scope
.
row
.
materUnit
||
'-'
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"
dictLabel
"
>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"
type
"
>
<
template
slot=
"header"
>
<
template
slot=
"header"
>
<div>
物料类型
</div>
<div>
物料类型
</div>
<div>
Part Type
</div>
<div>
Part Type
</div>
</
template
>
</
template
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
dictLabel
||
'-'
}}
</span>
<span
v-if=
"scope.row.type === '0'"
>
原料
</span>
<span
v-else-if=
"scope.row.type === '1'"
>
半成品
</span>
<span
v-else-if=
"scope.row.type === '2'"
>
成品
</span>
<span
v-else
>
-
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"project"
>
<el-table-column
:show-overflow-tooltip=
"true"
align=
"center"
prop=
"project"
>
...
@@ -188,7 +191,7 @@
...
@@ -188,7 +191,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
changeStaStatus
,
getMaterial
,
listMaterial
,
updateMaterial
}
from
'@/api/material'
import
{
changeStaStatus
,
exportMater
,
getMaterial
,
listMaterial
,
updateMaterial
}
from
'@/api/material'
export
default
{
export
default
{
name
:
'MaterialFile'
,
name
:
'MaterialFile'
,
...
@@ -246,7 +249,31 @@ export default {
...
@@ -246,7 +249,31 @@ export default {
this
.
getMatTable
()
this
.
getMatTable
()
},
},
// 导出按钮
// 导出按钮
handleExport
()
{},
handleExport
()
{
const
queryParam
=
{
materCode
:
this
.
queryParams
.
materCode
,
materDesc
:
this
.
queryParams
.
materDesc
}
this
.
$confirm
(
'是否确认导出所有物料信息?'
,
'警告'
,
{
confirmButtonText
:
'确定 Confirm'
,
cancelButtonText
:
'取消 Cancel'
,
cancelButtonClass
:
'btn-custom-cancel'
,
type
:
'warning'
}).
then
(
function
()
{
return
exportMater
(
queryParam
).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建下载的链接
downloadElement
.
href
=
href
downloadElement
.
download
=
'物料信息'
+
'.xls'
// 下载后文件名
document
.
body
.
appendChild
(
downloadElement
)
downloadElement
.
click
()
// 点击下载
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
// this.download(response.msg);
})
})
},
// 修改按钮
// 修改按钮
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
this
.
reset
()
this
.
reset
()
...
...
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