diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index 073af80..f9ff191 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -917,6 +917,16 @@ + + 关闭 @@ -1064,6 +1074,10 @@ export default { showMaterialRecordFlag: false, // 领料记录弹出框显示状态 materialRecordList: [], // 领料记录列表数据 materialRecordLoading: false, // 领料记录加载状态 + materialRecordPageIndex: 1, // 领料记录分页当前页 + materialRecordPageSize: 20, // 领料记录分页大小 + materialRecordTotalPage: 0, // 领料记录总页数 + currentRowForMaterialRecord: null, // 当前领料记录对应的行数据 activeTable: 'order_info', orderInfo: { technicalNotes: '', @@ -4387,20 +4401,40 @@ export default { // 用户取消操作 }) }, + // 领料记录分页大小改变 + materialRecordSizeChangeHandle(val) { + this.materialRecordPageSize = val; + this.materialRecordPageIndex = 1; + this.getMaterialRecordData(); + }, + // 领料记录当前页改变 + materialRecordCurrentChangeHandle(val) { + this.materialRecordPageIndex = val; + this.getMaterialRecordData(); + }, // 显示领料记录弹出框 showMaterialRecordDialog(row) { this.showMaterialRecordFlag = true; + this.materialRecordPageIndex = 1; + this.currentRowForMaterialRecord = row; + this.getMaterialRecordData(); + }, + // 获取领料记录数据 + getMaterialRecordData() { this.materialRecordLoading = true; this.materialRecordList = []; let params = { site: this.scheduleData.site, orderNo: this.scheduleData.orderNo, - partNo: row.componentPartNo || row.partNo + partNo: this.currentRowForMaterialRecord.componentPartNo || this.currentRowForMaterialRecord.partNo, + page: this.materialRecordPageIndex, + limit: this.materialRecordPageSize }; getMaterialRecordList(params).then(({data}) => { this.materialRecordLoading = false; if (data && data.code === 0) { - this.materialRecordList = data.rows || []; + this.materialRecordList = data.page.list || []; + this.materialRecordTotalPage = data.page.totalCount || 0; } else { this.$message.error(data.msg || '获取领料记录失败'); }