|
@@ -195,11 +195,47 @@
|
|
|
ref="table"
|
|
ref="table"
|
|
|
row-key="id"
|
|
row-key="id"
|
|
|
:columns="materialColumns"
|
|
:columns="materialColumns"
|
|
|
- :datasource="[]"
|
|
|
|
|
|
|
+ :datasource="addForm.pickDetails"
|
|
|
cache-key="prenatal-examination-material-list-table-2510231107"
|
|
cache-key="prenatal-examination-material-list-table-2510231107"
|
|
|
autoAmendPage
|
|
autoAmendPage
|
|
|
:needPage="false"
|
|
:needPage="false"
|
|
|
|
|
+ @refresh="getListByWorkOrderId"
|
|
|
>
|
|
>
|
|
|
|
|
+ <template v-slot:toolbar>
|
|
|
|
|
+ <el-button type="primary" @click="openMaterialModal"
|
|
|
|
|
+ >添加物料</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-slot:reportQuantity="{ row }">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model.number="row.reportQuantity"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ min="0"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-slot:qualifiedQuantity="{ row }">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model.number="row.qualifiedQuantity"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ min="0"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-slot:noQualifiedQuantity="{ row }">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model.number="row.noQualifiedQuantity"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ min="0"
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-slot:msg="{ row }">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="row.msg"
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ rows="1"
|
|
|
|
|
+ autosize
|
|
|
|
|
+ ></el-input>
|
|
|
|
|
+ </template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
|
|
|
|
|
<header-title title="检查项目"></header-title>
|
|
<header-title title="检查项目"></header-title>
|
|
@@ -355,6 +391,8 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<toolModal ref="toolModalRef" @chooseModal="chooseModal" />
|
|
<toolModal ref="toolModalRef" @chooseModal="chooseModal" />
|
|
|
|
|
+
|
|
|
|
|
+ <materialModal ref="materialModalRef" @confirm="materialConfirm" />
|
|
|
</ele-modal>
|
|
</ele-modal>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -369,14 +407,15 @@
|
|
|
saveOrUpdateAndSubmit,
|
|
saveOrUpdateAndSubmit,
|
|
|
saveOrUpdate,
|
|
saveOrUpdate,
|
|
|
logicDelete,
|
|
logicDelete,
|
|
|
- getById
|
|
|
|
|
|
|
+ getById,
|
|
|
|
|
+ queryListByWorkOrderId
|
|
|
} from '@/api/producetaskrecordrulesrecord/index';
|
|
} from '@/api/producetaskrecordrulesrecord/index';
|
|
|
import toolModal from '@/views/batchRecord/components/toolModal.vue';
|
|
import toolModal from '@/views/batchRecord/components/toolModal.vue';
|
|
|
import { getTeam } from '@/api/produce/job.js';
|
|
import { getTeam } from '@/api/produce/job.js';
|
|
|
- import { det, row } from 'mathjs';
|
|
|
|
|
|
|
+ import materialModal from './materialModal.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
- components: { SelectUser, toolModal },
|
|
|
|
|
|
|
+ components: { SelectUser, toolModal, materialModal },
|
|
|
emits: ['reload'],
|
|
emits: ['reload'],
|
|
|
props: {
|
|
props: {
|
|
|
isTempRecord: {
|
|
isTempRecord: {
|
|
@@ -430,7 +469,9 @@
|
|
|
// }
|
|
// }
|
|
|
],
|
|
],
|
|
|
// 班组id
|
|
// 班组id
|
|
|
- teamId: ''
|
|
|
|
|
|
|
+ teamId: '',
|
|
|
|
|
+ // 物料字段name
|
|
|
|
|
+ pickDetails: []
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
@@ -534,7 +575,94 @@
|
|
|
checked: false,
|
|
checked: false,
|
|
|
teamUserList: [],
|
|
teamUserList: [],
|
|
|
teamList: [],
|
|
teamList: [],
|
|
|
- teamAllList: []
|
|
|
|
|
|
|
+ teamAllList: [],
|
|
|
|
|
+ // 物料清单表头
|
|
|
|
|
+ materialColumns: [
|
|
|
|
|
+ {
|
|
|
|
|
+ width: 45,
|
|
|
|
|
+ type: 'index',
|
|
|
|
|
+ columnKey: 'index',
|
|
|
|
|
+ align: 'center'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '批次号',
|
|
|
|
|
+ prop: 'batchNo',
|
|
|
|
|
+ minWidth: 120
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '领料类型',
|
|
|
|
|
+ prop: 'categoryLevelNamePath',
|
|
|
|
|
+ minWidth: 120
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '物料编码',
|
|
|
|
|
+ prop: 'categoryCode',
|
|
|
|
|
+ minWidth: 120
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '物料名称',
|
|
|
|
|
+ prop: 'categoryName',
|
|
|
|
|
+ minWidth: 120
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '工序名称',
|
|
|
|
|
+ prop: 'produceTaskName',
|
|
|
|
|
+ minWidth: 120
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '领料数量',
|
|
|
|
|
+ prop: 'pickQuantity',
|
|
|
|
|
+ minWidth: 120,
|
|
|
|
|
+ formatter: (row) => {
|
|
|
|
|
+ return (row.pickQuantity || '') + (row.pickUnit || '');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '当次报工数量',
|
|
|
|
|
+ prop: 'reportQuantity',
|
|
|
|
|
+ minWidth: 160,
|
|
|
|
|
+ slot: 'reportQuantity'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '当次合格数量',
|
|
|
|
|
+ prop: 'qualifiedQuantity',
|
|
|
|
|
+ minWidth: 160,
|
|
|
|
|
+ slot: 'qualifiedQuantity'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '当次不合格数量',
|
|
|
|
|
+ prop: 'noQualifiedQuantity',
|
|
|
|
|
+ minWidth: 160,
|
|
|
|
|
+ slot: 'noQualifiedQuantity'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '不合格原因',
|
|
|
|
|
+ prop: 'msg',
|
|
|
|
|
+ minWidth: 160,
|
|
|
|
|
+ slot: 'msg'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '已报工数量',
|
|
|
|
|
+ prop: 'sumReportQuantity',
|
|
|
|
|
+ minWidth: 120
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '未报工数量',
|
|
|
|
|
+ prop: 'noReportQuantity',
|
|
|
|
|
+ minWidth: 120
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '合格总数',
|
|
|
|
|
+ prop: 'sumQualifiedQuantity',
|
|
|
|
|
+ minWidth: 120
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '不合格总数',
|
|
|
|
|
+ prop: 'sumNoQualifiedQuantity',
|
|
|
|
|
+ minWidth: 120
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -556,16 +684,7 @@
|
|
|
return this.teamUserList.filter((user) =>
|
|
return this.teamUserList.filter((user) =>
|
|
|
this.addForm.executeUsersIds.includes(user.id)
|
|
this.addForm.executeUsersIds.includes(user.id)
|
|
|
);
|
|
);
|
|
|
- },
|
|
|
|
|
- // 物料清单表头
|
|
|
|
|
- materialColumns: [
|
|
|
|
|
- {
|
|
|
|
|
- width: 45,
|
|
|
|
|
- type: 'index',
|
|
|
|
|
- columnKey: 'index',
|
|
|
|
|
- align: 'center'
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
if (localStorage.getItem('singleUserInfo') == '1') {
|
|
if (localStorage.getItem('singleUserInfo') == '1') {
|
|
@@ -667,11 +786,25 @@
|
|
|
this.teamUserList = this.teamAllList[index];
|
|
this.teamUserList = this.teamAllList[index];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ this.getListByWorkOrderId();
|
|
|
|
|
+
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 物料信息查询
|
|
|
|
|
+ async getListByWorkOrderId() {
|
|
|
|
|
+ // 查询物料信息
|
|
|
|
|
+ const materialList = await queryListByWorkOrderId({
|
|
|
|
|
+ workOrderId: this.addForm.workOrderId,
|
|
|
|
|
+ recordId: this.productionInfo.recordId,
|
|
|
|
|
+ produceTaskInstanceId: this.workOrderInfo.taskId
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ console.log('materialList 物料信息', materialList);
|
|
|
|
|
+ this.addForm.pickDetails = materialList;
|
|
|
|
|
+ },
|
|
|
// 规则信息
|
|
// 规则信息
|
|
|
async getRuleInfo() {
|
|
async getRuleInfo() {
|
|
|
const data = await getRecordRulesDetail(this.productionInfo.ruleId);
|
|
const data = await getRecordRulesDetail(this.productionInfo.ruleId);
|
|
@@ -942,6 +1075,29 @@
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
console.log('row', row);
|
|
console.log('row', row);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 选择物料
|
|
|
|
|
+ openMaterialModal() {
|
|
|
|
|
+ this.$refs.materialModalRef.open(
|
|
|
|
|
+ this.addForm.workOrderId,
|
|
|
|
|
+ this.addForm.pickDetails
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ materialConfirm(data) {
|
|
|
|
|
+ // 选择物料后添加
|
|
|
|
|
+
|
|
|
|
|
+ this.addForm.pickDetails = [
|
|
|
|
|
+ ...this.addForm.pickDetails,
|
|
|
|
|
+ ...data.map((i) => {
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...i,
|
|
|
|
|
+ sumReportQuantity: i.reportQuantity,
|
|
|
|
|
+ sumNoReportQuantity: i.noReportQuantity,
|
|
|
|
|
+ sumQualifiedQuantity: i.qualifiedQuantity,
|
|
|
|
|
+ sumNoQualifiedQuantity: i.noQualifiedQuantity
|
|
|
|
|
+ };
|
|
|
|
|
+ })
|
|
|
|
|
+ ];
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|