Commit 10f0639e authored by 仇晓婷's avatar 仇晓婷

产品bom

parent 6e04529d
import Api from '@/plugins/request' import Api from '@/plugins/request';
export default { export default {
index:`${technologyUrl}productinfo/paged`, index:`${technologyUrl}productinfo/paged`,
paged(params){ paged(params){
...@@ -13,13 +13,21 @@ export default { ...@@ -13,13 +13,21 @@ export default {
update(params){ update(params){
return Api.post(`${technologyUrl}productinfo/update`,params); return Api.post(`${technologyUrl}productinfo/update`,params);
}, },
delete(id,levelId) { delete(id,levelId){
return Api.delete(`${technologyUrl}productinfo/delete`,{params:{id:id,levelId:levelId}}); return Api.delete(`${technologyUrl}productinfo/delete`,{params:{id:id,levelId:levelId}});
}, },
// deletes(params) { // deletes(params) {
// return Api.post(`${technologyUrl}productinfo/batchdelete`,params); // return Api.post(`${technologyUrl}productinfo/batchdelete`,params);
// }, // },
deleteBom(id,levelId,rootProductId) {
getbom(params){
return Api.get(`${technologyUrl}productinfo/getbom`,params);
},
updatebom(params){
return Api.post(`${technologyUrl}productinfo/updatebom`,params);
},
deleteBom(id,levelId,rootProductId){
return Api.delete(`${technologyUrl}productinfo/deletebom`,{params:{id:id,levelId:levelId,rootProductId:rootProductId}}); return Api.delete(`${technologyUrl}productinfo/deletebom`,{params:{id:id,levelId:levelId,rootProductId:rootProductId}});
}, },
materiallist(params){ materiallist(params){
......
...@@ -173,7 +173,7 @@ export default { ...@@ -173,7 +173,7 @@ export default {
this.modal = true; this.modal = true;
}, },
edit(row) { edit(row) {
this.curId = row.id; this.curId = row.bomId;
this.parents.id = row.levelId; this.parents.id = row.levelId;
this.parents.parentName = row.levelTitle; this.parents.parentName = row.levelTitle;
this.parents.rootProductId = row.rootProductId; this.parents.rootProductId = row.rootProductId;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<Row> <Row>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('materialId')" prop="materialId"> <FormItem :label="l('materialId')" prop="materialId">
<Materiel v-model="entity.materialId" @on-change="change"></Materiel> <Materiel v-model="entity.materialId" @on-change="change" disabled></Materiel>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
}, },
methods: { methods: {
load(v) { load(v) {
Api.get({ id: v, levelId: this.parents.id }).then(r => { Api.getbom({ id: v}).then(r => {
this.entity = r.result; this.entity = r.result;
}); });
}, },
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
Api.update(this.entity) Api.updatebom(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
if (r.success) { if (r.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