From 78d117860baff2bc0acbe11480a66fc9dc8703a2 Mon Sep 17 00:00:00 2001
From: “zhuo” <“zhuo@itcast.cn”>
Date: 星期四, 10 八月 2023 18:01:42 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.110.209:9001/r/lims-before
---
src/api/inspection/commisioninspection.js | 33 +
src/views/experiment/inspectionApplication/index.vue | 40 +
src/views/standardLibrary/index.vue | 10
src/api/urlEnum/nonConformingFeedback.js | 8
src/views/experiment/nonConformanceReview/index.vue | 212 +++++++++
src/views/experiment/nonConformingFeedback/index.vue | 197 +++++++++
src/router/index.js | 2
src/store/modules/settings.js | 6
src/views/inspectionManagement/commissionInspection/addCommision.vue | 326 +++++++++++++--
src/utils/request.js | 2
src/api/urlEnum/nonConformanceReview.js | 8
src/api/util/requestUtil.js | 18
src/api/urlEnum/satisfactionSurveys.js | 8
src/layout/components/AppMain.vue | 3
src/views/CNAS/satisfactionSurveys/index.vue | 182 ++++++++
src/views/inspectionManagement/commissionInspection/index.vue | 121 ++++-
16 files changed, 1,069 insertions(+), 107 deletions(-)
diff --git a/src/api/inspection/commisioninspection.js b/src/api/inspection/commisioninspection.js
index 07cb024..ce4a93f 100644
--- a/src/api/inspection/commisioninspection.js
+++ b/src/api/inspection/commisioninspection.js
@@ -7,4 +7,37 @@
method: 'get',
params
})
+}
+
+export function getlink(params){
+ return request({
+ url:'/link-basic-table/link',
+ method:'get',
+ params
+ })
+}
+
+export function getSampleName(params){
+ return request({
+ url: '/link-basic/material',
+ method: 'get',
+ params
+ })
+
+}
+
+export function getModelSpecification(params){
+ return request({
+ url: '/link-basic/specification',
+ method: 'get',
+ params
+ })
+}
+// 娣诲姞妫�楠岀敵璇峰崟
+export function addInspection(data){
+ return request({
+ url: '/link-basic/addInspection',
+ method: 'post',
+ data
+ })
}
\ No newline at end of file
diff --git a/src/api/urlEnum/nonConformanceReview.js b/src/api/urlEnum/nonConformanceReview.js
new file mode 100644
index 0000000..1b61727
--- /dev/null
+++ b/src/api/urlEnum/nonConformanceReview.js
@@ -0,0 +1,8 @@
+const baseurl='/nonConformanceReview'
+
+const url={
+ "getNonConformanceReview": baseurl+"/getNonConformanceReview",//鑾峰彇涓嶅悎鏍煎搧璇勫
+}
+export default{
+ url
+}
\ No newline at end of file
diff --git a/src/api/urlEnum/nonConformingFeedback.js b/src/api/urlEnum/nonConformingFeedback.js
new file mode 100644
index 0000000..736e5d4
--- /dev/null
+++ b/src/api/urlEnum/nonConformingFeedback.js
@@ -0,0 +1,8 @@
+const baseurl='/non-conforming-feedback'
+
+const url={
+ "getNonConformingFeedback": baseurl+"/getNonConformingFeedback",//鑾峰彇涓嶅悎鏍煎搧鍙嶉
+}
+export default{
+ url
+}
\ No newline at end of file
diff --git a/src/api/urlEnum/satisfactionSurveys.js b/src/api/urlEnum/satisfactionSurveys.js
new file mode 100644
index 0000000..6c5fc8f
--- /dev/null
+++ b/src/api/urlEnum/satisfactionSurveys.js
@@ -0,0 +1,8 @@
+const baseurl='/cnasSatisfactionSurvey'
+
+const url={
+ "getCnasSatisfactionSurvey": baseurl+"/getCnasSatisfactionSurvey",//鑾峰彇涓嶅悎鏍煎搧鍙嶉
+}
+export default{
+ url
+}
\ No newline at end of file
diff --git a/src/api/util/requestUtil.js b/src/api/util/requestUtil.js
new file mode 100644
index 0000000..263da29
--- /dev/null
+++ b/src/api/util/requestUtil.js
@@ -0,0 +1,18 @@
+ import request from '@/utils/request'
+
+export function get(path, params) {
+ return request({
+ url: path,
+ method: 'get',
+ params
+ })
+}
+
+export function post(path, data) {
+ return request({
+ url: path,
+ method: 'post',
+ data
+ })
+}
+
diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue
index c21454f..8d3654a 100644
--- a/src/layout/components/AppMain.vue
+++ b/src/layout/components/AppMain.vue
@@ -45,4 +45,7 @@
padding-right: 15px;
}
}
+.el-menu--popup{
+ width: 120px;
+}
</style>
diff --git a/src/router/index.js b/src/router/index.js
index d0203a4..e1261b7 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -194,7 +194,7 @@
path: 'inspectionApplication',
name: 'InspectionApplication',
component: () => import('@/views/experiment/inspectionApplication/index'),
- meta: { title: '妫�楠岀敵璇�', icon: 'tree' }
+ meta: { title: '鏂板妫�楠�', icon: 'tree' }
},
{
path: 'planAssignments',
diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js
index b3f33f8..d1367d6 100644
--- a/src/store/modules/settings.js
+++ b/src/store/modules/settings.js
@@ -5,7 +5,8 @@
const state = {
showSettings: showSettings,
fixedHeader: fixedHeader,
- sidebarLogo: sidebarLogo
+ sidebarLogo: sidebarLogo,
+ link:''
}
const mutations = {
@@ -14,6 +15,9 @@
if (state.hasOwnProperty(key)) {
state[key] = value
}
+ },
+ SAVE_LINK(state,link){
+ state.link = link
}
}
diff --git a/src/utils/request.js b/src/utils/request.js
index dacba5f..a814e44 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -21,6 +21,8 @@
// please modify it according to the actual situation
config.headers['X-Token'] = getToken()
}
+ config.headers['link'] = store.state.settings.link
+ // console.log('config' ,config)
return config
},
error => {
diff --git a/src/views/CNAS/satisfactionSurveys/index.vue b/src/views/CNAS/satisfactionSurveys/index.vue
index 0888772..ea69569 100644
--- a/src/views/CNAS/satisfactionSurveys/index.vue
+++ b/src/views/CNAS/satisfactionSurveys/index.vue
@@ -1,5 +1,181 @@
<template>
- <div>
- 婊℃剰搴﹁皟鏌�
+ <div class="content-main survey">
+ <div class="top-bar">
+ <el-form ref="form" style="width: 1000px;" :inline="true">
+ <!-- <el-input v-model="input" class="input-form" placeholder="璇风洿鎺ヨ緭鍏ユ牱寮忕紪鍙�/鏍峰搧鍚嶇О/鍨嬪彿瑙勬牸/杩涜鎼滅储鎴栦笅鎷夐�夋嫨杩涜缁勫悎鏌ヨ"
+ @keyup.enter.native="getData" /> -->
+ <el-form-item style="width: 800px;">
+ <el-col style="display: flex; justify-content: space-around;" :span="8">
+ <el-row>璋冩煡鏃ユ湡:</el-row>
+ <el-row><el-input type="date" style="width: 130px;" v-model="surveyDate" placeholder="璇烽�夋嫨璋冩煡鏃ユ湡"></el-input></el-row>
+ </el-col>
+ <el-col style="display: flex; justify-content: space-around;" :span="8">
+ <el-row>褰曞叆鏃ユ湡:</el-row>
+ <el-row><el-input style="width: 130px;" v-model="entryDate" placeholder="璇烽�夋嫨褰曞叆鏃ユ湡"></el-input></el-row>
+ </el-col>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="small" @click="getData()">鏌ヨ</el-button>
+ <el-button type="primary" size="small" plain @click="resetData()">娓呯┖</el-button>
+ </el-form-item>
+ </el-form>
+ <el-form>
+ <el-button size="40" icon="el-icon-document-add" type="primary">鏂板璁板綍</el-button>
+ </el-form>
+ </div>
+ <div class="library-table">
+ <div class="table-box">
+ <el-table ref="tableData" :max-height="800" :cell-style="{ textAlign: 'center' }"
+ :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
+ :data="tableData" style="width: 100%">
+ <el-table-column type="index" label="搴忓彿" min-width="5%">
+ <template slot-scope="scope">
+ <el-checkbox v-model="id" value="scope.row.id" ></el-checkbox>
+ </template>
+ </el-table-column>
+ <el-table-column prop="surveyDate" label="璋冩煡鏃ユ湡" min-width="10%"/>
+ <el-table-column prop="userUnit" label="瀹㈡埛鍗曚綅鍚嶇О" min-width="10%" />
+ <el-table-column prop="projectName" label="椤圭洰鍚嶇О" min-width="10%" />
+ <el-table-column prop="fillName" label="濉〃浜哄鍚�" min-width="10%" />
+ <el-table-column prop="dateInfo" label="鏃ユ湡" min-width="10%" />
+ <el-table-column prop="post" label="鑱屼綅" min-width="10%" />
+ <el-table-column prop="telephone" label="鑱旂郴鐢佃瘽" min-width="10%" />
+ <el-table-column prop="userName" label="褰曞叆浜�" min-width="10%" />
+ <el-table-column label="闄勪欢" min-width="10%" >
+ <template>
+ <a style="color: #3894d1;">鏌ョ湅闄勪欢</a>
+ </template>
+ </el-table-column>
+ </el-table>
+ <!-- 鍒嗛〉鍣� -->
+ <div>
+ <el-pagination :current-page="page" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize"
+ layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
+ @current-change="handleCurrentChange" />
+ </div>
+ </div>
+ </div>
</div>
-</template>
+ </template>
+
+ <script>
+ import { get, post } from '@/api/util/requestUtil';
+ import urlInfo from '../../../api/urlEnum/satisfactionSurveys.js'
+ export default {
+ data() {
+ return {
+ input: '',
+ tableData: [],
+ page: 1,
+ total: 0,
+ pageSize: 10,
+ entryDate: null,
+ surveyDate: null,
+ id: 0,
+ }
+ },
+ created() {
+
+ },
+ mounted() {
+ this.getData()
+ },
+ methods: {
+ handleCurrentChange() {
+ this.getData();
+ },
+ handleSizeChange() {
+
+ },
+ exportData() {
+
+ },
+ // 閲嶇疆鎸夐挳
+ resetData() {
+ this.page = 1
+ this.pageSize = 10
+ this.surveyDate=null
+ this.entryDate=null
+ this.getData()
+ },
+ async getData() {
+ let param = {
+ "currentPage": this.page,
+ 'pageNum': this.pageSize,
+ "surveyDate": this.surveyDate,
+ "entryDate": this.entryDate
+ }
+ let res = await get(urlInfo.url.getCnasSatisfactionSurvey, param)
+ this.tableData = res.data.cnasSatisfactionSurveyList
+ this.total = res.data.total
+ }
+ }
+ }
+ </script>
+
+ <style lang="scss" scoped>
+ .top-bar {
+ margin: -25px -15px;
+ background: #fff;
+ display: flex;
+ justify-content: space-between;
+ padding: 5px 24px 0px 24px;
+
+ .input-form {
+ width: 800px;
+ }
+
+ .el-dropdown-link {
+ cursor: pointer;
+ color: #409EFF !important;
+ }
+
+ .el-icon-arrow-down {
+ font-size: 12px !important;
+ }
+
+
+ }
+
+ .library-table {
+ background-color: #fff;
+ flex: 1;
+ margin: 0px -15px;
+ margin-top: 40px;
+ display: flex;
+ flex-direction: column;
+
+ .table-header {
+ padding: 20px;
+ display: flex;
+ justify-content: space-between;
+
+ .el-form-item {
+ margin-bottom: 30px !important;
+ }
+ }
+
+ .table-box {
+ padding: 0px 20px;
+ margin-top: 20px;
+ flex: 1;
+ background: #fff;
+ display: flex;
+ flex-direction: column;
+
+ >div:nth-child(2) {
+ display: flex;
+ justify-content: end;
+ margin: 10px 0;
+ }
+
+ }
+ }
+ </style>
+ <style >
+ .content-main {
+ .el-form .el-form-item .el-form-item__content {
+ width: 100% !important;
+ }
+ }
+ </style>
diff --git a/src/views/experiment/inspectionApplication/index.vue b/src/views/experiment/inspectionApplication/index.vue
index 7303bda..b53ff7c 100644
--- a/src/views/experiment/inspectionApplication/index.vue
+++ b/src/views/experiment/inspectionApplication/index.vue
@@ -4,14 +4,35 @@
<div class="content-main">
<div class="top-bar">
<el-form ref="form" :inline="true" :model="searchData">
- <el-form-item>
+ <el-form-item label="鐢宠鍗曞彿:">
<el-input
- v-model="searchData.keyword"
+ v-model="searchData.applicationnumber"
class="input-form"
- placeholder="璇疯緭鍏ョ敵璇峰崟鍙�/妫�楠屽璞�/瀵硅薄浣嶇疆/瀵硅薄鍚嶇О"
+ placeholder="璇疯緭鍏ョ敵璇峰崟鍙�"
+ style="width: 200px; margin-right: 20px;"
>
- <i slot="prefix" class="el-input__icon el-icon-search" />
+ <i slot="prefix" class="el-input__icon el-icon-search" />
</el-input>
+ </el-form-item>
+ <el-form-item label="妫�楠岀被鍨�:">
+ <el-select v-model="searchData.type" placeholder="鍏ㄩ儴" style="width: 100px;margin-right: 20px;">
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value">
+ </el-option>
+ </el-select>
+ </el-form-item>
+ <el-form-item label="妫�楠岀姸鎬�:" style="margin-right: 20px;">
+ <el-select v-model="searchData.state" placeholder="鍏ㄩ儴" style="width: 100px;margin-right: 20px;">
+ <el-option
+ v-for="item in options"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value">
+ </el-option>
+ </el-select>
</el-form-item>
<el-form-item>
<el-button type="primary">鏌ヨ</el-button>
@@ -268,7 +289,9 @@
return {
showDetail: false,
searchData: {
- keyword: ''
+ applicationnumber: '',
+ type: '',
+ state: ''
},
inspectionTable: [{
applicationnum: 'QC22-09155',
@@ -349,6 +372,13 @@
amount: '',
checkdate: ''
},
+ options:[{
+ value: '0',
+ label: '閫夐」1'
+ },{
+ value:'1',
+ label: '閫夐」2'
+ }],
currentPage: 1,
total: 20, // 鎬绘潯鏁�
pageSize: 10, // 姣忛〉鐨勬暟鎹潯鏁�
diff --git a/src/views/experiment/nonConformanceReview/index.vue b/src/views/experiment/nonConformanceReview/index.vue
index f00b327..5eab166 100644
--- a/src/views/experiment/nonConformanceReview/index.vue
+++ b/src/views/experiment/nonConformanceReview/index.vue
@@ -1,25 +1,207 @@
<template>
- <div>
- <el-row span="22">
- <el-col span="5">
- <el-input placeholder="璇疯緭鍏ュ唴瀹�">
- </el-input>
- </el-col>
- <el-col span=""></el-col>
- <el-col></el-col>
- <el-col></el-col>
- <el-col></el-col>
- </el-row>
- <el-row span="22">
-
- </el-row>
+ <div class="content-main">
+ <div class="top-bar">
+ <el-form ref="form" style="width: 1000px;" :inline="true">
+ <!-- <el-input v-model="input" class="input-form" placeholder="璇风洿鎺ヨ緭鍏ユ牱寮忕紪鍙�/鏍峰搧鍚嶇О/鍨嬪彿瑙勬牸/杩涜鎼滅储鎴栦笅鎷夐�夋嫨杩涜缁勫悎鏌ヨ"
+ @keyup.enter.native="getData" /> -->
+ <el-form-item style="width: 800px;">
+ <el-col style="display: flex; justify-content: space-around;" :span="8">
+ <el-row>鏍峰紡缂栧彿:</el-row>
+ <el-row><el-input size="small" v-model="materialCode" placeholder="璇疯緭鍏ユ牱寮忕紪鍙�"></el-input></el-row>
+ </el-col>
+ <el-col style="display: flex; justify-content: space-around;" :span="8">
+ <el-row>鏍峰紡鍚嶇О:</el-row>
+ <el-row><el-input size="small" v-model="materialName" placeholder="璇疯緭鍏ユ牱寮忓悕绉�"></el-input></el-row>
+ </el-col>
+ <el-col style="display: flex; justify-content: space-around;" :span="8">
+ <el-row>鐢宠鍗曞彿:</el-row>
+ <el-row><el-input size="small" v-model="inspectionCode" placeholder="璇疯緭鍏ョ敵璇峰崟鍙�"></el-input></el-row>
+ </el-col>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="small" @click="getData()">鏌ヨ</el-button>
+ <el-button type="primary" size="small" plain @click="resetData()">閲嶇疆</el-button>
+ <el-dropdown style="margin-left: 7px;">
+ <span class="el-dropdown-link">
+ 楂樼骇鎼滅储<i class="el-icon-arrow-down el-icon--right"></i>
+ </span>
+ <el-dropdown-menu slot="dropdown">
+ <el-dropdown-item>榛勯噾绯�</el-dropdown-item>
+ <el-dropdown-item>鐙瓙澶�</el-dropdown-item>
+ <el-dropdown-item>铻鸿洺绮�</el-dropdown-item>
+ <el-dropdown-item disabled>鍙岀毊濂�</el-dropdown-item>
+ <el-dropdown-item divided>铓典粩鐓�</el-dropdown-item>
+ </el-dropdown-menu>
+ </el-dropdown>
+ </el-form-item>
+ </el-form>
+ <el-form>
+ <el-button size="40" type="primary">鎵归噺鎻愪氦</el-button>
+ </el-form>
+ </div>
+ <div class="library-table">
+ <div class="table-box">
+ <el-table ref="tableData" :max-height="800" :cell-style="{ textAlign: 'center' }"
+ :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
+ :data="tableData" style="width: 100%">
+ <el-table-column type="selection" label="" min-width="5%" />
+ <el-table-column label="鏍峰搧缂栧彿" min-width="10%">
+ <template slot-scope="scope">
+ <a style="color: #3894d1;">{{ scope.row.materialCode }}</a>
+ </template>
+ </el-table-column>
+ <el-table-column prop="materialName" label="鏍峰搧鍚嶇О" min-width="10%" />
+ <el-table-column label="鐢宠鍗曞彿" min-width="10%" >
+ <template slot-scope="scope">
+ <a style="color: #3894d1;">{{ scope.row.inspectionCode }}</a>
+ </template>
+ </el-table-column>
+ <el-table-column prop="createTime" label="鐧昏鏃ユ湡" min-width="10%" />
+ <el-table-column prop="testManager" label="妫�楠岃礋璐d汉" min-width="10%" />
+ <el-table-column prop="specifications" label="瑙勬牸鍨嬪彿" min-width="10%" />
+ <el-table-column prop="inspectionStatus" label="缁撹" min-width="10%">
+ <template slot-scope="scope">
+ <el-tag type="danger">涓嶅悎鏍�</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" min-width="8%">
+ <template slot-scope="scope">
+ <el-button type="text" size="small">鎻愪氦</el-button>
+ <el-button type="text" size="small">浣滃簾</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <!-- 鍒嗛〉鍣� -->
+ <div>
+ <el-pagination :current-page="page" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize"
+ layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
+ @current-change="handleCurrentChange" />
+ </div>
+ </div>
+ </div>
</div>
</template>
<script>
+import { get, post } from '@/api/util/requestUtil';
+import urlInfo from '../../../api/urlEnum/nonConformingFeedback.js'
export default {
+ data() {
+ return {
+ input: '',
+ tableData: [],
+ page: 1,
+ total: 0,
+ pageSize: 10,
+ materialCode: null,
+ materialName: null,
+ inspectionCode: null
+ }
+ },
+ created() {
+ },
+ mounted() {
+ this.getData()
+ },
+ methods: {
+ handleCurrentChange() {
+ this.getData();
+ },
+ handleSizeChange() {
+
+ },
+ exportData() {
+
+ },
+ // 閲嶇疆鎸夐挳
+ resetData() {
+ this.page = 1
+ this.pageSize = 10
+ this.materialCode=null
+ this.materialName=null
+ this.inspectionCode=null
+ this.getData()
+ },
+ async getData() {
+ let param = {
+ "currentPage": this.page,
+ 'pageNum': this.pageSize,
+ "inspectionCode": this.inspectionCode,
+ "materialCode": this.materialCode,
+ "materialName": this.materialName
+ }
+ let res = await get(urlInfo.url.getNonConformingFeedback, param)
+ this.tableData = res.data.nonConformingFeedbackList
+ this.total = res.data.total
+ }
+ }
}
</script>
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.top-bar {
+ margin: -25px -15px;
+ background: #fff;
+ display: flex;
+ justify-content: space-between;
+ padding: 5px 24px 0px 24px;
+
+ .input-form {
+ width: 800px;
+ }
+
+ .el-dropdown-link {
+ cursor: pointer;
+ color: #409EFF !important;
+ }
+
+ .el-icon-arrow-down {
+ font-size: 12px !important;
+ }
+
+
+}
+
+.library-table {
+ background-color: #fff;
+ flex: 1;
+ margin: 0px -15px;
+ margin-top: 40px;
+ display: flex;
+ flex-direction: column;
+
+ .table-header {
+ padding: 20px;
+ display: flex;
+ justify-content: space-between;
+
+ .el-form-item {
+ margin-bottom: 30px !important;
+ }
+ }
+
+ .table-box {
+ padding: 0px 20px;
+ margin-top: 20px;
+ flex: 1;
+ background: #fff;
+ display: flex;
+ flex-direction: column;
+
+ >div:nth-child(2) {
+ display: flex;
+ justify-content: end;
+ margin: 10px 0;
+ }
+
+ }
+}
+</style>
+<style >
+.content-main {
+ .el-form .el-form-item .el-form-item__content {
+ width: 100% !important;
+ }
+}
+</style>
diff --git a/src/views/experiment/nonConformingFeedback/index.vue b/src/views/experiment/nonConformingFeedback/index.vue
index 90dfebc..2c58565 100644
--- a/src/views/experiment/nonConformingFeedback/index.vue
+++ b/src/views/experiment/nonConformingFeedback/index.vue
@@ -1,16 +1,207 @@
<template>
- <div>
-
- 涓嶇鍚堝搧璇勫
+ <div class="content-main">
+ <div class="top-bar">
+ <el-form ref="form" style="width: 1000px;" :inline="true">
+ <!-- <el-input v-model="input" class="input-form" placeholder="璇风洿鎺ヨ緭鍏ユ牱寮忕紪鍙�/鏍峰搧鍚嶇О/鍨嬪彿瑙勬牸/杩涜鎼滅储鎴栦笅鎷夐�夋嫨杩涜缁勫悎鏌ヨ"
+ @keyup.enter.native="getData" /> -->
+ <el-form-item style="width: 800px;">
+ <el-col style="display: flex; justify-content: space-around;" :span="8">
+ <el-row>鏍峰紡缂栧彿:</el-row>
+ <el-row><el-input size="small" v-model="materialCode" placeholder="璇疯緭鍏ユ牱寮忕紪鍙�"></el-input></el-row>
+ </el-col>
+ <el-col style="display: flex; justify-content: space-around;" :span="8">
+ <el-row>鏍峰紡鍚嶇О:</el-row>
+ <el-row><el-input size="small" v-model="materialName" placeholder="璇疯緭鍏ユ牱寮忓悕绉�"></el-input></el-row>
+ </el-col>
+ <el-col style="display: flex; justify-content: space-around;" :span="8">
+ <el-row>鐢宠鍗曞彿:</el-row>
+ <el-row><el-input size="small" v-model="inspectionCode" placeholder="璇疯緭鍏ョ敵璇峰崟鍙�"></el-input></el-row>
+ </el-col>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="small" @click="getData()">鏌ヨ</el-button>
+ <el-button type="primary" size="small" plain @click="resetData()">閲嶇疆</el-button>
+ <el-dropdown style="margin-left: 7px;">
+ <span class="el-dropdown-link">
+ 楂樼骇鎼滅储<i class="el-icon-arrow-down el-icon--right"></i>
+ </span>
+ <el-dropdown-menu slot="dropdown">
+ <el-dropdown-item>榛勯噾绯�</el-dropdown-item>
+ <el-dropdown-item>鐙瓙澶�</el-dropdown-item>
+ <el-dropdown-item>铻鸿洺绮�</el-dropdown-item>
+ <el-dropdown-item disabled>鍙岀毊濂�</el-dropdown-item>
+ <el-dropdown-item divided>铓典粩鐓�</el-dropdown-item>
+ </el-dropdown-menu>
+ </el-dropdown>
+ </el-form-item>
+ </el-form>
+ <el-form>
+ <el-button size="40" type="primary">鎵归噺鎻愪氦</el-button>
+ </el-form>
+ </div>
+ <div class="library-table">
+ <div class="table-box">
+ <el-table ref="tableData" :max-height="800" :cell-style="{ textAlign: 'center' }"
+ :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
+ :data="tableData" style="width: 100%">
+ <el-table-column type="selection" label="" min-width="5%" />
+ <el-table-column label="鏍峰搧缂栧彿" min-width="10%">
+ <template slot-scope="scope">
+ <a style="color: #3894d1;">{{ scope.row.materialCode }}</a>
+ </template>
+ </el-table-column>
+ <el-table-column prop="materialName" label="鏍峰搧鍚嶇О" min-width="10%" />
+ <el-table-column label="鐢宠鍗曞彿" min-width="10%" >
+ <template slot-scope="scope">
+ <a style="color: #3894d1;">{{ scope.row.inspectionCode }}</a>
+ </template>
+ </el-table-column>
+ <el-table-column prop="createTime" label="鐧昏鏃ユ湡" min-width="10%" />
+ <el-table-column prop="testManager" label="妫�楠岃礋璐d汉" min-width="10%" />
+ <el-table-column prop="specifications" label="瑙勬牸鍨嬪彿" min-width="10%" />
+ <el-table-column prop="inspectionStatus" label="缁撹" min-width="10%">
+ <template slot-scope="scope">
+ <el-tag type="danger">涓嶅悎鏍�</el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" min-width="8%">
+ <template slot-scope="scope">
+ <el-button type="text" size="small">鎿嶄綔</el-button>
+ <el-button type="text" size="small">浣滃簾</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <!-- 鍒嗛〉鍣� -->
+ <div>
+ <el-pagination :current-page="page" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize"
+ layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
+ @current-change="handleCurrentChange" />
+ </div>
+ </div>
+ </div>
</div>
</template>
<script>
+import { get, post } from '@/api/util/requestUtil';
+import urlInfo from '../../../api/urlEnum/nonConformanceReview.js'
export default {
+ data() {
+ return {
+ input: '',
+ tableData: [],
+ page: 1,
+ total: 0,
+ pageSize: 10,
+ materialCode: null,
+ materialName: null,
+ inspectionCode: null
+ }
+ },
+ created() {
+ },
+ mounted() {
+ this.getData()
+ },
+ methods: {
+ handleCurrentChange() {
+ this.getData();
+ },
+ handleSizeChange() {
+
+ },
+ exportData() {
+
+ },
+ // 閲嶇疆鎸夐挳
+ resetData() {
+ this.page = 1
+ this.pageSize = 10
+ this.materialCode=null
+ this.materialName=null
+ this.inspectionCode=null
+ this.getData()
+ },
+ async getData() {
+ let param = {
+ "currentPage": this.page,
+ 'pageNum': this.pageSize,
+ "inspectionCode": this.inspectionCode,
+ "materialCode": this.materialCode,
+ "materialName": this.materialName
+ }
+ let res = await get(urlInfo.url.getNonConformanceReview, param)
+ this.tableData = res.data.nonConformanceReviewList
+ this.total = res.data.total
+ }
+ }
}
</script>
<style lang="scss" scoped>
+.top-bar {
+ margin: -25px -15px;
+ background: #fff;
+ display: flex;
+ justify-content: space-between;
+ padding: 5px 24px 0px 24px;
+ .input-form {
+ width: 800px;
+ }
+
+ .el-dropdown-link {
+ cursor: pointer;
+ color: #409EFF !important;
+ }
+
+ .el-icon-arrow-down {
+ font-size: 12px !important;
+ }
+
+
+}
+
+.library-table {
+ background-color: #fff;
+ flex: 1;
+ margin: 0px -15px;
+ margin-top: 40px;
+ display: flex;
+ flex-direction: column;
+
+ .table-header {
+ padding: 20px;
+ display: flex;
+ justify-content: space-between;
+
+ .el-form-item {
+ margin-bottom: 30px !important;
+ }
+ }
+
+ .table-box {
+ padding: 0px 20px;
+ margin-top: 20px;
+ flex: 1;
+ background: #fff;
+ display: flex;
+ flex-direction: column;
+
+ >div:nth-child(2) {
+ display: flex;
+ justify-content: end;
+ margin: 10px 0;
+ }
+
+ }
+}
+</style>
+<style >
+.content-main {
+ .el-form .el-form-item .el-form-item__content {
+ width: 100% !important;
+ }
+}
</style>
diff --git a/src/views/inspectionManagement/commissionInspection/addCommision.vue b/src/views/inspectionManagement/commissionInspection/addCommision.vue
index 9d65ee3..cd441b4 100644
--- a/src/views/inspectionManagement/commissionInspection/addCommision.vue
+++ b/src/views/inspectionManagement/commissionInspection/addCommision.vue
@@ -1,10 +1,11 @@
<template>
+ <div v-if="!showDetail">
<div class="content-main">
<div class="firstBox">
<div class="title">妫�娴嬩俊鎭�</div>
<div class="tableBox">
<div class="tableBox-header">
- <el-button class="split" type="primary" size="small" style="background-color: rgb(1, 102, 226);">娣诲姞鏍峰搧</el-button>
+ <el-button class="split" @click="dialogueFormVisible = true" type="primary" size="small" style="background-color: rgb(1, 102, 226);">娣诲姞鏍峰搧</el-button>
<el-input
v-model="searchData"
class="input-form split"
@@ -29,17 +30,17 @@
min-width="10%"
/>
<el-table-column
- prop="sampleid"
+ prop="sampleNumber"
label="鏍峰搧缂栧彿"
min-width="8%"
/>
<el-table-column
- prop="samplename"
+ prop="sampleName"
label="鏍峰搧鍚嶇О"
min-width="10%"
/>
<el-table-column
- prop="modelandspecification"
+ prop="specificationsModels"
label="瑙勬牸鍨嬪彿"
min-width="10%"
/>
@@ -49,7 +50,7 @@
min-width="8%"
/>
<el-table-column
- prop="amount"
+ prop="samplesNumber"
label="鏁伴噺"
min-width="8%"
/>
@@ -58,10 +59,13 @@
label="娣诲姞鏂瑰紡"
min-width="8%">
<template slot-scope="scope">
- <el-tag
- :type="scope.row.addway === 0 ? 'success' : 'primary'"
- disable-transitions
- >{{ scope.row.addway === 0 ? '鎵弿' : '褰曞叆' }}</el-tag>
+ <div v-if="scope.row.addway === 0">
+ <el-tag :type= 'success' disable-transitions>鎵弿</el-tag>
+ </div>
+ <div v-if="scope.row.addway === 1">
+ <el-tag :type= 'primary' disable-transitions>褰曞叆</el-tag>
+ </div>
+ <div v-else></div>
</template>
</el-table-column>
<el-table-column
@@ -70,7 +74,7 @@
min-width="8%"
/>
<el-table-column
- prop="other"
+ prop="remarks"
label="澶囨敞"
min-width="8%"
/>
@@ -80,7 +84,7 @@
>
<template slot-scope="scope">
<el-button type="text" size="small">淇敼</el-button>
- <el-button type="text" size="small" @click="handleClick(scope.row)">鍒犻櫎</el-button>
+ <el-button type="text" size="small" @click="deleteRow(scope.row)">鍒犻櫎</el-button>
</template>
</el-table-column>
</el-table>
@@ -100,15 +104,15 @@
</div>
<div class="secondBox">
<el-row class="header">
- <el-col :span="12">鍩烘湰淇℃伅</el-col>
- <el-col :span="12" style="text-align: right;">
- <!-- 鐐瑰嚮杩斿洖锛屽綋鍓嶉〉闈㈠�间负false -->
- <el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">鎵撳嵃濮旀墭鍗�</el-button>
- </el-col>
- </el-row>
- <el-form :model="infoForm" ref="infoForm" class="infoForm" label-position="right" label-width="100px" size="mini" >
- <div class="formwrapper">
- <el-row :gutter="200">
+ <el-col :span="12">鍩烘湰淇℃伅</el-col>
+ <el-col :span="12" style="text-align: right;">
+ <!-- 鐐瑰嚮杩斿洖锛屽綋鍓嶉〉闈㈠�间负false -->
+ <el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">鎵撳嵃濮旀墭鍗�</el-button>
+ </el-col>
+ </el-row>
+ <el-form :model="infoForm" ref="infoForm" class="infoForm" label-position="right" label-width="100px" size="mini" >
+ <div class="formwrapper">
+ <el-row :gutter="200">
<el-col :span="5">
<el-form-item label="濮旀墭缂栧彿锛�">
<el-input style="width: 160px" type="text" :value="infoForm.commisioncode" readonly disabled="true" autocomplete="off" />
@@ -116,36 +120,24 @@
</el-col>
<el-col :span="5">
<el-form-item label="濮旀墭鍗曚綅锛�">
- <el-select style="width: 160px;" v-model="infoForm.department" size="small" placeholder="璇烽�夋嫨浜у搧鍚嶇О">
- <el-option value="閫夐」1"></el-option>
- <el-option value="閫夐」2"></el-option>
- </el-select>
+ <el-input style="width: 160px" v-model="infoForm.department" placeholder="璇疯緭鍏ュ鎵樺崟浣�" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="鑱旂郴浜猴細">
- <el-select style="width: 160px;" v-model="infoForm.contacter" size="small" placeholder="璇烽�夋嫨浜у搧鍚嶇О">
- <el-option value="閫夐」1"></el-option>
- <el-option value="閫夐」2"></el-option>
- </el-select>
+ <el-input style="width: 160px" v-model="infoForm.contacter" placeholder="璇疯緭鍏ュ鎵樺崟浣�" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="鑱旂郴鐢佃瘽锛�">
- <el-select style="width: 160px;" v-model="infoForm.tel" size="small" placeholder="璇烽�夋嫨浜у搧鍚嶇О">
- <el-option value="閫夐」1"></el-option>
- <el-option value="閫夐」2"></el-option>
- </el-select>
+ <el-input style="width: 160px" v-model="infoForm.tel" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="200">
<el-col :span="5">
<el-form-item label="鑱旂郴鍦板潃锛�" >
- <el-select style="width: 160px;" v-model="infoForm.address" size="small" placeholder="璇烽�夋嫨浜у搧鍚嶇О">
- <el-option value="閫夐」1"></el-option>
- <el-option value="閫夐」2"></el-option>
- </el-select>
+ <el-input style="width: 160px;" v-model="infoForm.address" placeholder="璇疯緭鍏ヨ仈绯诲湴鍧�" autocomplete="off" />
</el-form-item>
</el-col>
<el-col :span="5">
@@ -171,8 +163,7 @@
<el-col :span="5">
<el-form-item label="閫佹牱鏂瑰紡锛�">
<el-select style="width: 160px;" v-model="infoForm.way" size="small" placeholder="閫佹牱">
- <el-option value="閫夐」1"></el-option>
- <el-option value="閫夐」2"></el-option>
+ <el-option v-for="options in sampleDeliveryMode" :key="options.key" :value="options.value">{{ options.value }}</el-option>
</el-select>
</el-form-item>
</el-col>
@@ -201,22 +192,92 @@
</el-row>
</div>
<div class="submitBtn">
- <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">鎻愪氦</el-button>
+ <el-button type="primary" size="small" @click="submitInspection" style="background-color: rgb(1, 102, 226);">鎻愪氦</el-button>
</div>
</el-form>
</div>
</div>
+ <div class="checkType">
+ <el-dialog
+ title="娣诲姞鎸囨爣"
+ :visible.sync="dialogueFormVisible"
+ width="40%"
+ >
+ <el-form :model="addPointerForm" ref="addPointerForm" class="addPointerForm" label-position="right" label-width="100px" size="mini">
+ <el-row :gutter="50">
+ <el-col :span="10">
+ <el-form-item label="鏍峰搧缂栧彿锛�">
+ <el-select style="width: 160px;" v-model="addPointerForm.sampleNumber" size="small" placeholder="璇烽�夋嫨鏍峰搧缂栧彿">
+ <el-option v-for="options in samplecodeoptions" :value="options.value" :key="options.key" >{{ options.value }}</el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="10">
+ <el-form-item label="鏍峰搧鍚嶇О锛�">
+ <el-select style="width: 160px;" v-model="addPointerForm.sampleName" size="small" placeholder="璇烽�夋嫨鏍峰搧鍚嶇О">
+ <el-option v-for="options in sampleoptions" :value="options.value" :key="options.key">{{ options.value }}</el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="50">
+ <el-col :span="10">
+ <el-form-item label="瑙勬牸鍨嬪彿锛�">
+ <el-select style="width: 160px;" v-model="addPointerForm.specificationsModels" size="small" placeholder="璇烽�夋嫨鏍峰搧鍚嶇О">
+ <el-option v-for="options in model_spe_options" :value="options.value" :key="options.key">{{ options.value }}</el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="10">
+ <el-form-item label="鏍峰搧鍗曚綅锛�">
+ <el-input style="width: 160px" type="text" v-model="addPointerForm.unit" placeholder="璇疯緭鍏ュ崟浣�" autocomplete="off" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="50">
+ <el-col :span="10">
+ <el-form-item label="鏍峰搧鏁伴噺锛�">
+ <el-input style="width: 160px" type="text" v-model="addPointerForm.samplesNumber" placeholder="璇疯緭鍏ユ暟閲�" autocomplete="off" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="10">
+ <el-form-item label="澶囨敞锛�">
+ <el-input style="width: 160px" type="text" v-model="addPointerForm.remarks" placeholder="璇疯緭鍏ュ娉�" autocomplete="off" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="50">
+ <el-col :span="10">
+ <el-form-item label="娣诲姞瀹為獙锛�">
+ <el-checkbox-group v-model="addPointerForm.experiment" style="display: flex; flex-direction: column;">
+ <el-checkbox v-for="expers in experList" :label="expers.label" :key="expers.key">{{ expers.label }}</el-checkbox>
+ </el-checkbox-group>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="addInspection">娣诲姞</el-button>
+ <el-button @click="dialogueFormVisible = false">鍙� 娑�</el-button>
+ </span>
+ </el-dialog>
+ </div>
</div>
+</div>
+<div v-else>
+ <router-view></router-view>
+</div>
</template>
<script>
+import {getSampleName, getModelSpecification, getlink, addInspection} from '@/api/inspection/commisioninspection'
export default {
data() {
return {
currentPage: 0,
searchData: '',
infoForm: {
- commisioncode: 'ST9162324',
+ commisioncode: '',
department: '',
contacter: '',
tel: '',
@@ -229,25 +290,188 @@
num: '',
other: ''
},
- detectionInfo: [{
- sampleid: 'GW31478631',
- samplename: '缁濈紭鏉�',
- modelandspecification: 'JLHA/G1A-185/30-26/7',
- unit: '鏍�',
- amount: '40',
- addway: 0,
- experiment: '浜ゆ祦鑰愬帇璇曢獙',
- other: '123',
- opertion: '',
- }]
+ detectionInfo: [],
+ addPointerForm:{
+ sampleNumber: '',
+ sampleName: '',
+ specificationsModels: '',
+ unit: '',
+ samplesNumber: '',
+ remarks: '',
+ experiment: [],
+ addway: ''
+ },
+ experList:[{
+ key: '1',
+ label: '澶栬妫�鏌�'
+ },{
+ key: '2',
+ label: '鍔ㄤ綔鐢靛帇璇曢獙'
+ },{
+ key: '3',
+ label: '鐢甸樆绠℃硠婕忕數娴佽瘯楠�'
+ },{
+ key: '4',
+ label: '缁濈紭閮ㄥ垎浜ゆ祦鑰愬帇璇曢獙'
+ }],
+ sampleoptions:[{
+ key:'1',
+ value: '閫夐」1'
+ },{
+ key:'2',
+ value: '閫夐」2'
+ }],
+ samplecodeoptions:[{
+ key:'1',
+ value: ''
+ }],
+ model_spe_options:[{
+ key:'1',
+ value: '閫夐」1'
+ },{
+ key: '2',
+ value: '閫夐」2'
+ }],
+ sampleDeliveryMode:[{
+ key: '1',
+ value: '閫佹牱'
+ },{
+ key: '2',
+ value: '涓婇棬'
+ }],
+ dialogueFormVisible: false,
+ showDetail: false
}
},
+ created(){
+ this.getlink()
+ },
+ mounted(){
+ this.getSampleName()
+ this.getModelSpecification()
+ },
methods: {
+ // 鑾峰彇閾炬帴link
+ getlink(){
+ getlink().then((result)=>{
+ this.$store.commit('settings/SAVE_LINK',result.data)
+ console.log(this.$store.state.settings.link)
+ })
+ },
+ async getSampleName(){
+ const res = await getSampleName()
+ // console.log('res',res.data)
+ this.sampleoptions = res.data.map((item)=>{
+ return{
+ key:item.id.toString(),
+ value:item.name
+ }
+ })
+ this.samplecodeoptions = res.data.map((item)=>{
+ return{
+ key:item.id.toString(),
+ value:item.code
+ }
+ })
+ },
+ async getModelSpecification(){
+ const res = await getModelSpecification({materialId: '1'})
+ // console.log(res)
+ this.model_spe_options = res.data.map((item)=>{
+ return{
+ key:item.specificationsId,
+ value:item.specificationsName
+ }
+ })
+ },
+ addInspection(){
+ let exper = this.addPointerForm.experiment[0]
+ this.addPointerForm.addway = 1
+ for(let i=1;i<this.addPointerForm.experiment.length;i++){
+ exper += ',' + this.addPointerForm.experiment[i]
+ }
+ // console.log(exper)
+ this.addPointerForm.experiment = exper
+ let tmp = this.addPointerForm
+ this.detectionInfo.push(tmp)
+ this.dialogueFormVisible = false
+ this.addPointerForm ={
+ sampleNumber: '',
+ sampleName: '',
+ specificationsModels: '',
+ unit: '',
+ samplesNumber: '',
+ remarks: '',
+ experiment: [],
+ addway: ''
+ }
+ },
+ async submitInspection(){
+ let sampledeliveryway
+ if(this.infoForm.way === '閫佹牱'){
+ sampledeliveryway = 1
+ }else{
+ sampledeliveryway = 2
+ }
+ const res = await addInspection({completionDeadline: this.infoForm.deadline,
+ contactAddress: this.infoForm.address,
+ contactNumber: this.infoForm.tel,
+ contacts: this.infoForm.contacter,
+ entrustRemarks: this.infoForm.other,
+ entrusted: this.infoForm.department,
+ inspectionTime: this.infoForm.time,
+ linkDetectionList: this.detectionInfo,
+ reportNumber: parseInt(this.infoForm.num),
+ sampleDeliveryMode: sampledeliveryway,
+ sampleDeliveryPhone: this.infoForm.sendertel,
+ sampleSender: this.infoForm.sender})
+// const res = await addInspection({
+// completionDeadline: "2023-08-03",
+// contactAddress: "姹熻嫃鍗楅��",
+// contactNumber: "12321423432",
+// contacts: "灏忛粦",
+// entrustRemarks: "濮旀墭澶囨敞YPBH123456789YPBH123456789YPBH123456789",
+// entrusted: "闃块噷宸村反",
+// inspectionTime: "2023-08-03",
+// linkDetectionList: [
+// {
+// "experiment": "鍋氭ⅵ",
+// "remarks": "閫氳繃浜�",
+// "sampleName": "鍙戝姩鏈�",
+// "sampleNumber": "YPBH123456789",
+// "samplesNumber": 20,
+// "specificationsModels": "GGXH-AAAAA",
+// "unit": "鐧惧害"
+// }
+// ],
+// reportNumber: 23,
+// sampleDeliveryMode: 1,
+// sampleDeliveryPhone: "123456789676",
+// sampleSender: "灏忕櫧"
+// })
+ // console.log(res)
+ this.infoForm.commisioncode = res.data
+ if(res.data){
+ this.$message({
+ message: '鎭枩浣�!',
+ type: 'success'
+ })
+ // 璺宠浆椤甸潰
+ this.$router.push('/inspectionManagement/commissionInspection')
+ this.showDetail = true
+ }else{
+ this.$message.error(res.message)
+ }
+ },
handleSizeChange(pageSize) {
this.pageParams.pageSize = pageSize
},
handleCurrentChange(pageNo) {
this.pageParams.pageNo = pageNo
+ },
+ deleteRow(row){
+ console.log(row)
+ row = null
}
}
}
diff --git a/src/views/inspectionManagement/commissionInspection/index.vue b/src/views/inspectionManagement/commissionInspection/index.vue
index be593cd..e45b68d 100644
--- a/src/views/inspectionManagement/commissionInspection/index.vue
+++ b/src/views/inspectionManagement/commissionInspection/index.vue
@@ -31,8 +31,8 @@
</el-select>
</el-form-item>
<el-form-item>
- <el-button type="primary">鏌ヨ</el-button>
- <el-button type="primary" plain>閲嶇疆</el-button>
+ <el-button type="primary" @click="search">鏌ヨ</el-button>
+ <el-button type="primary" plain @click="reset">閲嶇疆</el-button>
</el-form-item>
</el-form>
<el-form>
@@ -42,11 +42,11 @@
<div class="library-table">
<div class="table-header">
<div class="search-bar">
- <el-radio-group v-model="radioValue">
- <el-radio-button label="鍏ㄩ儴" />
- <el-radio-button label="寰呮楠�" />
- <el-radio-button label="宸叉楠�" />
- </el-radio-group>
+ <el-radio-group v-model="radioValue" @change="radioclick">
+ <el-radio-button v-for="item in conditionsOptions" :key="item.value" :label="item.value">
+ {{ item.label }}
+ </el-radio-button>
+ </el-radio-group>
</div>
<div class="generateInsp">
<el-button type="primary" size="mini" icon="el-icon-document" style="background-color: rgb(1, 102, 226);">鐢熸垚鎶ユ鍗�</el-button>
@@ -73,7 +73,7 @@
<el-table-column
prop="entrust_coding"
label="濮旀墭缂栧彿"
- min-width="8%"
+ min-width="10%"
/>
<el-table-column
prop="entrusted"
@@ -173,14 +173,8 @@
options: [{
value: '1',
label: '閮ㄩ棬1'
- }, {
- value: '2',
- label: '閮ㄩ棬2'
- }, {
- value: '3',
- label: '閮ㄩ棬3'
}],
- radioValue: '',
+ radioValue: 0,
commisionTable: [{
specifications_models: "GGXH-AAAAA",
inspectionTime: "2023-08-03",
@@ -194,6 +188,20 @@
sample_name: "鍙戝姩鏈�",
inspection_status: 1
}],
+ conditionsOptions: [
+ {
+ label: '鍏ㄩ儴',
+ value: 0
+ },
+ {
+ label: '宸叉楠�',
+ value: 1
+ },
+ {
+ label: '寰呮楠�',
+ value: 2
+ }
+ ],
currentPage: 1,
pageSize: 5,
total: 100,
@@ -211,22 +219,89 @@
},
methods: {
async getCommisionList(){
- const res = await getCommisionList({pageNo:this.currentPage , pageSize:this.pageSize})
+ const res = await getCommisionList({pageNo:this.currentPage, pageSize:this.pageSize})
this.commisionTable = res.data.row
- // this.total = res.data.row.length
- console.log(this.commisionTable)
+ this.total = res.data.total
+ // console.log(res)
+ // 鑾峰彇鎵�鏈夌殑濮旀墭鍗曚綅鍚嶇О
+ const allDepartmentNames = [...new Set(this.commisionTable.map(item => item.entrusted))]
+ // 灏哸llDepartmentNames杞崲涓簅ptions闇�瑕佺殑鏍煎紡
+ this.options = allDepartmentNames.map(name => ({ value: name, label: name }))
+
+ },
+ // 鏌ヨ鏂规硶
+ async search() {
+ // 灏嗘悳绱㈡潯浠朵綔涓哄弬鏁颁紶閫掔粰getCommisionList鏂规硶
+ if(this.radioValue === 0){
+ const res = await getCommisionList({
+ pageNo: this.currentPage,
+ pageSize: this.pageSize,
+ entrustCoding: this.searchData.code,
+ sampleName: this.searchData.name,
+ entrusted: this.searchData.department,
+ })
+ }else{
+ const res = await getCommisionList({
+ pageNo: this.currentPage,
+ pageSize: this.pageSize,
+ entrustCoding: this.searchData.code,
+ sampleName: this.searchData.name,
+ entrusted: this.searchData.department,
+ inspectionStatus: this.radioValue
+ })
+ }
+ // console.log(res)
+ this.commisionTable = res.data.row
+ this.total = res.data.total
+ },
+
+ // 閲嶇疆鏂规硶
+ reset() {
+ // 閲嶇疆鎼滅储鏉′欢
+ this.searchData.code = ''
+ this.searchData.name = ''
+ this.searchData.department = ''
+ this.radioValue = '0'
+ // 閲嶆柊鑾峰彇鏁版嵁
+ this.getCommisionList()
+ },
+ async radioclick(){
+ // 澶勭悊鐐瑰嚮radio鐨勬椂闂�
+ // console.log('radioValue',this.radioValue)
+ if(this.radioValue === 0){
+ this.getCommisionList()
+ }else{
+ const res = await getCommisionList({pageNo:this.currentPage, pageSize:this.pageSize, inspectionStatus: this.radioValue})
+ // console.log(res)
+ this.commisionTable = res.data.row
+ this.total = res.data.total
+ }
+
},
// 姣忛〉鏉℃暟鏀瑰彉鏃惰Е鍙� 閫夋嫨涓�椤垫樉绀哄灏戣
- handleSizeChange(val) {
- console.log(`姣忛〉 ${val} 鏉)
+ async handleSizeChange(val) {
+ // console.log(`姣忛〉 ${val} 鏉)
this.currentPage = 1
this.pageSize = val
+ if(this.radioValue === 0){
+ this.getCommisionList()
+ }else{
+ const res = await getCommisionList({pageNo:this.currentPage, pageSize:this.pageSize, inspectionStatus: this.radioValue})
+ this.commisionTable = res.data.row
+ this.total = res.data.total
+ }
},
// 褰撳墠椤垫敼鍙樻椂瑙﹀彂 璺宠浆鍏朵粬椤�
- handleCurrentChange(val) {
- console.log(`褰撳墠椤�: ${val}`)
+ async handleCurrentChange(val) {
+ // console.log(`褰撳墠椤�: ${val}`)
this.currentPage = val
- this.commisionTable = getCommisionList({pageNo:this.currentPage , pageSize:this.pageSize})
+ if(this.radioValue === 0){
+ this.getCommisionList()
+ }else{
+ const res = await getCommisionList({pageNo:this.currentPage, pageSize:this.pageSize, inspectionStatus: this.radioValue})
+ this.commisionTable = res.data.row
+ this.total = res.data.total
+ }
},
goToaddCommision() {
this.$router.push('/inspectionManagement/commissionInspection/addCommision')
diff --git a/src/views/standardLibrary/index.vue b/src/views/standardLibrary/index.vue
index a447d44..bd0a4b2 100644
--- a/src/views/standardLibrary/index.vue
+++ b/src/views/standardLibrary/index.vue
@@ -384,7 +384,7 @@
// height: 800px;
// }
.standard-library-main{
- width: 100%;
+ width: 100vh;
height: 100%;
// 椤甸潰涓績鍐呭鍖哄煙
.content-main{
@@ -398,12 +398,12 @@
background: #fff;
}
.library-bom{
- flex: 2;
- // width: 20%;
+ padding-right: 10px;
+ width: 40vh;
// height: 100%;
max-height: 100%;
margin-right: 12px;
- overflow-y: scroll;
+ // overflow-y: scroll;
.el-tree {
// margin-top: 12px;
::v-deep .el-tree-node__content{
@@ -453,7 +453,7 @@
}
.library-table{
// height: 100%;
- flex: 8;
+ width: 170vh;
max-height: 100%;
// flex: 8;
margin-left: 12px;
--
Gitblit v1.9.3