|
@@ -31,11 +31,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 操作列 -->
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
- <el-link
|
|
|
|
|
- v-if="row.qualityWorkOrderId"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :underline="false"
|
|
|
|
|
- @click="craftFiles(row.qualityWorkOrderId)"
|
|
|
|
|
|
|
+ <el-link type="primary" :underline="false" @click="craftFiles(row)"
|
|
|
>工艺文件</el-link
|
|
>工艺文件</el-link
|
|
|
>
|
|
>
|
|
|
<el-link
|
|
<el-link
|
|
@@ -56,6 +52,7 @@
|
|
|
@reload="reload"
|
|
@reload="reload"
|
|
|
/>
|
|
/>
|
|
|
<fileList ref="fileListRef"></fileList>
|
|
<fileList ref="fileListRef"></fileList>
|
|
|
|
|
+ <wokePopup ref="wokePopupRef"></wokePopup>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -73,12 +70,15 @@
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
import { recordingMethodList } from '@/utils/util.js';
|
|
import { recordingMethodList } from '@/utils/util.js';
|
|
|
import { craftFiles } from '@/api/inspectionWork';
|
|
import { craftFiles } from '@/api/inspectionWork';
|
|
|
|
|
+ import wokePopup from '@/components/workList/wokePopup.vue';
|
|
|
|
|
+ import { parameterGetByCode } from '@/api/main/index';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
search,
|
|
search,
|
|
|
inspectionProjectReport,
|
|
inspectionProjectReport,
|
|
|
- fileList
|
|
|
|
|
|
|
+ fileList,
|
|
|
|
|
+ wokePopup
|
|
|
},
|
|
},
|
|
|
mixins: [dictMixins, tabMixins],
|
|
mixins: [dictMixins, tabMixins],
|
|
|
data() {
|
|
data() {
|
|
@@ -302,17 +302,17 @@
|
|
|
reload(where) {
|
|
reload(where) {
|
|
|
this.$refs.table.reload({ page: 1, where: where });
|
|
this.$refs.table.reload({ page: 1, where: where });
|
|
|
},
|
|
},
|
|
|
- async craftFiles(id) {
|
|
|
|
|
- if (id) {
|
|
|
|
|
- const data = await craftFiles(id);
|
|
|
|
|
- if (data.length) {
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- this.$refs.fileListRef.open(
|
|
|
|
|
- data.map((item) => item.id),
|
|
|
|
|
- 'view'
|
|
|
|
|
- );
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ async craftFiles(row) {
|
|
|
|
|
+ const res = await parameterGetByCode({
|
|
|
|
|
+ code: 'mes_craft_file_by_category_code'
|
|
|
|
|
+ });
|
|
|
|
|
+ const byCategory = res?.value === '1';
|
|
|
|
|
+
|
|
|
|
|
+ if (byCategory) {
|
|
|
|
|
+ this.$refs.wokePopupRef.openTwo(row);
|
|
|
|
|
+ } else{
|
|
|
|
|
+ const data =row.qualityWorkOrderId? await craftFiles(row.qualityWorkOrderId):[];
|
|
|
|
|
+ this.$refs.wokePopupRef.open(data.map((item) => item.id));
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
async sampleCollection(row) {
|
|
async sampleCollection(row) {
|
|
@@ -336,7 +336,7 @@
|
|
|
const res = await getById(row.id);
|
|
const res = await getById(row.id);
|
|
|
this.$refs.inspectionProjectReportRef.open(
|
|
this.$refs.inspectionProjectReportRef.open(
|
|
|
{
|
|
{
|
|
|
- workData: {...res.data,measureUnit:row.sampleMeasureUnit},
|
|
|
|
|
|
|
+ workData: { ...res.data, measureUnit: row.measureUnit },
|
|
|
list: res.data.templateList
|
|
list: res.data.templateList
|
|
|
},
|
|
},
|
|
|
type,
|
|
type,
|