|
|
@ -78,6 +78,8 @@ |
|
|
|
></searchPage> |
|
|
|
<!-- 总成弹窗 --> |
|
|
|
<tableDrawer |
|
|
|
v-loading="loading_parent" |
|
|
|
:size="'50%'" |
|
|
|
:title="currentTitle" |
|
|
|
:isShow="isShow_parent" |
|
|
|
@setClose="closeDrawer('parent')" |
|
|
@ -108,7 +110,6 @@ |
|
|
|
></tableDrawer> |
|
|
|
<!-- bom弹窗 --> |
|
|
|
<tableDrawer |
|
|
|
:size="'30%'" |
|
|
|
:title="bomTitle" |
|
|
|
:isShow="isShow_bom" |
|
|
|
@setClose="closeDrawer('bom')" |
|
|
@ -118,6 +119,7 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { getDetailed,getInjectioModelPlanBom,getInjectioModelPlanSumdetails } from "@/api/wms-api" |
|
|
|
import { tableMixins } from "@/mixins/TableMixins" |
|
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins" |
|
|
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins" |
|
|
@ -138,7 +140,7 @@ export default { |
|
|
|
}, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
URL: 'basedata/item-basic', |
|
|
|
URL: 'wms/store/injection-model-plan', |
|
|
|
//常用按钮数据 |
|
|
|
currenButtonData: [ |
|
|
|
this.defaultFieldSettingBtn(),//字段设置 |
|
|
@ -153,8 +155,8 @@ export default { |
|
|
|
isShow_parent:false, |
|
|
|
// 总成汇总表头 |
|
|
|
tableColumns_parent:[ |
|
|
|
{ label: "总成号", prop: "number",width:'auto' }, |
|
|
|
{ label: "数量", prop: "qty",width:'auto' }, |
|
|
|
{ label: "总成号", prop: "itemCode",width:'auto' }, |
|
|
|
{ label: "数量", prop: "planQty",width:'auto' }, |
|
|
|
], |
|
|
|
// 总成汇总数据 |
|
|
|
tableData_parent:[], |
|
|
@ -162,8 +164,8 @@ export default { |
|
|
|
isShow_son:false, |
|
|
|
// 子物料汇总表头 |
|
|
|
tableColumns_son:[ |
|
|
|
{ label: "son总成号", prop: "number",width:'auto' }, |
|
|
|
{ label: "son数量", prop: "qty",width:'auto' }, |
|
|
|
{ label: "子物料号汇总", prop: "component",width:'auto' }, |
|
|
|
{ label: "数量", prop: "componentQty",width:'auto' }, |
|
|
|
], |
|
|
|
// 子物料汇总数据 |
|
|
|
tableData_son:[], |
|
|
@ -171,11 +173,14 @@ export default { |
|
|
|
isShow_bom:false, |
|
|
|
// bom汇总表头 |
|
|
|
tableColumns_bom:[ |
|
|
|
{ label: "bom总成号", prop: "number",width:'auto' }, |
|
|
|
{ label: "bom数量", prop: "qty",width:'auto' }, |
|
|
|
{ label: "Bom-子物料号", prop: "component",width:'auto' }, |
|
|
|
{ label: "数量", prop: "componentQty",width:'auto' }, |
|
|
|
], |
|
|
|
// bom汇总数据 |
|
|
|
tableData_bom:[], |
|
|
|
// 当前主表行 |
|
|
|
currentParentRow:[], |
|
|
|
loading_parent:false, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted () { |
|
|
@ -187,33 +192,50 @@ export default { |
|
|
|
console.log(type,scope) |
|
|
|
// 总成汇总 |
|
|
|
if(type == "parent"){ |
|
|
|
// todo:获取接口 |
|
|
|
this.currentTitle="parent" |
|
|
|
this.tableData_parent = [ |
|
|
|
{number:'number1',qty:1}, |
|
|
|
{number:'number2',qty:2}, |
|
|
|
] |
|
|
|
this.isShow_parent = true |
|
|
|
this.currentParentRow = scope.row |
|
|
|
this.currentTitle=`注塑计划单号:${this.currentParentRow.number}` |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
getDetailed(this.currentParentRow.id,this.URL) |
|
|
|
.then(res=>{ |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
this.tableData_parent = res.details |
|
|
|
this.isShow_parent = true |
|
|
|
}) |
|
|
|
.catch(res=>{ |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}) |
|
|
|
} |
|
|
|
// 子零件汇总 |
|
|
|
if(type == "son"){ |
|
|
|
// todo:获取接口 |
|
|
|
this.currentTitle="son" |
|
|
|
this.tableData_son = [ |
|
|
|
{number:'sonnumber1',qty:11}, |
|
|
|
{number:'sonnumber2',qty:22}, |
|
|
|
] |
|
|
|
this.isShow_son = true |
|
|
|
this.currentTitle=`注塑计划单号:${scope.row.number}` |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
getInjectioModelPlanSumdetails([scope.row.number]) |
|
|
|
.then(res=>{ |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
this.tableData_son = res |
|
|
|
this.isShow_son = true |
|
|
|
}) |
|
|
|
.catch(res=>{ |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}) |
|
|
|
} |
|
|
|
// 总成汇总-bom |
|
|
|
if(type == "bom"){ |
|
|
|
// todo:获取接口 |
|
|
|
this.bomTitle="bom" |
|
|
|
this.tableData_bom = [ |
|
|
|
{number:'bomnumber1',qty:11}, |
|
|
|
{number:'bomnumber2',qty:22}, |
|
|
|
] |
|
|
|
this.isShow_bom = true |
|
|
|
this.bomTitle="Bom清单" |
|
|
|
let _data={ |
|
|
|
number:this.currentParentRow.number, |
|
|
|
itemCode:scope.row.itemCode, |
|
|
|
} |
|
|
|
this.loading_parent = true |
|
|
|
getInjectioModelPlanBom(_data) |
|
|
|
.then(res=>{ |
|
|
|
this.loading_parent = false |
|
|
|
this.tableData_bom = res |
|
|
|
this.isShow_bom = true |
|
|
|
}) |
|
|
|
.catch(res=>{ |
|
|
|
this.loading_parent = false |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 关闭弹窗 |
|
|
|