Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pad
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
ximai
mes-pad
Commits
56227fcf
Commit
56227fcf
authored
Mar 11, 2024
by
chenzj
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.local.topsunit.com/mes/mes-pad
into dev
parents
b71fd28a
55147a8f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
121 deletions
+137
-121
http.api.js
common/http.api.js
+3
-0
dModelList.vue
pages/mes/prodReport/components/dModelList.vue
+126
-114
index.vue
pages/mes/prodReport/index.vue
+8
-7
No files found.
common/http.api.js
View file @
56227fcf
...
...
@@ -348,10 +348,13 @@ const install = (Vue, vm) => {
params
),
// 新增
// http://192.168.3.91:8080/tm/tmToolMachines/scancode
tmToolMachines
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
config
.
adminPath
+
'/tm/tmToolMachines'
,
params
),
tmToolMachinesRecord
:
(
params
=
{})
=>
vm
.
$u
.
putJson
(
config
.
adminPath
+
'/tm/tmToolMachines'
,
params
),
tmToolMachinesScancode
:
(
params
=
{})
=>
vm
.
$u
.
postJson
(
config
.
adminPath
+
'/tm/tmToolMachines/scancode'
,
params
),
},
};
...
...
pages/mes/prodReport/components/dModelList.vue
View file @
56227fcf
<
template
>
<view
class=
"dmodel-table"
>
<u-button
type=
"primary"
size=
"mini"
@
click=
"commonClick('1')"
>
上机
</u-button>
<u-button
style=
"margin-left: 20rpx;"
type=
"success"
size=
"mini"
@
click=
"commonClick('2')"
>
下机
</u-button>
<zb-table
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleAllSelection=
"toggleAllSelection"
@
toggleRowSelection=
"toggleRowSelection"
>
</zb-table>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
data
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
tableSelectData
:
[],
tableColumn
:
[{
type
:
'selection'
,
width
:
35
},
{
name
:
'typeName'
,
label
:
'状态'
,
width
:
80
,
},
{
name
:
'toolCode'
,
label
:
'刀模版sn码'
,
width
:
140
,
},
{
name
:
'toolName'
,
label
:
'刀模版名称'
,
width
:
140
,
},
{
name
:
'itemName'
,
label
:
'物料名称'
,
width
:
140
,
},
{
name
:
'upDate'
,
label
:
'上机时间'
,
width
:
140
,
},
{
name
:
'downDate'
,
label
:
'下机时间'
,
width
:
140
,
},
],
}
},
computed
:
{
tableData
()
{
return
this
.
data
||
[]
}
},
methods
:
{
async
commonClick
(
type
)
{
if
(
this
.
tableSelectData
.
length
==
0
)
{
return
this
.
$u
.
toast
(
'请选择一条数据!'
)
}
// 判断选中的类型是否一致
if
(
this
.
tableSelectData
.
length
>
1
)
{
let
flag
=
false
for
(
let
i
=
1
;
i
<
this
.
tableSelectData
.
length
;
i
++
)
{
const
pre
=
this
.
tableSelectData
[
i
-
1
]
const
cur
=
this
.
tableSelectData
[
i
]
flag
=
cur
.
type
==
pre
.
type
if
(
!
flag
)
{
break
;
}
}
if
(
!
flag
)
{
return
this
.
$u
.
toast
(
'请选择状态相同的数据'
)
}
}
const
params
=
this
.
tableSelectData
.
map
(
v
=>
{
return
{
toolMachinesId
:
v
.
toolMachinesId
,
type
}
})
const
{
code
}
=
await
this
.
$u
.
api
.
dModel
.
tmToolMachinesRecord
(
params
)
if
(
code
==
200
)
{
this
.
$emit
(
'action'
)
}
},
toggleAllSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
},
toggleRowSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
},
}
}
</
script
>
<
style
scoped
>
.dmodel-table
{
height
:
500
rpx
;
margin-top
:
20
rpx
;
padding
:
0
20
rpx
;
}
</
style
>
<
template
>
<view
class=
"dmodel-table"
>
<u-button
type=
"primary"
size=
"mini"
@
click=
"commonClick('1')"
>
上机
</u-button>
<u-button
style=
"margin-left: 20rpx"
type=
"success"
size=
"mini"
@
click=
"commonClick('2')"
>
下机
</u-button>
<u-button
style=
"margin-left: 20rpx"
type=
"success"
size=
"mini"
@
click=
"handleScancode('1')"
>
上机扫描
</u-button>
<u-button
style=
"margin-left: 20rpx"
type=
"success"
size=
"mini"
@
click=
"handleScancode('2')"
>
下机扫描
</u-button>
<zb-table
:columns=
"tableColumn"
:data=
"tableData"
:stripe=
"true"
@
toggleAllSelection=
"toggleAllSelection"
@
toggleRowSelection=
"toggleRowSelection"
></zb-table>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
data
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
tableSelectData
:
[],
tableColumn
:
[
{
type
:
'selection'
,
width
:
35
},
{
name
:
'typeName'
,
label
:
'状态'
,
width
:
80
},
{
name
:
'toolCode'
,
label
:
'刀模版sn码'
,
width
:
140
},
{
name
:
'toolName'
,
label
:
'刀模版名称'
,
width
:
140
},
{
name
:
'itemName'
,
label
:
'物料名称'
,
width
:
140
},
{
name
:
'upDate'
,
label
:
'上机时间'
,
width
:
140
},
{
name
:
'downDate'
,
label
:
'下机时间'
,
width
:
140
}
]
};
},
computed
:
{
tableData
()
{
return
this
.
data
||
[];
}
},
methods
:
{
async
commonClick
(
type
)
{
if
(
this
.
tableSelectData
.
length
==
0
)
{
return
this
.
$u
.
toast
(
'请选择一条数据!'
);
}
// 判断选中的类型是否一致
if
(
this
.
tableSelectData
.
length
>
1
)
{
let
flag
=
false
;
for
(
let
i
=
1
;
i
<
this
.
tableSelectData
.
length
;
i
++
)
{
const
pre
=
this
.
tableSelectData
[
i
-
1
];
const
cur
=
this
.
tableSelectData
[
i
];
flag
=
cur
.
type
==
pre
.
type
;
if
(
!
flag
)
{
break
;
}
}
if
(
!
flag
)
{
return
this
.
$u
.
toast
(
'请选择状态相同的数据'
);
}
}
const
params
=
this
.
tableSelectData
.
map
((
v
)
=>
{
return
{
toolMachinesId
:
v
.
toolMachinesId
,
type
};
});
const
{
code
}
=
await
this
.
$u
.
api
.
dModel
.
tmToolMachinesRecord
(
params
);
if
(
code
==
200
)
{
this
.
$emit
(
'action'
);
}
},
handleScancode
(
type
)
{
uni
.
scanCode
({
success
:
(
res
)
=>
{
console
.
log
(
res
,
'res7778888'
);
this
.
$u
.
api
.
dModel
.
tmToolMachinesScancode
({
type
,
sn
:
res
.
result
}).
then
((
res
)
=>
{
// console.log(res, 'res333')
if
(
res
.
code
===
200
)
{
this
.
$emit
(
'action'
);
}
});
}
});
},
toggleAllSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
;
},
toggleRowSelection
(
checked
,
arr
)
{
this
.
tableSelectData
=
arr
;
}
}
};
</
script
>
<
style
scoped
>
.dmodel-table
{
height
:
500
rpx
;
margin-top
:
20
rpx
;
padding
:
0
20
rpx
;
}
</
style
>
pages/mes/prodReport/index.vue
View file @
56227fcf
...
...
@@ -179,7 +179,7 @@
show-cancel-button
:title-style=
"
{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="knifeTempVisible"
width="1
3
00rpx"
width="1
6
00rpx"
>
<u-form
label-width=
"130px"
:model=
"knifeTempSearch"
:rules=
"rules"
>
<u-row>
...
...
@@ -195,7 +195,7 @@
</u-col>
</u-row>
</u-form>
<dModelList
:data=
"dModelData"
@
action=
"upDownGetList"
/>
<dModelList
:data=
"dModelData"
@
action=
"upDownGetList"
/>
</u-modal>
//生产报工报工人员
<u-modal
...
...
@@ -722,7 +722,7 @@ export default {
{
name
:
'arrangeCode'
,
label
:
'编排单号'
,
width
:
20
0
,
width
:
12
0
,
cellFun
:
(
row
,
index
)
=>
{
console
.
log
(
row
,
index
)
this
.
tableDataDetail
=
row
.
proWorkorderList
;
...
...
@@ -771,7 +771,7 @@ export default {
{
name
:
'taskCode'
,
label
:
'任务单号'
,
width
:
1
8
0
width
:
1
2
0
},
// {
// name: 'workorderCode',
...
...
@@ -1057,9 +1057,10 @@ userTempVisible: false,
return
;
}
const
params
=
{
arrangeCode
:
this
.
tableSelectData
[
0
].
arrangeCode
||
''
,
processId
:
this
.
tableSelectData
[
0
].
processId
,
workunitId
:
this
.
vuex_workunit
.
workunitId
taskWorkunitId
:
this
.
tableSelectData
[
0
].
taskWorkunitId
// arrangeCode: this.tableSelectData[0].arrangeCode || '',
// processId: this.tableSelectData[0].processId,
// workunitId: this.vuex_workunit.workunitId
};
const
records
=
await
this
.
$u
.
api
.
dModel
.
getRecordsByProcessIdAndArrangeCode
(
params
);
// 如果有数据
...
...
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