|
@@ -147,7 +147,10 @@
|
|
|
>
|
|
>
|
|
|
|
|
|
|
|
<el-link
|
|
<el-link
|
|
|
- v-if="$hasPermission('qms:quality_work_order:certificate')"
|
|
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ $hasPermission('qms:quality_work_order:certificate') &&
|
|
|
|
|
+ row.status == 1
|
|
|
|
|
+ "
|
|
|
type="primary"
|
|
type="primary"
|
|
|
:underline="false"
|
|
:underline="false"
|
|
|
@click="openNumber(row)"
|
|
@click="openNumber(row)"
|
|
@@ -300,6 +303,7 @@
|
|
|
:type="'0'"
|
|
:type="'0'"
|
|
|
></component>
|
|
></component>
|
|
|
<mesWorkOrder ref="mesWorkOrderRef"></mesWorkOrder>
|
|
<mesWorkOrder ref="mesWorkOrderRef"></mesWorkOrder>
|
|
|
|
|
+ <certificate ref="certificateRef"></certificate>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
@@ -321,6 +325,8 @@
|
|
|
sampleCollection,
|
|
sampleCollection,
|
|
|
checkByQualityWorkOrderId
|
|
checkByQualityWorkOrderId
|
|
|
} from '@/api/inspectionWork';
|
|
} from '@/api/inspectionWork';
|
|
|
|
|
+ import { getList as getCertificate } from '@/api/certificateManagement';
|
|
|
|
|
+
|
|
|
import { queryTodo } from '@/api/bpm/task';
|
|
import { queryTodo } from '@/api/bpm/task';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import { getFile } from '@/api/system/file';
|
|
import { getFile } from '@/api/system/file';
|
|
@@ -332,7 +338,7 @@
|
|
|
import inspection_report2 from '@/views/inspectionReport/template/inspection_report2.vue';
|
|
import inspection_report2 from '@/views/inspectionReport/template/inspection_report2.vue';
|
|
|
import { inspectionProjectStatus } from '@/enum/dict.js';
|
|
import { inspectionProjectStatus } from '@/enum/dict.js';
|
|
|
import { recordingMethodList } from '@/utils/util.js';
|
|
import { recordingMethodList } from '@/utils/util.js';
|
|
|
-
|
|
|
|
|
|
|
+ import certificate from '@/views/certificateManagement/components/certificate.vue';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'InspectionWorkList',
|
|
name: 'InspectionWorkList',
|
|
|
mixins: [dictMixins, tabMixins],
|
|
mixins: [dictMixins, tabMixins],
|
|
@@ -346,7 +352,8 @@
|
|
|
inspectionProjectTaskSend,
|
|
inspectionProjectTaskSend,
|
|
|
inspection_report1,
|
|
inspection_report1,
|
|
|
inspection_report2,
|
|
inspection_report2,
|
|
|
- mesWorkOrder
|
|
|
|
|
|
|
+ mesWorkOrder,
|
|
|
|
|
+ certificate
|
|
|
},
|
|
},
|
|
|
props: {
|
|
props: {
|
|
|
// 是否只显示我的工单
|
|
// 是否只显示我的工单
|
|
@@ -937,10 +944,20 @@
|
|
|
done() {
|
|
done() {
|
|
|
this.$refs.search.search();
|
|
this.$refs.search.search();
|
|
|
},
|
|
},
|
|
|
- openNumber(row) {
|
|
|
|
|
- this.formData.certificateNumber = row.certificateNumber;
|
|
|
|
|
- this.rowData = row;
|
|
|
|
|
- this.addOpen = true;
|
|
|
|
|
|
|
+ async openNumber(row) {
|
|
|
|
|
+ let data = await getCertificate({
|
|
|
|
|
+ generateType: 1,
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ size: 1,
|
|
|
|
|
+ inspectionWorkId: row.id
|
|
|
|
|
+ });
|
|
|
|
|
+ console.log(data, 'data');
|
|
|
|
|
+ if (data?.list.length) {
|
|
|
|
|
+ this.$refs.certificateRef.open(data?.list[0], 'print');
|
|
|
|
|
+ }
|
|
|
|
|
+ // this.formData.certificateNumber = row.certificateNumber;
|
|
|
|
|
+ // this.rowData = row;
|
|
|
|
|
+ // this.addOpen = true;
|
|
|
},
|
|
},
|
|
|
closeModel() {
|
|
closeModel() {
|
|
|
this.addOpen = false;
|
|
this.addOpen = false;
|