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
3c877aba
Commit
3c877aba
authored
Nov 05, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.local.topsunit.com/mes/mes-ui
into dev
parents
035b7c94
b4c47508
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
83 deletions
+67
-83
requestIndex.vue
src/views/mes/pro/request/components/requestIndex.vue
+61
-81
index.vue
src/views/mes/pro/request/index.vue
+6
-2
No files found.
src/views/mes/pro/request/components/requestIndex.vue
View file @
3c877aba
...
@@ -39,31 +39,17 @@
...
@@ -39,31 +39,17 @@
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"工作中心编码"
prop=
"workstationCode"
>
<el-form-item
label=
"工作中心编码"
prop=
"workstationCode"
>
<el-input
v-model=
"form.workstationCode"
placeholder=
"请输入工作中心编码"
>
<el-input
disabled
v-model=
"form.workstationCode"
placeholder=
"请输入产品名称"
/>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"handleWorkstationSelect"
/>
</el-input>
</el-form-item>
</el-form-item>
<WorkstationSelect
ref=
"brSelectworkstation"
@
onSelected=
"val => onWorkstationSelect(val, 'workstation')"
:workstationCode=
"form.workstationCode"
>
</WorkstationSelect>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"工作单元"
prop=
"workunitCode"
>
<el-form-item
label=
"工作单元"
prop=
"workunitCode"
>
<el-input
v-model=
"form.workunitCode"
placeholder=
"工作单元"
>
<el-input
disabled
v-model=
"form.workunitCode"
placeholder=
"请输入产品名称"
/>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"$refs.codeSelect.showFlag = true"
></el-button>
</el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<WorkstationSelect
ref=
"brSelectworkstation"
@
onSelected=
"val => onWorkstationSelect(val, 'workstation')"
:workstationCode=
"form.workstationCode"
>
</WorkstationSelect>
<codeSelect
ref=
"codeSelect"
:workstationId=
"form.workstationId"
@
onSelected=
"val => onWorkstationSelect(val, 'unit')"
></codeSelect>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -101,7 +87,17 @@ export default {
...
@@ -101,7 +87,17 @@ export default {
id
:
{
id
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
},
workunitCodes
:{
default
:
undefined
},
workstationCodes
:{
default
:
undefined
},
workstationNames
:
{
default
:
undefined
}
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -131,7 +127,6 @@ export default {
...
@@ -131,7 +127,6 @@ export default {
open
:
false
,
open
:
false
,
// 查询参数
// 查询参数
queryParams
:
{
queryParams
:
{
itemId
:
null
,
itemId
:
null
,
sapItemCode
:
null
,
sapItemCode
:
null
,
itemName
:
null
,
itemName
:
null
,
...
@@ -162,37 +157,26 @@ export default {
...
@@ -162,37 +157,26 @@ export default {
};
};
},
},
watch
:
{
watch
:
{
workunitCodes
(
val
)
{
console
.
log
(
'sdfsd'
,
val
)
this
.
form
.
workunitCode
=
val
},
workstationCodes
(
val
)
{
this
.
form
.
workstationCode
=
val
},
workstationNames
(
val
)
{
this
.
form
.
workstationName
=
val
}
},
},
created
()
{
created
()
{
if
(
this
.
$attrs
.
optType
!==
'add'
)
{
if
(
this
.
$attrs
.
optType
!==
'add'
)
{
this
.
getList
();
this
.
getList
();
}
}
console
.
log
(
'workstationCodes'
,
this
.
workstationCodes
)
this
.
addWorkstantion
()
},
},
methods
:
{
methods
:
{
// onItemSelect(list) {
// // console.log(list, 'list')
// const datas = list.map(item => {
// return {
// toolWarehouseId: item.toolWarehouseId,
// toolMachinesId: item.toolMachinesId,
// type: item.type,
// toolCode: item.toolCode,
// toolName: item.toolName,
// itemCode: item.itemCode,
// sapItemCode: item.sapItemCode,
// itemName: item.itemName,
// local: item.local,
// processId: Number(item.processId),
// processName: item.processName,
// warehouse: item.warehouse,
// warehouseDesc: item.warehouseDesc,
// }
// })
// this.tmToolRequestItemList = this.tmToolRequestItemList.concat(datas)
// this.$emit('sum')
// },
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
...
@@ -201,14 +185,22 @@ export default {
...
@@ -201,14 +185,22 @@ export default {
this
.
optType
=
"add"
;
this
.
optType
=
"add"
;
},
},
addWorkstantion
(){
this
.
form
=
{
workstationCode
:
this
.
workstationCodes
,
workunitCode
:
this
.
workunitCodes
,
workstationName
:
this
.
workstationNames
,
}
},
handleItemSelect
()
{
handleItemSelect
()
{
this
.
$refs
.
brSelectpro
.
showFlag
=
true
;
this
.
$refs
.
brSelectpro
.
showFlag
=
true
;
},
},
onItemSelect
(
row
)
{
onItemSelect
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
itemId
=
row
.
itemId
;
this
.
$set
(
this
.
form
,
'itemId'
,
row
.
itemId
)
this
.
form
.
sapItemCode
=
row
.
sapItemCode
;
this
.
$set
(
this
.
form
,
'sapItemCode'
,
row
.
sapItemCode
)
this
.
form
.
itemName
=
row
.
itemName
;
this
.
$set
(
this
.
form
,
'itemName'
,
row
.
itemName
)
}
}
},
},
...
@@ -224,6 +216,21 @@ export default {
...
@@ -224,6 +216,21 @@ export default {
this
.
$modal
.
confirm
(
'申请数量需要输入数字'
);
this
.
$modal
.
confirm
(
'申请数量需要输入数字'
);
return
;
return
;
}
}
if
(
this
.
form
.
applyNum
==
null
){
this
.
open
=
true
;
this
.
$modal
.
confirm
(
'申请数量需要输入数字'
);
return
;
}
if
(
this
.
form
.
workstationCode
==
null
){
this
.
open
=
true
;
this
.
$modal
.
confirm
(
'工作中心编码不能为空,请先选任务单'
);
return
;
}
if
(
this
.
form
.
workunitCode
==
null
){
this
.
open
=
true
;
this
.
$modal
.
confirm
(
'工作单元编码不能为空,请先选任务单'
);
return
;
}
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
@@ -237,27 +244,6 @@ export default {
...
@@ -237,27 +244,6 @@ export default {
});
});
this
.
open
=
false
;
this
.
open
=
false
;
},
},
handleWorkstationSelect
()
{
this
.
$refs
.
brSelectworkstation
.
showFlag
=
true
;
},
onWorkstationSelect
(
row
,
type
)
{
console
.
log
(
'row'
,
type
,
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
;
}
}
},
/**删除行 */
/**删除行 */
deleteRow
(
index
)
{
deleteRow
(
index
)
{
this
.
tableData
.
splice
(
index
,
1
);
this
.
tableData
.
splice
(
index
,
1
);
...
@@ -290,19 +276,13 @@ export default {
...
@@ -290,19 +276,13 @@ export default {
},
},
// 表单重置
// 表单重置
reset
()
{
reset
()
{
this
.
form
=
{
itemId
:
null
,
this
.
form
.
itemId
=
null
;
sapItemCode
:
null
,
this
.
form
.
sapItemCode
=
null
;
itemName
:
null
,
this
.
form
.
itemName
=
null
;
applyNum
:
null
,
this
.
form
.
applyNum
=
null
;
workunitId
:
null
,
workunitName
:
null
,
//this.resetForm("form");
workunitCode
:
null
,
workstationCode
:
null
,
workstationId
:
null
,
workstationName
:
null
,
};
this
.
resetForm
(
"form"
);
},
},
...
...
src/views/mes/pro/request/index.vue
View file @
3c877aba
...
@@ -323,8 +323,8 @@
...
@@ -323,8 +323,8 @@
</el-form>
</el-form>
<el-divider
content-position=
"center"
>
申请单物料
</el-divider>
<el-divider
content-position=
"center"
>
申请单物料
</el-divider>
<el-card
shadow=
"always"
class=
"box-card"
>
<el-card
shadow=
"always"
class=
"box-card"
>
<requestIndex
v-if=
"opens"
ref=
"materialRequestRef"
:quantity=
"form.requestNum"
:id=
"form.materialRequestId"
<requestIndex
v-if=
"opens"
ref=
"materialRequestRef"
:quantity=
"form.requestNum"
:id=
"form.materialRequestId"
:optType=
"optType"
></requestIndex>
:optType=
"optType"
:workunitCodes=
"form.workunitCode"
:workstationNames=
"form.workstationName"
:workstationCodes=
"form.workstationCode"
></requestIndex>
</el-card>
</el-card>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"cancel"
v-if=
"optType == 'view'"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"cancel"
v-if=
"optType == 'view'"
>
返回
</el-button>
...
@@ -529,6 +529,9 @@ export default {
...
@@ -529,6 +529,9 @@ export default {
this
.
form
.
taskName
=
row
.
taskName
;
this
.
form
.
taskName
=
row
.
taskName
;
this
.
form
.
arrangeCode
=
row
.
arrangeCode
;
this
.
form
.
arrangeCode
=
row
.
arrangeCode
;
this
.
form
.
startTime
=
row
.
scheduleStartDate
;
this
.
form
.
startTime
=
row
.
scheduleStartDate
;
this
.
$set
(
this
.
form
,
'workstationCode'
,
row
.
workstationCode
)
this
.
form
.
workunitCode
=
row
.
workunitCode
;
this
.
form
.
workstationName
=
row
.
workstationName
;
this
.
$set
(
this
.
form
,
'endTime'
,
row
.
scheduleEndDate
)
this
.
$set
(
this
.
form
,
'endTime'
,
row
.
scheduleEndDate
)
}
else
if
(
type
===
'arangeSelect'
)
{
}
else
if
(
type
===
'arangeSelect'
)
{
this
.
form
.
arrangeCode
=
row
.
arrangeCode
;
this
.
form
.
arrangeCode
=
row
.
arrangeCode
;
...
@@ -680,6 +683,7 @@ export default {
...
@@ -680,6 +683,7 @@ export default {
this
.
opens
=
true
;
this
.
opens
=
true
;
this
.
gCode
();
this
.
gCode
();
this
.
setDate
();
this
.
setDate
();
console
.
log
(
'sdfds'
,
this
.
form
)
this
.
title
=
"添加领料申请"
;
this
.
title
=
"添加领料申请"
;
this
.
optType
=
"add"
;
this
.
optType
=
"add"
;
},
},
...
...
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