From 93d2defddb21068f61e4f88895f4b389b672eb46 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 31 八月 2023 15:45:19 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.110.209:9001/r/lims-before
---
src/utils/request.js | 2
.env.development | 2
src/views/experiment/inspectionApplication/index.vue | 112 +++-----
src/views/inspectionManagement/reportForInspection/index.vue | 31 -
src/router/index.js | 173 -------------
src/views/experiment/inspectionApplication/Viewdetails/index.vue | 387 ++++++++++++++---------------
src/views/inspectionManagement/commissionInspection/addCommision.vue | 26 -
src/api/experiment/planAssignments.js | 23 +
8 files changed, 268 insertions(+), 488 deletions(-)
diff --git a/.env.development b/.env.development
index b0631dd..ab9be2d 100644
--- a/.env.development
+++ b/.env.development
@@ -2,4 +2,4 @@
ENV = 'development'
# base api
-VUE_APP_BASE_API = 'http://192.168.110.254:1234/'
+VUE_APP_BASE_API = 'http://localhost:1234/'
diff --git a/src/api/experiment/planAssignments.js b/src/api/experiment/planAssignments.js
index 6930a4e..d0f384a 100644
--- a/src/api/experiment/planAssignments.js
+++ b/src/api/experiment/planAssignments.js
@@ -87,3 +87,26 @@
params
})
}
+
+export function chooseUseProId(params) {
+ return request({
+ url: '/inspection/chooseUseProId',
+ method: 'get',
+ params
+ })
+}
+
+export function selectEquipment() {
+ return request({
+ url: '/inspection/selectEquipment',
+ method: 'get'
+ })
+}
+
+export function chooseEquipment(params) {
+ return request({
+ url: '/inspection/chooseEquipment',
+ method: 'get',
+ params
+ })
+}
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index cfa384f..54332c1 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -3,33 +3,8 @@
Vue.use(Router)
-/* Layout */
import Layout from '@/layout'
-/**
- * Note: sub-menu only appear when route children.length >= 1
- * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
- *
- * hidden: true if set true, item will not show in the sidebar(default is false)
- * alwaysShow: true if set true, will always show the root menu
- * if not set alwaysShow, when item has more than one children route,
- * it will becomes nested mode, otherwise not show the root menu
- * redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
- * name:'router-name' the name is used by <keep-alive> (must set!!!)
- * meta : {
- roles: ['admin','editor'] control the page roles (you can set multiple roles)
- title: 'title' the name show in sidebar and breadcrumb (recommend set)
- icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
- breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
- activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
- }
- */
-
-/**
- * constantRoutes
- * a base page that does not have permission requirements
- * all roles can be accessed
- */
function getRoutes() {
let constantRoutes = [
{
@@ -51,7 +26,6 @@
path: '/',
component: Layout,
redirect: '/home',
- // meta: { title: '涓婚〉', icon: 'el-icon-s-home' },
children: [{
path: 'home',
name: 'Home',
@@ -85,85 +59,6 @@
}
]
},
- // {
- // path: '/rawMaterials',
- // component: Layout,
- // redirect: '/rawMaterials/reportForInspection',
- // name: 'rawMaterials',
- // meta: { title: '妫�楠�', icon: 'el-icon-s-help' },
- // children: [
- // {
- // path: 'reportForInspection',
- // name: 'ReportForInspection',
- // component: () => import('@/views/rawMaterials/reportForInspection/index'),
- // meta: { title: '鍘熸潗鏂欐姤妫�', icon: 'table' },
- // children: [
- // // {
- // // path: 'index',
- // // name: 'ReportForInspectionIndex',
- // // // hidden: true,
- // // component: () => import('@/views/rawMaterials/reportForInspection/index'),
- // // meta: { title: '鍘熸潗鏂欐姤妫�', icon: 'table' }
- // // },
- // {
- // path: 'forInspectionDetail',
- // name: 'ForInspectionDetail',
- // hidden: true,
- // component: () => import('@/views/rawMaterials/reportForInspection/forInspectionDetail'),
- // meta: { title: '鏂板妫�楠屽崟璇︽儏', icon: 'table' }
- // }
- // ]
- // },
- // {
- // path: 'print',
- // name: 'Print',
- // component: () => import('@/views/rawMaterials/print/index'),
- // meta: { title: '鏉$爜鎵撳嵃', icon: 'tree' }
- // },
- // {
- // path: 'planAssignments',
- // name: 'PlanAssignments',
- // component: () => import('@/views/rawMaterials/planAssignments/index'),
- // meta: { title: '妫�楠岃鍒掑垎閰�', icon: 'tree' }
- // },
- // {
- // path: 'rawMaterialInspection',
- // name: 'RawMaterialInspection',
- // component: () => import('@/views/rawMaterials/rawMaterialInspection/index'),
- // meta: { title: '鍘熸潗鏂欐楠�', icon: 'tree' }
- // },
- // {
- // path: 'checkTheReport',
- // name: 'CheckTheReport',
- // component: () => import('@/views/rawMaterials/checkTheReport/index'),
- // meta: { title: '妫�楠屾姤鍛�', icon: 'tree' }
- // },
- // {
- // path: 'reportAuditing',
- // name: 'ReportAuditing',
- // component: () => import('@/views/rawMaterials/reportAuditing/index'),
- // meta: { title: '鎶ュ憡瀹℃牳', icon: 'tree' }
- // },
- // {
- // path: 'nonConformanceReview',
- // name: 'NonConformanceReview',
- // component: () => import('@/views/rawMaterials/nonConformanceReview/index'),
- // meta: { title: '涓嶅悎鏍煎弽棣�', icon: 'tree' }
- // },
- // {
- // path: 'nonConformingFeedback',
- // name: 'NonConformingFeedback',
- // component: () => import('@/views/rawMaterials/nonConformingFeedback/index'),
- // meta: { title: '涓嶅悎鏍艰瘎瀹�', icon: 'tree' }
- // },
- // {
- // path: 'passRateStatistics',
- // name: 'PassRateStatistics',
- // component: () => import('@/views/rawMaterials/passRateStatistics/index'),
- // meta: { title: '鍚堟牸鐜囩粺璁�', icon: 'tree' }
- // }
- // ]
- // },
{
path: '/inspectionManagement',
component: Layout,
@@ -199,7 +94,7 @@
meta: { title: '鏂板妫�楠�', icon: 'tree' }
},
{
- path: 'Viewdetails',
+ path: 'Viewdetails/:id',
name: 'Viewdetails',
hidden: true,
component: () => import('@/views/experiment/inspectionApplication/Viewdetails/index'),
@@ -243,69 +138,6 @@
}
]
},
- // {
- // path: '/finishedProduct',
- // component: Layout,
- // redirect: '/finishedProduct/reportForInspection',
- // name: 'FinishedProduct',
- // meta: { title: '鎴愬搧妫�楠�', icon: 'el-icon-s-help' },
- // children: [
- // {
- // path: 'reportForInspection',
- // name: 'ReportForInspection',
- // component: () => import('@/views/rawMaterials/reportForInspection/index'),
- // meta: { title: '鎴愬搧閫佹鐧昏', icon: 'table' }
- // },
- // {
- // path: 'print',
- // name: 'Print',
- // component: () => import('@/views/rawMaterials/print/index'),
- // meta: { title: '鏉$爜鎵撳嵃', icon: 'tree' }
- // },
- // {
- // path: 'planAssignments',
- // name: 'PlanAssignments',
- // component: () => import('@/views/rawMaterials/planAssignments/index'),
- // meta: { title: '妫�楠岃鍒掑垎閰�', icon: 'tree' }
- // },
- // {
- // path: 'rawMaterialInspection',
- // name: 'RawMaterialInspection',
- // component: () => import('@/views/rawMaterials/rawMaterialInspection/index'),
- // meta: { title: '鎴愬搧妫�楠�', icon: 'tree' }
- // },
- // {
- // path: 'checkTheReport',
- // name: 'CheckTheReport',
- // component: () => import('@/views/rawMaterials/checkTheReport/index'),
- // meta: { title: '妫�楠屾姤鍛�', icon: 'tree' }
- // },
- // {
- // path: 'reportAuditing',
- // name: 'ReportAuditing',
- // component: () => import('@/views/rawMaterials/reportAuditing/index'),
- // meta: { title: '鎶ュ憡瀹℃牳', icon: 'tree' }
- // },
- // {
- // path: 'nonConformanceReview',
- // name: 'NonConformanceReview',
- // component: () => import('@/views/rawMaterials/nonConformanceReview/index'),
- // meta: { title: '涓嶅悎鏍煎弽棣�', icon: 'tree' }
- // },
- // {
- // path: 'nonConformingFeedback',
- // name: 'NonConformingFeedback',
- // component: () => import('@/views/rawMaterials/nonConformingFeedback/index'),
- // meta: { title: '涓嶅悎鏍艰瘎瀹�', icon: 'tree' }
- // },
- // {
- // path: 'passRateStatistics',
- // name: 'PassRateStatistics',
- // component: () => import('@/views/rawMaterials/passRateStatistics/index'),
- // meta: { title: '鍚堟牸鐜囩粺璁�', icon: 'tree' }
- // }
- // ]
- // },
{
path: '/laboratory',
component: Layout,
@@ -433,9 +265,7 @@
{
path: 'message',
name: 'Message',
- // hidden: true,
component: () => import('@/views/message/message/index'),
- // meta: { title: '鎴戠殑娑堟伅', icon: 'table' }
},
]
},
@@ -499,7 +329,6 @@
path: '/',
component: Layout,
redirect: '/home',
- // meta: { title: '涓婚〉', icon: 'el-icon-s-home' },
children: [{
path: 'home',
name: 'Home',
diff --git a/src/utils/request.js b/src/utils/request.js
index 5933e2d..0e7f44e 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -8,7 +8,7 @@
const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
// withCredentials: true, // send cookies when cross-domain requests
- timeout: 5000 // request timeout
+ timeout: 10000 // request timeout
})
// request interceptor
diff --git a/src/views/experiment/inspectionApplication/Viewdetails/index.vue b/src/views/experiment/inspectionApplication/Viewdetails/index.vue
index 04d49ea..a1d8f27 100644
--- a/src/views/experiment/inspectionApplication/Viewdetails/index.vue
+++ b/src/views/experiment/inspectionApplication/Viewdetails/index.vue
@@ -1,206 +1,193 @@
<template>
-<div>
- <div style="overflow: hidden;">
- <el-card style="margin: 10px;" >
- <div slot="header" class="clearfix">
- <span>
- <i slot="prefix" class="el-icon-s-home" />
- 瀹為獙绠$悊/鍘熸潗鏂欐楠屽崟</span>
- </div>
- <div class="card-content">
- <el-row :gutter="80">
- <el-form ref="form" :model="searchData" label-width="80px">
- <el-col :span="6">
- <el-form-item label="鏉ユ枡鏃ユ湡:" >
- <el-input :disabled="true" v-model="searchData.formTime"></el-input>
-
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="渚涘簲鍟嗗悕绉�:" >
- <el-input :disabled="true" v-model="searchData.supplier"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="浜у搧缂栧彿:">
- <el-input :disabled="true" v-model="searchData.code"></el-input>
- </el-form-item>
- </el-col>
- </el-form>
- </el-row>
- <el-row :gutter="80">
- <el-form ref="form" :model="searchData" label-width="80px">
- <el-col :span="6">
- <el-form-item label="鍘熸潗鏂欏悕绉�:">
- <el-input :disabled="true" v-model="searchData.name"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
-
- <el-form-item label="瑙勬牸鍨嬪彿:">
- <el-input :disabled="true" v-model="searchData.specifications"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="6">
-
- <el-form-item label="鍗曚綅:">
- <el-input :disabled="true" v-model="searchData.unit"></el-input>
- </el-form-item>
- </el-col>
- </el-form>
- </el-row>
- <el-row :gutter="80">
- <el-form ref="form" :model="searchData" label-width="80px">
- <el-col :span="6">
- <el-form-item label="鏁伴噺:">
- <el-input :disabled="true" v-model="searchData.num"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
-
- <el-form-item label="鐧昏鏃ユ湡:">
- <el-input :disabled="true" v-model="searchData.endTime"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="6">
-
- <el-form-item label="鐧昏浜�:">
- <el-input :disabled="true" v-model="searchData.userName"></el-input>
- </el-form-item>
- </el-col>
- </el-form>
- </el-row>
- </div>
- </el-card>
-
-
- <el-row style="margin: 5px;">
- <el-col :span="12" style="line-height: 32px;">妫�楠岄」鐩�</el-col>
- <el-col :span="12" style="text-align: right;">
- <!-- <el-button ic size="medium " @click="()=>{}">淇濆瓨</el-button> -->
- <el-button icon="el-icon-refresh-lef" size="medium " style="background-color: cornflowerblue;" @click="goback">杩斿洖</el-button>
- </el-col>
- </el-row>
- <div>
- <el-card style="margin: 10px;">
- <el-table
- :data="insProducts"
- height="calc(80vh - 250px)"
- border
- style="width: 100%">
- <el-table-column
- label="搴忓彿"
- type="index"
- width="50">
- </el-table-column>
- <el-table-column
- prop="name"
- label="椤圭洰"
- width="180">
- </el-table-column>
- <el-table-column
- prop="unit"
- label="鍗曚綅"
- width="180">
- </el-table-column>
- <el-table-column
- prop="internal"
- label="鏍囧噯鍊�">
- </el-table-column>
- <el-table-column
- prop="required"
- label="鍐呮帶鍊�">
- </el-table-column>
- <el-table-column prop="userName" label="缁忛獙浜�">
- <template slot-scope="scope">
- <el-select v-model="value" size="small" slot="append" style="width: 220px;">
- <el-option v-for="(item,indxe) in ZERENren" :key="indxe" :label="item.name" :value="item.name"></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="inspectionMaterialId"
- label="瀹為獙璁惧">
- <template slot-scope="scope">
- <el-select v-model="SHEbei" size="small" slot="append" style="width: 220px;">
- <el-option v-for="(item,index) in getDevices" :key="index" :label="item.name"></el-option>
- </el-select>
- </template>
- </el-table-column>
- </el-table>
-
- </el-card>
- </div>
- </div>
-</div>
+ <div>
+ <div style="overflow: hidden;">
+ <el-card style="margin: 10px;">
+ <div slot="header" class="clearfix">
+ <span>
+ <i slot="prefix" class="el-icon-s-home" />
+ 瀹為獙绠$悊/鍘熸潗鏂欐楠屽崟</span>
+ </div>
+ <div class="card-content">
+ <el-row>
+ <el-form ref="form" :model="searchData" label-width="150px">
+ <el-col :span="8">
+ <el-form-item label="鏉ユ枡鏃ユ湡:">
+ <el-input :disabled="true" v-model="searchData.formTime"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="渚涘簲鍟嗗悕绉�:">
+ <el-input :disabled="true" v-model="searchData.supplier"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="浜у搧缂栧彿:">
+ <el-input :disabled="true" v-model="searchData.code"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-form>
+ </el-row>
+ <el-row>
+ <el-form ref="form" :model="searchData" label-width="150px">
+ <el-col :span="8">
+ <el-form-item label="鍘熸潗鏂欏悕绉�:">
+ <el-input :disabled="true" v-model="searchData.name"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="瑙勬牸鍨嬪彿:">
+ <el-input :disabled="true" v-model="searchData.specifications"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鍗曚綅:">
+ <el-input :disabled="true" v-model="searchData.unit"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-form>
+ </el-row>
+ <el-row>
+ <el-form ref="form" :model="searchData" label-width="150px">
+ <el-col :span="8">
+ <el-form-item label="鏁伴噺:">
+ <el-input :disabled="true" v-model="searchData.num"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鐧昏鏃ユ湡:">
+ <el-input :disabled="true" v-model="searchData.endTime"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="8">
+ <el-form-item label="鐧昏浜�:">
+ <el-input :disabled="true" v-model="searchData.userName"></el-input>
+ </el-form-item>
+ </el-col>
+ </el-form>
+ </el-row>
+ </div>
+ </el-card>
+ <el-row style="margin: 0 20px;">
+ <el-col :span="12" style="line-height: 32px;">妫�楠岄」鐩�</el-col>
+ <el-col :span="12" style="text-align: right;">
+ <el-button icon="el-icon-refresh-lef" size="medium" @click="goback">杩斿洖</el-button>
+ </el-col>
+ </el-row>
+ <div>
+ <el-card style="margin: 10px;">
+ <el-table :data="insProducts" height="calc(80vh - 250px)" border style="width: 100%">
+ <el-table-column label="搴忓彿" type="index" width="50">
+ </el-table-column>
+ <el-table-column prop="name" label="椤圭洰" width="200">
+ </el-table-column>
+ <el-table-column prop="unit" label="鍗曚綅" width="150">
+ </el-table-column>
+ <el-table-column prop="internal" label="鏍囧噯鍊�">
+ </el-table-column>
+ <el-table-column prop="required" label="鍐呮帶鍊�">
+ </el-table-column>
+ <el-table-column prop="userName" label="璐d换浜�" width="220px">
+ <template slot-scope="scope">
+ <el-select v-model="scope.row.username" slot="append"
+ @change="(val)=>chooseUseProId(val, scope.row)">
+ <el-option v-for="(item,indxe) in ZERENren" :key="indxe" :label="item.name"
+ :value="item.id"></el-option>
+ </el-select>
+ </template>
+ </el-table-column>
+ <el-table-column prop="inspectionMaterialId" label="瀹為獙璁惧" width="220px">
+ <template slot-scope="scope">
+ <el-cascader v-model="scope.row.instrumentName" :options="devices"
+ :props="{label: 'Name',value: 'Id',children: 'childrenList'}"
+ @change="(val)=>chooseEquipment(val, scope.row)"></el-cascader>
+ </template>
+ </el-table-column>
+ </el-table>
+ </el-card>
+ </div>
+ </div>
+ </div>
</template>
<script>
- import { selectInspectsListById,selectUser,chooseinstum} from '@/api/experiment/planAssignments'
-export default {
- data(){
- return {
- searchData:{
- formTime: '',
- supplier: '',
- code: '',
- name: '',
- specifications: '',
- unit: '',
- num: '',
- endTime: '',
- userName: '',
- },
- insProducts:[],
- value:'',
- SHEbei:[],
- aaa:{},
- ZERENren:[],
- // getDevices:[]
- }
- },
- created(){
- // if(this.$route.query){
- // this.uu = this.$route.query.id;
- // }
- this.aaa = this.$route.query
- // if(this.$route.query){
- // this.aaa = this.$router.query.data1
- // console.log(this.aaa);
- // }
- console.log(this.aaa);
- this.selectInspectsListById()
- this.selectUser()
- this.chooseinstum()
- },
- methods: {
- //杩斿洖
- async goback(){
- this.$router.push({name:'inspectionApplication'})
- },
- //妫�楠屽崟璐d换浜�
- async selectUser(){
- const res = await selectUser()
- this.ZERENren = res.data
- console.log(this.ZERENren);
- },
-
- async chooseinstum(){
- const res = await chooseinstum()
- this.getDevices = res.data
- console.log(this.getDevices);
- },
- //妫�楠屽崟琛�
- async selectInspectsListById() {
- const res = await selectInspectsListById({id:this.aaa.id})
- this.searchData = res.data
- this.insProducts = res.data.insProducts
- }
-}
-}
+ import {
+ selectInspectsListById,
+ selectUser,
+ selectEquipment,
+ chooseUseProId,
+ chooseEquipment
+ } from '@/api/experiment/planAssignments'
+ export default {
+ data() {
+ return {
+ searchData: {
+ formTime: '',
+ supplier: '',
+ code: '',
+ name: '',
+ specifications: '',
+ unit: '',
+ num: '',
+ endTime: '',
+ userName: '',
+ },
+ insProducts: [],
+ value: '',
+ SHEbei: [],
+ id: null,
+ ZERENren: [],
+ devices: []
+ }
+ },
+ created() {
+ this.id = this.$route.params.id
+ this.selectInspectsListById()
+ this.selectUser()
+ this.selectEquipment()
+ },
+ methods: {
+ //杩斿洖
+ async goback() {
+ this.$router.push({
+ name: 'inspectionApplication'
+ })
+ },
+ //妫�楠屽崟璐d换浜�
+ async selectUser() {
+ const res = await selectUser()
+ this.ZERENren = res.data
+ },
+ async selectEquipment() {
+ const res = await selectEquipment()
+ this.devices = JSON.parse(JSON.stringify(res.data).replaceAll('father', '').replaceAll('ins', '').replaceAll(
+ 'son', '').replaceAll('name', 'Name'))
+ },
+ //妫�楠屽崟琛�
+ async selectInspectsListById() {
+ const res = await selectInspectsListById({
+ id: this.id
+ })
+ this.searchData = res.data
+ this.insProducts = res.data.insProducts
+ },
+ chooseUseProId(val, row) {
+ chooseUseProId({
+ id: row.id,
+ userProId: val
+ }).then(res => {
+ if (res.data) this.$message.success('璐d换浜哄垎閰嶆垚鍔�')
+ })
+ },
+ chooseEquipment(val, row) {
+ chooseEquipment({
+ id: row.id,
+ equipmentId: val[2]
+ }).then(res => {
+ if (res.data) this.$message.success('璁惧鍒嗛厤鎴愬姛')
+ })
+ }
+ }
+ }
</script>
<style lang="scss" scoped>
-</style>
-
\ No newline at end of file
+</style>
\ No newline at end of file
diff --git a/src/views/experiment/inspectionApplication/index.vue b/src/views/experiment/inspectionApplication/index.vue
index 4d98974..874e0d6 100644
--- a/src/views/experiment/inspectionApplication/index.vue
+++ b/src/views/experiment/inspectionApplication/index.vue
@@ -72,8 +72,8 @@
<el-table-column prop="createTime" label="鐧昏鏃ユ湡" min-width="80px" />
<el-table-column prop="inspection_status" label="妫�楠岀粨鏋�" min-width="80px">
<template slot-scope="scope">
- <el-tag class="tag" :type="scope.row.inspection_status === 0 ? 'danger' : 'success'"
- disable-transitions>{{ scope.row.inspection_status === 0 ? '涓嶅悎鏍�' : '鍚堟牸' }}</el-tag>
+ <el-tag class="tag" type="danger" disable-transitions v-if="scope.row.inspection_status == 0">涓嶅悎鏍�</el-tag>
+ <el-tag class="tag" type="success" disable-transitions v-else-if="scope.row.inspection_status == 1">鍚堟牸</el-tag>
</template>
</el-table-column>
<el-table-column prop="userName" label="鐧昏浜�" min-width="80px" />
@@ -81,7 +81,6 @@
<el-table-column label="鎿嶄綔" min-width="150" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleClick(scope.row)">鏌ョ湅</el-button>
- <!-- <el-button type="text" size="small" >鎻愪氦</el-button> -->
<el-button type="text" size="small">浣滃簾</el-button>
</template>
</el-table-column>
@@ -307,41 +306,21 @@
<el-card>
<template slot-scope="scope">
<span>鐗堟湰閫夋嫨锛�</span>
- <el-select @change="ccc" v-model="selectedValue" size="small" slot="append" style="width: 220px;">
+ <el-select @change="getProductVerison" v-model="version" size="small" slot="append" style="width: 220px;">
<el-option v-for="item in BANben" :key="item" :label="item" :value="item"></el-option>
</el-select>
</template>
</el-card>
<el-table :data="tableData" style="width: 100%; margin-bottom: 20px" row-key="id" border
- height="calc(80vh - 250px)" default-expand-all ref="multipleTable"
- @select-all="selectAll" @selection-change="handleSelectionChange"
+ height="calc(40vh)" default-expand-all ref="multipleTable"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
- <!-- <el-table-column type="selection" label="搴忓彿"> </el-table-column> -->
<el-table-column type="index" width="50px" label="搴忓彿"></el-table-column>
- <el-table-column label="椤圭洰鍚嶇О" sortable>
- <template scope="scope">
- <el-tag>
- <div class="firstDiv" :style="`color: ${
- scope.row.code == '[1]' ? '#16a7ff' : '#58c173'
- }`">
- {{ scope.row.code == "[1]" ? "01" : "02" }}
- </div>
- <span style="color: black">{{ scope.row.name }}</span>
- </el-tag>
- </template>
+ <el-table-column prop="name" label="椤圭洰鍚嶇О" sortable>
</el-table-column>
<el-table-column prop="unit" label="鍗曚綅" sortable></el-table-column>
- <el-table-column label="鏍囧噯鍊�" sortable>
- <template scope="scope">
- <el-input v-if="scope.row.edit === true || scope.row.code === '[2]'" @blur="requiredOnfocus(scope)"
- v-model="scope.row.required" placeholder="璇疯緭鍏ユ爣鍑嗗��"></el-input>
- </template>
+ <el-table-column prop="required" label="鏍囧噯鍊�" sortable>
</el-table-column>
<el-table-column prop="internal" label="鍐呮帶鍊�" sortable>
- <template scope="scope">
- <el-input v-if="scope.row.edit === true || scope.row.code === '[2]'" @blur="requiredOnfocus(scope)"
- v-model="scope.row.internal" placeholder="璇疯緭鍏ュ唴鎺у��"></el-input>
- </template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
@@ -460,7 +439,7 @@
amount: '',
checkdate: []
},
- selectedValue: {},
+ selectedValue: null,
infoForm: {},
commisionSelection: {
entrust_coding: '',
@@ -510,8 +489,7 @@
tableData: [],
tableRow: {},
BANben: [],
- // select_1: [],
- aa: {},
+ version: null,
listdata:[],
ddd:{}
}
@@ -531,7 +509,6 @@
if (this.$route.name === 'ForInspectionDetail') this.showDetail = true
},
methods: {
-
async selectAll() {
const res = selectAll({
type: 0
@@ -545,23 +522,14 @@
this.commisionTable = res.data
},
async handleClick(row) {
- this.inspectionTable = row;
- this.id = row.id
- this.$router.push({
- name: 'Viewdetails',
- query: {
- id: row.id
- }
- });
- this.selectInspectsList()
+ // this.$router.push({
+ // name: 'Viewdetails',
+ // query: {
+ // id: row.id
+ // }
+ // });
+ this.$router.push(`Viewdetails/${row.id}`);
},
- // validateInput() {
- // if (this.inputValue.trim() === '') {
- // }
- // }, // 杈撳叆鍊间负绌猴紝寮瑰嚭鎻愮ず淇℃伅鎴栬繘琛屽叾浠栧鐞�
- // alert('杈撳叆鍊间笉鑳戒负绌�');
- // return;
-
//鐗堟湰搴�
async chooseVer() {
const res = await chooseVer({
@@ -569,23 +537,25 @@
name: this.tmp.name,
specifications: this.tmp.specifications
})
- this.BANben = res.data
- this.aa = this.BANben[0]
+ this.BANben = []
+ res.data.forEach(a=>{
+ this.BANben.push('V ' + a)
+ })
+ this.version = this.BANben[0]
this.lookProByVer()
},
-
//鏍囧噯搴�
async lookProByVer() {
const res = await lookProByVer({
mcode: this.tmp.mcode,
name: this.tmp.name,
specifications: this.tmp.specifications,
- version: this.aa
+ version: this.version.replace('V ', '')
})
this.tableData = res.data
},
- ccc(val) {
- this.aa = val
+ getProductVerison(val) {
+ this.version = val
this.lookProByVer()
},
async selectInspectsList() {
@@ -595,14 +565,13 @@
pageSize: this.currentPage,
message: this.id
})
- // this.inspectionTable = data
const data = res.data.row
data.forEach((item) => {
- var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"]
- var startTime = item["DATE_FORMAT(i"]["`start_time`,'%Y-%m-%d')"]
- var endTime = item["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"]
+ var formTime = item["form_time"]
+ var startTime = item["start_time"]
+ var endTime = item["end_time"]
var checkdate = startTime + '~' + endTime
- var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%d')"]
+ var createTime = item["create_time"]
item['formTime'] = formTime // 鏉ユ枡鏃ユ湡
item['checkdate'] = checkdate // 妫�楠屾棩鏈�
item['createTime'] = createTime // 鐧昏鏃ユ湡
@@ -618,11 +587,11 @@
})
var data = res.data.row
data.forEach((item) => {
- var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"]
- var startTime = item["DATE_FORMAT(i"]["`start_time`,'%Y-%m-%d')"]
- var endTime = item["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"]
+ var formTime = item["form_time"]
+ var startTime = item["start_time"]
+ var endTime = item["end_time"]
var checkdate = startTime + '~' + endTime
- var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%m-%d')"]
+ var createTime = item["create_time"]
item['formTime'] = formTime // 鏉ユ枡鏃ユ湡
item['checkdate'] = checkdate // 妫�楠屾棩鏈�
item['createTime'] = createTime // 鐧昏鏃ユ湡
@@ -687,9 +656,6 @@
})
this.rawMaterialTable = res.data
})
-
- // this.infoForm = res.data
- // this.$router.push({ name: 'ReportForInspection' });
} else if (this.type === 1) {
this.commisionVisible = true
selectAll({
@@ -721,9 +687,13 @@
supplier: this.infoForm.supplier,
type: this.type,
unit: this.infoForm.unit,
- version:this.BANben[1]
+ version:this.version.replace('V ', '')
}).then(res=>{
-
+ this.$message({
+ message: '娣诲姞鎴愬姛锛�',
+ type: 'success'
+ });
+ this.$router.push(`Viewdetails/${res.data}`)
})
}
if (this.type === 1) {
@@ -738,8 +708,7 @@
supplier: this.commisionSelection.supplier,
type: this.type,
unit: this.commisionSelection.unit,
- version:this.aa
-
+ version:this.version
})
}
if (this.type === 2) {
@@ -754,8 +723,7 @@
supplier: this.finishedTable.supplier,
type: this.type,
unit: this.finishedTable.unit,
- version:this.aa
-
+ version:this.version
})
}
this.type = 0
@@ -870,7 +838,7 @@
background: #fff;
display: flex;
justify-content: space-between;
- padding: 5px 24px 0px 24px;
+ padding: 20px 24px 0px 24px;
}
.input-form {
diff --git a/src/views/inspectionManagement/commissionInspection/addCommision.vue b/src/views/inspectionManagement/commissionInspection/addCommision.vue
index 00c25ea..a68cbc8 100644
--- a/src/views/inspectionManagement/commissionInspection/addCommision.vue
+++ b/src/views/inspectionManagement/commissionInspection/addCommision.vue
@@ -22,7 +22,7 @@
<el-table-column type="index" label="搴忓彿" min-width="10%" />
<el-table-column prop="sampleNumber" label="鏍峰搧缂栧彿" min-width="8%" />
<el-table-column prop="sampleName" label="鏍峰搧鍚嶇О" min-width="10%" />
- <el-table-column prop="speName" label="瑙勬牸鍨嬪彿" min-width="10%" >
+ <el-table-column prop="speName" label="瑙勬牸鍨嬪彿" min-width="10%">
</el-table-column>
<el-table-column prop="unit" label="鍗曚綅" min-width="8%" />
<el-table-column prop="samplesNumber" label="鏁伴噺" min-width="8%" />
@@ -262,19 +262,7 @@
experiment: [],
addway: ''
},
- experList: [{
- key: '1',
- label: '澶栬妫�鏌�'
- }, {
- key: '2',
- label: '鍔ㄤ綔鐢靛帇璇曢獙'
- }, {
- key: '3',
- label: '鐢甸樆绠℃硠婕忕數娴佽瘯楠�'
- }, {
- key: '4',
- label: '缁濈紭閮ㄥ垎浜ゆ祦鑰愬帇璇曢獙'
- }],
+ experList: [],
sampleoptions: [],
samplecodeoptions: [],
model_spe_options: [],
@@ -369,12 +357,16 @@
},
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]
}
this.addPointerForm.experiment = exper
let tmp = this.addPointerForm
+ this.sampleoptions.forEach(a => {
+ if (a.key == tmp.sampleName) tmp.sampleName = a.value
+ })
+ tmp.speName = tmp.addway + '-' + tmp.speName
+ tmp.addway = 1
this.detectionInfo.push(tmp)
this.dialogueFormVisible = false
this.addPointerForm = {
@@ -447,8 +439,8 @@
return item.name
})
})
- this.model_sta_options.forEach(a=>{
- if(a.key == val){
+ this.model_sta_options.forEach(a => {
+ if (a.key == val) {
this.addPointerForm.speName = a.value
}
})
diff --git a/src/views/inspectionManagement/reportForInspection/index.vue b/src/views/inspectionManagement/reportForInspection/index.vue
index 2081aa0..cf50f4f 100644
--- a/src/views/inspectionManagement/reportForInspection/index.vue
+++ b/src/views/inspectionManagement/reportForInspection/index.vue
@@ -75,7 +75,7 @@
:data="inspectionTable" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" :selectable="checkSelect" min-width="5%"></el-table-column>
<el-table-column type="index" label="搴忓彿" min-width="8%" />
- <el-table-column prop="createTime" label="鏉ユ枡鏃ユ湡" min-width="8%" />
+ <el-table-column prop="dateSurvey" label="鏉ユ枡鏃ユ湡" min-width="8%" />
<el-table-column prop="supplierName" label="渚涘簲鍟嗗悕绉�" min-width="12%" />
<el-table-column prop="materialCoding" label="鏉愭枡缂栫爜" min-width="8%" />
<el-table-column prop="materialName" label="鏉愭枡鍚嶇О" min-width="8%" />
@@ -84,7 +84,7 @@
<el-table-column prop="quantity" label="鏁伴噺" min-width="5%" />
<el-table-column prop="inspectionDate" label="鎶ユ鏃ユ湡" min-width="8%" />
<el-table-column prop="surveyor" label="妫�楠屼汉" min-width="8%" />
- <el-table-column prop="dateSurvey" label="妫�楠屾棩鏈�" min-width="8%" />
+ <el-table-column prop="insTime" label="妫�楠屾棩鏈�" min-width="8%" />
<el-table-column prop="type" label="鐘舵��" min-width="8%">
<template slot-scope="scope">
<span :style="{ color: scope.row.type === 1 ? 'green' : 'red' }">
@@ -340,19 +340,7 @@
label: '鏈姤妫�'
}],
radioValue: null,
- inspectionTable: [{
- createTime: '2023-07-28',
- supplier_name: '鍥界綉灞变笢鐪佺數鍔涙湁闄愬叕鍙�',
- materialCoding: 'BP214274',
- materialName: '閾濆寘閽㈢粸绾�',
- specificationsModels: 'JLHA/G1A-185/30-26/7',
- unit: '鍚�',
- quantity: 21,
- dateSurvey: '2023-08-02',
- surveyor: '榛勫皬鏄�',
- inspectionDate: '2023-12-09',
- condition: 1
- }],
+ inspectionTable: [],
currentPage: 1,
pageSize: 10,
total: 20,
@@ -430,7 +418,6 @@
});
},
blurOptions(row) {
- console.log("鏇存柊", row);
},
async initNewSelection() {
const res = await selectUser();
@@ -449,7 +436,6 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- console.log(row.id);
this.deleteMaterialFun(row, index);
}).catch(() => {});
},
@@ -479,7 +465,6 @@
let name = this.checkData[0].materialName;
let specifications = this.checkData[0].specificationsModels;
this.getChooseVersionFun(mcode,name,specifications);
- console.log(this.standardLibraryData);
this.addReportDialog = true;
}
}
@@ -500,7 +485,6 @@
specifications : specifications,
version: version
}).then((res)=>{
- console.log(res);
vm.standardLibraryData = res.data;
})
@@ -556,12 +540,9 @@
//鐢熸垚鎶ユ鍗�
async createReport(param) {
let res = await addInspect(param);
- const res2 = await selectInspectsListById({
- id: res.data
- });
- this.resultData = res2.data;
- this.inspectionForm = res2.data;
- this.inspectionItems = res2.data.insProducts;
+ if(res.data==null)return
+ this.$message.success('鎶ユ鎴愬姛')
+ this.$router.push(`/experiment/Viewdetails/${res.data}`)
},
// 鑾峰彇鍒嗛〉鍒楄〃鏁版嵁
async getRawMaterialList() {
--
Gitblit v1.9.3