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/api/performance/class.js | 9 ++
src/views/business/unpass/components/unPassDialog.vue | 26 ++++++
src/views/performance/class/index.vue | 102 +++++++++++++++++++++++++
src/views/business/unpass/index-manage.vue | 1
src/views/business/inspectionTask/index.vue | 64 ++++++++++-----
5 files changed, 180 insertions(+), 22 deletions(-)
diff --git a/src/api/performance/class.js b/src/api/performance/class.js
index 0104601..64501b9 100644
--- a/src/api/performance/class.js
+++ b/src/api/performance/class.js
@@ -118,3 +118,12 @@
params: query,
});
}
+
+// 鍒犻櫎鎺掔彮鏁版嵁
+export function delShift(data) {
+ return request({
+ url: "/performanceShift/delShift",
+ method: "delete",
+ data: data,
+ });
+}
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();
diff --git a/src/views/business/unpass/components/unPassDialog.vue b/src/views/business/unpass/components/unPassDialog.vue
index 12dca54..dcd00e1 100644
--- a/src/views/business/unpass/components/unPassDialog.vue
+++ b/src/views/business/unpass/components/unPassDialog.vue
@@ -87,6 +87,18 @@
</el-col>
</el-row>
<el-row >
+ <el-col :span="12">
+ <el-form-item label="闂鍒嗙被" prop="issueType">
+ <el-select style="width:100%" v-model="unPassForm.issueType" :disabled="type === 'view'" size="small" placeholder="璇烽�夋嫨">
+ <el-option v-for="item in issueTypeOptions" :key="item.value" :label="item.label"
+ :value="item.value"></el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ </el-col>
+ </el-row>
+ <el-row >
<el-col :span="24">
<el-form-item label="涓嶅悎鏍兼儏鍐垫弿杩�" prop="unqualifiedDesc">
<el-input style="width:100%" clearable type="textarea" v-model="unPassForm.unqualifiedDesc" :disabled="type === 'view'"
@@ -153,6 +165,7 @@
feedbackUser: '', // 鍙嶉浜�
feedbackTime: '', // 鍙嶉鏃堕棿
classification: '', // 鍒嗙被
+ issueType:null,
offGradeAscription: '', // 涓嶅悎鏍煎綊灞�
unqualifiedDesc: '', // 涓嶅悎鏍兼儏鍐垫弿杩�
unqualifiedHandlerFiles: [], // 涓嶅悎鏍奸檮浠禪RL
@@ -166,21 +179,32 @@
],
materialName: [
{ required: true, message: '璇峰~鍐欑墿鏂欏悕绉�', trigger: 'blur' }
+ ],
+ issueType: [
+ { required: true, message: '璇烽�夋嫨闂绫诲瀷', trigger: 'change' }
]
},
unPassFilesList: [], // 涓嶅悎鏍煎鐞嗛檮浠舵暟鎹�
classificationOptions: [], // 涓嶅悎鏍煎垎绫讳笅鎷夋
offGradeAscriptionOptions: [], // 涓嶅悎鏍煎綊灞炰笅鎷夋
handlunPassLoading: false,
- unqualifiedHandlerFiles: []
+ unqualifiedHandlerFiles: [],
+ issueTypeOptions:[],
}
},
mounted() {
this.getClassificationOptions() // 鑾峰彇涓嶅悎鏍煎垎绫讳笅鎷夋閫夐」
this.getOffGradeAscriptionOptions() // 鑾峰彇涓嶅悎鏍煎綊灞炰笅鎷夋閫夐」
+ this.getIssueTypeOptions() // 鑾峰彇闂鍒嗙被涓嬫媺妗嗛�夐」
},
// 鏂规硶闆嗗悎
methods: {
+ getIssueTypeOptions(){
+ // 涓嶅悎鏍奸棶棰樺垎绫�
+ this.getDicts("unqualified_issue_type").then((response) => {
+ this.issueTypeOptions = this.dictToValue(response.data);
+ });
+ },
disabledDate(time){
return time < new Date().getTime() - 86400000
},
diff --git a/src/views/business/unpass/index-manage.vue b/src/views/business/unpass/index-manage.vue
index 35f81e2..f06419f 100644
--- a/src/views/business/unpass/index-manage.vue
+++ b/src/views/business/unpass/index-manage.vue
@@ -675,6 +675,7 @@
},
},
{ label: "涓嶅悎鏍兼弿杩�", prop: "unqualifiedDesc", width: "160px" },
+ { label: "闂绫诲瀷", prop: "issueType", width: "120px" },
{
dataType: "action",
fixed: "right",
diff --git a/src/views/performance/class/index.vue b/src/views/performance/class/index.vue
index f0c3c07..b549c43 100644
--- a/src/views/performance/class/index.vue
+++ b/src/views/performance/class/index.vue
@@ -86,6 +86,13 @@
v-if="checkPermi(['performance:class:add'])"
>鎺� 鐝�</el-button
>
+ <el-button
+ size="small"
+ type="danger"
+ @click="delSchedulingVisible = true"
+ v-if="checkPermi(['performance:class:del'])"
+ >鍒犻櫎鎺掔彮</el-button
+ >
</div>
</div>
<div class="center" v-loading="pageLoading">
@@ -562,6 +569,58 @@
>
</span>
</el-dialog>
+<!-- 鍒犻櫎鎺掔彮寮规-->
+ <el-dialog
+ title="鍒犻櫎鎺掔彮"
+ :visible.sync="delSchedulingVisible"
+ @close="closeSchedulingDelDialog"
+ width="30%">
+ <el-form
+ ref="delSchedulingFormRef"
+ :model="delSchedulingForm"
+ :rules="delSchedulingFormRules"
+ >
+ <el-form-item label="浜哄憳鍚嶇О:" prop="userIdList">
+ <el-select
+ v-model="delSchedulingForm.userIdList"
+ popper-class="select-with-all"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ multiple
+ collapse-tags
+ clearable
+ >
+ <el-option
+ v-for="item in personList"
+ :key="item.id"
+ :label="item.name"
+ :value="item.id"
+ >
+ <span style="float: left">{{ item.name }}</span>
+ <span style="float: right; color: #8492a6; font-size: 13px">{{
+ item.account
+ }}</span>
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鏃堕棿鑼冨洿:" prop="dateRange">
+ <el-date-picker
+ v-model="delSchedulingForm.dateRange"
+ type="datetimerange"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ :default-time="['00:00:00', '23:59:59']"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ style="width: 100%"
+ >
+ </el-date-picker>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closeSchedulingDelDialog">鍙� 娑�</el-button>
+ <el-button type="primary" @click="confirmDelScheduling">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -579,6 +638,7 @@
update,
editAnnotationText,
delAnnotationText,
+ delShift
} from "@/api/performance/class";
import { selectUserListByPerformance } from "@/api/system/user";
import { getWorkMonth } from "@/utils/date";
@@ -685,6 +745,24 @@
menuX: 0,
menuY: 0,
selectedTarget: null,
+ //鍒犻櫎鎺掔彮
+ delSchedulingVisible:false,
+ delSchedulingForm:{
+ userIdList: [],
+ dateRange: [],
+ },
+ delSchedulingFormRules: {
+ dateRange: {
+ required: true,
+ message: "璇烽�夋嫨鏃ユ湡鑼冨洿",
+ trigger: "change",
+ },
+ userIdList: {
+ required: true,
+ message: "璇烽�夋嫨浜哄憳鍚嶇О",
+ trigger: "change",
+ }
+ },
};
},
computed: {
@@ -716,6 +794,30 @@
document.removeEventListener("click", this.handleClickOutside);
},
methods: {
+ //纭鍒犻櫎鎺掔彮
+ confirmDelScheduling() {
+ const data = {
+ userIdList: this.delSchedulingForm.userIdList,
+ startTime: this.delSchedulingForm.dateRange[0],
+ endTime: this.delSchedulingForm.dateRange[1],
+ }
+ delShift(data).then(res => {
+ if(res.code === 200) {
+ this.$message.success("鍒犻櫎鎴愬姛");
+ this.closeSchedulingDelDialog()
+ this.refreshTable()
+ }
+ }).catch(err => {
+ console.error(err);
+ this.closeSchedulingDelDialog()
+ })
+ },
+ closeSchedulingDelDialog(){
+ this.delSchedulingVisible = false;
+ this.delSchedulingForm.userIdList = [];
+ this.delSchedulingForm.dateRange = [];
+ this.$refs.delSchedulingFormRef.resetFields()
+ },
resetForm() {
this.$refs.schedulingQueryRef.resetFields();
this.$nextTick(() => {
--
Gitblit v1.9.3