Browse Source

组件开发

master
rui_li 4 years ago
parent
commit
3e3bff4d59
  1. 42
      src/api/yieldReport/com_finish_roll.js
  2. 276
      src/views/modules/yieldReport/com_finish_roll.vue
  3. 15
      src/views/modules/yieldReport/com_produce_report_normal.vue
  4. 2
      src/views/modules/yieldReport/produce_order.vue

42
src/api/yieldReport/com_finish_roll.js

@ -0,0 +1,42 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取当前的卷的报工汇总数据
export const getCurrentRollReportedQty = data => createAPI('schedule/getCurrentRollReportedQty', 'POST', data)
// 获取上机卷的时间信息汇总
export const countSfdcTimeQty = data => createAPI('schedule/countSfdcTimeQty', 'POST', data)
// 获取派工单的班次信息
export const getScheduleShiftData = data => createAPI('schedule/getScheduleShiftData', 'POST', data)
// 获取sfdc表的时间信息汇总
export const getSfdcTimeData = data => createAPI('schedule/getSfdcTimeData', 'POST', data)
// 获取当前时间记录信息
export const getSfdcTimeMaxAndMinTime = data => createAPI('schedule/getSfdcTimeMaxAndMinTime', 'POST', data)
// 获取当前卷sfdc表的报工数据
export const getSfdcReportedData = data => createAPI('schedule/getSfdcReportedData', 'POST', data)
// 获取当前卷的材料记录--在线的
export const getSfdcMaterialByRollNo = data => createAPI('schedule/getSfdcMaterialByRollNo', 'POST', data)
// 获取当前派工单的材料记录
export const getSfdcMaterialByCon = data => createAPI('schedule/getSfdcMaterialByCon', 'POST', data)
// 获取当前派工单的上机卷记录
export const getSfdcRollOpsByCon = data => createAPI('schedule/getSfdcRollOpsByCon', 'POST', data)
// 获取当前派工单的不良卷记录
export const getSfdcDefectByCon = data => createAPI('schedule/getSfdcDefectByCon', 'POST', data)
// 获取当前上机卷信息
export const getSfdcRollByCon = data => createAPI('schedule/getSfdcRollByCon', 'POST', data)

276
src/views/modules/yieldReport/com_finish_roll.vue

