Jelajahi Sumber

1、首页改版(增加合格率)2、增加质检操作页面(未完成)

zhaoyaxiong 1 tahun lalu
induk
melakukan
3a356552a8

+ 8 - 1
ZRAdmin-vue-main/src/api/business/qainspectrecord.js

@@ -19,7 +19,14 @@ export function reportQaInspectRecord(query) {
     params: query,
   })
 }
-
+//获取合格率
+export function GetPercentOfPass(query) {
+  return request({
+    url: 'business/QaInspectRecord/PercentOfPass',
+    method: 'get',
+    params: query,
+  })
+}
 /**
 * 新增质检管理/质检记录表
 * @param data

+ 9 - 0
ZRAdmin-vue-main/src/api/business/sapdeliverrecord.js

@@ -12,6 +12,15 @@ export function listSapDeliverRecord(query) {
   })
 }
 
+// 获取未质检的交验单号
+export function listSapDeliverNoCheck(query) {
+  return request({
+    url: 'business/SapDeliverRecord/QuerySapDeliverData',
+    method: 'post',
+    data: query,
+  })
+}
+
 
 /**
 * 新增接口管理/SAP交验单记录表

+ 13 - 6
ZRAdmin-vue-main/src/views/Business/OutAssembleRecord/index.vue

@@ -204,7 +204,7 @@
           <el-col :lg="12">
             <el-form-item label="物料类型" prop="category">
               <el-radio-group v-model="form.category">
-                <el-radio-button v-for="item in options.materialTypeOptions" :key="item.dictValue"
+                <el-radio-button v-for=" item  in  options.materialTypeOptions " :key="item.dictValue"
                   :label="item.dictValue">{{
                     item.dictLabel }}</el-radio-button>
               </el-radio-group>
@@ -214,8 +214,9 @@
           <el-col :lg="12">
             <el-form-item label="关键件标识" prop="keyFlag">
               <el-radio-group v-model="form.keyFlag">
-                <el-radio-button v-for="item in options.keyFlagOptions" :key="item.dictValue" :label="item.dictValue">{{
-                  item.dictLabel }}</el-radio-button>
+                <el-radio-button v-for=" item  in  options.keyFlagOptions " :key="item.dictValue"
+                  :label="item.dictValue">{{
+                    item.dictLabel }}</el-radio-button>
               </el-radio-group>
             </el-form-item>
           </el-col>
@@ -235,7 +236,7 @@
           <el-col :lg="12">
             <el-form-item label="装配结果" prop="result">
               <el-radio-group v-model="form.result">
-                <el-radio-button v-for="item in options.operationResultOptions" :key=item.dictValue
+                <el-radio-button v-for=" item  in  options.operationResultOptions " :key=item.dictValue
                   :label="item.dictValue">{{
                     item.dictLabel }}</el-radio-button>
               </el-radio-group>
@@ -344,6 +345,14 @@ const dataList = ref([])
 const queryRef = ref()
 const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)])
 
+function getPictureUrl(picture) {
+  // let urlCreater = window.URL || window.webkitURL
+  const blob = new Blob([picture], { type: 'image/jpeg' })
+  const imageUrl = URL.createObjectURL(blob)
+  console.log(blob)
+  console.log(imageUrl)
+  return imageUrl
+}
 function getList() {
   loading.value = true
   listOutAssembleRecord(queryParams).then(res => {
@@ -393,8 +402,6 @@ function sortChange(column) {
   handleQuery()
 }
 
-/*************** form操作 ***************/
-const formRef = ref()
 const title = ref("")
 // 操作类型 1、add 2、edit 3、view
 const opertype = ref(0)

+ 571 - 0
ZRAdmin-vue-main/src/views/Business/QaInspect/index.vue

