2024-05-15 基础信息-产品-修改产品附属属性2

yangwl
A0010407 7 months ago
parent a9820f6ed2
commit 7dc7fa23a6

@ -56,7 +56,7 @@ export function delProduct(productId) {
}); });
} }
// 修改物料信息 // 修改物料附属信息
export function updateProductAttached(data) { export function updateProductAttached(data) {
return request({ return request({
url: '/wms/attached', url: '/wms/attached',
@ -64,3 +64,12 @@ export function updateProductAttached(data) {
data: data data: data
}); });
} }
// 新增物料附属信息
export function addProductAttached(data) {
return request({
url: '/wms/attached',
method: 'post',
data: data
});
}

@ -71,7 +71,7 @@
:disabled="single" :disabled="single"
@click="handleUpdateAttached" @click="handleUpdateAttached"
v-hasPermi="['wms:attached:edit']" v-hasPermi="['wms:attached:edit']"
>修改附属属性</el-button >新增/修改附属属性</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -559,6 +559,7 @@ import {
addProduct, addProduct,
updateProduct, updateProduct,
updateProductAttached, updateProductAttached,
addProductAttached,
} from "@/api/wms/product"; } from "@/api/wms/product";
import { syncProductSAP } from "@/api/technology/proroute"; import { syncProductSAP } from "@/api/technology/proroute";
@ -814,8 +815,14 @@ export default {
this.form.id = response.data.id; this.form.id = response.data.id;
this.form.iei = response.data.iei; this.form.iei = response.data.iei;
this.form.manStandar = response.data.manStandar; this.form.manStandar = response.data.manStandar;
this.form.productCode = response.data.productCode.slice(7,18);
console.log(this.form.productCode);
this.openAttached = true; this.openAttached = true;
this.title = "查看产品信息"; if(this.form.id == null){
this.title = "新增产品附属信息";
}else{
this.title = "修改产品附属信息";
}
}); });
}, },
@ -831,6 +838,12 @@ export default {
this.openAttached = false; this.openAttached = false;
this.getList(); this.getList();
}); });
}else {
addProductAttached(this.form).then((response) => {
this.$modal.msgSuccess("新增产品附属信息成功");
this.openAttached = false;
this.getList();
});
} }
} }
}); });

Loading…
Cancel
Save