@ -9,7 +9,7 @@
<el-col :span="24">
<el-form-item :label="'当前时间'">
<el-date-picker disabled="disabled" style="width: 145px;"
v-model="scheduleData.reportTime"
v-model="pageData.reportedTime"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="">
@ -20,7 +20,7 @@
列表</el-button>
</el-form-item>
<el-form-item class="customer-button">
<el-button type="primary" style="margin-left: 10px; margin-bottom: 5px;">
<el-button type="primary" @click="refreshPageData" style="margin-left: 10px; margin-bottom: 5px;">
刷新</el-button>
</el-form-item>
<el-form-item class="customer-button">
@ -39,19 +39,19 @@
<legend>卷数量统计</legend>
<el-form-item class="customer-item">
<el-checkbox disabled="disabled" style="margin-top: 28px;" true-label="Y" false-label="N"
v-model="scheduleData.reportedFlag">是否报告产量</el-checkbox>
v-model="pageData.reportedFlag">是否报告产量</el-checkbox>
</el-form-item>
<el-form-item class="customer-item" label="良品总数量:">
<el-input v-model="scheduleData.orderNo" readonly style="width: 80px;" ></el-input>
<el-input v-model="pageData.approvedQty" readonly style="width: 80px;" ></el-input>
</el-form-item>
<el-form-item class="customer-item" label="总不良品数量:">
<el-input v-model="scheduleData.partNo" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.defectedQty" readonly style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="总数量" >
<el-input v-model="scheduleData.partDesc" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.totalQty" readonly style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="其他卷数量:">
<el-input v-model="scheduleData.seqNo" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.otherRollQty" readonly style="width: 80px;"></el-input>
</el-form-item>
</fieldset>
<!-- 操作员信息和班次信息 -->
@ -59,16 +59,16 @@
style="margin-left: 510px; margin-top: -70px; ;width: 390px;">
<legend>人员排程班次信息</legend>
<el-form-item class="customer-item" label="操作员:">
<el-input v-model="scheduleData.orderNo" readonly style="width: 80px;" ></el-input>
<el-input v-model="operatorData.operatorId" readonly style="width: 80px;" ></el-input>
</el-form-item>
<el-form-item class="customer-item" label="操作员姓名:">
<el-input v-model="scheduleData.partNo" readonly style="width: 80px;"></el-input>
<el-input v-model="operatorData.operatorName" readonly style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="排产日期:">
<el-input v-model="scheduleData.scheduledDate" readonly style="width: 80px;" ></el-input>
<el-input v-model="searchData.scheduledDate" readonly style="width: 80px;" ></el-input>
</el-form-item>
<el-form-item class="customer-item" label="班次:">
<el-input v-model="scheduleData.partNo" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.shiftDesc" readonly style="width: 80px;"></el-input>
</el-form-item>
</fieldset>
</el-form>
@ -80,13 +80,13 @@
<el-row style="margin-top: 10px;">
<el-col :span="24">
<el-form-item class="customer-item" label="总调机时间:">
<el-input v-model="scheduleData.orderNo" readonly style="width: 80px;" ></el-input>
<el-input v-model="pageData.totalSetupTime" readonly style="width: 80px;" ></el-input>
</el-form-item>
<el-form-item class="customer-item" label="总调机过程停机时间:">
<el-input v-model="scheduleData.partNo" readonly style="width: 100px;"></el-input>
<el-input v-model="pageData.totalDowntimeTimeSetup" readonly style="width: 100px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="净调机时间:" >
<el-input v-model="scheduleData.partDesc" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.totalPureSetupTime" readonly style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -94,13 +94,13 @@
<el-row style="margin-top: 15px;">
<el-col :span="24">
<el-form-item class="customer-item" label="总生产时间">
<el-input v-model="scheduleData.seqNo" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.totalProdTime" readonly style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="总生产过程停机时间:">
<el-input v-model="scheduleData.partNo" readonly style="width: 100px;"></el-input>
<el-input v-model="pageData.totalDowntimeTimeProd" readonly style="width: 100px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="净生产时间:" >
<el-input v-model="scheduleData.partDesc" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.totalPureProdTime" readonly style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -108,13 +108,13 @@
<el-row style="margin-top: 15px;">
<el-col :span="24">
<el-form-item class="customer-item" label="总制造时间:">
<el-input v-model="scheduleData.seqNo" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.totalManufactureTime" readonly style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="总制造过程停机时间:">
<el-input v-model="scheduleData.partNo" readonly style="width: 100px;"></el-input>
<el-input v-model="pageData.totalManufactureDowntimeTime" readonly style="width: 100px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="净制造时间:" >
<el-input v-model="scheduleData.partDesc" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.totalPureManufactureTime" readonly style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -127,19 +127,19 @@
<el-row style="margin-top: 10px;">
<el-col :span="24">
<el-form-item class="customer-item" label="开工时间">
<el-input v-model="scheduleData.reportTime" readonly style="width: 130px;"></el-input>
<el-input v-model="pageData.eventTime" readonly style="width: 130px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="完工时间">
<el-input v-model="scheduleData.reportTime" readonly style="width: 130px;"></el-input>
<el-input v-model="pageData.tillTime" readonly style="width: 130px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="生产时间" >
<el-input v-model="scheduleData.partDesc" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.sfdcProdTime" readonly style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="调机时间" >
<el-input v-model="scheduleData.partDesc" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.sfdcSetupTime" readonly style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="制造时间" >
<el-input v-model="scheduleData.partDesc" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.sfdcManufactureTime" readonly style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -147,19 +147,19 @@
<el-row style="margin-top: 15px;">
<el-col :span="24">
<el-form-item class="customer-item" label="合格数量">
<el-input v-model="scheduleData.seqNo" readonly style="width: 130px;"></el-input>
<el-input v-model="pageData.sfdcApprovedQty" readonly style="width: 130px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="不合格数量">
<el-input v-model="scheduleData.partNo" readonly style="width: 130px;"></el-input>
<el-input v-model="pageData.defectedQty" readonly style="width: 130px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="报告数量" >
<el-input v-model="scheduleData.partDesc" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.sfdcReportedQty" readonly style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="调机停机">
<el-input v-model="scheduleData.partNo" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.sfdcSetupDownTime" readonly style="width: 80px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="生产调机" >
<el-input v-model="scheduleData.partDesc" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.sfdcProdSetupTime" readonly style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -167,10 +167,10 @@
<el-row style="margin-top: 15px;">
<el-col :span="24">
<el-form-item class="customer-item" label="remark">
<el-input v-model="scheduleData.seqNo" readonly style="width: 430px;"></el-input>
<el-input v-model="pageData.remark" readonly style="width: 430px;"></el-input>
</el-form-item>
<el-form-item class="customer-item" label="停机时间">
<el-input v-model="scheduleData.partNo" readonly style="width: 80px;"></el-input>
<el-input v-model="pageData.sfdcDownTime" readonly style="width: 80px;"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -213,22 +213,33 @@
</template>
<script>
import {
getCurrentRollReportedQty,
countSfdcTimeQty,
getScheduleShiftData,
getSfdcTimeMaxAndMinTime,
getSfdcTimeData,
getSfdcReportedData,
getSfdcMaterialByRollNo,
} from '@/api/yieldReport/com_finish_roll.js';
export default {
name: "com_finish_roll",
data() {
return {
titleCon: '',
sfdcTimeList: [],
scheduleData: {
searchData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
seqNo: '',
orderNo: '',
partNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
reportTime: this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'),
reportedFlag: 'N',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
@ -236,12 +247,36 @@ export default {
nextItemDesc: '',
nextItemNo: 0,
currentRollFlag: false
},
currentRollOps: {
site: this.$store.state.user.site,
seqNo: '',
rollNo: '',
finishedFlag: '',
},
pageData: {
reportedTime: this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'),
reportedFlag: 'N',
approvedQty: 0,
defectedQty: 0,
totalQty: 0,
otherRollQty: '',
shiftDesc: '',
totalSetupTime: 0,
totalDowntimeTimeSetup: 0,
totalPureSetupTime: 0,
totalProdTime: 0,
totalDowntimeTimeProd: 0,
totalPureProdTime: 0,
totalManufactureTime: 0,
totalManufactureDowntimeTime: 0,
totalPureManufactureTime: 0,
sfdcProdTime: 0,//
sfdcSetupTime: 0,//
sfdcManufactureTime: 0,//
sfdcSetupDownTime: 0,//
sfdcProdSetupTime: 0,//
sfdcDownTime: 0,//
eventTime: '',
tillTime: '',
sfdcApprovedQty: 0,
sfdcDefectedQty: 0,
sfdcReportedQty: 0,
remark: '',
},
operatorData: {
site: this.$store.state.user.site,
@ -434,36 +469,167 @@ export default {
}
},
methods: {
/*初始化页面参数*/
init(scheduleData, operatorData) {
//
this.searchData = JSON.parse(JSON.stringify(scheduleData));
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.titleCon = '结束卷操作 \
派工单号:'+scheduleData.seqNo;
//
this.refreshPageData();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
refreshPageData(){
//1.
getCurrentRollReportedQty(this.searchData).then(({data}) => {
this.pageData.approvedQty = data.row.approvedQty;
this.pageData.defectedQty = data.row.defectedQty;
this.pageData.totalQty = data.row.totalQty;
this.pageData.otherRollQty = data.row.otherRollQty;
}).then(() => {
//2.
countSfdcTimeQty(this.searchData).then(({data}) => {
this.pageData.totalSetupTime = data.row.totalSetupTime;
this.pageData.totalDowntimeTimeSetup = data.row.totalDowntimeTimeSetup;
this.pageData.totalPureSetupTime = data.row.totalPureSetupTime;
this.pageData.totalProdTime = data.row.totalProdTime;
this.pageData.totalDowntimeTimeProd = data.row.totalDowntimeTimeProd;
this.pageData.totalPureProdTime = data.row.totalPureProdTime;
this.pageData.totalManufactureTime = data.row.totalManufactureTime;
this.pageData.totalManufactureDowntimeTime = data.row.totalManufactureDowntimeTime;
this.pageData.totalPureManufactureTime = data.row.totalPureManufactureTime;
});
}).then(() => {
//3.
getScheduleShiftData(this.searchData).then(({data}) => {
this.pageData.shiftDesc = data.row.shiftDesc;
});
}).then(() => {
//4.
getSfdcTimeMaxAndMinTime(this.searchData).then(({data}) => {
this.pageData.eventTime = data.row.eventTime;
this.pageData.tillTime = data.row.tillTime;
});
}).then(() => {
//5.Sfdc
getSfdcTimeData(this.searchData).then(({data}) => {
//
this.pageData.eventTime = data.row.finishTime;
this.pageData.sfdcProdTime = data.row.sfdcProdTime;
this.pageData.sfdcSetupTime = data.row.sfdcSetupTime;
this.pageData.sfdcManufactureTime = data.row.sfdcManufactureTime;
this.pageData.sfdcDownTime = data.row.sfdcDownTime;
this.pageData.sfdcSetupDownTime = data.row.sfdcSetupDownTime;
this.pageData.sfdcProdSetupTime = data.row.sfdcProdSetupTime;
});
}).then(() => {
//6.
getSfdcReportedData(this.searchData).then(({data}) => {
this.pageData.sfdcApprovedQty = this.pageData.approvedQty - data.row.approveQty;
this.pageData.sfdcDefectedQty = this.pageData.defectedQty - data.row.defectQty;
this.pageData.sfdcReportedQty = this.pageData.sfdcApprovedQty + this.pageData.sfdcDefectedQty;
});
}).then(() => {
//
getSfdcMaterialByRollNo(this.searchData).then(({data}) => {
this.sfdcMaterialList = data.rows;
});
});
},
/*刷新当前卷的报工数据汇总*/
refreshCurrentRollReportedQty(){
getCurrentRollReportedQty(this.searchData).then(({data}) => {
this.pageData.approvedQty = data.row.approvedQty;
this.pageData.defectedQty = data.row.defectedQty;
this.pageData.totalQty = data.row.totalQty;
this.pageData.otherRollQty = data.row.otherRollQty;
})
},
//
refreshCurrentRollTimeQty(){
countSfdcTimeQty(this.searchData).then(({data}) => {
this.pageData.totalSetupTime = data.row.totalSetupTime;
this.pageData.totalDowntimeTimeSetup = data.row.totalDowntimeTimeSetup;
this.pageData.totalPureSetupTime = data.row.totalPureSetupTime;
this.pageData.totalProdTime = data.row.totalProdTime;
this.pageData.totalDowntimeTimeProd = data.row.totalDowntimeTimeProd;
this.pageData.totalPureProdTime = data.row.totalPureProdTime;
this.pageData.totalManufactureTime = data.row.totalManufactureTime;
this.pageData.totalManufactureDowntimeTime = data.row.totalManufactureDowntimeTime;
this.pageData.totalPureManufactureTime = data.row.totalPureManufactureTime;
});
},
//
refreshScheduleShiftData(){
getScheduleShiftData(this.searchData).then(({data}) => {
this.pageData.shiftDesc = data.row.shiftDesc;
});
},
//
refreshCurrentRollMaxAndMinTime(){
getSfdcTimeMaxAndMinTime(this.searchData).then(({data}) => {
this.pageData.eventTime = data.row.eventTime;
this.pageData.tillTime = data.row.tillTime;
});
},
//Sfdc
refreshSfdcTimeData(){
getSfdcTimeData(this.searchData).then(({data}) => {
//
this.pageData.eventTime = data.row.finishTime;
this.pageData.sfdcProdTime = data.row.sfdcProdTime;
this.pageData.sfdcSetupTime = data.row.sfdcSetupTime;
this.pageData.sfdcManufactureTime = data.row.sfdcManufactureTime;
this.pageData.sfdcDownTime = data.row.sfdcDownTime;
this.pageData.sfdcSetupDownTime = data.row.sfdcSetupDownTime;
this.pageData.sfdcProdSetupTime = data.row.sfdcProdSetupTime;
});
},
//
refreshSfdcData(){
getSfdcReportedData(this.searchData).then(({data}) => {
this.pageData.sfdcApprovedQty = this.pageData.approvedQty - data.row.approveQty;
this.pageData.sfdcDefectedQty = this.pageData.defectedQty - data.row.defectQty;
this.pageData.sfdcReportedQty = this.pageData.sfdcApprovedQty + this.pageData.sfdcDefectedQty;
});
},
init(seqNo, operatorData) {
//
this.scheduleData.seqNo = seqNo;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.titleCon = '结束卷操作 \
派工单号:'+seqNo;
// this.currentRollOps.seqNo = seqNo;
// this.currentRollOps.rollNo = rollNo;
//
//this.refreshPageData();
//
refreshSfdcMaterialTable(){
getSfdcMaterialByRollNo(this.searchData).then(({data}) => {
this.sfdcMaterialList = data.rows;
});
},
},
created() {
// this.factoryList()

15
src/views/modules/yieldReport/com_produce_report_normal.vue

@ -588,7 +588,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "录入人",
columnWidth: 55,
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -842,7 +842,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "录入人",
columnWidth: 55,
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -916,7 +916,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "报告人",
columnWidth: 60,
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1370,7 +1370,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "报告人",
columnWidth: 60,
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1750,7 +1750,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "完工人",
columnWidth: 60,
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -1840,7 +1840,7 @@ export default {
headerAlign: "center",
align: "center",
columnLabel: "首次调机人",
columnWidth: 70,
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -2695,6 +2695,7 @@ export default {
getCurrentRollOpsBySeqNo(){
getCurrentRollOpsBySeqNo(this.currentRollOps).then(({data}) => {
this.currentRollOps.rollNo = data.row.rollNo;
this.scheduleData.rollNo = data.row.rollNo;
this.currentRollOps.finishedFlag = data.row.finishedFlag;
});
},
@ -2891,7 +2892,7 @@ export default {
//
this.$nextTick(() => {
this.showFinishFlag = true;
this.$refs.comFinishRoll.init(this.scheduleData.seqNo, this.operatorData)
this.$refs.comFinishRoll.init(this.scheduleData, this.operatorData)
});
},

2
src/views/modules/yieldReport/produce_order.vue

@ -958,7 +958,7 @@ export default {
/*查询派工单*/
getProduceScheduleList() {
getProduceScheduleList(this.searchData).then(({data}) => {
this.produceScheduleList = data.rows
this.produceScheduleList = data.rows;
})
},

Loading…
Cancel
Save