@@ -0,0 +1,571 @@
+<!--
+ * @Descripttion: (质检管理/质检记录表/qa_inspect_record)
+ * @version: (1.0)
+ * @Author: (admin)
+ * @Date: (2023-05-18)
+ * @LastEditors: (admin)
+ * @LastEditTime: (2023-05-18)
+-->
+<template>
+  <div>
+    <el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent
+      size="large">
+      <el-row>
+        <el-form-item label="交验单号" prop="deliverNo">
+          <el-select v-model="queryParamDeliverNo" placeholder="请选择" @change="handleQuery">
+            <el-option v-for="dict in sapDeliverNoCheck" :key="dict.deliverNo" :label="dict.deliverNo"
+              :value="dict.deliverNo">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="生产令号" prop="bomNo">
+          <el-input v-model="queryParams.bomNo" placeholder="请输入" class="z-el-input" clearable
+            @keyup.enter="handleQuery" />
+        </el-form-item>
+        <el-form-item label="BN / SN码" prop="bnSnCode">
+          <el-input v-model="queryParams.bnSnCode" placeholder="请输入" class="z-el-input" clearable
+            @keyup.enter="handleQuery" />
+        </el-form-item>
+      </el-row>
+      <el-row>
+        <el-form-item label="物料编码" prop="materialCode">
+          <el-input v-model="queryParams.materialCode" placeholder="请输入" class="z-el-input" clearable
+            @keyup.enter="handleQuery" />
+        </el-form-item>
+        <el-form-item label="物料名称" prop="materialName">
+          <el-input v-model="queryParams.materialName" placeholder="请输入" class="z-el-input" clearable
+            @keyup.enter="handleQuery" />
+        </el-form-item>
+        <el-form-item label="物料类型" prop="category">
+          <el-select v-model="queryParams.category" placeholder="请选择" clearable style="width:120px" @change="handleQuery">
+            <el-option v-for="dict in options.materialTypeOptions" :key="dict.dictValue" :label="dict.dictLabel"
+              :value="dict.dictValue">
+              <dict-tag :options="options.materialTypeOptions" :value="dict.dictValue" />
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="规格型号 / 图号" prop="materialSpec">
+          <el-input v-model="queryParams.materialSpec" placeholder="请输入" class="z-el-input" clearable
+            @keyup.enter="handleQuery" />
+        </el-form-item>
+      </el-row>
+      <el-row>
+        <el-form-item label="关键件标识" prop="keyFlag">
+          <el-select v-model="queryParams.keyFlag" placeholder="请选择" clearable style="width:120px" @change="handleQuery">
+            <el-option v-for="dict in options.keyFlagOptions" :key="dict.dictValue" :label="dict.dictLabel"
+              :value="dict.dictValue">
+              <dict-tag :options="options.keyFlagOptions" :value="dict.dictValue" />
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="质检结果" prop="checkResult">
+          <el-select v-model="queryParams.checkResult" placeholder="请选择" clearable style="width:120px"
+            @change="handleQuery">
+            <el-option v-for="dict in options.qaResultOptions" :key="dict.dictValue" :label="dict.dictLabel"
+              :value="dict.dictValue">
+              <dict-tag :options="options.qaResultOptions" :value="dict.dictValue" />
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="入库结果" prop="instoreResult">
+          <el-select v-model="queryParams.instoreResult" placeholder="请选择" clearable style="width:120px"
+            @change="handleQuery">
+            <el-option v-for="dict in options.operationResultOptions" :key="dict.dictValue" :label="dict.dictLabel"
+              :value="dict.dictValue">
+              <dict-tag :options="options.operationResultOptions" :value="dict.dictValue" />
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
+          <el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
+          <el-button icon="finished" type="primary">提交</el-button>
+        </el-form-item>
+      </el-row>
+    </el-form>
+    <!-- 工具区域 -->
+    <el-row :gutter="10" class="mb8">
+      <!-- <el-col :span="1.5">
+        <el-button type="primary" v-hasPermi="['business:qainspectrecord:add']" plain icon="plus" @click="handleAdd">
+          {{ $t('btn.add') }}
+        </el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button type="success" :disabled="single" v-hasPermi="['business:qainspectrecord:edit']" plain icon="edit"
+          @click="handleUpdate">
+          {{ $t('btn.edit') }}
+        </el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button type="danger" :disabled="multiple" v-hasPermi="['business:qainspectrecord:delete']" plain icon="delete"
+          @click="handleDelete">
+          {{ $t('btn.delete') }}
+        </el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button type="warning" plain icon="Download" @click="handleExport"
+          v-hasPermi="['business:qainspectrecord:export']">
+          {{ $t('btn.export') }}
+        </el-button>
+      </el-col> -->
+      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
+    </el-row>
+
+    <!-- 数据区域 -->
+    <el-table :data="dataList" v-loading="loading" ref="table" highlight-current-row @sort-change="sortChange"
+      @selection-change="handleSelectionChange">
+      <el-table-column type="index" label="序号" width="50" align="center" />
+      <el-table-column prop="id" label="ID" align="center" v-if="columns.showColumn('id')" />
+      <el-table-column prop="deliverNo" label="交验单号" align="center" :show-overflow-tooltip="true" width="150"
+        v-if="columns.showColumn('deliverNo')" />
+      <el-table-column prop="checkName" label="送检人员" align="center" :show-overflow-tooltip="true"
+        v-if="columns.showColumn('checkName')" />
+      <el-table-column prop="bomNo" label="生产令号" align="center" :show-overflow-tooltip="true"
+        v-if="columns.showColumn('bomNo')" />
+      <el-table-column prop="rowNo" label="行项目" align="center" v-if="columns.showColumn('rowNo')" />
+      <el-table-column prop="category" label="物料类型" align="center" :show-overflow-tooltip="true"
+        v-if="columns.showColumn('category')">
+        <template #default="scope">
+          <dict-tag :options="options.materialTypeOptions" :value="scope.row.category" />
+        </template>
+      </el-table-column>
+      <el-table-column prop="materialCode" label="物料编码" align="center" :show-overflow-tooltip="true" width="150"
+        v-if="columns.showColumn('materialCode')" />
+      <el-table-column prop="materialName" label="物料名称" align="center" :show-overflow-tooltip="true" width="120"
+        v-if="columns.showColumn('materialName')" />
+      <el-table-column prop="materialSpec" label="规格型号/图号" align="center" :show-overflow-tooltip="true" width="120"
+        v-if="columns.showColumn('materialSpec')" />
+      <el-table-column prop="keyFlag" label="关键件" align="center" v-if="columns.showColumn('keyFlag')">
+        <template #default="scope">
+          <el-icon v-if="scope.row.keyFlag" size="large" color="red">
+            <StarFilled />
+          </el-icon>
+          <el-icon v-else />
+        </template>
+      </el-table-column>
+      <el-table-column prop="bnSnCode" label="BN / SN码" align="center" :show-overflow-tooltip="true"
+        v-if="columns.showColumn('bnSnCode')" />
+      <el-table-column prop="qty" label="交验单数量" align="center" v-if="columns.showColumn('qty')" />
+      <el-table-column prop="spotCheckQty" label="抽检数量" align="center" v-if="columns.showColumn('spotCheckQty')" />
+      <el-table-column prop="checkQty" label="质检数量" align="center" v-if="columns.showColumn('checkQty')" />
+      <el-table-column prop="checkResult" label="质检结果" align="center" :show-overflow-tooltip="true"
+        v-if="columns.showColumn('checkResult')">
+        <template #default="scope">
+          <dict-tag :options="options.qaResultOptions" :value="scope.row.checkResult" />
+        </template>
+      </el-table-column>
+      <el-table-column prop="instoreQty" label="入库数量" align="center" v-if="columns.showColumn('instoreQty')" />
+      <el-table-column prop="instoreResult" label="入库结果" align="center" v-if="columns.showColumn('instoreResult')">
+        <template #default="scope">
+          <dict-tag :options="options.operationResultOptions" :value="scope.row.instoreResult" />
+        </template>
+      </el-table-column>
+      <el-table-column prop="createBy" label="创建人" align="center" v-if="columns.showColumn('createBy')" />
+      <el-table-column prop="createTime" label="创建时间" align="center" width="160"
+        v-if="columns.showColumn('createTime')" />
+      <el-table-column prop="updateBy" label="更新人" align="center" v-if="columns.showColumn('updateBy')" />
+      <el-table-column prop="updateTime" label="更新时间" align="center" width="160"
+        v-if="columns.showColumn('updateTime')" />
+      <el-table-column prop="remark" label="备注" align="center" :show-overflow-tooltip="true"
+        v-if="columns.showColumn('remark')" />
+      <el-table-column label="操作" align="center" width="160">
+        <template #default="scope">
+          <el-button type="primary" plain icon="view" @click="CheckOperation(scope.row)">质检</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination class="mt10" background :total="total" v-model:page="queryParams.pageNum"
+      v-model:limit="queryParams.pageSize" @pagination="getList" />
+
+    <!-- 添加或修改质检管理/质检记录表对话框 -->
+    <el-dialog :title="title" :lock-scroll="false" v-model="open">
+      <el-row :gutter="10">
+        <el-col :span="12">
+          <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
+            <el-col :span="dialogColumnWidth">
+              <el-text class="dialog-table-row-head">交验单号</el-text>
+            </el-col>
+            <el-col :span="dialogColumnCellWidth">
+              <el-text>{{ form.deliverNo }}</el-text>
+            </el-col>
+          </el-row>
+          <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
+            <el-col :span="dialogColumnWidth">
+              <el-text class="dialog-table-row-head">生产令号</el-text>
+            </el-col>
+            <el-col :span="dialogColumnCellWidth">
+              <el-text>{{ form.bomNo }}</el-text>
+            </el-col>
+          </el-row>
+          <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
+            <el-col :span="dialogColumnWidth">
+              <el-text class="dialog-table-row-head">物料类型</el-text>
+            </el-col>
+            <el-col :span="dialogColumnCellWidth">
+              <dict-tag :options="options.materialTypeOptions" :value="form.category" />
+            </el-col>
+          </el-row>
+          <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
+            <el-col :span="dialogColumnWidth">
+              <el-text class="dialog-table-row-head">物料名称</el-text>
+            </el-col>
+            <el-col :span="dialogColumnCellWidth">
+              <el-text>{{ form.materialName }}</el-text>
+            </el-col>
+          </el-row>
+          <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
+            <el-col :span="dialogColumnWidth">
+              <el-text class="dialog-table-row-head">规格型号 / 图号</el-text>
+            </el-col>
+            <el-col :span="dialogColumnCellWidth">
+              <el-text>{{ form.materialSpec }}</el-text>
+            </el-col>
+          </el-row>
+          <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
+            <el-col :span="dialogColumnWidth">
+              <el-text class="dialog-table-row-head">关键件</el-text>
+            </el-col>
+            <el-col :span="dialogColumnCellWidth">
+              <el-icon v-if="form.keyFlag == 1" size="large" color="red">
+                <StarFilled />
+              </el-icon>
+              <el-icon v-else />
+            </el-col>
+          </el-row>
+          <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
+            <el-col :span="dialogColumnWidth">
+              <el-text class="dialog-table-row-head">BN / SN码</el-text>
+            </el-col>
+            <el-col :span="dialogColumnCellWidth">
+              <el-text>{{ form.bnSnCode }}</el-text>
+            </el-col>
+          </el-row>
+          <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
+            <el-col :span="dialogColumnWidth">
+              <el-text class="dialog-table-row-head">交验单数量</el-text>
+            </el-col>
+            <el-col :span="dialogColumnCellWidth">
+              <el-text>{{ form.qty }}</el-text>
+            </el-col>
+          </el-row>
+          <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
+            <el-col :span="dialogColumnWidth">
+              <el-text class="dialog-table-row-head">质检数量</el-text>
+            </el-col>
+            <el-col :span="dialogColumnCellWidth">
+              <el-text>{{ form.checkQty }}</el-text>
+            </el-col>
+          </el-row>
+          <el-row :gutter="dialogRowGutter" class="dialog-table-row" align="middle">
+            <el-col :span="dialogColumnWidth">
+              <el-text class="dialog-table-row-head">质检结果</el-text>
+            </el-col>
+            <el-col :span="dialogColumnCellWidth">
+              <dict-tag :options="options.qaResultOptions" :value="form.checkResult" />
+            </el-col>
+          </el-row>
+        </el-col>
+        <el-col :span="12">
+          <el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
+            <el-form-item label="BN / SN码">
+
+            </el-form-item>
+            <el-form-item label="合格数量">
+
+            </el-form-item>
+            <el-form-item label="不合格数量">
+
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-row>
+      <template #footer v-if="opertype != 3">
+        <el-button text @click="cancel">{{ $t('btn.cancel') }}</el-button>
+        <el-button type="primary" @click="submitForm">{{ $t('btn.submit') }}</el-button>
+      </template>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script setup name="qainspectrecord">
+import {
+  listQaInspectRecord, addQaInspectRecord, delQaInspectRecord, updateQaInspectRecord, getQaInspectRecord,
+  exportQaInspectRecord
+} from '@/api/business/qainspectrecord.js'
+
+import {
+  listSapDeliverRecord, getSapDeliverRecord
+} from '@/api/business/sapdeliverrecord.js'
+
+import { listSapDeliverNoCheck } from '@/api/business/sapdeliverrecord.js'
+import { reactive } from 'vue';
+
+const { proxy } = getCurrentInstance()
+
+const dialogColumnWidth = 7
+const dialogColumnCellWidth = 17
+const dialogRowGutter = 10
+// 选中inspectId数组数组
+const ids = ref([])
+const single = ref(true)
+const multiple = ref(true)
+const loading = ref(false)
+const showSearch = ref(true)
+const queryParams = reactive({
+  pageNum: 1,
+  pageSize: 10,
+  sort: '',
+  sortType: 'asc',
+})
+const queryParamDeliverNo = ref()
+
+const columns = ref([
+  { visible: false, prop: 'id', label: 'ID' },
+  { visible: true, prop: 'deliverNo', label: '交验单号' },
+  { visible: false, prop: 'checkName', label: '送检人员' },
+  { visible: true, prop: 'bomNo', label: '生产令号' },
+  { visible: false, prop: 'rowNo', label: '行项目' },
+  { visible: true, prop: 'category', label: '物料类型' },
+  { visible: false, prop: 'materialCode', label: '物料编码' },
+  { visible: true, prop: 'materialName', label: '物料名称' },
+  { visible: true, prop: 'materialSpec', label: '规格型号/图号' },
+  { visible: true, prop: 'keyFlag', label: '关键件标识' },
+  { visible: true, prop: 'bnSnCode', label: 'BN / SN码' },
+  { visible: true, prop: 'qty', label: '交验单数量' },
+  { visible: false, prop: 'spotCheckQty', label: '抽检数量' },
+  { visible: true, prop: 'checkQty', label: '质检数量' },
+  { visible: true, prop: 'checkResult', label: '质检结果' },
+  { visible: true, prop: 'instoreQty', label: '入库数量' },
+  { visible: true, prop: 'instoreResult', label: '入库结果' },
+  { visible: false, prop: 'createBy', label: '创建人' },
+  { visible: false, prop: 'createTime', label: '创建时间' },
+  { visible: false, prop: 'updateBy', label: '更新人' },
+  { visible: false, prop: 'updateTime', label: '更新时间' },
+  { visible: false, prop: 'remark', label: '备注' },
+])
+const total = ref(0)
+const dataList = ref([])
+const sapDeliverNoCheck = ref([])
+const queryRef = ref()
+const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)])
+
+function getList() {
+  loading.value = true
+  listSapDeliverRecord(queryParams).then(res => {
+    const { code, data } = res
+    if (code == 200) {
+      dataList.value = data.result
+      total.value = data.totalNum
+      loading.value = false
+    }
+  })
+}
+function getNoCheck() {
+  const para = reactive({ deliverNo: '', bomNo: '', })
+  listSapDeliverNoCheck(para).then(res => {
+    const { code, data } = res
+    if (code == 200) {
+      sapDeliverNoCheck.value = data
+      if (data.length > 0) {
+        queryParamDeliverNo.value = sapDeliverNoCheck.value[0].deliverNo
+        handleQuery()
+      }
+    }
+  })
+}
+getNoCheck()
+// 查询
+function handleQuery() {
+  queryParams.deliverNo = queryParamDeliverNo.value
+  queryParams.pageNum = 1
+  getList()
+}
+
+// 重置查询操作
+function resetQuery() {
+  proxy.resetForm("queryRef")
+  handleQuery()
+}
+
+// 多选框选中数据
+function handleSelectionChange(selection) {
+  ids.value = selection.map((item) => item.inspectId);
+  single.value = selection.length != 1
+  multiple.value = !selection.length;
+}
+
+// 自定义排序
+function sortChange(column) {
+  var sort = undefined
+  var sortType = undefined
+
+  if (column.prop != null && column.order != null) {
+    sort = column.prop
+    sortType = column.order
+
+  }
+  queryParams.sort = sort
+  queryParams.sortType = sortType
+  handleQuery()
+}
+
+/*************** form操作 ***************/
+const formRef = ref()
+const title = ref("")
+// 操作类型 1、add 2、质检 3、view
+const opertype = ref(0)
+const open = ref(false)
+const state = reactive({
+  form: {},
+  rules: {
+    inspectNo: [{ required: true, message: "质检记录单号不能为空", trigger: "blur" }],
+    deliverNo: [{ required: true, message: "交验单号不能为空", trigger: "blur" }],
+    bomNo: [{ required: true, message: "生产令号不能为空", trigger: "blur" }],
+    rowNo: [{ required: true, message: "交验单行项目不能为空", trigger: "blur", type: "number" }],
+    category: [{ required: true, message: "物料类型不能为空", trigger: "blur" }],
+    materialCode: [{ required: true, message: "物料编码不能为空", trigger: "blur" }],
+    materialName: [{ required: true, message: "物料名称不能为空", trigger: "blur" }],
+    materialSpec: [{ required: true, message: "规格型号/图号不能为空", trigger: "blur" }],
+    keyFlag: [{ required: true, message: "关键件标识不能为空", trigger: "blur" }],
+    bnSnCode: [{ required: true, message: "BN/SN码不能为空", trigger: "blur" }],
+    qty: [{ required: true, message: "交验单数量不能为空", trigger: "blur", type: "number" }],
+    checkQty: [{ required: true, message: "质检数量不能为空", trigger: "blur", type: "number" }],
+    result: [{ required: true, message: "质检结果不能为空", trigger: "blur" }],
+  },
+  options: {
+    keyFlagOptions: [], // 关键件标识字典
+    operationResultOptions: [],// 操作结果字典
+    materialTypeOptions: [],// 物料类型字典
+    qaResultOptions: []//质检结果字典
+  }
+})
+
+const { form, rules, options } = toRefs(state)
+var dictParams = [
+  { dictType: 'my_key_flag', columnName: 'keyFlagOptions' },
+  { dictType: 'my_operation_result', columnName: 'operationResultOptions' },
+  { dictType: 'my_material_type', columnName: 'materialTypeOptions' },
+  { dictType: 'my_qa_result', columnName: 'qaResultOptions' },
+]
+proxy.getDicts(dictParams).then((response) => {
+  response.data.forEach((element) => {
+    state.options[element.columnName] = element.list
+  })
+})
+
+
+// 关闭dialog
+function cancel() {
+  open.value = false
+  reset()
+}
+
+// 重置表单
+function reset() {
+  form.value = {
+    inspectId: undefined,
+    inspectNo: undefined,
+    deliverNo: undefined,
+    bomNo: undefined,
+    rowNo: undefined,
+    category: undefined,
+    materialCode: undefined,
+    materialName: undefined,
+    materialSpec: undefined,
+    keyFlag: undefined,
+    bnSnCode: undefined,
+    qty: undefined,
+    checkQty: undefined,
+    inspectedBy: undefined,
+    inspectTime: undefined,
+    result: undefined,
+    createBy: undefined,
+    createTime: undefined,
+    updateBy: undefined,
+    updateTime: undefined,
+    remark: undefined,
+  };
+  proxy.resetForm("formRef")
+}
+
+// 添加按钮操作
+function handleAdd() {
+  reset();
+  open.value = true
+  title.value = '添加'
+  opertype.value = 1
+}
+
+// 质检按钮操作
+function CheckOperation(row) {
+  console.log(row)
+  reset()
+  form.value = row
+  open.value = true
+  title.value = "物料质检"
+  opertype.value = 2
+}
+
+// 添加&修改 表单提交
+function submitForm() {
+  proxy.$refs["formRef"].validate((valid) => {
+    if (valid) {
+      if (form.value.inspectId != undefined && opertype.value === 2) {
+        updateQaInspectRecord(form.value).then((res) => {
+          proxy.$modal.msgSuccess("修改成功")
+          open.value = false
+          getList()
+        })
+          .catch(() => { })
+      } else {
+        addQaInspectRecord(form.value).then((res) => {
+          proxy.$modal.msgSuccess("新增成功")
+          open.value = false
+          getList()
+        })
+          .catch(() => { })
+      }
+    }
+  })
+}
+
+// 删除按钮操作
+function handleDelete(row) {
+  const Ids = row.inspectId || ids.value
+
+  proxy
+    .$confirm('是否确认删除参数编号为"' + Ids + '"的数据项?')
+    .then(function () {
+      return delQaInspectRecord(Ids)
+    })
+    .then(() => {
+      getList()
+      proxy.$modal.msgSuccess("删除成功")
+    })
+    .catch(() => { })
+}
+
+// 导出按钮操作
+function handleExport() {
+  proxy
+    .$confirm('是否确认导出当前质检记录?', '警告', {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: 'warning',
+    })
+    .then(async () => {
+      await exportQaInspectRecord(queryParams)
+    })
+}
+</script>
+
+<style lang="scss" scoped>
+.dialog-table-row {
+  margin-bottom: 20px;
+}
+
+.dialog-table-row-head {
+  float: right;
+}
+</style>

