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
729e8532
Commit
729e8532
authored
Sep 12, 2024
by
chenzj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作中心bug修复
parent
7b66a90d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
342 additions
and
127 deletions
+342
-127
ProogingSpecificationSheet.vue
...ductionSolution/components/ProogingSpecificationSheet.vue
+4
-3
requestIndex.vue
...ws/mes/pro/workstationRequest/components/requestIndex.vue
+29
-7
workorderSelect.vue
...mes/pro/workstationRequest/components/workorderSelect.vue
+253
-0
index.vue
src/views/mes/pro/workstationRequest/index.vue
+56
-117
No files found.
src/views/mes/pro/productionSolution/components/ProogingSpecificationSheet.vue
View file @
729e8532
...
...
@@ -549,8 +549,8 @@
</el-form-item>
</el-col>
<el-col
:lg=
"6"
:md=
"8"
:sm=
"12"
:xs=
"12"
>
<el-form-item
label=
"模数"
prop=
"module"
>
<el-input
v-model=
"form.module"
placeholder
/>
<el-form-item
label=
"模数"
prop=
"module
Num
"
>
<el-input
v-model=
"form.module
Num
"
placeholder
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -679,7 +679,7 @@ export default {
layerNum
:
""
,
width
:
""
,
height
:
""
,
module
:
""
,
module
Num
:
""
,
printingPaperlenth
:
""
,
printPaperwidth
:
""
,
sendworkMultiple
:
""
,
...
...
@@ -750,6 +750,7 @@ export default {
specificationSheetType
:
""
,
brandName
:
""
,
enName
:
""
,
moduleNum
:
""
,
unitOfMeasure
:
""
,
conversionValue
:
""
,
singleLayerThick
:
""
,
...
...
src/views/mes/pro/workstationRequest/components/requestIndex.vue
View file @
729e8532
...
...
@@ -7,10 +7,14 @@
<el-table-column
label=
"物料编码"
align=
"center"
prop=
"sapItemCode"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"itemName"
/>
<el-table-column
label=
"申请数量"
align=
"center"
prop=
"applyNum"
/>
<el-table-column
width=
"1
0
0px"
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
width=
"1
5
0px"
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<template
slot-scope=
"
{ $index}">
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"deleteRow($index)"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-update"
@
click=
"updateRow($index)"
>
修改
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -64,7 +68,7 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"申请数量"
prop=
"applyNum"
>
<el-input
v-model=
"form.applyNum"
placeholder=
"请输入申请数量
"
/>
<el-input-number
v-model=
"form.applyNum"
:min=
"0
"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -107,6 +111,8 @@ export default {
ids
:
[],
/**表格数据 */
tableData
:
[],
indexs
:
null
,
// 非单个禁用
single
:
true
,
// 非多个禁用
...
...
@@ -220,10 +226,18 @@ export default {
/**表单提交 */
submitForm
()
{
if
(
this
.
form
.
applyNum
==
0
){
this
.
open
=
true
;
this
.
$modal
.
confirm
(
'申请数量需要输入数字'
);
return
;
}
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
this
.
optType
==
"add"
)
{
this
.
tableData
.
unshift
({
...
this
.
form
});
this
.
tableData
.
unshift
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
)));
}
else
if
(
this
.
optType
==
"edit"
){
this
.
tableData
[
this
.
indexs
]
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
));
}
this
.
showFlag
=
false
;
}
...
...
@@ -255,6 +269,14 @@ export default {
deleteRow
(
index
)
{
this
.
tableData
.
splice
(
index
,
1
);
},
/**修改*/
updateRow
(
index
){
console
.
log
(
index
);
this
.
indexs
=
index
;
this
.
form
=
this
.
tableData
[
index
];
this
.
open
=
true
;
this
.
optType
=
"edit"
;
},
handleRemove
(
row
,
index
)
{
console
.
log
(
row
,
index
)
...
...
@@ -265,7 +287,7 @@ export default {
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
//
this.reset();
},
/** 搜索按钮操作 */
handleQuery
()
{
...
...
src/views/mes/pro/workstationRequest/components/workorderSelect.vue
0 → 100644
View file @
729e8532
<
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/workstationRequest/index.vue
View file @
729e8532
...
...
@@ -59,19 +59,13 @@
<el-table-column
label=
"产品名称"
align=
"center"
width=
"150"
prop=
"itemName"
/>
<el-table-column
label=
"工作中心名称"
align=
"center"
width=
"150"
prop=
"workstationName"
/>
<el-table-column
label=
"申请单号"
align=
"center"
width=
"150"
prop=
"applyNo"
/>
<el-table-column
label=
"
编排单号"
align=
"center"
width=
"150"
prop=
"arrange
Code"
/>
<el-table-column
label=
"
工单号"
align=
"center"
width=
"150"
prop=
"workorder
Code"
/>
<el-table-column
label=
"领料类型"
align=
"center"
width=
"150"
prop=
"applyType"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.pro_requisition_type"
:value=
"scope.row.applyType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"申请数量"
align=
"center"
width=
"150"
prop=
"applyNum"
/>
<el-table-column
label=
"领料方式"
align=
"center"
width=
"150"
prop=
"materialType"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.pro_material_from"
:value=
"scope.row.materialType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"是否结案"
align=
"center"
prop=
"windCase"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_yes_no"
:value=
"scope.row.windCase"
/>
...
...
@@ -130,25 +124,6 @@
<
el
-
input
v
-
model
=
"form.applyNo"
placeholder
=
"请输入申请号"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"任务单号"
prop
=
"taskCode"
>
<
el
-
input
v
-
model
=
"form.taskCode"
placeholder
=
"请选任务单号"
readonly
=
"readonly"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
@
click
=
"handleBrandSelect"
:
disabled
=
"form.materialRequestId"
><
/el-button
>
<
/el-input
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"编排单号"
prop
=
"arrangeCode"
>
<
el
-
input
v
-
model
=
"form.arrangeCode"
placeholder
=
"请输入编排单号"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
@
click
=
"$refs.arangeSelect.showFlag = true"
:
disabled
=
"form.materialRequestId"
><
/el-button
>
<
/el-input
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"产品编号"
prop
=
"sapItemCode"
>
<
el
-
input
v
-
model
=
"form.sapItemCode"
placeholder
=
"请选任务单号"
readonly
=
"readonly"
>
...
...
@@ -159,7 +134,6 @@
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
ItemSelect
ref
=
"ItemSelect"
@
onSelected
=
"onItemSelected"
><
/ItemSelect
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"产品名称"
prop
=
"itemName"
>
...
...
@@ -181,10 +155,17 @@
<
/el-input
>
<
/el-form-item
>
<
/el-col
>
<
WorkstationSelect
ref
=
"workstationSelect"
:
workstationCode
=
"form.workstationCode"
@
onSelected
=
"val => onWorkstationSelect(val, 'workstation')"
><
/WorkstationSelect
>
<
codeSelect
ref
=
"codeSelect"
:
workstationId
=
"form.workstationId"
@
onSelected
=
"val => onWorkstationSelect(val, 'unit')"
><
/codeSelect
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"工单号"
prop
=
"workorderCode"
>
<
el
-
input
v
-
model
=
"form.workorderCode"
placeholder
=
"请选任务单号"
readonly
=
"readonly"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
:
disabled
=
"form.materialRequestId"
><
/el-button
>
<
/el-input
>
<
/el-form-item
>
<
/el-col
>
<
WorkstationSelect
ref
=
"workstationSelect"
@
onSelected
=
" onWorkstationSelect"
><
/WorkstationSelect
>
<!--
<
el
-
col
:
span
=
"8"
>
<
el
-
form
-
item
label
=
"工作单元"
prop
=
"workunitCode"
>
<
el
-
input
v
-
model
=
"form.workunitCode"
placeholder
=
"工作单元"
>
...
...
@@ -198,9 +179,6 @@
<
el
-
input
v
-
model
=
"form.createBy"
placeholder
=
"请输入创始人"
/>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"申请时间"
prop
=
"createTime"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.createTime"
type
=
"datetime"
...
...
@@ -208,6 +186,9 @@
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"需求日期"
prop
=
"startTime"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.startTime"
type
=
"datetime"
...
...
@@ -215,8 +196,6 @@
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"预计结束时间"
prop
=
"endTime"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.startTime"
type
=
"endTime"
...
...
@@ -224,6 +203,8 @@
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"cancel"
v
-
if
=
"optType == 'view'"
>
返回
<
/el-button
>
...
...
@@ -239,13 +220,13 @@
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"申请号"
prop
=
"applyNo"
>
<
el
-
input
v
-
model
=
"form.applyNo"
placeholder
=
"请输入申请号"
/>
<
el
-
input
v
-
model
=
"form.applyNo"
placeholder
=
"请输入申请号"
disabled
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"
任务单号"
prop
=
"task
Code"
>
<
el
-
input
v
-
model
=
"form.
taskCode"
placeholder
=
"请选任务单号"
readonly
=
"readonly
"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
@
click
=
"handle
Brand
Select"
<
el
-
form
-
item
label
=
"
工作中心"
prop
=
"workstation
Code"
>
<
el
-
input
v
-
model
=
"form.
workstationCode"
placeholder
=
"工作中心
"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
@
click
=
"handle
Workstation
Select"
:
disabled
=
"form.workstationMaterialId"
><
/el-button
>
<
/el-input
>
<
/el-form-item
>
...
...
@@ -253,44 +234,29 @@
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"编排单号"
prop
=
"arrangeCode"
>
<
el
-
input
v
-
model
=
"form.arrangeCode"
placeholder
=
"请输入编排单号"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
@
click
=
"$refs.arangeSelect.showFlag = true"
:
disabled
=
"form.workstationMaterialId"
><
/el-button
>
<
el
-
form
-
item
label
=
"工单号"
prop
=
"workorderCode"
>
<
el
-
input
v
-
model
=
"form.workorderCode"
placeholder
=
"请选任务单号"
readonly
=
"readonly"
>
<
el
-
button
slot
=
"append"
icon
=
"el-icon-search"
@
click
=
"$refs.workorderselect.showFlag = true"
:
disabled
=
"form.materialRequestId"
><
/el-button
>
<
/el-input
>
<
/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
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"
:
workstationCode
=
"form.workstationCode"
@
onSelected
=
"
val => onWorkstationSelect(val, 'workstation')
"
><
/WorkstationSelect
>
<
WorkstationSelect
ref
=
"workstationSelect"
@
onSelected
=
"
onWorkstationSelect
"
><
/WorkstationSelect
>
<
/el-row
>
<
BrandSelect
ref
=
"brSelect"
:
arrangeCode
=
"form.arrangeCode"
@
onSelected
=
"(row) => onSelected(row, 'BrandSelect')"
>
<
/BrandSelect
>
<
arangeSelect
ref
=
"arangeSelect"
key
=
"arangeSelect"
:
arrangeCode
=
"form.arrangeCode"
@
onSelected
=
"(row) => onSelected(row, 'arangeSelect')"
><
/arangeSelect
>
<
workorderSelect
ref
=
"workorderselect"
key
=
"workorderselect"
:
arrangeCode
=
"form.arrangeCode"
:
workorderCode
=
"form.workorderCode"
@
onSelected
=
"(row) => onSelected(row, 'workorderSelect')"
>
<
workorderSelect
ref
=
"workorderselect"
key
=
"workorderselect"
@
onSelected
=
"onWorkorderSelect"
>
<
/workorderSelect
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"领料方式"
prop
=
"materialType"
>
<
el
-
select
:
disabled
=
"mode == 'make'"
v
-
model
=
"form.materialType"
placeholder
=
"请选择领料方式"
>
<
el
-
option
v
-
for
=
"dict in dict.type.pro_material_from"
:
key
=
"dict.value"
:
label
=
"dict.label"
:
value
=
"dict.value"
><
/el-option
>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"需求日期"
prop
=
"startTime"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.startTime"
type
=
"datetime"
...
...
@@ -298,9 +264,6 @@
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"12"
>
<
el
-
form
-
item
label
=
"预计结束时间"
prop
=
"endTime"
>
<
el
-
date
-
picker
clearable
v
-
model
=
"form.endTime"
type
=
"datetime"
...
...
@@ -308,13 +271,6 @@
<
/el-date-picker
>
<
/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
=
"请选择申请时间"
>
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
/el-row
>
<
/el-form
>
...
...
@@ -338,11 +294,13 @@ import arangeSelect from "./components/arangeSelect.vue";
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
codeSelect
from
"./components/codeSelect.vue"
;
import
requestIndex
from
"./components/requestIndex.vue"
;
import
workorderSelect
from
"./components/workorderSelect.vue"
;
import
BrandSelect
from
"./components/taskSelect.vue"
;
import
ItemSelect
from
"@/components/itemSelect/single.vue"
;
import
WorkstationSelect
from
"@/components/workstationSelect/simpletableSingle.vue"
;
import
dayjs
from
'dayjs'
;
export
default
{
components
:
{
arangeSelect
,
codeSelect
,
requestIndex
,
BrandSelect
,
ItemSelect
,
WorkstationSelect
}
,
components
:
{
arangeSelect
,
codeSelect
,
requestIndex
,
BrandSelect
,
ItemSelect
,
WorkstationSelect
,
workorderSelect
}
,
dicts
:
[
'pro_requisition_type'
,
'pro_material_from'
,
'sys_yes_no'
],
name
:
"Material"
,
data
()
{
...
...
@@ -380,7 +338,7 @@ export default {
taskWorkunitId
:
null
,
applyType
:
null
,
applyNum
:
null
,
materialTyp
e
:
null
,
workorderCod
e
:
null
,
pickingReason
:
null
,
workstationCode
:
null
,
workstationName
:
null
,
...
...
@@ -418,31 +376,6 @@ export default {
}
,
methods
:
{
handleBrandSelect
()
{
this
.
$refs
.
brSelect
.
showFlag
=
true
;
}
,
onSelected
(
row
,
type
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
if
(
type
===
'workorderSelect'
)
{
this
.
$set
(
this
.
form
,
'workorderCode'
,
row
.
workorderCode
)
}
else
if
(
type
===
'BrandSelect'
)
{
this
.
form
.
taskId
=
row
.
taskId
;
this
.
form
.
taskCode
=
row
.
taskCode
;
this
.
form
.
arrangeCode
=
row
.
arrangeCode
;
this
.
form
.
workorderCode
=
''
this
.
form
.
taskName
=
row
.
taskName
;
this
.
form
.
startTime
=
row
.
scheduleStartDate
;
this
.
$set
(
this
.
form
,
'workstationCode'
,
row
.
workstationCode
)
this
.
$set
(
this
.
form
,
'endTime'
,
row
.
scheduleEndDate
)
}
else
if
(
type
===
'arangeSelect'
)
{
this
.
form
.
taskCode
=
''
this
.
form
.
taskId
=
''
this
.
form
.
arrangeCode
=
row
.
arrangeCode
;
this
.
form
.
taskName
=
''
;
this
.
form
.
workorderCode
=
''
}
}
}
,
handleItemSelect
()
{
this
.
$refs
.
ItemSelect
.
showFlag
=
true
;
...
...
@@ -459,24 +392,29 @@ export default {
handleWorkstationSelect
()
{
this
.
$refs
.
workstationSelect
.
showFlag
=
true
;
}
,
onWorkstationSelect
(
row
,
type
)
{
console
.
log
(
'row'
,
type
,
row
)
onWorkstationSelect
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
if
(
type
===
'unit'
)
{
// 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
;
}
else
{
this
.
form
.
workstationId
=
row
.
workstationId
;
this
.
form
.
workstationCode
=
row
.
workstationCode
;
this
.
form
.
workstationName
=
row
.
workstationName
;
}
}
}
,
onWorkorderSelect
(
row
){
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
$set
(
this
.
form
,
'workorderCode'
,
row
.
workorderCode
)
}
}
,
//筛选日期设置默认值
setDate
()
{
this
.
form
.
createTime
=
dayjs
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
,
...
...
@@ -522,7 +460,7 @@ export default {
taskWorkunitId
:
null
,
applyType
:
null
,
applyNum
:
null
,
materialTyp
e
:
null
,
workorderCod
e
:
null
,
pickingReason
:
null
,
workstationCode
:
null
,
workstationName
:
null
,
...
...
@@ -575,6 +513,7 @@ export default {
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
setDate
();
this
.
opens
=
true
;
this
.
gCode
();
this
.
title
=
"添加领料申请"
;
...
...
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