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

产品bom

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