最后一舞---去他妈的缪海庆,扣脚大爷都没你扣,没有格局把路走窄了
已修改4个文件
已添加14个文件
1302 ■■■■■ 文件已修改
src/api/laboratory/ledger.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Breadcrumb/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 208 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/nonConformanceManage/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/nonConformanceStatistics/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/reviewAnnualPlan/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/satisfactionSurveys/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/checkTheReport/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/inspectionApplication/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/nonConformanceReview/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/nonConformingFeedback/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/passRateStatistics/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/planAssignments/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/reportAuditing/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/addCommision.vue 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/index.vue 284 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/reportForInspection/index.vue 302 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/laboratory/ledger/index.vue 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/laboratory/ledger.js
@@ -80,6 +80,14 @@
  })
}
export function deleteInstrument(params) {
  return request({
    url: '/instrument/delete',
    method: 'delete',
    params
  })
}
// æ ¹æ®è®¾å¤‡id查找对应码点
export function getEquipmentPointList(params) {
  return request({
src/components/Breadcrumb/index.vue
@@ -69,7 +69,8 @@
  font-size: 14px;
  padding: 12px 24px;
  height: 38px;
  width: 100%;
  // width: 100%;
  margin: 0px 9px;
  background: #fff;
  // margin-left: px;
  .no-redirect {
src/router/index.js
@@ -74,101 +74,162 @@
      }
    ]
  },
  // {
  //   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: '/trialManagement',
    path: '/inspectionManagement',
    component: Layout,
    redirect: '/trialManagement/index',
    meta: { title: '试验管理', icon: 'el-icon-s-help' },
    redirect: '/inspectionManagement/commissionInspection',
    name: 'InspectionManagement',
    meta: { title: '报检管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'index',
        name: 'entrust',
        component: () => import('@/views/trialManagement/entrust'),
        meta: { title: '委托检验', icon: 'form' }
      },
      {
        path: 'rawMaterials',
        name: 'RawMaterials',
        component: () => import('@/views/trialManagement/rawMaterials'),
        meta: { title: '原材料报检', icon: 'form' }
      }
    ]
  },
  {
    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' },
        path: 'commissionInspection',
        name: 'CommissionInspection',
        component: () => import('@/views/inspectionManagement/commissionInspection/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',
            path: 'addCommision',
            name: 'AddCommision',
            hidden: true,
            component: () => import('@/views/rawMaterials/reportForInspection/forInspectionDetail'),
            meta: { title: '新增检验单详情', icon: 'table' }
            component: () => import('@/views/inspectionManagement/commissionInspection/addCommision'),
            meta: { title: '检测信息', icon: 'table' }
          }
        ]
      },
      {
        path: 'print',
        name: 'Print',
        component: () => import('@/views/rawMaterials/print/index'),
        meta: { title: '条码打印', icon: 'tree' }
        path: 'reportForInspection',
        name: 'ReportForInspection',
        component: () => import('@/views/inspectionManagement/reportForInspection/index'),
        meta: { title: '原材料报检', icon: 'tree' }
      }
    ]
  },
  {
    path: '/experiment',
    component: Layout,
    redirect: '/experiment/inspectionApplication',
    name: 'Experiment',
    meta: { title: '试验管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'inspectionApplication',
        name: 'InspectionApplication',
        component: () => import('@/views/experiment/inspectionApplication/index'),
        meta: { title: '检验申请', icon: 'tree' }
      },
      {
        path: 'planAssignments',
        name: 'PlanAssignments',
        component: () => import('@/views/rawMaterials/planAssignments/index'),
        component: () => import('@/views/experiment/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'),
        component: () => import('@/views/experiment/checkTheReport/index'),
        meta: { title: '检验报告', icon: 'tree' }
      },
      {
        path: 'reportAuditing',
        name: 'ReportAuditing',
        component: () => import('@/views/rawMaterials/reportAuditing/index'),
        component: () => import('@/views/experiment/reportAuditing/index'),
        meta: { title: '报告审核', icon: 'tree' }
      },
      {
        path: 'nonConformanceReview',
        name: 'NonConformanceReview',
        component: () => import('@/views/rawMaterials/nonConformanceReview/index'),
        meta: { title: '不合格反馈', icon: 'tree' }
        component: () => import('@/views/experiment/nonConformanceReview/index'),
        meta: { title: '不合格品反馈', icon: 'tree' }
      },
      {
        path: 'nonConformingFeedback',
        name: 'NonConformingFeedback',
        component: () => import('@/views/rawMaterials/nonConformingFeedback/index'),
        meta: { title: '不合格评审', icon: 'tree' }
        component: () => import('@/views/experiment/nonConformingFeedback/index'),
        meta: { title: '不合格品评审', icon: 'tree' }
      },
      {
        path: 'passRateStatistics',
        name: 'PassRateStatistics',
        component: () => import('@/views/rawMaterials/passRateStatistics/index'),
        component: () => import('@/views/experiment/passRateStatistics/index'),
        meta: { title: '合格率统计', icon: 'tree' }
      }
    ]
