From edf8e7472645534ed5156651fe802df1ceadccfb Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期四, 24 八月 2023 16:58:21 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
.env.staging | 2
.env.development | 2
src/main.js | 3
package.json | 1
.env.production | 2
src/views/experiment/checkTheReport/index.vue | 50 +
src/router/index.js | 6
src/views/inspectionManagement/commissionInspection/addCommision.vue | 1020 +++++++++++++++++++++++++++-----------------------
src/views/inspectionManagement/commissionInspection/index.vue | 69 +++
9 files changed, 650 insertions(+), 505 deletions(-)
diff --git a/.env.development b/.env.development
index ab9be2d..8dd5cb9 100644
--- a/.env.development
+++ b/.env.development
@@ -2,4 +2,4 @@
ENV = 'development'
# base api
-VUE_APP_BASE_API = 'http://localhost:1234/'
+VUE_APP_BASE_API = 'http://192.168.110.167:1234/'
diff --git a/.env.production b/.env.production
index 64b7d95..d5166db 100644
--- a/.env.production
+++ b/.env.production
@@ -3,5 +3,5 @@
# base api
# VUE_APP_BASE_API = '/prod-api'
-VUE_APP_BASE_API = 'http://192.168.110.254:1234/'
+VUE_APP_BASE_API = 'http://192.168.110.167:1234/'
diff --git a/.env.staging b/.env.staging
index d5bc70f..65e5ce8 100644
--- a/.env.staging
+++ b/.env.staging
@@ -5,6 +5,6 @@
# base api
# VUE_APP_BASE_API = '/stage-api'
-VUE_APP_BASE_API = 'http://192.168.110.87:1234/'
+VUE_APP_BASE_API = 'http://192.168.110.167:1234/'
diff --git a/package.json b/package.json
index 00e6b41..048f7b0 100644
--- a/package.json
+++ b/package.json
@@ -26,6 +26,7 @@
"path-to-regexp": "2.4.0",
"postcss-pxtorem": "^5.1.1",
"vue": "2.6.10",
+ "vue-clipboard2": "^0.3.3",
"vue-router": "3.0.6",
"vuex": "3.1.0"
},
diff --git a/src/main.js b/src/main.js
index 4390dd9..1eda87c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -7,6 +7,8 @@
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
+import VueClipboard from 'vue-clipboard2'
+Vue.use(VueClipboard)
import '@/styles/index.scss' // global css
@@ -52,6 +54,7 @@
Vue.config.productionTip = false
+
new Vue({
el: '#app',
router,
diff --git a/src/router/index.js b/src/router/index.js
index c1e514e..5ef02c4 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -42,6 +42,11 @@
hidden: true
},
{
+ path: '/addCommision',
+ component: () => import('@/views/inspectionManagement/commissionInspection/addCommision'),
+ hidden:true
+ },
+ {
path: '/',
component: Layout,
redirect: '/home',
@@ -474,7 +479,6 @@
const createRouter = () => new Router({
// mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),
- mode: 'history',
routes: constantRoutes
})
diff --git a/src/views/experiment/checkTheReport/index.vue b/src/views/experiment/checkTheReport/index.vue
index 2a92de3..a127c10 100644
--- a/src/views/experiment/checkTheReport/index.vue
+++ b/src/views/experiment/checkTheReport/index.vue
@@ -1,27 +1,33 @@
<template>
<div class="content-main">
<div class="top-bar">
- <el-form ref="form" :inline="true">
- <el-form-item class="sermargin">
+ <el-form ref="form" :inline="true" :model="searchData" label-position="left">
+ <el-form-item label="鏍峰搧缂栧彿:">
<el-input
- v-model="input"
+ v-model="searchData.sample_code"
class="input-form"
- placeholder="璇风洿鎺ヨ緭鍏ユ牱寮忕紪鍙�/鎶ュ憡鍗曞彿/鏍峰搧缂栧彿/杩涜鎼滅储鎴栦笅鎷夐�夋嫨杩涜缁勫悎鏌ヨ"
+ placeholder="璇疯緭鍏ユ牱鍝佺紪鍙�"
@keyup.enter.native="getData"
+ />
+ </el-form-item>
+ <el-form-item label="鎶ュ憡鍗曞彿:">
+ <el-input
+ v-model="searchData.reportCode"
+ class="input-form"
+ placeholder="璇疯緭鍏ユ姤鍛婂崟鍙�"
+ />
+ </el-form-item>
+ <el-form-item label="鐢宠鍗曞彿:">
+ <el-input
+ v-model="searchData.application_code"
+ class="input-form"
+ placeholder="璇疯緭鍏ョ敵璇峰崟鍙�"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getData()">鏌ヨ</el-button>
<el-button type="primary" plain @click="resetData()">閲嶇疆</el-button>
</el-form-item>
- <el-dropdown>
- <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-menu>
- </el-dropdown>
</el-form>
<el-form>
<el-button class="rightBtn" type="primary" icon="el-icon-document"
@@ -36,7 +42,8 @@
<el-radio-button>鍏ㄩ儴</el-radio-button>
<el-radio-button label="0">寰呮彁浜�</el-radio-button>
<el-radio-button label="1">寰呭鏍�</el-radio-button>
- <el-radio-button label="2">宸插鏍�</el-radio-button>
+ <el-radio-button label="2">寰呯瀛�</el-radio-button>
+ <el-radio-button label="3">宸插畬鎴�</el-radio-button>
</el-radio-group>
<el-checkbox v-model="checked" style="margin-left: 20px"
@@ -165,7 +172,11 @@
export default {
data() {
return {
- input: "",
+ searchData:{
+ sample_code:'',
+ reportCode:'',
+ application_code: ''
+ },
checkStatus: undefined,
reportTable: [],
page: 1,
@@ -196,7 +207,11 @@
},
// 閲嶇疆鎸夐挳
resetData() {
- this.input = undefined;
+ this.searchData={
+ sample_code:'',
+ reportCode:'',
+ application_code: ''
+ },
this.page = 1;
this.pageSize = 10;
this.checkStatus = undefined;
@@ -207,7 +222,7 @@
const params = {
page: this.page,
pageSize: this.pageSize,
- name: this.input ? this.input : undefined,
+ name: this.searchData.sample_code ? this.searchData.sample_code : undefined,
status: this.checkStatus ? this.checkStatus : undefined,
};
const { data } = await selectAllReport(params);
@@ -226,7 +241,8 @@
justify-content: space-between;
padding: 5px 24px 0px 24px;
.input-form {
- width: 700px;
+ width: 250px;
+ margin-right: 30px;
}
.el-dropdown-link {
cursor: pointer;
diff --git a/src/views/inspectionManagement/commissionInspection/addCommision.vue b/src/views/inspectionManagement/commissionInspection/addCommision.vue
index 5c44513..bebe006 100644
--- a/src/views/inspectionManagement/commissionInspection/addCommision.vue
+++ b/src/views/inspectionManagement/commissionInspection/addCommision.vue
@@ -1,488 +1,550 @@
<template>
- <div class="add_commision">
- <div class="content-main">
- <div class="firstBox">
- <div class="title">濮旀墭淇℃伅</div>
- <div class="tableBox">
- <div class="tableBox-header">
- <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" placeholder="鎵弿浜岀淮鐮佸綍鍏ユ牱鍝�..."
- prefix-icon="el-icon-search" style="width: 200px;">
- </el-input> -->
- <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">閲嶇疆</el-button>
- </div>
- <el-table ref="detectionInfo" :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="detectionInfo" style="width: 100%">
- <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="specificationsModels" label="瑙勬牸鍨嬪彿" min-width="10%" />
- <el-table-column prop="unit" label="鍗曚綅" min-width="8%" />
- <el-table-column prop="samplesNumber" label="鏁伴噺" min-width="8%" />
- <el-table-column prop="addway" label="娣诲姞鏂瑰紡" min-width="8%">
- <template slot-scope="scope">
- <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 prop="experiment" label="璇曢獙" min-width="8%" />
- <el-table-column prop="remarks" label="澶囨敞" min-width="8%" />
- <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" @click="deleteRow(scope.row)">鍒犻櫎</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- 鍒嗛〉鍣� -->
- <div>
- <el-pagination class="pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange"
- :current-page="currentPage" :page-sizes="[100, 200, 300, 400]" :page-size="100"
- layout="total, sizes, prev, pager, next, jumper" :total="400">
- </el-pagination>
- </div>
- </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="5">
- <el-form-item label="濮旀墭缂栧彿锛�">
- <el-input style="width: 160px" type="text" :value="infoForm.commisioncode" readonly disabled
- autocomplete="off" />
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="濮旀墭鍗曚綅锛�">
- <el-input style="width: 160px" v-model="infoForm.department" placeholder="璇疯緭鍏ュ鎵樺崟浣�" />
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="鑱旂郴浜猴細">
- <el-input style="width: 160px" v-model="infoForm.contacter" placeholder="璇疯緭鍏ュ鎵樺崟浣�" />
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="鑱旂郴鐢佃瘽锛�">
- <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-input style="width: 160px;" v-model="infoForm.address" placeholder="璇疯緭鍏ヨ仈绯诲湴鍧�"
- autocomplete="off" />
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="瀹屾垚鏈熼檺锛�">
- <el-date-picker v-model="infoForm.deadline" type="date" placeholder="閫夋嫨鏃ユ湡" style="width: 160px;">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="閫佹牱鏃堕棿锛�">
- <el-date-picker v-model="infoForm.time" type="date" placeholder="閫夋嫨鏃ユ湡" style="width: 160px;">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="閫佹牱鏂瑰紡锛�">
- <el-select style="width: 160px;" v-model="infoForm.way" size="small" placeholder="閫佹牱">
- <el-option v-for="options in sampleDeliveryMode" :key="options.key"
- :value="options.value">{{ options.value }}</el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="200">
- <el-col :span="5">
- <el-form-item label="閫佹牱浜猴細">
- <el-input style="width: 160px;" v-model="infoForm.sender" placeholder="璇疯緭鍏ラ�佹牱浜�" autocomplete="off" />
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="閫佹牱浜虹數璇濓細">
- <el-input style="width: 160px;" v-model="infoForm.sendertel" placeholder="璇疯緭鍏ラ�佹牱浜虹數璇�"
- autocomplete="off" />
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="鎶ュ憡鏁帮細">
- <el-input style="width: 160px;" v-model="infoForm.num" placeholder="璇疯緭鍏ユ姤鍛婃暟" autocomplete="off" />
- </el-form-item>
- </el-col>
- <el-col :span="5">
- <el-form-item label="濮旀墭澶囨敞锛�">
- <el-input style="width: 160px;" v-model="infoForm.other" placeholder="澶囨敞" autocomplete="off" />
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- <div class="submitBtn">
- <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 class="add_commision">
+ <div class="content-main">
+ <div class="firstBox">
+ <div class="title">濮旀墭淇℃伅</div>
+ <div class="tableBox">
+ <div class="tableBox-header">
+ <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"
+ placeholder="鎵弿浜岀淮鐮佸綍鍏ユ牱鍝�..."
+ prefix-icon="el-icon-search"
+ style="width: 200px;"
+ >
+ </el-input>-->
+ <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">閲嶇疆</el-button>
+ </div>
+ <el-table
+ ref="detectionInfo"
+ :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="detectionInfo"
+ style="width: 100%"
+ >
+ <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="specificationsModels"
+ label="瑙勬牸鍨嬪彿"
+ min-width="10%"
+ />
+ <el-table-column
+ prop="unit"
+ label="鍗曚綅"
+ min-width="8%"
+ />
+ <el-table-column
+ prop="samplesNumber"
+ label="鏁伴噺"
+ min-width="8%"
+ />
+ <el-table-column
+ prop="addway"
+ label="娣诲姞鏂瑰紡"
+ min-width="8%">
+ <template slot-scope="scope">
+ <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
+ prop="experiment"
+ label="璇曢獙"
+ min-width="8%"
+ />
+ <el-table-column
+ prop="remarks"
+ label="澶囨敞"
+ min-width="8%"
+ />
+ <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" @click="deleteRow(scope.row)">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <!-- 鍒嗛〉鍣� -->
+ <div>
+ <el-pagination
+ class="pagination"
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ :current-page="currentPage"
+ :page-sizes="[100, 200, 300, 400]"
+ :page-size="100"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="400">
+ </el-pagination>
+ </div>
+ </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="5">
+ <el-form-item label="濮旀墭缂栧彿锛�">
+ <el-input style="width: 160px" type="text" :value="infoForm.commisioncode" readonly disabled="true" autocomplete="off" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
+ <el-form-item label="濮旀墭鍗曚綅锛�">
+ <el-input style="width: 160px" v-model="infoForm.department" placeholder="璇疯緭鍏ュ鎵樺崟浣�" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
+ <el-form-item label="鑱旂郴浜猴細">
+ <el-input style="width: 160px" v-model="infoForm.contacter" placeholder="璇疯緭鍏ュ鎵樺崟浣�" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
+ <el-form-item label="鑱旂郴鐢佃瘽锛�">
+ <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-input style="width: 160px;" v-model="infoForm.address" placeholder="璇疯緭鍏ヨ仈绯诲湴鍧�" autocomplete="off" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
+ <el-form-item label="瀹屾垚鏈熼檺锛�">
+ <el-date-picker
+ v-model="infoForm.deadline"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ style="width: 160px;">
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
+ <el-form-item label="閫佹牱鏃堕棿锛�">
+ <el-date-picker
+ v-model="infoForm.time"
+ type="date"
+ placeholder="閫夋嫨鏃ユ湡"
+ style="width: 160px;">
+ </el-date-picker>
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
+ <el-form-item label="閫佹牱鏂瑰紡锛�">
+ <el-select style="width: 160px;" v-model="infoForm.way" size="small" placeholder="閫佹牱">
+ <el-option v-for="options in sampleDeliveryMode" :key="options.key" :value="options.value">{{ options.value }}</el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="200">
+ <el-col :span="5">
+ <el-form-item label="閫佹牱浜猴細" >
+ <el-input style="width: 160px;" v-model="infoForm.sender" placeholder="璇疯緭鍏ラ�佹牱浜�" autocomplete="off" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
+ <el-form-item label="閫佹牱浜虹數璇濓細" >
+ <el-input style="width: 160px;" v-model="infoForm.sendertel" placeholder="璇疯緭鍏ラ�佹牱浜虹數璇�" autocomplete="off" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
+ <el-form-item label="鎶ュ憡鏁帮細">
+ <el-input style="width: 160px;" v-model="infoForm.num" placeholder="璇疯緭鍏ユ姤鍛婃暟" autocomplete="off" />
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
+ <el-form-item label="濮旀墭澶囨敞锛�">
+ <el-input style="width: 160px;" v-model="infoForm.other" placeholder="澶囨敞" autocomplete="off" />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ </div>
+ <div class="submitBtn">
+ <el-button type="primary" size="small" @click="submitInspection" style="background-color: rgb(1, 102, 226);">鎻愪氦</el-button>
+ <!-- 鐐瑰嚮杩斿洖锛屽綋鍓嶉〉闈㈠�间负false -->
+ <el-button type="primary" size="mini" 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>
</template>
<script>
- import {
- getSampleName,
- getModelSpecification,
- getlink,
- addInspection,
- isIfViewUUID
- } from '@/api/inspection/commisioninspection'
- import {
- time
- } from 'echarts';
- export default {
- data() {
- return {
- currentPage: 0,
- searchData: '',
- infoForm: {
- commisioncode: '',
- department: '',
- contacter: '',
- tel: '',
- address: '',
- deadline: '',
- time: '',
- way: '',
- sender: '',
- sendertel: '',
- num: '',
- other: ''
- },
- 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
- }
- },
- created() {
- this.getlink(this.$route.params.viewId)
- console.log();
- },
- mounted() {
- // this.getSampleName()
- // this.getModelSpecification()
- },
- methods: {
- // 鑾峰彇閾炬帴link
- getlink(viewId) {
- if (viewId == null) {
- this.$message.error('褰撳墠閾炬帴涓嶅湪鏈夋晥鏈熷唴,绯荤粺鑷姩鍏抽棴')
- this.$router.push('/404')
- return
- }
- isIfViewUUID({
- viewId
- }).then(res => {
- if (!res.data) {
- this.$message.error('褰撳墠閾炬帴涓嶅湪鏈夋晥鏈熷唴,绯荤粺鑷姩鍏抽棴')
- this.$router.push('/404')
- }
- })
- },
- async getSampleName() {
- const res = await getSampleName()
- 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'
- })
- 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]
- }
- 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
- })
- this.infoForm.commisioncode = res.data
- if (res.data) {
- this.$message({
- message: '鎭枩浣�!',
- type: 'success'
- })
- // 璺宠浆椤甸潰
- this.$router.push('/inspectionManagement/commissionInspection')
- } 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
- }
- }
- }
+import {getSampleName, getModelSpecification, getlink, addInspection} from '@/api/inspection/commisioninspection'
+export default {
+ data() {
+ return {
+ currentPage: 0,
+ searchData: '',
+ infoForm: {
+ commisioncode: '',
+ department: '',
+ contacter: '',
+ tel: '',
+ address: '',
+ deadline: '',
+ time: '',
+ way: '',
+ sender: '',
+ sendertel: '',
+ num: '',
+ other: ''
+ },
+ 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
+ }
+ }
+}
</script>
<style lang="scss" scoped>
- .add_commision{
- padding: 20px;
- }
-
- .firstBox {
- .title {
- padding: 15px 10px;
- font-size: 18px;
- background-color: #0166e2;
- color: #fff;
- border-radius: 4px;
- }
+.add_commision{
+ padding: 20px;
+}
- .tableBox {
- background-color: #fff;
- padding: 0px 20px;
- margin: 0px -15px;
- flex: 1;
- background: #fff;
- /* padding: 20px 20px 10px 20px; */
- display: flex;
- flex-direction: column;
+.content-main{
+ padding: 20px 40px;
+ background-color: #f0f2f5;
+ width: 100%;
+ height: 100vh;
- .tableBox-header {
- padding: 20px 0px;
-
- .split {
- margin-right: 15px;
- }
- }
-
- .el-table {
- flex: 1;
- }
-
- >div:nth-child(3) {
- display: flex;
- justify-content: end;
- margin: 10px 0;
- }
- }
- }
-
- .secondBox {
- margin: 0px -15px;
-
- .header {
- display: flex;
- justify-content: space-between;
- padding: 10px 20px;
- margin-top: 10px;
- }
-
- .submitBtn {
- display: flex;
- justify-content: end;
- margin-right: 156px;
- margin-top: 20px;
- }
- }
-
- .infoForm {
- background-color: #fff;
- padding: 20px 50px;
- }
-</style>
\ No newline at end of file
+.firstBox{
+ .title {
+ padding: 15px 10px;
+ font-size: 18px;
+ background-color: #0166e2;
+ color: #fff;
+ border-radius: 4px;
+ }
+ .tableBox{
+ background-color: #fff;
+ padding: 0px 20px;
+ margin: 0px -15px;
+ flex: 1;
+ background: #fff;
+ /* padding: 20px 20px 10px 20px; */
+ display: flex;
+ flex-direction: column;
+ .tableBox-header{
+ padding: 20px 0px;
+ .split{
+ margin-right: 15px;
+ }
+ }
+ .el-table {
+ flex: 1;
+ }
+ >div:nth-child(3){
+ display: flex;
+ justify-content: end;
+ margin: 10px 0;
+ }
+ }
+}
+.secondBox{
+ margin: 0px -15px;
+ .header{
+ display: flex;
+ justify-content: space-between;
+ padding: 10px 20px;
+ margin-top: 10px;
+ }
+ .submitBtn{
+ display: flex;
+ justify-content: end;
+ margin-right: 40px;
+ margin-top: 20px;
+ }
+}
+.infoForm{
+ background-color: #fff;
+ padding: 20px 50px;
+ .formwrapper{
+ margin: 20px 0px;
+ padding-left: 30px;
+ .el-row{
+ margin: 10px 0px;
+ }
+ }
+}
+}
+</style>
diff --git a/src/views/inspectionManagement/commissionInspection/index.vue b/src/views/inspectionManagement/commissionInspection/index.vue
index 574abf8..a07fdda 100644
--- a/src/views/inspectionManagement/commissionInspection/index.vue
+++ b/src/views/inspectionManagement/commissionInspection/index.vue
@@ -339,11 +339,70 @@
display: flex;
justify-content: space-between;
padding: 5px 24px 0px 24px;
+ }
- .sermargin {
- margin-right: 60px;
- }
- }
+.top-bar{
+ margin: -25px -15px;
+ background: #fff;
+ display: flex;
+ justify-content: space-between;
+ padding: 5px 24px 0px 24px;
+ .sermargin{
+ margin-right: 60px;
+ }
+ .rightForm{
+ display: flex;
+ justify-content: space-between;
+ /* background-color: #bfa; */
+ height: 40px;
+ line-height: 40px;
+ >div{
+ padding: 0px 10px;
+ padding-bottom: 10px;
+ border:1px solid rgb(8, 156, 230);
+ margin-right: 10px;
+ /* height: 40px;
+ line-height: 40px; */
+ }
+ .rightBtn{
+ background-color: rgb(1, 102, 226);
+ }
+ }
+ }
+
+.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: 0px;
+ flex: 1;
+ background: #fff;
+ /* padding: 20px 20px 10px 20px; */
+ display: flex;
+ flex-direction: column;
+ .el-table {
+ flex: 1;
+ }
+ >div:nth-child(2){
+ display: flex;
+ justify-content: end;
+ margin: 10px 0;
+ }
+ }
+ }
.rightBtn {
background-color: rgb(1, 102, 226);
@@ -392,4 +451,4 @@
text-align: center;
color: #0166e2;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3