浏览代码

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dengfei

695593266@qq.com 8 月之前
父节点
当前提交
38a508ed66
共有 26 个文件被更改,包括 887 次插入181 次删除
  1. 9 0
      src/api/checklistrecord/index.js
  2. 18 0
      src/api/produce/workOrder.js
  3. 0 1
      src/components/bpmTask/bpmTask.vue
  4. 31 8
      src/components/selectDevices/index.vue
  5. 18 1
      src/components/selectMatterRules/select-matter-rules.vue
  6. 21 2
      src/components/selectReleaseRules/select-release-rules.vue
  7. 274 0
      src/views/batchRecord/components/EquipmentDialog.vue
  8. 144 26
      src/views/batchRecord/components/editModal.vue
  9. 24 24
      src/views/batchRecord/components/list.vue
  10. 1 0
      src/views/batchRecord/components/tables/batchRecordTable.vue
  11. 31 7
      src/views/batchRecord/components/tables/craftFilesTable.vue
  12. 1 0
      src/views/batchRecord/components/tables/deviceBatchRecordTable.vue
  13. 1 0
      src/views/batchRecord/components/tables/materialReturnTable.vue
  14. 1 1
      src/views/batchRecord/components/tables/materialTable.vue
  15. 1 0
      src/views/batchRecord/components/tables/qualityWorkOrderTable.vue
  16. 1 0
      src/views/batchRecord/components/tables/wmsOutInt.vue
  17. 1 0
      src/views/batchRecord/components/tables/workOrderTable.vue
  18. 1 0
      src/views/batchRecord/components/tables/workReportTable.vue
  19. 7 1
      src/views/batchRecord/index.vue
  20. 8 2
      src/views/checklistManagement/checklist.vue
  21. 1 1
      src/views/checklistManagement/components/checkAdd.vue
  22. 215 23
      src/views/checklistManagement/components/checkDetails.vue
  23. 39 59
      src/views/checklistManagement/components/selectWorkOrder.vue
  24. 11 1
      src/views/checklistManagement/components/templateAdd.vue
  25. 26 22
      src/views/produce/components/prenatalExamination/releaseRulesDialog.vue
  26. 2 2
      vue.config.js

+ 9 - 0
src/api/checklistrecord/index.js

