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
f5c6af41
Commit
f5c6af41
authored
Aug 31, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料管理
parent
8018f5c3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1271 additions
and
1205 deletions
+1271
-1205
index.vue
pages/materiel/classification/index.vue
+396
-397
masterData.vue
pages/materiel/classification/masterData.vue
+141
-129
index.vue
pages/materiel/masterData/index.vue
+332
-310
masterData.vue
pages/materiel/masterData/masterData.vue
+401
-368
config.js
static/config.js
+1
-1
No files found.
pages/materiel/classification/index.vue
View file @
f5c6af41
This diff is collapsed.
Click to expand it.
pages/materiel/classification/masterData.vue
View file @
f5c6af41
<
template
>
<
template
>
<div
class=
"master-data"
>
<div
class=
"master-data"
>
<!--
<Table
border
:columns=
"columns"
:data=
"dataColumns"
:height=
"tableHeight"
></Table>
-->
<!--
<Table
border
:columns=
"columns"
:data=
"dataColumns"
:height=
"tableHeight"
></Table>
-->
<DataGrid
<DataGrid
:columns=
"columns"
ref=
"grid"
:conditions=
"easySearch"
:action=
"action"
:high=
"false"
:height=
"tableHeight"
>
:columns=
"columns"
<template
slot=
"easySearch"
>
ref=
"grid"
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
:conditions=
"easySearch"
<FormItem
prop=
"keys"
>
:action=
"action"
<Input
placeholder=
"请输入编码/名称"
v-width=
"200"
v-model=
"easySearch.keys.value"
clearable
/>
:high=
"false"
</FormItem>
:height=
"tableHeight"
<FormItem>
>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
<template
slot=
"easySearch"
>
</FormItem>
<Form
ref=
"formInline"
:model=
"easySearch"
inline
>
</Form>
<FormItem
prop=
"keys"
>
</
template
>
<Input
placeholder=
"请输入编码/名称"
v-width=
"200"
v-model=
"easySearch.keys.value"
clearable
/>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"search"
>
查询
</Button>
</FormItem>
</Form>
</
template
>
</DataGrid>
</DataGrid>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
"masterData"
,
name
:
"masterData"
,
props
:
[
"root"
],
props
:
[
"root"
],
data
()
{
data
()
{
return
{
return
{
action
:
Api
.
index
,
action
:
Api
.
index
,
tableHeight
:
""
,
tableHeight
:
""
,
dataColumns
:
[],
dataColumns
:
[],
easySearch
:
{
easySearch
:
{
keys
:
{
op
:
"code,name"
,
value
:
null
},
keys
:
{
id
:
{
op
:
"In"
,
value
:
""
}
op
:
"code,name"
,
},
value
:
null
columns
:
[
},
// {
id
:
{
// key: "index",
op
:
"In"
,
// title: "#",
value
:
""
// align: "left",
}
// width: 60
},
// },
columns
:
[
{
// {
key
:
"code"
,
// key: "index",
title
:
"编码"
,
// title: "#",
align
:
"left"
// align: "left",
},
// width: 60
{
// },
key
:
"name"
,
title
:
"名称"
,
align
:
"left"
},
{
key
:
"status"
,
title
:
"状态"
,
align
:
"left"
,
code
:
"materail.category.status"
},
{
key
:
"description"
,
title
:
"描述"
,
align
:
"left"
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
260
,
align
:
"left"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
{
attrs
:
{
oprate
:
"edit"
},
key
:
"code"
,
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
title
:
"编码"
,
align
:
"left"
},
},
"编辑"
),
h
(
"op"
,
{
{
attrs
:
{
oprate
:
"delete"
},
key
:
"name"
,
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
title
:
"名称"
,
align
:
"left"
},
},
"删除"
{
)
key
:
"status"
,
]);
title
:
"状态"
,
}
align
:
"left"
,
}
code
:
"materail.category.status"
]
},
};
},
{
async
fetch
({
store
,
params
})
{
key
:
"description"
,
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
title
:
"描述"
,
},
align
:
"left"
created
()
{
},
this
.
tableHeight
=
window
.
innerHeight
-
220
;
{
},
title
:
"操作"
,
mounted
()
{
key
:
"action"
,
window
.
onresize
=
()
=>
{
width
:
260
,
///浏览器窗口大小变化
align
:
"left"
,
return
(()
=>
{
render
:
(
h
,
params
)
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
oprate
:
"edit"
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
)
}
},
"编辑"
),
h
(
"op"
,
{
attrs
:
{
oprate
:
"delete"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
"删除"
)
]);
}
}
]
};
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
created
()
{
this
.
tableHeight
=
window
.
innerHeight
-
220
;
this
.
tableHeight
=
window
.
innerHeight
-
220
;
})();
};
},
methods
:
{
search
()
{
// alert(JSON.stringify(this.easySearch));
console
.
log
(
this
.
easySearch
);
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
},
edit
(
row
)
{
mounted
()
{
this
.
$emit
(
"on-edit"
,
row
);
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
tableHeight
=
window
.
innerHeight
-
220
;
})();
};
},
},
remove
(
id
)
{
methods
:
{
Api
.
delete
(
id
).
then
(
r
=>
{
search
()
{
if
(
r
.
success
)
{
// alert(JSON.stringify(this.easySearch));
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
console
.
log
(
this
.
easySearch
);
this
.
$Message
.
success
(
"删除成功"
);
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
},
edit
(
row
)
{
this
.
$emit
(
"on-edit"
,
row
);
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
(
r
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
this
.
$Message
.
success
(
"删除成功"
);
}
});
}
}
});
},
}
watch
:
{
},
root
:
{
watch
:
{
handler
(
newName
,
oldName
)
{
root
:
{
if
(
newName
.
id
)
{
handler
(
newName
,
oldName
)
{
this
.
easySearch
.
id
.
value
=
newName
.
ids
;
if
(
newName
.
id
)
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
this
.
easySearch
.
id
.
value
=
newName
.
ids
;
}
else
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
);
this
.
easySearch
.
id
.
value
=
"-1"
;
}
else
{
}
this
.
easySearch
.
id
.
value
=
"-1"
;
},
immediate
:
true
,
deep
:
true
}
}
},
immediate
:
true
,
deep
:
true
}
}
}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.spare-parts {
.spare-parts {
width: 100%;
width: 100%;
height: 100%;
height: 100%;
}
}
</
style
>
</
style
>
\ No newline at end of file
pages/materiel/masterData/index.vue
View file @
f5c6af41
This diff is collapsed.
Click to expand it.
pages/materiel/masterData/masterData.vue
View file @
f5c6af41
This diff is collapsed.
Click to expand it.
static/config.js
View file @
f5c6af41
...
@@ -27,7 +27,7 @@ window.apsUrl = `http://${systemApi.aps}:10111/api/services/app`;//aps排产(61)
...
@@ -27,7 +27,7 @@ window.apsUrl = `http://${systemApi.aps}:10111/api/services/app`;//aps排产(61)
window
.
technologyUrl
=
`http://
${
address
}
:10000/technology/`
;
//新工艺规程接口
window
.
technologyUrl
=
`http://
${
address
}
:10000/technology/`
;
//新工艺规程接口
window
.
iconImg
=
`/imgicon/`
;
window
.
iconImg
=
`/imgicon/`
;
window
.
mncImg
=
`/images/mnc/`
;
//mnc图片
window
.
mncImg
=
`/images/mnc/`
;
//mnc图片
window
.
material
=
`http://
${
address
}
:10000/material`
;
//物料管理
window
.
material
=
`http://
${
address
}
:10000/material`
;
//物料管理
10032
window
.
Platform
=
`http://
${
address
}
:10000/platform`
;
//计划管理10131
window
.
Platform
=
`http://
${
address
}
:10000/platform`
;
//计划管理10131
/* window.systemUrl = `http://${address}:10020/api/services/app`; //System-api 系统管理(基础数据)
/* window.systemUrl = `http://${address}:10020/api/services/app`; //System-api 系统管理(基础数据)
...
...
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