@@ -270,6 +331,39 @@
    ]
  },
  {
    path: '/CNAS',
    component: Layout,
    redirect: '/CNAS/reviewAnnualPlan',
    name: 'CNAS',
    meta: { title: 'CNAS管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'reviewAnnualPlan',
        name: 'ReviewAnnualPlan',
        component: () => import('@/views/CNAS/reviewAnnualPlan/index'),
        meta: { title: '审核年度计划', icon: 'table' }
      },
      {
        path: 'nonConformanceManage',
        name: 'NonConformanceManage',
        component: () => import('@/views/CNAS/nonConformanceManage/index'),
        meta: { title: '不符合项管理', icon: 'tree' }
      },
      {
        path: 'nonConformanceStatistics',
        name: 'NonConformanceStatistics',
        component: () => import('@/views/CNAS/nonConformanceStatistics/index'),
        meta: { title: '不符合项统计', icon: 'tree' }
      },
      {
        path: 'satisfactionSurveys',
        name: 'SatisfactionSurveys',
        component: () => import('@/views/CNAS/satisfactionSurveys/index'),
        meta: { title: '满意度调查', icon: 'tree' }
      }
    ]
  },
  {
    path: '/chart',
    component: Layout,
    redirect: '/chart/center',
src/views/CNAS/nonConformanceManage/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
<template>
    <div>
        ä¸ç¬¦åˆé¡¹ç®¡ç†
    </div>
</template>
src/views/CNAS/nonConformanceStatistics/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,3 @@
<template>
    <div>不符合项统计</div>
</template>
src/views/CNAS/reviewAnnualPlan/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
<template>
    <div>
        å®¡æ ¸å¹´åº¦è®¡åˆ’
    </div>
</template>
src/views/CNAS/satisfactionSurveys/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
<template>
    <div>
        æ»¡æ„åº¦è°ƒæŸ¥
    </div>
</template>
src/views/experiment/checkTheReport/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
<template>
  <div>检测报告</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
src/views/experiment/inspectionApplication/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
<template>
    <div>
        æ£€éªŒç”³è¯·
    </div>
</template>
src/views/experiment/nonConformanceReview/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
<template>
  <div>不合格评审</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
src/views/experiment/nonConformingFeedback/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
<template>
  <div>不合格反馈</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
src/views/experiment/passRateStatistics/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
<template>
  <div>合格率统计</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
src/views/experiment/planAssignments/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
<template>
  <div>检验计划分配</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
src/views/experiment/reportAuditing/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,13 @@
<template>
  <div>报告审核</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
src/views/inspectionManagement/commissionInspection/addCommision.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,254 @@
<template>
  <div class="content-main">
    <div class="firstBox">
      <span>检测信息</span>
      <div tableBox>
        <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">添加样品</el-button>
        <el-input
          v-model="searchData"
          class="input-form"
          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>
        <el-table
                ref="commisionTable"
                :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="commisionTable"
                style="width: 100%"
              >
                <el-table-column
                  type="index"
                  label="序号"
                  min-width="10%"
                />
                <el-table-column
                  prop="commisioncode"
                  label="委托编号"
                  min-width="8%"
                />
                <el-table-column
                  prop="department"
                  label="委托单位"
                  min-width="10%"
                />
                <el-table-column
                  prop="samplecode"
                  label="样品编号"
                  min-width="8%"
                />
                <el-table-column
                  prop="samplename"
                  label="样品名称"
                  min-width="8%"
                />
                <el-table-column
                  prop="modelandspecification"
                  label="规格型号"
                  min-width="10%"
                />
                <el-table-column
                  prop="arrivetime"
                  label="送达时间"
                  min-width="8%"
                />
                <el-table-column
                  prop="deadline"
                  label="完成期限"
                  min-width="8%"
                />
                <el-table-column
                  prop="person"
                  label="委托编制人"
                  min-width="8%"
                />
                <el-table-column
                  prop="checkdate"
                  label="检验日期"
                  min-width="8%"
                />
                <el-table-column
                  prop="state"
                  label="状态"
                  min-width="8%"
                />
                <el-table-column
                  label="操作"
                  min-width="8%"
                >
                  <template slot-scope="scope">
                    <el-button type="text" size="small" @click="handleClick(scope.row)">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
              <!-- åˆ†é¡µå™¨ -->
              <div>
                <el-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="left" label-width="100px" size="mini" >
                    <div class="formwrapper">
                        <el-row :gutter="50">
                        <el-col :span="12">
                        <el-form-item label="委托编号:">
                            <el-input style="width: 100px;" v-model="infoForm.commisioncode" placeholder="请输入订单号" readonly autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="12">
                        <el-form-item label="委托单位:">
                            <el-select style="width: 180px;" v-model="infoForm.department" size="small" placeholder="请选择产品名称">
                                <el-option value="选项1"></el-option>
                                <el-option value="选项2"></el-option>
                            </el-select>
                        </el-form-item>
                        </el-col>
                        <el-col :span="12">
                        <el-form-item label="联系人:">
                            <el-select style="width: 180px;" v-model="infoForm.contacter" size="small" placeholder="请选择产品名称">
                                <el-option value="选项1"></el-option>
                                <el-option value="选项2"></el-option>
                            </el-select>
                        </el-form-item>
                        </el-col>
                        <el-col :span="12">
                        <el-form-item label="联系电话:">
                            <el-select style="width: 180px;" v-model="infoForm.tel" size="small" placeholder="请选择产品名称">
                                <el-option value="选项1"></el-option>
                                <el-option value="选项2"></el-option>
                            </el-select>
                        </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="450">
                        <el-col :span="5">
                        <el-form-item label="联系地址:" >
                            <el-select style="width: 180px;" v-model="infoForm.address" size="small" placeholder="请选择产品名称">
                                <el-option value="选项1"></el-option>
                                <el-option value="选项2"></el-option>
                            </el-select>
                        </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: 180px;">
                            </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: 180px;">
                            </el-date-picker>
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="送样方式:">
                          <el-select style="width: 180px;" v-model="infoForm.way" size="small" placeholder="送样">
                                <el-option value="选项1"></el-option>
                                <el-option value="选项2"></el-option>
                            </el-select>
                        </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="450">
                        <el-col :span="5">
                        <el-form-item label="送样人:" >
                          <el-input style="width: 180px;" v-model="infoForm.sender" placeholder="请输入送样人" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="送样人电话:" >
                          <el-input style="width: 180px;" v-model="infoForm.sendertel" placeholder="请输入送样人电话" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="报告数:">
                            <el-input style="width: 180px;" v-model="infoForm.num" placeholder="请输入报告数" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="委托备注:">
                            <el-input style="width: 180px;" v-model="infoForm.other" placeholder="备注" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                    </el-row>
                    </div>
                </el-form>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      searchData: '',
      infoForm: [{
        commisioncode: '',
        department: '',
        contacter: '',
        tel: '',
        address: '',
        deadline: '',
        time: '',
        way: '',
        sender: '',
        sendertel: '',
        num: '',
        other: ''
      }]
    }
  },
  methods: {
    handleSelectionChange(val) {
      console.log(val)
      this.radioSelected = val.number // é€‰ä¸­è¡Œçš„number
      this.multipleSelection = val // é€‰ä¸­çš„一行数据
    },
    handleSizeChange(pageSize) {
      this.pageParams.pageSize = pageSize
    },
    handleCurrentChange(pageNo) {
      this.pageParams.pageNo = pageNo
    },
    headerBg({ row, rowIndex }) {
      console.log('rowIndex', rowIndex)
      if (rowIndex === 0) {
        return 'headerBgClass'
      }
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
src/views/inspectionManagement/commissionInspection/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,284 @@
<template>
  <div>
    <div v-if="!showDetail">
      <div class="content-main">
          <div class="top-bar">
              <el-form ref="form" :inline="true" :model="searchData">
              <el-form-item label="委托编号:" class="sermargin">
                <el-input
                  v-model="searchData.code"
                  class="input-form"
                  placeholder="请输入"
                >
                </el-input>
              </el-form-item>
              <el-form-item label="样品名称:" class="sermargin">
                <el-input
                  v-model="searchData.name"
                  class="input-form"
                  placeholder="请输入"
                >
                </el-input>
              </el-form-item>
              <el-form-item label="委托单位:" style="margin-right: 20px;">
                <el-select v-model="searchData.department" placeholder="全部">
                  <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>
                <el-button type="primary" plain>重置</el-button>
              </el-form-item>
              </el-form>
              <el-form>
                <el-button class="rightBtn" type="primary" @click="goToaddCommision">新增委托</el-button>
              </el-form>
          </div>
          <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>
              </div>
              <div class="generateInsp">
                <el-button type="primary" size="mini" icon="el-icon-document" style="background-color: rgb(1, 102, 226);">生成报检单</el-button>
              </div>
            </div>
            <div class="table-box">
              <el-table
                ref="commisionTable"
                :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="commisionTable"
                style="width: 100%"
              >
                <el-table-column
                  type="index"
                  label="序号"
                  min-width="10%"
                />
                <el-table-column
                  prop="commisioncode"
                  label="委托编号"
                  min-width="8%"
                />
                <el-table-column
                  prop="department"
                  label="委托单位"
                  min-width="10%"
                />
                <el-table-column
                  prop="samplecode"
                  label="样品编号"
                  min-width="8%"
                />
                <el-table-column
                  prop="samplename"
                  label="样品名称"
                  min-width="8%"
                />
                <el-table-column
                  prop="modelandspecification"
                  label="规格型号"
                  min-width="10%"
                />
                <el-table-column
                  prop="arrivetime"
                  label="送达时间"
                  min-width="8%"
                />
                <el-table-column
                  prop="deadline"
                  label="完成期限"
                  min-width="8%"
                />
                <el-table-column
                  prop="person"
                  label="委托编制人"
                  min-width="8%"
                />
                <el-table-column
                  prop="checkdate"
                  label="检验日期"
                  min-width="8%"
                />
                <el-table-column
                  prop="state"
                  label="状态"
                  min-width="8%"
                />
                <el-table-column
                  label="操作"
                  min-width="8%"
                >
                  <template slot-scope="scope">
                    <el-button type="text" size="small" @click="handleClick(scope.row)">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
              <!-- åˆ†é¡µå™¨ -->
              <div>
                <el-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>
      </div>
  </div>
    <div v-else>
      <router-view />
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      form: [],
      searchData: {
        code: '',
        name: '',
        department: ''
      },
      options: [{
        value: '1',
        label: '部门1'
      }, {
        value: '2',
        label: '部门2'
      }, {
        value: '3',
        label: '部门3'
      }],
      radioValue: '',
      commisionTable: [{
        commisioncode: 'GW31478631',
        department: '国网山东省电力有限公司',
        samplecode: 'BP214274',
        samplename: '绝缘杆',
        modelandspecification: 'JLHA/G1A-185/30-26/7',
        arrivetime: '2023-08-01',
        deadline: '2023-08-05',
        person: '黄小明',
        checkdate: '2023-08-02',
        state: '已检测'
      }, {
        commisioncode: 'GW31478631',
        department: '国网山东省电力有限公司',
        samplecode: 'BP214274',
        samplename: '绝缘杆',
        modelandspecification: 'JLHA/G1A-185/30-26/7',
        arrivetime: '2023-08-01',
        deadline: '2023-08-05',
        person: '黄小明',
        checkdate: '2023-08-02',
        state: '已检测'
      }, {
        commisioncode: 'GW31478631',
        department: '国网山东省电力有限公司',
        samplecode: 'BP214274',
        samplename: '绝缘杆',
        modelandspecification: 'JLHA/G1A-185/30-26/7',
        arrivetime: '2023-08-01',
        deadline: '2023-08-05',
        person: '黄小zhi',
        checkdate: '2023-08-02',
        state: '已检测'
      }],
      currentPage: 0,
      showDetail: false
    }
  },
  updated() {
    if (this.$router.currentRoute.name === 'AddCommision') {
      // console.log(this.$router.currentRoute.name)
      this.showDetail = true
    }
  },
  methods: {
    // æ¯é¡µæ¡æ•°æ”¹å˜æ—¶è§¦å‘ é€‰æ‹©ä¸€é¡µæ˜¾ç¤ºå¤šå°‘行
    handleSizeChange(val) {
      console.log(`每页 ${val} æ¡`)
      this.currentPage = 1
      this.pageSize = val
    },
    // å½“前页改变时触发 è·³è½¬å…¶ä»–页
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
      this.currentPage = val
    },
    goToaddCommision() {
      this.$router.push('/inspectionManagement/commissionInspection/addCommision')
      this.showDetail = true
    }
  }
}
</script>
<style scoped>
.top-bar{
    margin: -25px -15px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    padding: 5px 24px 0px 24px;
    .sermargin{
      margin-right: 60px;
    }
  }
