Commit 843b8e4c authored by renjintao's avatar renjintao

mater

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