生产报工平台逻辑修改
This commit is contained in:
parent
9c6d503c85
commit
412ee31a65
@ -26,6 +26,14 @@ export function getShopOrderStatisticsTransactionPage(query) {
|
||||
})
|
||||
}
|
||||
|
||||
export function searchLogData(query) {
|
||||
return request({
|
||||
url: iep('/zshoporderstatisticstransaction/searchLogData'),
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function callErpShopOrderStatisticsTransaction(dataList) {
|
||||
return request({
|
||||
url: int('/shopOrderStatisticTransCallErp/callErp'),
|
||||
|
||||
@ -11,6 +11,65 @@
|
||||
:modal-show.sync="workCenterDialogVisible"
|
||||
@inputDialogSelected="workCenterSelect"></input-select-dialog>
|
||||
|
||||
<el-dialog title="报工日志"
|
||||
:visible.sync="dialogLogDataVisible"
|
||||
width="94%"
|
||||
:show-close="false"
|
||||
center>
|
||||
<el-row :gutter="24">
|
||||
<el-table :data="logReportData" max-height="360"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }" tooltip-effect="dark" border style="width: 100%">
|
||||
<el-table-column type="index" width="60" label="序号"></el-table-column>
|
||||
<el-table-column prop="qtyDone" label="产出数量"></el-table-column>
|
||||
<el-table-column prop="qtyScrapped" label="报废数量"></el-table-column>
|
||||
<el-table-column prop="laborTime" label="人工(H)"></el-table-column>
|
||||
<el-table-column prop="energy" label="能耗(M)"></el-table-column>
|
||||
<el-table-column prop="accessories" label="辅料(M)"></el-table-column>
|
||||
<el-table-column prop="machineTime" label="折旧(H)"></el-table-column>
|
||||
<el-table-column prop="othersQty" label="其它(M)"></el-table-column>
|
||||
<el-table-column prop="confirmedUser" label="报工确认人" width="100"></el-table-column>
|
||||
<el-table-column prop="confirmedDate" label="确认时间" width="140"></el-table-column>
|
||||
<el-table-column prop="syncSubmitter" label="同步提交人" width="100"></el-table-column>
|
||||
<el-table-column prop="syncPostingDate" label="同步过账日期" width="110"></el-table-column>
|
||||
<el-table-column prop="syncTransBatch" label="同步请求处理编号" width="130"></el-table-column>
|
||||
<el-table-column prop="syncTransDate" label="同步请求处理时间" width="140"></el-table-column>
|
||||
<el-table-column prop="syncStatus" label="同步结果"></el-table-column>
|
||||
<el-table-column prop="syncMessageText" label="消息文本" width="180"></el-table-column>
|
||||
<el-table-column prop="syncMessageNo" label="同步系统消息编号" width="130"></el-table-column>
|
||||
<el-table-column prop="syncMessageRemark" label="同步消息识别" width="130"></el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogLogDataVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="报工调整"
|
||||
:visible.sync="dialogAdjustDataVisible"
|
||||
width="50%"
|
||||
:show-close="false"
|
||||
center>
|
||||
<el-row :gutter="24">
|
||||
<el-table :data="sapReportData" max-height="360"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
:cell-style="{ 'text-align': 'center' }" tooltip-effect="dark" border style="width: 100%">
|
||||
<el-table-column type="index" width="60" label="序号"></el-table-column>
|
||||
<el-table-column prop="item" label="项目"></el-table-column>
|
||||
<el-table-column prop="unit" label="单位"></el-table-column>
|
||||
<el-table-column prop="value" label="值">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.value" clearable></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogAdjustDataVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="saveAdjustData">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="设定过账日期"
|
||||
:visible.sync="dialogPostingDateVisible"
|
||||
width="40%"
|
||||
@ -117,7 +176,7 @@
|
||||
<el-divider></el-divider>
|
||||
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="物料消耗明细" name="materialConsumption">
|
||||
<el-tab-pane label="物料消耗事务明细" name="materialConsumption">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24">
|
||||
<el-table :data="materialConsumptionList" max-height="360"
|
||||
@ -254,32 +313,32 @@
|
||||
@selection-change="wipReportSelectionChange"
|
||||
:cell-style="{ 'text-align': 'center' }" tooltip-effect="dark" border style="width: 100%">
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column type="index" width="60" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column type="index" width="50" fixed="left" label="序号"></el-table-column>
|
||||
<el-table-column prop="fabNo" label="车间"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="工作中心" width="120"></el-table-column>
|
||||
<el-table-column prop="shopOrder" label="生产工单"></el-table-column>
|
||||
<el-table-column prop="resource" label="资源"></el-table-column>
|
||||
<el-table-column prop="workCenter" label="工作中心" width="100"></el-table-column>
|
||||
<el-table-column prop="shopOrder" label="生产工单" width="130"></el-table-column>
|
||||
<el-table-column prop="statusDescription" label="生产工单状态" width="120"></el-table-column>
|
||||
<el-table-column prop="operation" label="工序"></el-table-column>
|
||||
<el-table-column prop="item" label="产出物料" width="100"></el-table-column>
|
||||
<el-table-column prop="mainUom" label="主单位"></el-table-column>
|
||||
<el-table-column prop="subUom" label="辅单位"></el-table-column>
|
||||
<el-table-column prop="laborTime" label="人工工时"></el-table-column>
|
||||
<el-table-column prop="machineTime" label="机器工时"></el-table-column>
|
||||
<el-table-column prop="abnormalTime" label="异常停机时间" width="150"></el-table-column>
|
||||
<el-table-column prop="switchTime" label="设备清机换型时间" width="150"></el-table-column>
|
||||
<el-table-column prop="energy" label="能耗"></el-table-column>
|
||||
<el-table-column prop="accessories" label="辅料"></el-table-column>
|
||||
<el-table-column prop="others" label="其它"></el-table-column>
|
||||
<el-table-column prop="confirmedUser" label="报工确认人" width="100"></el-table-column>
|
||||
<el-table-column prop="confirmedDate" label="确认时间"></el-table-column>
|
||||
<el-table-column prop="syncSubmitter" label="同步提交人" width="100"></el-table-column>
|
||||
<el-table-column prop="syncPostingDate" label="同步过账日期" width="120"></el-table-column>
|
||||
<el-table-column prop="syncTransBatch" label="同步请求处理编号" width="140"></el-table-column>
|
||||
<el-table-column prop="syncTransDate" label="同步请求处理时间" width="140"></el-table-column>
|
||||
<el-table-column prop="syncStatus" label="同步结果"></el-table-column>
|
||||
<el-table-column prop="syncMessageText" label="消息文本" width="160"></el-table-column>
|
||||
<el-table-column prop="syncMessageNo" label="同步系统消息编号" width="130"></el-table-column>
|
||||
<el-table-column prop="syncMessageRemark" label="同步消息识别" width="130"></el-table-column>
|
||||
<el-table-column prop="itemDesc" label="物料描述" width="100"></el-table-column>
|
||||
<el-table-column prop="mainUom" label="单位"></el-table-column>
|
||||
<el-table-column prop="qtyDone" label="产出数量"></el-table-column>
|
||||
<el-table-column prop="qtyScrapped" label="报废数量"></el-table-column>
|
||||
<el-table-column prop="sumQtyDone" label="已报数量"></el-table-column>
|
||||
<el-table-column prop="sumQtyScrapped" label="已报报废量" width="110"></el-table-column>
|
||||
<el-table-column prop="laborTime" label="人工(H)"></el-table-column>
|
||||
<el-table-column prop="energy" label="能耗(M)"></el-table-column>
|
||||
<el-table-column prop="accessories" label="辅料(M)"></el-table-column>
|
||||
<el-table-column prop="machineTime" label="折旧(H)"></el-table-column>
|
||||
<el-table-column prop="othersQty" label="其它(M)"></el-table-column>
|
||||
<el-table-column label="操作" width="140">
|
||||
<template slot-scope="scope">
|
||||
<!-- 查看 -->
|
||||
<el-button class="custom-mini-button" size="mini" style="margin-left: 5px" type="text" @click="adjustDataShow(scope.row)">报工调整</el-button>
|
||||
<!-- 查看 -->
|
||||
<el-button class="custom-mini-button" size="mini" style="margin-left: 5px" type="text" @click="logDataShow(scope.row)">报工日志</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div
|
||||
style="width: 100%; display: flex; margin-top: 10px; flex-direction: column; align-items: end; justify-content: center">
|
||||
@ -300,10 +359,10 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8"></el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="dialogPostingDateVisible = true">生产报工提交同步</el-button>
|
||||
<el-button type="primary" @click="dialogPostingDateVisible = true">报工事务提交</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="soSyncCancelAction">生产报工取消</el-button>
|
||||
<el-button type="primary" @click="soSyncCancelAction">报工事务冲销</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8"></el-col>
|
||||
</el-row>
|
||||
@ -325,7 +384,7 @@ import {
|
||||
callErpShopOrderStatisticsTransaction, callErpSoStatistCancelTransaction,
|
||||
getMaterialCompleteTransactionPage,
|
||||
getMaterialConsumptionTransactionPage,
|
||||
getShopOrderStatisticsTransactionPage
|
||||
getShopOrderStatisticsTransactionPage, searchLogData
|
||||
} from "@/api/mes/wip-nalinv/reportSap";
|
||||
import {fetchList as userShiftFetchList} from "@/api/mes/prd/work-group/user-work-shift/user-work-shift";
|
||||
import {fetchList as fabNoFetchList} from "@/api/mes/smd/fab-basis";
|
||||
@ -344,9 +403,13 @@ export default {
|
||||
materialConsumptionList: [],
|
||||
dialogPostingDateVisible: false,
|
||||
materialCompleteList: [],
|
||||
dialogLogDataVisible: false,
|
||||
logReportData: [],
|
||||
wipReportList: [],
|
||||
sapReportData: [],
|
||||
activeName: 'materialConsumption',
|
||||
showFabNoDialogVisible: false,
|
||||
dialogAdjustDataVisible: false,
|
||||
postingDateForm: {
|
||||
postingDate: ''
|
||||
},
|
||||
@ -370,7 +433,7 @@ export default {
|
||||
fabNoDialogFetchFun: fabNoFetchList,
|
||||
fabNoDialogObj: {
|
||||
title: '车间',
|
||||
condition: 'searchText',
|
||||
condition: 'fabNo',
|
||||
tableColumn: [
|
||||
{prop: 'fabNo', label: '车间'},
|
||||
{prop: 'description', label: '描述'}
|
||||
@ -416,7 +479,8 @@ export default {
|
||||
},
|
||||
wipReportSelection: [],
|
||||
mtrlConsSelection: [],
|
||||
mtrlCompleteSelection: []
|
||||
mtrlCompleteSelection: [],
|
||||
selectedRow: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -432,6 +496,110 @@ export default {
|
||||
|
||||
methods: {
|
||||
|
||||
// 显示报工日志
|
||||
logDataShow(row){
|
||||
let me = this;
|
||||
me.dialogLogDataVisible = true;
|
||||
me.logReportData = [];
|
||||
showLoading();
|
||||
searchLogData(row).then(res => {
|
||||
hideLoading();
|
||||
me.logReportData = res.data.data;
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
});
|
||||
},
|
||||
|
||||
// 显示报工调整弹出框
|
||||
adjustDataShow(row){
|
||||
let me = this;
|
||||
me.selectedRow = row;
|
||||
me.sapReportData = [];
|
||||
me.dialogAdjustDataVisible = true;
|
||||
me.sapReportData.push({
|
||||
item: '产出数量',
|
||||
type: 'CC',
|
||||
unit: 'M',
|
||||
value: row.qtyDone
|
||||
});
|
||||
me.sapReportData.push({
|
||||
item: '报废数量',
|
||||
type: 'BF',
|
||||
unit: 'M',
|
||||
value: row.qtyScrapped
|
||||
});
|
||||
me.sapReportData.push({
|
||||
item: '人工',
|
||||
type: 'RG',
|
||||
unit: 'H',
|
||||
value: row.laborTime
|
||||
});
|
||||
me.sapReportData.push({
|
||||
item: '折旧',
|
||||
type: 'ZJ',
|
||||
unit: 'H',
|
||||
value: row.machineTime
|
||||
});
|
||||
me.sapReportData.push({
|
||||
item: '能耗',
|
||||
type: 'NH',
|
||||
unit: 'M',
|
||||
value: row.energy
|
||||
});
|
||||
me.sapReportData.push({
|
||||
item: '辅料',
|
||||
type: 'FL',
|
||||
unit: 'M',
|
||||
value: row.accessories
|
||||
});
|
||||
me.sapReportData.push({
|
||||
item: '其它',
|
||||
type: 'QT',
|
||||
unit: 'M',
|
||||
value: row.othersQty
|
||||
});
|
||||
},
|
||||
|
||||
// 报工调整确认
|
||||
saveAdjustData(){
|
||||
let me = this;
|
||||
let dataList = me.sapReportData;
|
||||
for (let i = 0; i < dataList.length; i++) {
|
||||
const rowObj = dataList[i];
|
||||
if(rowObj.type === 'CC'){
|
||||
me.selectedRow.qtyDone = rowObj.value;
|
||||
}else if(rowObj.type === 'BF'){
|
||||
me.selectedRow.qtyScrapped = rowObj.value;
|
||||
}else if(rowObj.type === 'RG'){
|
||||
me.selectedRow.laborTime = rowObj.value;
|
||||
}else if(rowObj.type === 'NH'){
|
||||
me.selectedRow.energy = rowObj.value;
|
||||
}else if(rowObj.type === 'FL'){
|
||||
me.selectedRow.accessories = rowObj.value;
|
||||
}else if(rowObj.type === 'QT'){
|
||||
me.selectedRow.othersQty = rowObj.value;
|
||||
}else if(rowObj.type === 'ZJ'){
|
||||
me.selectedRow.machineTime = rowObj.value;
|
||||
}
|
||||
}
|
||||
const indexSeq = me.wipReportList.findIndex(ite=>ite.shopOrder === me.selectedRow.shopOrder && ite.operation === me.selectedRow.operation);
|
||||
me.wipReportList.splice(indexSeq, 1, me.selectedRow);
|
||||
me.dialogAdjustDataVisible = false;
|
||||
},
|
||||
|
||||
// 报工数据计算
|
||||
calculateSoData(){
|
||||
let me = this;
|
||||
showLoading();
|
||||
getShopOrderStatisticsTransactionPage(me.searchFormObj).then(res => {
|
||||
hideLoading();
|
||||
me.wipReportList = res.data.data.records;
|
||||
this.wipRe.total = res.data.data.records.length;
|
||||
}).catch(error => {
|
||||
hideLoading();
|
||||
});
|
||||
},
|
||||
|
||||
// 获取数据字典
|
||||
getDataDictionary(dictType, list) {
|
||||
fetchDictList({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user