.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;
          }
      }
    }
</style>
src/views/inspectionManagement/reportForInspection/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,302 @@
<template>
    <div class="content-main">
        <div class="top-bar">
            <el-form ref="form" :inline="true" :model="searchData">
            <el-form-item label="材料编码:" class="sermargin">
              <el-input
                v-model="searchData.code"
                class="input-form"
                placeholder="请输入"
              >
              </el-input>
            </el-form-item>
            <el-form-item label="材料名称:" class="sermargin">
              <el-input
                v-model="searchData.name"
                class="input-form"
                placeholder="请输入"
              >
              </el-input>
            </el-form-item>
            <el-form-item label="状态:" class="sermargin">
              <el-select v-model="searchData.state" placeholder="全部">
                <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-input
                v-model="searchData.date"
                class="input-form"
                placeholder="请输入"
              >
              </el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary">查询</el-button>
              <el-button type="primary" plain>重置</el-button>
            </el-form-item>
            </el-form>
        </div>
        <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>
            </div>
            <div class="generateInsp">
              <el-button type="primary" size="mini" icon="el-icon-document" style="background-color: rgb(1, 102, 226);">生成报检单</el-button>
            </div>
          </div>
          <div class="table-box">
            <el-table
              ref="inspectionTable"
              :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="inspectionTable"
              style="width: 100%"
            >
              <el-table-column
                type="selection"
                label=""
                min-width="10%"
              />
              <el-table-column
                type="index"
                label="序号"
                min-width="8%"
              />
              <el-table-column
                prop="date"
                label="来料日期"
                min-width="8%"
              />
              <el-table-column
                prop="providerName"
                label="供应商名称"
                min-width="12%"
              />
              <el-table-column
                prop="code"
                label="材料编码"
                min-width="8%"
              />
              <el-table-column
                prop="name"
                label="材料名称"
                min-width="8%"
              />
              <el-table-column
                prop="modelandspecification"
                label="规格型号"
                min-width="12%"
              />
              <el-table-column
                prop="unit"
                label="单位"
                min-width="5%"
              />
              <el-table-column
                prop="amount"
                label="数量"
                min-width="5%"
              />
              <el-table-column
                prop="commisiondate"
                label="报检日期"
                min-width="8%"
              />
              <el-table-column
                prop="person"
                label="检验人"
                min-width="8%"
              />
              <el-table-column
                prop="checkdate"
                label="检验日期"
                min-width="8%"
              />
              <el-table-column
                prop="state"
                label="状态"
                min-width="8%"
              >
              <template slot-scope="scope">
                <span :style="{ color: scope.row.state === '已检测' ? 'green' : 'red' }">
                  {{ scope.row.state }}
                </span>
              </template>
              </el-table-column>
            </el-table>
            <!-- åˆ†é¡µå™¨ -->
            <div>
              <el-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>
    </div>
