Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pda-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
pda
pda-ui
Commits
ecc0a3e5
Commit
ecc0a3e5
authored
Mar 19, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改补单工单需求
parent
88f7e048
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
127 additions
and
33 deletions
+127
-33
workorder.js
src/api/mes/pro/workorder.js
+17
-0
indexApply.vue
src/views/mes/pro/workorder/indexApply.vue
+22
-0
proofingInfo.vue
src/views/mes/pro/workorder/proofingInfo.vue
+88
-33
No files found.
src/api/mes/pro/workorder.js
View file @
ecc0a3e5
...
...
@@ -9,6 +9,14 @@ export function listWorkorder(query) {
})
}
// 查询补单工单工单编码接口
export
function
getMakeWorkorderCode
(
code
)
{
return
request
({
url
:
`/mes/pro/workorder/getChildWorkorderCode/
${
code
}
`
,
method
:
'get'
})
}
// 查询生产工单详细
export
function
getWorkorder
(
workorderId
)
{
return
request
({
...
...
@@ -26,6 +34,15 @@ export function addWorkorder(data) {
})
}
// 提交补单工单
export
function
makeSubmitWorkorder
(
data
)
{
return
request
({
url
:
"/mes/pro/workorder/addComplements"
,
method
:
"post"
,
data
:
data
,
});
}
// 修改生产工单
export
function
updateWorkorder
(
data
)
{
return
request
({
...
...
src/views/mes/pro/workorder/indexApply.vue
View file @
ecc0a3e5
...
...
@@ -129,6 +129,19 @@
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"single"
@
click=
"handleMake"
v-hasPermi=
"['mes:pro:workorder:make']"
>
补单工单
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
...
...
@@ -1178,6 +1191,15 @@ export default {
// this.optType="edit";
//
}
);
}
,
handleMake
()
{
if
(
this
.
selectedRows
[
0
].
workorderType
==
'product'
&&
this
.
selectedRows
[
0
].
status
==
"SCHEDULED"
)
{
const
workorderId
=
this
.
selectedRows
[
0
].
workorderId
this
.
$router
.
push
(
"/mes/pro/workorder/make?workorderId="
+
workorderId
);
}
else
{
this
.
$message
.
warning
(
'请选择工单类型为生产订单、工单状态为已排产的数据'
)
}
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
...
...
src/views/mes/pro/workorder/proofingInfo.vue
View file @
ecc0a3e5
...
...
@@ -9,7 +9,7 @@
</
template
>
<!-- 修改 按钮显示 -->
<
template
slot=
"buttons"
v-if=
"mode == 'edit'"
>
<
template
slot=
"buttons"
v-if=
"mode == 'edit'
|| mode== 'make'
"
>
<el-button
size=
"mini"
type=
"primary"
@
click=
"saveForm"
>
提交
</el-button>
</
template
>
</PageTitle>
...
...
@@ -25,6 +25,15 @@
label-width=
"8em"
>
<el-row>
<el-col
v-if=
"mode === 'make'"
:lg=
"6"
:md=
"8"
:sm=
"12"
:xs=
"12"
>
<el-form-item
label=
"父工单编码"
prop=
"parentCode"
>
<el-input
disabled
v-model=
"form.parentCode"
placeholder=
"自动生成"
></el-input>
</el-form-item>
</el-col>
<el-col
:lg=
"6"
:md=
"8"
:sm=
"12"
:xs=
"12"
>
<el-form-item
label=
"申请单编码"
prop=
"workorderCode"
>
<el-input
...
...
@@ -44,7 +53,7 @@
</el-col>
<el-col
:lg=
"6"
:md=
"8"
:sm=
"12"
:xs=
"12"
>
<el-form-item
label=
"工单类型"
prop=
"workorderType"
>
<el-select
v-model=
"form.workorderType"
placeholder=
"请选择类型"
>
<el-select
:disabled=
"mode == 'make'"
v-model=
"form.workorderType"
placeholder=
"请选择类型"
>
<el-option
v-for=
"dict in dict.type.mes_workorder_type"
:key=
"dict.value"
...
...
@@ -163,7 +172,14 @@
</el-col>
<el-col
:lg=
"6"
:md=
"8"
:sm=
"12"
:xs=
"12"
>
<el-form-item
label=
"工单状态"
prop=
"status"
>
<el-input
v-model=
"form.status"
placeholder=
"请输入工单状态"
/>
<el-select
v-model=
"form.status"
placeholder=
"请选择工单状态"
>
<el-option
v-for=
"dict in dict.type.mes_workorder_status"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:lg=
"6"
:md=
"8"
:sm=
"12"
:xs=
"12"
>
...
...
@@ -280,6 +296,8 @@ import {
addWorkorder
,
updateWorkorder
,
dofinish
,
getMakeWorkorderCode
,
makeSubmitWorkorder
}
from
"@/api/mes/pro/workorder"
;
export
default
{
components
:
{
...
...
@@ -315,7 +333,7 @@ export default {
workorderCode
:
null
,
workorderName
:
null
,
routeName
:
null
,
workorderType
:
"
SELF
"
,
workorderType
:
"
product
"
,
orderSource
:
null
,
sourceCode
:
null
,
productId
:
null
,
...
...
@@ -393,6 +411,7 @@ export default {
edit
:
"工单修改"
,
info
:
"工单新增"
,
apply
:
"工单申请"
,
make
:
"补单工单"
};
return
titles
[
this
.
mode
];
},
...
...
@@ -424,9 +443,18 @@ export default {
},
/** 生成编码 */
gCode
()
{
genCode
(
"WORKORDER_CODE"
).
then
((
response
)
=>
{
this
.
form
.
workorderCode
=
response
;
});
if
(
this
.
mode
===
'apply'
)
{
genCode
(
"WORKORDER_CODE"
).
then
((
response
)
=>
{
this
.
form
.
workorderCode
=
response
;
});
}
else
if
(
this
.
mode
===
'make'
)
{
getMakeWorkorderCode
(
this
.
form
.
parentCode
).
then
(
res
=>
{
console
.
log
(
res
,
88899
)
if
(
res
.
code
===
200
)
{
this
.
form
.
workorderCode
=
res
.
data
.
code
}
})
}
},
// //从BOM行中直接新增
// handleSubAdd(row){
...
...
@@ -492,6 +520,10 @@ export default {
getWorkorder
(
id
)
.
then
(({
data
})
=>
{
Object
.
assign
(
this
.
form
,
data
);
if
(
this
.
mode
==
'make'
)
{
this
.
form
=
Object
.
assign
(
data
,
{
quantity
:
null
,
workorderType
:
"complements"
,
parentCode
:
data
.
workorderCode
,
workorderCode
:
''
})
this
.
gCode
();
}
this
.
bomList
=
data
.
bomList
;
// 设置组件数据
this
.
$refs
[
"ProogingBomRef"
].
tableData
=
data
.
bomList
;
...
...
@@ -564,34 +596,57 @@ export default {
saleList
,
sizeList
,
};
this
.
loading
=
true
;
if
(
this
.
mode
==
"apply"
)
{
addWorkorder
(
params
)
.
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
$modal
.
msgSuccess
(
"提交成功!"
);
this
.
$refs
.
form
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
loading
=
true
;
if
(
this
.
mode
==
"apply"
)
{
addWorkorder
(
params
)
.
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
$modal
.
msgSuccess
(
"提交成功!"
);
this
.
$nextTick
(()
=>
{
// 关闭页签
tabPlugins
.
closeOpenPage
();
this
.
$router
.
replace
({
path
:
"/mes/pro/workorder"
,
});
});
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
}
else
if
(
this
.
mode
===
'make'
)
{
makeSubmitWorkorder
(
params
)
.
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
$modal
.
msgSuccess
(
"提交成功!"
);
this
.
$nextTick
(()
=>
{
// 关闭页签
tabPlugins
.
closeOpenPage
();
this
.
$router
.
replace
({
path
:
"/mes/pro/workorder"
,
this
.
$nextTick
(()
=>
{
// 关闭页签
tabPlugins
.
closeOpenPage
();
this
.
$router
.
replace
({
path
:
"/mes/pro/workorder"
,
});
});
})
.
catch
(()
=>
{
this
.
loading
=
false
;
});
}
)
.
catch
(()
=>
{
this
.
loading
=
false
;
})
;
}
else
{
updateWorkorder
(
params
)
.
then
(()
=>
{
this
.
loading
=
false
;
this
.
$modal
.
msgSuccess
(
"提交成功!"
);
}
)
.
catch
(()
=>
{
this
.
loading
=
false
;
});
}
}
else
{
updateWorkorder
(
params
)
.
then
(()
=>
{
this
.
loading
=
false
;
this
.
$modal
.
msgSuccess
(
"提交成功!"
);
}
)
.
catch
(()
=>
{
this
.
loading
=
false
;
}
);
}
}
})
},
/**重置表单 */
resetForm
()
{
...
...
@@ -600,7 +655,7 @@ export default {
workorderCode
:
null
,
workorderName
:
null
,
routeName
:
null
,
workorderType
:
"
SELF
"
,
workorderType
:
"
product
"
,
orderSource
:
null
,
sourceCode
:
null
,
productId
:
null
,
...
...
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