فهرست منبع

Merge branch 'master' of http://120.46.159.163:7400/ezhizao/ezhizao_dms_vue

ezhizao_zx 9 ماه پیش
والد
کامیت
cede4a7bc0

+ 61 - 0
src/api/business/dayworkItemExamine.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+const baseUrl = import.meta.env.VITE_APP_PRODUCTION_API
+
+// 查询分选包装审核申请列表
+export function listExamine(query) {
+  return request({
+    url:baseUrl+  '/business/examine/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function getDeptList(data) {
+  return request({
+    url:baseUrl+  '/business/examine/getDeptList',
+    method: 'post',
+    data: data
+  })
+}
+
+// 查询分选包装审核申请详细
+export function getExamine(id) {
+  return request({
+    url:baseUrl+  '/business/examine/' + id,
+    method: 'get'
+  })
+}
+// 通过箱号查询报工信息
+export function getDayworkItemByCarrierName(data) {
+  return request({
+    url:baseUrl+  '/business/examine/getDayworkItemByCarrierName',
+    method: 'post',
+    data: data
+  })
+}
+
+// 新增分选包装审核申请
+export function addExamine(data) {
+  return request({
+    url:baseUrl+  '/business/examine',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改分选包装审核申请
+export function updateExamine(data) {
+  return request({
+    url:baseUrl+  '/business/examine',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除分选包装审核申请
+export function delExamine(id) {
+  return request({
+    url:baseUrl+  '/business/examine/' + id,
+    method: 'delete'
+  })
+}

+ 1 - 1
src/views/business/dayworkMaxUpdate/form.vue

@@ -87,7 +87,7 @@
           </el-col>
         </el-row>
         <el-row :gutter="20">
-          <el-col :span="7">
+          <el-col :span="10">
          
             <el-form-item label="当前载具:" prop="carrierIds" label-width="82px">
               <el-select v-model="form.carrierIds" multiple

+ 1 - 1
src/views/business/dayworkMaxUpdate/sortForm.vue

@@ -78,7 +78,7 @@
                 controls-position="right" style="width: 220px" />
             </el-form-item>
           </el-col>
-          <el-col :span="7">
+          <el-col :span="10">
             <el-form-item label="载具:" prop="carrierIds" label-width="82px">
               <el-select v-model="form.carrierIds" multiple
             filterable remote reserve-keyword placeholder="请选择载具" value-key="value" style="width: 300px;"

+ 158 - 0
src/views/business/examine/DialogAddExamine.vue

@@ -0,0 +1,158 @@
+<template>
+  <el-dialog title="添加审核申请" v-model="visible" width="600px" height="400px"   @close="close" append-to-body draggable>
+    <el-form ref="dialogForm" class="master-container" :model="queryParams" style="align-items: center;" >
+      <div style="display: flex;">
+        <el-form-item label="箱号:" prop="carrierCode" label-width="60px" style="margin-top: 20px;">
+          <el-input
+            v-model.trim="queryParams.carrierCode"
+            type="text"
+            @keydown.enter.prevent
+            style="width: 180px"
+            placeholder="请输入箱号选择批次"
+            :clearable="true"
+            @keyup.enter="handleSearch"
+          />
+        </el-form-item>
+        <el-form-item label-width="20px" style="margin-top: 20px;">
+          <el-button type="info" icon="Search" @click="handleSearch">搜索</el-button>
+        </el-form-item>
+      </div>
+    </el-form>
+
+    <el-table v-if="lotList.length > 0"
+      ref="dialogTable"
+      :data="lotList"
+      :row-key="getRowKey"
+      size="small"
+      v-loading="loading"
+      border
+      height="370px"
+      header-row-class-name="list-header-row"
+      row-class-name="list-row"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="40" align="center" :reserve-selection="true" />
+      <el-table-column type="index" label="行号" width="50" align="center" />
+      <el-table-column label="批次号" align="center" prop="lotCode" />
+    </el-table>
+    <template #footer v-if="lotList.length > 0">
+      <div class="dialog-footer">
+        <el-button type="primary" icon="Check" :disabled="selections.length === 0" @click="handleMultipleSelected">确定</el-button>
+        <el-button icon="Close" @click="close">取 消</el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+<script setup>
+import { ref } from '@vue/reactivity'
+import { getDayworkItemByCarrierName } from '@/api/business/dayworkItemExamine'
+const { proxy } = getCurrentInstance()
+/** 工序变量 */
+const total = ref(0)
+const props = defineProps({
+  multipleSelected: {
+    type: Function,
+    default: null
+  }
+})
+
+const { multipleSelected } = toRefs(props)
+const lotList = ref([])
+const visible = ref(false)
+const loading = ref(false)
+const data = reactive({
+  queryParams: {
+  carrierCode:null
+  }
+})
+const selections = ref([])
+const { queryParams } = toRefs(data)
+
+/** 获取行 id */
+function getRowKey(row) {
+  return row.id
+}
+
+/**
+ * 对话框打开 事件
+ */
+function open() {
+  visible.value = true
+}
+
+/**
+ * 对话框关闭 事件
+ */
+function close() {
+  queryParams.value.carrierCode = null
+  lotList.value = []
+  visible.value = false
+}
+
+/**
+ * 加载数据
+ */
+function getList() {
+  loading.value = true
+  console.log(queryParams.value)
+  getDayworkItemByCarrierName(queryParams.value).then((res) => {
+    if(res.code == 200) {
+      if(res.data.length == 0){
+        proxy.$modal.msgError("该箱号未绑定任何批次或该批次已被审核");
+        lotList.value = []
+      }else{
+           lotList.value = res.data
+      }
+    }
+    loading.value = false
+  })
+  
+}
+
+/**
+ * 列表checkbox列选择 事件
+ */
+function handleSelectionChange(selection) {
+  selections.value = selection
+}
+
+
+/**  搜索 事件 */
+function handleSearch() {
+  getList()
+}
+/** 多选事件 */
+function handleMultipleSelected() {
+  //判断是否有一箱多批,另一个箱没选到的情况
+  let notSelctiionList = lotList.value.filter(item => !selections.value.includes(item))
+  console.log(notSelctiionList)
+  let selectionCarrierIds = selections.value.map(item => item.carrierId)
+  let notSelectionCarrierIds = notSelctiionList.map(item => item.carrierId)
+  //判断是否有一箱多批,另一个批次没选的情况
+  let commonCarrierIds = selectionCarrierIds.filter(id => notSelectionCarrierIds.includes(id));
+  if(commonCarrierIds.length > 0) {
+    console.log(commonCarrierIds)
+    let commonCarrierIdsList = notSelctiionList.filter(item =>{
+    return commonCarrierIds.includes(item.carrierId)
+    })
+    console.log(commonCarrierIdsList)
+    let lotCodes = commonCarrierIdsList.map(item => item.lotCode);
+// 使用 join 将数组元素通过逗号连接成一个字符串
+    let lotCodesString = lotCodes.join(',');
+   console.log(lotCodesString)
+    proxy.$modal.msgError("存在一箱多批:" + lotCodesString + "未选择");
+  }else{
+    //新增
+      if (multipleSelected.value) {
+        multipleSelected.value(selections.value)
+  }
+  close()
+  }
+
+}
+
+defineExpose({
+  open
+})
+</script>
+<style scoped></style>

+ 157 - 0
src/views/business/examine/DialogInspectionDetail.vue

@@ -0,0 +1,157 @@
+<template>
+  <el-dialog
+    title="详情"
+    v-model="visible"
+    width="1000px"
+    height="1500px"
+    @close="close"
+    append-to-body
+    draggable
+  >
+  <div class="form-container">
+      <div style="padding: 16px 16px 0 16px;">
+      <el-row :gutter="20">
+        <el-col :span="5">
+          <span  >工序:</span>
+          <span style="margin-left: 15px;" >{{ detail.processAlias}}</span>
+        </el-col>
+        <el-col :span="5">
+          <span  >检查状态:</span>
+          <span style="margin-left: 15px;">{{ detail.status == 0 ?'待确认':detail.status == 1?'合格':'不合格' }}</span>
+        </el-col>
+        <!-- <el-col :span="5">
+          <span>废品总数:</span>
+          <span style="margin-left: 15px;">{{detail.rejectNum}}</span>
+        </el-col> -->
+        <el-col :span="7">
+          <span >备注:</span>
+          <span style="margin-left: 15px;">{{detail.remark }}</span>
+        </el-col>
+      </el-row>
+      </div>
+      </div>
+      <div class="form-container">
+        <el-row :gutter="20" style="margin: 15px 0 0 6px; margin-bottom: 15px">
+          <el-col :span="5">
+            <span style="font-size: 15px; width: 120px; font-weight: bold"
+              >检测详情</span
+            >
+          </el-col>
+        </el-row>
+      </div>
+          <el-table
+            v-loading="loading"
+            :data="detail.processInspectionDetails"
+            size="small"
+            border
+            height="95%"
+          >
+            <el-table-column
+              label="检查标准"
+              align="center"
+              prop="checkStandard"
+            />
+            <el-table-column
+              label="检查结果"
+              align="center"
+              prop="checkResult"
+            />
+            <el-table-column
+              label="检测量"
+              align="center"
+              prop="examiningNum"
+              width="150"
+            />
+            <el-table-column
+              label="不良品量"
+              align="center"
+              prop="disqualificationNum"
+              width="150"
+            />
+          </el-table>
+      <div class="form-container">
+        <el-row :gutter="20" style="margin: 15px 0 0 6px; margin-bottom: 15px">
+          <el-col :span="5">
+            <span style="font-size: 15px; width: 120px; font-weight: bold"
+              >咨询详情</span
+            >
+          </el-col>
+        </el-row>
+      </div>
+          <el-table
+            v-loading="loading"
+            :data="detail.dayworkItemConsults"
+            size="small"
+            border
+            height="95%"
+          >
+          <el-table-column
+              label="咨询部门"
+              align="center"
+              prop="consultDepartment"
+              width="300"
+            >
+          <template #default="scope">
+            <template v-if="scope.row.consultDepartment == 0">技术</template>
+            <template v-if="scope.row.consultDepartment == 1">品管</template>
+          </template>
+          </el-table-column>
+            <el-table-column label="咨询内容" align="center" prop="content" />
+            <el-table-column
+              label="回复状态"
+              align="center"
+              prop="status"
+              width="300"
+            >
+          <template #default="scope">
+            <template v-if="scope.row.status == 0">未回复</template>
+            <template v-if="scope.row.status == 1">不合格</template>
+            <template v-if="scope.row.status == 2">合格</template>
+          </template>
+          </el-table-column>
+          </el-table>
+  </el-dialog>
+</template>
+<script setup>
+import { getDayworkItemInspectionDetail } from "@/api/business/processInspecion";
+const { proxy } = getCurrentInstance();
+const visible = ref(false);
+const loading = ref(false);
+const detail = ref({})
+const info = ref({})
+
+/**
+ * 对话框打开 事件
+ */
+function open(data) {
+  visible.value = true;
+  console.log(data)
+  info.value = data
+  getList(data);
+}
+/**
+ * 对话框关闭 事件
+ */
+function close() {
+  visible.value = false;
+}
+/**
+ * 加载数据
+ */
+function getList(data) {
+  loading.value = true;
+  getDayworkItemInspectionDetail({id:data.id,remark:data.remark,processAlias:data.processAlias,rejectNum:data.rejectNum,status:data.status}).then((res) => {
+    detail.value = res.data;
+    console.log(detail.value.processInspection ==null)
+    loading.value = false;
+  });
+}
+
+
+defineExpose({
+  open,
+});
+</script>
+<style scoped>
+
+</style>

+ 151 - 0
src/views/business/examine/DialogSortDetail.vue

@@ -0,0 +1,151 @@
+<template>
+  <el-dialog
+    title="详情"
+    v-model="visible"
+    width="1000px"
+    height="1500px"
+    @close="close"
+    append-to-body
+    draggable
+  >
+  <div class="form-container">
+      <div style="padding: 16px 16px 0 16px;">
+      <el-row :gutter="20">
+        <el-col :span="5">
+          <span  >工序:</span>
+          <span style="margin-left: 15px;" >{{ info.processAlias}}</span>
+        </el-col>
+        <el-col :span="5">
+          <span  >检查状态:</span>
+          <span style="margin-left: 15px;">{{ detail.processInspection?detail.processInspection.status == 0 ?'待确认':detail.processInspection.status == 1?'合格':'不合格':'未序检' }}</span>
+        </el-col>
+        <!-- <el-col :span="5">
+          <span>废品总数:</span>
+          <span style="margin-left: 15px;">{{ detail.processInspection?detail.processInspection.rejectNum:0}}</span>
+        </el-col> -->
+        <el-col :span="7">
+          <span >备注:</span>
+          <span style="margin-left: 15px;">{{detail.processInspection?detail.processInspection.remark:""  }}</span>
+        </el-col>
+      </el-row>
+      </div>
+      </div>
+      <div class="form-container">
+        <el-row :gutter="20" style="margin: 15px 0 0 6px; margin-bottom: 15px">
+          <el-col :span="5">
+            <span style="font-size: 15px; width: 120px; font-weight: bold"
+              >检测详情</span
+            >
+          </el-col>
+        </el-row>
+      </div>
+          <el-table
+            v-loading="loading"
+            :data="detail.groupRejectList"
+            size="small"
+            border
+            height="95%"
+          >
+            <el-table-column
+              label="检查标准"
+              align="center"
+              prop="checkStandard"
+            />
+            <el-table-column
+              label="检查结果"
+              align="center"
+              prop="reason"
+            />
+            <el-table-column
+              label="废品数量"
+              align="center"
+              prop="rejectNum"
+              width="150"
+            />
+          </el-table>
+      <div class="form-container">
+        <el-row :gutter="20" style="margin: 15px 0 0 6px; margin-bottom: 15px">
+          <el-col :span="5">
+            <span style="font-size: 15px; width: 120px; font-weight: bold"
+              >咨询详情</span
+            >
+          </el-col>
+        </el-row>
+      </div>
+          <el-table
+            v-loading="loading"
+            :data="detail.consultList"
+            size="small"
+            border
+            height="95%"
+          >
+          <el-table-column
+              label="咨询部门"
+              align="center"
+              prop="consultDepartment"
+              width="300"
+            >
+          <template #default="scope">
+            <template v-if="scope.row.consultDepartment == 0">技术</template>
+            <template v-if="scope.row.consultDepartment == 1">品管</template>
+          </template>
+          </el-table-column>
+            <el-table-column label="咨询内容" align="center" prop="content" />
+            <el-table-column
+              label="回复状态"
+              align="center"
+              prop="status"
+              width="300"
+            >
+          <template #default="scope">
+            <template v-if="scope.row.status == 0">未回复</template>
+            <template v-if="scope.row.status == 1">不合格</template>
+            <template v-if="scope.row.status == 2">合格</template>
+          </template>
+          </el-table-column>
+          </el-table>
+  </el-dialog>
+</template>
+<script setup>
+import { getDayworkItemDetail } from "@/api/business/daywork";
+const { proxy } = getCurrentInstance();
+const visible = ref(false);
+const loading = ref(false);
+const detail = ref({})
+const info = ref({})
+
+/**
+ * 对话框打开 事件
+ */
+function open(data) {
+  visible.value = true;
+  console.log(data)
+  info.value = data
+  getList(data);
+}
+/**
+ * 对话框关闭 事件
+ */
+function close() {
+  visible.value = false;
+}
+/**
+ * 加载数据
+ */
+function getList(data) {
+  loading.value = true;
+  getDayworkItemDetail({id:data.id}).then((res) => {
+    detail.value = res.data;
+    console.log(detail.value.processInspection ==null)
+    loading.value = false;
+  });
+}
+
+
+defineExpose({
+  open,
+});
+</script>
+<style scoped>
+
+</style>

+ 316 - 0
src/views/business/examine/form.vue

@@ -0,0 +1,316 @@
+<template>
+  <el-drawer
+    title="审核详情"
+    :with-header="false"
+    v-model="visible"
+    direction="rtl"
+    size="100%"
+  >
+    <div class="form-container column-container">
+      <div class="form-btns-container">
+        <span class="title-label">
+          <el-icon><Document /></el-icon>
+          <span>序检详情</span>
+        </span>
+        <el-button type="success" @click="handleUpdateStatus(2)"> 通过 </el-button>
+        <el-button v-if="!detail.isNextProcess" type="danger" style="margin-left: 40px" @click="handleUpdateStatus(1)">
+          不通过
+        </el-button>
+
+        <div class="close-btn" @click="cancel">
+          <i class="fa fa-times" aria-hidden="true" />
+          <!-- <span>关闭</span> -->
+        </div>
+      </div>
+      <div class="form-container">
+        <div style="padding: 16px 16px 0 16px">
+          <el-row :gutter="20" style="margin-top: 15px; padding-bottom: 10px">
+            <el-col :span="5">
+              <span class="leftInfo">批次号</span>
+              <span class="rightInfo">{{ examineDetail.lotCode }}</span>
+            </el-col>
+            <el-col :span="9">
+              <span class="middleInfo">产品描述</span>
+              <span class="rightInfo">{{
+                examineDetail.productDescription
+              }}</span>
+            </el-col>
+            <el-col :span="6">
+              <span class="middleInfo">图号</span>
+              <span class="rightInfo">{{ examineDetail.drawingNumber }}</span>
+            </el-col>
+            <el-col :span="4">
+              <span class="middleInfo">工艺版本</span>
+              <span class="rightInfo">{{
+                examineDetail.technologyVersion
+              }}</span>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20" style="margin-top: 15px; padding-bottom: 10px">
+            <el-col :span="5">
+              <span class="leftInfo">当前工序</span>
+              <span class="rightInfo">{{ examineDetail.processAlias }}</span>
+            </el-col>
+            <el-col :span="9">
+              <span class="middleInfo">提交时间</span>
+              <span class="rightInfo">{{ examineDetail.createTime }}</span>
+            </el-col>
+            <el-col :span="6">
+              <span class="middleInfo">审核人员</span>
+              <span class="rightInfo">{{ examineDetail.reviewerName }}</span>
+            </el-col>
+            <el-col :span="4">
+              <span class="middleInfo">审核时间</span>
+              <span class="rightInfo">{{ examineDetail.updateTime }}</span>
+            </el-col>
+          </el-row>
+          <el-row
+            :gutter="20"
+            style="
+              margin-top: 15px;
+              padding-bottom: 10px;
+              border-bottom: 1px solid #999;
+            "
+          >
+            <el-col :span="14">
+              <span class="leftInfo">审核意见</span>
+              <el-input
+                placeholder="请输入审核意见"
+                v-model.trim="examineDetail.reviewComments"
+                style="width: 800px"
+                class="rightInfo"
+              />
+            </el-col>
+            <el-col :span="10">
+              <span class="middleInfo">备注</span>
+              <el-input
+                placeholder="请输入备注"
+                v-model.trim="examineDetail.remark"
+                style="width: 600px"
+                class="rightInfo"
+              />
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="20" style="margin-top: 15px; margin-bottom: 15px">
+            <el-col :span="5">
+              <span style="font-size: 17px; width: 120px; font-weight: bold"
+                >分选</span
+              >
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+      <div class="el-table-container">
+        <div class="el-table-inner-container">
+          <el-table
+            v-loading="loading"
+            :data="examineDetail.dayworkItemList"
+            size="small"
+            border
+            height="95%"
+          >
+            <el-table-column
+              label="工序"
+              align="center"
+              prop="processAlias"
+              width="150px"
+            />
+            <el-table-column
+              label="合格量"
+              align="center"
+              prop="qualifiedNum"
+              width="150px"
+            />
+            <el-table-column
+              label="废品数量"
+              align="center"
+              prop="rejectNum"
+              width="150"
+            />
+            <el-table-column label="备注" align="center" prop="remark" />
+            <el-table-column label="操作" width="150px" align="center">
+              <template #default="scope">
+                <el-button
+                  link
+                  type="primary"
+                  @click="handleGetDetail(scope.row)"
+                  >详细信息</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="form-container">
+        <el-row :gutter="20" style="margin: 15px 0 0 6px; margin-bottom: 15px">
+          <el-col :span="5">
+            <span style="font-size: 17px; width: 120px; font-weight: bold"
+              >检查</span
+            >
+          </el-col>
+        </el-row>
+      </div>
+      <div class="el-table-container">
+        <div class="el-table-inner-container">
+          <el-table
+            v-loading="loading"
+            :data="examineDetail.processInspectionList"
+            size="small"
+            border
+            height="95%"
+          >
+            <el-table-column label="工序" align="center" prop="processAlias" width="150" />
+            <el-table-column label="类型" align="center" prop="type" width="150" >
+              <template #default="scope">
+                <span v-if="scope.row.type == 'deliveryInspection'">交检</span>
+                <span v-if="scope.row.type == 'firstArticleInspection'">首件检</span>
+                <span v-if="scope.row.type == 'patrolInspection'">巡检</span>
+                <span v-if="scope.row.type == 'outsourcedInspector'">外协检</span>
+                <span v-if="scope.row.type == 'factoryInspection'">出厂检</span>
+                <span v-if="scope.row.type == 'instrumentRoomInspection'">仪器室检</span>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="序检状态"
+              align="center"
+              prop="stauts"
+              width="150"
+            >
+            <template #default="scope">
+            <template v-if="scope.row.status == 0">待确认</template>
+            <template v-if="scope.row.status == 1">合格</template>
+            <template v-if="scope.row.status == 2">不合格</template>
+          </template>
+          </el-table-column>
+            <el-table-column
+              label="检测量"
+              align="center"
+              prop="examiningNum"
+              width="150"
+            />
+            <el-table-column
+              label="不良品量"
+              align="center"
+              prop="disqualificationNum"
+              width="150"
+            />
+            <el-table-column
+              label="备注"
+              align="center"
+              prop="remark"
+            />
+            <el-table-column label="操作" width="150px" align="center">
+              <template #default="scope">
+                <el-button
+                  link
+                  type="primary"
+                  @click="handleGetInspectionDetail(scope.row)"
+                  >详细信息</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
+    <!-- 分选详情信息 -->
+    <sort-detail-dialog ref="sortDetailDialogRef" />
+    <!--分选序检详情信息 -->
+    <inspection-detail-dialog ref="inspectionDetailDialogRef" />
+  </el-drawer>
+</template>
+
+<script setup>
+import { getExamine,updateExamine } from "@/api/business/dayworkItemExamine.js";
+import sortDetailDialog from "./DialogSortDetail.vue";
+import inspectionDetailDialog from "./DialogInspectionDetail.vue";
+const emit = defineEmits(["handleSaveSuccess"]);
+import { ref } from "vue";
+const { proxy } = getCurrentInstance();
+/** 表单抽屉 页变量 */
+const loading = ref(false);
+const examineDetail = ref({});
+const detail = ref({});
+const visible = ref(false);
+
+/****************************  方法区  ****************************/
+/** 打开抽屉 */
+const open = (row) => {
+  visible.value = true;
+  console.log(row);
+  detail.value = row;
+  getExamineDetail(row);
+};
+
+/** 取消按钮 */
+const cancel = () => {
+  visible.value = false;
+};
+//打开分选详情弹窗
+function handleGetDetail(row) {
+  proxy.$refs.sortDetailDialogRef.open(row);
+}
+//打开分选序检详情弹窗
+function handleGetInspectionDetail(row) {
+  proxy.$refs.inspectionDetailDialogRef.open(row);
+}
+//设置申请审核状态
+function handleUpdateStatus(data){
+  examineDetail.value.status = data;
+if(data == 1) {
+   proxy.$modal
+      .confirm("是否确定该申请审核不通过")
+      .then(function () {
+        if(examineDetail.value.reviewComments == null || examineDetail.value.reviewComments == "" ) {
+          proxy.$modal.msgError("审核不通过时,审核意见不能为空");
+          return
+        }else {
+          updateExamine(examineDetail.value)
+          emit("handleSaveSuccess");
+          cancel()
+        }
+      })
+}else {
+  proxy.$modal
+      .confirm("是否确定该申请审核通过")
+      .then(function () {
+        updateExamine(examineDetail.value)
+        emit("handleSaveSuccess");
+          cancel()
+      })
+}
+ 
+}
+
+function getExamineDetail(row) {
+  loading.value = true;
+  getExamine(row.id).then((res) => {
+    if (res.code == 200) {
+      examineDetail.value = res.data;
+      loading.value = false;
+    }
+  });
+}
+
+/** 暴露给父组件的方法 */
+defineExpose({
+  open,
+});
+</script>
+<style scoped>
+.leftInfo {
+  font-size: 16px;
+  width: 120px;
+  display: inline-block;
+}
+.middleInfo {
+  font-size: 16px;
+  width: 120px;
+  display: inline-block;
+}
+.rightInfo {
+  font-size: 16px;
+  padding-left: 20px;
+}
+</style>

+ 236 - 0
src/views/business/examine/index.vue

@@ -0,0 +1,236 @@
+<template>
+    <div class="page-container row-container">
+        <!-- 左侧区域 -->
+        <section class="list-part-container" style="flex: 3">
+            <!-- 搜索区 -->
+            <el-form class="list-search-container" :model="queryParams" ref="queryRef" :inline="true"
+                style="margin-right: 0px">
+                <el-form-item class="section-title" label="审核申请" />
+                <el-form-item label="生产计划单号:">
+                    <el-input placeholder="请输入生产计划单号/批次号" v-model.trim="queryParams.keywords" @keydown.enter.prevent clearable
+                        style="width: 200px" />
+                </el-form-item>
+                <el-form-item label="产品描述:">
+                    <el-input placeholder="请输入产品描述" v-model.trim="queryParams.productDescription" @keydown.enter.prevent clearable
+                        style="width: 120px" />
+                </el-form-item>
+                <el-form-item label="审核结果:">
+                    <el-select
+                    v-model="queryParams.status"
+                    clearable
+                    placeholder="请选择审核结果"
+                    style="width: 150px"
+                    >
+                    <el-option
+                        v-for="item in daywork_item_emamine"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                    ></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="审核人:">
+                    <el-input placeholder="请输入审核人名称" v-model.trim="queryParams.reviewerName" @keydown.enter.prevent clearable
+                        style="width: 140px" />
+                </el-form-item>
+                <el-form-item c label="审核工段:">
+                    <el-select-v2 v-model="queryParams.deptId" :options="deptList" placeholder="请选择审核工段"
+                        style="width: 120px" />
+                </el-form-item>
+                <el-form-item label="提交时间:">
+                    <el-date-picker v-model="queryParams.startTime" type="date" value-format="YYYY-MM-DD"
+                        :editable="false" clearable placeholder="请选择" style="width: 120px" />
+                    <span>~</span>
+                    <el-date-picker v-model="queryParams.endTime" type="date" value-format="YYYY-MM-DD"
+                        :editable="false" clearable placeholder="请选择" style="width: 120px" />
+                </el-form-item>
+                <el-form-item style="margin-left: 0">
+                    <el-button type="info" icon="Search" @click="handleQuery">搜索
+                    </el-button>
+                </el-form-item>
+                <el-form-item style="margin-left: 0">
+                    <el-button type="primary" icon="Plus" v-hasPermi="['business:examine:add']" @click="handleAdd">新增
+                    </el-button>
+                </el-form-item>
+                <el-form-item style="margin-left: 0">
+                    <el-button type="danger" icon="Delete" v-hasPermi="['business:examine:delete']" :disabled="multiple" @click="handleDeleted">批量删除
+                    </el-button>
+                </el-form-item>
+            </el-form>
+
+            <div class="el-table-container">
+                <div class="el-table-inner-container">
+                    <el-table ref="examineTable" :data="examineList" v-loading="examineLoading" row-key="id" @selection-change="handleSelectionChange"
+                        highlight-current-row height="100%">
+                        <el-table-column type="selection" width="40" align="center" :reserve-selection="true" />
+                        <el-table-column type="index" label="序号" width="50" align="center" />
+                        <el-table-column label="计划单号" prop="productionPlanNo" width="160" align="center" />
+                        <el-table-column label="批次号" prop="lotCode" width="160" align="center" />
+                        <el-table-column label="工段" prop="deptName" width="160" align="center" />
+                        <el-table-column label="产品描述" prop="productDescription" align="center" />
+                        <el-table-column label="审核状态" prop="status" width="60" align="center" >
+                            <template #default="scope">
+                               <span v-if="scope.row.status == 0" style="color: darkgoldenrod;">待确认</span>
+                               <span v-if="scope.row.status == 1" style="color: red;">不通过</span>
+                               <span v-if="scope.row.status == 2" style="color: green;">通过</span>
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="审核人" prop="reviewerName" width="160" align="center" />
+                        <el-table-column label="提交时间" prop="createTime" width="160" align="center" />
+                        <el-table-column label="审核时间" prop="updateTime" width="160" align="center" />
+                        <el-table-column label="备注" prop="remark" width="160" align="center" />
+                        <el-table-column label="操作" width="80px" align="center">
+                <template #default="scope">
+                  <el-button link type="primary" @click="handleView(scope.row)" >详细信息</el-button>
+                </template>
+              </el-table-column>
+                    </el-table>
+                </div>
+            </div>
+            <!-- 分页 -->
+            <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+                v-model:limit="queryParams.pageSize" @pagination="getDayworkItemExamine" />
+        </section>
+            <!-- 审核详情列表 -->
+    <examine-form ref="examineFormRef" @handleSaveSuccess="handleRefreshDetail" />
+    <!-- 新增审核申请 -->
+    <add-examine-dialog ref="addExamineDialogRef" :multiple-selected="handleMultipleSelectedAddLot" />
+    </div>
+</template>
+
+<script setup name="examine" >
+import {
+    listExamine,delExamine,addExamine
+} from "@/api/business/dayworkItemExamine.js";
+import { getDeptListByUserId } from "@/api/business/planDetailSubDetail.js";
+import examineForm from "./form.vue";
+import addExamineDialog from "./DialogAddExamine.vue";
+import { multiply } from "lodash-es";
+import { ref } from "vue";
+const { proxy } = getCurrentInstance();
+/** 字典数组区 */
+const { daywork_item_emamine } = proxy.useDict("daywork_item_emamine");
+
+
+/** 生产批次 */
+const examineTable = ref(null);
+const examineLoading = ref(false);
+const examineList = ref([]);
+const selections = []
+const multiple = ref(true);
+const isDispatch = ref(false)
+const total = ref(0);
+const ids = ref([])
+/**工段 */
+const deptList = ref([]);
+const loading = ref(false);
+
+
+const queryParams = ref({
+    keywords: null,
+    productDescription: null,
+    status: "0",
+    pageNum: 1,
+    pageSize: 10,
+    startTime: null,
+    endTime:null,
+});
+
+/***********************  工段相关事件  ****************************/
+function getDept() {
+    getNowDate();
+    loading.value = true;
+    getDeptListByUserId().then((response) => {
+        deptList.value = response.data.rows;
+        isDispatch.value = response.data.others.isDispatch;
+        loading.value = false;
+        if (isDispatch.value) {
+            deptList.value.unshift({ label: "全部", value: "0" });
+        } 
+        queryParams.value.deptId = deptList.value[0].value;
+        getDayworkItemExamine();
+    });
+}
+function getNowDate() {
+    queryParams.value.startTime = proxy.moment().clone().subtract(7, 'days').format("YYYY-MM-DD");
+    queryParams.value.endTime = proxy.moment().format("YYYY-MM-DD")
+}
+//新增审核申请
+function handleAdd() {
+    proxy.$refs.addExamineDialogRef.open();
+}
+function handleSelectionChange(selection) {
+    selections.value = selection
+    ids.value = selection.map((item) => item.id);
+    multiple.value = !selections.value.length;
+    console.log(multiple.value)
+}
+//批量删除
+function handleDeleted() {
+  proxy.$modal
+    .confirm("是否确认删除选中的数据项?")
+    .then(function () {
+        let flag = true
+     //判断如果选中项有已经进行到分选包装的不能删除
+     for(let i = 0;i<selections.value.length;i++) {
+        if(selections.value[i].isNextProcess){
+            flag = false
+            proxy.$modal.msgError(selections.value[i].lotCode +"已经进行到分选包装的不能删除");
+            return
+        }
+     }
+     if(flag) {
+        delExamine(ids.value).then(res =>{
+            proxy.$modal.msgSuccess("删除成功");
+            getDayworkItemExamine();
+        })
+     }
+    })
+}
+// 打开审核详情列表
+function handleView(row) {
+    proxy.$refs.examineFormRef.open(row);
+}
+function handleRefreshDetail() {
+    getDayworkItemExamine();
+}
+/** 申请列表 */
+function getDayworkItemExamine() {
+    selections.value = []
+    if (queryParams.value.startTime != null) {
+        queryParams.value.startTime = proxy.moment(queryParams.value.startTime).format('YYYY-MM-DD 00:00:00')
+    }
+    if (queryParams.value.endTime != null) {
+        queryParams.value.endTime = proxy.moment(queryParams.value.endTime).format('YYYY-MM-DD 23:59:59')
+    }
+    examineLoading.value = true;
+    listExamine(queryParams.value).then((res) => {
+        examineList.value = res.rows;
+        total.value = res.total;
+        examineLoading.value = false;
+    });
+}
+/** 搜索按钮操作 */
+function handleQuery() {
+    getDayworkItemExamine();
+}
+//多选带回
+function handleMultipleSelectedAddLot(selection) {
+    addExamine(selection).then(res =>{
+        if(res.code == 200) {
+            proxy.$modal.msgSuccess("添加成功");
+             getDayworkItemExamine();   
+        }
+    })
+    
+}
+
+onMounted(() => {
+    getDept();
+});
+</script>
+<style scoped>
+.el-form--inline .el-form-item {
+    margin-right: 20px;
+}
+</style>

+ 16 - 5
src/views/business/processInspection/form.vue

@@ -43,10 +43,10 @@
           <span class="rightInfo">{{ processInspectionDetail.technologyVersion }}</span>
         </el-col>
       </el-row>
-      <el-row :gutter="20" style="margin-top: 15px; padding-bottom: 10px;border-bottom: 1px solid #999;">
+      <el-row :gutter="20" style="margin-top: 15px; padding-bottom: 10px;">
         <el-col :span="5" >
           <span class="leftInfo">检测人员</span>
-          <span class="rightInfo" >{{ processInspectionDetail.nickName }}</span>
+          <span class="rightInfo" >{{ detail.technicianName }}</span>
         
         </el-col>
         <el-col :span="9">
@@ -62,6 +62,17 @@
           <span class="rightInfo">{{ processInspectionDetail.status ==0?'待确认':processInspectionDetail.status == 1?'合格':'不合格' }}</span>
         </el-col>
       </el-row>
+      <el-row :gutter="20" style="margin-top: 15px; padding-bottom: 10px;border-bottom: 1px solid #999;">
+        <el-col :span="5" >
+          <span class="leftInfo">操作者</span>
+          <span class="rightInfo" >{{ processInspectionDetail.nickName }}</span>
+        
+        </el-col>
+        <el-col :span="9">
+          <span class="middleInfo">检测设备</span>
+          <span class="rightInfo">{{ processInspectionDetail.equipmentDetailCode }}</span>
+        </el-col>
+      </el-row>
       <el-row :gutter="20" style="margin-top: 15px;margin-bottom: 15px; ">
         <el-col :span="5">
           <span style=" font-size: 17px; width: 120px;font-weight: bold;">不合格信息</span>
@@ -73,7 +84,7 @@
         <div class="el-table-inner-container">
           <el-table
             v-loading="loading"
-            :data="processInspectionDetail.rejectList"
+            :data="processInspectionDetail.processInspectionDetails"
             size="small"
             border
             height=95%
@@ -94,12 +105,12 @@
               align="center"
               prop="checkResult"
             />
-            <el-table-column
+            <!-- <el-table-column
               label="废品数量"
               align="center"
               prop="rejectNum"
               width="96"
-            />
+            /> -->
           </el-table>
         </div>
       </div>

+ 11 - 9
src/views/business/processInspection/index.vue

@@ -42,21 +42,23 @@
                 <div class="el-table-inner-container">
                     <el-table ref="processInspectionTable" :data="inspectionList" v-loading="inspectionLoading" 
                         highlight-current-row height="100%">
-                        <el-table-column label="批次号" prop="lotCode" width="160" align="center" />
+                        <el-table-column label="批次号" prop="lotCode" width="120" align="center" />
                         <el-table-column label="产品描述" prop="productDescription" align="center" width="220"/>
-                        <el-table-column label="图号" prop="drawingNumber" align="center" />
-                        <el-table-column label="工艺版本" prop="technologyVersion" align="center"  />
-                        <el-table-column label="检测人员" prop="nickName" align="center"  />
-                        <el-table-column label="检测工段" prop="deptName" width="160" align="center" />
-                        <el-table-column label="检测工序" prop="processAlias" width="160" align="center" />
+                        <el-table-column label="图号" prop="drawingNumber" align="center" width="120" />
+                        <el-table-column label="工艺版本" prop="technologyVersion" align="center" width="80"  />
+                        <el-table-column label="操作者" prop="nickName" align="center" width="80"  />
+                        <el-table-column label="检测设备" prop="equipmentDetailCode" align="center" width="120" />
+                        <el-table-column label="检测人员" prop="technicianName" align="center" width="100"  />
+                        <el-table-column label="检测工段" prop="deptName" width="100" align="center" />
+                        <el-table-column label="检测工序" prop="processAlias" width="120" align="center" />
                         <el-table-column label="检测日期" prop="createTime" width="160" align="center" />
-                        <el-table-column label="备注" prop="remark" width="160" align="center" />
-                        <el-table-column label="检测状态" align="center" prop="status">
+                        <el-table-column label="备注" prop="remark"  align="center" />
+                        <el-table-column label="检测状态" align="center" prop="status" width="80">
 							<template #default="scope">
 								<dict-tag :options="process_inspection_status" :value="scope.row.status" />
 							</template>
 						</el-table-column>
-                        <el-table-column label="操作" width="200" fixed="right" align="center">
+                        <el-table-column label="操作" width="100" fixed="right" align="center">
                             <template #default="scope">
                             <el-button link type="primary" icon="View"
                                 @click="handleView(scope.row)">查看</el-button>