update
This commit is contained in:
@@ -600,7 +600,7 @@ export default {
|
||||
customerId: null,
|
||||
shortDesc: null,
|
||||
remark: null,
|
||||
paperboard: null
|
||||
paperboard: null,
|
||||
},
|
||||
visible: false,
|
||||
requestList: [
|
||||
@@ -770,7 +770,6 @@ export default {
|
||||
* 因为每个页面也许有独立的需求链
|
||||
*/
|
||||
handleBomChange(bomID) {
|
||||
//console.log("[handleBomChange] val is: ", bomID);
|
||||
const target = this.cachedList.bom.find((item) => item.id === bomID);
|
||||
// 这个单独的 bomId 是个极其特殊的需求,所以不放在 dataForm 里
|
||||
this.bomId = bomID;
|
||||
@@ -826,29 +825,29 @@ export default {
|
||||
if (res && res.code === 0) {
|
||||
this.dataForm = __pick(res.data, Object.keys(this.dataForm));
|
||||
|
||||
return res.data.bomId; // 特殊需求:编辑页面,还要根据 bomId 来更新配方号
|
||||
return { bomId: res.data.bomId, bomCode: res.data.bomCode }; // 特殊需求:编辑页面,还要根据 bomId 来更新配方号
|
||||
} else {
|
||||
this.$message({
|
||||
message: `${res.code}: ${res.msg}`,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
throw new Error(`${res.code}: ${res.msg}`);
|
||||
}
|
||||
})
|
||||
.then((bomId) => {
|
||||
return this.$http({
|
||||
url: "/pms/bom/pageById",
|
||||
method: "get",
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
key: "",
|
||||
id: bomId,
|
||||
},
|
||||
});
|
||||
.then(({ bomId, bomCode }) => {
|
||||
return Promise.all([
|
||||
this.$http({
|
||||
url: "/pms/bom/pageById",
|
||||
method: "get",
|
||||
params: {
|
||||
limit: 999,
|
||||
page: 1,
|
||||
key: "",
|
||||
id: bomId,
|
||||
},
|
||||
}),
|
||||
this.getBomVersionList({ code: bomCode }),
|
||||
]);
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
.then(([{ data: res }]) => {
|
||||
if (res.code == 0) {
|
||||
this.cachedList.bom = res.data.list;
|
||||
this.bomOptions = res.data.list.map((item) => ({
|
||||
name: item.name,
|
||||
label: item.code,
|
||||
|
||||
Reference in New Issue
Block a user