From d2e867966539004b6b5a73ae3566a659ac6f8b6d Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 30 十月 2025 11:55:34 +0800
Subject: [PATCH] 检验任务数据分类查询问题修复
---
src/views/CNAS/process/demand/index.vue | 289 +++++++++++++++++++++++++++------------------------------
1 files changed, 137 insertions(+), 152 deletions(-)
diff --git a/src/views/CNAS/process/demand/index.vue b/src/views/CNAS/process/demand/index.vue
index 9667ffa..e77260c 100644
--- a/src/views/CNAS/process/demand/index.vue
+++ b/src/views/CNAS/process/demand/index.vue
@@ -4,38 +4,39 @@
<el-form :model="entitySearch" ref="entitySearch" size="small" :inline="true">
<el-form-item label="璇曟牱鍚嶇О" prop="sampleName">
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entitySearch.sampleName"
- @keyup.enter.native="refreshTable"></el-input>
+ @keyup.enter.native="refreshTable"></el-input>
</el-form-item>
<el-form-item label="濮旀墭鍗曚綅" prop="commissionUnit">
<el-input v-model="entitySearch.commissionUnit" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable()"></el-input>
+ @keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item label="鐢熶骇鍗曚綅" prop="production">
<el-input v-model="entitySearch.production" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable()"></el-input>
+ @keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item label="濮旀墭浜�" prop="commissionUser">
<el-input v-model="entitySearch.commissionUser" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable()"></el-input>
+ @keyup.enter.native="refreshTable()"></el-input>
</el-form-item>
<el-form-item>
- <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
</el-form-item>
</el-form>
</div>
- <div style="text-align: right; margin-bottom: 20px">
- <el-button size="medium" type="primary" @click="goAdd">鏂板</el-button>
+ <div style="text-align: right; margin-bottom: 10px">
+ <el-button size="small" type="primary" @click="goAdd">鏂板</el-button>
</div>
<div class="table">
- <el-table v-loading="tableListLoading" :data="tableList" height="530" style="width: 100%">
- <el-table-column align="center" label="搴忓彿" type="index" width="60"></el-table-column>
- <el-table-column label="璇曟牱鍚嶇О" prop="sampleName" show-overflow-tooltip width="120"></el-table-column>
- <el-table-column label="濮旀墭缂栧彿" prop="entrustCode" show-overflow-tooltip width="120"></el-table-column>
- <el-table-column label="濮旀墭鏃堕棿" prop="commissionDate" width="120"></el-table-column>
- <el-table-column label="鍨嬪彿" prop="modelNo"></el-table-column>
- <el-table-column label="濮旀墭鍗曚綅" prop="commissionUnit" show-overflow-tooltip width="120"></el-table-column>
- <el-table-column label="鐢熶骇鍗曚綅" prop="production" show-overflow-tooltip width="120"></el-table-column>
+ <el-table v-loading="tableListLoading" :data="tableList"
+ height="630" border :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }">
+ <el-table-column align="center" label="搴忓彿" type="index"></el-table-column>
+ <el-table-column label="璇曟牱鍚嶇О" prop="sampleName" show-overflow-tooltip></el-table-column>
+ <el-table-column label="濮旀墭缂栧彿" prop="entrustCode" show-overflow-tooltip></el-table-column>
+ <el-table-column label="濮旀墭鏃堕棿" prop="commissionDate" show-overflow-tooltip></el-table-column>
+ <el-table-column label="鍨嬪彿" prop="modelNo" show-overflow-tooltip></el-table-column>
+ <el-table-column label="濮旀墭鍗曚綅" prop="commissionUnit" show-overflow-tooltip></el-table-column>
+ <el-table-column label="鐢熶骇鍗曚綅" prop="production" show-overflow-tooltip></el-table-column>
<el-table-column label="濮旀墭浜�" prop="commissionUser"></el-table-column>
<el-table-column label="鏍峰搧鏁伴噺" prop="quantity"></el-table-column>
<el-table-column label="鏍峰搧鐘舵��" prop="sampleStatus"></el-table-column>
@@ -45,44 +46,44 @@
<span v-if="scope.row.isLeave === 0">鍚�</span>
</template>
</el-table-column>
- <el-table-column label="鏍峰搧澶勭悊鏂瑰紡" prop="processing">
+ <el-table-column label="鏍峰搧澶勭悊鏂瑰紡" prop="processing" width="150">
<template slot-scope="scope">
<span v-if="scope.row.processing === 1">瀹為獙瀹ゅ鐞�</span>
<span v-if="scope.row.processing === 0">濮旀墭鍗曚綅鍙栧洖</span>
</template>
</el-table-column>
- <el-table-column align="center" label="鎿嶄綔" width="240" fixed="right">
+ <el-table-column align="center" label="鎿嶄綔" width="240">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="goUpdate(scope.row)">缂栬緫</el-button>
<el-button size="mini" type="text" @click="handleLook(scope.row)">鏌ョ湅</el-button>
<el-button size="mini" style="color:#F56C6C" type="text" @click="deleteOrder(scope.row)">鍒犻櫎</el-button>
<el-button size="mini" type="text" @click="openDownloadDia(scope.row)">涓嬭浇</el-button>
- <el-upload ref='upload'
- :action="action"
- :data="{inspectionOrderId: scope.row.inspectionOrderId}" :headers="uploadHeader"
- :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" accept='image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx,.xlsx'
- name="file" style="background: transparent;display: inline;margin-left: 4px">
+ <el-upload ref='upload' :action="action" :data="{ inspectionOrderId: scope.row.inspectionOrderId }"
+ :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
+ accept='image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx,.xlsx' name="file"
+ style="background: transparent;display: inline;margin-left: 4px">
<span style="color: #409EFF">涓婁紶</span>
</el-upload>
</template>
</el-table-column>
</el-table>
- <el-pagination :current-page="1" :page-size="pages.size" :page-sizes="[10, 20, 30, 50, 100]"
- :total="total1" layout="->,total, sizes, prev, pager, next"
- style="margin-top: 10px" background
- @size-change="handleSizeChange1" @current-change="handleCurrentChange1">
+ <el-pagination :current-page="1" :page-size="pages.size" :page-sizes="[10, 20, 30, 50, 100]" :total="total1"
+ layout="->,total, sizes, prev, pager, next" style="margin-top: 10px" background @size-change="handleSizeChange1"
+ @current-change="handleCurrentChange1">
</el-pagination>
</div>
- <el-dialog
- :close-on-click-modal="false" :close-on-press-escape="false"
- :visible.sync="orderRowsVisible" title="鏂板妫�楠屼换鍔″崟" width="1000px">
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="orderRowsVisible"
+ title="鏂板妫�楠屼换鍔″崟" width="1000px">
<div style="display: flex; align-items: center;margin-bottom: 10px">
<span style="width: 80px">濮旀墭缂栧彿锛�</span>
- <el-input v-model="entity.entrustCode" clearable size="small" style="width: 300px;margin-right: 10px"></el-input>
+ <el-input v-model="entity.entrustCode" clearable size="small"
+ style="width: 300px;margin-right: 10px"></el-input>
<el-button size="small" type="primary" @click="searchTableData">鏌ヨ</el-button>
<el-button size="small" @click="refreshTableData">閲� 缃�</el-button>
</div>
- <el-table v-loading="tableLoading" :data="tableData" height="550" style="width: 100%">
+ <el-table v-loading="tableLoading" :data="tableData"
+ :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
+ height="550" style="width: 100%">
<el-table-column align="center" label="搴忓彿" type="index" width="60"></el-table-column>
<el-table-column label="濮旀墭缂栧彿" prop="entrustCode"></el-table-column>
<el-table-column label="鏍峰搧鍚嶇О" prop="sample"></el-table-column>
@@ -92,19 +93,16 @@
</template>
</el-table-column>
</el-table>
- <el-pagination :current-page="1" :page-size="tableSearch.size" :page-sizes="[10, 20, 30, 50, 100]"
- :total="total" layout="->,total, sizes, prev, pager, next"
- style="margin-top: 10px" background
- @size-change="handleSizeChange" @current-change="handleCurrentChange">
+ <el-pagination :current-page="1" :page-size="tableSearch.size" :page-sizes="[10, 20, 30, 50, 100]" :total="total"
+ layout="->,total, sizes, prev, pager, next" style="margin-top: 10px" background @size-change="handleSizeChange"
+ @current-change="handleCurrentChange">
</el-pagination>
</el-dialog>
- <el-dialog
- :class="{downPdf:title=='涓嬭浇'}" :close-on-click-modal="false"
- :close-on-press-escape="false"
- :modal="title!='涓嬭浇'" :title="title" :visible.sync="detailDialogVisible" top="20px" width="1200px">
+ <el-dialog :class="{ downPdf: title == '涓嬭浇' }" :close-on-click-modal="false" :close-on-press-escape="false"
+ :modal="title != '涓嬭浇'" :title="title" :visible.sync="detailDialogVisible" top="20px" width="1200px">
<div style="max-height: 75vh;overflow-y: auto;">
<div id="dialogBody">
- <table border="1" cellpadding="10" class="tables heads" style="border: 1px dashed black;">
+ <table border="1" cellpadding="10" class="tables heads" style="border: 1px dashed black;width: 100%">
<tr>
<td rowspan="2">
<img alt="" src="@/assets/logo/ZTTlogo.png" style="width: 80%;">
@@ -132,27 +130,23 @@
<span style="width: 100px">濮旀墭缂栧彿锛�</span>
<el-input v-model="currentInfo.entrustCode" clearable size="small"></el-input>
</p>
- <p v-if="operationType === 'view'" style="margin-top: 16px;margin-left: 600px;">濮旀墭缂栧彿锛歿{ currentInfo.entrustCode }}</p>
- <table border="1" cellpadding="10" class="tables">
+ <p v-if="operationType === 'view'" style="margin-top: 16px;margin-left: 600px;">濮旀墭缂栧彿锛歿{
+ currentInfo.entrustCode }}
+ </p>
+ <table border="1" cellpadding="10" class="tables" style="width: 100%">
<tr>
<td colspan="2">
<p>璇曟牱鍚嶇О</p>
</td>
- <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleName" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleName" clearable
+ size="small"></el-input></td>
<td v-if="operationType === 'view'">{{ currentInfo.sampleName }}</td>
<td>
<p>濮旀墭鏃堕棿</p>
</td>
<td v-if="operationType !== 'view'">
- <el-date-picker
- v-model="currentInfo.commissionDate"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
+ <el-date-picker v-model="currentInfo.commissionDate" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡"
+ size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</td>
<td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td>
@@ -161,37 +155,46 @@
<td colspan="2">
<p>鍨� 鍙�</p>
</td>
- <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.modelNo" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.modelNo" clearable
+ size="small"></el-input>
+ </td>
<td v-if="operationType === 'view'">{{ currentInfo.modelNo }}</td>
<td>
<p>濮旀墭鍗曚綅</p>
</td>
- <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUnit" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUnit" clearable
+ size="small"></el-input></td>
<td v-if="operationType === 'view'">{{ currentInfo.commissionUnit }}</td>
</tr>
<tr>
<td colspan="2">
<p>鐢熶骇鍗曚綅</p>
</td>
- <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.production" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.production" clearable
+ size="small"></el-input></td>
<td v-if="operationType === 'view'">{{ currentInfo.production }}</td>
<td>
<p>濮旀墭浜�</p>
</td>
- <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable
+ size="small"></el-input></td>
<td v-if="operationType === 'view'">{{ currentInfo.commissionUser }}</td>
</tr>
<tr>
<td colspan="2">
<p>鏍峰搧鏁伴噺</p>
</td>
- <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.quantity" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.quantity" clearable
+ size="small"></el-input></td>
<td v-if="operationType === 'view'">{{ currentInfo.quantity }}</td>
<td>
<p>鏍峰搧鐘舵��</p>
</td>
- <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleStatus" clearable size="small"></el-input></td>
- <td v-if="operationType === 'view'">{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleStatus" clearable
+ size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{
+ insStateList.find(m => m.value == currentInfo.sampleStatus) ? insStateList.find(m => m.value == currentInfo.sampleStatus).label:'/'
+ }}</td>
</tr>
<tr>
<td colspan="2">
@@ -204,7 +207,7 @@
</el-radio-group>
</td>
<td v-if="operationType === 'view'">
- <span v-if="currentInfo.isLeave==1">鏄�</span>
+ <span v-if="currentInfo.isLeave == 1">鏄�</span>
<span v-else>鍚�</span>
</td>
<td>
@@ -217,7 +220,7 @@
</el-radio-group>
</td>
<td v-if="operationType === 'view'">
- <span v-if="currentInfo.processing==0">濮旀墭鍗曚綅鍙栧洖</span>
+ <span v-if="currentInfo.processing == 0">濮旀墭鍗曚綅鍙栧洖</span>
<span v-else>瀹為獙瀹ゅ鐞�</span>
</td>
</tr>
@@ -226,15 +229,8 @@
<p>绾﹀畾瀹屾垚鏃堕棿(鎶ュ憡鏃ユ湡)</p>
</td>
<td v-if="operationType !== 'view'">
- <el-date-picker
- v-model="currentInfo.appointed"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
+ <el-date-picker v-model="currentInfo.appointed" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡"
+ size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</td>
<td v-if="operationType === 'view'">{{ currentInfo.appointed }}</td>
@@ -248,11 +244,12 @@
</el-radio-group>
</td>
<td v-if="operationType === 'view'">
- <span v-if="currentInfo.send==1">鑷彇</span>
+ <span v-if="currentInfo.send == 1">鑷彇</span>
<span v-else>鍏朵粬</span>
</td>
</tr>
- <el-button size="small" type="primary" @click="addOrderDetailList" v-if="operationType !== 'view'">娣诲姞</el-button>
+ <el-button size="small" type="primary" @click="addOrderDetailList"
+ v-if="operationType !== 'view'">娣诲姞</el-button>
<tr>
<td>
<p>搴忓彿</p>
@@ -270,15 +267,21 @@
<p>澶囨敞</p>
</td>
</tr>
- <tr v-for="(item,index) in currentInfo.orderDetailList" :key="index" >
- <td>{{ index+1 }}</td>
- <td v-if="operationType !== 'view'"><el-input v-model="item.sampleNumber" clearable size="small"></el-input></td>
+ <tr v-for="(item, index) in currentInfo.orderDetailList" :key="index">
+ <td>{{ index + 1 }}</td>
+ <td v-if="operationType !== 'view'"><el-input v-model="item.sampleNumber" clearable
+ size="small"></el-input>
+ </td>
<td v-if="operationType === 'view'">{{ item.sampleNumber }}</td>
- <td v-if="operationType !== 'view'"><el-input v-model="item.testItem" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="item.testItem" clearable size="small"></el-input>
+ </td>
<td v-if="operationType === 'view'">{{ item.testItem }}</td>
- <td v-if="operationType !== 'view'"><el-input v-model="item.testStandard" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="item.testStandard" clearable
+ size="small"></el-input>
+ </td>
<td v-if="operationType === 'view'">{{ item.testStandard }}</td>
- <td v-if="operationType !== 'view'"><el-input v-model="item.remark" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="item.remark" clearable size="small"></el-input>
+ </td>
<td v-if="operationType === 'view'">{{ item.remark }}</td>
</tr>
<tr>
@@ -290,35 +293,30 @@
<el-radio :label="0">涓嶈�冭檻涓嶇‘瀹氬害</el-radio>
<el-radio :label="1">鑰冭檻涓嶇‘瀹氬害</el-radio>
</el-radio-group>
- <span v-if="currentInfo.criterionRule === 1"><el-input v-model="currentInfo.criterionRuleRemark" clearable size="small" style="width: 60px"></el-input>%</span>
+ <span v-if="currentInfo.criterionRule === 1"><el-input v-model="currentInfo.criterionRuleRemark"
+ clearable size="small" style="width: 60px"></el-input>%</span>
</td>
<td v-if="operationType === 'view'" colspan="3">
- <span v-if="currentInfo.criterionRule===0">涓嶈�冭檻涓嶇‘瀹氬害</span>
- <span v-if="currentInfo.criterionRule===1">鑰冭檻涓嶇‘瀹氬害</span>
- <span v-if="currentInfo.criterionRule===1">{{ currentInfo.criterionRuleRemark + '%' }}</span>
+ <span v-if="currentInfo.criterionRule === 0">涓嶈�冭檻涓嶇‘瀹氬害</span>
+ <span v-if="currentInfo.criterionRule === 1">鑰冭檻涓嶇‘瀹氬害</span>
+ <span v-if="currentInfo.criterionRule === 1">{{ currentInfo.criterionRuleRemark + '%' }}</span>
</td>
</tr>
<tr>
<td colspan="2">
<p>濮旀墭浜虹鍚�</p>
</td>
- <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable
+ size="small"></el-input></td>
<td v-if="operationType === 'view'">
- {{currentInfo.commissionUser}}
+ {{ currentInfo.commissionUser }}
</td>
<td>
<p>濮旀墭鏃ユ湡</p>
</td>
<td v-if="operationType !== 'view'">
- <el-date-picker
- v-model="currentInfo.commissionDate"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
+ <el-date-picker v-model="currentInfo.commissionDate" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡"
+ size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</td>
<td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td>
@@ -327,28 +325,23 @@
<td colspan="2">
<p>濮旀墭浜鸿仈绯荤數璇�</p>
</td>
- <td v-if="operationType !== 'view'" colspan="3"><el-input v-model="currentInfo.commissionPhone" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'" colspan="3"><el-input v-model="currentInfo.commissionPhone" clearable
+ size="small"></el-input></td>
<td v-if="operationType === 'view'" colspan="3">{{ currentInfo.commissionPhone }}</td>
</tr>
<tr>
<td colspan="2">
<p>缁煎悎瀹ょ鍚�</p>
</td>
- <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input></td>
- <td v-if="operationType === 'view'">{{currentInfo.generalOfficeUser}}</td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.generalOfficeUser" clearable
+ size="small"></el-input></td>
+ <td v-if="operationType === 'view'">{{ currentInfo.generalOfficeUser }}</td>
<td>
<p>鎺ユ敹鏃ユ湡</p>
</td>
<td v-if="operationType !== 'view'">
- <el-date-picker
- v-model="currentInfo.receiptData"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
+ <el-date-picker v-model="currentInfo.receiptData" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡"
+ size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</td>
<td v-if="operationType === 'view'">{{ currentInfo.receiptData }}</td>
@@ -357,21 +350,15 @@
<td colspan="2">
<p>棰嗘牱鍛樼鍚�</p>
</td>
- <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input></td>
+ <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleTakerUser" clearable
+ size="small"></el-input></td>
<td v-if="operationType === 'view'">{{ currentInfo.sampleTakerUser }}</td>
<td>
<p>棰嗘牱鏃ユ湡</p>
</td>
<td v-if="operationType !== 'view'">
- <el-date-picker
- v-model="currentInfo.sampleData"
- clearable
- format="yyyy-MM-dd"
- placeholder="閫夋嫨鏃ユ湡"
- size="small"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd">
+ <el-date-picker v-model="currentInfo.sampleData" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡"
+ size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd">
</el-date-picker>
</td>
<td v-if="operationType === 'view'">{{ currentInfo.sampleData }}</td>
@@ -400,8 +387,10 @@
</div>
<span v-if="operationType !== 'view'" slot="footer" class="dialog-footer">
<el-button @click="detailDialogVisible = false">鍙� 娑�</el-button>
- <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">纭� 瀹�</el-button>
- <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">纭� 瀹�</el-button>
+ <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">纭�
+ 瀹�</el-button>
+ <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">纭�
+ 瀹�</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="downloadDialog" title="涓嬭浇" width="600px">
@@ -424,22 +413,22 @@
updateInspectionOrder
} from "@/api/cnas/process/demand/demand";
import limsTable from "@/components/Table/lims-table.vue";
-import {selectUserCondition} from "@/api/business/inspectionTask";
+import { selectUserCondition } from "@/api/business/inspectionTask";
export default {
- name: "a7-Inspection-Order-Form",
- components: {limsTable},
+ name: "Demand",
+ components: { limsTable },
data() {
return {
- title:'妫�楠屽鎵樺崟',
- detailDialogVisible:false,
- addLoading:false,
- outLoading:false,
- currentInfo:{
+ title: '妫�楠屽鎵樺崟',
+ detailDialogVisible: false,
+ addLoading: false,
+ outLoading: false,
+ currentInfo: {
orderDetailList: []
},
- personList:[],
- insStateList:[
+ personList: [],
+ insStateList: [
{
label: '寰呭鏍�',
value: 0
@@ -491,7 +480,6 @@
};
},
mounted() {
- // this.getPower()
this.getAuthorizedPerson()
this.refreshTable()
},
@@ -501,7 +489,7 @@
}
},
methods: {
- addOrderDetailList () {
+ addOrderDetailList() {
if (this.currentInfo.orderDetailList == null) {
this.currentInfo.orderDetailList = []
}
@@ -542,14 +530,14 @@
this.refreshTable()
},
// 鎵撳紑鏂板寮规
- goAdd () {
+ goAdd() {
this.operationType = 'add'
this.title = '鏂板妫�楠屽鎵樺崟';
this.orderRowsVisible = true
this.searchTableData()
},
// 鏌ヨ鍙柊澧炵殑妫�楠屽崟
- searchTableData () {
+ searchTableData() {
this.tableLoading = true
getInsOrderOnInspection({
...this.tableSearch,
@@ -563,7 +551,7 @@
})
},
// 閲嶇疆妫�楠屽崟鍒楄〃
- refreshTableData () {
+ refreshTableData() {
this.entity = {
entrustCode: ''
}
@@ -592,7 +580,7 @@
this.refreshTable();
},
// 鎻愪氦鏂板
- handleAdd () {
+ handleAdd() {
this.buttonLoading = true
addInspectionOrder(this.currentInfo).then(res => {
this.buttonLoading = false
@@ -605,11 +593,10 @@
})
},
// 鎻愪氦淇敼
- handleEdit () {
+ handleEdit() {
this.buttonLoading = true
updateInspectionOrder(this.currentInfo).then(res => {
this.buttonLoading = false
- if (res.code === 201) return
this.$message.success('鏂板鎴愬姛')
this.detailDialogVisible = false
this.orderRowsVisible = false
@@ -619,8 +606,8 @@
})
},
// 鏌ヨ闇�瑕佹柊澧炵殑濮旀墭鍗曡鎯�
- goAddOrder (row) {
- getInspectionOrderByInsOderId({insOrderId: row.id}).then(res => {
+ goAddOrder(row) {
+ getInspectionOrderByInsOderId({ insOrderId: row.id }).then(res => {
this.currentInfo = res.data
this.title = '鏂板妫�楠屽鎵樺崟';
this.detailDialogVisible = true
@@ -629,9 +616,9 @@
})
},
// 鎵撳紑缂栬緫寮规
- goUpdate (row) {
+ goUpdate(row) {
this.operationType = 'edit'
- getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => {
+ getInspectionOrderOne({ inspectionOrderId: row.inspectionOrderId }).then(res => {
this.currentInfo = res.data
this.title = '缂栬緫妫�楠屽鎵樺崟';
this.detailDialogVisible = true
@@ -640,9 +627,9 @@
})
},
// 鏌ョ湅
- handleLook(row){
+ handleLook(row) {
this.operationType = 'view'
- getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => {
+ getInspectionOrderOne({ inspectionOrderId: row.inspectionOrderId }).then(res => {
this.currentInfo = res.data
this.title = '鏌ョ湅妫�楠屽鎵樺崟';
this.detailDialogVisible = true
@@ -651,13 +638,13 @@
})
},
// 鍒犻櫎
- deleteOrder (row) {
+ deleteOrder(row) {
this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- delInspectionOrder({inspectionOrderId: row.inspectionOrderId}).then(res => {
+ delInspectionOrder({ inspectionOrderId: row.inspectionOrderId }).then(res => {
this.$message.success('鍒犻櫎鎴愬姛锛�');
this.refreshTable();
});
@@ -669,12 +656,12 @@
});
},
// 鎵撳紑涓嬭浇寮规
- openDownloadDia (row) {
+ openDownloadDia(row) {
this.downloadDialog = true
this.download = row
},
// 濮旀墭鍗曚笅杞�
- orderFormDown () {
+ orderFormDown() {
let url = this.download.fileUrl;
const link = document.createElement('a');
link.href = this.javaApi + url;
@@ -683,20 +670,19 @@
link.click();
},
// 濮旀墭鎶ュ憡涓嬭浇
- orderReportDown () {
+ orderReportDown() {
this.outLoading = true;
- exportInspectionOrder({inspectionOrderId: this.download.inspectionOrderId}).then(res => {
+ exportInspectionOrder({ inspectionOrderId: this.download.inspectionOrderId }).then(res => {
this.outLoading = false;
const blob = new Blob([res], { type: 'application/octet-stream' });
this.$download.saveAs(blob, '妫�楠屽鎵樺崟.docx')
- this.$message.success('瀵煎嚭鎴愬姛');
}).catch(err => {
this.outLoading = false;
})
},
// 涓婁紶
- handleSuccessUp(response, ) {
+ handleSuccessUp(response,) {
if (response.code == 200) {
this.$message.success('涓婁紶鎴愬姛');
this.refreshTable()
@@ -733,5 +719,4 @@
}
</script>
-<style scoped>
-</style>
+<style scoped></style>
--
Gitblit v1.9.3