@@ -48,3 +48,12 @@ export async function checklistrecordGetById(id) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// /mes/checklistrecord/kitCheck/{id}
+export async function checklistrecordKitCheck(id) {
+  const res = await request.get(`/mes/checklistrecord/kitCheck/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 18 - 0
src/api/produce/workOrder.js

@@ -376,3 +376,21 @@ export async function getAllProductInWorkOrder(body) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// /mes/workorder/craftFiles/batchRecordPage
+export async function batchRecordPage(data) {
+  const res = await request.post('/mes/workorder/craftFiles/batchRecordPage', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// mes/workorder/pageOrderByProduct 工单列表
+export async function pageOrderByProduct(data) {
+  const res = await request.post('/mes/workorder/pageOrderByProduct', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 0 - 1
src/components/bpmTask/bpmTask.vue

@@ -88,7 +88,6 @@
   import dictMixins from '@/mixins/dictMixins';
   // import { getTaskListByProcessInstanceId } from '@/api/bpm/task';
   // import { getActivityList } from '@/api/bpm/activity';
-  // import Vue from 'vue';
   import bpmSubmit from './bpmSubmit.vue';
 
   // 流程实例的详情页,可用于审批

+ 31 - 8
src/components/selectDevices/index.vue

@@ -68,6 +68,13 @@
   import { getAssetList } from '@/api/ruleManagement/plan';
   import { getTreeByPid, getTreeByGroup } from '@/api/classifyManage';
   export default {
+    props: {
+      // 多选
+      multiple: {
+        type: Boolean,
+        default: false
+      }
+    },
     data() {
       return {
         ruleIdListIndex: 0,
@@ -209,7 +216,7 @@
         if (this.rootId && this.categoryLevelId) {
           this.$refs.table.reload({ page: 1, where: where });
         } else {
-          this.$message.error('请选择设备');
+          this.$message.warning('请选择设备');
         }
       },
 
@@ -220,17 +227,33 @@
       },
       selected() {
         if (!this.selection.length) {
-          this.$message.error('请至少选择一条数据');
+          this.$message.warning('请选择设备');
           return;
         }
         const selectList = this.$refs.treeRef.getCheckedNodes();
         console.log('selectList-----------', selectList);
-        this.$emit(
-          'chooseEquipment',
-          this.selection,
-          this.ruleIdListIndex,
-          this.categoryId
-        );
+
+        if (this.multiple) {
+          this.$emit(
+            'chooseEquipment',
+            this.selection,
+            this.ruleIdListIndex,
+            this.categoryId
+          );
+        } else {
+          if (this.selection.length > 1) {
+            this.$message.warning('只能选择一个设备');
+            return;
+          }
+
+          this.$emit(
+            'chooseEquipment',
+            this.selection[0],
+            this.ruleIdListIndex,
+            this.categoryId
+          );
+        }
+
         this.handleClose();
       }
     }

+ 18 - 1
src/components/selectMatterRules/select-matter-rules.vue

@@ -52,6 +52,11 @@
         default: () => {
           return [];
         }
+      },
+      // 是否多选
+      multiple: {
+        type: Boolean,
+        default: false
       }
     },
     components: {
@@ -201,7 +206,19 @@
         });
       },
       confirmSelection() {
-        this.$emit('chooseRules', this.selection);
+        if (this.selection.length == 0) {
+          this.$message.warning('请选择事项规则!');
+          return;
+        }
+        if (this.multiple) {
+          this.$emit('chooseRules', this.selection);
+        } else {
+          if (this.selection.length > 1) {
+            this.$message.warning('只能选择一条事项规则');
+            return;
+          }
+          this.$emit('chooseRules', this.selection[0]);
+        }
         this.visible = false;
       }
     }

+ 21 - 2
src/components/selectReleaseRules/select-release-rules.vue

@@ -4,7 +4,7 @@
     :append-to-body="true"
     :close-on-click-modal="false"
     custom-class="ele-dialog-form"
-    title="选择记录事项"
+    title="选择记录规则"
     @update:visible="updateVisible"
     :maxable="true"
     width="90%"
@@ -36,6 +36,13 @@
   export default {
     components: { search },
     mixins: [tabMixins, dictMixins],
+    props: {
+      // 是否多选
+      multiple: {
+        type: Boolean,
+        default: false
+      }
+    },
     computed: {
       columns() {
         return [
@@ -210,7 +217,19 @@
         });
       },
       confirmSelection() {
-        this.$emit('chooseRules', this.selection);
+        if (this.selection.length == 0) {
+          this.$message.warning('请选择记录规则!');
+          return;
+        }
+        if (this.multiple) {
+          this.$emit('chooseRules', this.selection);
+        } else {
+          if (this.selection.length > 1) {
+            this.$message.warning('只能选择一条记录规则');
+            return;
+          }
+          this.$emit('chooseRules', this.selection[0]);
+        }
         this.visible = false;
       }
     }

+ 274 - 0
src/views/batchRecord/components/EquipmentDialog.vue

@@ -0,0 +1,274 @@
+<template>
+  <ele-modal
+    title="选择产品"
+    :visible.sync="equipmentdialog"
+    :before-close="handleClose"
+    :close-on-click-modal="true"
+    :close-on-press-escape="false"
+    append-to-body
+    width="60%"
+    :maxable="true"
+  >
+    <div>
+      <el-row>
+        <el-col :span="24" class="topsearch">
+          <el-form>
+            <el-row>
+              <el-col :span="6">
+                <el-input
+                  v-model="code"
+                  placeholder="请输入物料编码"
+                  size="small"
+                ></el-input>
+              </el-col>
+
+              <el-col :span="6" style="margin-left: 10px">
+                <el-input
+                  v-model="name"
+                  placeholder="请输入物料名称"
+                  size="small"
+                ></el-input>
+              </el-col>
+              <el-col :span="6" style="margin-left: 10px">
+                <el-input
+                  v-model="searchKey"
+                  placeholder="请输入关键字"
+                  size="small"
+                ></el-input>
+              </el-col>
+
+              <el-col :span="4" style="margin-left: 10px">
+                <el-button type="primary" size="small" @click="reload"
+                  >搜索</el-button
+                >
+                <el-button size="small" @click="reset">重置</el-button>
+              </el-col>
+            </el-row>
+          </el-form>
+        </el-col>
+        <el-col :span="6" class="tree_col">
+          <AssetTree
+            @handleNodeClick="handleNodeClick"
+            :treeIds="treeType"
+            ref="treeList"
+          />
+        </el-col>
+        <el-col :span="18" class="table_col" v-if="equipmentdialog">
+          <ele-pro-table
+            ref="equiTable"
+            :columns="columns"
+            :datasource="datasource"
+            :selection.sync="selection"
+            @select="handleSelect"
+            cache-key="systemRoleTable3"
+            row-key="id"
+            height="50vh"
+            @done="setSelect"
+          >
+          </ele-pro-table>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="btns">
+      <el-button type="primary" size="small" @click="selected">选择</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </div>
+  </ele-modal>
+</template>
+
+<script>
+  import AssetTree from '@/components/AssetTree/newIndex.vue';
+import { getList } from '@/api/classifyManage/index';
+
+  export default {
+    components: {
+      AssetTree
+    },
+    props: {
+      selectList: {
+        type: Array,
+        default: () => []
+      },
+      // 是否多选 1:是 0:否
+      isMultiple: {
+        type: String,
+        default: '1' 
+      },
+      treeType: {
+        type: Array,
+        default: () => ['9']
+
+
+      }
+    },
+
+    data() {
+      return {
+        equipmentdialog: false,
+        columns: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            reserveSelection: true
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'code',
+            label: '物品编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110,
+            slot: 'code'
+          },
+          {
+            prop: 'name',
+            label: '物品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'brandNum',
+            label: '牌号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'modelType',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          }
+        ],
+        tableList: [],
+        categoryLevelId: null,
+        searchKey: null,
+        code: null,
+        name: null,
+        selection: []
+      };
+    },
+
+    watch: {},
+    methods: {
+      async datasource({ page, limit }) {
+        const params = {
+          code: this.code,
+          name: this.name,
+          searchKey: this.searchKey,
+          pageNum: page,
+          size: limit,
+          categoryLevelId: this.categoryLevelId,
+          isProduct: true
+        };
+        const data = await getList(params);
+        this.tableList = data.list;
+        return data;
+      },
+      open() {
+        this.equipmentdialog = true;
+        this.setSelect();
+      },
+      handleNodeClick(data) {
+        this.categoryLevelId = data.id;
+        this.reload();
+      },
+      reload() {
+        this.$refs.equiTable.reload();
+      },
+      handleClose() {
+        this.equipmentdialog = false;
+        this.code = '';
+        this.$refs.equiTable.clearSelection();
+      },
+      reset() {
+        this.code = null;
+        this.searchKey = null;
+        this.name = null;
+        this.reload();
+      },
+      // 设置选中
+      setSelect() {
+        this.$nextTick(() => {
+          this.tableList.forEach((row) => {
+            this.selectList.forEach((selected, index) => {
+              if (selected.productCode === row.code) {
+                this.$refs.equiTable.toggleRowSelection(row, true);
+              }
+            });
+          });
+        });
+      },
+      // 取消选中
+      handleSelect(selection, row) {
+        if (!selection.find((i) => i.id === row.id)) {
+          const index = this.selectList.findIndex(
+            (itm) => row.code == itm.productCode
+          );
+          console.log(index);
+          if (index > -1) {
+            this.selectList.splice(index, 1);
+          }
+        }
+      },
+      // 选择
+      selected() {
+        if (this.isMultiple == '0' && this.selection.length > 1) {
+          return this.$message.warning('只能选择一条产品');
+        }
+        this.$emit('choose', [
+          ...this.selection,
+          ...this.selectList.filter(
+            (i) => !this.selection.find((p) => p.code === i.productCode)
+          )
+        ]);
+        this.handleClose();
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .tree_col {
+    border: 1px solid #eee;
+    padding: 10px 0;
+    box-sizing: border-box;
+    max-height: 530px;
+    overflow: auto;
+  }
+  .table_col {
+    padding-left: 10px;
+    ::v-deep .el-table th.el-table__cell {
+      background: #f2f2f2;
+    }
+  }
+  .pagination {
+    text-align: right;
+    padding: 10px 0;
+  }
+  .btns {
+    text-align: center;
+    padding: 10px 0;
+  }
+  .topsearch {
+    margin-bottom: 15px;
+  }
+</style>

+ 144 - 26
src/views/batchRecord/components/editModal.vue

@@ -94,7 +94,7 @@
                   v-model="form.ruleName"
                   placeholder="请选择记录规则名称"
                   size="small"
-                  :readonly="true"
+                  readonly
                 >
                   <template #append>
                     <el-button size="small">选择规则</el-button>
@@ -110,7 +110,7 @@
                   v-model="form.ruleName"
                   placeholder="请选择设备有关计划规则,如保养规则,巡点检规则等"
                   size="small"
-                  :readonly="true"
+                  readonly
                 >
                   <template #append>
                     <el-button size="small">选择规则</el-button>
@@ -120,7 +120,81 @@
             </el-form-item></el-col
           >
         </el-row>
-        <header-title title="关联产品"></header-title>
+
+        <header-title
+          v-if="form.executeMethod == 2 && ruleDetails"
+          title="检查项目"
+          style="margin-top: 20px"
+        ></header-title>
+        <!-- 记录规则 -->
+        <div v-if="form.executeMethod == 2 && ruleDetails">
+          <el-table :data="ruleDetails" style="width: 100%">
+            <el-table-column type="index" label="序号" width="50">
+            </el-table-column>
+            <el-table-column label="检查内容">
+              <template slot-scope="scope">
+                <div>
+                  {{ scope.row.paramValue }}
+                </div>
+              </template>
+            </el-table-column>
+
+            <el-table-column label="检查工具">
+              <template slot-scope="scope">
+                <div>
+                  {{ scope.row.tools.map((i) => i.toolName).join(',') }}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="检查人">
+              <template>
+                <div
+                  style="display: flex; align-items: center; cursor: pointer"
+                >
+                  <div>选择检查人</div>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="检查情况">
+              <template slot-scope="scope">
+                <div>
+                  <div>
+                    <el-radio-group v-model="scope.row.checkStatus" disabled>
+                      <el-radio :label="1">已检查</el-radio>
+                      <el-radio :label="0">未检查</el-radio>
+                    </el-radio-group>
+                  </div>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="检查结果">
+              <template slot-scope="scope">
+                <div>
+                  <el-radio-group v-model="scope.row.checkResult" disabled>
+                    <el-radio :label="1">合格</el-radio>
+                    <el-radio :label="0">不合格</el-radio>
+                  </el-radio-group>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="异常描述">
+              <template slot-scope="scope">
+                <div>
+                  <el-input
+                    type="textarea"
+                    :rows="1"
+                    placeholder="请输入"
+                    v-model="scope.row.errorMsg"
+                    disabled
+                  >
+                  </el-input>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+
+        <header-title title="关联产品" style="margin-top: 20px"></header-title>
         <el-row style="margin-bottom: 20px">
           <el-col :span="8">
             <el-form-item label="生产工单号" prop="workOrderCode">
@@ -169,17 +243,27 @@
               <el-input
                 v-model="form.productCode"
                 placeholder="请选择产品信息"
-                :disabled="Boolean(form.workOrderId)"
-              ></el-input>
+                @click.native="openProductDialog"
+                readonly
+              >
+                <template #append>
+                  <el-button size="small">选择产品</el-button>
+                </template>
+              </el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="产品名称" required prop="productName">
               <el-input
                 v-model="form.productName"
-                placeholder="请输入"
-                :disabled="Boolean(form.workOrderId)"
-              ></el-input>
+                placeholder="请选择产品信息"
+                @click.native="openProductDialog"
+                readonly
+              >
+                <template #append>
+                  <el-button size="small">选择产品</el-button>
+                </template>
+              </el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -305,6 +389,8 @@
       @reload="reload"
       :isTempRecord="1"
     />
+
+    <EquipmentDialog ref="EquipmentDialogRef" isMultiple="0" @choose="choose" />
   </ele-modal>
 </template>
 
@@ -321,6 +407,9 @@
   import releaseRulesDialog from '@/views/produce/components/prenatalExamination/releaseRulesDialog.vue';
   import { saveOrUpdate } from '@/api/producetaskrecordrulesrecord/index';
   import { getById } from '@/api/produceOrder/index.js';
+  import EquipmentDialog from './EquipmentDialog.vue';
+  import { recordRulesDetailPage } from '@/api/recordRules/index.js';
+  import { size } from 'ele-admin/lib/ele-avatar-list/props';
 
   export default {
     name: 'editModal',
@@ -331,7 +420,8 @@
       selectReleaseRules,
       selectDevices,
       programRulesDialog,
-      releaseRulesDialog
+      releaseRulesDialog,
+      EquipmentDialog
     },
     props: {
       // 1-产前准备,2-过程监测,3-产后检查
@@ -435,7 +525,9 @@
         workOrderInfo: null,
         butLoading: false,
         showReleaseRulesDialog: false,
-        dialogTitle: ''
+        dialogTitle: '',
+        // 记录规则详情
+        ruleDetails: null
       };
     },
     computed: {
@@ -472,10 +564,23 @@
             this.getProductTaskList(this.form.workOrderId);
             // 根据工单id 获取详情
             this.getWorkOrderById(this.form.workOrderId);
+            this.getRulesDetias();
           }
         }
         this.visible = true;
       },
+      // 查询规则详情
+      async getRulesDetias() {
+        if (this.form.ruleId) {
+          const { list } = await recordRulesDetailPage({
+            pageNum: 1,
+            size: 999,
+            rulesId: this.form.ruleId
+          });
+          this.ruleDetails = list;
+          console.log('this.ruleDetails', this.ruleDetails);
+        }
+      },
       // 关闭时清理表单
       handleClose() {
         this.visible = false;
@@ -488,6 +593,7 @@
         this.form.executeMethod = this.form.itemType;
         this.form.ruleId = null;
         this.form.ruleName = '';
+        this.ruleDetails = null;
       },
       // 去选择设备
       selectDeviceId() {
@@ -496,12 +602,8 @@
       // 设备选
       chooseEquipment(data, index, categoryId) {
         console.log('data', data, index, categoryId);
-        this.form.deviceId = data[0]?.id || null;
-        this.form.deviceName = data[0]?.name || '';
-        if (this.rules && this.rules.length > 1) {
-          // 提示用户选择的规则有多个事项规则
-          this.$message.warning('所选设备包含多个设备,请注意选择');
-        }
+        this.form.deviceId = data?.id;
+        this.form.deviceName = data?.name;
       },
       // 去选择记录规则
       selectReleaseId() {
@@ -510,13 +612,10 @@
       // 选择记录规则
       chooseReleaseRules(rules) {
         console.log('rules', rules);
-        this.form.ruleId = rules[0]?.id || null;
-        this.form.ruleName = rules[0]?.name || '';
-        this.form.recordRulesClassify = rules[0]?.classify;
-        if (this.rules && this.rules.length > 1) {
-          // 提示用户选择的规则有多个事项规则
-          this.$message.warning('所选记录规则包含多个事项规则,请注意选择');
-        }
+        this.form.ruleId = rules?.id;
+        this.form.ruleName = rules?.name;
+        this.form.recordRulesClassify = rules?.classify;
+        this.getRulesDetias();
       },
       // 去选择事项规则
       selectRulesId() {
@@ -525,8 +624,8 @@
       // 选择事项规则
       chooseRules(rules) {
         console.log('rules', rules);
-        this.form.ruleId = rules[0]?.id || null;
-        this.form.ruleName = rules[0]?.name || '';
+        this.form.ruleId = rules?.id;
+        this.form.ruleName = rules?.name;
       },
       // 获取生产工单号
       async getWorkOrderList(code = '') {
@@ -546,8 +645,8 @@
         console.log('code', code);
         if (code) {
           const workOrder = this.workOrderList.find((i) => i.code == code);
-          this.workOrderInfo = workOrder;
           console.log('workOrder', workOrder);
+          this.workOrderInfo = workOrder;
           this.form.workOrderId = workOrder.id;
           // 赋值产品信息
           this.form.productCode = workOrder.productCode;
@@ -658,6 +757,23 @@
         const data = await getById(id);
         console.log('工单详情', data);
         this.workOrderInfo = data;
+      },
+      openProductDialog() {
+        if (this.form.workOrderId) {
+          return this.$message.warning('已选择生产工单,不能修改产品信息');
+        }
+        this.$refs.EquipmentDialogRef.open();
+      },
+      // 选择产品
+      choose(data) {
+        console.log('data', data);
+        const info = data[0];
+        if (info) {
+          this.form.productCode = info.code;
+          this.form.productName = info.name;
+          this.form.productModel = info.model;
+          this.form.specification = info.specification;
+        }
       }
     }
   };
@@ -665,6 +781,8 @@
 
 <style scoped lang="scss">
   .mask-box {
+    position: relative;
+
     &::after {
       content: '';
       width: 100%;

+ 24 - 24
src/views/batchRecord/components/list.vue

@@ -30,24 +30,27 @@
           新建
         </el-button>
       </template>
-      <template v-slot:action="{ row }">
+
+      <template v-slot:code="{ row }">
         <el-link
-          v-if="row.executeStatus == 0"
           type="primary"
           :underline="false"
-          @click="openEdit('edit', row)"
+          @click="openDetial(row, 'detail')"
         >
-          编辑
+          {{ row.code }}
         </el-link>
+      </template>
 
+      <template v-slot:action="{ row }">
         <el-link
-          v-if="row.executeStatus != 0"
+          v-if="row.executeStatus == 0"
           type="primary"
           :underline="false"
-          @click="openDetial(row, 'detail')"
+          @click="openEdit('edit', row)"
         >
-          详情
+          编辑
         </el-link>
+
         <el-link
           v-if="
             row.executeStatus == 0 ||
@@ -59,17 +62,14 @@
         >
           执行
         </el-link>
-        <el-link
-          v-if="
-            row.approvalStatus != null &&
-            (row.approvalStatus === 0 || row.approvalStatus === 3)
-          "
+        <!-- <el-link
+          v-if="row.approvalStatus === 0"
           type="primary"
           :underline="false"
           @click="openApproval(row)"
         >
           处理
-        </el-link>
+        </el-link> -->
         <el-popconfirm
           v-if="
             row.executeStatus == 0 &&
@@ -105,13 +105,13 @@
       :isTempRecord="1"
     />
 
-    <process-submit-dialog
+    <!-- <process-submit-dialog
       :processSubmitDialogFlag.sync="processSubmitDialogFlag"
       v-if="processSubmitDialogFlag"
       ref="processSubmitDialogRef"
       @reload="reload"
       :isNotNeedProcess="false"
-    ></process-submit-dialog>
+    ></process-submit-dialog> -->
   </el-card>
 </template>
 
@@ -127,7 +127,6 @@
   import { parameterGetByCode } from '@/api/system/dictionary-data';
   import releaseRulesDialog from '@/views/produce/components/prenatalExamination/releaseRulesDialog.vue';
   import programRulesDialog from '@/views/produce/components/prenatalExamination/programRulesDialog.vue';
-  import { getById } from '@/api/produceOrder/index.js';
   import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
 
   export default {
@@ -161,7 +160,8 @@
           {
             label: '记录编码',
             prop: 'code',
-            minWidth: 180
+            minWidth: 150,
+            slot: 'code'
           },
           {
             label: '产品编码',
@@ -176,7 +176,7 @@
           {
             label: '批次号',
             prop: 'batchNo',
-            minWidth: 180
+            minWidth: 150
           },
           {
             label: '生产工单号',
@@ -193,7 +193,7 @@
           {
             label: '执行方式',
             prop: 'executeMethod',
-            minWidth: 180,
+            minWidth: 150,
             formatter: (row) => {
               return this.getDictValue('执行方式', row.executeMethod + '');
             }
@@ -205,7 +205,7 @@
           },
           {
             label: '状态',
-            minWidth: 180,
+            minWidth: 80,
             prop: 'executeStatus',
             formatter: (row) => {
               switch (row.executeStatus) {
@@ -221,7 +221,7 @@
           {
             label: '审核状态',
             prop: 'approvalStatus',
-            minWidth: 180,
+            minWidth: 90,
             formatter: (row) => {
               switch (row.approvalStatus) {
                 case 0:
@@ -246,19 +246,19 @@
           {
             label: '创建人',
             prop: 'createUserName',
-            minWidth: 180
+            minWidth: 150
           },
           {
             label: '创建时间',
             prop: 'createTime',
-            minWidth: 180
+            minWidth: 150
           },
           {
             label: '操作',
             columnKey: 'action',
             slot: 'action',
             showOverflowTooltip: true,
-            minWidth: 180,
+            minWidth: 120,
             align: 'center',
             fixed: 'right'
           }

+ 1 - 0
src/views/batchRecord/components/tables/batchRecordTable.vue

@@ -8,6 +8,7 @@
       :datasource="datasource"
       :cache-key="cacheKeyUrl"
       autoAmendPage
+      height="calc(86vh - 230px)"
     >
       <template v-slot:action="{ row }">
         <el-link type="primary" :underline="false" @click="goToDetail(row)">

+ 31 - 7
src/views/batchRecord/components/tables/craftFilesTable.vue

@@ -3,11 +3,11 @@
     <seek-page :seekList="seekList" @search="search"></seek-page>
     <ele-pro-table
       ref="table"
-      row-key="id"
       :columns="columns"
       :datasource="datasource"
       :cache-key="cacheKeyUrl"
-      autoAmendPage
+      :needPage="false"
+      height="calc(86vh - 230px)"
     >
       <template v-slot:action="{ row }">
         <el-link type="primary" :underline="false" @click="goToDetail(row)">
@@ -23,7 +23,7 @@
 <script>
   import dictMixins from '@/mixins/dictMixins';
   import tableColumnsMixin from '@/mixins/tableColumnsMixin';
-  import { craftFiles } from '@/api/produce/workOrder.js';
+  import { batchRecordPage, filePageAPI } from '@/api/produce/workOrder.js';
   import fileBrowse from '@/views/produce/components/picking/fileBrowse.vue';
 
   export default {
@@ -72,10 +72,9 @@
             showOverflowTooltip: true,
             minWidth: 200,
             formatter: (_row, _column, cellValue) => {
-              return cellValue[0]?.name;
+              return cellValue && cellValue[0]?.name;
             }
           },
-
           {
             prop: 'version',
             label: '版本',
@@ -134,13 +133,38 @@
           size: limit,
           ...this.tableQuery
         };
-        return craftFiles(body);
+        return this.getDataList(body);
+      },
+      // 查询数据
+      async getDataList(body) {
+        let data = await batchRecordPage(body);
+        const fileIds = data.map((i) => i.fileId);
+
+        if (data.length === 0 || fileIds.length === 0) {
+          return data;
+        }
+
+        const files = await filePageAPI({ ids: fileIds.join(',') });
+
+        data = data
+          .map((item) => {
+            const file = files.find((f) => f.id === item.fileId);
+            return {
+              ...file,
+              ...item
+            };
+          })
+          .filter((i) => i.id);
+
+        console.log('data', data);
+
+        return data;
       },
       search(where) {
         this.reload(where);
       },
       goToDetail(row) {
-        console.log('row', row);
+        // 查询文件信息
         this.$refs.fileBrowseRef.setFileUrl(row);
       }
     }

+ 1 - 0
src/views/batchRecord/components/tables/deviceBatchRecordTable.vue

@@ -8,6 +8,7 @@
       :datasource="datasource"
       :cache-key="cacheKeyUrl"
       autoAmendPage
+      height="calc(86vh - 230px)"
     >
       <template v-slot:action="{ row }">
         <el-link type="primary" :underline="false" @click="goToDetail(row)">

+ 1 - 0
src/views/batchRecord/components/tables/materialReturnTable.vue

@@ -8,6 +8,7 @@
       :datasource="datasource"
       :cache-key="cacheKeyUrl"
       autoAmendPage
+      height="calc(86vh - 230px)"
     >
       <template v-slot:action="{ row }">
         <el-link type="primary" :underline="false" @click="goToDetail(row)">

+ 1 - 1
src/views/batchRecord/components/tables/materialTable.vue

@@ -8,6 +8,7 @@
       :datasource="datasource"
       :cache-key="cacheKeyUrl"
       autoAmendPage
+      height="calc(86vh - 230px)"
     >
       <template v-slot:action="{ row }">
         <el-link type="primary" :underline="false" @click="goToDetail(row)">
@@ -171,7 +172,6 @@
         this.reload(where);
       },
       async goToDetail(row) {
-
         const res = await getDetails(row.id);
 
         this.detailedObj = JSON.stringify(res);

+ 1 - 0
src/views/batchRecord/components/tables/qualityWorkOrderTable.vue

@@ -8,6 +8,7 @@
       :datasource="datasource"
       :cache-key="cacheKeyUrl"
       autoAmendPage
+      height="calc(86vh - 230px)"
     >
       <template v-slot:action="{ row }">
         <el-link type="primary" :underline="false" @click="goToDetail(row)">

+ 1 - 0
src/views/batchRecord/components/tables/wmsOutInt.vue

@@ -8,6 +8,7 @@
       :datasource="datasource"
       :cache-key="cacheKeyUrl"
       autoAmendPage
+      height="calc(86vh - 230px)"
     >
       <template v-slot:action="{ row }">
         <el-link type="primary" :underline="false" @click="goToDetail(row)">

+ 1 - 0
src/views/batchRecord/components/tables/workOrderTable.vue

@@ -8,6 +8,7 @@
       :datasource="datasource"
       :cache-key="cacheKeyUrl"
       autoAmendPage
+      height="calc(86vh - 230px)"
     >
       <template v-slot:action="{ row }">
         <el-link type="primary" :underline="false" @click="goToDetail(row)">

+ 1 - 0
src/views/batchRecord/components/tables/workReportTable.vue

@@ -8,6 +8,7 @@
       :datasource="datasource"
       :cache-key="cacheKeyUrl"
       autoAmendPage
+      height="calc(86vh - 230px)"
     >
       <template v-slot:action="{ row }">
         <el-link type="primary" :underline="false" @click="goToDetail(row)">

+ 7 - 1
src/views/batchRecord/index.vue

@@ -151,7 +151,7 @@
         </div>
 
         <template v-slot:content>
-          <div>
+          <div class="table-box">
             <component
               :is="activeComponentName"
               ref="tableRef"
@@ -342,6 +342,7 @@
 
       .list-box {
         margin-top: 10px;
+        max-height: 78vh;
         overflow-y: auto;
         box-sizing: border-box;
 
@@ -382,4 +383,9 @@
       margin-bottom: 10px;
     }
   }
+
+  .table-box {
+    height: 85vh;
+    overflow-y: auto;
+  }
 </style>

+ 8 - 2
src/views/checklistManagement/checklist.vue

@@ -20,7 +20,6 @@
             >编辑</el-link
           >
           <el-link type="text">提交</el-link>
-          <el-link type="text">处理</el-link>
           <el-link type="text">详情</el-link>
           <el-popconfirm
             title="您确定要删除这条数据吗?"
@@ -31,6 +30,12 @@
             >
           </el-popconfirm>
         </template>
+
+        <template v-slot:code="{ row }">
+          <el-link type="primary" @click="checkAddConfirm('detail', row)">{{
+            row.code
+          }}</el-link>
+        </template>
       </ele-pro-table>
     </el-card>
     <checkAdd
@@ -69,7 +74,8 @@
             label: '放行单编码',
             align: 'center',
             minWidth: 110,
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            slot: 'code'
           },
           {
             prop: 'name',

+ 1 - 1
src/views/checklistManagement/components/checkAdd.vue

@@ -22,7 +22,7 @@
         <el-select
           style="width: 100%"
           v-model="form.templateId"
-          placeholder="请选择,来源于放行单模板"
+          placeholder="请选择,来源于放行单模板"
           filterable
           remote
           :remote-method="remoteMethod"

+ 215 - 23
src/views/checklistManagement/components/checkDetails.vue

@@ -8,7 +8,34 @@
     maxable
     width="80%"
   >
-    <el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
+    <div class="switch" :maxable="true" style="margin-bottom: 20px">
+      <div class="switch_left">
+        <ul>
+          <li
+            v-for="item in tabOptions"
+            :key="item.key"
+            :class="{ active: activeComp == item.key }"
+            @click="activeComp = item.key"
+          >
+            {{ item.name }}
+          </li>
+        </ul>
+      </div>
+    </div>
+
+    <bpmDetail
+      v-if="activeComp == 'bpm' && form && form.processInstanceId"
+      :id="form.processInstanceId"
+    >
+    </bpmDetail>
+
+    <el-form
+      v-if="activeComp == 'main'"
+      ref="formRef"
+      :model="form"
+      :rules="rules"
+      label-width="100px"
+    >
       <header-title title="基本信息"></header-title>
 
       <el-row :gutter="10">
@@ -54,7 +81,12 @@
         </template>
       </ele-pro-table>
 
-      <el-button type="primary" style="margin-bottom: 15px">
+      <el-button
+        type="primary"
+        style="margin-bottom: 15px"
+        @click="getKitCheck"
+        :loading="butLoading"
+      >
         规则齐套检查
       </el-button>
 
@@ -82,7 +114,11 @@
         </template>
       </ele-pro-table>
 
-      <table class="detail-table" style="width: 500px; margin: 15px 0">
+      <table
+        class="detail-table"
+        key="first-table"
+        style="width: 500px; margin: 15px 0"
+      >
         <tr>
           <td>结论</td>
           <td>
@@ -94,11 +130,14 @@
         </tr>
         <tr>
           <td>验收人</td>
-          <td>
-            <el-input
-              v-model="form.workCheckUserName"
-              placeholder="请输入"
-            ></el-input>
+          <td @click="openSelectUser(0)">
+            <div class="mask-box">
+              <el-input
+                v-model="form.workCheckUserName"
+                placeholder="请输选择验收人"
+                readonly
+              ></el-input>
+            </div>
           </td>
         </tr>
         <tr>
@@ -139,7 +178,11 @@
         </template>
       </ele-pro-table>
 
-      <table class="detail-table" style="width: 500px; margin: 15px 0">
+      <table
+        class="detail-table"
+        key="tow"
+        style="width: 500px; margin: 15px 0"
+      >
         <tr>
           <td>结论</td>
           <td>
@@ -152,10 +195,13 @@
         <tr>
           <td>验收人</td>
           <td>
-            <el-input
-              v-model="form.qualityCheckUserName"
-              placeholder="请输入"
-            ></el-input>
+            <div class="mask-box" @click="openSelectUser(1)">
+              <el-input
+                v-model="form.qualityCheckUserName"
+                placeholder="请输选择验收人"
+                readonly
+              ></el-input>
+            </div>
           </td>
         </tr>
         <tr>
@@ -171,20 +217,35 @@
           </td>
         </tr>
       </table>
-
+      <!-- 选择生产工单 -->
       <selectWorkOrder
         ref="selectWorkOrderRef"
         :where="workOrderWhere"
         :autoClose="false"
         @confirm="selectWorkOrderConfirm"
       ></selectWorkOrder>
+
+      <!-- 选择用户 -->
+      <SelectUser
+        ref="SelectUserRef"
+        v-model="showSelectUser"
+        @selectUserFinished="selectUserFinished"
+      ></SelectUser>
     </el-form>
 
     <template v-slot:footer>
-      <el-button type="primary" @click="submit" :loading="butLoading"
+      <el-button
+        v-if="type != 'detail'"
+        type="primary"
+        @click="submit"
+        :loading="butLoading"
         >提 交</el-button
       >
-      <el-button type="primary" @click="submit('save')" :loading="butLoading"
+      <el-button
+        v-if="type != 'detail'"
+        type="primary"
+        @click="submit('save')"
+        :loading="butLoading"
         >保存</el-button
       >
       <el-button @click="handleClose">取 消</el-button>
@@ -194,17 +255,19 @@
 
 <script>
   import dictMixins from '@/mixins/dictMixins';
-  import selectWorkOrder from '@/components/selectWorkOrder/selectWorkOrder.vue';
+  import selectWorkOrder from './selectWorkOrder.vue';
   import { checklisttemplateGetById } from '@/api/checklisttemplate/index';
+  import SelectUser from '@/components/select/SelectUser/index.vue';
   import {
     checklistrecordSave,
     checklistrecordGetById,
-    checklistrecordUpdate
+    checklistrecordUpdate,
+    checklistrecordKitCheck
   } from '@/api/checklistrecord/index';
 
   export default {
     mixins: [dictMixins],
-    components: { selectWorkOrder },
+    components: { selectWorkOrder, SelectUser },
     data() {
       const formBaseData = {
         id: null,
@@ -217,13 +280,13 @@
         orders: [],
         processInstanceId: '',
         qualityCheckTime: '',
-        qualityCheckUserId: 0,
+        qualityCheckUserId: null,
         qualityCheckUserName: '',
         qualityConclution: null,
         templateId: 0,
         templateName: '',
         workCheckTime: '',
-        workCheckUserId: 0,
+        workCheckUserId: null,
         workCheckUserName: '',
         workConclution: null
       };
@@ -246,9 +309,49 @@
           statusList: ['6']
         },
         loading: false,
-        butLoading: false
+        butLoading: false,
+        tabOptions: [
+          { key: 'main', name: '放行单详情' },
+          { key: 'bpm', name: '流程详情' }
+        ],
+        // 当前选项
+        activeComp: 'main',
+        showSelectUser: false,
+        // 0 生产验收人 1 质检验收人
+        selectUserType: 0
       };
     },
+    watch: {
+      'form.details': {
+        handler(details) {
+          console.log('details', details);
+          // 区分生产放行规则 质检放行规则
+          // 根据 审核结果修改 结论
+          const scDetails = details.filter((item) => item.checkType == 1);
+          const zjDetails = details.filter((item) => item.checkType == 2);
+
+          // 当workConclution全为1 则为1 否则为0
+          if (scDetails.length > 0) {
+            const allPass = scDetails
+              .map((item) => item.isPass)
+              .every((val) => val === 1);
+            this.form.workConclution = allPass ? 1 : 0;
+          } else {
+            this.form.workConclution = null;
+          }
+
+          if (zjDetails.length > 0) {
+            const allPass = zjDetails
+              .map((item) => item.isPass)
+              .every((val) => val == 1);
+            this.form.qualityConclution = allPass ? 1 : 0;
+          } else {
+            this.form.qualityConclution = null;
+          }
+        },
+        deep: true
+      }
+    },
     computed: {
       ordersColumns() {
         return [
@@ -281,7 +384,7 @@
             showOverflowTooltip: true
           },
           {
-            prop: 'workOrderId',
+            prop: 'workOrderCode',
             label: '生产工单号',
             align: 'center',
             minWidth: 110,
@@ -383,6 +486,7 @@
           this.getCheckDetails(data.id);
         } else if (type == 'detail') {
           this.title = '放行单详情';
+          this.getCheckDetails(data.id);
         } else {
           this.title = '审批';
         }
@@ -411,6 +515,7 @@
                 if (this.type == 'edit') {
                   await checklistrecordUpdate(this.form);
                 } else {
+                  this.form.createUserName = this.$store.state.user.info.name;
                   await checklistrecordSave(this.form);
                 }
               } else {
@@ -504,6 +609,8 @@
           this.form.details = data.details;
 
           this.loading = false;
+
+          this.setDefaultValue();
         } catch (error) {
           this.loading = false;
         }
@@ -515,10 +622,81 @@
           const data = await checklistrecordGetById(id);
           this.$util.assignObject(this.form, data);
           console.log('this.form', this.form);
+          if (this.type == 'edit' || this.type == 'add') {
+            this.setDefaultValue();
+          }
           this.loading = false;
         } catch (error) {
           this.loading = false;
         }
+      },
+      // 设置默认值
+      setDefaultValue() {
+        // 编辑时 设置默认值
+        if (!this.form.qualityCheckUserId) {
+          // 设置为当前用户
+          this.form.qualityCheckUserId = this.$store.state.user.info.id;
+          this.form.qualityCheckUserName = this.$store.state.user.info.name;
+        }
+
+        if (!this.form.workCheckUserId) {
+          // 设置为当前用户
+          this.form.workCheckUserId = this.$store.state.user.info.id;
+          this.form.workCheckUserName = this.$store.state.user.info.name;
+        }
+
+        if (!this.form.qualityCheckTime) {
+          this.form.qualityCheckTime = this.$util.toDateString(
+            new Date(),
+            'yyyy-MM-dd HH:mm:ss'
+          );
+        }
+
+        if (!this.form.workCheckTime) {
+          this.form.workCheckTime = this.$util.toDateString(
+            new Date(),
+            'yyyy-MM-dd HH:mm:ss'
+          );
+        }
+      },
+      // 规则齐套检查
+      async getKitCheck() {
+        try {
+          this.butLoading = true;
+          const data = await checklistrecordKitCheck(this.form.id);
+          console.log('规则齐套检查', data);
+
+          // 把检查结果赋值给对应的明细
+          this.form.details.forEach((item) => {
+            const checkItem = data.find((d) => d.id === item.id);
+            if (checkItem && item.isAutoCheck) {
+              item.isPass = checkItem.isPass;
+            }
+          });
+
+          console.log('规则齐套检查', this.form.details);
+
+          this.butLoading = false;
+          this.$message.success('规则齐套检查完成!');
+        } catch (error) {
+          this.butLoading = false;
+        }
+      },
+      // 打开选择用户
+      openSelectUser(type) {
+        this.selectUserType = type;
+        this.showSelectUser = true;
+      },
+      selectUserFinished(userInfo) {
+        console.log('userInfo', userInfo);
+        console.log('this.selectUserType', this.selectUserType);
+        if (this.selectUserType == 0) {
+          this.form.workCheckUserId = userInfo.id;
+          this.form.workCheckUserName = userInfo.name;
+        } else {
+          this.form.qualityCheckUserId = userInfo.id;
+          this.form.qualityCheckUserName = userInfo.name;
+        }
       }
     }
   };
@@ -543,4 +721,18 @@
       }
     }
   }
+
+  .mask-box {
+    position: relative;
+    &::after {
+      content: '';
+      width: 100%;
+      height: 100%;
+      position: absolute;
+      top: 0;
+      left: 0;
+      background: rgba(0, 0, 0, 0);
+      cursor: pointer;
+    }
+  }
 </style>

+ 39 - 59
src/components/selectWorkOrder/selectWorkOrder.vue → src/views/checklistManagement/components/selectWorkOrder.vue

@@ -77,6 +77,7 @@
   import dictMixins from '@/mixins/dictMixins';
   import tableColumnsMixin from '@/mixins/tableColumnsMixin';
   import { getPage } from '@/api/produceOrder/index.js';
+  import { pageOrderByProduct } from '@/api/produce/workOrder.js';
 
   export default {
     mixins: [dictMixins, tableColumnsMixin],
@@ -219,31 +220,6 @@
         ];
       },
       basicColumns() {
-        const num = this.columnsVersion;
-        const opt = {
-          first: [
-            // {
-            //   prop: 'deliveryTime',
-            //   label: '预测交货日期',
-            //   align: 'center',
-            //   showOverflowTooltip: true,
-            //   minWidth: 110
-            // }
-          ],
-          second: [
-            {
-              prop: 'completeTime',
-              label: '完成时间',
-              align: 'center'
-            },
-            {
-              prop: 'cycle',
-              label: '生产周期',
-              align: 'center'
-            }
-          ]
-        };
-
         return [
           {
             width: 45,
@@ -257,7 +233,7 @@
             slot: 'code',
             label: '生产工单号',
             align: 'center',
-            minWidth: 110,
+            minWidth: 150,
             showOverflowTooltip: true
           },
           // {
@@ -266,11 +242,46 @@
           //   align: 'center',
           //   minWidth: 110
           // },
+
+          {
+            prop: 'productCode',
+            label: '产品编码',
+            align: 'center',
+            minWidth: 150,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'productName',
+            label: '产品名称',
+            align: 'center',
+            minWidth: 150,
+            showOverflowTooltip: true
+          },
           {
             prop: 'batchNo',
             label: '批次号',
             align: 'center',
-            minWidth: 130,
+            minWidth: 150,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'model',
+            label: '型号',
+            align: 'center',
+            minWidth: 150,
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'productionCodes',
+            label: '生产编号',
+            align: 'center',
+            minWidth: 150,
             showOverflowTooltip: true
           },
           {
@@ -337,37 +348,6 @@
             align: 'center',
             showOverflowTooltip: true
           },
-          {
-            prop: 'productCode',
-            label: '编码',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'productName',
-            label: '名称',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'model',
-            label: '型号',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'specification',
-            label: '规格',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'productionCodes',
-            label: '生产编号',
-            align: 'center',
-            minWidth: 150,
-            showOverflowTooltip: true
-          },
           {
             prop: 'lineNumber',
             label: '行号',
@@ -523,7 +503,7 @@
       },
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
-        return getPage({
+        return pageOrderByProduct({
           ...where,
           ...order,
           pageNum: page,

+ 11 - 1
src/views/checklistManagement/components/templateAdd.vue

@@ -141,7 +141,11 @@
           ></el-input>
         </template>
         <template v-slot:isAutoCheck="{ row }">
-          <el-select v-model="row.isAutoCheck" placeholder="请选择">
+          <el-select
+            v-model="row.isAutoCheck"
+            placeholder="请选择"
+            :disabled="row.businessType === -1"
+          >
             <el-option label="自动" :value="1"> </el-option>
             <el-option label="手动" :value="0"> </el-option>
           </el-select>
@@ -549,6 +553,12 @@
         row.indicatorName = '';
         row.mainIndicatorId = null;
         row.mainIndicatorName = '';
+
+        if (row.businessType === -1) {
+          row.isAutoCheck = 0;
+        } else {
+          // row.isAutoCheck = 1;
+        }
       },
       // 修改 考核指标
       indicatorChange(row) {

+ 26 - 22
src/views/produce/components/prenatalExamination/releaseRulesDialog.vue

@@ -22,7 +22,6 @@
           <el-form-item label="记录规则名称" required>
             <el-input
               v-model="addForm.ruleName"
-
               placeholder="自动带出"
               disabled
             ></el-input>
@@ -46,7 +45,6 @@
           >
             <el-input
               v-model="addForm.deviceName"
-
               placeholder="自动带出"
               disabled
             ></el-input>
@@ -54,7 +52,6 @@
           <el-form-item v-else label="车间区域" prop="workshopArea">
             <el-input
               v-model="addForm.workshopArea"
-
               placeholder="请输入"
             ></el-input>
           </el-form-item>
@@ -117,7 +114,7 @@
       <el-table-column label="检查内容">
         <template slot-scope="scope">
           <div>
-            {{ scope.row.paramValue }}
+            {{ scope.row.paramValue || scope.row.productName }}
           </div>
         </template>
       </el-table-column>
@@ -143,18 +140,24 @@
       <el-table-column label="检查情况">
         <template slot-scope="scope">
           <div>
-            <div>
-              <el-input
-                v-if="ruleInfo && ruleInfo.classify == 3"
-                type="textarea"
-                :rows="1"
-                v-model="scope.row.checkStatusDesc"
-              ></el-input>
-              <el-radio-group v-else v-model="scope.row.checkStatus">
-                <el-radio :label="1">已检查</el-radio>
-                <el-radio :label="0">未检查</el-radio>
-              </el-radio-group>
-            </div>
+            <el-input
+              v-if="
+                ruleInfo && (ruleInfo.classify == 3 || ruleInfo.classify == 4)
+              "
+              type="text"
+              :rows="1"
+              v-model="scope.row.checkStatusDesc"
+            >
+              <template
+                v-if="ruleInfo.classify == 4 && scope.row.unitName"
+                slot="append"
+                >{{ scope.row.unitName }}</template
+              >
+            </el-input>
+            <el-radio-group v-else v-model="scope.row.checkStatus">
+              <el-radio :label="1">已检查</el-radio>
+              <el-radio :label="0">未检查</el-radio>
+            </el-radio-group>
           </div>
         </template>
       </el-table-column>
@@ -168,7 +171,7 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="异常描述">
+      <el-table-column label="描述">
         <template slot-scope="scope">
           <div>
             <el-input
@@ -256,6 +259,7 @@
     logicDelete,
     getById
   } from '@/api/producetaskrecordrulesrecord/index';
+  import { row } from 'mathjs';
 
   export default {
     components: { SelectUser },
@@ -437,23 +441,23 @@
         // 添加必要参数
         this.addForm.details = list.map((i) => {
           return {
+            ...i,
+            id: null,
             checkResult: null,
             checkStatus: null,
-            checkStatusDesc: '',
+            checkStatusDesc: i.defaultValue || '',
             errorMsg: '',
             checkUsers: [],
             paramValue: i.paramValue,
-            toolNames: i.tools.map((i) => i.toolName).join(','),
-            recordId: i.recordId
+            toolNames: i.tools.map((i) => i.toolName).join(',')
           };
         });
-        console.log('this.addForm 添加规则', this.addForm);
+        console.log('this.addForm 添加规则', this.addForm, list);
       },
       openSelectUser(row) {
         this.currentRow = row;
         console.log('row', row);
         this.showSelectUser = true;
-        console.log('this.showSelectUser', this.showSelectUser);
       },
       handleBeforeClose() {
         this.addForm = JSON.parse(JSON.stringify(this.formDate));

+ 2 - 2
vue.config.js

@@ -34,7 +34,7 @@ module.exports = {
       '/api': {
         // target: 'http://124.71.68.31:50001',
         // target: 'http://192.168.1.116:18086',
-        target: 'http://192.168.1.251:18086',
+        // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.103:18086',192.168.1.116
         // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.116:18086',
@@ -44,7 +44,7 @@ module.exports = {
         // target: 'http://192.168.1.33:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18087',
-        // target: 'http://192.168.1.116:18086',
+        target: 'http://192.168.1.116:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''