“zhuo”
2023-08-10 78d117860baff2bc0acbe11480a66fc9dc8703a2
Merge branch 'master' of http://192.168.110.209:9001/r/lims-before
已修改12个文件
已添加4个文件
1176 ■■■■■ 文件已修改
src/api/inspection/commisioninspection.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/urlEnum/nonConformanceReview.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/urlEnum/nonConformingFeedback.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/urlEnum/satisfactionSurveys.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/util/requestUtil.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/AppMain.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/settings.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/satisfactionSurveys/index.vue 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/inspectionApplication/index.vue 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/nonConformanceReview/index.vue 212 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/nonConformingFeedback/index.vue 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/addCommision.vue 326 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/index.vue 121 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standardLibrary/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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
  })
}
src/api/urlEnum/nonConformanceReview.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
const baseurl='/nonConformanceReview'
const url={
    "getNonConformanceReview": baseurl+"/getNonConformanceReview",//获取不合格品评审
}
export default{
    url
}
src/api/urlEnum/nonConformingFeedback.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
const baseurl='/non-conforming-feedback'
const url={
    "getNonConformingFeedback": baseurl+"/getNonConformingFeedback",//获取不合格品反馈
}
export default{
    url
}
src/api/urlEnum/satisfactionSurveys.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,8 @@
const baseurl='/cnasSatisfactionSurvey'
const url={
    "getCnasSatisfactionSurvey": baseurl+"/getCnasSatisfactionSurvey",//获取不合格品反馈
}
export default{
    url
}
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
    })
}
src/layout/components/AppMain.vue
@@ -45,4 +45,7 @@
    padding-right: 15px;
  }
}
.el-menu--popup{
  width: 120px;
}
</style>
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',
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
  }
}
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 => {
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>
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, // æ¯é¡µçš„æ•°æ®æ¡æ•°
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="检验负责人" 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>
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="检验负责人" 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>
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
    }
  }
}
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))]
      // å°†allDepartmentNames转换为options需要的格式
      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')
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;