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
65d69613
Commit
65d69613
authored
Apr 09, 2025
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产工单齐套检查 和 刀模版
parent
24417f68
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
92 additions
and
48 deletions
+92
-48
workorder.js
src/api/mes/pro/workorder.js
+8
-0
indexApply.vue
src/views/mes/pro/workorder/indexApply.vue
+68
-39
index.vue
src/views/mes/tm/toolrequest/index.vue
+3
-2
itemIndex.vue
src/views/mes/tm/toolrequest/itemIndex.vue
+13
-7
No files found.
src/api/mes/pro/workorder.js
View file @
65d69613
...
...
@@ -176,3 +176,11 @@ export function updateRequestDateApi(data) {
data
:
data
,
});
}
// 强制确认
export
function
tmtoolForcePass
(
data
)
{
return
request
({
url
:
"/mes/pro/workorder/tmtoolForcePass"
,
method
:
"post"
,
data
:
data
,
});
}
\ No newline at end of file
src/views/mes/pro/workorder/indexApply.vue
View file @
65d69613
...
...
@@ -585,6 +585,34 @@
<
el
-
button
@
click
=
"handleTurnWorryCancle"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
el
-
dialog
title
=
"刀模版齐套确认"
:
visible
.
sync
=
"daoConfirmVisible"
width
=
"1050px"
append
-
to
-
body
:
close
-
on
-
click
-
modal
=
"false"
>
<
el
-
table
:
data
=
"daoConfirmList"
>
<
el
-
table
-
column
label
=
"工单编码"
align
=
"center"
prop
=
"workorderCode"
width
=
"130px"
/>
<
el
-
table
-
column
label
=
"提示信息"
align
=
"center"
prop
=
"word"
show
-
overflow
-
tooltip
/>
<
el
-
table
-
column
label
=
"是否强制检查完成"
align
=
"center"
prop
=
"word"
width
=
"125px"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
checkbox
v
-
model
=
"scope.row.isBool"
><
/el-checkbox
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"刀模版计划到厂时间"
align
=
"center"
prop
=
"allQuantity"
>
<
template
slot
-
scope
=
"scope"
>
<
el
-
date
-
picker
v
-
model
=
"scope.row.toolArrivalTime"
:
picker
-
options
=
"option"
v
-
if
=
"scope.row.isBool"
type
=
"datetime"
value
-
format
=
"yyyy-MM-dd HH:mm:ss"
placeholder
=
"选择日期时间"
>
<
/el-date-picker
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
type
=
"primary"
@
click
=
"handledaoConfirmSubmit"
>
确
定
<
/el-button
>
<
el
-
button
@
click
=
"daoConfirmVisible = false"
>
取
消
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/template
>
...
...
@@ -608,6 +636,7 @@ import {
closeWorkorder
,
closeCheck
,
updateRequestDateApi
,
tmtoolForcePass
,
changePublishedApi
}
from
"@/api/mes/pro/workorder"
;
import
{
addProtaskList
}
from
"@/api/mes/pro/protask"
;
...
...
@@ -656,9 +685,16 @@ export default {
return
{
commandVisible
:
false
,
tableHeight
:
0
,
daoConfirmVisible
:
false
,
daoConfirmList
:
[],
showArrangBtn
:
false
,
showCombinationBtn
:
false
,
currentData
:
{
}
,
option
:
{
disabledDate
:(
time
)
=>
{
return
time
.
getTime
()
<
Date
.
now
()
}
}
,
//自动生成编码
autoGenFlag
:
false
,
optType
:
undefined
,
...
...
@@ -799,7 +835,7 @@ export default {
requestDate
:
[
{
required
:
true
,
message
:
"需求时间不能为空"
,
trigger
:
"blur"
}
,
],
}
,
}
}
;
}
,
activated
()
{
...
...
@@ -1457,43 +1493,24 @@ export default {
async checkTheMaintenance(ids) {
const res = await checkTheMaintenanceApi(ids);
if(res.code == 200) {
const workorderCodeList = [];
const noticeList = [];
if(res.data) {
res.data.forEach((item, index) => {
if(item.noticeList.length > 0) {
workorderCodeList.push(item.workorderCode);
noticeList.push(...item.noticeList);
}
}
)
}
if(workorderCodeList.length == 0) {
this.getList();
this.$modal.msgSuccess("已齐套");
}
else {
const h = this.$createElement;
const list = noticeList.map((item, index) => {
return h('p', null, item);
}
);
this.$msgbox({
title: '确认信息',
message: h('div', null, [
h('p', {
}
, list)
]),
showCancelButton: true,
confirmButtonText: '是',
cancelButtonText: '否'
}
)
.then(() => {
const params = workorderCodeList.jion('');
changePublishedApi(params).then(() => {
this.getList();
this.$modal.msgSuccess("已齐套");
if(!res.data || res.data.length == 0) {
this.getList();
this.$modal.msgSuccess("已齐套");
}
else {
this.daoConfirmList = []
res.data.forEach(item1 => {
const word = item1.noticeList.join('')
const row = this.selectedRows.find(i => i.workorderId === item1.workorderId)
this.daoConfirmList.push({
workorderCode: row.workorderCode,
workorderId: item1.workorderId,
word: word,
toolArrivalTime: '',
isBool: false
}
)
this.daoConfirmVisible = true
}
)
.catch(action => {
console.log(action);
}
);
}
}
}
,
...
...
@@ -1609,7 +1626,6 @@ export default {
}
}
,
handleTurnWorry() {
console.log(this.selectedRows);
if(["PREPARE", "PUBLISHED"].includes(this.selectedRows[0].status)) {
this.turnWorryForm.workorderId = this.selectedRows[0].workorderId;
this.turnWorryVisible = true;
...
...
@@ -1620,6 +1636,19 @@ export default {
}
);
}
}
,
handledaoConfirmSubmit(){
const list = this.daoConfirmList.filter(v=> v.isBool && !v.toolArrivalTime)
if (list.length) {
return this.$modal.msgWarning("强制检查完成必须选择刀模版计划到厂时间")
}
const list11 = this.daoConfirmList.filter(v=> v.isBool && v.toolArrivalTime)
const list1 = list11.map(v => ({toolArrivalTime: v.toolArrivalTime, workorderId: v.workorderId
}
))
tmtoolForcePass(list1).then(response => {
this.$modal.msgSuccess("操作成功");
this.daoConfirmVisible = false
this.getList();
}
);
}
,
handleTurnWorrySubmit() {
this.$refs["turnWorryFormRef"].validate(valid => {
if (valid) {
...
...
@@ -1633,9 +1662,9 @@ export default {
}
,
handleTurnWorryCancle() {
this.turnWorryVisible = false;
}
,
}
,
}
;
}
}
}
</script>
<style>
@page {
...
...
src/views/mes/tm/toolrequest/index.vue
View file @
65d69613
...
...
@@ -219,8 +219,8 @@
</el-form-item>
</el-col>
<el-col
v-if=
"optType === 'add'"
:span=
"12"
>
<el-form-item
label=
"任务排产单"
prop=
"task
WorkunitId
"
>
<el-input
v-model=
"form.task
WorkunitId
"
placeholder=
"请选择任务排产单"
<el-form-item
label=
"任务排产单"
prop=
"task
Code
"
>
<el-input
v-model=
"form.task
Code
"
placeholder=
"请选择任务排产单"
disabled
>
<el-button
v-if=
"optType === 'add'"
...
...
@@ -507,6 +507,7 @@ export default {
console
.
log
(
row
,
'rows'
)
this
.
$set
(
this
.
form
,
'taskId'
,
row
.
taskId
)
this
.
$set
(
this
.
form
,
'taskWorkunitId'
,
row
.
taskWorkunitId
)
this
.
$set
(
this
.
form
,
'taskCode'
,
row
.
taskCode
)
this
.
form
.
requestDate
=
row
.
createTime
this
.
form
.
processId
=
row
.
processId
this
.
form
.
startTime
=
row
.
startTime
...
...
src/views/mes/tm/toolrequest/itemIndex.vue
View file @
65d69613
...
...
@@ -65,12 +65,16 @@
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<el-dialog
title=
"输入物料数量"
:visible
.
sync=
"quantity.open"
width=
"500px"
append-to-body
>
<el-form>
<el-form-item
label=
"物料数量"
prop=
"allQuantity"
>
<el-input-number
v-model=
"quantity.value"
placeholder=
"请输入物料数量"
:min=
"1"
/>
</el-form-item>
</el-form>
<el-dialog
title=
"确认物料数量"
:visible
.
sync=
"quantity.open"
width=
"800px"
append-to-body
>
<el-table
:data=
"quantity.list"
>
<el-table-column
label=
"物料编码"
align=
"center"
prop=
"itemCode"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"itemName"
/>
<el-table-column
label=
"物料数量"
align=
"center"
prop=
"allQuantity"
>
<
template
slot-scope=
"scope"
>
<el-input-number
v-model=
"scope.row.num"
placeholder=
"请输入物料数量"
:min=
"1"
/>
</
template
>
</el-table-column>
</el-table>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitQuantity"
>
确 定
</el-button>
<el-button
@
click=
"quantity.open=false"
>
取 消
</el-button>
...
...
@@ -150,6 +154,8 @@ export default {
methods
:
{
onItemSelect
(
list
){
// console.log(list, 'list')
const
listpa
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
listpa
.
map
(
v
=>
v
.
num
=
1
)
this
.
quantity
=
{
open
:
true
,
value
:
1
,
...
...
@@ -159,7 +165,7 @@ export default {
submitQuantity
(){
this
.
addList
=
[]
this
.
quantity
.
list
.
forEach
(
item
=>
{
for
(
let
i
=
0
;
i
<
this
.
quantity
.
value
;
i
++
){
for
(
let
i
=
0
;
i
<
item
.
num
;
i
++
){
this
.
addList
.
push
({
itemId
:
item
.
itemId
,
itemName
:
item
.
itemName
,
...
...
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