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
e40d497e
Commit
e40d497e
authored
Mar 27, 2025
by
tanjunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 1.排产换型对照信息增加导入功能; 2.增加导入按钮权限
parent
32435a2f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
13 deletions
+90
-13
index.vue
src/views/mes/md/product/index.vue
+2
-2
index.vue
src/views/mes/md/workshop/index.vue
+2
-2
index.vue
src/views/mes/md/workstation/index.vue
+2
-2
index.vue
src/views/mes/md/workunit/index.vue
+2
-2
index.vue
src/views/mes/pro/arrangeRule/index.vue
+2
-2
index.vue
src/views/mes/pro/process/index.vue
+2
-2
index.vue
src/views/mes/pro/scheduleSetupRule/index.vue
+78
-1
No files found.
src/views/mes/md/product/index.vue
View file @
e40d497e
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
@
click=
"handBecomeFormalProduct"
>
转正式产品
</el-button>
@
click=
"handBecomeFormalProduct"
>
转正式产品
</el-button>
</el-col>
-->
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
v-hasPermi=
"['md:mditem:import']"
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
>
导出
</el-button>
...
@@ -336,7 +336,7 @@
...
@@ -336,7 +336,7 @@
<div
class=
"el-upload__tip"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<!-- <el-checkbox v-model="upload.updateSupport" />
<!-- <el-checkbox v-model="upload.updateSupport" />
是否更新已经存在的物料产品数据 -->
是否更新已经存在的物料产品数据 -->
物料编码重复则覆盖
<!-- 物料编码重复则覆盖 -->
</div>
</div>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
...
...
src/views/mes/md/workshop/index.vue
View file @
e40d497e
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
</el-col>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
-->
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
-->
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
v-hasPermi=
"['mes:md:workshop:import']"
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
</el-col>
<!--
<el-col
:span=
"1.5"
>
<!--
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
>
导出
</el-button>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
>
导出
</el-button>
...
@@ -201,7 +201,7 @@
...
@@ -201,7 +201,7 @@
<div
class=
"el-upload__tip"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<!-- <el-checkbox v-model="upload.updateSupport" />
<!-- <el-checkbox v-model="upload.updateSupport" />
是否更新已经存在的用户数据 -->
是否更新已经存在的用户数据 -->
车间编码重复则覆盖
<!-- 车间编码重复则覆盖 -->
</div>
</div>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
...
...
src/views/mes/md/workstation/index.vue
View file @
e40d497e
...
@@ -127,7 +127,7 @@
...
@@ -127,7 +127,7 @@
>
>
</el-col>
-->
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
v-hasPermi=
"['mes:md:workstation:import']"
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
...
@@ -516,7 +516,7 @@
...
@@ -516,7 +516,7 @@
<div
class=
"el-upload__tip"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<!-- <el-checkbox v-model="upload.updateSupport" />
<!-- <el-checkbox v-model="upload.updateSupport" />
是否更新已经存在的工作中心数据 -->
是否更新已经存在的工作中心数据 -->
工作中心编码重复则覆盖
<!-- 工作中心编码重复则覆盖 -->
</div>
</div>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
...
...
src/views/mes/md/workunit/index.vue
View file @
e40d497e
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
v-hasPermi=
"['md:workunit:remove']"
>
删除
</el-button>
v-hasPermi=
"['md:workunit:remove']"
>
删除
</el-button>
</el-col>
-->
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
v-hasPermi=
"['md:workunit:import']"
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
...
@@ -608,7 +608,7 @@
...
@@ -608,7 +608,7 @@
<div
class=
"el-upload__tip"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<!-- <el-checkbox v-model="upload.updateSupport" />
<!-- <el-checkbox v-model="upload.updateSupport" />
是否更新已经存在的工作单元数据 -->
是否更新已经存在的工作单元数据 -->
工作单元编码重复则覆盖
<!-- 工作单元编码重复则覆盖 -->
</div>
</div>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
...
...
src/views/mes/pro/arrangeRule/index.vue
View file @
e40d497e
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
>
删除
</el-button>
>
删除
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
v-hasPermi=
"['pro:ProWorkOrderArrangeRule:import']"
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
...
@@ -568,7 +568,7 @@
...
@@ -568,7 +568,7 @@
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<!-- <el-checkbox v-model="upload.updateSupport" /> -->
<!-- <el-checkbox v-model="upload.updateSupport" /> -->
货品分类与工序重复则覆盖
<!-- 货品分类与工序重复则覆盖 -->
</div>
</div>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
...
...
src/views/mes/pro/process/index.vue
View file @
e40d497e
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
>
删除
</el-button>
>
删除
</el-button>
</el-col>
-->
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
v-hasPermi=
"['mes:pro:process:import']"
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
<div
class=
"el-upload__tip"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<!-- <el-checkbox v-model="upload.updateSupport" />
<!-- <el-checkbox v-model="upload.updateSupport" />
是否更新已经存在的工序数据 -->
是否更新已经存在的工序数据 -->
工序编码重复则覆盖
<!-- 工序编码重复则覆盖 -->
</div>
</div>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
...
...
src/views/mes/pro/scheduleSetupRule/index.vue
View file @
e40d497e
...
@@ -56,6 +56,9 @@
...
@@ -56,6 +56,9 @@
v-hasPermi=
"['pro:scheduleSetupRule:remove']"
v-hasPermi=
"['pro:scheduleSetupRule:remove']"
>
删除
</el-button>
>
删除
</el-button>
</el-col>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"mini"
v-hasPermi=
"['pro:scheduleSetupRule:import']"
@
click=
"handleImport"
>
导入
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-col
:span=
"1.5"
>
<el-button
<el-button
type=
"warning"
type=
"warning"
...
@@ -229,6 +232,27 @@
...
@@ -229,6 +232,27 @@
v-if=
"open"
v-if=
"open"
@
onSelected=
"onBrandProcess"
@
onSelected=
"onBrandProcess"
></ProcessSelect>
></ProcessSelect>
<el-dialog
:title=
"upload.title"
:visible
.
sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:action=
"upload.url + '?updateSupport=' + upload.updateSupport"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__tip text-center"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<!-- <el-checkbox v-model="upload.updateSupport" />
是否更新已经存在的物料产品数据 -->
</div>
<span>
仅允许导入xls、xlsx格式文件。
</span>
<el-link
type=
"primary"
:underline=
"false"
style=
"font-size: 12px; vertical-align: baseline"
@
click=
"importTemplate"
>
下载模板
</el-link>
</div>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitFileForm"
>
确 定
</el-button>
<el-button
@
click=
"upload.open = false"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -236,6 +260,7 @@
...
@@ -236,6 +260,7 @@
import
{
listScheduleSetupRule
,
getScheduleSetupRule
,
delScheduleSetupRule
,
addScheduleSetupRule
,
updateScheduleSetupRule
}
from
"@/api/mes/pro/scheduleSetupRule"
;
import
{
listScheduleSetupRule
,
getScheduleSetupRule
,
delScheduleSetupRule
,
addScheduleSetupRule
,
updateScheduleSetupRule
}
from
"@/api/mes/pro/scheduleSetupRule"
;
import
BrandSelect
from
"@/components/itemType/single.vue"
;
import
BrandSelect
from
"@/components/itemType/single.vue"
;
import
ProcessSelect
from
"@/components/process/taskSelectSingle.vue"
;
import
ProcessSelect
from
"@/components/process/taskSelectSingle.vue"
;
import
{
getToken
}
from
"@/utils/auth"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
import
{
genCode
}
from
"@/api/system/autocode/rule"
;
export
default
{
export
default
{
...
@@ -268,6 +293,22 @@ export default {
...
@@ -268,6 +293,22 @@ export default {
ruleCode
:
null
,
itemTypeId
:
null
,
itemTypeName
:
null
,
processId
:
null
,
processName
:
null
,
tool
:
null
,
mould
:
null
,
plate
:
null
,
materialRecoil
:
null
,
sheetLength
:
null
,
sheetWidth
:
null
,
productStandard
:
null
,
proConColor
:
null
,
inlay
:
null
,
routeCode
:
null
,
productWidth
:
null
,
},
ruleCode
:
null
,
itemTypeId
:
null
,
itemTypeName
:
null
,
processId
:
null
,
processName
:
null
,
tool
:
null
,
mould
:
null
,
plate
:
null
,
materialRecoil
:
null
,
sheetLength
:
null
,
sheetWidth
:
null
,
productStandard
:
null
,
proConColor
:
null
,
inlay
:
null
,
routeCode
:
null
,
productWidth
:
null
,
},
// 表单参数
// 表单参数
form
:
{},
form
:
{},
// 用户导入参数
upload
:
{
// 是否显示弹出层(用户导入)
open
:
false
,
// 弹出层标题(用户导入)
title
:
""
,
// 是否禁用上传
isUploading
:
false
,
// 是否更新已经存在的用户数据
// updateSupport: false,
updateSupport
:
true
,
// 设置上传的请求头部
headers
:
{
Authorization
:
"Bearer "
+
getToken
()
},
// 上传的地址
url
:
process
.
env
.
VUE_APP_BASE_API
+
"/mes/pro/scheduleSetupRule/importData"
,
},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
ruleCode
:
[
ruleCode
:
[
...
@@ -399,7 +440,43 @@ export default {
...
@@ -399,7 +440,43 @@ export default {
this
.
download
(
'pro/scheduleSetupRule/export'
,
{
this
.
download
(
'pro/scheduleSetupRule/export'
,
{
...
this
.
queryParams
...
this
.
queryParams
},
`scheduleSetupRule_
${
new
Date
().
getTime
()}
.xlsx`
)
},
`scheduleSetupRule_
${
new
Date
().
getTime
()}
.xlsx`
)
}
},
/** 导入按钮操作 */
handleImport
()
{
this
.
upload
.
title
=
"导入"
;
this
.
upload
.
open
=
true
;
},
/** 下载模板操作 */
importTemplate
()
{
this
.
download
(
"mes/pro/scheduleSetupRule/importTemplate"
,
{},
`scheduleSetupRule_
${
new
Date
().
getTime
()}
.xlsx`
);
},
// 文件上传中处理
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
this
.
upload
.
isUploading
=
true
;
},
// 文件上传成功处理
handleFileSuccess
(
response
,
file
,
fileList
)
{
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
const
msg
=
response
.
msg
?
response
.
msg
:
"导入失败"
;
this
.
$alert
(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>"
+
msg
+
"</div>"
,
"导入结果"
,
{
dangerouslyUseHTMLString
:
true
}
);
this
.
getList
();
},
// 提交上传文件
submitFileForm
()
{
this
.
$refs
.
upload
.
submit
();
},
}
}
};
};
</
script
>
</
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