|
|
@@ -275,6 +275,70 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
+ <header-title
|
|
|
+ v-if="
|
|
|
+ form.reportWorkType == '2' && form.produceTaskId && form.pickDetails
|
|
|
+ "
|
|
|
+ title="物品清单"
|
|
|
+ style="margin-top: 20px"
|
|
|
+ ></header-title>
|
|
|
+
|
|
|
+ <ele-pro-table
|
|
|
+ v-if="
|
|
|
+ form.reportWorkType == '2' && form.produceTaskId && form.pickDetails
|
|
|
+ "
|
|
|
+ ref="table"
|
|
|
+ row-key="id"
|
|
|
+ :columns="materialColumns"
|
|
|
+ :datasource="form.pickDetails"
|
|
|
+ cache-key="prenatal-examination-material-list-table-2510231107"
|
|
|
+ autoAmendPage
|
|
|
+ :needPage="false"
|
|
|
+ @refresh="getListByWorkOrderId"
|
|
|
+ >
|
|
|
+ <!-- <template v-slot:toolbar>
|
|
|
+ <el-button type="primary" @click="openMaterialModal"
|
|
|
+ >添加物料</el-button
|
|
|
+ >
|
|
|
+ </template> -->
|
|
|
+
|
|
|
+ <!-- <template v-slot:reportQuantity="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ size="small"
|
|
|
+ v-model.number="row.reportQuantity"
|
|
|
+ controls-position="right"
|
|
|
+ :min="0"
|
|
|
+ :max="row.feedQuantity"
|
|
|
+ ></el-input-number>
|
|
|
+ </template>
|
|
|
+ <template v-slot:qualifiedQuantity="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ size="small"
|
|
|
+ v-model.number="row.qualifiedQuantity"
|
|
|
+ controls-position="right"
|
|
|
+ :min="0"
|
|
|
+ :max="qualifiedQuantityMax(row)"
|
|
|
+ ></el-input-number>
|
|
|
+ </template>
|
|
|
+ <template v-slot:noQualifiedQuantity="{ row }">
|
|
|
+ <el-input-number
|
|
|
+ size="small"
|
|
|
+ v-model.number="row.noQualifiedQuantity"
|
|
|
+ controls-position="right"
|
|
|
+ :min="0"
|
|
|
+ :max="noQualifiedQuantityMax(row)"
|
|
|
+ ></el-input-number>
|
|
|
+ </template>
|
|
|
+ <template v-slot:msg="{ row }">
|
|
|
+ <el-input
|
|
|
+ v-model="row.msg"
|
|
|
+ type="textarea"
|
|
|
+ rows="1"
|
|
|
+ autosize
|
|
|
+ ></el-input>
|
|
|
+ </template> -->
|
|
|
+ </ele-pro-table>
|
|
|
+
|
|
|
<header-title
|
|
|
v-if="form.executeMethod == 2"
|
|
|
title="检查项目"
|
|
|
@@ -375,19 +439,6 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- 底部审批 -->
|
|
|
- <!-- <el-row
|
|
|
- v-if="details && details.processInstanceId"
|
|
|
- style="margin-top: 40px"
|
|
|
- >
|
|
|
- <bpmTask
|
|
|
- v-if="details.processInstanceId"
|
|
|
- :id="details.processInstanceId"
|
|
|
- :businessId="details.id"
|
|
|
- :gutter="20"
|
|
|
- ></bpmTask>
|
|
|
- </el-row> -->
|
|
|
</el-form>
|
|
|
|
|
|
<bpmDetail
|
|
|
@@ -525,13 +576,15 @@
|
|
|
import programRulesDialog from '@/views/produce/components/prenatalExamination/programRulesDialog.vue';
|
|
|
import releaseRulesDialog from '@/views/produce/components/prenatalExamination/releaseRulesDialog.vue';
|
|
|
import taskDialog from '@/views/produce/components/prenatalExamination/taskDialog.vue';
|
|
|
- import { saveOrUpdate } from '@/api/producetaskrecordrulesrecord/index';
|
|
|
import { getById } from '@/api/produceOrder/index.js';
|
|
|
import EquipmentDialog from './EquipmentDialog.vue';
|
|
|
import { recordRulesDetailPage } from '@/api/recordRules/index.js';
|
|
|
import SelectUser from '@/components/select/SelectUser/index.vue';
|
|
|
import toolModal from './toolModal.vue';
|
|
|
- import { getById as producetaskrulerecordGetById } from '@/api/producetaskrecordrulesrecord/index.js';
|
|
|
+ import {
|
|
|
+ getById as producetaskrulerecordGetById,
|
|
|
+ queryListByWorkOrderId
|
|
|
+ } from '@/api/producetaskrecordrulesrecord/index.js';
|
|
|
import bpmDetail from '@/views/bpm/processInstance/detail.vue';
|
|
|
import bpmTask from '@/components/bpmTask/bpmTask.vue';
|
|
|
|
|
|
@@ -609,7 +662,9 @@
|
|
|
// 是否临时执行
|
|
|
isTempRecord: 1,
|
|
|
// 记录规则详情
|
|
|
- details: []
|
|
|
+ details: [],
|
|
|
+ // 物品清单
|
|
|
+ pickDetails: []
|
|
|
};
|
|
|
|
|
|
return {
|
|
|
@@ -695,7 +750,138 @@
|
|
|
{ key: 'main', name: '事项信息' },
|
|
|
{ key: 'bpm', name: '流程详情' }
|
|
|
],
|
|
|
- activeComp: 'main'
|
|
|
+ activeComp: 'main',
|
|
|
+ // 物料清单表头
|
|
|
+ materialColumns: [
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'index',
|
|
|
+ columnKey: 'index',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 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 || 0) + (row.pickUnit || '');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '出库数量',
|
|
|
+ prop: 'outStorageQuantity',
|
|
|
+ minWidth: 120,
|
|
|
+ formatter: (row) => {
|
|
|
+ return (row.outStorageQuantity || 0) + (row.outStorageUnit || '');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '投料数量',
|
|
|
+ prop: 'feedQuantity',
|
|
|
+ minWidth: 120,
|
|
|
+ formatter: (row) => {
|
|
|
+ return (row.feedQuantity || 0) + (row.feedUnit || '');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '当次报工数量',
|
|
|
+ prop: 'reportQuantity',
|
|
|
+ minWidth: 160,
|
|
|
+ slot: 'reportQuantity',
|
|
|
+ formatter: (row) => {
|
|
|
+ return (
|
|
|
+ (row.reportQuantity == null ? '' : row.reportQuantity) +
|
|
|
+ (row.feedUnit || '')
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '当次合格数量',
|
|
|
+ prop: 'qualifiedQuantity',
|
|
|
+ minWidth: 160,
|
|
|
+ slot: 'qualifiedQuantity',
|
|
|
+ formatter: (row) => {
|
|
|
+ return (
|
|
|
+ (row.qualifiedQuantity == null ? '' : row.qualifiedQuantity) +
|
|
|
+ (row.feedUnit || '')
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '当次不合格数量',
|
|
|
+ prop: 'noQualifiedQuantity',
|
|
|
+ minWidth: 160,
|
|
|
+ slot: 'noQualifiedQuantity',
|
|
|
+ formatter: (row) => {
|
|
|
+ return (
|
|
|
+ (row.noQualifiedQuantity == null
|
|
|
+ ? ''
|
|
|
+ : row.noQualifiedQuantity) + (row.feedUnit || '')
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '不合格原因',
|
|
|
+ prop: 'msg',
|
|
|
+ minWidth: 160,
|
|
|
+ slot: 'msg'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '已报工数量',
|
|
|
+ prop: 'sumReportQuantity',
|
|
|
+ minWidth: 120,
|
|
|
+ formatter(row) {
|
|
|
+ return (row.sumReportQuantity || 0) + row.feedUnit;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '未报工数量',
|
|
|
+ prop: 'noReportQuantity',
|
|
|
+ minWidth: 120,
|
|
|
+ formatter(row) {
|
|
|
+ if (row.sumReportQuantity != null) {
|
|
|
+ return row.feedQuantity - row.sumReportQuantity + row.feedUnit;
|
|
|
+ }
|
|
|
+ return `${row.feedQuantity}${row.feedUnit || ''}`;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '合格总数',
|
|
|
+ prop: 'sumQualifiedQuantity',
|
|
|
+ minWidth: 120,
|
|
|
+ formatter(row) {
|
|
|
+ return (row.sumQualifiedQuantity || 0) + (row.feedUnit || '');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '不合格总数',
|
|
|
+ prop: 'sumNoQualifiedQuantity',
|
|
|
+ minWidth: 120,
|
|
|
+ formatter(row) {
|
|
|
+ return (row.sumNoQualifiedQuantity || 0) + (row.feedUnit || '');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -762,6 +948,7 @@
|
|
|
};
|
|
|
});
|
|
|
console.log('this.form', this.form);
|
|
|
+ this.getListByWorkOrderId();
|
|
|
},
|
|
|
// 查询规则详情
|
|
|
async getRulesDetias() {
|
|
|
@@ -803,7 +990,7 @@
|
|
|
this.form.ruleName = '';
|
|
|
this.form.details = [];
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.formRef.clearValidate()
|
|
|
+ this.$refs.formRef.clearValidate();
|
|
|
});
|
|
|
},
|
|
|
// 去选择设备
|
|
|
@@ -1036,6 +1223,19 @@
|
|
|
clearTool(row) {
|
|
|
row.tools = [];
|
|
|
row.toolNames = '';
|
|
|
+ },
|
|
|
+ async getListByWorkOrderId() {
|
|
|
+ if (!this.form.produceTaskId) return;
|
|
|
+ // 查询物料信息
|
|
|
+ const materialList = await queryListByWorkOrderId({
|
|
|
+ workOrderId: this.form.workOrderId,
|
|
|
+ recordId: this.form.id,
|
|
|
+ produceTaskId: this.form.produceTaskId,
|
|
|
+ ruleId: this.form.ruleId
|
|
|
+ });
|
|
|
+
|
|
|
+ console.log('materialList 物料信息', materialList);
|
|
|
+ this.form.pickDetails = materialList;
|
|
|
}
|
|
|
}
|
|
|
};
|