From 1085f3fffcdc0afd9f140490f9d0078a8426667c Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 03 二月 2026 13:27:30 +0800
Subject: [PATCH] 不合格管理:问题调整
---
src/components/Table/lims-table.vue | 2
src/api/business/unpass.js | 9 ++++
src/views/statisticalCharts/qualificationRateStatistics/index.vue | 14 +++---
src/views/business/unpass/components/unPassDialog.vue | 58 ++++++++++++++++++++++------
src/views/business/unpass/index-manage.vue | 29 +++++++++++---
5 files changed, 84 insertions(+), 28 deletions(-)
diff --git a/src/api/business/unpass.js b/src/api/business/unpass.js
index 2aa3648..0bc71d9 100644
--- a/src/api/business/unpass.js
+++ b/src/api/business/unpass.js
@@ -72,6 +72,15 @@
data: data,
});
}
+
+// 閲嶆柊鎻愪氦骞朵笖鎺ㄩ�乷a
+export function reSubmitPushOa(data) {
+ return request({
+ url: "/unqualifiedHandler/reSubmitPushOa",
+ method: "post",
+ data: data,
+ });
+}
// 鏌ヨ涓嶅悎鏍兼牱鍝佹暟鎹�
export function pageInsUnPass(data) {
return request({
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index 1b698ca..ce5d647 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -70,7 +70,7 @@
:disabled="o.disabled ? o.disabled(scope.row) : false" :icon="iconFn(o)" :plain="o.plain"
:style="{ color: o.name === '鍒犻櫎' ? '#f56c6c' : o.color }" :type="o.type | typeFn(scope.row)"
@click="o.clickFun(scope.row)" :key="key">
- {{ o.name }}
+ {{ typeof o.name === 'function'? o.name(scope.row) : o.name }}
</el-button>
<el-upload :action="javaApi + o.url + '?id=' + (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)"
:key="uploadKeys[scope.$index]"
diff --git a/src/views/business/unpass/components/unPassDialog.vue b/src/views/business/unpass/components/unPassDialog.vue
index caaa8e2..f9ee7ae 100644
--- a/src/views/business/unpass/components/unPassDialog.vue
+++ b/src/views/business/unpass/components/unPassDialog.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <el-dialog title="鏂板涓嶅悎鏍煎鐞�" :visible.sync="isShow" width="740px" :show-close="false" :close-on-click-modal="false"
+ <el-dialog :title="type==='view'?'涓嶅悎鏍煎鐞嗚鎯�':'涓嶅悎鏍煎鐞嗘彁浜�'" :visible.sync="isShow" width="740px" :show-close="false" :close-on-click-modal="false"
:close-on-press-escape="false">
<div class="search">
<el-form :inline="true" :model="unPassForm" :rules="unPassFormRules" ref="unPassForm" class="form-inline"
@@ -37,8 +37,8 @@
<el-input clearable v-model="unPassForm.feedbackUser" disabled size="small" placeholder="璇疯緭鍏�"></el-input>
</el-form-item>
<el-form-item label="鍙嶉鏃堕棿:" prop="feedbackTime">
- <el-date-picker v-model="unPassForm.feedbackTime" :disabled="type === 'view'" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd HH:mm:ss" size="small" style="width: 175px" type="date" placeholder="閫夋嫨鏃ユ湡">
+ <el-date-picker :picker-options="{ disabledDate: this.disabledDate }" v-model="unPassForm.feedbackTime" :disabled="type === 'view'" format="yyyy-MM-dd"
+ value-format="yyyy-MM-dd" size="small" style="width: 175px" type="date" placeholder="閫夋嫨鏃ユ湡">
</el-date-picker>
</el-form-item>
<el-form-item label="鍒嗙被:" prop="classification">
@@ -61,13 +61,13 @@
style="width: 484px" size="small" placeholder="璇疯緭鍏�"></el-input>
</el-form-item>
</el-form>
- <el-upload v-if="type === 'add'" ref="upload" :action="action2" :on-change="beforeUpload" :on-error="onError"
+ <el-upload v-if="type !== 'view'" ref="upload" :action="action2" :on-change="beforeUpload" :on-error="onError"
:on-remove="handleRemoveFile" :on-success="getUnpassUrl" :headers="uploadHeader" :file-list="unPassFilesList">
- <el-button size="small" type="primary" style="text-align: left">闄勪欢涓婁紶</el-button>
+ <el-button icon="el-icon-upload" size="small" type="primary" style="text-align: left">闄勪欢涓婁紶</el-button>
</el-upload>
- <div v-if="type !== 'add'">
- <div style="padding-left: 40px;margin-bottom: 4px">闄勪欢锛�</div>
- <div style="padding-left: 40px;margin-bottom: 4px" v-for="item in unqualifiedHandlerFiles">
+ <div v-if="type!=='add'">
+ <div style="margin:4px 0px;font-weight: bold">闄勪欢锛�</div>
+ <div style="padding-left: 20px;margin-bottom: 4px" v-for="item in unqualifiedHandlerFiles">
<span>{{ item.fileName }}</span><el-link type="primary" style="margin-left: 20px;vertical-align: top"
:underline="false" @click="handleDown(item)">涓嬭浇</el-link>
</div>
@@ -77,13 +77,14 @@
<el-button @click="$emit('resetForm')">鍙� 娑�</el-button>
<el-button type="primary" @click="handlunPass" :loading="handlunPassLoading" v-if="type === 'add'">纭�
瀹�</el-button>
+ <el-button type="primary" @click="reSubmitPushOa" :loading="handlunPassLoading" v-if="type === 'resubmit'">閲嶆柊鎻愪氦</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
-import { getInsOrder, getUnqualifiedHandler, downFile, addUnqualifiedHandler } from '@/api/business/unpass.js'
+import { getInsOrder, getUnqualifiedHandler, downFile, addUnqualifiedHandler,reSubmitPushOa } from '@/api/business/unpass.js'
import {mapGetters} from "vuex";
export default {
name: "unPassDialog",
@@ -141,6 +142,9 @@
},
// 鏂规硶闆嗗悎
methods: {
+ disabledDate(time){
+ return time < new Date().getTime() - 86400000
+ },
getInsOrder(type, row) {
this.type = type
if (type === 'add') {
@@ -149,8 +153,12 @@
orderId: this.orderId
}).then(res => {
if (res.code === 200) {
- this.unPassForm.headline = `No.0005-涓ぉ鑰愪笣-澶栬喘鍝佷笉鍚堟牸鍙嶉璇勫鍙婄籂姝i闃叉祦绋�(姝e紡鐗�)-${this.nickName}-${new Date().toISOString().substring(0, 10)}` // 鏍囬
this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // 鎶ユ鏃堕棿
+ if(res.data.insOrder && res.data.insOrder.contract==='ZTNS'){
+ this.unPassForm.headline = `No.0005-涓ぉ鑰愪笣-澶栬喘鍝佷笉鍚堟牸鍙嶉璇勫鍙婄籂姝i闃叉祦绋�(姝e紡鐗�)-${this.nickName}-${this.unPassForm.feedbackTime}` // 鏍囬
+ }else{
+ this.unPassForm.headline = `No.0017-涓ぉ绉戞妧-澶栬喘鍝佷笉鍚堟牸鍙嶉璇勫鍙婄籂姝i闃叉祦绋�(姝e紡鐗�)-${this.nickName}-${this.unPassForm.feedbackTime}` // 鏍囬
+ }
this.unPassForm.feedbackUser = this.nickName // 鍙嶉浜�
this.unPassForm.insOrderId = res.data.insOrder.id // 璁㈠崟id
this.unPassForm.materialName = res.data.insOrder.sampleType // 鐗╂枡鍚嶇О
@@ -163,8 +171,9 @@
}
})
} else {
- this.getInfo(row.handlerId)
- this.unPassForm = { ...row }
+ this.getInfo(row.id)
+ console.log(row)
+ this.unPassForm = { ...row,unqualifiedHandlerFiles:[] }
}
},
getInfo(handlerId) {
@@ -194,6 +203,29 @@
})
this.handlunPassLoading = true
addUnqualifiedHandler(this.unPassForm).then(res => {
+ if (res.code === 200) {
+ this.$message.success('鎻愪氦鎴愬姛')
+ this.$emit('resetForm')
+ }
+ this.handlunPassLoading = false
+ })
+ } else {
+ console.log('error submit!!');
+ return false;
+ }
+ });
+ },
+ //閲嶆柊鎻愪氦骞朵笖鎺ㄩ�乷a
+ reSubmitPushOa(){
+ this.$refs['unPassForm'].validate((valid) => {
+ if (valid) {
+ if(this.unPassForm.unqualifiedHandlerFiles){
+ this.unPassForm.unqualifiedHandlerFiles.forEach(item => {
+ delete item.orderBy
+ })
+ }
+ this.handlunPassLoading = true
+ reSubmitPushOa(this.unPassForm).then(res => {
if (res.code === 200) {
this.$message.success('鎻愪氦鎴愬姛')
this.$emit('resetForm')
@@ -251,7 +283,7 @@
...mapGetters(["nickName"]),
action2() {
return this.javaApi + '/unqualifiedHandler/uploadFileByUnqualified'
- }
+ },
},
}
</script>
diff --git a/src/views/business/unpass/index-manage.vue b/src/views/business/unpass/index-manage.vue
index 556c548..76b32c0 100644
--- a/src/views/business/unpass/index-manage.vue
+++ b/src/views/business/unpass/index-manage.vue
@@ -122,6 +122,7 @@
data() {
return {
handlerId: null,
+ contract:null,
entity: {
contract: null,
sample: null,
@@ -260,16 +261,18 @@
dataType: 'action',
fixed: 'right',
label: '鎿嶄綔',
- width: '180px',
+ width: '220px',
operation: [
{
- name: '鎻愪氦OA',
+ name: (row)=>{
+ return row.requestId !== null && row.operation==='閫�鍥�' ? '閲嶆柊鎻愪氦' : '鎻愪氦OA'
+ },
type: 'text',
clickFun: (row) => {
this.openOA(row);
},
disabled: (row, index) => {
- return row.requestId !== null // 鏈塺equestId璇存槑宸茬粡鎻愪氦杩嘜A锛屼笉鍙啀娆℃彁浜�
+ return row.requestId !== null && row.operation!=='閫�鍥�' // 鏈塺equestId璇存槑宸茬粡鎻愪氦杩嘜A锛屼笉鍙啀娆℃彁浜�
}
},
{
@@ -286,7 +289,7 @@
this.deleteOA(row);
},
disabled: (row, index) => {
- return row.requestId !== null // 鏈塺equestId璇存槑宸茬粡鎻愪氦杩嘜A锛屼笉鍙啀娆℃彁浜�
+ return row.requestId !== null && row.operation!=='閫�鍥�' // 鏈塺equestId璇存槑宸茬粡鎻愪氦杩嘜A锛屼笉鍙啀娆℃彁浜�
}
},
]
@@ -294,7 +297,7 @@
],
page: {
total: 0,
- size: 10,
+ size: 20,
current: 1
},
statusList: [],
@@ -362,6 +365,9 @@
resetForm1 () {
this.$refs.unPassDialog.$refs['unPassForm'].resetFields();
this.unPassDialog = false
+ this.$nextTick(()=>{
+ this.refreshTable('page')
+ })
},
// 鎵撳紑鍒犻櫎OA纭寮规
deleteOA (row) {
@@ -386,7 +392,16 @@
// 鏌ョ湅鎻愪氦OA鐨勬暟鎹�
openOA (row) {
this.handlerId = row.handlerId
- this.dialogVisible = true
+ this.contract = row.contract
+ if(row && row.requestId !== null ){
+ // 閲嶆柊鎻愪氦OA,鎵撳紑缂栬緫寮规
+ this.unPassDialog = true
+ this.$nextTick(() => {
+ this.$refs.unPassDialog.getInsOrder('resubmit', row)
+ })
+ }else{
+ this.dialogVisible = true
+ }
},
// 鏌ョ湅OA娴佺▼
OAView (row) {
@@ -403,7 +418,7 @@
submitOA(row) {
// 鎻愪氦OA
this.submitOALoading = true
- pushOA({handlerId: this.handlerId,}).then(res => {
+ pushOA({handlerId: this.handlerId,contract:this.contract}).then(res => {
this.submitOALoading = false
if (res.code === 200) {
this.dialogVisible = false
diff --git a/src/views/statisticalCharts/qualificationRateStatistics/index.vue b/src/views/statisticalCharts/qualificationRateStatistics/index.vue
index b009415..bc5ab84 100644
--- a/src/views/statisticalCharts/qualificationRateStatistics/index.vue
+++ b/src/views/statisticalCharts/qualificationRateStatistics/index.vue
@@ -238,7 +238,7 @@
}
},
lineColors: ['#91A0FC'],
- barColors: ['#9fe080', '#ff994d'], // 鍚堟牸缁� / 涓嶅悎鏍肩孩
+ barColors: ['#5b9bd5', '#ed7d31'], // 鍚堟牸缁� / 涓嶅悎鏍肩孩
barColors2: ['#A4EEDA'],
pieTooltip: {
trigger: 'item'
@@ -275,8 +275,8 @@
length2: 40
},
data: [
- { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: {color: '#ff994d'} },
- { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#9fe080' } }
+ { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: {color: '#ed7d31'} },
+ { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#5b9bd5' } }
]
}
],
@@ -308,8 +308,8 @@
length2: 40,
},
data: [
- { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: { color: '#ff994d' } },
- { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#9fe080' } },
+ { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: { color: '#ed7d31' } },
+ { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#5b9bd5' } },
]
}
],
@@ -341,8 +341,8 @@
length2: 40,
},
data: [
- { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: { color: '#ff994d' } },
- { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#9fe080' } },
+ { value: 0, name: '涓嶅悎鏍兼暟閲�', itemStyle: { color: '#ed7d31' } },
+ { value: 0, name: '鍚堟牸鏁伴噺', itemStyle: { color: '#5b9bd5' } },
]
}
],
--
Gitblit v1.9.3