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
9a4f0086
Commit
9a4f0086
authored
Jan 22, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作单元自动编码;产品转正式;
parent
00032dbb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
267 additions
and
178 deletions
+267
-178
mdItem.js
src/api/mes/md/mdItem.js
+8
-0
index.vue
src/views/index.vue
+142
-142
index.vue
src/views/mes/md/factory/index.vue
+13
-7
index.vue
src/views/mes/md/product/index.vue
+30
-3
index.vue
src/views/mes/md/workunit/index.vue
+74
-26
No files found.
src/api/mes/md/mdItem.js
View file @
9a4f0086
...
...
@@ -42,3 +42,11 @@ export function delMdItem(itemId) {
method
:
'delete'
})
}
// 临时产品转正式
export
function
becomeFormalProduct
(
itemId
)
{
return
request
({
url
:
'/mes/md/mditem/becomeFormalProduct/'
+
itemId
,
method
:
'put'
})
}
src/views/index.vue
View file @
9a4f0086
<
template
>
<div
class=
"dashboard-editor-container"
>
<!--
<div
class=
"dashboard-editor-container"
>
--
>
<panel-group
@
handleSetLineChartData=
"handleSetLineChartData"
/
>
<!--
<panel-group
@
handleSetLineChartData=
"handleSetLineChartData"
/>
--
>
<el-row
:gutter=
"32"
style=
"padding:16px 16px 0;margin-bottom:32px;"
>
<el-card
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
生产进度
</span
>
</div
>
<el-table
v-loading=
"loading"
:data=
"workorderList"
row-key=
"workorderId"
default-expand-all
:tree-props=
"
{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column
label=
"工单编码"
width=
"180"
prop=
"workorderCode"
>
<template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleView(scope.row)"
v-hasPermi=
"['mes:pro:workorder:query']"
>
{{
scope
.
row
.
workorderCode
}}
</el-button
>
</
template
>
</el-table-column
>
<el-table-column
label=
"订单编号"
width=
"140"
align=
"center"
prop=
"sourceCode"
/>
<el-table-column
label=
"客户名称"
align=
"center"
prop=
"clientName"
:show-overflow-tooltip=
"true"
/
>
<el-table-column
label=
"产品编号"
width=
"120"
align=
"center"
prop=
"productCode"
/
>
<el-table-column
label=
"产品名称"
width=
"250px"
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"
width=
"200px"
>
<
template
slot-scope=
"scope"
>
<el-progress
:text-inside=
"true"
:stroke-width=
"20"
:percentage=
"parseFloat(((scope.row.quantityProduced/scope.row.quantity*100).toFixed(2)))"
></el-progress
>
</
template
>
</el-table-column>
<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
>
<
/el-card
>
<
/el-row
>
<!--
<el-row
:gutter=
"32"
style=
"padding:16px 16px 0;margin-bottom:32px;"
>
--
>
<!--
<el-card>
--
>
<!--
<div
slot=
"header"
class=
"clearfix"
>
--
>
<!--
<span>
生产进度
</span>
--
>
<!--
</div>
--
>
<!--
<el-table-->
<!-- v-loading="loading"-->
<!-- :data="workorderList"-->
<!-- row-key="workorderId"-->
<!-- default-expand-all-->
<!-- :tree-props="
{children: 'children', hasChildren: 'hasChildren'}"-->
<!-- >--
>
<!--
<el-table-column
label=
"工单编码"
width=
"180"
prop=
"workorderCode"
>
--
>
<!--
<template
slot-scope=
"scope"
>
--
>
<!--
<el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="handleView(scope.row)"-->
<!-- v-hasPermi="['mes:pro:workorder:query']"-->
<!-- >
{{
scope
.
row
.
workorderCode
}}
</el-button>
--
>
<!--
</
template
>
--
>
<!-- </el-table-column>--
>
<!-- <el-table-column label="订单编号" width="140" align="center" prop="sourceCode" />-->
<!-- <el-table-column label="客户名称" align="center" prop="clientName" :show-overflow-tooltip="true"/>--
>
<!-- <el-table-column label="产品编号" width="120" align="center" prop="productCode" />--
>
<!-- <el-table-column label="产品名称" width="250px" 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" width="200px" >--
>
<!-- <template slot-scope="scope">--
>
<!-- <el-progress :text-inside="true" :stroke-width="20" :percentage="parseFloat(((scope.row.quantityProduced/scope.row.quantity*100).toFixed(2)))"></el-progress>--
>
<!-- </template>--
>
<!-- </el-table-column>-->
<!-- <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>--
>
<!-- </el-card>--
>
<!-- </el-row>--
>
<
el
-
row
style
=
"background:#fff;padding:16px 16px 0; margin-bottom:32px;"
>
<
line
-
chart
:
chart
-
data
=
"lineChartData"
/
>
<
/el-row
>
<!-- <el-row style="background:#fff;padding:16px 16px 0; margin-bottom:32px;">--
>
<!-- <line-chart :chart-data="lineChartData" />--
>
<!-- </el-row>--
>
<
el
-
row
:
gutter
=
"32"
>
<
el
-
col
:
xs
=
"24"
:
sm
=
"24"
:
lg
=
"8"
>
<
div
class
=
"chart-wrapper"
>
<
raddar
-
chart
/
>
<
/div
>
<
/el-col
>
<
el
-
col
:
xs
=
"24"
:
sm
=
"24"
:
lg
=
"8"
>
<
div
class
=
"chart-wrapper"
>
<
pie
-
chart
/
>
<
/div
>
<
/el-col
>
<
el
-
col
:
xs
=
"24"
:
sm
=
"24"
:
lg
=
"8"
>
<
div
class
=
"chart-wrapper"
>
<
bar
-
chart
/
>
<
/div
>
<
/el-col
>
<
/el-row
>
<!-- <el-row :gutter="32">--
>
<!-- <el-col :xs="24" :sm="24" :lg="8">--
>
<!-- <div class="chart-wrapper">--
>
<!-- <raddar-chart />--
>
<!-- </div>--
>
<!-- </el-col>--
>
<!-- <el-col :xs="24" :sm="24" :lg="8">--
>
<!-- <div class="chart-wrapper">--
>
<!-- <pie-chart />--
>
<!-- </div>--
>
<!-- </el-col>--
>
<!-- <el-col :xs="24" :sm="24" :lg="8">--
>
<!-- <div class="chart-wrapper">--
>
<!-- <bar-chart />--
>
<!-- </div>--
>
<!-- </el-col>--
>
<!-- </el-row>--
>
<
/div
>
<!-- </div>--
>
</template>
<
script
>
import
{
listWorkorder
}
from
"@/api/mes/pro/workorder"
;
import
PanelGroup
from
'./dashboard/PanelGroup'
import
LineChart
from
'./dashboard/LineChart'
import
RaddarChart
from
'./dashboard/RaddarChart'
import
PieChart
from
'./dashboard/PieChart'
import
BarChart
from
'./dashboard/BarChart'
<
!--<script>--
>
<!--import { listWorkorder } from "@/api/mes/pro/workorder";-->
<!--import PanelGroup from './dashboard/PanelGroup'-->
<!--import LineChart from './dashboard/LineChart'-->
<!--import RaddarChart from './dashboard/RaddarChart'-->
<!--import PieChart from './dashboard/PieChart'-->
<!--import BarChart from './dashboard/BarChart'-->
const
lineChartData
=
{
newVisitis
:
{
expectedData
:
[
100
,
120
,
161
,
134
,
105
,
160
,
165
],
actualData
:
[
120
,
82
,
91
,
154
,
162
,
140
,
145
]
}
,
messages
:
{
expectedData
:
[
200
,
192
,
120
,
144
,
160
,
130
,
140
],
actualData
:
[
180
,
160
,
151
,
106
,
145
,
150
,
130
]
}
,
purchases
:
{
expectedData
:
[
80
,
100
,
121
,
104
,
105
,
90
,
100
],
actualData
:
[
120
,
90
,
100
,
138
,
142
,
130
,
130
]
}
,
shoppings
:
{
expectedData
:
[
130
,
140
,
141
,
142
,
145
,
150
,
160
],
actualData
:
[
120
,
82
,
91
,
154
,
162
,
140
,
130
]
}
}
<!--const lineChartData = {-->
<!-- newVisitis: {-->
<!-- expectedData: [100, 120, 161, 134, 105, 160, 165],-->
<!-- actualData: [120, 82, 91, 154, 162, 140, 145]-->
<!-- },-->
<!-- messages: {-->
<!-- expectedData: [200, 192, 120, 144, 160, 130, 140],-->
<!-- actualData: [180, 160, 151, 106, 145, 150, 130]-->
<!-- },-->
<!-- purchases: {-->
<!-- expectedData: [80, 100, 121, 104, 105, 90, 100],-->
<!-- actualData: [120, 90, 100, 138, 142, 130, 130]-->
<!-- },-->
<!-- shoppings: {-->
<!-- expectedData: [130, 140, 141, 142, 145, 150, 160],-->
<!-- actualData: [120, 82, 91, 154, 162, 140, 130]-->
<!-- }-->
<!--}-->
export
default
{
name
:
'Index'
,
components
:
{
PanelGroup
,
LineChart
,
RaddarChart
,
PieChart
,
BarChart
}
,
data
()
{
return
{
loading
:
true
,
queryParams
:
{
status
:
'CONFIRMED'
}
,
workorderList
:
[],
lineChartData
:
lineChartData
.
newVisitis
}
}
,
created
(){
this
.
getList
();
}
,
methods
:
{
getList
()
{
this
.
loading
=
true
;
listWorkorder
(
this
.
queryParams
).
then
(
response
=>
{
this
.
workorderList
=
response
.
rows
;
this
.
loading
=
false
;
}
);
}
,
handleSetLineChartData
(
type
)
{
this
.
lineChartData
=
lineChartData
[
type
]
}
}
}
<
/script
>
<!--export default {-->
<!-- name: 'Index',-->
<!-- components: {-->
<!-- PanelGroup,-->
<!-- LineChart,-->
<!-- RaddarChart,-->
<!-- PieChart,-->
<!-- BarChart-->
<!-- },-->
<!-- data() {-->
<!-- return {-->
<!-- loading: true,-->
<!-- queryParams: {status:'CONFIRMED'},-->
<!-- workorderList: [],-->
<!-- lineChartData: lineChartData.newVisitis-->
<!-- }-->
<!-- },-->
<!-- created(){-->
<!-- this.getList();-->
<!-- },-->
<!-- methods: {-->
<!-- getList() {-->
<!-- this.loading = true;-->
<!-- listWorkorder(this.queryParams).then(response => {-->
<!-- this.workorderList = response.rows;-->
<!-- this.loading = false;-->
<!-- });-->
<!-- },-->
<!-- handleSetLineChartData(type) {-->
<!-- this.lineChartData = lineChartData[type]-->
<!-- }-->
<!-- }-->
<!--}-->
<
!--</script>--
>
<
style
lang
=
"scss"
scoped
>
.
dashboard
-
editor
-
container
{
padding
:
32
px
;
background
-
color
:
rgb
(
240
,
242
,
245
);
position
:
relative
;
<
!--<style lang="scss" scoped>--
>
<!--.dashboard-editor-container {-->
<!-- padding: 32px;-->
<!-- background-color: rgb(240, 242, 245);-->
<!-- position: relative;-->
.
chart
-
wrapper
{
background
:
#
fff
;
padding
:
16
px
16
px
0
;
margin
-
bottom
:
32
px
;
}
}
<!-- .chart-wrapper {-->
<!-- background: #fff;-->
<!-- padding: 16px 16px 0;-->
<!-- margin-bottom: 32px;-->
<!-- }-->
<!--}-->
@
media
(
max
-
width
:
1024
px
)
{
.
chart
-
wrapper
{
padding
:
8
px
;
}
}
<
/style
>
<!--@media (max-width:1024px) {-->
<!-- .chart-wrapper {-->
<!-- padding: 8px;-->
<!-- }-->
<!--}-->
<
!--</style>--
>
src/views/mes/md/factory/index.vue
View file @
9a4f0086
...
...
@@ -127,15 +127,21 @@
<el-form-item
label=
"工厂名称"
prop=
"factoryName"
>
<el-input
v-model=
"form.factoryName"
placeholder=
"请输入工厂名称"
/>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"enableFlag"
>
<el-
select
v-model=
"form.enableFlag"
placeholder=
"请选择是或否
"
>
<el-
option
<el-form-item
label=
"是否启用"
>
<el-
radio-group
v-model=
"form.enableFlag"
disabled
v-if=
"optType=='view'
"
>
<el-
radio
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
</el-radio-group>
<el-radio-group
v-model=
"form.enableFlag"
v-else
>
<el-radio
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
placeholder=
"请输入备注"
/>
...
...
src/views/mes/md/product/index.vue
View file @
9a4f0086
...
...
@@ -75,7 +75,7 @@
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['mes:md:
faceColor
:add']"
v-hasPermi=
"['mes:md:
mditem
:add']"
>
新增
</el-button
>
</el-col>
...
...
@@ -87,7 +87,7 @@
size=
"mini"
:disabled=
"single"
@
click=
"handleUpdate"
v-hasPermi=
"['mes:md:
faceColor
:edit']"
v-hasPermi=
"['mes:md:
mditem
:edit']"
>
修改
</el-button
>
</el-col>
...
...
@@ -99,10 +99,22 @@
size=
"mini"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['mes:md:
faceColor
:remove']"
v-hasPermi=
"['mes:md:
mditem
:remove']"
>
删除
</el-button
>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
plain
icon=
"el-icon-edit"
size=
"mini"
:disabled=
"multiple"
@
click=
"handBecomeFormalProduct"
v-hasPermi=
"['mes:md:mditem:becomeFormalProduct']"
>
转正式产品
</el-button
>
</el-col>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
...
...
@@ -627,6 +639,7 @@ import {
delMdItem
,
addMdItem
,
updateMdItem
,
becomeFormalProduct
,
}
from
"@/api/mes/md/mdItem"
;
import
BaseInfo
from
"./components/baseInfo.vue"
;
...
...
@@ -939,6 +952,20 @@ export default {
})
.
catch
(()
=>
{});
},
/** 临时产品转正式按钮操作 */
handBecomeFormalProduct
(
row
){
const
itemIds
=
row
.
itemId
||
this
.
ids
;
this
.
$modal
.
confirm
(
"确认转正式产品?"
)
.
then
(
function
()
{
return
becomeFormalProduct
(
itemIds
);
})
.
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"转正式成功"
);
})
.
catch
(()
=>
{});
},
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
...
...
src/views/mes/md/workunit/index.vue
View file @
9a4f0086
...
...
@@ -130,31 +130,66 @@
<!-- 添加或修改工作单元对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"600px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-row>
<el-col
:span=
"20"
>
<el-form-item
label=
"工作站"
label-width=
"100px"
prop=
"workstationName"
>
<el-input
v-model=
"form.workstationName"
placeholder=
"请输入工作站"
>
<el-button
slot=
"append"
icon=
"el-icon-search"
@
click=
"handleWorkstationSelect"
></el-button>
</el-input>
</el-form-item>
<WorkstationSelect
ref=
"workstationSelect"
@
onSelected=
"onWorkstationSelected"
>
</WorkstationSelect>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"16"
>
<el-form-item
label=
"工作单元编码"
label-width=
"100px"
prop=
"workunitCode"
>
<el-input
v-model=
"form.workunitCode"
placeholder=
"请输入工作单元编码"
/>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-form-item
label-width=
"80"
>
<el-switch
v-model=
"autoGenFlag"
active-color=
"#13ce66"
active-text=
"自动生成"
@
change=
"handleAutoGenChange(autoGenFlag)"
v-if=
"optType != 'view'"
>
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"20"
>
<el-form-item
label=
"工作单元名称"
label-width=
"100px"
prop=
"workunitName"
>
<el-input
v-model=
"form.workunitName"
placeholder=
"请输入工作单元名称"
/>
</el-form-item>
<el-form-item
label=
"是否启用"
label-width=
"100px"
prop=
"enableFlag"
>
<el-select
v-model=
"form.enableFlag"
placeholder=
"请选择是或否"
>
<el-option
</el-col>
</el-row>
<el-row>
<el-col
:span=
"20"
>
<el-form-item
label=
"是否启用"
>
<el-radio-group
v-model=
"form.enableFlag"
disabled
v-if=
"optType=='view'"
>
<el-radio
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
></el-option>
</el-select>
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
</el-radio-group>
<el-radio-group
v-model=
"form.enableFlag"
v-else
>
<el-radio
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.value"
>
{{dict.label}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"20"
>
<el-form-item
label=
"备注"
label-width=
"100px"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
placeholder=
"请输入备注"
/>
</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>
...
...
@@ -168,6 +203,7 @@
<
script
>
import
{
listWorkunit
,
getWorkunit
,
delWorkunit
,
addWorkunit
,
updateWorkunit
}
from
"@/api/mes/md/workunit"
;
import
WorkstationSelect
from
"@/components/workstationSelect/simpletableSingle.vue"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
export
default
{
name
:
"Workunit"
,
...
...
@@ -190,6 +226,7 @@ export default {
total
:
0
,
// 工作单元表格数据
workunitList
:
[],
autoGenFlag
:
false
,
// 弹出层标题
title
:
""
,
// 是否显示弹出层
...
...
@@ -246,6 +283,7 @@ export default {
workunitName
:
''
,
enableFlag
:
''
,
}
this
.
autoGenFlag
=
false
;
this
.
resetForm
(
"form"
);
},
/** 搜索按钮操作 */
...
...
@@ -332,12 +370,22 @@ export default {
this
.
$refs
.
workstationSelect
.
getList
();
},
onWorkstationSelected
(
row
){
console
.
log
(
row
,
'rowwwwwww'
)
if
(
row
!=
undefined
&&
row
!=
null
){
this
.
form
.
workstationId
=
row
.
workstationId
;
this
.
form
.
workstationName
=
row
.
workstationName
;
}
},
//自动生成物料编码
handleAutoGenChange
(
autoGenFlag
){
debugger
;
if
(
autoGenFlag
){
genCode
(
'WORK_UNIT'
).
then
(
response
=>
{
this
.
form
.
workunitCode
=
response
;
});
}
else
{
this
.
form
.
workunitCode
=
null
;
}
}
}
};
</
script
>
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