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
ximai
mes-ui
Commits
f0fa1859
Commit
f0fa1859
authored
Aug 29, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产版本修改
parent
3b5aa44e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
433 additions
and
81 deletions
+433
-81
ProogingProcess.vue
...mes/pro/productionSolution/components/ProogingProcess.vue
+282
-32
uploadTuzhi.vue
...ews/mes/pro/productionSolution/components/uploadTuzhi.vue
+113
-0
proofingInfo.vue
src/views/mes/pro/productionSolution/proofingInfo.vue
+38
-49
No files found.
src/views/mes/pro/productionSolution/components/ProogingProcess.vue
View file @
f0fa1859
This diff is collapsed.
Click to expand it.
src/views/mes/pro/productionSolution/components/uploadTuzhi.vue
0 → 100644
View file @
f0fa1859
<
template
>
<div
class=
"process-prod"
>
<!-- 上传文件弹窗 -->
<el-dialog
:visible
.
sync=
"showOpen"
width=
"800px"
:before-close=
"beforeClose"
append-to-body
title=
"上传文件"
>
<el-row>
<el-col
:span=
"3"
>
<el-upload
class=
"upload-demo"
ref=
"upload"
:action=
"baseURL + '/common/uploadMinio '"
:before-upload=
"handleBeforeUpload"
:on-success=
"handleUploadSuccess"
:on-error=
"handleUploadError"
name=
"file"
:headers=
"headers"
:show-file-list=
"false"
>
<el-button
size=
"small"
type=
"primary"
:loading=
"loading"
>
选择文件上传
</el-button>
</el-upload>
</el-col>
</el-row>
<div
class=
"upload-list"
>
<el-table
:data=
"uploadlist"
>
<el-table-column
align=
"left"
label=
"名称"
width=
"215"
prop=
"name"
>
<template
slot-scope=
"scope"
>
<i
class=
"el-icon-document"
></i>
{{
scope
.
row
.
name
}}
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"大小"
prop=
"size"
/>
<el-table-column
align=
"center"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"delItem(scope.row, scope.$index)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
getToken
}
from
"@/utils/auth"
;
export
default
{
props
:
{
process
:
{
type
:
Object
,
default
:
()
=>
({}),
}
},
data
()
{
return
{
uploadlist
:
[{
name
:
'sadas'
,
url
:
'ads'
}],
baseURL
:
process
.
env
.
VUE_APP_BASE_API
,
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
showOpen
:
false
,
loading
:
false
}
},
created
(){
},
methods
:
{
beforeClose
(
done
)
{
// 更新父组件的processItemList
this
.
$emit
(
"updateItem"
,
this
.
uploadlist
);
done
();
},
handleBeforeUpload
(
file
)
{
this
.
loading
=
true
// 校检文件后缀名
// if(file && file.name && file.name.substring(file.name.lastIndexOf('.') + 1) === 'apk') {
return
true
;
// } else {
// this.$message.error('请上传APK安装包');
// this.loading = false
// return false;
// }
},
delItem
(
item
,
index
)
{
this
.
uploadlist
.
splice
(
index
,
1
)
},
handleUploadSuccess
(
res
,
file
)
{
this
.
loading
=
false
// 如果上传成功
if
(
res
.
code
==
200
)
{
this
.
uploadlist
.
push
({
url
:
url
,
name
:
file
.
name
,
size
:
file
.
size
})
this
.
$message
.
success
(
"文件上传成功"
);
}
else
{
this
.
$message
.
error
(
"文件上传失败"
);
}
this
.
$refs
.
upload
.
clearFiles
();
},
handleUploadError
()
{
this
.
loading
=
false
this
.
$message
.
error
(
"文件上传失败"
);
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.el-icon-document
{
color
:
#3578ff
;
}
</
style
>
\ No newline at end of file
src/views/mes/pro/productionSolution/proofingInfo.vue
View file @
f0fa1859
...
...
@@ -28,7 +28,6 @@
<el-form-item
label=
"生产版本编码"
prop=
"productionSolutionCode"
>
<el-input
v-model=
"form.productionSolutionCode"
disabled
placeholder
></el-input>
</el-form-item>
...
...
@@ -37,35 +36,20 @@
<el-form-item
label=
"生产版本名称"
prop=
"productionSolutionName"
>
<el-input
v-model=
"form.productionSolutionName"
disabled
placeholder
></el-input>
</el-form-item>
</el-col>
<el-col
:lg=
"6"
:md=
"8"
:sm=
"12"
:xs=
"12"
>
<el-form-item
label=
"生产版本类型"
prop=
"productionSolutionType"
>
<el-select
v-model=
"form.productionSolutionType"
clearable
placeholder=
"请选择项目类别"
>
<el-option
v-for=
"dict in dict.type.production_solution_type"
: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"
>
<el-form-item
label=
"生产用途"
prop=
"usageName"
>
<el-input
v-model=
"form.usageName"
disabled
placeholder
></el-input>
<el-form-item
label=
"产品编码"
prop=
"itemCode"
>
<el-input
:disabled=
"mode == 'info'"
v-model=
"form.itemCode"
placeholder=
"请选择产品"
>
<el-button
slot=
"append"
v-if=
"mode !== 'info'"
@
click=
"handleSelectProduct"
icon=
"el-icon-search"
></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col
:lg=
"6"
:md=
"8"
:sm=
"12"
:xs=
"12"
>
...
...
@@ -106,8 +90,6 @@
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:lg=
"6"
:md=
"8"
:sm=
"12"
:xs=
"12"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
...
...
@@ -122,19 +104,20 @@
</el-form>
<el-tabs
type=
"border-card"
@
tab-click=
"tabClick"
>
<
el-tab-pane
label=
"BOM"
>
<ProogingBom
ref=
"ProogingBomRef"
/>
<
/el-tab-pane
>
<
!-- <el-tab-pane label="BOM" style="display: none"> --
>
<ProogingBom
ref=
"ProogingBomRef"
style=
"display: none"
/>
<
!-- </el-tab-pane> --
>
<el-tab-pane
label=
"工艺"
>
<ProogingProcess
ref=
"ProogingProcessRef"
:bomList=
"bomList"
/>
</el-tab-pane>
</el-tabs>
</PageWrapper>
<ItemSelect
ref=
"itemSelect"
@
onSelected=
"onItemSelected"
>
</ItemSelect>
</div>
</template>
<
script
>
//
import { genCode } from "@/api/system/autocode/rule";
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
ProogingBom
from
"./components/ProogingBom.vue"
;
import
ProogingProcess
from
"./components/ProogingProcess.vue"
;
import
ItemSelect
from
"@/components/itemSelect/single.vue"
;
...
...
@@ -156,7 +139,6 @@ export default {
ItemSelect
,
RoutesProcessSelect
},
dicts
:
[
"production_solution_type"
,
"production_solution_usage"
],
provide
()
{
return
{
mode
:
this
.
mode
,
...
...
@@ -195,6 +177,7 @@ export default {
remark
:
""
,
createBy
:
""
,
createTime
:
""
,
itemCode
:
""
,
updateBy
:
""
,
updateTime
:
""
,
},
...
...
@@ -222,6 +205,7 @@ export default {
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
productionSolutionId
&&
this
.
productionSolutionId
!==
this
.
$route
.
query
.
productionSolutionId
)
{
this
.
productionSolutionId
=
this
.
$route
.
query
.
productionSolutionId
}
if
(
this
.
mode
===
'apply'
)
this
.
handleAutoGenChange
()
this
.
getFormInfo
();
},
activated
()
{
...
...
@@ -232,6 +216,25 @@ export default {
}
},
methods
:
{
//自动生成编码
handleAutoGenChange
()
{
genCode
(
"PRO_SOLUTION_CODE"
).
then
((
response
)
=>
{
this
.
form
.
productionSolutionCode
=
response
;
});
},
//物料选择弹出框
onItemSelected
(
obj
)
{
if
(
obj
!=
undefined
&&
obj
!=
null
)
{
this
.
form
.
itemCode
=
obj
.
itemCode
;
this
.
form
.
itemName
=
obj
.
itemName
;
this
.
form
.
sapItemCode
=
obj
.
sapItemCode
;
this
.
form
.
productionSolutionName
=
obj
.
itemName
;
this
.
form
.
unitOfMeasure
=
obj
.
unitOfMeasure
;
}
},
handleSelectProduct
()
{
this
.
$refs
.
itemSelect
.
showFlag
=
true
;
},
/** 根据 id 获取页面数据 */
getFormInfo
()
{
if
(
this
.
mode
!=
"apply"
)
{
...
...
@@ -244,7 +247,7 @@ export default {
// 设置组件数据
this
.
$refs
[
"ProogingBomRef"
].
form2
=
data
.
bomHead
;
this
.
$refs
[
"ProogingBomRef"
].
tableData
=
data
.
bomHead
.
bomItemList
;
this
.
$refs
[
"ProogingProcessRef"
].
tableData
=
data
.
processList
;
this
.
$refs
[
"ProogingProcessRef"
].
setList
(
data
.
processList
)
})
.
finally
(()
=>
{
this
.
loading
=
false
;
...
...
@@ -264,21 +267,6 @@ export default {
this
.
form
.
unit
=
row
.
unitOfMeasure
;
}
},
onRoutesProcessSelect
(
row
)
{
if
(
row
!=
undefined
&&
row
!=
null
)
{
this
.
form
.
routeId
=
row
.
routeId
;
this
.
form
.
routeName
=
row
.
routeName
;
const
params
=
{
pageNum
:
1
,
pageSize
:
1000
,
routeId
:
row
.
routeId
,
};
listRouteprocess
(
params
).
then
(({
rows
})
=>
{
this
.
$refs
[
"ProogingProcessRef"
].
setList
(
rows
);
});
}
},
/**提交 */
saveForm
()
{
const
bomHead
=
this
.
$refs
.
ProogingBomRef
.
getComData
();
...
...
@@ -286,7 +274,8 @@ export default {
const
params
=
{
...
this
.
form
,
bomHead
,
processList
processList
,
specificationSheet
:
{}
};
this
.
loading
=
true
;
if
(
this
.
mode
==
"apply"
)
{
...
...
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