diff --git a/src/api/production/generateReport.js b/src/api/production/generateReport.js index 0d2257a..ff00cc3 100644 --- a/src/api/production/generateReport.js +++ b/src/api/production/generateReport.js @@ -84,3 +84,4 @@ export const getTCPPackagePrintDataList = data =>createAPI('/board/getTCPPackage export const removeRework = (data) => createAPI(`/dailyPlan/removeRework`,'post',data) export const cancelRework = (data) => createAPI(`/dailyPlan/cancelRework`,'post',data) +export const queryOperator = (data) => createAPI(`/dailyPlan/operator`,'post',data) diff --git a/src/views/modules/production/reworkRecord.vue b/src/views/modules/production/reworkRecord.vue index d60f60e..0a257f4 100644 --- a/src/views/modules/production/reworkRecord.vue +++ b/src/views/modules/production/reworkRecord.vue @@ -6,7 +6,7 @@ import { saveRework, getRework, removeRework, - cancelRework + cancelRework, queryOperator } from '../../../api/production/generateReport' import dayjs from 'dayjs' import decimal, {Decimal} from 'decimal.js' @@ -308,6 +308,18 @@ export default { }) }) }, + handleQueryOperator(){ + let params = { + operatorId:this.saveRework.operatorId + } + queryOperator(params).then(({data})=>{ + if (data && data.code === 0){ + if (data.rows.length >= 1){ + this.saveRework.operatorName = data.rows[0].operatorName + } + } + }) + }, }, watch:{ 'saveRework.operatorId'(newVal, oldVal){ @@ -344,7 +356,7 @@ export default { 操作员 - +