|
|
@@ -438,6 +438,37 @@
|
|
|
:total="schemeList.length"
|
|
|
/> -->
|
|
|
</el-tab-pane>
|
|
|
+
|
|
|
+ <el-tab-pane
|
|
|
+ label="质检项任务单"
|
|
|
+ name="4"
|
|
|
+ v-if="form.recordingMethod == 1"
|
|
|
+ >
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="taskColumns"
|
|
|
+ :datasource="form.taskMonadList"
|
|
|
+ :needPage="false"
|
|
|
+ >
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane
|
|
|
+ label="质检项请托单"
|
|
|
+ name="5"
|
|
|
+ v-if="form.recordingMethod == 1"
|
|
|
+ >
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :columns="entrustColumns"
|
|
|
+ :datasource="form.requestEntrustList"
|
|
|
+ :needPage="false"
|
|
|
+ >
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+ <el-tab-pane label="工艺文件" name="6">
|
|
|
+ <wokePopupList ref="wokePopupListRef"></wokePopupList>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-row>
|
|
|
</template>
|
|
|
@@ -459,9 +490,13 @@
|
|
|
} from '@/api/inspectionWork';
|
|
|
import { getQualityTemplateByIds } from '@/api/produce/workPlan.js';
|
|
|
import { getCodeList } from '@/api/login';
|
|
|
+ import { inspectionProjectStatus } from '@/enum/dict.js';
|
|
|
+ import wokePopupList from '@/components/workList/wokePopupList.vue';
|
|
|
+ import { parameterGetByCode } from '@/api/system/dictionary-data';
|
|
|
export default {
|
|
|
components: {
|
|
|
- inspectionTemplateDialog
|
|
|
+ inspectionTemplateDialog,
|
|
|
+ wokePopupList
|
|
|
},
|
|
|
watch: {
|
|
|
schemeList: {
|
|
|
@@ -490,6 +525,7 @@
|
|
|
packingList: Array,
|
|
|
sampleList: Array,
|
|
|
schemeList: Array,
|
|
|
+ fileParam: Array,
|
|
|
loading: Boolean,
|
|
|
form: Object,
|
|
|
ids: String,
|
|
|
@@ -652,6 +688,287 @@
|
|
|
portion: null,
|
|
|
packingUnit: ''
|
|
|
},
|
|
|
+ entrustColumns: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '请托单号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 130
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '任务名称',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'sampleQuantity',
|
|
|
+ label: '样品数',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.sampleQuantity) {
|
|
|
+ return (
|
|
|
+ row.sampleQuantity + this.sampleList[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sampleQualifiedNumber',
|
|
|
+ label: '样品合格数',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.sampleQualifiedNumber) {
|
|
|
+ return (
|
|
|
+ row.sampleQualifiedNumber + this.sampleList[0]?.measureUnit ||
|
|
|
+ ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sampleNoQualifiedNumber',
|
|
|
+ label: '样品不合格数',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.sampleNoQualifiedNumber) {
|
|
|
+ return (
|
|
|
+ row.sampleNoQualifiedNumber +
|
|
|
+ this.sampleList[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'lossNumber',
|
|
|
+ label: '损耗数(合格品)',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.lossNumber) {
|
|
|
+ return row.lossNumber + this.sampleList[0]?.measureUnit || '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'lossNumberUnqualified',
|
|
|
+ label: '损耗数(不合格品)',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.lossNumberUnqualified) {
|
|
|
+ return (
|
|
|
+ row.lossNumberUnqualified + this.sampleList[0]?.measureUnit ||
|
|
|
+ ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'retainedSampleQuantity',
|
|
|
+ label: '留样数(合格品)',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.retainedSampleQuantity) {
|
|
|
+ return (
|
|
|
+ row.retainedSampleQuantity +
|
|
|
+ this.sampleList[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'retainedSampleUnqualified',
|
|
|
+ label: '留样数(不合格品)',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.retainedSampleUnqualified) {
|
|
|
+ return (
|
|
|
+ row.retainedSampleUnqualified +
|
|
|
+ this.sampleList[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ minWidth: 110,
|
|
|
+ label: '状态',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ return row.status == 0
|
|
|
+ ? '待收样'
|
|
|
+ : row.status == 1
|
|
|
+ ? '未报工'
|
|
|
+ : '已报工';
|
|
|
+ },
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ taskColumns: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '质检任务单号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 130
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '任务名称',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sampleQuantity',
|
|
|
+ label: '样品数',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.sampleQuantity) {
|
|
|
+ return (
|
|
|
+ row.sampleQuantity + this.sampleList[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sampleQualifiedNumber',
|
|
|
+ label: '样品合格数',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.sampleQualifiedNumber) {
|
|
|
+ return (
|
|
|
+ row.sampleQualifiedNumber + this.sampleList[0]?.measureUnit ||
|
|
|
+ ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sampleNoQualifiedNumber',
|
|
|
+ label: '样品不合格数',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.sampleNoQualifiedNumber) {
|
|
|
+ return (
|
|
|
+ row.sampleNoQualifiedNumber +
|
|
|
+ this.sampleList[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'lossNumber',
|
|
|
+ label: '损耗数(合格品)',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.lossNumber) {
|
|
|
+ return row.lossNumber + this.sampleList[0]?.measureUnit || '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'lossNumberUnqualified',
|
|
|
+ label: '损耗数(不合格品)',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.lossNumberUnqualified) {
|
|
|
+ return (
|
|
|
+ row.lossNumberUnqualified + this.sampleList[0]?.measureUnit ||
|
|
|
+ ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'retainedSampleQuantity',
|
|
|
+ label: '留样数(合格品)',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.retainedSampleQuantity) {
|
|
|
+ return (
|
|
|
+ row.retainedSampleQuantity +
|
|
|
+ this.sampleList[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'retainedSampleUnqualified',
|
|
|
+ label: '留样数(不合格品)',
|
|
|
+ formatter: (row) => {
|
|
|
+ if (row.retainedSampleUnqualified) {
|
|
|
+ return (
|
|
|
+ row.retainedSampleUnqualified +
|
|
|
+ this.sampleList[0]?.measureUnit || ''
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 110
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ minWidth: 110,
|
|
|
+ label: '状态',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row) => {
|
|
|
+ return row.status == 0
|
|
|
+ ? '待收样'
|
|
|
+ : row.status == 1
|
|
|
+ ? '未报工'
|
|
|
+ : '已报工';
|
|
|
+ },
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
rules: {
|
|
|
number: [
|
|
|
{
|
|
|
@@ -875,7 +1192,27 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+ mounted() {
|
|
|
+ this.getFileParam();
|
|
|
+ },
|
|
|
+
|
|
|
methods: {
|
|
|
+ async getFileParam() {
|
|
|
+ const res = await parameterGetByCode({
|
|
|
+ code: 'mes_craft_file_by_category_code'
|
|
|
+ });
|
|
|
+ const byCategory = res?.value === '1';
|
|
|
+
|
|
|
+ if (byCategory) {
|
|
|
+ this.$refs.wokePopupListRef.openTwo(this.form);
|
|
|
+ } else {
|
|
|
+ this.$refs.wokePopupListRef.open(
|
|
|
+ this.fileParam.map((item) => item.id)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
doTableLayout() {
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.showSampleListTable &&
|