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
f90079af
Commit
f90079af
authored
Sep 15, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
4718be5b
2688258a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1115 additions
and
958 deletions
+1115
-958
dataGrid.vue
components/page/dataGrid.vue
+4
-2
dictionary.vue
components/page/dictionary.vue
+112
-149
zh-CN.js
i18n/locale/zh-CN.js
+2
-2
npm-shrinkwrap.json
npm-shrinkwrap.json
+12
-12
index.vue
pages/import/index.vue
+1
-1
process.vue
pages/import/process.vue
+119
-0
index.vue
pages/technology/details/routingsupporting/index.vue
+411
-438
index.vue
pages/technology/productMix/product/index.vue
+454
-354
No files found.
components/page/dataGrid.vue
View file @
f90079af
...
@@ -90,6 +90,7 @@ export default {
...
@@ -90,6 +90,7 @@ export default {
pageSize
:
20
,
pageSize
:
20
,
conditions
:
[],
conditions
:
[],
},
},
searchConditions
:
this
.
search
,
pageSizeOpts
:
[
20
,
50
,
100
],
pageSizeOpts
:
[
20
,
50
,
100
],
tableHeight
:
0
,
tableHeight
:
0
,
firstY
:
0
,
firstY
:
0
,
...
@@ -408,6 +409,7 @@ export default {
...
@@ -408,6 +409,7 @@ export default {
},
},
reload
(
conditions
)
{
reload
(
conditions
)
{
var
where
=
[];
var
where
=
[];
this
.
searchConditions
=
conditions
if
(
conditions
)
{
if
(
conditions
)
{
Object
.
keys
(
conditions
).
forEach
((
u
)
=>
{
Object
.
keys
(
conditions
).
forEach
((
u
)
=>
{
let
v
=
conditions
[
u
].
value
;
let
v
=
conditions
[
u
].
value
;
...
@@ -482,7 +484,7 @@ export default {
...
@@ -482,7 +484,7 @@ export default {
export2Excel
()
{
export2Excel
()
{
//当前显示数据
//当前显示数据
var
where
=
[];
var
where
=
[];
var
conditions
=
this
.
c
onditions
;
var
conditions
=
this
.
searchC
onditions
;
if
(
conditions
)
{
if
(
conditions
)
{
Object
.
keys
(
conditions
).
forEach
((
u
)
=>
{
Object
.
keys
(
conditions
).
forEach
((
u
)
=>
{
let
v
=
conditions
[
u
].
value
;
let
v
=
conditions
[
u
].
value
;
...
@@ -496,7 +498,7 @@ export default {
...
@@ -496,7 +498,7 @@ export default {
}
}
});
});
v
=
times
.
join
(
","
);
v
=
times
.
join
(
","
);
}
else
if
(
op
.
indexOf
(
"In"
)
>
-
1
)
{
}
else
if
(
op
.
indexOf
(
"In"
)
>
-
1
&&
Array
.
isArray
(
v
)
)
{
v
=
v
.
join
(
","
);
v
=
v
.
join
(
","
);
}
}
if
(
!
this
.
$u
.
isNull
(
v
))
{
if
(
!
this
.
$u
.
isNull
(
v
))
{
...
...
components/page/dictionary.vue
View file @
f90079af
<
template
>
<
template
>
<div>
<div>
<RadioGroup
<RadioGroup
v-if=
"type === 'radio'"
ref=
"dicradio"
v-model=
"name"
@
on-change=
"change"
:vertical=
"vertical"
>
v-if=
"type === 'radio'"
<Radio
v-for=
"(item, index) in dic"
:disabled=
"item.disabled"
:label=
"item.value"
:key=
"index"
:border=
"border"
>
ref=
"dicradio"
<span
:title=
"item.value"
>
{{
item
.
label
}}
</span>
v-model=
"name"
</Radio>
@
on-change=
"change"
:vertical=
"vertical"
>
<Radio
v-for=
"(item, index) in dic"
:disabled=
"item.disabled"
:label=
"item.value"
:key=
"index"
:border=
"border"
>
<span
:title=
"item.value"
>
{{
item
.
label
}}
</span>
</Radio>
</RadioGroup>
</RadioGroup>
<CheckboxGroup
<CheckboxGroup
v-else-if=
"type === 'checkbox'"
ref=
"dicradio"
v-model=
"name"
@
on-change=
"change"
:vertical=
"vertical"
>
v-else-if=
"type === 'checkbox'"
<Checkbox
v-for=
"(item, index) in dic"
:disabled=
"item.disabled"
:label=
"item.value"
:key=
"index"
:border=
"border"
>
ref=
"dicradio"
<span
:title=
"item.value"
>
{{
item
.
label
}}
</span>
v-model=
"name"
</Checkbox>
@
on-change=
"change"
:vertical=
"vertical"
>
<Checkbox
v-for=
"(item, index) in dic"
:disabled=
"item.disabled"
:label=
"item.value"
:key=
"index"
:border=
"border"
>
<span
:title=
"item.value"
>
{{
item
.
label
}}
</span>
</Checkbox>
</CheckboxGroup>
</CheckboxGroup>
<Select
<Select
v-else
:placeholder=
"placeholder"
v-model=
"name"
@
on-change=
"change"
:disabled=
"disabled"
:multiple=
"multiple"
clearable
:transfer=
"true"
>
v-else
<Option
v-for=
"(item, i) in dic"
:value=
"item.value"
:disabled=
"item.disabled"
:key=
"item.value"
:label=
"item.label"
>
:placeholder=
"placeholder"
<span
:title=
"item.value"
>
{{
item
.
label
}}
</span>
v-model=
"name"
</Option>
@
on-change=
"change"
:disabled=
"disabled"
:multiple=
"multiple"
clearable
:transfer=
"true"
>
<Option
v-for=
"(item, i) in dic"
:value=
"item.value"
:disabled=
"item.disabled"
:key=
"item.value"
:label=
"item.label"
>
<span
:title=
"item.value"
>
{{
item
.
label
}}
</span>
</Option>
</Select>
</Select>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
model
:
{
model
:
{
prop
:
"value"
,
prop
:
"value"
,
event
:
"on-change"
event
:
"on-change"
},
props
:
{
code
:
String
,
value
:
[
String
,
Number
,
Array
],
placeholder
:
{
type
:
String
,
default
:
"请选择"
},
type
:
{
// 显示形式: select 或者radio
type
:
String
,
default
:
"Select"
},
},
border
:
{
//radio可以选择border属性
props
:
{
type
:
Boolean
,
code
:
String
,
default
:
false
value
:
[
String
,
Number
,
Array
],
placeholder
:
{
type
:
String
,
default
:
"请选择"
},
type
:
{
// 显示形式: select 或者radio
type
:
String
,
default
:
"Select"
},
border
:
{
//radio可以选择border属性
type
:
Boolean
,
default
:
false
},
multiple
:
{
//是否多选
type
:
Boolean
,
default
:
false
},
disabled
:
{
//是否禁止选择
type
:
Boolean
,
default
:
false
},
vertical
:
{
//排列方式 水平或者垂直
type
:
Boolean
,
default
:
false
},
limit
:
{
//限制只在此值范围内进行选择,其它值禁用选择。
type
:
String
,
default
:
""
}
},
},
multiple
:
{
data
()
{
//是否多选
return
{
type
:
Boolean
,
name
:
this
.
value
,
default
:
false
data
:
[]
};
},
},
disabled
:
{
created
()
{
//是否禁止选择
this
.
data
=
this
.
$store
.
getters
.
dictionaryByKey
(
this
.
code
);
type
:
Boolean
,
default
:
false
},
},
vertical
:
{
mounted
()
{
//排列方式 水平或者垂直
// if(this.value==undefined||this.value==''||this.value==null)
type
:
Boolean
,
// {
default
:
false
// this.value=1
// }
// let v = this.value
// try {
// v = parseInt(v)
// } catch (err) {
// console.warn('数据字典值请设置为int')
// }
// this.name = v
},
},
limit
:
{
//限制只在此值范围内进行选择,其它值禁用选择。
type
:
String
,
default
:
""
}
},
data
()
{
return
{
name
:
this
.
value
,
data
:
[]
};
},
created
()
{
this
.
data
=
this
.
$store
.
getters
.
dictionaryByKey
(
this
.
code
);
},
mounted
()
{
// if(this.value==undefined||this.value==''||this.value==null)
// {
// this.value=1
// }
// let v = this.value
// try {
// v = parseInt(v)
// } catch (err) {
// console.warn('数据字典值请设置为int')
// }
// this.name = v
},
methods
:
{
methods
:
{
change
(
event
)
{
change
(
event
)
{
this
.
$emit
(
"on-change"
,
event
);
this
.
$emit
(
"on-change"
,
event
);
}
},
computed
:
{
dic
()
{
let
result
=
[];
let
limit
=
this
.
limit
.
split
(
","
);
this
.
data
.
forEach
(
u
=>
{
let
v
=
u
.
code
;
let
s
=
u
.
status
;
try
{
v
=
parseInt
(
u
.
code
);
}
catch
(
err
)
{
console
.
warn
(
"数据字典值请设置为int"
);
}
}
var
disabled
=
this
.
disabled
;
//false
},
if
(
!
this
.
disabled
&&
!
this
.
$u
.
isNull
(
this
.
limit
))
{
computed
:
{
disabled
=
limit
.
indexOf
(
v
+
""
)
==
-
1
;
dic
()
{
let
result
=
[];
let
limit
=
this
.
limit
.
split
(
","
);
this
.
data
.
forEach
(
u
=>
{
let
v
=
u
.
code
;
let
s
=
u
.
status
;
try
{
v
=
parseInt
(
u
.
code
);
}
catch
(
err
)
{
console
.
warn
(
"数据字典值请设置为int"
);
}
var
disabled
=
this
.
disabled
;
//false
if
(
!
this
.
disabled
&&
!
this
.
$u
.
isNull
(
this
.
limit
))
{
disabled
=
limit
.
indexOf
(
v
+
""
)
==
-
1
;
}
if
(
!
this
.
disabled
)
{
disabled
=
s
==
1
?
true
:
false
;
}
result
.
push
({
label
:
u
.
name
,
value
:
v
,
disabled
:
disabled
});
});
return
result
;
}
}
if
(
!
this
.
disabled
)
{
},
disabled
=
s
==
1
?
true
:
false
;
watch
:
{
value
:
{
handler
(
v
,
o
)
{
this
.
name
=
v
;
},
deep
:
true
}
}
result
.
push
({
label
:
u
.
name
,
value
:
v
,
disabled
:
disabled
});
});
return
result
;
}
}
},
watch
:
{
value
:
{
handler
(
v
,
o
)
{
this
.
name
=
v
;
},
deep
:
true
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.w200 {
.w200 {
width: 200px;
width: 200px;
}
}
</
style
>
</
style
>
i18n/locale/zh-CN.js
View file @
f90079af
...
@@ -1448,7 +1448,7 @@ export default {
...
@@ -1448,7 +1448,7 @@ export default {
product_info
:
{
product_info
:
{
mmcode
:
'物料编号'
,
mmcode
:
'物料编号'
,
materialId
:
'物料'
,
materialId
:
'物料'
,
levelId
:
'产品分类'
,
levelId
:
'产品分类
ID
'
,
type
:
"类型"
,
type
:
"类型"
,
drawingNo
:
'图号'
,
drawingNo
:
'图号'
,
name
:
'名称'
,
name
:
'名称'
,
...
@@ -1457,7 +1457,7 @@ export default {
...
@@ -1457,7 +1457,7 @@ export default {
madeCompanyTitle
:
'主承制单位'
,
madeCompanyTitle
:
'主承制单位'
,
status
:
''
,
status
:
''
,
remark
:
'备注'
,
remark
:
'备注'
,
madeCompany
:
'主承制单位'
,
madeCompany
:
'主承制单位
ID
'
,
creationTime
:
'创建时间'
,
creationTime
:
'创建时间'
,
extend
:
''
,
extend
:
''
,
productUrl
:
'产品图像'
,
productUrl
:
'产品图像'
,
...
...
npm-shrinkwrap.json
View file @
f90079af
...
@@ -4938,7 +4938,7 @@
...
@@ -4938,7 +4938,7 @@
"dependencies"
:
{
"dependencies"
:
{
"commander"
:
{
"commander"
:
{
"version"
:
"2.14.1"
,
"version"
:
"2.14.1"
,
"resolved"
:
"http
://r.cnpmjs.org/commander/download/
commander-2.14.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/commander/download/commander-2.14.1.tgz?cache=0&sync_timestamp=1595168224685&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2F
commander-2.14.1.tgz"
,
"integrity"
:
"sha1-IjUSPjevjKPGXfRbAm29NXsBuao="
"integrity"
:
"sha1-IjUSPjevjKPGXfRbAm29NXsBuao="
}
}
}
}
...
@@ -5467,7 +5467,7 @@
...
@@ -5467,7 +5467,7 @@
},
},
"crc-32"
:
{
"crc-32"
:
{
"version"
:
"1.2.0"
,
"version"
:
"1.2.0"
,
"resolved"
:
"http
://r.cnpmjs
.org/crc-32/download/crc-32-1.2.0.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/crc-32/download/crc-32-1.2.0.tgz"
,
"integrity"
:
"sha1-yy224puIUI4y2d0OwWk+e0Ghggg="
,
"integrity"
:
"sha1-yy224puIUI4y2d0OwWk+e0Ghggg="
,
"requires"
:
{
"requires"
:
{
"exit-on-epipe"
:
"~1.0.1"
,
"exit-on-epipe"
:
"~1.0.1"
,
...
@@ -7364,7 +7364,7 @@
...
@@ -7364,7 +7364,7 @@
},
},
"exit-on-epipe"
:
{
"exit-on-epipe"
:
{
"version"
:
"1.0.1"
,
"version"
:
"1.0.1"
,
"resolved"
:
"http
://r.cnpmjs
.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/exit-on-epipe/download/exit-on-epipe-1.0.1.tgz"
,
"integrity"
:
"sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI="
"integrity"
:
"sha1-C92S6H1ShdJn2qgXHQ6wYVlolpI="
},
},
"expand-brackets"
:
{
"expand-brackets"
:
{
...
@@ -8015,7 +8015,7 @@
...
@@ -8015,7 +8015,7 @@
},
},
"frac"
:
{
"frac"
:
{
"version"
:
"1.1.2"
,
"version"
:
"1.1.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/frac/download/frac-1.1.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/frac/download/frac-1.1.2.tgz"
,
"integrity"
:
"sha1-PXT39keMiKG1AgMG10fcYxPHTQs="
"integrity"
:
"sha1-PXT39keMiKG1AgMG10fcYxPHTQs="
},
},
"fragment-cache"
:
{
"fragment-cache"
:
{
...
@@ -10026,7 +10026,7 @@
...
@@ -10026,7 +10026,7 @@
},
},
"iview-loader"
:
{
"iview-loader"
:
{
"version"
:
"1.3.0"
,
"version"
:
"1.3.0"
,
"resolved"
:
"http
://r.cnpmjs
.org/iview-loader/download/iview-loader-1.3.0.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/iview-loader/download/iview-loader-1.3.0.tgz"
,
"integrity"
:
"sha1-n0Yu6uI4K4tJ746JLNloFJfjVLc="
,
"integrity"
:
"sha1-n0Yu6uI4K4tJ746JLNloFJfjVLc="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
...
@@ -11762,7 +11762,7 @@
...
@@ -11762,7 +11762,7 @@
},
},
"less-loader"
:
{
"less-loader"
:
{
"version"
:
"5.0.0"
,
"version"
:
"5.0.0"
,
"resolved"
:
"http
://r.cnpmjs.org/less-loader/download/
less-loader-5.0.0.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/less-loader/download/less-loader-5.0.0.tgz?cache=0&sync_timestamp=1598354442231&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fless-loader%2Fdownload%2F
less-loader-5.0.0.tgz"
,
"integrity"
:
"sha1-SY3eOmxsT4h0WO6e0/CGoSrRtGY="
,
"integrity"
:
"sha1-SY3eOmxsT4h0WO6e0/CGoSrRtGY="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
...
@@ -15087,7 +15087,7 @@
...
@@ -15087,7 +15087,7 @@
},
},
"printj"
:
{
"printj"
:
{
"version"
:
"1.1.2"
,
"version"
:
"1.1.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/printj/download/printj-1.1.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/printj/download/printj-1.1.2.tgz"
,
"integrity"
:
"sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI="
"integrity"
:
"sha1-2Q3rKXWoufYA+zoclOP0xTx4oiI="
},
},
"private"
:
{
"private"
:
{
...
@@ -20540,7 +20540,7 @@
...
@@ -20540,7 +20540,7 @@
},
},
"script-loader"
:
{
"script-loader"
:
{
"version"
:
"0.7.2"
,
"version"
:
"0.7.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/script-loader/download/script-loader-0.7.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/script-loader/download/script-loader-0.7.2.tgz"
,
"integrity"
:
"sha1-IBbbb4byX1z1baOJFdgzeLsWa6c="
,
"integrity"
:
"sha1-IBbbb4byX1z1baOJFdgzeLsWa6c="
,
"dev"
:
true
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
...
@@ -21128,7 +21128,7 @@
...
@@ -21128,7 +21128,7 @@
},
},
"ssf"
:
{
"ssf"
:
{
"version"
:
"0.10.3"
,
"version"
:
"0.10.3"
,
"resolved"
:
"http
://r.cnpmjs
.org/ssf/download/ssf-0.10.3.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/ssf/download/ssf-0.10.3.tgz"
,
"integrity"
:
"sha1-jq4fwpyQpVLnkhII+BiS1vd6yys="
,
"integrity"
:
"sha1-jq4fwpyQpVLnkhII+BiS1vd6yys="
,
"requires"
:
{
"requires"
:
{
"frac"
:
"~1.1.2"
"frac"
:
"~1.1.2"
...
@@ -23778,7 +23778,7 @@
...
@@ -23778,7 +23778,7 @@
},
},
"wmf"
:
{
"wmf"
:
{
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
"resolved"
:
"http
://r.cnpmjs
.org/wmf/download/wmf-1.0.2.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao
.org/wmf/download/wmf-1.0.2.tgz"
,
"integrity"
:
"sha1-fRnWIQcaCMK9xrfmiKnENSmMwto="
"integrity"
:
"sha1-fRnWIQcaCMK9xrfmiKnENSmMwto="
},
},
"word-wrap"
:
{
"word-wrap"
:
{
...
@@ -23933,7 +23933,7 @@
...
@@ -23933,7 +23933,7 @@
},
},
"xlsx"
:
{
"xlsx"
:
{
"version"
:
"0.15.6"
,
"version"
:
"0.15.6"
,
"resolved"
:
"http
://r.cnpmjs.org/xlsx/download/
xlsx-0.15.6.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/xlsx/download/xlsx-0.15.6.tgz?cache=0&sync_timestamp=1597272342311&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxlsx%2Fdownload%2F
xlsx-0.15.6.tgz"
,
"integrity"
:
"sha1-Rh+EHW2eoag3XizSRr8jrs4IodU="
,
"integrity"
:
"sha1-Rh+EHW2eoag3XizSRr8jrs4IodU="
,
"requires"
:
{
"requires"
:
{
"adler-32"
:
"~1.2.0"
,
"adler-32"
:
"~1.2.0"
,
...
@@ -23948,7 +23948,7 @@
...
@@ -23948,7 +23948,7 @@
"dependencies"
:
{
"dependencies"
:
{
"commander"
:
{
"commander"
:
{
"version"
:
"2.17.1"
,
"version"
:
"2.17.1"
,
"resolved"
:
"http
://r.cnpmjs.org/commander/download/
commander-2.17.1.tgz"
,
"resolved"
:
"http
s://registry.npm.taobao.org/commander/download/commander-2.17.1.tgz?cache=0&sync_timestamp=1595168224685&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcommander%2Fdownload%2F
commander-2.17.1.tgz"
,
"integrity"
:
"sha1-vXerfebelCBc6sxy8XFtKfIKd78="
"integrity"
:
"sha1-vXerfebelCBc6sxy8XFtKfIKd78="
}
}
}
}
...
...
pages/import/index.vue
View file @
f90079af
<
template
>
<
template
>
<div
class=
"h100"
>
<div
class=
"h100"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
exportTitle=
"导入中心"
>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
>
<template
slot=
"easySearch"
>
<template
slot=
"easySearch"
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<FormItem
prop=
"keys"
>
<FormItem
prop=
"keys"
>
...
...
pages/import/process.vue
View file @
f90079af
...
@@ -736,7 +736,73 @@ export default {
...
@@ -736,7 +736,73 @@ export default {
easy
:
true
,
easy
:
true
,
high
:
true
high
:
true
},
},
],
columns6
:
[{
title
:
this
.
l6
(
"name"
),
key
:
"name"
,
align
:
"left"
,
},
{
key
:
"mmcode"
,
title
:
this
.
l6
(
"mmcode"
),
align
:
"center"
,
high
:
true
,
},
{
key
:
"levelTitle"
,
title
:
this
.
l6
(
"levelTitle"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"levelId"
,
title
:
this
.
l6
(
"levelId"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
import
:
true
,
},
{
key
:
"drawingNo"
,
title
:
this
.
l6
(
"drawingNo"
),
align
:
"right"
,
high
:
true
,
},
{
key
:
"madeCompanyTitle"
,
title
:
this
.
l6
(
"madeCompanyTitle"
),
align
:
"center"
,
width
:
260
,
high
:
true
,
},
{
key
:
"madeCompany"
,
title
:
this
.
l6
(
"madeCompany"
),
align
:
"center"
,
width
:
260
,
high
:
true
,
hide
:
true
,
import
:
true
,
},
{
key
:
"version"
,
title
:
this
.
l6
(
"version"
),
align
:
"center"
,
width
:
260
,
high
:
true
,
hide
:
true
,
import
:
true
,
},
{
key
:
"materialId"
,
title
:
this
.
l6
(
"materialId"
),
align
:
"center"
,
width
:
260
,
high
:
true
,
hide
:
true
,
import
:
true
,
},
],
],
tdHeightExcel
:
""
,
tdHeightExcel
:
""
,
excelData
:
[],
excelData
:
[],
...
@@ -1086,6 +1152,9 @@ export default {
...
@@ -1086,6 +1152,9 @@ export default {
case
5
:
case
5
:
this
.
loadColum
(
this
.
columns5
);
this
.
loadColum
(
this
.
columns5
);
break
;
break
;
case
6
:
this
.
loadColum
(
this
.
columns6
);
break
;
default
:
default
:
this
.
loadColum
(
this
.
columns0
);
this
.
loadColum
(
this
.
columns0
);
}
}
...
@@ -1121,6 +1190,9 @@ export default {
...
@@ -1121,6 +1190,9 @@ export default {
case
5
:
case
5
:
this
.
importRountingBom
();
this
.
importRountingBom
();
break
;
break
;
case
6
:
this
.
importProductMix
();
break
;
default
:
default
:
//this.loadColum(this.columns1);
//this.loadColum(this.columns1);
}
}
...
@@ -1459,7 +1531,50 @@ export default {
...
@@ -1459,7 +1531,50 @@ export default {
return
routingHeaderId
return
routingHeaderId
},
},
//插入工艺规程 及工艺相关end
//插入工艺规程 及工艺相关end
//插入产品管理
importProductMix
()
{
let
tempData
=
this
.
$u
.
clone
(
this
.
dataIm
);
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
mmcode
:
ele
.
mmcode
?
ele
.
mmcode
:
''
,
drawingNo
:
ele
.
drawingNo
?
ele
.
drawingNo
:
''
,
name
:
ele
.
name
?
ele
.
name
:
''
,
type
:
ele
.
type
?
ele
.
type
:
1
,
madeCompany
:
ele
.
madeCompany
?
ele
.
madeCompany
:
null
,
madeCompanyTitle
:
ele
.
madeCompanyTitle
?
ele
.
madeCompanyTitle
:
""
,
version
:
ele
.
version
?
ele
.
version
:
0
,
productUrl
:
""
,
productUrlList
:
""
,
levelId
:
ele
.
levelId
?
ele
.
levelId
:
null
,
levelTitle
:
ele
.
levelTitle
?
ele
.
levelTitle
:
""
,
materialId
:
ele
.
materialId
?
ele
.
materialId
:
""
,
};
if
(
ele
.
name
&&
ele
.
name
!=
''
)
{
tempList
.
push
(
obj
);
}
});
if
(
tempList
.
length
==
0
)
{
this
.
$Message
.
error
(
"所有导入的数据均不合法!"
);
}
else
{
let
parms
=
{
list
:
tempList
,
};
let
url
=
`
${
technologyUrl
}
productinfoimportservice/import`
;
this
.
$api
.
post
(
url
,
parms
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"成功批量导入产品管理模块 "
+
tempList
.
length
+
" 条数据"
);
this
.
imBtn
=
false
;
this
.
cancelExcel
();
}
else
{
this
.
$Message
.
error
(
"批量导入失败"
)
}
}).
catch
(
err
=>
{
this
.
$Message
.
error
(
"数据异常!"
);
});
}
},
//切换列表和excel按钮
//切换列表和excel按钮
changeExcel
(
val
)
{
changeExcel
(
val
)
{
if
(
val
==
1
)
{
if
(
val
==
1
)
{
...
@@ -1495,6 +1610,10 @@ export default {
...
@@ -1495,6 +1610,10 @@ export default {
key
=
"routingsupporting"
+
"."
+
key
;
key
=
"routingsupporting"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
},
},
l6
(
key
)
{
key
=
"product_info"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
...
...
pages/technology/details/routingsupporting/index.vue
View file @
f90079af
<
template
>
<
template
>
<div>
<div>
<DataGrid
<DataGrid
:columns=
"columns"
ref=
"grid"
:conditions=
"easySearch"
:action=
"action"
exportTitle=
"工艺Bom"
>
:columns=
"columns"
<template
slot=
"easySearch"
>
ref=
"grid"
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
:conditions=
"easySearch"
<FormItem
prop=
"keys"
>
:action=
"action"
<Input
placeholder=
"请输入关键字物料名称"
v-model=
"easySearch.keys.value"
clearable
/>
exportTitle=
"工艺Bom"
</FormItem>
>
<FormItem>
<template
slot=
"easySearch"
>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
</FormItem>
<FormItem
prop=
"keys"
>
</Form>
<Input
placeholder=
"请输入关键字物料名称"
v-model=
"easySearch.keys.value"
clearable
/>
</
template
>
</FormItem>
<
template
slot=
"searchForm"
>
<FormItem>
<Search
:headid=
"hid"
/>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</
template
>
</FormItem>
<
template
slot=
"buttons"
>
</Form>
<Button
type=
"primary"
@
click=
"add"
v-if=
"headerStatus==0||headerStatus==4"
>
新增
</Button>
</
template
>
<Button
@
click=
"openModalIm"
>
导入
</Button>
<
template
slot=
"searchForm"
>
</
template
>
<Search
:headid=
"hid"
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
v-if=
"headerStatus==0||headerStatus==4"
>
新增
</Button>
<Button
@
click=
"openModalIm"
>
导入
</Button>
</
template
>
</DataGrid>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"850"
footer-hide
>
<Modal
v-model=
"modal"
:title=
"title"
width=
"850"
footer-hide
>
<component
<component
:is=
"detail"
:eid=
"curId"
:headid=
"hid"
:productBomId=
"productBomId"
:materialId=
"materialId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
:is=
"detail"
:eid=
"curId"
:headid=
"hid"
:productBomId=
"productBomId"
:materialId=
"materialId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</Modal>
<ImportExcel
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"columns"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
ref=
"importExcel"
</div>
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"columns"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
</div>
</template>
</template>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
"./api"
;
import
Search
from
"./search"
;
import
Search
from
"./search"
;
export
default
{
export
default
{
name
:
"list"
,
name
:
"list"
,
components
:
{
components
:
{
Search
,
Search
,
},
},
head
:
{
head
:
{
title
:
"工艺配套表"
,
title
:
"工艺配套表"
,
author
:
"henq"
,
author
:
"henq"
,
description
:
"routingsupporting 4/27/2020 10:35:33 AM"
,
description
:
"routingsupporting 4/27/2020 10:35:33 AM"
,
},
},
props
:
[
"headerid"
],
props
:
[
"headerid"
],
data
()
{
data
()
{
return
{
return
{
materialId
:
null
,
materialId
:
null
,
action
:
Api
.
index
,
action
:
Api
.
index
,
easySearch
:
{
easySearch
:
{
keys
:
{
keys
:
{
op
:
"nameMaterial"
,
op
:
"nameMaterial"
,
value
:
null
,
value
:
null
,
},
// routingHeaderId: { op: "Equal", value: this.headerid },
routingHeaderId
:
{
op
:
"Equal"
,
value
:
-
1
,
},
},
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
hid
:
0
,
columns
:
[{
key
:
"routingDetailNo"
,
title
:
this
.
l
(
"routingDetailNo"
),
align
:
"left"
,
high
:
true
,
width
:
100
,
sortable
:
true
,
},
{
key
:
"routingHeaderId"
,
title
:
this
.
l
(
"routingHeaderName"
),
hide
:
true
,
import
:
true
,
techKey
:
"1"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
this
.
getRoutingHeaderName
(
params
.
row
.
routingHeaderId
)
);
},
},
{
key
:
"routingDetailName"
,
title
:
this
.
l
(
"routingDetailName"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"routingDetailId"
,
title
:
this
.
l
(
"routingDetailId"
),
hide
:
true
,
import
:
true
,
},
{
key
:
"materialType"
,
title
:
this
.
l
(
"materialType"
),
align
:
"center"
,
easy
:
true
,
high
:
true
,
code
:
"mes_xingchi_resource.material.materialReType"
,
width
:
100
,
},
{
key
:
"materialNumber"
,
title
:
this
.
l
(
"materialNumber"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"materialId"
,
title
:
this
.
l
(
"materialId"
),
align
:
"left"
,
hide
:
true
,
import
:
true
,
},
{
key
:
"nameMaterial"
,
title
:
this
.
l
(
"nameMaterial"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
hide
:
false
,
type
:
"user"
,
align
:
"left"
,
},
{
key
:
"quantity"
,
title
:
this
.
l
(
"quantity"
),
high
:
true
,
width
:
80
,
},
{
key
:
"brand"
,
title
:
this
.
l
(
"brand"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"specifications"
,
title
:
this
.
l
(
"specifications"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"xhgg"
,
title
:
this
.
l
(
"xhgg"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
,
},
{
key
:
"texture"
,
title
:
this
.
l
(
"texture"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"procurementStandards"
,
title
:
this
.
l
(
"procurementStandards"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"qualityGrade"
,
title
:
this
.
l
(
"qualityGrade"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"drawNum"
,
title
:
this
.
l
(
"drawNum"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
hide
:
true
,
align
:
"left"
,
hide
:
true
,
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
hide
:
true
,
align
:
"left"
,
hide
:
true
,
type
:
"user"
,
},
// {
// key: "lastModificationTime",
// title: this.l("lastModificationTime"),
// hide: true,
// align: "left",
// hide: true,
// },
// {
// key: "lastModifierUserId",
// title: this.l("lastModifierUserId"),
// hide: true,
// align: "left",
// hide: true,
// type: "user",
// },
{
title
:
"操作"
,
key
:
"action"
,
width
:
180
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
,
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
),
},
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
,
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
),
},
},
this
.
headerStatus
==
4
||
this
.
headerStatus
==
0
?
"编辑"
:
""
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
,
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
),
},
},
this
.
headerStatus
==
4
||
this
.
headerStatus
==
0
?
"删除"
:
""
),
]
);
},
},
],
headerStatus
:
-
1
,
productBomId
:
-
1
,
ModalIm
:
false
,
temTitle
:
"工艺Bom"
,
routingHeaderData
:
[],
};
},
created
()
{
this
.
hid
=
this
.
easySearch
.
routingHeaderId
.
value
;
this
.
headerStatus
=
this
.
$route
.
query
.
headerStatus
;
this
.
productBomId
=
Number
(
this
.
$route
.
query
.
productBomId
);
if
(
this
.
headerid
!=
-
1
)
{
this
.
easySearch
.
routingHeaderId
.
value
=
this
.
headerid
;
}
else
{
this
.
easySearch
.
routingHeaderId
.
value
=
this
.
$route
.
query
.
id
;
}
},
mounted
()
{
console
.
log
(
this
);
this
.
getRoutingHeaderData
();
this
.
search
();
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
},
// routingHeaderId: { op: "Equal", value: this.headerid },
search
()
{
routingHeaderId
:
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
op
:
"Equal"
,
value
:
-
1
,
},
},
},
add
()
{
modal
:
false
,
this
.
curId
=
0
;
title
:
"新增"
,
this
.
hid
=
Number
(
this
.
headerid
);
detail
:
null
,
this
.
title
=
"新增"
;
curId
:
0
,
this
.
detail
=
()
=>
import
(
"./add"
);
hid
:
0
,
this
.
modal
=
true
;
columns
:
[
{
key
:
"routingDetailNo"
,
title
:
this
.
l
(
"routingDetailNo"
),
align
:
"left"
,
high
:
true
,
width
:
100
,
sortable
:
true
,
},
},
// {
copy
(
id
)
{
// key: "routingHeaderId",
this
.
curId
=
id
;
// title: this.l("routingHeaderName"),
this
.
title
=
"克隆"
;
// hide: true,
this
.
detail
=
()
=>
import
(
"./add"
);
// import: true,
this
.
modal
=
true
;
// techKey: "1",
// render: (h, params) => {
// return h(
// "span",
// {},
// this.getRoutingHeaderName(params.row.routingHeaderId)
// );
// },
// },
{
key
:
"routingDetailName"
,
title
:
this
.
l
(
"routingDetailName"
),
align
:
"left"
,
high
:
true
,
},
},
// {
view
(
row
)
{
// key: "routingDetailId",
this
.
curId
=
row
.
id
;
// title: this.l("routingDetailId"),
this
.
materialId
=
row
.
materialId
;
// hide: true,
this
.
title
=
"查看详情"
;
// import: true,
this
.
detail
=
()
=>
import
(
"./detail"
);
// },
this
.
modal
=
true
;
// {
// key: "materialType",
// title: this.l("materialType"),
// align: "center",
// easy: true,
// high: true,
// code: "mes_xingchi_resource.material.materialReType",
// width: 100,
// },
{
key
:
"materialNumber"
,
title
:
this
.
l
(
"materialNumber"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
},
// {
edit
(
id
)
{
// key: "materialId",
this
.
curId
=
id
;
// title: this.l("materialId"),
this
.
hid
=
Number
(
this
.
headerid
);
// align: "left",
this
.
title
=
"编辑"
;
// hide: true,
this
.
detail
=
()
=>
import
(
"./edit"
);
// import: true,
this
.
modal
=
true
;
// },
{
key
:
"nameMaterial"
,
title
:
this
.
l
(
"nameMaterial"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
},
{
remove
(
id
)
{
key
:
"creationTime"
,
Api
.
delete
(
id
).
then
((
r
)
=>
{
title
:
this
.
l
(
"creationTime"
),
if
(
r
.
success
)
{
align
:
"left"
,
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
},
{
cancel
()
{
key
:
"creatorUserId"
,
this
.
curId
=
0
;
title
:
this
.
l
(
"creatorUserId"
),
this
.
modal
=
false
;
hide
:
false
,
type
:
"user"
,
align
:
"left"
,
},
},
{
//批量导入start
key
:
"quantity"
,
//导入功能
title
:
this
.
l
(
"quantity"
),
openModalIm
()
{
high
:
true
,
this
.
ModalIm
=
true
;
width
:
80
,
},
},
// {
ModalImCancel
()
{
// key: "brand",
this
.
ModalIm
=
false
;
// title: this.l("brand"),
},
// align: "left",
getData
(
val
)
{
// easy: true,
let
url
=
`
${
technologyUrl
}
routingsupportingimportservice/import`
;
// high: true,
this
.
$refs
.
importExcel
.
deelData
(
url
,
this
.
cols
,
this
.
formatMethod
(
val
));
// },
},
// {
//根据页面二次处理数据
// key: "specifications",
formatMethod
(
val
)
{
// title: this.l("specifications"),
// alert(JSON.stringify(val))
// align: "left",
let
tempData
=
this
.
$u
.
clone
(
val
);
// easy: true,
let
tempList
=
[];
// high: true,
tempData
.
forEach
((
ele
)
=>
{
// },
let
obj
=
{
// {
routingHeaderId
:
Number
(
this
.
headerid
),
// key: "xhgg",
routingDetailId
:
ele
.
routingDetailId
?
// title: this.l("xhgg"),
Number
(
ele
.
routingDetailId
)
:
null
,
// align: "left",
routingDetailNo
:
ele
.
routingDetailNo
?
// easy: true,
Number
(
ele
.
routingDetailNo
)
:
null
,
// high: true,
routingDetailName
:
ele
.
routingDetailName
?
ele
.
routingDetailName
:
""
,
// hide: true,
routingStepId
:
0
,
// },
quantity
:
ele
.
quantity
?
Number
(
ele
.
quantity
)
:
0
,
// {
materialId
:
ele
.
materialId
?
ele
.
materialId
:
""
,
// key: "texture",
materialType
:
ele
.
materialType
?
Number
(
ele
.
materialType
)
:
""
,
// title: this.l("texture"),
materialNumber
:
ele
.
materialNumber
?
ele
.
materialNumber
:
""
,
// align: "left",
nameMaterial
:
ele
.
nameMaterial
?
ele
.
nameMaterial
:
""
,
// easy: true,
brand
:
ele
.
brand
?
ele
.
brand
:
""
,
// high: true,
specifications
:
ele
.
specifications
?
ele
.
specifications
:
""
,
// },
xhgg
:
ele
.
xhgg
?
ele
.
xhgg
:
""
,
// {
texture
:
ele
.
texture
?
ele
.
texture
:
""
,
// key: "procurementStandards",
procurementStandards
:
ele
.
procurementStandards
?
// title: this.l("procurementStandards"),
ele
.
procurementStandards
:
""
,
// align: "left",
qualityGrade
:
ele
.
qualityGrade
?
ele
.
qualityGrade
:
""
,
// easy: true,
state
:
null
,
// high: true,
extend
:
""
,
// },
remark
:
""
,
// {
drawNum
:
ele
.
drawNum
?
ele
.
drawNum
:
""
,
// key: "qualityGrade",
json
:
{}
// title: this.l("qualityGrade"),
};
// align: "left",
if
(
ele
.
routingDetailId
&&
ele
.
routingDetailId
!=
null
)
{
// easy: true,
obj
.
ico
=
false
;
// high: true,
}
else
{
// },
obj
.
ico
=
true
;
// {
}
// key: "drawNum",
tempList
.
push
(
obj
);
// title: this.l("drawNum"),
});
// align: "left",
return
tempList
;
// easy: true,
},
// high: true,
//批量导入end
// },
//工艺规程id和name之间的转换
// {
//获取工艺规程信息
// key: "creationTime",
getRoutingHeaderData
()
{
// title: this.l("creationTime"),
let
data
=
{
// hide: true,
conditions
:
[],
// align: "left",
};
// hide: true,
Api
.
getRoutingheaderList
(
data
).
then
((
r
)
=>
{
// },
if
(
r
.
success
)
{
// {
this
.
routingHeaderData
=
r
.
result
||
[];
// key: "creatorUserId",
}
// title: this.l("creatorUserId"),
});
// hide: true,
},
// align: "left",
//根据工艺规程ID获得name
// hide: true,
getRoutingHeaderName
(
val
)
{
// type: "user",
let
routingHeaderDataList
=
this
.
$u
.
clone
(
this
.
routingHeaderData
);
// },
let
routingHeaderName
=
""
;
// {
routingHeaderDataList
.
forEach
((
ele
)
=>
{
// key: "lastModificationTime",
if
(
ele
.
id
==
Number
(
val
))
{
// title: this.l("lastModificationTime"),
routingHeaderName
=
ele
.
name
;
// hide: true,
}
// align: "left",
});
// hide: true,
return
routingHeaderName
;
// },
},
// {
l
(
key
)
{
// key: "lastModifierUserId",
let
vkey
=
"routingsupporting"
+
"."
+
key
;
// title: this.l("lastModifierUserId"),
return
this
.
$t
(
vkey
)
||
key
;
// hide: true,
// align: "left",
// hide: true,
// type: "user",
// },
{
title
:
"操作"
,
key
:
"action"
,
width
:
180
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
,
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
),
},
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
,
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
),
},
},
this
.
headerStatus
==
4
||
this
.
headerStatus
==
0
?
"编辑"
:
""
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
,
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
),
},
},
this
.
headerStatus
==
4
||
this
.
headerStatus
==
0
?
"删除"
:
""
),
]
);
},
},
},
],
headerStatus
:
-
1
,
productBomId
:
-
1
,
ModalIm
:
false
,
temTitle
:
"工艺Bom"
,
routingHeaderData
:
[],
};
},
created
()
{
this
.
hid
=
this
.
easySearch
.
routingHeaderId
.
value
;
this
.
headerStatus
=
this
.
$route
.
query
.
headerStatus
;
this
.
productBomId
=
Number
(
this
.
$route
.
query
.
productBomId
);
if
(
this
.
headerid
!=
-
1
)
{
this
.
easySearch
.
routingHeaderId
.
value
=
this
.
headerid
;
}
else
{
this
.
easySearch
.
routingHeaderId
.
value
=
this
.
$route
.
query
.
id
;
}
},
mounted
()
{
console
.
log
(
this
);
this
.
getRoutingHeaderData
();
this
.
search
();
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
add
()
{
this
.
curId
=
0
;
this
.
hid
=
Number
(
this
.
headerid
);
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
copy
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
},
view
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
materialId
=
row
.
materialId
;
this
.
title
=
"查看详情"
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
modal
=
true
;
},
edit
(
id
)
{
this
.
curId
=
id
;
this
.
hid
=
Number
(
this
.
headerid
);
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
//批量导入start
//导入功能
openModalIm
()
{
this
.
ModalIm
=
true
;
},
ModalImCancel
()
{
this
.
ModalIm
=
false
;
},
getData
(
val
)
{
let
url
=
`
${
technologyUrl
}
productinfoimportservice/import`
;
this
.
$refs
.
importExcel
.
deelData
(
url
,
this
.
cols
,
this
.
formatMethod
(
val
));
},
//根据页面二次处理数据
formatMethod
(
val
)
{
// alert(JSON.stringify(val))
let
tempData
=
this
.
$u
.
clone
(
val
);
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
routingHeaderId
:
Number
(
this
.
headerid
),
routingDetailId
:
ele
.
routingDetailId
?
Number
(
ele
.
routingDetailId
)
:
null
,
routingDetailNo
:
ele
.
routingDetailNo
?
Number
(
ele
.
routingDetailNo
)
:
null
,
routingDetailName
:
ele
.
routingDetailName
?
ele
.
routingDetailName
:
""
,
routingStepId
:
0
,
quantity
:
ele
.
quantity
?
Number
(
ele
.
quantity
)
:
0
,
materialId
:
ele
.
materialId
?
ele
.
materialId
:
""
,
materialType
:
ele
.
materialType
?
Number
(
ele
.
materialType
)
:
""
,
materialNumber
:
ele
.
materialNumber
?
ele
.
materialNumber
:
""
,
nameMaterial
:
ele
.
nameMaterial
?
ele
.
nameMaterial
:
""
,
brand
:
ele
.
brand
?
ele
.
brand
:
""
,
specifications
:
ele
.
specifications
?
ele
.
specifications
:
""
,
xhgg
:
ele
.
xhgg
?
ele
.
xhgg
:
""
,
texture
:
ele
.
texture
?
ele
.
texture
:
""
,
procurementStandards
:
ele
.
procurementStandards
?
ele
.
procurementStandards
:
""
,
qualityGrade
:
ele
.
qualityGrade
?
ele
.
qualityGrade
:
""
,
state
:
null
,
extend
:
""
,
remark
:
""
,
drawNum
:
ele
.
drawNum
?
ele
.
drawNum
:
""
,
};
if
(
ele
.
routingDetailId
&&
ele
.
routingDetailId
!=
null
)
{
obj
.
ico
=
false
;
}
else
{
obj
.
ico
=
true
;
}
tempList
.
push
(
obj
);
});
return
tempList
;
},
//批量导入end
//工艺规程id和name之间的转换
//获取工艺规程信息
getRoutingHeaderData
()
{
let
data
=
{
conditions
:
[],
};
Api
.
getRoutingheaderList
(
data
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
routingHeaderData
=
r
.
result
||
[];
}
});
},
//根据工艺规程ID获得name
getRoutingHeaderName
(
val
)
{
let
routingHeaderDataList
=
this
.
$u
.
clone
(
this
.
routingHeaderData
);
let
routingHeaderName
=
""
;
routingHeaderDataList
.
forEach
((
ele
)
=>
{
if
(
ele
.
id
==
Number
(
val
))
{
routingHeaderName
=
ele
.
name
;
}
});
return
routingHeaderName
;
},
l
(
key
)
{
let
vkey
=
"routingsupporting"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
},
};
};
</
script
>
</
script
>
...
...
pages/technology/productMix/product/index.vue
View file @
f90079af
<
template
>
<
template
>
<div
class=
"product-m"
>
<div
class=
"product-m"
>
<DataGrid
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:type=
"typeInfo"
:high=
"false"
:span=
"6"
:lazy=
"true"
exportTitle=
"产品管理"
>
:columns=
"columns"
<template
slot=
"easySearch"
>
ref=
"grid"
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
:action=
"action"
<FormItem
prop=
"keys"
>
:conditions=
"easySearch"
<Input
placeholder=
"请输入物料编号/名称"
v-model=
"easySearch.keys.value"
/>
:type=
"typeInfo"
</FormItem>
:high=
"false"
<FormItem>
:span=
"6"
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
:lazy=
"true"
</FormItem>
>
</Form>
<template
slot=
"easySearch"
>
</
template
>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
<
template
slot=
"searchForm"
>
<FormItem
prop=
"keys"
>
<Search
/>
<Input
placeholder=
"请输入物料编号/名称"
v-model=
"easySearch.keys.value"
/>
</
template
>
</FormItem>
<
template
slot=
"buttons"
>
<FormItem>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
<Button
:icon=
"iconInfo"
shape=
"circle"
:title=
"titleInfo"
@
click=
"changeShwo"
></Button>
</FormItem>
<Button
@
click=
"openModalIm"
>
导入
</Button>
</Form>
</
template
>
</
template
>
<
template
slot=
"card"
slot-scope=
"{row}"
>
<
template
slot=
"searchForm"
>
<div
class=
"body-card"
>
<Search
/>
<Row
class=
"title-i"
>
</
template
>
<Col
:span=
"16"
>
<
template
slot=
"buttons"
>
<Ellipsis
:text=
"row.name"
:length=
"12"
tooltip
/>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</Col>
</
template
>
<Col
:span=
"8"
class=
"btn-click"
>
{{
row
.
mmcode
}}
</Col>
<
template
slot=
"buttons"
>
</Row>
<Button
:icon=
"iconInfo"
shape=
"circle"
:title=
"titleInfo"
@
click=
"changeShwo"
></Button>
<Row
class=
"row-down"
:gutter=
"10"
>
</
template
>
<Col
span=
"7"
>
<
template
slot=
"card"
slot-scope=
"{row}"
>
<div
class=
"img-i"
>
<div
class=
"body-card"
>
<img
:src=
"downUrl +row.productUrl"
v-if=
"row.productUrl"
/>
<Row
class=
"title-i"
>
<!-- onerror="this.src='/imgicon/chan_Pin.png'" -->
<Col
:span=
"16"
>
<img
src=
"@/assets/imgicon/chan_Pin.png"
v-else
width=
"100%"
height=
"100%"
/>
<Ellipsis
:text=
"row.name"
:length=
"12"
tooltip
/>
</div>
</Col>
</Col>
<Col
:span=
"8"
class=
"btn-click"
>
{{
row
.
mmcode
}}
</Col>
<Col
span=
"17"
class=
"c"
>
</Row>
<div>
分类:
{{
row
.
levelTitle
}}
</div>
<Row
class=
"row-down"
:gutter=
"10"
>
<div>
图号:
{{
row
.
drawingNo
}}
</div>
<Col
span=
"7"
>
<div>
主制单位:
{{
row
.
madeCompanyTitle
}}
</div>
<div
class=
"img-i"
>
<p
class=
"a-icon"
>
<img
:src=
"downUrl +row.productUrl"
v-if=
"row.productUrl"
/>
<a
@
click=
"bom(row)"
>
<!-- onerror="this.src='/imgicon/chan_Pin.png'" -->
<Icon
type=
"md-git-merge"
/>
BOM
<img
src=
"@/assets/imgicon/chan_Pin.png"
v-else
width=
"100%"
height=
"100%"
/>
</a>
</div>
<a
@
click=
"edit(row)"
>
</Col>
<Icon
type=
"md-create"
/>
编辑
<Col
span=
"17"
class=
"c"
>
</a>
<div>
分类:
{{
row
.
levelTitle
}}
</div>
<a
@
click=
"remove(row)"
>
<div>
图号:
{{
row
.
drawingNo
}}
</div>
<Icon
type=
"ios-trash"
/>
删除
<div>
主制单位:
{{
row
.
madeCompanyTitle
}}
</div>
</a>
<p
class=
"a-icon"
>
<a
@
click=
"view(row)"
>
<a
@
click=
"bom(row)"
>
<Icon
type=
"md-document"
/>
详情
<Icon
type=
"md-git-merge"
/>
BOM
</a>
</a>
</p>
<a
@
click=
"edit(row)"
>
</Col>
<Icon
type=
"md-create"
/>
编辑
</Row>
</a>
</div>
<a
@
click=
"remove(row)"
>
</
template
>
<Icon
type=
"ios-trash"
/>
删除
</a>
<a
@
click=
"view(row)"
>
<Icon
type=
"md-document"
/>
详情
</a>
</p>
</Col>
</Row>
</div>
</
template
>
</DataGrid>
</DataGrid>
<Modal
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
:fullscreen=
"fullscreen"
:mask-closable=
"false"
>
v-model=
"modal"
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
:parents=
"parent"
/>
:title=
"title"
width=
"1200"
footer-hide
:fullscreen=
"fullscreen"
:mask-closable=
"false"
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
:parents=
"parent"
/>
</Modal>
</Modal>
</div>
<ImportExcel
ref=
"importExcel"
@
on-get-data=
"getData"
:modalTitle=
"temTitle"
:columns=
"columns"
:open=
"ModalIm"
@
on-cancel=
"ModalImCancel"
@
on-ok=
"ok"
/>
</div>
</template>
</template>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
"./api"
;
import
Search
from
"./search"
;
import
Search
from
"./search"
;
export
default
{
export
default
{
name
:
"list"
,
name
:
"list"
,
components
:
{
components
:
{
Search
,
Search
,
},
},
head
:
{
head
:
{
title
:
""
,
title
:
""
,
author
:
"henq"
,
author
:
"henq"
,
description
:
"product_info 5/20/2020 3:13:51 PM"
,
description
:
"product_info 5/20/2020 3:13:51 PM"
,
},
props
:
{
parent
:
{
id
:
Number
,
parentName
:
String
,
ids
:
String
,
bomId
:
Number
,
},
},
},
props
:
{
data
()
{
parent
:
{
return
{
id
:
Number
,
action
:
Api
.
index
,
parentName
:
String
,
fullscreen
:
false
,
ids
:
String
,
easySearch
:
{
bomId
:
Number
,
keys
:
{
op
:
"mmcode,name"
,
value
:
null
},
levelId
:
{
op
:
"In"
,
value
:
this
.
id
},
upId
:
{
op
:
"In"
,
value
:
0
},
},
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
downUrl
:
fileUrlDown
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
hide
:
true
,
align
:
"left"
,
high
:
true
,
},
},
{
},
title
:
this
.
l
(
"name"
),
data
()
{
key
:
"name"
,
return
{
action
:
Api
.
index
,
fullscreen
:
false
,
easySearch
:
{
keys
:
{
op
:
"mmcode,name"
,
value
:
null
},
levelId
:
{
op
:
"In"
,
value
:
this
.
id
},
upId
:
{
op
:
"In"
,
value
:
0
},
},
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
downUrl
:
fileUrlDown
,
curId
:
0
,
columns
:
[{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
hide
:
true
,
align
:
"left"
,
high
:
true
,
},
{
title
:
this
.
l
(
"name"
),
key
:
"name"
,
align
:
"left"
,
align
:
"left"
,
},
},
{
{
key
:
"mmcode"
,
key
:
"mmcode"
,
title
:
this
.
l
(
"mmcode"
),
title
:
this
.
l
(
"mmcode"
),
align
:
"center"
,
align
:
"center"
,
high
:
true
,
high
:
true
,
},
},
{
key
:
"productUrl"
,
title
:
this
.
l
(
"productUrl"
),
align
:
"left"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"a"
,
{
{
attrs
:
{
key
:
"productUrl"
,
oprate
:
"detail"
,
title
:
this
.
l
(
"productUrl"
),
// href: this.fileUrlPath,
align
:
"center"
,
// target: "_blank"
high
:
true
,
},
render
:
(
h
,
params
)
=>
{
on
:
{
return
h
(
"div"
,
{
click
:
()
=>
{
class
:
"action"
this
.
downFile
(
params
.
row
.
productUrl
);
},
[
h
(
params
.
row
.
productUrl
.
length
>
0
?
"a"
:
"span"
,
{
attrs
:
{
oprate
:
"detail"
,
},
on
:
{
click
:
()
=>
{
params
.
row
.
productUrl
.
length
>
0
?
this
.
downFile
(
params
.
row
.
productUrl
)
:
null
;
},
},
},
params
.
row
.
productUrl
.
length
>
0
?
"查看图片"
:
'暂无图片'
),
]);
},
},
},
},
},
"查看图片"
),
]);
},
},
{
key
:
"levelTitle"
,
title
:
this
.
l
(
"levelTitle"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"drawingNo"
,
title
:
this
.
l
(
"drawingNo"
),
align
:
"right"
,
high
:
true
,
},
{
key
:
"madeCompanyTitle"
,
title
:
this
.
l
(
"madeCompanyTitle"
),
align
:
"center"
,
width
:
260
,
high
:
true
,
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
200
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
{
attrs
:
{
oprate
:
"edit"
}
,
key
:
"levelTitle"
,
on
:
{
title
:
this
.
l
(
"levelTitle"
),
click
:
()
=>
this
.
bom
(
params
.
row
)
,
align
:
"left"
,
}
,
high
:
true
,
},
},
"BOM"
),
h
(
"op"
,
{
{
attrs
:
{
oprate
:
"edit"
},
key
:
"levelId"
,
on
:
{
title
:
this
.
l
(
"levelId"
),
click
:
()
=>
this
.
edit
(
params
.
row
),
align
:
"left"
,
},
high
:
true
,
hide
:
true
,
import
:
true
,
},
},
"编辑"
),
h
(
"op"
,
{
{
attrs
:
{
oprate
:
"delete"
},
key
:
"drawingNo"
,
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
)
},
title
:
this
.
l
(
"drawingNo"
),
align
:
"right"
,
high
:
true
,
},
},
"删除"
),
h
(
"op"
,
{
{
attrs
:
{
oprate
:
"view"
},
key
:
"madeCompanyTitle"
,
on
:
{
title
:
this
.
l
(
"madeCompanyTitle"
),
click
:
()
=>
this
.
view
(
params
.
row
),
align
:
"center"
,
},
width
:
260
,
high
:
true
,
},
},
"详情"
{
),
key
:
"madeCompany"
,
]);
title
:
this
.
l
(
"madeCompany"
),
},
align
:
"center"
,
},
width
:
260
,
],
high
:
true
,
typeInfo
:
"card"
,
hide
:
true
,
iconInfo
:
"md-apps"
,
import
:
true
,
titleInfo
:
"卡片模式"
,
},
};
{
},
key
:
"version"
,
mounted
()
{
title
:
this
.
l
(
"version"
),
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
align
:
"center"
,
},
width
:
260
,
async
fetch
({
store
,
params
})
{
high
:
true
,
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
hide
:
true
,
},
import
:
true
,
methods
:
{
},
changeShwo
()
{
{
//显示模式切换
key
:
"materialId"
,
if
(
this
.
typeInfo
==
"card"
)
{
title
:
this
.
l
(
"materialId"
),
this
.
typeInfo
=
"table"
;
align
:
"center"
,
this
.
iconInfo
=
"md-list"
;
width
:
260
,
this
.
titleInfo
=
"列表模式"
;
high
:
true
,
}
else
{
hide
:
true
,
this
.
typeInfo
=
"card"
;
import
:
true
,
this
.
iconInfo
=
"md-apps"
;
},
this
.
titleInfo
=
"卡片模式"
;
{
}
title
:
"操作"
,
},
key
:
"action"
,
downFile
(
url
)
{
width
:
200
,
let
url1
=
this
.
downUrl
+
url
;
align
:
"center"
,
if
(
url
)
{
render
:
(
h
,
params
)
=>
{
window
.
open
(
url1
,
"_blank"
);
return
h
(
"div"
,
{
}
else
{
class
:
"action"
this
.
$Message
.
error
(
"暂无图片"
);
},
[
}
h
(
},
"op"
,
{
ok
()
{
attrs
:
{
this
.
$refs
.
grid
.
load
();
oprate
:
"edit"
this
.
modal
=
false
;
},
this
.
curId
=
0
;
on
:
{
},
click
:
()
=>
this
.
bom
(
params
.
row
),
search
()
{
},
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
},
"BOM"
add
()
{
),
if
(
this
.
parent
.
id
)
{
h
(
this
.
curId
=
0
;
"op"
,
{
this
.
title
=
"新增"
;
attrs
:
{
this
.
detail
=
()
=>
import
(
"./add"
);
oprate
:
"edit"
this
.
modal
=
true
;
},
this
.
fullscreen
=
false
;
on
:
{
}
else
{
click
:
()
=>
this
.
edit
(
params
.
row
),
this
.
$Message
.
error
(
"请先选择产品分类"
);
},
}
},
},
"编辑"
copy
(
id
)
{
),
this
.
curId
=
id
;
h
(
this
.
title
=
"克隆"
;
"op"
,
{
this
.
detail
=
()
=>
import
(
"./add"
);
attrs
:
{
this
.
modal
=
true
;
oprate
:
"delete"
this
.
fullscreen
=
false
;
},
},
on
:
{
view
(
row
)
{
click
:
()
=>
this
.
remove
(
params
.
row
)
this
.
curId
=
row
.
id
;
},
this
.
parent
.
id
=
row
.
levelId
;
},
this
.
parent
.
parentName
=
row
.
levelTitle
;
"删除"
this
.
title
=
"详情"
;
),
this
.
detail
=
()
=>
import
(
"./detail"
);
h
(
this
.
modal
=
true
;
"op"
,
{
this
.
fullscreen
=
false
;
attrs
:
{
},
oprate
:
"view"
edit
(
row
)
{
},
this
.
curId
=
row
.
id
;
on
:
{
this
.
parent
.
id
=
row
.
levelId
;
click
:
()
=>
this
.
view
(
params
.
row
),
this
.
parent
.
parentName
=
row
.
levelTitle
;
},
this
.
title
=
"编辑"
;
},
this
.
detail
=
()
=>
import
(
"./edit"
);
"详情"
this
.
modal
=
true
;
),
this
.
fullscreen
=
false
;
]);
},
},
bom
(
row
)
{
},
this
.
curId
=
row
.
id
;
],
this
.
parent
.
bomId
=
row
.
bomId
;
typeInfo
:
"card"
,
this
.
parent
.
id
=
row
.
levelId
;
iconInfo
:
"md-apps"
,
this
.
parent
.
parentName
=
row
.
levelTitle
;
titleInfo
:
"卡片模式"
,
this
.
title
=
"BOM"
;
ModalIm
:
false
,
this
.
detail
=
()
=>
import
(
"./bom"
);
temTitle
:
"产品管理"
,
this
.
modal
=
true
;
};
this
.
fullscreen
=
true
;
},
},
remove
(
row
)
{
mounted
()
{
Api
.
delete
(
row
.
bomId
).
then
((
r
)
=>
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
},
cancel
()
{
async
fetch
({
this
.
curId
=
0
;
store
,
this
.
modal
=
false
;
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
},
l
(
key
)
{
methods
:
{
let
vkey
=
"product_info"
+
"."
+
key
;
changeShwo
()
{
return
this
.
$t
(
vkey
)
||
key
;
//显示模式切换
if
(
this
.
typeInfo
==
"card"
)
{
this
.
typeInfo
=
"table"
;
this
.
iconInfo
=
"md-list"
;
this
.
titleInfo
=
"列表模式"
;
}
else
{
this
.
typeInfo
=
"card"
;
this
.
iconInfo
=
"md-apps"
;
this
.
titleInfo
=
"卡片模式"
;
}
},
downFile
(
url
)
{
let
url1
=
this
.
downUrl
+
url
;
if
(
url
)
{
window
.
open
(
url1
,
"_blank"
);
}
else
{
this
.
$Message
.
error
(
"暂无图片"
);
}
},
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
add
()
{
if
(
this
.
parent
.
id
)
{
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
this
.
fullscreen
=
false
;
}
else
{
this
.
$Message
.
error
(
"请先选择产品分类"
);
}
},
copy
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
this
.
fullscreen
=
false
;
},
view
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
parent
.
id
=
row
.
levelId
;
this
.
parent
.
parentName
=
row
.
levelTitle
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
"./detail"
);
this
.
modal
=
true
;
this
.
fullscreen
=
false
;
},
edit
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
parent
.
id
=
row
.
levelId
;
this
.
parent
.
parentName
=
row
.
levelTitle
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
"./edit"
);
this
.
modal
=
true
;
this
.
fullscreen
=
false
;
},
bom
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
parent
.
bomId
=
row
.
bomId
;
this
.
parent
.
id
=
row
.
levelId
;
this
.
parent
.
parentName
=
row
.
levelTitle
;
this
.
title
=
"BOM"
;
this
.
detail
=
()
=>
import
(
"./bom"
);
this
.
modal
=
true
;
this
.
fullscreen
=
true
;
},
remove
(
row
)
{
Api
.
delete
(
row
.
bomId
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
"删除成功"
);
}
});
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
;
},
l
(
key
)
{
let
vkey
=
"product_info"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
//批量导入start
//导入功能
openModalIm
()
{
if
(
this
.
parent
.
id
)
{
this
.
ModalIm
=
true
}
else
{
this
.
$Message
.
error
(
"请先选择产品分类"
);
}
},
ModalImCancel
()
{
this
.
ModalIm
=
false
},
getData
(
val
)
{
let
url
=
`
${
technologyUrl
}
productinfoimportservice/import`
;
this
.
$refs
.
importExcel
.
deelData
(
url
,
this
.
columns
,
this
.
formatMethod
(
val
))
},
//根据页面二次处理数据
formatMethod
(
val
)
{
let
tempData
=
this
.
$u
.
clone
(
val
);
let
tempList
=
[];
tempData
.
forEach
((
ele
)
=>
{
let
obj
=
{
mmcode
:
ele
.
mmcode
?
ele
.
mmcode
:
''
,
drawingNo
:
ele
.
drawingNo
?
ele
.
drawingNo
:
''
,
name
:
ele
.
name
?
ele
.
name
:
''
,
type
:
ele
.
type
?
ele
.
type
:
1
,
madeCompany
:
ele
.
madeCompany
?
ele
.
madeCompany
:
null
,
madeCompanyTitle
:
ele
.
madeCompanyTitle
?
ele
.
madeCompanyTitle
:
""
,
version
:
ele
.
version
?
ele
.
version
:
0
,
productUrl
:
""
,
productUrlList
:
""
,
levelId
:
this
.
parent
.
id
,
levelTitle
:
this
.
parent
.
parentName
,
materialId
:
ele
.
materialId
?
ele
.
materialId
:
""
,
};
if
(
ele
.
name
&&
ele
.
name
!=
''
)
{
obj
.
ico
=
false
}
else
{
obj
.
ico
=
true
}
tempList
.
push
(
obj
);
});
return
tempList
},
//批量导入end
},
},
},
watch
:
{
watch
:
{
"parent.id"
(
v
)
{
"parent.id"
(
v
)
{
if
(
v
)
{
if
(
v
)
{
let
data
=
{
let
data
=
{
levelId
:
{
levelId
:
{
op
:
"In"
,
value
:
this
.
parent
.
ids
},
op
:
"In"
,
upId
:
{
op
:
"In"
,
value
:
0
},
value
:
this
.
parent
.
ids
};
},
this
.
$refs
.
grid
.
reload
(
data
);
upId
:
{
}
op
:
"In"
,
value
:
0
},
};
this
.
$refs
.
grid
.
reload
(
data
);
}
},
},
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.product-m {
.product-m {
.body-card {
.body-card {
border: 1px solid rgba(38, 128, 235, 1);
border: 1px solid rgba(38, 128, 235, 1);
margin: 10px;
margin: 10px;
border-radius: 4px;
border-radius: 4px;
.title-i {
border-bottom: 1px solid #2680eb;
.title-i {
padding: 0 10px;
border-bottom: 1px solid #2680eb;
height: 35px;
padding: 0 10px;
line-height: 35px;
height: 35px;
background: rgba(38, 128, 235, 0.2);
line-height: 35px;
color: #2680eb;
background: rgba(38, 128, 235, 0.2);
.btn-click {
color: #2680eb;
text-align: right;
}
.btn-click {
}
text-align: right;
.row-down {
}
padding: 10px;
}
.img-i {
width: 90px;
.row-down {
background: #eee;
padding: 10px;
height: 90px;
margin-right: 15px;
.img-i {
// overflow: hidden;
width: 90px;
img {
background: #eee;
width: 90px;
height: 90px;
height: 90px;
margin-right: 15px;
// overflow: hidden;
img {
width: 90px;
height: 90px;
}
}
.c div {
margin-bottom: 8px;
}
.a-icon {
text-align: right;
margin-bottom: -5px;
}
}
}
}
.c div {
margin-bottom: 8px;
}
.a-icon {
text-align: right;
margin-bottom: -5px;
}
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
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