|
|
@@ -85,10 +85,11 @@
|
|
|
<template v-slot:action="{ row }">
|
|
|
|
|
|
<el-link
|
|
|
+ v-if="row.status == 0"
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
@click="handelRouterTo(row)"
|
|
|
- >详情</el-link
|
|
|
+ >报工</el-link
|
|
|
>
|
|
|
</template>
|
|
|
<template v-slot:templateList="{ row }">
|
|
|
@@ -151,6 +152,10 @@
|
|
|
myWork: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
+ },
|
|
|
+ way: {
|
|
|
+ type: String,
|
|
|
+ default: 'todo'
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
@@ -182,7 +187,7 @@
|
|
|
{
|
|
|
prop: 'code',
|
|
|
label: '质检工单编码',
|
|
|
- // slot: 'code',
|
|
|
+ slot: 'code',
|
|
|
align: 'center',
|
|
|
width: 180,
|
|
|
showOverflowTooltip: true,
|
|
|
@@ -523,9 +528,29 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- handelRouterTo(row) {
|
|
|
- window.history.pushState(null, '', '/page-qms/inspectionWork?businessId=' + row.id);
|
|
|
- // this.$router.push(path);
|
|
|
+ async handelRouterTo(row) {
|
|
|
+ // window.history.pushState(null, '', '/page-qms/inspectionWork?isWt=true&businessId=' + row.id);
|
|
|
+ // // this.$router.push(path);
|
|
|
+
|
|
|
+ // if (type == 'edit') {
|
|
|
+ const code = await verificationQualityInspector(row.id);
|
|
|
+ if (code == '-1') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // }
|
|
|
+ const id = row.id;
|
|
|
+ const qualityType = row.qualityType;
|
|
|
+ const qualityTimeStart = row.qualityTimeStart || '';
|
|
|
+ window.history.pushState(null, '', '/page-qms/inspectionWork/edit?type=edit&id=' + id + '&qualityType=' + qualityType + '&qualityTimeStart=' + qualityTimeStart);
|
|
|
+ // this.$router.push({
|
|
|
+ // path: '/inspectionWork/edit',
|
|
|
+ // query: {
|
|
|
+ // type,
|
|
|
+ // id,
|
|
|
+ // qualityType,
|
|
|
+ // qualityTimeStart
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
getReportTemplateList() {
|
|
|
getQmsReportTemplatePageList({
|
|
|
@@ -660,7 +685,7 @@
|
|
|
|
|
|
// if (this.myWork) {
|
|
|
where.currentLoginUserId = this.$store.state.user.info.userId;
|
|
|
- where.status = 0;
|
|
|
+ where.status = this.way == 'todo' ? 0 : 1;
|
|
|
// }
|
|
|
|
|
|
return getList({
|
|
|
@@ -715,10 +740,11 @@
|
|
|
},
|
|
|
openDetails(row) {
|
|
|
let id = row.id;
|
|
|
- this.$router.push({
|
|
|
- path: '/inspectionWork/details',
|
|
|
- query: { id, path: '/inspectionWork', name: '工单' }
|
|
|
- });
|
|
|
+ window.history.pushState(null, '', '/inspectionWork/details?id=' + id + '&path=' + '/inspectionWork' + '&name=工单');
|
|
|
+ // this.$router.push({
|
|
|
+ // path: '/inspectionWork/details',
|
|
|
+ // query: { id, path: '/inspectionWork', name: '工单' }
|
|
|
+ // });
|
|
|
},
|
|
|
openWorkDetails(row) {
|
|
|
if (row.qualityPlanCode) {
|