Commit c36ec4b3 authored by 仇晓婷's avatar 仇晓婷

产品

parent d5035b45
...@@ -63,7 +63,10 @@ ...@@ -63,7 +63,10 @@
{{ item.label }} {{ item.label }}
<span style="color:#c3c3c3">(</span> <span style="color:#c3c3c3">(</span>
<span style="color:#c3c3c3" v-if="item.code">{{ item.code }}</span> <span style="color:#c3c3c3" v-if="item.code">{{ item.code }}</span>
<span style="color:#c3c3c3" v-if="item.version">/ {{item.version}}</span> <span style="color:#c3c3c3" v-if="item.version">
/
<State code="material.main.version" :value="parseInt(item.version)" />
</span>
<span style="color:#c3c3c3">)</span> <span style="color:#c3c3c3">)</span>
<br /> <br />
<span style="color:#c3c3c3" v-if="item.departmentTitle">{{ item.departmentTitle }}</span> <span style="color:#c3c3c3" v-if="item.departmentTitle">{{ item.departmentTitle }}</span>
...@@ -87,12 +90,11 @@ export default { ...@@ -87,12 +90,11 @@ export default {
}; };
}, },
created() { created() {
// let url = `${systemUrl}/user/getfordispatch_x`
// this.$api.get(url).then((r) => {
// this.data = r.result
// })
this.materiallist(); this.materiallist();
}, },
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
props: { props: {
value: [String, Number, Array], value: [String, Number, Array],
placeholder: { placeholder: {
......
...@@ -35,7 +35,14 @@ ...@@ -35,7 +35,14 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('version')" prop="version"> <FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input> <!-- <Input v-model="entity.version"></Input> -->
<Dictionary
code="material.main.version"
v-model="entity.version"
type="select"
:value="entity.version"
:key="entity.version"
></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
...@@ -96,7 +103,7 @@ export default { ...@@ -96,7 +103,7 @@ export default {
// remark: "", // remark: "",
madeCompany: "", madeCompany: "",
madeCompanyTitle: "", madeCompanyTitle: "",
// extend: "", version: "",
productUrl: "", productUrl: "",
productUrlList: "", productUrlList: "",
levelId: null, levelId: null,
...@@ -155,7 +162,7 @@ export default { ...@@ -155,7 +162,7 @@ export default {
this.entity.name = e.name; this.entity.name = e.name;
this.entity.mmcode = e.mmcode; this.entity.mmcode = e.mmcode;
this.entity.drawingNo = e.drawingNo; this.entity.drawingNo = e.drawingNo;
this.entity.version = e.version; this.entity.version = parseInt(e.version);
this.entity.materialId = e.materialId; this.entity.materialId = e.materialId;
}, },
clickData(data, liUrl) { clickData(data, liUrl) {
......
...@@ -57,7 +57,30 @@ export default { ...@@ -57,7 +57,30 @@ export default {
align: "left", align: "left",
high: true high: true
}, },
{
key: "mmcode",
title: this.l("mmcode"),
align: "center",
high: true
},
{
key: "drawingNo",
title: this.l("drawingNo"),
align: "center",
high: true
},
{
key: "count",
title: this.l("count"),
align: "center",
high: true
},
{
key: "postion",
title: this.l("postion"),
align: "center",
high: true
},
{ {
key: "creationTime", key: "creationTime",
title: this.l("creationTime"), title: this.l("creationTime"),
...@@ -92,7 +115,7 @@ export default { ...@@ -92,7 +115,7 @@ export default {
"op", "op",
{ {
attrs: { oprate: "delete" }, attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row) }
}, },
"删除" "删除"
) )
...@@ -102,6 +125,9 @@ export default { ...@@ -102,6 +125,9 @@ export default {
} }
] ]
}; };
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
}, },
props: { props: {
eid: Number, eid: Number,
...@@ -137,8 +163,8 @@ export default { ...@@ -137,8 +163,8 @@ export default {
this.detail = () => import("./bomEdit"); this.detail = () => import("./bomEdit");
this.modal = true; this.modal = true;
}, },
remove(id) { remove(row) {
Api.deleteBom(id).then(r => { Api.deleteBom({ id: row.id, levelId: row.levelId }).then(r => {
if (r.success) { if (r.success) {
this.init(); this.init();
this.$Message.success("删除成功"); this.$Message.success("删除成功");
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('materialId')" prop="materialId"> <FormItem :label="l('materialId')" prop="materialId">
<Select v-model="entity.materialId" filterable clearable @on-change="change"> <Materiel v-model="entity.materialId" @on-change="change"></Materiel>
<Option v-for="item in dataList" :value="item.id" :key="item.id">{{ item.code }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -84,7 +82,6 @@ export default { ...@@ -84,7 +82,6 @@ export default {
}, },
created() { created() {
this.getTree(); this.getTree();
this.getMaterialList();
}, },
methods: { methods: {
getTree() { getTree() {
...@@ -93,22 +90,14 @@ export default { ...@@ -93,22 +90,14 @@ export default {
this.data2 = response.result; this.data2 = response.result;
}); });
}, },
getMaterialList() {
let data = { change(e) {
conditions: [] // console.log(e);
}; this.entity.name = e.name;
Api.materiallist(data).then(r => { this.entity.mmcode = e.mmcode;
this.dataList = r.result.filter(item => item.status == 3); this.entity.drawingNo = e.drawingNo;
}); this.entity.version = parseInt(e.version);
}, this.entity.materialId = e.materialId;
change(val) {
this.dataList.forEach(e => {
if (e.id == val) {
this.entity.name = e.name;
this.entity.mmcode = e.code;
this.entity.drawingNo = e.drawingNo;
}
});
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
......
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
<Row> <Row>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('materialId')" prop="materialId"> <FormItem :label="l('materialId')" prop="materialId">
<Select v-model="entity.materialId" filterable clearable @on-change="change"> <Materiel v-model="entity.materialId" @on-change="change"></Materiel>
<Option v-for="item in dataList" :value="item.id" :key="item.id">{{ item.code }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -76,7 +74,6 @@ export default { ...@@ -76,7 +74,6 @@ export default {
if (this.eid > 0) { if (this.eid > 0) {
this.load(this.eid); this.load(this.eid);
} }
this.getMaterialList();
}, },
methods: { methods: {
load(v) { load(v) {
...@@ -84,22 +81,14 @@ export default { ...@@ -84,22 +81,14 @@ export default {
this.entity = r.result; this.entity = r.result;
}); });
}, },
getMaterialList() {
let data = { change(e) {
conditions: [] // console.log(e);
}; this.entity.name = e.name;
Api.materiallist(data).then(r => { this.entity.mmcode = e.mmcode;
this.dataList = r.result.filter(item => item.status == 3); this.entity.drawingNo = e.drawingNo;
}); this.entity.version = parseInt(e.version);
}, this.entity.materialId = e.materialId;
change(val) {
this.dataList.forEach(e => {
if (e.id == val) {
this.entity.name = e.name;
this.entity.mmcode = e.code;
this.entity.drawingNo = e.drawingNo;
}
});
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
......
...@@ -20,16 +20,6 @@ ...@@ -20,16 +20,6 @@
<Materiel v-model="entity.materialId" @on-change="change"></Materiel> <Materiel v-model="entity.materialId" @on-change="change"></Materiel>
</FormItem> </FormItem>
</Col> </Col>
<!-- <Col :span="12">
<FormItem :label="l('productCode')" prop="productCode">
<Input v-model="entity.productCode"></Input>
</FormItem>
</Col>-->
<!-- <Col :span="12">
<FormItem :label="l('mmcode')" prop="mmcode">
<Input v-model="entity.mmcode"></Input>
</FormItem>
</Col>-->
<Col :span="12"> <Col :span="12">
<FormItem :label="l('drawingNo')" prop="drawingNo"> <FormItem :label="l('drawingNo')" prop="drawingNo">
<Input v-model="entity.drawingNo"></Input> <Input v-model="entity.drawingNo"></Input>
...@@ -42,7 +32,14 @@ ...@@ -42,7 +32,14 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('version')" prop="version"> <FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input> <!-- <Input v-model="entity.version"></Input> -->
<Dictionary
code="material.main.version"
v-model="entity.version"
type="select"
:value="entity.version"
:key="entity.version"
></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -144,7 +141,7 @@ export default { ...@@ -144,7 +141,7 @@ export default {
this.entity.name = e.name; this.entity.name = e.name;
this.entity.mmcode = e.mmcode; this.entity.mmcode = e.mmcode;
this.entity.drawingNo = e.drawingNo; this.entity.drawingNo = e.drawingNo;
this.entity.version = e.version; this.entity.version = parseInt(e.version);
this.entity.materialId = e.materialId; this.entity.materialId = e.materialId;
}, },
clickData(data, liUrl) { clickData(data, liUrl) {
...@@ -186,6 +183,7 @@ export default { ...@@ -186,6 +183,7 @@ export default {
this.$refs.edit.label = r.result.levelTitle; this.$refs.edit.label = r.result.levelTitle;
this.entity.materialId = r.result.materialId; this.entity.materialId = r.result.materialId;
this.entity.levelId = r.result.levelId + ""; this.entity.levelId = r.result.levelId + "";
this.entity.version = parseInt(r.result.version);
}); });
}, },
handleSubmit() { handleSubmit() {
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<a @click="edit(row)"> <a @click="edit(row)">
<Icon type="md-create" />编辑 <Icon type="md-create" />编辑
</a>&nbsp; </a>&nbsp;
<a @click="remove(row.id)"> <a @click="remove(row)">
<Icon type="ios-trash" />删除 <Icon type="ios-trash" />删除
</a>&nbsp; </a>&nbsp;
<a @click="view(row)"> <a @click="view(row)">
...@@ -205,7 +205,7 @@ export default { ...@@ -205,7 +205,7 @@ export default {
"op", "op",
{ {
attrs: { oprate: "delete" }, attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row) }
}, },
"删除" "删除"
), ),
...@@ -310,8 +310,8 @@ export default { ...@@ -310,8 +310,8 @@ export default {
this.modal = true; this.modal = true;
this.fullscreen = true; this.fullscreen = true;
}, },
remove(id) { remove(row) {
Api.delete(id).then(r => { Api.delete({ id: row.id, levelId: row.levelId }).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load(); this.$refs.grid.load();
this.$Message.success("删除成功"); this.$Message.success("删除成功");
......
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