Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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-ui
Commits
ca559b17
Commit
ca559b17
authored
Sep 03, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
8aee2646
abc532dd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
979 additions
and
616 deletions
+979
-616
dataGrid.vue
components/page/dataGrid.vue
+75
-0
process.vue
components/page/import/process.vue
+2
-3
process.vue
pages/import/process.vue
+207
-5
index.vue
pages/materiel/masterData/index.vue
+326
-333
masterData.vue
pages/materiel/masterData/masterData.vue
+83
-2
index.vue
pages/technology/details/routingsupporting/index.vue
+286
-273
No files found.
components/page/dataGrid.vue
View file @
ca559b17
...
...
@@ -100,6 +100,8 @@ export default {
userConfig
:
null
,
//用户页面配置信息。,
// userId: 1
userId
:
this
.
$store
.
state
.
userInfo
.
userId
,
treeData
:
[],
//物料数据
codeRuleData
:
[],
//物料编码
};
},
props
:
{
...
...
@@ -271,6 +273,9 @@ export default {
this
.
$dragging
.
$on
(
"dragend"
,
(
e
)
=>
{
this
.
saveUserconfig
();
});
//物料加载类型数据
this
.
getTreeData
();
this
.
getcodeRuleData
();
},
methods
:
{
//数据加载
...
...
@@ -513,6 +518,7 @@ export default {
const
tHeader
=
[];
// 设置Excel的表格第一行的标题
const
filterVal
=
[];
//list里对象的属性
var
tempCol
=
[];
var
tempCol1
=
[];
var
columnsCur
=
this
.
$u
.
clone
(
this
.
columnsNow
);
//导出列标题信息griddata this.$refs.grid.columnsCur
columnsCur
.
forEach
((
el
)
=>
{
if
((
el
.
hide
&&
!
el
.
import
)
||
(
!
el
.
hide
&&
el
.
key
!=
"action"
&&
el
.
type
!=
"selection"
&&
el
.
key
!=
"ico"
))
{
...
...
@@ -522,6 +528,12 @@ export default {
code
:
el
.
code
});
//临时存放code数据字典的字段及对应的数据字典code
}
if
(
el
.
materialKey
)
{
tempCol1
.
push
({
key
:
el
.
key
,
code
:
el
.
materialKey
});
//临时存放物料管理大类和子类列表
}
tHeader
.
push
(
el
.
title
);
filterVal
.
push
(
el
.
key
);
}
...
...
@@ -534,7 +546,19 @@ export default {
e
[
ele
.
key
]
);
});
//导出数据增加对应的物料管理信息
tempCol1
.
forEach
((
elcol1
)
=>
{
if
(
elcol1
.
code
==
1
)
{
e
[
elcol1
.
key
]
=
this
.
getType1
(
e
[
elcol1
.
key
])
}
else
if
(
elcol1
.
code
==
2
)
{
e
[
elcol1
.
key
]
=
this
.
getType2
(
e
[
elcol1
.
key
])
}
else
if
(
elcol1
.
code
==
3
)
{
e
[
elcol1
.
key
]
=
this
.
getType3
(
e
[
elcol1
.
key
])
}
});
});
let
nowDate
=
this
.
$u
.
getNowTime
();
//年月日时分秒yyyyMMddhhmmss
//获取导出数据结束
this
.
$u
.
outExcel
(
this
.
exportTitle
+
...
...
@@ -545,6 +569,57 @@ export default {
);
});
},
//物料大类和子类的解析start
getTreeData
()
{
let
data
=
{
conditions
:
[]
};
this
.
$api
.
post
(
`
${
material
}
/category/list`
,
data
).
then
((
r
)
=>
{
this
.
treeData
=
r
.
result
});
},
getType1
(
val
)
{
let
tempTreeList
=
this
.
$u
.
clone
(
this
.
treeData
)
let
rootName
=
""
tempTreeList
.
forEach
(
ele
=>
{
if
(
ele
.
upId
==
0
&&
ele
.
id
==
val
)
{
rootName
=
ele
.
name
}
})
return
rootName
},
getType2
(
val
)
{
let
tempTreeList
=
this
.
$u
.
clone
(
this
.
treeData
)
let
childrenName
=
""
tempTreeList
.
forEach
(
ele
=>
{
if
(
ele
.
upId
>
0
&&
ele
.
id
==
val
)
{
childrenName
=
ele
.
name
}
})
return
childrenName
},
//获取编码名称
getcodeRuleData
()
{
let
data
=
{
conditions
:
[]
};
this
.
$api
.
post
(
`
${
material
}
/coderule/paged`
,
data
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
codeRuleData
=
r
.
result
.
items
||
[]
}
});
},
getType3
(
val
)
{
let
codeRuleDataList
=
this
.
$u
.
clone
(
this
.
codeRuleData
)
let
codeRuleName
=
""
codeRuleDataList
.
forEach
(
ele
=>
{
if
(
ele
.
id
==
val
)
{
codeRuleName
=
ele
.
name
}
})
return
codeRuleName
},
//物料大类和子类的解析end
},
computed
:
{
columnsNow
()
{
...
...
components/page/import/process.vue
View file @
ca559b17
...
...
@@ -50,7 +50,7 @@
</FormItem>
</Form>
</FooterToolbar>
<Modal
v-model=
"infoModal"
:title=
"
titleInfo
"
fullscreen
>
<Modal
v-model=
"infoModal"
:title=
"
modalTitles
"
fullscreen
>
<DataGrid
:tool=
"false"
:page=
"false"
:columns=
"colsIm"
:data=
"dataIm"
:height=
"tdHeightExcel+30"
ref=
"dataImport"
></DataGrid>
<div
slot=
"footer"
>
<Button
@
click=
"infoModal=false"
>
关闭
</Button>
...
...
@@ -236,7 +236,6 @@ export default {
}
});
}
arrTitleUse
.
forEach
((
elem
)
=>
{
if
(
eles
[
elem
.
key
]
&&
eles
[
elem
.
key
]
!=
""
&&
eles
[
elem
.
key
]
!=
null
)
{
//如果数据字典项对应的DirName字段存在,通过name查询到对应的code,然后赋值
...
...
@@ -246,9 +245,9 @@ export default {
);
}
});
})
this
.
dataIm
=
useData
;
let
tempData
=
this
.
$u
.
clone
(
this
.
dataIm
);
this
.
$emit
(
"on-get-data"
,
tempData
)
},
...
...
pages/import/process.vue
View file @
ca559b17
This diff is collapsed.
Click to expand it.
pages/materiel/masterData/index.vue
View file @
ca559b17
This diff is collapsed.
Click to expand it.
pages/materiel/masterData/masterData.vue
View file @
ca559b17
...
...
@@ -47,6 +47,8 @@ export default {
selectRows
:
[],
rowsTable
:
[],
fullscreen
:
false
,
treeData
:
[],
codeRuleData
:
[],
detail
:
null
,
temTitle
:
"物料管理"
,
sets
:
v
=>
{
...
...
@@ -74,15 +76,40 @@ export default {
align
:
"center"
,
code
:
"material.code.type"
},
{
key
:
"codeRuleId"
,
title
:
"编码名称"
,
materialKey
:
'3'
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
this
.
getType3
(
params
.
row
.
codeRuleId
)
);
}
},
{
key
:
"rootCategoryId"
,
title
:
"大类
编号
"
,
title
:
"大类"
,
align
:
"right"
,
materialKey
:
'1'
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
this
.
getType1
(
params
.
row
.
rootCategoryId
)
);
}
},
{
key
:
"categoryId"
,
title
:
"子类
编号
"
,
title
:
"子类"
,
align
:
"right"
,
materialKey
:
'2'
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
this
.
getType2
(
params
.
row
.
categoryId
)
);
}
},
{
key
:
"code"
,
...
...
@@ -214,6 +241,8 @@ export default {
});
},
mounted
()
{
this
.
getTreeData
()
this
.
getcodeRuleData
()
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
...
...
@@ -401,6 +430,7 @@ export default {
categoryId
:
this
.
nodeInfo
.
categoryId
,
//左侧树点击的id
customProperties
:
{},
rootCategoryId
:
this
.
nodeInfo
.
rootCategoryId
,
//左侧树点击的数据的最顶层id
codeRuleType
:
this
.
nodeInfo
.
codeRuleType
};
this
.
addCol
.
forEach
(
el
=>
{
obj
[
el
.
field
]
=
ele
[
el
.
field
]
...
...
@@ -417,6 +447,57 @@ export default {
},
//批量导入end
//物料大类和子类的解析start
getTreeData
()
{
let
data
=
{
conditions
:
[]
};
Api
.
list
(
data
).
then
((
r
)
=>
{
this
.
treeData
=
r
.
result
});
},
getType1
(
val
)
{
let
tempTreeList
=
this
.
$u
.
clone
(
this
.
treeData
)
let
rootName
=
""
tempTreeList
.
forEach
(
ele
=>
{
if
(
ele
.
upId
==
0
&&
ele
.
id
==
val
)
{
rootName
=
ele
.
name
}
})
return
rootName
},
getType2
(
val
)
{
let
tempTreeList
=
this
.
$u
.
clone
(
this
.
treeData
)
let
childrenName
=
""
tempTreeList
.
forEach
(
ele
=>
{
if
(
ele
.
upId
>
0
&&
ele
.
id
==
val
)
{
childrenName
=
ele
.
name
}
})
return
childrenName
},
//获取编码名称
getcodeRuleData
()
{
let
data
=
{
conditions
:
[]
};
Api
.
pagedSlecet
(
data
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
codeRuleData
=
r
.
result
.
items
||
[]
}
});
},
getType3
(
val
)
{
let
codeRuleDataList
=
this
.
$u
.
clone
(
this
.
codeRuleData
)
let
codeRuleName
=
""
codeRuleDataList
.
forEach
(
ele
=>
{
if
(
ele
.
id
==
val
)
{
codeRuleName
=
ele
.
name
}
})
return
codeRuleName
},
//物料大类和子类的解析end
},
watch
:
{
nodeInfo
:
{
...
...
pages/technology/details/routingsupporting/index.vue
View file @
ca559b17
This diff is collapsed.
Click to expand it.
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