Commit 843b8e4c authored by renjintao's avatar renjintao

mater

parent b498c472
......@@ -50,7 +50,7 @@
@on-change="change"
:multiple="multiple"
:departmentId="departmentId"
:disabled='disabled'
:disabled="disabled"
clearable
filterable
>
......@@ -87,11 +87,12 @@ export default {
name: this.value,
data: [],
departId: "",
group: []
group: [],
ids: []
};
},
created() {
this.materiallist();
this.materiallist(Number(this.bomId));
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
......@@ -130,6 +131,11 @@ export default {
//自定义用户数据
type: Array,
default: null
},
//物料bomid
bomId: {
type: Number,
default: null
}
},
methods: {
......@@ -153,7 +159,7 @@ export default {
this.$api
.post(url, {
// pageIndex: 1,
departmentId: id,
//departmentId: id,
type: this.type,
conditions: []
// roleTitle: this.roleTitle
......@@ -164,6 +170,22 @@ export default {
if (this.theme == "list") {
this.departmentGroup();
}
if (id != null) {
let url1 = `${technologyUrl}productinfo/getmaterialids`;
this.$api
.get(url1, {
Id: id
})
.then(res => {
if (res.success) {
this.ids = res.result;
let arr = r.result.filter(u => u.status == 3);
this.data = [...arr].filter(x =>
[...this.ids].some(y => y === x.id)
);
}
});
}
});
},
departmentGroup() {
......
......@@ -46,7 +46,7 @@
<MenuItem name="0" :to="'/technology/details?id='+headerId+'&headerStatus='+headerStatus">工序</MenuItem>
<!-- <MenuItem name="1" :to="'/technology/details/routingStep?id='+headerId">工步</MenuItem> -->
<MenuItem name="2" :to="'/technology/details/routingqccard?id='+headerId+'&headerStatus='+headerStatus">质控卡</MenuItem>
<MenuItem name="3" :to="'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus">工艺BOM</MenuItem>
<MenuItem name="3" :to="'/technology/details/routingsupporting?id='+headerId+'&headerStatus='+headerStatus+'&productBomId='+productBomId">工艺BOM</MenuItem>
<!-- <MenuItem name="4" to="/technology/details/setup/setupDetails">生产准备</MenuItem> -->
<MenuItem name="5" :to="'/technology/details/routinghcorder?id='+headerId" v-show="headerStatus==1">工艺更改单</MenuItem>
</Menu>
......@@ -69,11 +69,13 @@ export default {
actNum: "1",
headerId: -1,
headerStatus:-1,
productBomId:-1,
};
},
created() {
this.headerId = this.$route.query.id;
this.headerStatus = this.$route.query.headerStatus;
this.productBomId = this.$route.query.productBomId;
},
async fetch({ store, params }) {
......
......@@ -55,7 +55,7 @@
</Col>
<Col :span="8">
<FormItem :label="l('materialNumber')" prop="materialNumber">
<Input v-model="entity.materialNumber"></Input>
<Materiel :bomId="productBomId" @on-change="change"></Materiel>
</FormItem>
</Col>
<Col :span="8">
......@@ -103,7 +103,6 @@
<Input v-model="entity.drawNum"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
......@@ -142,13 +141,17 @@ export default {
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
},
routingDetailList: [],
routingDetailList: []
};
},
props: {
v: Object,
eid: Number,
headid: Number
headid: Number,
productBomId: {
type: Number,
default: null
}
},
mounted() {
this.loadDetails();
......@@ -180,6 +183,11 @@ export default {
handleClose() {
this.$emit("on-close");
},
change(e) {
this.entity.nameMaterial = e.name;
this.entity.materialId = e.materialId;
this.entity.materialNumber = e.mmcode;
},
loadDetails() {
//获取工序列表
let parms = {
......@@ -210,6 +218,10 @@ export default {
if (v > 0) {
this.load(v);
}
},
productBomId(v) {
if (v > 0) {
}
}
}
};
......
......@@ -22,5 +22,9 @@ export default {
},
deletes(params) {
return Api.post(`${technologyUrl}routingsupporting/batchdelete`, params);
}
},
//获取物料id
getmaterialids(params) {
return Api.get(`${technologyUrl}productinfo/getmaterialids`, params);
},
}
......@@ -55,7 +55,7 @@
</Col>
<Col :span="8">
<FormItem :label="l('materialNumber')" prop="materialNumber">
<Input v-model="entity.materialNumber"></Input>
<Materiel :bomId="productBomId"></Materiel>
</FormItem>
</Col>
<Col :span="8">
......@@ -128,7 +128,11 @@ export default {
},
props: {
headid: Number,
eid: Number
eid: Number,
productBomId: {
type: Number,
default: null
}
},
mounted() {
this.loadDetails();
......
......@@ -23,7 +23,7 @@
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" :headid="hid" @on-close="cancel" @on-ok="ok" />
<component :is="detail" :eid="curId" :headid="hid" :productBomId="productBomId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
......@@ -219,6 +219,7 @@ export default {
}
],
headerStatus:-1,
productBomId:-1,
};
},
created() {
......@@ -229,6 +230,7 @@ export default {
}
this.hid=Number(this.easySearch.routingHeaderId.value)
this.headerStatus=this.$route.query.headerStatus
this.productBomId=Number(this.$route.query.productBomId)
},
mounted() {
console.log(this);
......
......@@ -392,7 +392,7 @@ export default {
};
// this.info=()=>import("./details")
this.src = "/technology/details?id=" + row.id+"&headerStatus="+row.approvalStatus;
this.src = "/technology/details?id=" + row.id+"&headerStatus="+row.approvalStatus+"&productBomId="+row.productBomId;
},
viewClose() {
this.viewModal = false;
......
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