</template>
<script>
export default {
  data() {
    return {
      form: [],
      searchData: {
        code: '',
        name: '',
        state: '',
        date: ''
      },
      options: [{
        value: '1',
        label: '部门1'
      }, {
        value: '2',
        label: '部门2'
      }, {
        value: '3',
        label: '部门3'
      }],
      radioValue: '',
      inspectionTable: [{
        date: '2023-07-28',
        providerName: '国网山东省电力有限公司',
        code: 'BP214274',
        name: '铝包钢绞线',
        modelandspecification: 'JLHA/G1A-185/30-26/7',
        unit: '吨',
        amount: '21',
        commisiondate: '2023-08-02',
        person: '黄小明',
        checkdate: '2023-12-09',
        state: '已检测'
      }, {
        date: '2023-07-28',
        providerName: '国网山东省电力有限公司',
        code: 'BP214274',
        name: '铝包钢绞线',
        modelandspecification: 'JLHA/G1A-185/30-26/7',
        unit: '吨',
        amount: '21',
        commisiondate: '2023-08-02',
        person: '黄小明',
        checkdate: '2023-12-09',
        state: '待检测'
      }, {
        date: '2023-07-28',
        providerName: '国网山东省电力有限公司',
        code: 'BP214274',
        name: '铝包钢绞线',
        modelandspecification: 'JLHA/G1A-185/30-26/7',
        unit: '吨',
        amount: '21',
        commisiondate: '2023-08-02',
        person: '黄小明',
        checkdate: '2023-12-09',
        state: '已检测'
      }, {
        date: '2023-07-28',
        providerName: '国网山东省电力有限公司',
        code: 'BP214274',
        name: '铝包钢绞线',
        modelandspecification: 'JLHA/G1A-185/30-26/7',
        unit: '吨',
        amount: '21',
        commisiondate: '2023-08-02',
        person: '黄小明',
        checkdate: '2023-12-09',
        state: '待检测'
      }],
      currentPage: 0
    }
  },
  methods: {
    // æ¯é¡µæ¡æ•°æ”¹å˜æ—¶è§¦å‘ é€‰æ‹©ä¸€é¡µæ˜¾ç¤ºå¤šå°‘行
    handleSizeChange(val) {
      console.log(`每页 ${val} æ¡`)
      this.currentPage = 1
      this.pageSize = val
    },
    // å½“前页改变时触发 è·³è½¬å…¶ä»–页
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
      this.currentPage = val
    }
  }
}
</script>
<style scoped>
.top-bar{
    margin: -25px -15px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    padding: 5px 24px 0px 24px;
    .sermargin{
        margin-right: 60px;
    }
}
.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;
          }
      }
    }
