工单加BOM参考

yangwl
zhaoxiaolin 10 months ago
parent 3605b8acf6
commit 5912e95823

@ -77,3 +77,11 @@ export function submitReportInfo(data) {
data: data
});
}
/**bom组成查看**/
export function getBomList(query) {
return request({
url: '/mes/reportWorkConsume/getBomList',
method: 'get',
params: query
});
}

@ -553,6 +553,41 @@
<el-table-column label="创建时间" align="center" prop="createTime" width="150"/>
</el-table>
</el-tab-pane>
<!--母工单产品bom参考-->
<el-tab-pane label="BOM组成参照" name="pBom">
<el-table v-loading="loading" :data="pBomTableList" ref="pBomTable"
row-key="materialCode"
style="width: 100%"
max-height="480"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="物料编码" width="160" align="left" prop="materialCode"/>
<el-table-column label="物料名称" width="280" align="left" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="物料组编码" width="100" align="left" prop="productGroup" />
<el-table-column label="物料组名称" width="100" align="center" prop="productGroupName" :show-overflow-tooltip="true" />
<el-table-column label="标准用量" align="center" prop="standardDosage"/>
<el-table-column label="损耗率" align="center" prop="lossRate" width="100"/>
<el-table-column label="损耗额" align="center" prop="lossAmount" width="100"/>
<el-table-column label="含损耗用量" align="center" prop="cilosses" width="100"/>
<el-table-column label="成本核算标识相关" align="center" prop="sanka" width="100"/>
</el-table>
</el-tab-pane>
<!--子工单产品bom参考
<el-tab-pane label="子工单BOM组成" name="sBom">
<el-table v-loading="loading" :data="sBomTableList" ref="sBomTable">
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="物料编码" width="160" align="left" prop="component"/>
<el-table-column label="物料名称" width="280" align="left" prop="componentName" :show-overflow-tooltip="true" />
<el-table-column label="物料组编码" width="100" align="left" prop="productGroup" />
<el-table-column label="物料组名称" width="100" align="center" prop="productGroupName" :show-overflow-tooltip="true" />
<el-table-column label="标准用量" align="center" prop="standardDosage"/>
<el-table-column label="损耗率" align="center" prop="lossRate" width="150"/>
<el-table-column label="损耗额" align="center" prop="lossAmount" width="150"/>
<el-table-column label="含损耗用量" align="center" prop="cilosses" width="150"/>
<el-table-column label="成本核算标识相关" align="center" prop="sanka" width="150"/>
</el-table>
</el-tab-pane>-->
</el-tabs>
<div slot="footer" class="dialog-footer">
@ -646,7 +681,7 @@
import { listReportWork, getReportWork, delReportWork, addReportWork, getWorkcenterList,
updateReportWork,reportSap,getBatchList,reportSapCancel,
getReportList,getReportSAPList,submitReportPS,submitReportPSSAP,getCKList} from "@/api/mes/reportWork";
import { getConsumeList,submitConsumePS,submitReportInfo} from "@/api/mes/reportWorkConsume";
import { getConsumeList,submitConsumePS,submitReportInfo,getBomList} from "@/api/mes/reportWorkConsume";
import ReportWorkConsume from "./reportWorkConsume.vue";
import ItemSelectUser from "./selectUser.vue";
import ItemSelectWorkOrder from "./selectWorkOrder.vue";
@ -680,6 +715,8 @@ export default {
sOrderTableList: [],
pConsumeTableList: [],
sConsumeTableList: [],
pBomTableList: [],
sBomTableList: [],
activeName0: 'first',
activeName: 'pOrder',
activeName2: 'pConsume',
@ -943,6 +980,8 @@ export default {
this.reportRows = [];
this.pConsumeTableList = [];
this.sConsumeTableList = [];
this.pBomTableList = [],
this.sBomTableList = [],
this.pConsumeRows = [];
this.sConsumeRows = [];
this.consumeRows = [];
@ -1199,6 +1238,19 @@ export default {
this.queryParams.workorderCode = '';
});
this.queryParams.workorderCode = sr.workorderCode;
//BOM
this.queryParams.parentOrder = '0';
getBomList(this.queryParams).then(response => {
this.pBomTableList = this.handleTree(response, 'materialCode', 'pMaterialCode')
});
//BOM
//this.queryParams.parentOrder = sr.workorderCode;
//getBomList(this.queryParams).then(response => {
// this.sBomTableList = response;
// this.queryParams.workorderCode = '';
//});
},
//
pConsumeSelection(selection) {

@ -110,7 +110,7 @@
<!-- 序号 -->
<el-table-column
type="index"
width="90"
width="50"
align="center"
:index="indexMethod"
label="序号"
@ -118,9 +118,9 @@
/>
<el-table-column
label="BOM单号"
align="center"
align="left"
prop="bomCode"
width="200"
width="150"
fixed
/>
<el-table-column

Loading…
Cancel
Save