+ 5 - 5
ZRAdmin-vue-main/src/views/Business/SapDeliverRecord/index.vue

@@ -131,7 +131,7 @@
       </el-table-column>
       <el-table-column prop="qty" label="交验单数量" align="center" v-if="columns.showColumn('qty')" />
       <el-table-column prop="spotCheckQty" label="抽检数量" align="center" v-if="columns.showColumn('spotCheckQty')" />
-      <el-table-column prop="checkQty" label="合格数量" align="center" v-if="columns.showColumn('checkQty')" />
+      <el-table-column prop="checkQty" label="质检数量" align="center" v-if="columns.showColumn('checkQty')" />
       <el-table-column prop="checkResult" label="质检结果" align="center" :show-overflow-tooltip="true"
         v-if="columns.showColumn('checkResult')">
         <template #default="scope">
@@ -242,8 +242,8 @@
           </el-col>
 
           <el-col :lg="12">
-            <el-form-item label="质量合格数量" prop="checkQty">
-              <el-input v-model="form.checkQty" placeholder="请输入质量合格数量" />
+            <el-form-item label="质数量" prop="checkQty">
+              <el-input v-model="form.checkQty" placeholder="请输入质数量" />
             </el-form-item>
           </el-col>
 
@@ -372,8 +372,8 @@ const columns = ref([
   { visible: true, prop: 'keyFlag', label: '关键件标识' },
   { visible: true, prop: 'qty', label: '交验单数量' },
   { visible: true, prop: 'spotCheckQty', label: '抽检数量' },
-  { visible: true, prop: 'checkQty', label: '合格数量' },
-  { visible: true, prop: 'checkResult', label: '质检结果' },
+  { visible: true, prop: 'checkQty', label: '质检数量' },
+  { visible: false, prop: 'checkResult', label: '质检结果' },
   { visible: true, prop: 'instoreQty', label: '入库数量' },
   { visible: true, prop: 'instoreResult', label: '入库结果' },
   { visible: false, prop: 'createBy', label: '创建人' },

+ 2 - 2
ZRAdmin-vue-main/src/views/Business/StkBalanceDtl/index.vue

@@ -25,9 +25,9 @@
         </el-form-item>
         <el-form-item label="库存状态" prop="status">
           <el-select v-model="queryParams.status" placeholder="请选择" clearable style="width:160px" @change="handleQuery">
-            <el-option v-for="dict in stkStatusOptions" :key="dict.dictValue" :label="dict.dictLabel"
+            <el-option v-for="dict in options.stkStatusOptions" :key="dict.dictValue" :label="dict.dictLabel"
               :value="dict.dictValue">
-              <dict-tag :options="stkStatusOptions" :value="dict.dictValue" />
+              <dict-tag :options="options.stkStatusOptions" :value="dict.dictValue" />
             </el-option>
           </el-select>
         </el-form-item>

+ 107 - 0
ZRAdmin-vue-main/src/views/dashboard/PieChart_2Data.vue

@@ -0,0 +1,107 @@
+<template>
+  <div ref="chartRef" :class="className" :style="{ height: height, width: width }" />
+</template>
+
+<script setup>
+import * as echarts from 'echarts'
+import { inject } from 'vue'
+const { proxy } = getCurrentInstance()
+// const data = inject('groupByKey')
+let chart = null
+const props = defineProps({
+  className: {
+    type: String,
+    default: 'chart',
+  },
+  width: {
+    type: String,
+    default: '100%',
+  },
+  height: {
+    type: String,
+    default: '300px',
+  },
+  Label1: {
+    type: String,
+    default: 'Label1',
+  },
+  Label2: {
+    type: String,
+    default: 'Label2',
+  },
+  Data: {
+    type: Object,
+    required: true,
+  },
+  Title: {
+    type: String,
+    default: 'Title',
+  },
+})
+
+function initChart() {
+  chart = echarts.init(proxy.$refs.chartRef)
+
+  chart.setOption({
+    title: {
+      text: props.Title,
+      left: 'center'
+    },
+    tooltip: {
+      trigger: 'item',
+      formatter: '{a} <br/>{b} : {c} ({d}%)',
+    },
+    legend: {
+      left: 'center',
+      bottom: '2%',
+      // orient: 'vertical',
+      // data: [props.Label1, props.Label2],
+    },
+    series: [
+      {
+        name: props.Title,
+        type: 'pie',
+        radius: ['5%', '50%'],
+        itemStyle: {
+          borderRadius: 5,
+          borderColor: '#fff',
+          borderWidth: 1
+        },
+        label: {
+          formatter: '{b} : {c} ({d}%)'
+        },
+        data: [
+          { value: props.Data.d0, name: props.Label1 },
+          { value: props.Data.d1, name: props.Label2 },
+        ],
+        animationEasing: 'cubicInOut',
+        animationDuration: 2000,
+      },
+    ],
+  })
+}
+function setOptions(data) {
+  chart.setOption({
+    series: [
+      {
+        data: [
+          { value: data.d0, name: props.Label1 },
+          { value: data.d1, name: props.Label2 },
+        ],
+        animationEasing: 'cubicInOut',
+        animationDuration: 2000,
+      },
+    ],
+  })
+}
+onMounted(() => {
+  initChart()
+})
+window.onresize = function () {
+  chart.resize()
+}
+watch(props.Data, (newData, oldData) => {
+  setOptions(newData)
+}
+)
+</script>

+ 1 - 3
ZRAdmin-vue-main/src/views/dashboard/PieChart_category.vue

@@ -33,16 +33,14 @@ function initChart() {
     },
     legend: {
       left: 'center',
-      bottom: '5%',
+      bottom: '1%',
       data: ['外协件', '外购件'],
     },
     series: [
       {
         name: '物料类别占比',
         type: 'pie',
-        roseType: 'radius',
         radius: ['10%', '70%'],
-        center: ['50%', '38%'],
         itemStyle: {
           borderRadius: 7,
           borderColor: '#fff',

+ 1 - 1
ZRAdmin-vue-main/src/views/dashboard/PieChart_key.vue

@@ -47,7 +47,7 @@ function initChart() {
           borderWidth: 2
         },
         label: {
-          formatter: '{b} : {c}'
+          formatter: '{b} : {c} ({d}%)'
         },
         data: [
           { value: data.key, name: '关键件' },

+ 338 - 294
ZRAdmin-vue-main/src/views/index_v1.vue

@@ -1,199 +1,208 @@
 <template>
   <div class="dashboard-editor-container home">
-    <div
-      style="width:100%;position:absolute;background:url(public/titleBackground.png) no-repeat center;background-size: 1500px 80px;">
-      <el-row :gutter="10" justify="center"
-        style="width: 360px;margin-top: 10px;margin-bottom: 60px; left: 50%;margin-left: -180px; ">
-        <el-col :span="10">
-          <img style="height:60px;" :src="logoL" />
-        </el-col>
+    <el-card class="row-space">
+      <template #header>
+        <span>今日统计</span>
+      </template>
+      <el-row :gutter="20" justify="space-evenly" align="middle">
         <el-col :span="14">
-          <span style="font-weight: bold; font-size:30px;height: 60px; line-height: 70px;">监控指挥平台</span>
+          <el-row :gutter="5" class="row-space" justify="space-evenly">
+            <el-col :span="intStatColWidth0"></el-col>
+
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell">{{ strStatQATitle }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2"></el-col>
+
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell">{{ strStatInstoreTitle }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2"></el-col>
+
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell">{{ strStatOutstoreTitle }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2"></el-col>
+
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell">{{ strStatAssembleTitle }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2"></el-col>
+
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell">{{ strStatWorkTitle }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2"></el-col>
+          </el-row>
+          <el-row :gutter="5" class="row-space" justify="space-evenly">
+            <el-col :span="intStatColWidth0">
+              <span>今日</span>
+            </el-col>
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell statistic-row-data">{{ DailyStatistics.qa_key }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2">
+              <span class="than-yesterday" :class="ThanYesterday.qa < 100 ? 'green' : 'red'">
+                {{ ThanYesterday.qa > 100 ? ThanYesterday.qa - 100 : ThanYesterday.qa }}%
+                <el-icon v-if="ThanYesterday.qa < 100">
+                  <CaretBottom />
+                </el-icon>
+                <el-icon v-if="ThanYesterday.qa > 100">
+                  <CaretTop />
+                </el-icon>
+              </span></el-col>
+
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell statistic-row-data">{{ DailyStatistics.in_key }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2">
+              <span class="than-yesterday" :class="ThanYesterday.in < 100 ? 'green' : 'red'">
+                {{ ThanYesterday.in > 100 ? ThanYesterday.in - 100 : ThanYesterday.in }}%
+                <el-icon v-if="ThanYesterday.in < 100">
+                  <CaretBottom />
+                </el-icon>
+                <el-icon v-if="ThanYesterday.in > 100">
+                  <CaretTop />
+                </el-icon>
+              </span></el-col>
+
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell statistic-row-data">{{ DailyStatistics.out_key }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2">
+              <span class="than-yesterday" :class="ThanYesterday.out < 100 ? 'green' : 'red'">
+                {{ ThanYesterday.out > 100 ? ThanYesterday.out - 100 : ThanYesterday.out }}%
+                <el-icon v-if="ThanYesterday.out < 100">
+                  <CaretBottom />
+                </el-icon>
+                <el-icon v-if="ThanYesterday.out > 100">
+                  <CaretTop />
+                </el-icon>
+              </span></el-col>
+
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell statistic-row-data">{{ DailyStatistics.ass_key }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2">
+              <span class="than-yesterday" :class="ThanYesterday.ass < 100 ? 'green' : 'red'">
+                {{ ThanYesterday.ass > 100 ? ThanYesterday.ass - 100 : ThanYesterday.ass }}%
+                <el-icon v-if="ThanYesterday.ass < 100">
+                  <CaretBottom />
+                </el-icon>
+                <el-icon v-if="ThanYesterday.ass > 100">
+                  <CaretTop />
+                </el-icon>
+              </span></el-col>
+
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell statistic-row-data">{{ totalUnkey }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2">
+              <span class="than-yesterday " :class="ThanYesterday.totalUnkey < 100 ? 'green' : 'red'">
+                {{ ThanYesterday.totalUnkey > 100 ? ThanYesterday.totalUnkey - 100 : ThanYesterday.totalUnkey }}%
+                <el-icon v-if="ThanYesterday.totalUnkey < 100">
+                  <CaretBottom />
+                </el-icon>
+                <el-icon v-if="ThanYesterday.totalUnkey > 100">
+                  <CaretTop />
+                </el-icon>
+              </span></el-col>
+          </el-row>
+          <el-row :gutter="5" class="row-space" justify="space-evenly">
+            <el-col :span="intStatColWidth0">
+              <span class=" statistic-row-cell">昨日</span>
+            </el-col>
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell">{{ YesterdayStatistics.qa_key }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2"></el-col>
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell">{{ YesterdayStatistics.in_key }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2"></el-col>
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell">{{ YesterdayStatistics.out_key }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2"></el-col>
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell">{{ YesterdayStatistics.ass_key }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2"></el-col>
+            <el-col :span="intStatColWidth1">
+              <span class=" statistic-row-cell">{{ yesterdayTotalUnkey }}</span>
+            </el-col>
+            <el-col :span="intStatColWidth2"></el-col>
+          </el-row>
+        </el-col>
+        <el-col :span="8">
+          <bar-chart height="250px" />
         </el-col>
       </el-row>
-    </div>
-    <!-- 每日作业/统计信息/关键件占比 -->
-    <el-row :gutter="10" class="row-space" style="margin-top:55px">
-      <el-col :md="24" :lg="8" :xl="8">
-        <el-card shadow="hover" class="card">
-          <template #header>
-            <span>每日作业</span>
-          </template>
-          <bar-chart />
-        </el-card>
-      </el-col>
-      <el-col :md="24" :lg="8" :xl="8">
-        <el-row style="margin-top:80px;" justify="center">
-          <el-col :span="22">
-            <el-row class="row-space row-space-span" justify="center">
-              <el-col :span=intStatColWidth0>
-                <span class="statistics-span">{{ strStatQA }}</span>
-              </el-col>
-              <el-col :span=intStatColWidth1>
-                <div class="statistic-card">
-                  <el-statistic :value="DailyStatistics.qa_key">
-                    <template #suffix>
-                      <span class="than-yesterday-label">相比昨天</span>
-                      <span class="than-yesterday" :class="ThanYesterday.qa < 1 ? 'green' : 'red'">
-                        {{ ThanYesterday.qa > 100 ? ThanYesterday.qa - 100 : ThanYesterday.qa }}%
-                        <el-icon v-if="ThanYesterday.qa < 100">
-                          <CaretBottom />
-                        </el-icon>
-                        <el-icon v-if="ThanYesterday.qa > 100">
-                          <CaretTop />
-                        </el-icon>
-                      </span>
-                    </template>
-                  </el-statistic>
-                </div>
-              </el-col>
-            </el-row>
-            <el-row class="row-space row-space-span" justify="center">
-              <el-col :span=intStatColWidth0>
-                <span class="statistics-span">{{ strStatInstore }}</span>
-              </el-col>
-              <el-col :span=intStatColWidth1>
-                <div class="statistic-card">
-                  <el-statistic :value="DailyStatistics.in_key">
-                    <template #suffix>
-                      <span class="than-yesterday-label">相比昨天</span>
-                      <span class="than-yesterday" :class="ThanYesterday.qa < 1 ? 'green' : 'red'">
-                        {{ ThanYesterday.in > 100 ? ThanYesterday.in - 100 : ThanYesterday.in }}%
-                        <el-icon v-if="ThanYesterday.in < 100">
-                          <CaretBottom />
-                        </el-icon>
-                        <el-icon v-if="ThanYesterday.in > 100">
-                          <CaretTop />
-                        </el-icon>
-                      </span>
-                    </template>
-                  </el-statistic>
-                </div>
-              </el-col>
-            </el-row>
-            <el-row class="row-space row-space-span" justify="center">
-              <el-col :span=intStatColWidth0>
-                <span class="statistics-span">{{ strStatOutstore }}</span>
-              </el-col>
-              <el-col :span=intStatColWidth1>
-                <div class="statistic-card">
-                  <el-statistic :value="DailyStatistics.out_key">
-                    <template #suffix>
-                      <span class="than-yesterday-label">相比昨天</span>
-                      <span class="than-yesterday " :class="ThanYesterday.qa < 1 ? 'green' : 'red'">
-                        {{ ThanYesterday.out > 100 ? ThanYesterday.out - 100 : ThanYesterday.out }}%
-                        <el-icon v-if="ThanYesterday.out < 100">
-                          <CaretBottom />
-                        </el-icon>
-                        <el-icon v-if="ThanYesterday.out > 100">
-                          <CaretTop />
-                        </el-icon>
-                      </span>
-                    </template>
-                  </el-statistic>
-                </div>
-              </el-col>
-            </el-row>
-            <el-row class="row-space row-space-span" justify="center">
-              <el-col :span=intStatColWidth0>
-                <span class="statistics-span">{{ strStatAssemble }}</span>
-              </el-col>
-              <el-col :span=intStatColWidth1>
-                <div class="statistic-card">
-                  <el-statistic :value="DailyStatistics.ass_key">
-                    <template #suffix>
-                      <span class="than-yesterday-label">相比昨天</span>
-                      <span class="than-yesterday " :class="ThanYesterday.qa < 1 ? 'green' : 'red'">
-                        {{ ThanYesterday.ass > 100 ? ThanYesterday.ass - 100 : ThanYesterday.ass }}%
-                        <el-icon v-if="ThanYesterday.ass < 100">
-                          <CaretBottom />
-                        </el-icon>
-                        <el-icon v-if="ThanYesterday.ass > 100">
-                          <CaretTop />
-                        </el-icon>
-                      </span>
-                    </template>
-                  </el-statistic>
-                </div>
-              </el-col>
-            </el-row>
-            <el-row class="row-space row-space-span" justify="center">
-              <el-col :span=intStatColWidth0>
-                <span class="statistics-span">{{ strStatWork }}</span>
-              </el-col>
-              <el-col :span=intStatColWidth1>
-                <div class="statistic-card">
-                  <el-statistic :value="totalUnkey">
-                    <template #suffix>
-                      <span class="than-yesterday-label">相比昨天</span>
-                      <span class="than-yesterday " :class="ThanYesterday.qa < 1 ? 'green' : 'red'">
-                        {{ ThanYesterday.totalUnkey > 100 ? ThanYesterday.totalUnkey - 100 : ThanYesterday.totalUnkey }}%
-                        <el-icon v-if="ThanYesterday.totalUnkey < 100">
-                          <CaretBottom />
-                        </el-icon>
-                        <el-icon v-if="ThanYesterday.totalUnkey > 100">
-                          <CaretTop />
-                        </el-icon>
-                      </span>
-                    </template>
-                  </el-statistic>
-                </div>
-              </el-col>
-            </el-row>
-          </el-col>
-        </el-row>
-      </el-col>
-      <el-col :md="24" :lg="8" :xl="8">
-        <el-card shadow="hover" class="card">
-          <template #header>
-            <span>关键件占比</span>
-          </template>
-          <Pie-chart-key />
-        </el-card>
-
-      </el-col>
-    </el-row>
-    <!-- 物料类别占比/操作日志/时间段作业效率 -->
-    <el-row :gutter="10" class="row-space">
-      <el-col :md="24" :lg="8" :xl="8">
-        <el-card shadow="hover" class="card">
-          <template #header>
-            <span>物料类别占比</span>
+    </el-card>
+    <el-card class="row-space">
+      <template #header>
+        <span>合格率</span>
+        <el-radio-group class="card-button" v-model="statisticQaScope" :change="GetAllPercentOfPass()">
+          <el-radio-button label="当日"></el-radio-button>
+          <el-radio-button label="当月"></el-radio-button>
+          <el-radio-button label="当年"></el-radio-button>
+        </el-radio-group>
+      </template>
+      <el-row :gutter="10">
+        <el-col :span="8">
+          <Piechart2Data Title="外协关键件合格率" Label1="合格" Label2="不合格" :Data="POPData0" />
+        </el-col>
+        <el-col :span="8">
+          <Piechart2Data Title="外购关键件合格率" Label1="合格" Label2="不合格" :Data="POPData1" />
+        </el-col>
+        <el-col :span="8">
+          <Piechart2Data Title="所有来料合格率" Label1="合格" Label2="不合格" :Data="POPData2" />
+        </el-col>
+      </el-row>
+    </el-card>
+    <el-card class="row-space">
+      <template #header>
+        <span>物料类别</span>
+      </template>
+      <el-row :gutter="10">
+        <el-col :span="12">
+          <Piechart2Data Title="物料类别占比" Label1="外协件" Label2="外购件" :Data="groupByCategory" />
+        </el-col>
+        <el-col :span="12">
+          <Piechart2Data Title="关键件占比" Label1="关键件" Label2="非关键件" :Data="groupByKey" />
+        </el-col>
+      </el-row>
+    </el-card>
+    <el-card class="row-space" style="max-height: 400px;">
+      <template #header>
+        <span>日志</span>
+        <el-button text class="card-button-ico">
+          <router-link to="/system/log/operlog">
+            <el-icon>
+              <MoreFilled />
+            </el-icon>
+          </router-link>
+        </el-button>
+      </template>
+      <el-table v-loading="loading" border :data="list">
+        <el-table-column type="index" label="序号" align="center" />
+        <el-table-column label="用户" align="center" prop="operName" />
+        <el-table-column label="IP地址" align="center" prop="operIp" :show-overflow-tooltip="true" />
+        <el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
+        <el-table-column label="操作状态" align="center" prop="status">
+          <template #default="{ row }">
+            <dict-tag :options="statusOptions" :value="row.status"></dict-tag>
           </template>
-          <Pie-chart-category />
-        </el-card>
-      </el-col>
-      <el-col :md="24" :lg="8" :xl="8">
-        <el-card shadow="hover" class="card">
-          <template #header>
-            <span>系统操作日志</span>
-            <el-button text class="card-button">
-              <router-link to="/system/log/operlog">
-                <el-icon>
-                  <MoreFilled />
-                </el-icon>
-              </router-link>
-            </el-button>
+        </el-table-column>
+        <el-table-column label="操作日期" align="center" prop="operTime">
+          <template #default="scope">
+            <span>{{ scope.row.operTime }}</span>
           </template>
-          <el-table v-loading="loading" border :data="list">
-            <el-table-column type="index" label="序号" align="center" />
-            <el-table-column label="用户" align="center" prop="operName" />
-            <el-table-column label="IP地址" align="center" prop="operIp" :show-overflow-tooltip="true" />
-            <el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
-            <el-table-column label="操作状态" align="center" prop="status">
-              <template #default="{ row }">
-                <dict-tag :options="statusOptions" :value="row.status"></dict-tag>
-              </template>
-            </el-table-column>
-            <el-table-column label="操作日期" align="center" prop="operTime">
-              <template #default="scope">
-                <span>{{ scope.row.operTime }}</span>
-              </template>
-            </el-table-column>
-          </el-table>
-        </el-card>
+        </el-table-column>
+      </el-table>
+    </el-card>
 
-      </el-col>
+    <!-- <el-row :gutter="10" class="row-space">
       <el-col :md="24" :lg="8" :xl="8">
         <el-card shadow="hover" class="card">
           <template #header>
@@ -203,13 +212,14 @@
         </el-card>
 
       </el-col>
-    </el-row>
+    </el-row> -->
   </div>
 </template>
 
 <script setup name="index">
 import { provide, computed } from 'vue'
 import LineChart from './dashboard/LineChart'
+import Piechart2Data from './dashboard/PieChart_2Data'
 import PieChartKey from './dashboard/PieChart_key'
 import PieChartCategory from './dashboard/PieChart_category'
 import BarChart from './dashboard/BarChart'
@@ -228,91 +238,26 @@ import {
   GetAssCount, YGetAssCount,
   GetKeyProportion, GetCategoryProportion
 } from '@/api/business/index.js'
+import { GetPercentOfPass } from '@/api/business/qainspectrecord.js'
 
 const strStatQA = '关键件质检数统计:'
 const strStatInstore = '关键件入库数统计:'
 const strStatOutstore = '关键件出库数统计:'
 const strStatAssemble = '关键件装配数统计:'
 const strStatWork = '非关键件作业数统计:'
-const strStatQATitle = '关键件质检数统计'
-const strStatInstoreTitle = '关键件入库数统计'
-const strStatOutstoreTitle = '关键件出库数统计'
-const strStatAssembleTitle = '关键件装配数统计'
-const strStatWorkTitle = '非关键件作业数统计'
-
-const intStatColWidth0 = 8
-const intStatColWidth1 = 12
-const intStatColWidth2 = 10
-
-const data = {
-  newVisitis: {
-    expectedData: [100, 120, 161, 134, 105, 160, 165],
-    actualData: [120, 82, 91, 154, 162, 140, 145]
-  },
-  messages: {
-    expectedData: [200, 192, 120, 144, 160, 130, 140],
-    actualData: [180, 160, 151, 106, 145, 150, 130]
-  },
-  purchases: {
-    expectedData: [80, 100, 121, 104, 105, 90, 100],
-    actualData: [120, 90, 100, 138, 142, 130, 130]
-  },
-  shoppings: {
-    expectedData: [130, 140, 141, 142, 145, 150, 160],
-    actualData: [120, 82, 91, 154, 162, 140, 130]
-  },
-  wordCloud: [
-    {
-      name: 'Vue3',
-      value: 144
-    },
-    {
-      name: '.net6',
-      value: 928
-    },
-    {
-      name: 'Sqlsugar',
-      value: 906
-    },
-    {
-      name: 'Redis',
-      value: 825
-    },
-    {
-      name: '代码生成',
-      value: 514
-    },
-    {
-      name: '开源免费',
-      value: 486
-    },
-    {
-      name: '代码简单',
-      value: 53
-    },
-    {
-      name: '打赏',
-      value: 163
-    },
-    {
-      name: '国际化',
-      value: 163
-    },
-    {
-      name: 'Composition api',
-      value: 1163
-    },
-    {
-      name: 'Quartz.Net',
-      value: 190
-    },
-    {
-      name: 'Element UI',
-      value: 190
-    }
-  ]
-}
+
+const strStatQATitle = '关键件质检'
+const strStatInstoreTitle = '关键件入库'
+const strStatOutstoreTitle = '关键件出库'
+const strStatAssembleTitle = '关键件装配'
+const strStatWorkTitle = '非关键件作业'
+
+const intStatColWidth0 = 1
+const intStatColWidth1 = 3
+const intStatColWidth2 = 1
+
 const { proxy } = getCurrentInstance()
+
 // 每日作业数
 const DailyStatistics = reactive({
   qa: 0,
@@ -325,7 +270,7 @@ const DailyStatistics = reactive({
   ass_key: 0,
 })
 provide('DailyStatistics', DailyStatistics)
-//昨日作业数
+// 昨日作业数
 const YesterdayStatistics = reactive({
   qa: 0,
   qa_key: 0,
@@ -347,16 +292,21 @@ const ThanYesterday = reactive({
 const totalUnkey = computed(() => { return DailyStatistics.qa + DailyStatistics.in + DailyStatistics.out + DailyStatistics.ass })
 const yesterdayTotalUnkey = computed(() => { return YesterdayStatistics.qa + YesterdayStatistics.in + YesterdayStatistics.out + YesterdayStatistics.ass })
 
-//关键件占比
+const statisticQaScope = ref('当月')
+// 合格率 d0合格,d1不合格
+const POPData0 = reactive({ d0: 0, d1: 0 })
+const POPData1 = reactive({ d0: 0, d1: 0 })
+const POPData2 = reactive({ d0: 0, d1: 0 })
+// 关键件占比
 const groupByKey = reactive({
-  unkey: 0,
-  key: 0,
+  d0: 0,//关键件
+  d1: 0,//非关键件
 })
 provide('groupByKey', groupByKey)
 //物料类别占比
 const groupByCategory = reactive({
-  category0: 0,
-  category1: 0,
+  d0: 0,//外协件
+  d1: 0,//外购件
 })
 provide('groupByCategory', groupByCategory)
 
@@ -369,7 +319,12 @@ const queryParams = ref({
   status: undefined,
   operParam: undefined
 })
-
+const POPParams = ref({
+  category: undefined,
+  keyFlag: undefined,
+  beginTime: undefined,
+  endTime: undefined
+})
 // 遮罩层
 const loading = ref(true)
 // 操作日志数据
@@ -498,10 +453,10 @@ function getStatistics() {
       // console.log(response.data)
       for (var i = 0; i < response.data.length; i++) {
         if (response.data[i].keyFlag) {
-          groupByKey.key = response.data[i]["sumQty"]
+          groupByKey.d0 = response.data[i]["sumQty"]
         }
         else {
-          groupByKey.unkey = response.data[i]["sumQty"]
+          groupByKey.d1 = response.data[i]["sumQty"]
         }
       }
     }
@@ -511,23 +466,102 @@ function getStatistics() {
       // console.log(response.data)
       for (var i = 0; i < response.data.length; i++) {
         if (response.data[i].category == "外协件") {
-          groupByCategory.category0 = response.data[i]["sumQty"]
+          groupByCategory.d0 = response.data[i]["sumQty"]
         }
         else if (response.data[i].category == "外购件") {
-          groupByCategory.category1 = response.data[i]["sumQty"]
+          groupByCategory.d1 = response.data[i]["sumQty"]
         }
       }
     }
   })
+
+
 }
-getStatistics()
-let lineChartData = reactive([])
-const dataType = ref(null)
-function handleSetLineChartData(type) {
-  dataType.value = type
-  lineChartData = data[type]
+function GetAllPercentOfPass() {
+  const timeScope = reactive({
+    beginTime: undefined,
+    endTime: undefined
+  })
+  let date = new Date
+  var thisYear = date.getFullYear()
+  var thisMonth = date.getMonth() + 1
+  var today = date.getDay()
+
+  if (statisticQaScope.value == "当日") {
+    timeScope.beginTime = new Date(thisYear, thisMonth, today, 0, 0, 0)
+    timeScope.endTime = new Date(thisYear, thisMonth, today, 23, 59, 59)
+    // console.log('当日')
+    // console.log(timeScope)
+  }
+  if (statisticQaScope.value == "当月") {
+    var firstDay = new Date(thisYear, thisMonth, 1) // 取当年当月中的第一天
+    var lastDay = new Date(thisYear, thisMonth, new Date(firstDay.getTime() - 1000 * 60 * 60 * 24).getDate(), 23, 59, 59) // 获取当月最后一天日期
+    timeScope.beginTime = firstDay
+    timeScope.endTime = lastDay
+    // console.log('当月')
+    // console.log(timeScope)
+  }
+  if (statisticQaScope.value == "当年") {
+    timeScope.beginTime = new Date(thisYear, 1, 1, 0, 0, 0)
+    timeScope.endTime = new Date(thisYear, 12, 31, 23, 59, 59)
+    // console.log('当年')
+    // console.log(timeScope)
+  }
+  GetPercentOfPass({ category: '外协件', keyFlag: true, beginTime: timeScope.beginTime, endTime: timeScope.endTime }).then((response) => {
+    if (response.code == 200) {
+      // console.log(response.data)
+      for (var i = 0; i < response.data.length; i++) {
+        if (response.data[i].checkResult == "OK") {
+          POPData0.d0 = response.data[i]["qty"]
+        }
+        else if (response.data[i].checkResult == "NG") {
+          POPData0.d1 = response.data[i]["qty"]
+        }
+      }
+      if (response.data.length < 1) {
+        POPData0.d0 = 0
+        POPData0.d1 = 0
+      }
+    }
+  })
+  GetPercentOfPass({ category: '外购件', keyFlag: true, beginTime: timeScope.beginTime, endTime: timeScope.endTime }).then((response) => {
+    if (response.code == 200) {
+      // console.log(response.data)
+      for (var i = 0; i < response.data.length; i++) {
+        if (response.data[i].checkResult == "OK") {
+          POPData1.d0 = response.data[i]["qty"]
+        }
+        else if (response.data[i].checkResult == "NG") {
+          POPData1.d1 = response.data[i]["qty"]
+        }
+      }
+      if (response.data.length < 1) {
+        POPData1.d0 = 0
+        POPData1.d1 = 0
+      }
+    }
+  })
+  GetPercentOfPass({ keyFlag: true, beginTime: timeScope.beginTime, endTime: timeScope.endTime }).then((response) => {
+    if (response.code == 200) {
+      // console.log(response.data)
+      for (var i = 0; i < response.data.length; i++) {
+        if (response.data[i].checkResult == "OK") {
+          POPData2.d0 = response.data[i]["qty"]
+        }
+        else if (response.data[i].checkResult == "NG") {
+          POPData2.d1 = response.data[i]["qty"]
+        }
+      }
+      if (response.data.length < 1) {
+        POPData2.d0 = 0
+        POPData2.d1 = 0
+      }
+    }
+  })
 }
-handleSetLineChartData('newVisitis')
+getStatistics()
+GetAllPercentOfPass()
+
 // 系统状态字典
 const statusOptions = ref([])
 proxy.getDicts('sys_common_status').then((response) => {
@@ -554,17 +588,13 @@ getList()
   .statistics-span {
     display: flex;
     align-items: center;
-    justify-content: center;
+    justify-content: right;
     font-size: 16px;
     margin: 5px 0px;
   }
 
   .row-space {
-    margin-bottom: 10px;
-  }
-
-  .row-space-span {
-    line-height: 35px;
+    margin-bottom: 20px;
   }
 
   // .card{
@@ -671,6 +701,15 @@ getList()
   }
 }
 
+.statistic-row-cell {
+  float: right;
+}
+
+.statistic-row-data {
+  font-size: 30px;
+  font-weight: bold;
+}
+
 .el-statistic {
   --el-statistic-content-font-size: 32px;
 }
@@ -711,8 +750,8 @@ getList()
 }
 
 .than-yesterday {
-  font-size: 18px;
-  margin-left: 10px;
+  font-size: 15px;
+  line-height: 30px;
 }
 
 .than-yesterday-label {
@@ -732,9 +771,14 @@ getList()
   height: 400px;
 }
 
-.card-button {
+.card-button-ico {
   float: right;
   width: 25px;
   height: 25px;
 }
+
+.card-button {
+  margin-left: 10px;
+  float: right;
+}
 </style>