.checked {
  color: green;
}
.unchecked {
  color: red;
}
</style>
src/views/laboratory/ledger/index.vue
@@ -12,8 +12,8 @@
            </el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary">查询</el-button>
            <el-button type="primary" plain>重置</el-button>
            <el-button type="primary" @click="filterTableData">查询</el-button>
            <el-button type="primary" plain @click="resetBtn">重置</el-button>
            <!-- <el-button type="text">高级搜索<i class="el-icon-arrow-down el-icon--right" /></el-button> -->
          </el-form-item>
        </el-form>
@@ -28,6 +28,7 @@
          <el-row>
            <el-col :span="19">
              <el-input
                v-model="filterText"
                placeholder="输入关键字进行过滤"
              />
            </el-col>
@@ -40,7 +41,7 @@
          ref="classTree"
          :data="classTree"
          :props="defaultProps"
          default-expand-all
          :default-expand-all="true"
          :filter-node-method="filterNode"
          @node-click="nodeClickHandler"
        />
@@ -48,13 +49,13 @@
      <div class="library-table">
        <div class="table-header">
          <div class="search-bar">
            <el-radio-group v-model="radioValue">
              <el-radio-button label="0">全部</el-radio-button>
            <el-radio-group v-model="radioValue" @change="getConditionTable">
              <!-- <el-radio-button label="0">全部</el-radio-button> -->
              <el-radio-button v-for="item in conditionsOptions" :key="item.value" :label="item.value">
                {{ item.label }}
              </el-radio-button>
            </el-radio-group>
            <el-checkbox v-model="isOut" :style="{'marginLeft':'12px'}">已过期</el-checkbox>
            <el-checkbox v-model="isOut" @change="getExpireTable" :style="{'marginLeft':'12px'}">已过期</el-checkbox>
          </div>
          <div class="serve-btn">
            <!-- <el-button type="primary" icon="el-icon-plus">新增人员</el-button> -->
