Commit 221efedc authored by 仇晓婷's avatar 仇晓婷

物料ok

parent 0c22ad29
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
<Input <Input
placeholder="请输入编码/名称/状态" placeholder="请输入编码/名称"
v-width="200" v-width="200"
v-model="easySearch.keys.value" v-model="easySearch.keys.value"
clearable clearable
......
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
index:`${systemUrl}/material/paged`, index:`${systemUrl}/material/paged`,
lists:`${systemUrl}/category/list`,
paged(params){ paged(params){
return Api.post(`${systemUrl}/material/paged`,params); return Api.post(`${systemUrl}/material/paged`,params);
}, },
...@@ -19,5 +20,7 @@ export default { ...@@ -19,5 +20,7 @@ export default {
delete(id) { delete(id) {
return Api.delete(`${systemUrl}/material/delete`,{params:{id:id}}); return Api.delete(`${systemUrl}/material/delete`,{params:{id:id}});
}, },
categoryList(params){
return Api.post(`${systemUrl}/category/list`,params);
},
} }
\ No newline at end of file
...@@ -16,18 +16,20 @@ ...@@ -16,18 +16,20 @@
</div> </div>
</Sider> </Sider>
<Content class="right-detail"> <Content class="right-detail">
<div class="btn"> <div class="btn" v-show="showFrom">
<Button type="primary">编辑</Button> <!-- <Button type="primary">编辑</Button> -->
<div class="new-detail"> <div class="new-detail">
<Row> <Row>
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课uioiweiwuuu你和环境</Filed> <Filed :span="8" name="编码:">{{entity.code}}</Filed>
<Filed :span="8" :name="l('routingDetailName')+':'">HHJK就开始上课</Filed> <Filed :span="8" name="名称:">{{entity.name}}</Filed>
<Filed :span="8" :name="l('standard')+':'">HHJK就开始上课uioiweiwuuu你和环境</Filed> <Filed :span="8" name="状态:">
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课</Filed> <State code="materail.category.status" :value="parseInt(entity.status)" />
<Filed :span="8" :name="l('routingDetailName')+':'">HHJK就开始上课</Filed> </Filed>
<Filed :span="8" :name="l('standard')+':'">HHJK就开始上课</Filed>
<Filed :span="8" name="版本:">{{entity.version}}</Filed>
<Filed :span="8" name="描述::">{{entity.description}}</Filed>
</Row> </Row>
<Divider /> <!-- <Divider />
<div class="title-h4">engineering</div> <div class="title-h4">engineering</div>
<Row> <Row>
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课</Filed> <Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课</Filed>
...@@ -46,37 +48,62 @@ ...@@ -46,37 +48,62 @@
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课uioiweiwuuu你和环境</Filed> <Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课uioiweiwuuu你和环境</Filed>
<Filed :span="8" :name="l('routingDetailName')+':'">HHJK就开始上课</Filed> <Filed :span="8" :name="l('routingDetailName')+':'">HHJK就开始上课</Filed>
<Filed :span="8" :name="l('standard')+':'">HHJK就开始上课</Filed> <Filed :span="8" :name="l('standard')+':'">HHJK就开始上课</Filed>
</Row> </Row>-->
</div> </div>
</div> </div>
<div v-show="showTable">
<!-- <DataGrid :columns="columns" ref="grid" :action="action" :high="false" :height="750"></DataGrid> -->
<Table border :columns="columns" :data="data1" :height="800"></Table>
</div>
</Content> </Content>
</Layout> </Layout>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api";
export default { export default {
data() { data() {
return { return {
data1: [],
action: Api.lists,
isactive: null, isactive: null,
showFrom: false,
showTable: false,
rowId: "",
entity: {},
easySearch: {
keys: { op: "title", value: "" },
table: { op: "Equal", value: "material" },
tId: {
op: "Equal",
value: this.$route.query.id
}
},
listData: [ listData: [
{ {
lable: "属性" lable: "属性"
}, },
{ {
lable: "图像" lable: "历史记录"
}, }
{ ],
lable: "图像" columns: [
},
{ {
lable: "图像" key: "name",
title: "名称",
align: "left"
}, },
{ {
lable: "图像" key: "creationTime",
title: "名称",
align: "left"
} }
] ]
}; };
}, },
created() {
this.rowId = this.$route.query.id;
},
methods: { methods: {
back() { back() {
this.$router.push({ this.$router.push({
...@@ -85,6 +112,38 @@ export default { ...@@ -85,6 +112,38 @@ export default {
}, },
everyItem(li, i) { everyItem(li, i) {
this.isactive = i; this.isactive = i;
if (li.lable == "属性") {
this.showFrom = true;
this.showTable = false;
Api.get({ id: this.rowId }).then(r => {
if (r.result) {
this.entity = r.result;
}
});
} else {
this.showFrom = false;
this.showTable = true;
this.easySearch = {
conditions: [
{
fieldName: "table",
fieldValue: "material",
conditionalType: "Equal"
},
{
fieldName: "tId",
fieldValue: this.rowId,
conditionalType: "Equal"
}
]
};
Api.categoryList(this.easySearch).then(r => {
if (r.result) {
this.data1 = r.result;
}
});
}
}, },
l(key) { l(key) {
key = "routing_qc_card" + "." + key; key = "routing_qc_card" + "." + key;
......
<template> <template>
<div> <div>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row> <Row>
<Col :span="12"> <Col :span="12">
......
<template> <template>
<div class="master-data"> <div class="master-data">
<DataGrid <DataGrid
:columns="columns" :columns="columns"
ref="grid" ref="grid"
...@@ -55,6 +54,7 @@ export default { ...@@ -55,6 +54,7 @@ export default {
data() { data() {
return { return {
action: Api.index, action: Api.index,
modal: false, modal: false,
title: "新增", title: "新增",
curId: 0, curId: 0,
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
{ {
props: {}, props: {},
on: { on: {
click: () => this.details(params.row) click: () => this.details(params.row.id)
} }
}, },
params.row.code params.row.code
...@@ -156,7 +156,8 @@ export default { ...@@ -156,7 +156,8 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
created() { created() {
this.$refs.grid.reload(this.easySearch);
// this.$refs.grid.reload(this.easySearch);
}, },
methods: { methods: {
search() { search() {
...@@ -201,9 +202,13 @@ export default { ...@@ -201,9 +202,13 @@ export default {
// } // }
// }); // });
}, },
details() { details(id) {
alert(id)
this.$router.push({ this.$router.push({
path: "/materiel/masterData/details" path: "/materiel/masterData/details",
query: {
id: id
}
}); });
}, },
ok() { ok() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment