From 1085f3fffcdc0afd9f140490f9d0078a8426667c Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 03 二月 2026 13:27:30 +0800
Subject: [PATCH] 不合格管理:问题调整
---
src/views/business/unpass/components/unPassDialog.vue | 58 +++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 45 insertions(+), 13 deletions(-)
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>
--
Gitblit v1.9.3