@@ -124,7 +125,7 @@
            >
              <template slot-scope="scope">
                <el-button type="text" size="small" @click="openDetail(scope.row)">编辑</el-button>
                <el-button type="text" size="small">删除</el-button>
                <el-button type="text" size="small" @click="clickDelete(scope.row)">删除</el-button>
              </template>
            </el-table-column>
          </el-table>
@@ -650,6 +651,18 @@
        <el-button @click="measureFormVisible = false">取 æ¶ˆ</el-button>
      </span>
    </el-dialog>
    <!-- åˆ é™¤ä»ªå™¨å¼¹å‡ºæ¡† -->
    <el-dialog
      title="提示"
      :visible.sync="deletedialogVisible"
      width="30%"
      :before-close="handleClose">
      <span>确定删除该仪器吗?</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="deletedialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="deleteInstrument">ç¡® å®š</el-button>
      </span>
    </el-dialog>
  </div>
</template>
@@ -657,7 +670,7 @@
import { getClassifyList, getInstrumentList,
  addInstrumentUser, addInstrument, getInstrumentDetail,
  getEquipmentPointList, addEquipmentPoint,
  getMetricalInformationList, changeInstrument, addMetricalInformation } from '@/api/laboratory/ledger'
  getMetricalInformationList, changeInstrument, addMetricalInformation, deleteInstrument } from '@/api/laboratory/ledger'
