Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
mes
mes-ui
Commits
d97b60b7
Commit
d97b60b7
authored
Sep 12, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保密发料单
parent
0293a0aa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
733 additions
and
15 deletions
+733
-15
requestIndex.vue
src/views/mes/pro/secretSend/components/requestIndex.vue
+296
-0
workorderSelect.vue
src/views/mes/pro/secretSend/components/workorderSelect.vue
+253
-0
index.vue
src/views/mes/pro/secretSend/index.vue
+183
-13
requestIndex.vue
...ws/mes/pro/workstationRequest/components/requestIndex.vue
+1
-2
No files found.
src/views/mes/pro/secretSend/components/requestIndex.vue
0 → 100644
View file @
d97b60b7
This diff is collapsed.
Click to expand it.
src/views/mes/pro/secretSend/components/workorderSelect.vue
0 → 100644
View file @
d97b60b7
<
template
>
<el-dialog
title=
"工单选择"
v-if=
"showFlag"
:visible
.
sync=
"showFlag"
:modal=
false
width=
"80%"
center
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form-item
label=
"工单编码"
prop=
"workorderCode"
>
<el-input
v-model=
"queryParams.workorderCode"
placeholder=
"请输入工单编码"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"工单名称"
prop=
"workorderName"
>
<el-input
v-model=
"queryParams.workorderName"
placeholder=
"请输入工单名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"产品编号"
prop=
"productCode"
>
<el-input
v-model=
"queryParams.productCode"
placeholder=
"请输入产品编号"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"产品名称"
prop=
"productName"
>
<el-input
v-model=
"queryParams.productName"
placeholder=
"请输入产品名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"客户名称"
prop=
"clientName"
>
<el-input
v-model=
"queryParams.clientName"
placeholder=
"请输入客户名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
v-loading=
"loading"
:data=
"workorderList"
@
current-change=
"handleCurrent"
@
row-dblclick=
"handleRowDbClick"
>
<el-table-column
width=
"55"
align=
"center"
>
<template
v-slot=
"scope"
>
<el-radio
v-model=
"selectedWorkorderId"
:label=
"scope.row.workorderId"
@
change=
"handleRowChange(scope.row)"
>
{{
""
}}
</el-radio>
</
template
>
</el-table-column>
<el-table-column
label=
"工单编码"
width=
"180"
prop=
"workorderCode"
>
</el-table-column>
<el-table-column
label=
"工单名称"
width=
"200"
align=
"center"
prop=
"workorderName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"工单来源"
align=
"center"
prop=
"orderSource"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.mes_workorder_sourcetype"
:value=
"scope.row.orderSource"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"订单编号"
width=
"140"
align=
"center"
prop=
"sourceCode"
/>
<el-table-column
label=
"产品编号"
width=
"120"
align=
"center"
prop=
"productCode"
/>
<el-table-column
label=
"产品名称"
width=
"200"
align=
"center"
prop=
"productName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"规格型号"
align=
"center"
prop=
"productSpc"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"单位"
align=
"center"
prop=
"unitOfMeasure"
/>
<el-table-column
label=
"工单数量"
align=
"center"
prop=
"quantity"
/>
<el-table-column
label=
"客户编码"
align=
"center"
prop=
"clientCode"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"clientName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"需求日期"
align=
"center"
prop=
"requestDate"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
requestDate
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"confirmSelect"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"showFlag=false"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/template
>
<
script
>
import
{
listWorkorder
}
from
"@/api/mes/pro/workorder"
;
export
default
{
name
:
'WorkOrderSelectSingle'
,
components
:
{
}
,
dicts
:
[
'mes_order_status'
,
'mes_workorder_sourcetype'
],
props
:{
arrangeCode
:
undefined
,
workorderCode
:
undefined
}
,
watch
:
{
arrangeCode
(
v
){
this
.
queryParams
.
arrangeCode
=
v
;
this
.
getList
();
}
,
workorderCode
(
v
){
this
.
queryParams
.
workorderCode
=
v
;
this
.
getList
();
}
}
,
data
()
{
return
{
showFlag
:
false
,
// 遮罩层
loading
:
true
,
// 选中数组
selectedWorkorderId
:
undefined
,
selectedRows
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 生产工单表格数据
workorderList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
workorderCode
:
this
.
workorderCode
,
workorderName
:
null
,
workorderType
:
null
,
orderSource
:
null
,
sourceCode
:
null
,
productId
:
null
,
productCode
:
null
,
productName
:
null
,
productSpc
:
null
,
unitOfMeasure
:
null
,
quantity
:
null
,
arrangeCode
:
this
.
arrangeCode
,
quantityProduced
:
null
,
quantityChanged
:
null
,
quantityScheduled
:
null
,
clientId
:
null
,
clientCode
:
null
,
clientName
:
null
,
requestDate
:
null
,
parentId
:
null
,
ancestors
:
null
,
status
:
null
,
}
,
}
}
,
created
()
{
this
.
getList
();
}
,
methods
:{
/** 查询生产工单列表 */
getList
()
{
this
.
loading
=
true
;
listWorkorder
(
this
.
queryParams
).
then
(
response
=>
{
this
.
workorderList
=
response
.
rows
;
this
.
loading
=
false
;
this
.
total
=
response
.
total
}
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
pageNum
:
1
,
pageSize
:
10
,
workorderCode
:
null
,
workorderName
:
null
,
workorderType
:
null
,
orderSource
:
null
,
sourceCode
:
null
,
productId
:
null
,
productCode
:
null
,
productName
:
null
,
productSpc
:
null
,
unitOfMeasure
:
null
,
quantity
:
null
,
arrangeCode
:
null
,
quantityProduced
:
null
,
quantityChanged
:
null
,
quantityScheduled
:
null
,
clientId
:
null
,
clientCode
:
null
,
clientName
:
null
,
requestDate
:
null
,
parentId
:
null
,
ancestors
:
null
,
status
:
null
,
}
this
.
handleQuery
();
}
,
handleCurrent
(
row
){
if
(
row
){
this
.
selectedRows
=
row
;
}
}
,
// 单选选中数据
handleRowChange
(
row
)
{
if
(
row
){
this
.
selectedRows
=
row
;
}
}
,
//双击选中
handleRowDbClick
(
row
){
if
(
row
){
this
.
selectedRows
=
row
;
this
.
$emit
(
'onSelected'
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
}
,
//确定选中
confirmSelect
(){
if
(
this
.
selectedWorkorderId
==
null
||
this
.
selectedWorkorderId
==
0
){
this
.
$notify
({
title
:
'提示'
,
type
:
'warning'
,
message
:
'请至少选择一条数据!'
}
);
return
;
}
this
.
$emit
(
'onSelected'
,
this
.
selectedRows
);
this
.
showFlag
=
false
;
}
}
}
<
/script
>
src/views/mes/pro/secretSend/index.vue
View file @
d97b60b7
...
...
@@ -103,12 +103,83 @@
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- 添加领料申请对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"900px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"申请号"
prop=
"applyNo"
>
<el-input
v-model=
"form.applyNo"
placeholder=
"请输入申请号"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"工作中心"
prop=
"workstationCode"
>
<el-input
v-model=
"form.workstationCode"
placeholder=
"工作中心"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"handleWorkstationSelect"
:disabled=
"form.workstationMaterialId"
></el-button>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"工单号"
prop=
"workorderCode"
>
<el-input
v-model=
"form.workorderCode"
disabled
>
</el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"申请时间"
prop=
"createTime"
>
<el-date-picker
clearable
v-model=
"form.createTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择申请时间"
disabled
>
</el-date-picker>
</el-form-item>
</el-col>
<WorkstationSelect
ref=
"workstationSelect"
@
onSelected=
"onWorkstationSelect"
></WorkstationSelect>
</el-row>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"需求日期"
prop=
"startTime"
>
<el-date-picker
clearable
v-model=
"form.startTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择需求日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"预计结束时间"
prop=
"endTime"
>
<el-date-picker
clearable
v-model=
"form.endTime"
type=
"datetime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择需预计结束时间"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-divider
content-position=
"center"
>
申请单物料
</el-divider>
<el-card
shadow=
"always"
class=
"box-card"
>
<requestIndex
v-if=
"open"
ref=
"materialRequestRef"
:quantity=
"form.requestNum"
:id=
"form.materialRequestId"
></requestIndex>
</el-card>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
addMaterial
}
from
"@/api/mes/pro/material"
;
import
requestIndex
from
"./components/requestIndex.vue"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
dayjs
from
'dayjs'
;
import
WorkstationSelect
from
"@/components/workstationSelect/simpletableSingle.vue"
;
import
{
listSecrecyissue
,
putSecrecyissue
}
from
"@/api/mes/pro/secretSend"
;
export
default
{
dicts
:
[
'se_issue_table_status'
],
components
:
{
requestIndex
,
WorkstationSelect
},
name
:
"secretSend"
,
data
()
{
return
{
...
...
@@ -143,13 +214,41 @@ export default {
form
:
{},
// 表单校验
rules
:
{
}
taskCode
:
[
{
required
:
true
,
message
:
"任务单号称不能为空"
,
trigger
:
"blur"
}
],
arrangeCode
:
[
{
required
:
true
,
message
:
"编排单号称不能为空"
,
trigger
:
"blur"
}
],
createTime
:
[
{
required
:
true
,
message
:
"编排单号称不能为空"
,
trigger
:
"blur"
}
],
}
};
},
created
()
{
this
.
getList
();
},
methods
:
{
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
{
const
itemList
=
this
.
$refs
.
materialRequestRef
.
tableData
;
const
params
=
{
...
this
.
form
,
itemList
,
secrecyIssueCode
:
this
.
form
.
secrecyIssueCode
}
addMaterial
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
});
}
}
});
},
getList
()
{
this
.
loading
=
true
;
listSecrecyissue
(
this
.
queryParams
).
then
(
response
=>
{
...
...
@@ -180,17 +279,24 @@ export default {
this
.
getList
();
},
handleSend
(
row
)
{
const
ids
=
row
.
id
?
[
row
.
id
]
:
this
.
ids
;
this
.
$modal
.
confirm
(
'是否发料?'
).
then
(
function
()
{
return
putSecrecyissue
({
status
:
0
,
ids
:
ids
});
}).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
getList
()
}
})
// const ids = row.id ? [row.id] : this.ids;
// this.$modal.confirm('是否发料?').then(function() {
// return putSecrecyissue({
// status: 0,
// ids: ids
// });
// }).then((res) => {
// if(res.code === 200) {
// this.getList()
// }
// })
this
.
reset
();
this
.
form
.
createTime
=
dayjs
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
this
.
form
.
workorderCode
=
row
.
workorderCode
this
.
form
.
secrecyIssueCode
=
row
.
secrecyIssueCode
this
.
open
=
true
;
this
.
gCode
();
this
.
title
=
"发料申请"
;
},
handleSubmit
(
row
)
{
const
ids
=
row
.
id
?
[
row
.
id
]
:
this
.
ids
;
...
...
@@ -215,7 +321,71 @@ export default {
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
},
handleWorkstationSelect
()
{
this
.
$refs
.
workstationSelect
.
showFlag
=
true
;
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
workstationMaterialId
:
null
,
applyNo
:
null
,
itemId
:
null
,
taskId
:
null
,
taskWorkunitId
:
null
,
applyType
:
null
,
applyNum
:
null
,
workorderCode
:
null
,
pickingReason
:
null
,
workstationCode
:
null
,
workstationName
:
null
,
windCase
:
null
,
grantNum
:
null
,
remak
:
null
,
attr1
:
null
,
attr2
:
null
,
attr3
:
null
,
attr4
:
null
,
createBy
:
null
,
createTime
:
null
,
updateBy
:
null
,
updateTime
:
null
,
workunitId
:
null
,
workunitName
:
null
,
workunitCode
:
null
,
startTime
:
null
,
endTime
:
null
,
arrangeCode
:
null
,
itemName
:
null
,
taskCode
:
null
};
this
.
resetForm
(
"form"
);
},
onWorkstationSelect
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
// this.form.workunitName = row.workunitName
this
.
$set
(
this
.
form
,
'workunitCode'
,
row
.
workunitCode
)
this
.
form
.
workstationId
=
row
.
workstationId
;
this
.
form
.
workstationCode
=
row
.
workstationCode
;
this
.
form
.
workstationName
=
row
.
workstationName
;
}
},
gCode
()
{
genCode
(
"WORKSTATION_MATERIAL"
).
then
((
response
)
=>
{
this
.
form
.
applyNo
=
response
;
});
},
onWorkorderSelect
(
row
){
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
$set
(
this
.
form
,
'workorderCode'
,
row
.
workorderCode
)
}
},
}
}
</
script
>
\ No newline at end of file
src/views/mes/pro/workstationRequest/components/requestIndex.vue
View file @
d97b60b7
...
...
@@ -88,7 +88,6 @@
</template>
<
script
>
import
codeSelect
from
"./codeSelect.vue"
;
import
WorkstationSelect
from
"@/components/workstationSelect/simpletableSingle.vue"
;
import
ItemSelect
from
"@/components/itemSelect/single.vue"
;
export
default
{
...
...
@@ -96,7 +95,7 @@ export default {
dicts
:
[
"warehouse_desc"
],
components
:
{
ItemSelect
,
WorkstationSelect
,
codeSelect
},
components
:
{
ItemSelect
,
WorkstationSelect
},
props
:
{
id
:
{
type
:
String
,
...
...
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