From 8d2a081dfded669c58273764907914f365c1c306 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 21 七月 2026 10:00:20 +0800
Subject: [PATCH] 1.不合格处理:新增问题类型字段;2.班次:新增删除排班操作;3.检验任务:新增撤销委托订单操作
---
src/views/business/inspectionTask/index.vue | 64 +++++++++++++++++++++----------
1 files changed, 43 insertions(+), 21 deletions(-)
diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index 0683654..e623e29 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -9,7 +9,7 @@
<el-option label="KJNS" value="KJNS"/>
</el-select>
</el-form-item>
- <el-form-item label="鎵瑰彿" prop="updateBatchNo" v-if="tabIndex !== 0">
+ <el-form-item label="鎵瑰彿" prop="updateBatchNo">
<el-input v-model="queryParams.updateBatchNo" clearable placeholder="璇疯緭鍏�" size="small"
@keyup.enter.native="refreshTable()">
</el-input>
@@ -25,7 +25,7 @@
</el-select>
</el-form-item>
- <el-form-item label="鐗╂枡灞炴��" prop="materialProp" v-if="tabIndex !== 0">
+ <el-form-item label="鐗╂枡灞炴��" prop="materialProp" v-if="tabIndex !== -1">
<el-select clearable size="small" v-model="queryParams.materialProp" style="width: 100%" @change="refreshTable()">
<el-option v-for="dict in dict.type.material_prop_type" :key="dict.value" :label="dict.label"
:value="dict.value">
@@ -33,7 +33,7 @@
</el-select>
</el-form-item>
- <el-form-item label=" 渚涘簲鍟嗗悕绉�" prop="supplierName" v-if="tabIndex === 2">
+ <el-form-item label=" 渚涘簲鍟嗗悕绉�" prop="supplierName" v-if="tabIndex === 0">
<el-input v-model="queryParams.supplierName" clearable placeholder="璇疯緭鍏�" size="small"
@keyup.enter.native="goSearch">
</el-input>
@@ -49,7 +49,7 @@
<div style="display: flex; align-items: center">
<span style="font-size: 14px">璇曢獙瀹ょ绫�:</span>
<ul class="tab">
- <li v-for="(m, i) in tabList" :key="i" :class="{ active: i == tabIndex }" @click="handleTab(m, i)">
+ <li v-for="(m, i) in tabList" :key="i" :class="{ active: m.value === tabIndex }" @click="handleTab(m, i)">
{{ m.label.replace("璇曢獙瀹�", "") }}
</li>
</ul>
@@ -68,43 +68,44 @@
<div slot="action" slot-scope="scope">
<el-button size="small" type="text" @click="handleDataLook(scope.row)">鏁版嵁鏌ョ湅</el-button>
<el-button type="text" size="small"
- :disabled="(scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5) && checkPermi(['update:product:onPlan'])"
+ :disabled="(scope.row.userName == null || scope.row.insState === 3 || scope.row.insState === 5) && checkPermi(['update:product:onPlan'])"
@click="editInspection(scope.row)">淇敼妫�楠屽��</el-button>
<el-button type="text" size="small" :disabled="(
scope.row.userName == null ||
- scope.row.insState == 3 ||
- scope.row.insState == 5 ||
+ scope.row.insState === 3 ||
+ scope.row.insState === 5 ||
(scope.row.userName && !scope.row.userName.includes(nickName))
)" @click="handleInspection(scope.row)">妫�楠�</el-button>
<el-button type="text" size="small" :disabled="(
scope.row.userName == null ||
- scope.row.insState == 5 ||
- scope.row.insState == 3 ||
+ scope.row.insState === 5 ||
+ scope.row.insState === 3 ||
(scope.row.userName && !scope.row.userName.includes(nickName))
)" @click="handleConnect(scope.row)">浜ゆ帴</el-button>
<el-button type="text" size="small" @click="viewInspectInfo(scope.row)">鍘熷璁板綍</el-button>
+ <el-button v-if="tabIndex===-1" :disabled="scope.row.insState === 5 || (scope.row.userName && !scope.row.userName.includes(nickName))" style="color:#ff4949" type="text" size="small" @click="cancelInspectOrder(scope.row)">鎾ら攢涓嬪崟</el-button>
<el-popover placement="bottom" trigger="hover" style="margin-left: 6px"
- :disabled="(scope.row.insState != 3 || scope.row.userName == null || (scope.row.userName && !scope.row.userName.includes(nickName)))">
+ :disabled="(scope.row.insState !== 3 || scope.row.userName == null || (scope.row.userName && !scope.row.userName.includes(nickName)))">
<template #reference>
- <el-button link type="text" size="small" :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+ <el-button link type="text" size="small" :disabled="(scope.row.insState !== 3 || scope.row.userName == null ||
(scope.row.userName && !scope.row.userName.includes(nickName)))">鏇村</el-button>
</template>
<div>
- <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+ <el-button :disabled="(scope.row.insState !== 3 || scope.row.userName == null ||
(scope.row.userName && !scope.row.userName.includes(nickName)))" style="margin-left: 10px"
type="text" size="small" @click="download(scope.row)">涓嬭浇鎶ュ憡</el-button>
<el-upload ref='upload' :action="javaApi + '/insReport/inReport'" :before-upload="beforeUpload"
:data="{ id: scope.row.insReportId }" :headers="uploadHeader" :on-error="onError"
:on-success="handleSuccessUp" :show-file-list="false" style="display: inline;margin: 0 6px"
accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'>
- <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+ <el-button :disabled="(scope.row.insState !== 3 || scope.row.userName == null ||
(scope.row.userName && !scope.row.userName.includes(nickName)))" size="small"
type="text">涓婁紶</el-button>
</el-upload>
- <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+ <el-button :disabled="(scope.row.insState !== 3 || scope.row.userName == null ||
(scope.row.userName && !scope.row.userName.includes(nickName)))" type="text" size="small"
@click="handleRestore(scope.row)">杩樺師</el-button>
- <el-button :disabled="(scope.row.insState != 3 || scope.row.userName == null ||
+ <el-button :disabled="(scope.row.insState !== 3 || scope.row.userName == null ||
(scope.row.userName && !scope.row.userName.includes(nickName)))" type="text" size="small"
@click="handleIssued(scope.row)">鏌ョ湅鎶ュ憡</el-button>
</div>
@@ -259,6 +260,7 @@
} from "@/api/business/inspectionTask.js";
import { mapGetters } from "vuex";
import { getRetestResult } from "@/api/business/rawMaterialOrder";
+import { updateStatus } from "@/api/business/productOrder";
import { upReportUrl } from "@/api/business/insReport";
import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
import filePreview from "@/components/Preview/filePreview.vue";
@@ -302,7 +304,7 @@
{ label: "澶栬喘", value: 0 },
],
active: 1,
- tabIndex: 0,
+ tabIndex: -1,
dataDialogVisible: false,
planTotal: 0,
insStateList: [],
@@ -491,7 +493,7 @@
fixed: "right",
dataType: "slot",
slot: "action",
- width: '340px',
+ width: '380px',
label: "鎿嶄綔"
}
],
@@ -586,8 +588,8 @@
disabled: (row) => {
return (
this.lookInfo.userName == null ||
- this.lookInfo.insState == 3 ||
- this.lookInfo.insState == 5
+ this.lookInfo.insState === 3 ||
+ this.lookInfo.insState === 5
);
},
},
@@ -632,6 +634,27 @@
this.refreshTable();
},
methods: {
+ //濮旀墭妫�楠岋紝鎾ら攢涓嬪崟
+ cancelInspectOrder(row){
+ console.log(row)
+ this.$confirm("纭鎾ら攢濮旀墭璁㈠崟<span style='color:#1890FF'>"+row.entrustCode+"</span>?", '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ dangerouslyUseHTMLString: true,
+ type: 'warning'
+ }).then(() => {
+ updateStatus({
+ id: row.id,
+ }).then(res=>{
+ if(res.code === 200){
+ this.$message.success("鎾ら攢鎴愬姛")
+ }
+ this.refreshTable();
+ }).catch(err=>{
+ console.error(err);
+ })
+ }).catch(() => {});
+ },
getList() {
this.tableLoading = true;
let param = { ...this.queryParams, ...this.page };
@@ -728,7 +751,6 @@
},
// 鏌ョ湅鎶ュ憡
handleIssued(row) {
- console.log('================')
// todo: 鏌ョ湅鎶ュ憡缁勪欢
this.currentInfo = row;
let fileName = row.url
@@ -784,7 +806,7 @@
return "";
},
handleTab(m, i) {
- this.tabIndex = i;
+ this.tabIndex = m.value;
this.typeSource = m.value;
this.queryParams.sonLaboratory = "";
this.refreshTable();
--
Gitblit v1.9.3