import { parseTime } from '@/utils/index'
export default {
  filters: {
@@ -689,6 +702,10 @@
      userOpetions: [],
      // ä»ªå™¨çŠ¶æ€é…ç½®é¡¹
      conditionsOptions: [
        {
          label: '全部',
          value: 0
        },
        {
          label: '运行',
          value: 1
@@ -748,6 +765,8 @@
      addClassVisible: false,
      // æŽ§åˆ¶æ–°å¢žè®¡é‡æ¨¡æ€æ¡†æ˜¾ç¤º
      measureFormVisible: false,
      // æŽ§åˆ¶åˆ é™¤ä»ªå™¨æ¨¡æ€æ¡†æ˜¾ç¤º
      deletedialogVisible: false,
      // æŽ§åˆ¶æ·»åŠ ä¿®æ”¹ä»ªå™¨æŠ½å±‰çš„æ˜¾ç¤º
      addDrawerVisible: false,
      // æ·»åŠ ä¿®æ”¹ä»ªå™¨å‚æ•°å¯¹è±¡
@@ -796,7 +815,17 @@
      // ç ç‚¹è¡¨æ ¼çš„状态:数据展示false/新增输入true
      codePointesTableStatus: false,
      // è®¾å¤‡è¯¦æƒ…对象
      equipmentDetail: {}
      equipmentDetail: {},
      // è¿‡æ»¤å…³é”®å­—
      filterText: '',
      // è¿‡æ»¤åŽçš„仪器设备表
      filterdequipmentTable: '',
      oldtableData: '',
      // è¿‡æ»¤ä¸åŒçŠ¶æ€è®¾å¤‡
      conditionTable: '',
      nodeclicked: '',
      expireData: '',
      instrumentId: ''
    }
  },
  watch: {
@@ -844,19 +873,21 @@
    },
    // èŠ‚ç‚¹ç‚¹å‡»å¤„ç†
    nodeClickHandler(data, node, element) {
      console.log(data)
      this.nodeclicked = data
      // console.log(data)
      // åªæœ‰æ•°æ®ä¸­æºå¸¦id才能发送查询请求
      if (data.id) {
        this.getEquipmentTable({ classifyId: data.id, pageSize: this.pageSize, pageNo: this.currentPage })
        this.getEquipmentTable({ classifyId: data.id, pageSize: this.pageSize, pageNo: this.currentPage, whetherWhether: this.isOut })
      }
    },
    // èŽ·å–ä»ªå™¨åˆ—è¡¨æ•°æ®
    async getEquipmentTable(ages) {
      // console.log('条件对象', ages)
      const { data } = await getInstrumentList(ages)
      // console.log(data)
      console.log(data)
      this.equipmentTable = data.row
      this.total = data.total
      this.oldtableData = this.equipmentTable
    },
    // è¿‡æ»¤èŠ‚ç‚¹
    filterNode(value, data) {
@@ -997,6 +1028,93 @@
    handleUpload(file, fileList) {
      // console.log(file, fileList)
      this.measureForm.file = file
    },
    // æ ¹æ®è¾“入的设备编号,设备名称或者型号规格关键字进行过滤列表
    filterTableData() {
      this.oldtableData = this.equipmentTable
      const filterdequipmentTable = this.equipmentTable.filter(item => {
        return item.equipment_code.includes(this.searchData.keyword) || item.equipment_name.includes(this.searchData.keyword) || item.specifications_models.includes(this.searchData.keyword)
      })
      this.equipmentTable = filterdequipmentTable
    },
    resetBtn() {
      this.searchData.keyword = ''
      this.equipmentTable = this.oldtableData
    },
    getConditionTable() {
      // console.log(this.radioValue)
      let filteredTable = this.oldtableData.filter(item => {
        return item.conditions === this.radioValue
      })
      // å…ˆåˆ¤æ–­isOut
      if (this.isOut) {
        // å¦‚果现在勾选了已过期按钮,那就从当前过滤好的列表中筛选出过期列表
        if (this.expireData.length === 0) {
          this.equipmentTable = null
        } else {
          let expireItem
          for (expireItem of this.expireData) {
            filteredTable = filteredTable.filter(item => {
              return item.equipment_code === expireItem.equipment_code
            })
          }
          this.equipmentTable = filteredTable
        }
        if (!this.radioValue) {
          this.equipmentTable = this.expireData
        }
      } else {
        this.equipmentTable = filteredTable
        if (!this.radioValue) {
          this.equipmentTable = this.oldtableData
        }
      }
    },
    async getExpireTable() {
      // const filteredTable = this.oldtableData.filter(item => {
      //   return item.conditions === this.radioValue
      // })
      if (this.isOut) {
        // æ•获点击了已过期,请求过期数据并保存
        const { data } = await getInstrumentList({ classifyId: this.nodeclicked.id, pageSize: this.pageSize, pageNo: this.currentPage, whetherWhether: this.isOut })
        this.expireData = data.row
        if (this.expireData.length === 0) {
          this.equipmentTable = null
        } else {
          if (this.radioValue !== 0) {
            let expireItem
            for (expireItem of this.expireData) {
              this.equipmentTable = this.oldtableData.filter(item => {
                console.log(this.radioValue)
                console.log('item', item)
                console.log('expireItem', expireItem)
                return item.conditions === this.radioValue && item.equipment_code === expireItem.equipment_code
              })
              console.log(this.equipmentTable)
            }
          } else {
            this.equipmentTable = this.expireData
          }
        }
      } else {
        // æ•获取消了已过期,将过期数据清空,重新更新equipmentTable
        this.expireData = ''
        this.equipmentTable = this.oldtableData.filter(item => {
          return item.conditions === this.radioValue
        })
        if (this.radioValue === 0) {
          this.equipmentTable = this.oldtableData
        }
      }
    },
    clickDelete(row) {
      this.instrumentId = row.id
      this.deletedialogVisible = true
    },
    async deleteInstrument() {
      // console.log(row.id)
      await deleteInstrument({ instrumentId: this.instrumentId })
      this.deletedialogVisible = false
    }
  }
}