浏览代码

修改首件两检的界面显示

695593266@qq.com 6 月之前
父节点
当前提交
c02a2e3751

+ 12 - 0
src/router/index.js

@@ -86,6 +86,18 @@ router.afterEach((to) => {
     }, 200);
   }
 });
+
+router.beforeEach((to, from, next) => {
+  const dialogs = document.querySelectorAll('.el-dialog__wrapper');
+  dialogs.forEach((d) => d.remove());
+
+  const overlays = document.querySelectorAll('.el-overlay');
+  overlays.forEach((o) => o.remove());
+  document.body.click();
+
+  next();
+});
+
 router.roleChange = async ({ menus, homePath, authoritiesRouter }) => {
   const currentUser = getCurrentUser();
   if (menus && menus.length > 0) {

+ 2 - 2
src/views/produce/components/picking/fileBrowse.vue

@@ -4,10 +4,10 @@
     :visible.sync="visible"
     v-if="visible"
     :before-close="handleClose"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
     append-to-body
     :maxable="true"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
     width="80%"
   >
     <div>

+ 62 - 0
src/views/produce/components/picking/newFileBrowse.vue

@@ -0,0 +1,62 @@
+<template>
+  <div v-if="visible" class="report-page">
+    <div>
+      <iframe
+        :src="fileUrl"
+        width="100%"
+        style="height: calc(70vh - 60px); margin-top: 30px"
+        frameborder="0"
+        allowfullscreen="true"
+      ></iframe>
+    </div>
+
+    <div slot="footer">
+      <el-button @click="handleClose"> 关闭 </el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    components: {},
+    mixins: [],
+
+    data() {
+      return {
+        fileUrl: '',
+        visible: false
+      };
+    },
+    computed: {},
+    mounted() {},
+    methods: {
+      setFileUrl(row) {
+        console.log(row);
+        let file = row.storagePath[0];
+        let fileNames = file.storePath.split('/');
+        let url =
+          window.location.origin +
+          '/api/main/file/getFile?objectName=' +
+          file.storePath +
+          '&fullfilename=' +
+          fileNames[fileNames.length - 1];
+        this.fileUrl = '/kkfile/onlinePreview?url=' + btoa(url);
+        this.visible = true;
+      },
+
+      handleClose() {
+        this.visible = false;
+        this.$emit('close');
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .report-page {
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    min-height: 0;
+  }
+</style>

+ 423 - 0
src/views/produce/components/picking/newWokePopup.vue

@@ -0,0 +1,423 @@
+<template>
+  <div v-if="visible" class="right-page">
+    <!-- 内容区 -->
+    <div class="page-body">
+      <ele-pro-table
+        height="calc(80vh - 160px)"
+        ref="fileTable"
+        :columns="jobColumns1"
+        :datasource="workList"
+        v-show="rightMode == 'list'"
+      >
+        <template v-slot:action="{ row }">
+          <el-link type="primary" @click="fileDetails(row)">详情</el-link>
+        </template>
+      </ele-pro-table>
+
+      <fileBrowse
+        ref="browseRef"
+        v-if="rightMode == 'detail'"
+        @close="closeDetail"
+      />
+    </div>
+
+    <pickingList
+      isType="pick"
+      ref="pickingListRef"
+      @allSelection="allSelection"
+    />
+  </div>
+</template>
+
+<script>
+  import pickingList from './pickingList.vue';
+  import fileBrowse from './newFileBrowse.vue';
+  import {
+    workorderList,
+    getCode,
+    craftFiles,
+    filePageAPI,
+    fileReleaseAPI
+  } from '@/api/produce/workOrder';
+  import { typeName } from '../common.js';
+  import { batchSave } from '@/api/produce/picking';
+
+  export default {
+    components: {
+      pickingList,
+      fileBrowse
+    },
+    props: {
+      workListIds: {
+        type: Array,
+        default() {
+          return [];
+        }
+      },
+      taskId: {
+        type: String,
+        default() {
+          return null;
+        }
+      }
+    },
+    data() {
+      return {
+        visible: false,
+        workList: [],
+        rules: {},
+
+        pickCode: null,
+        pickName: null,
+        jobColumns1: [
+          {
+            label: '编码',
+            prop: 'code',
+            width: 180,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'name',
+            label: '文档名称',
+            align: 'center',
+            slot: 'name',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+
+          {
+            prop: 'storagePath',
+            label: '文件名称',
+            align: 'center',
+
+            showOverflowTooltip: true,
+            minWidth: 200,
+            formatter: (_row, _column, cellValue) => {
+              return cellValue[0]?.name;
+            }
+          },
+
+          {
+            prop: 'version',
+            label: '版本',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100
+          },
+
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            showOverflowTooltip: true,
+            align: 'center',
+            minWidth: 110
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 260,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ],
+
+        typeName,
+
+        tableRules: {},
+        rightMode: 'list',
+        currentRow: null,
+        itemData: null,
+        type: 1
+      };
+    },
+    computed: {
+      taskObj() {
+        return this.$store.state.user.taskObj;
+      }
+    },
+
+    watch: {},
+    methods: {
+      // datasource({ page, where, limit }) {
+
+      //     let req = {
+      //         "taskId": this.taskId,
+      //         "workOrderId": this.workListIds[0]
+      //     }
+
+      //     return craftFiles({
+      //         ...req,
+      //         pageNum: page,
+      //         size: limit,
+      //     });
+      // },
+
+      open(req) {
+        this.itemData = req;
+        this.type = 1;
+        this.workList = [];
+        craftFiles(req).then((res) => {
+          let _ids = [];
+          if (res.length != 0) {
+            res.forEach((e) => {
+              _ids.push(e.id);
+            });
+            const ids = _ids.join(',');
+            this.getFilepProcess(ids);
+          }
+        });
+
+        this.visible = true;
+      },
+
+      openTwo(req) {
+        this.itemData = req;
+        this.type = 2;
+        this.workList = [];
+        fileReleaseAPI({
+          fileType: 0,
+          isQueryAll: 1,
+          jobNumber: '',
+          lcyStatus: '3',
+          loginName: '',
+          name: req.productCode,
+          pageNum: 1,
+          size: 10
+        }).then((res) => {
+          this.workList = res.list;
+        });
+
+        this.visible = true;
+      },
+
+      async getFilepProcess(ids) {
+        await filePageAPI({
+          ids: "'" + ids + "'"
+        }).then((res) => {
+          this.workList = res;
+        });
+      },
+
+      fileDetails(row) {
+        this.currentRow = row;
+        this.rightMode = 'detail';
+
+        this.$nextTick(() => {
+          this.$refs.browseRef.setFileUrl(row);
+        });
+      },
+
+      closeDetail() {
+        this.rightMode = 'list';
+        if (this.type == 1) {
+          this.open(this.itemData);
+        } else if (this.type == 2) {
+          this.openTwo(this.itemData);
+        }
+      },
+
+      async getOrderCode() {
+        this.pickCode = await getCode('pick_order_code');
+      },
+
+      removeItem(idx, index) {
+        this.workList[idx].pickList.splice(index, 1);
+      },
+
+      handleClose() {
+        this.visible = false;
+        this.$emit('close', false);
+      },
+
+      getList() {
+        console.log(123);
+      },
+
+      openPicking(id, item) {
+        this.$refs.pickingListRef.open(id, item);
+      },
+
+      allSelection(id, list) {
+        this.workList.forEach((e) => {
+          if (e.id == id) {
+            e.pickList = list;
+            this.$forceUpdate();
+          }
+        });
+      },
+
+      save() {
+        console.log(this.workList);
+        if (this.workList.length > 0) {
+          let bol;
+          let _i;
+          bol = this.workList.every((e, i) => {
+            _i = i;
+            return (
+              Object.prototype.hasOwnProperty.call(e, 'pickList') &&
+              e.pickList.length > 0
+            );
+          });
+
+          if (!bol) {
+            this.$message.warning(
+              `生成工单${this.workList[_i].code}领料不能为空`
+            );
+            return false;
+          }
+        }
+
+        if (this.workList.length > 0) {
+          let name;
+          let bol2;
+          let _i;
+
+          this.workList.forEach((e, i) => {
+            _i = i;
+            console.log(e.pickList);
+            bol2 = e.pickList.every((y) => {
+              name = y.name;
+              return (
+                Object.prototype.hasOwnProperty.call(y, 'demandQuantity') &&
+                Number(y.demandQuantity) > 0
+              );
+            });
+          });
+
+          if (!bol2) {
+            this.$message.warning(
+              `${this.workList[_i].code}的${name}数量不能为空`
+            );
+            return false;
+          }
+        }
+
+        let _arr = [];
+        _arr = this.workList.map((m) => {
+          m.instanceList = [];
+          m.bomDetailDTOSList = [];
+          m.pickList.forEach((e) => {
+            if (
+              Object.prototype.hasOwnProperty.call(e, 'isBom') &&
+              e.isBom == 1
+            ) {
+              m.bomDetailDTOSList.push(e);
+            } else {
+              m.instanceList.push(e);
+            }
+          });
+
+          m.workOrderId = m.id;
+          delete m.id;
+
+          return {
+            ...m
+          };
+        });
+
+        let param = {
+          allPickList: _arr,
+          pickName: this.pickName,
+          pickCode: this.pickCode
+        };
+
+        batchSave(param).then((res) => {
+          this.$message.success('领料成功');
+          this.$emit('close', true);
+        });
+      }
+    },
+
+    created() {
+      this.getList();
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .table_content {
+    margin-bottom: 10px;
+  }
+
+  .tableZ_box {
+    border: 1px solid #e3e5e5;
+    margin: 6px 0;
+
+    &:last-child {
+      border-bottom: none;
+    }
+
+    .row {
+      width: 100%;
+      display: flex;
+    }
+
+    .col {
+      width: calc(100% / 5);
+      display: flex;
+      align-items: center;
+      min-width: 200px;
+      min-height: 32px;
+      border-bottom: 1px solid #e3e5e5;
+      border-right: 1px solid #e3e5e5;
+
+      &:last-child {
+        border-right: none;
+      }
+
+      .name {
+        display: flex;
+        align-items: center;
+        padding: 4px;
+        width: 80px;
+        height: 100%;
+        background-color: #d0e4d5;
+        color: #000;
+      }
+
+      .content {
+        padding: 4px 6px;
+        color: #000;
+      }
+    }
+
+    .pd6 {
+      padding: 0 6px;
+    }
+  }
+
+  .right-page {
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    min-height: 0;
+  }
+
+  .page-body {
+    flex: 1;
+    min-height: 0;
+    overflow: hidden;
+  }
+
+  .page-body .pro-table {
+    height: 100%;
+  }
+
+  .page-footer {
+    flex-shrink: 0;
+    padding: 10px 0;
+    border-top: 1px solid #ebeef5;
+    text-align: right;
+    background: #fff;
+  }
+</style>
+
+<style>
+  :v-deep .el-form-item__error {
+    bottom: -6px !important;
+  }
+</style>

+ 45 - 9
src/views/produce/components/qualityInspection/components/selfInspectionReporting.vue

@@ -1,15 +1,20 @@
 <template>
-  <ele-modal
+  <!-- <ele-modal
     :before-close="cancel"
     :close-on-click-modal="false"
     :maxable="true"
     :title="title"
     :visible.sync="visible"
     v-if="visible"
-    append-to-body
+    :modal="false"
+    :close-on-press-escape="false"
+    multiple
     custom-class="ele-dialog-form"
     width="90vw"
-  >
+    :resizable="true"
+    :movable="true"
+  > -->
+  <div class="report-page" v-if="visible">
     <el-form
       ref="form"
       :model="form"
@@ -354,17 +359,26 @@
       </ele-pro-table>
     </el-form>
 
-    <span slot="footer" class="dialog-footer" v-if="mode != 'detail'">
-      <el-button @click="visible = false">取 消</el-button>
+    <!-- <span slot="footer" class="dialog-footer" v-if="mode != 'detail'">
+      <el-button @click="cancel">取 消</el-button>
       <el-button type="primary" @click="saveSelf(1)">提交</el-button>
       <el-button type="primary" @click="saveSelf(2)">保存</el-button>
-    </span>
+    </span> -->
+    <div class="dialog-footer" v-if="mode != 'detail'">
+      <el-button @click="cancel">取 消</el-button>
+      <el-button type="primary" @click="saveSelf(1)">提交</el-button>
+      <el-button type="primary" @click="saveSelf(2)">保存</el-button>
+    </div>
+
+    <div class="dialog-footer" v-else>
+      <el-button @click="cancel">关闭</el-button>
+    </div>
 
     <inspectionTemplatePop
       ref="inspectionTemplateRef"
       @changeSel="changeSel"
     ></inspectionTemplatePop>
-  </ele-modal>
+  </div>
 </template>
 
 <script>
@@ -527,6 +541,7 @@
     methods: {
       cancel() {
         this.visible = false;
+        this.$emit('cancel');
       },
 
       open(item, type, mode) {
@@ -577,7 +592,8 @@
 
             this.$message.success(actionType === 1 ? '提交成功' : '保存成功');
             this.cancel();
-            this.$emit('refreshData');
+            // this.$emit('refreshData');
+            this.$emit('success');
           } finally {
             loading.close();
           }
@@ -824,4 +840,24 @@
   };
 </script>
 
-<style></style>
+<style scoped>
+  .report-page {
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    min-height: 0;
+  }
+
+  .report-page .el-form {
+    flex: 1;
+    overflow: auto;
+    min-height: 0;
+  }
+
+  .dialog-footer {
+    padding: 10px 0;
+    border-top: 1px solid #eee;
+    text-align: right;
+    background: #fff;
+  }
+</style>

+ 39 - 9
src/views/produce/components/qualityInspection/components/selfInspectionRequest.vue

@@ -1,5 +1,5 @@
 <template>
-  <ele-modal
+  <!-- <ele-modal
     :before-close="cancel"
     :close-on-click-modal="false"
     :maxable="true"
@@ -9,7 +9,8 @@
     append-to-body
     custom-class="ele-dialog-form"
     width="90vw"
-  >
+  > -->
+  <div class="report-page" v-if="visible">
     <el-form
       ref="form"
       :model="form"
@@ -200,16 +201,21 @@
       </ele-pro-table>
     </el-form>
 
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="visible = false">取 消</el-button>
+    <!-- <span slot="footer" class="dialog-footer">
+      <el-button @click="cancel">取 消</el-button>
       <el-button type="primary" @click="submitSelf">提交</el-button>
-    </span>
+    </span> -->
+
+    <div class="dialog-footer">
+      <el-button @click="cancel">取 消</el-button>
+      <el-button type="primary" @click="submitSelf">提交</el-button>
+    </div>
 
     <inspectionTemplatePop
       ref="inspectionTemplateRef"
       @changeSel="changeSel"
     ></inspectionTemplatePop>
-  </ele-modal>
+  </div>
 </template>
 
 <script>
@@ -358,6 +364,8 @@
 
       cancel() {
         this.visible = false;
+        this.$emit('cancel');
+        // this.visible = false;
       },
 
       beEntrustedDeptIdChange(val, row) {
@@ -459,8 +467,10 @@
           await inspectionRequest(payload);
 
           this.$message.success('请托成功');
-          this.cancel();
-          this.$emit('refreshData');
+          // this.cancel();
+          this.visible = false;
+          // this.$emit('refreshData');
+          this.$emit('success');
         } catch (e) {
           console.log(e);
         }
@@ -469,4 +479,24 @@
   };
 </script>
 
-<style></style>
+<style scoped>
+  .report-page {
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    min-height: 0;
+  }
+
+  .report-page .el-form {
+    flex: 1;
+    overflow: auto;
+    min-height: 0;
+  }
+
+  .dialog-footer {
+    padding: 10px 0;
+    border-top: 1px solid #eee;
+    text-align: right;
+    background: #fff;
+  }
+</style>

+ 197 - 74
src/views/produce/components/qualityInspection/index.vue

@@ -1,92 +1,122 @@
 <template>
-  <!-- multiple
-    :resizable="true"
-    :moveOut="true"
-    :movable="true"
-        :modal="false" -->
-
   <ele-modal
     title="首件两检报工"
     :visible.sync="dialogVisible"
-    width="85%"
+    width="95%"
     :before-close="handleClose"
     append-to-body
     :maxable="true"
     :close-on-click-modal="false"
     :close-on-press-escape="false"
   >
-    <div>
-      <div class="step-list" v-loading="loading">
-        <ele-pro-table
-          ref="table"
-          row-key="id"
-          :columns="columns"
-          :datasource="list"
-          cache-key="mes-ruleRecordsList-2511172018"
-          autoAmendPage
-          :need-page="false"
-          @refresh="getData"
-        >
-          <template v-slot:selfCheck="{ row }">
-            <el-button
-              type="primary"
-              @click="selfRequest(row)"
-              v-if="row.status == 0"
-              >自检请托</el-button
-            >
-            <el-button
-              type="primary"
-              :disabled="row.status != 0"
-              @click="reportClick(row, 1)"
-              >{{ row.status == 0 ? '报工' : '已报工' }}</el-button
+    <div class="two-layout">
+      <el-row :gutter="10" class="full-row">
+        <el-col :span="12" class="full-col">
+          <div class="pane">
+            <div class="pane-title">首件两检</div>
+            <div
+              v-show="leftMode === 'list'"
+              class="fill-box"
+              v-loading="loading"
             >
+              <ele-pro-table
+                ref="table"
+                row-key="id"
+                :columns="columns"
+                :datasource="list"
+                cache-key="mes-ruleRecordsList-20260208-1"
+                autoAmendPage
+                :need-page="false"
+                @refresh="getData"
+                height="calc(80vh - 160px)"
+              >
+                <template v-slot:selfCheck="{ row }">
+                  <el-button
+                    type="primary"
+                    @click="selfRequest(row)"
+                    v-if="row.status == 0"
+                    >自检请托</el-button
+                  >
+                  <el-button
+                    type="primary"
+                    :disabled="row.status != 0"
+                    @click="reportClick(row, 1)"
+                    >{{ row.status == 0 ? '报工' : '已报工' }}</el-button
+                  >
 
-            <el-button
-              type="primary"
-              v-if="row.status == 2 || row.status == 3"
-              @click="reportClick(row, 1, 'detail')"
-              >详情</el-button
-            >
-          </template>
-
-          <template
-            v-slot:specialInspection="{ row }"
-            v-if="
-              $hasPermission('mes:firstarticledualinspectionitem:specialreport')
-            "
-          >
-            <el-button
-              type="primary"
-              :disabled="row.status != 2"
-              @click="reportClick(row, 2)"
-              >{{ row.status == 3 ? '已报工' : '报工' }}</el-button
-            >
+                  <el-button
+                    type="primary"
+                    v-if="row.status == 2 || row.status == 3"
+                    @click="reportClick(row, 1, 'detail')"
+                    >详情</el-button
+                  >
+                </template>
 
-            <el-button
-              type="primary"
-              v-if="row.status == 3"
-              @click="reportClick(row, 2, 'detail')"
-              >详情</el-button
-            >
-          </template>
-
-          <template v-slot:status="{ row }">
-            <el-tag v-if="row.status == 0">待自检</el-tag>
-            <el-tag v-if="row.status == 2">待专检</el-tag>
-            <el-tag v-if="row.status == 3">已完成</el-tag>
-          </template>
-        </ele-pro-table>
-      </div>
+                <template
+                  v-slot:specialInspection="{ row }"
+                  v-if="
+                    $hasPermission(
+                      'mes:firstarticledualinspectionitem:specialreport'
+                    )
+                  "
+                >
+                  <el-button
+                    type="primary"
+                    :disabled="row.status != 2"
+                    @click="reportClick(row, 2)"
+                    >{{ row.status == 3 ? '已报工' : '报工' }}</el-button
+                  >
+
+                  <el-button
+                    type="primary"
+                    v-if="row.status == 3"
+                    @click="reportClick(row, 2, 'detail')"
+                    >详情</el-button
+                  >
+                </template>
+
+                <template v-slot:status="{ row }">
+                  <el-tag v-if="row.status == 0">待自检</el-tag>
+                  <el-tag v-if="row.status == 2">待专检</el-tag>
+                  <el-tag v-if="row.status == 3">已完成</el-tag>
+                </template>
+              </ele-pro-table>
+            </div>
+
+            <self-inspection-reporting
+              v-if="leftMode === 'report'"
+              ref="selfReportingRef"
+              @cancel="backToList"
+              @success="reportSuccess"
+            />
+
+            <self-inspection-request
+              v-if="leftMode === 'request'"
+              ref="selfRequestRef"
+              @cancel="backToList"
+              @success="reportSuccess"
+            />
+          </div>
+        </el-col>
+
+        <el-col :span="12" class="full-col">
+          <div class="pane">
+            <div class="pane-title">工艺文件</div>
+
+            <wokePopup ref="wokePopupRef"></wokePopup>
+          </div>
+        </el-col>
+      </el-row>
     </div>
 
-    <self-inspection-reporting
+    <!-- <self-inspection-reporting
       ref="selfReportingRef"
       @refreshData="getData"
     ></self-inspection-reporting>
     <self-inspection-request
       ref="selfRequestRef"
       @refreshData="getData"
-    ></self-inspection-request>
+    ></self-inspection-request> -->
   </ele-modal>
 </template>
 
@@ -96,12 +126,15 @@
   import tableColumnsMixin from '@/mixins/tableColumnsMixin';
   import selfInspectionReporting from './components/selfInspectionReporting.vue';
   import selfInspectionRequest from './components/selfInspectionRequest.vue';
+  import wokePopup from '../picking/newWokePopup.vue';
+  import { parameterGetByCode } from '@/api/system/dictionary-data';
 
   export default {
     mixins: [dictMixins, tableColumnsMixin],
     components: {
       selfInspectionReporting,
-      selfInspectionRequest
+      selfInspectionRequest,
+      wokePopup
     },
     data() {
       return {
@@ -111,7 +144,10 @@
         workOrder: null,
         butLoad: false,
         list: [],
-        type: ''
+        type: '',
+        leftMode: 'list',
+        currentRow: null,
+        reportType: null
       };
     },
     computed: {
@@ -205,12 +241,23 @@
       }
     },
     methods: {
-      open(workOrder, produceTaskInfo, type) {
+      async open(workOrder, produceTaskInfo, type, req) {
         this.workOrder = workOrder;
         this.produceTaskInfo = produceTaskInfo;
         this.type = type;
         this.dialogVisible = true;
         this.getData();
+        const res = await parameterGetByCode({
+          code: 'mes_craft_file_by_category_code'
+        });
+
+        const byCategory = res?.value === '1';
+
+        if (byCategory) {
+          this.$refs.wokePopupRef.openTwo(req);
+        } else {
+          this.$refs.wokePopupRef.open(req);
+        }
       },
 
       // 获取数据
@@ -256,15 +303,91 @@
         }
       },
 
+      // selfRequest(row) {
+      //   this.$refs.selfRequestRef.open(row, this.workOrder);
+      // },
       selfRequest(row) {
-        this.$refs.selfRequestRef.open(row, this.workOrder);
+        this.currentRow = row;
+        this.leftMode = 'request';
+
+        this.$nextTick(() => {
+          this.$refs.selfRequestRef.open(row, this.workOrder);
+        });
       },
 
+      // reportClick(row, type, mode) {
+      //   this.$refs.selfReportingRef.open(row, type, mode);
+      // }
       reportClick(row, type, mode) {
-        this.$refs.selfReportingRef.open(row, type, mode);
+        this.currentRow = row;
+        this.reportType = type;
+        this.leftMode = 'report';
+
+        this.$nextTick(() => {
+          this.$refs.selfReportingRef.open(row, type, mode);
+        });
+      },
+
+      async backToList() {
+        this.leftMode = 'list';
+        await this.getData();
+      },
+
+      async reportSuccess() {
+        this.leftMode = 'list';
+        await this.getData();
       }
     }
   };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+  .two-layout {
+    height: 80vh;
+    display: flex;
+    flex-direction: column;
+  }
+
+  .full-row {
+    flex: 1;
+    height: 100%;
+  }
+
+  .full-col {
+    height: 100%;
+  }
+
+  .pane {
+    height: 100%;
+    background: #fff;
+    border-radius: 4px;
+    padding: 10px;
+
+    display: flex;
+    flex-direction: column;
+    min-height: 0;
+  }
+
+  // .step-list {
+  //   height: 60vh;
+  //   display: flex;
+  //   flex-direction: column;
+  // }
+
+  /* 表格父级 */
+  .table-wrapper {
+    flex: 1;
+    min-height: 0;
+    display: flex;
+  }
+
+  .pane-title {
+    font-size: 16px;
+    font-weight: 600;
+    color: #03541c;
+    padding-bottom: 10px;
+    margin-bottom: 10px;
+    border-bottom: 1px solid #ebeef5;
+    flex-shrink: 0;
+  }
+</style>

+ 3 - 3
src/views/produce/components/workPlan/components/sampleListDialog.vue

@@ -3,12 +3,12 @@
   <ele-modal
     :title="title"
     :visible.sync="visible"
+    width="85%"
     :before-close="handleClose"
-    :close-on-click-modal="false"
-    :close-on-press-escape="false"
     append-to-body
-    width="80%"
     :maxable="true"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
   >
     <el-table :data="tableData" :default-expand-all="true">
       <el-table-column type="expand">

+ 23 - 0
src/views/produce/components/workPlan/details.vue

@@ -367,6 +367,24 @@
                   </template>
                 </ele-pro-table></el-tab-pane
               >
+              <el-tab-pane label="质检任务单" name="4">
+                <ele-pro-table
+                  ref="table"
+                  :columns="taskColumns"
+                  :datasource="taskMonadList"
+                  :needPage="false"
+                >
+                </ele-pro-table>
+              </el-tab-pane>
+              <el-tab-pane label="质检请托单" name="5">
+                <ele-pro-table
+                  ref="table"
+                  :columns="entrustColumns"
+                  :datasource="requestEntrustList"
+                  :needPage="false"
+                >
+                </ele-pro-table>
+              </el-tab-pane>
             </el-tabs>
           </el-tab-pane>
           <el-tab-pane
@@ -396,6 +414,7 @@
             </ele-pro-table>
           </el-tab-pane>
         </el-tabs>
+        <el-button class="go_back" @click="goBack">返回</el-button>
       </el-card>
       <sampleListDialog ref="detailRef"></sampleListDialog>
       <experimentReport ref="experimentReport"></experimentReport>
@@ -425,6 +444,8 @@
         sourceData3: [],
         sourceData4: [],
         sourceData5: [],
+        taskMonadList: [],
+        requestEntrustList: [],
         disposeTypeList: [],
         form: {},
         showArrange: '0',
@@ -595,6 +616,8 @@
         this.$set(this.form, 'remark', res.remark);
         this.sourceData3 = res.templateList || [];
         this.sourceData1 = res.qualityInventoryList || [];
+        this.taskMonadList = res.taskMonadList || [];
+        this.requestEntrustList = res.requestEntrustList || [];
         let name = this.$route.query.name;
         // const result = name == '计划' ? res.qualityWorkOrderDetailVO : res;
         let result = {};

+ 22 - 7
src/views/produce/components/workPlan/edit.vue

@@ -1,13 +1,14 @@
 <template>
+  <!-- custom-class="custom-dialog" -->
   <ele-modal
     :visible.sync="visible"
     v-if="visible"
+    width="90%"
     :before-close="handleClose"
-    :close-on-click-modal="true"
-    :close-on-press-escape="false"
-    :maxable="true"
     append-to-body
-    width="90%"
+    :maxable="true"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
   >
     <div class="ele-body" v-loading="loading">
       <div class="switch" v-if="this.qualityType == 2">
@@ -1531,6 +1532,16 @@
             return false;
           }
           // this.loading = true;
+          // let URL =
+          //   this.type == 'add' ? save : this.type == 'edit' ? update : '';
+
+          // this.form.qualityTimeStart = this.qualityTimeStart;
+          // this.form.qualityId = this.form.qualityIdList.join(',');
+
+          // delete this.form['qualityTimeEnd'];
+
+          // this.form.executeUserId = '';
+          // this.form.executeUserName = '';
           let URL =
             this.type == 'add' ? save : this.type == 'edit' ? update : '';
 
@@ -1539,8 +1550,7 @@
 
           delete this.form['qualityTimeEnd'];
 
-          this.form.executeUserId = '';
-          this.form.executeUserName = '';
+          this.form.executeUserId = this.form.executeUserIdList.join(',');
           let params = {
             ...this.form,
             sampleList: this.sampleList,
@@ -2342,4 +2352,9 @@
   };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+  ::v-deep .custom-dialog .el-dialog__body {
+    max-height: calc(100vh - 200px);
+    overflow-y: auto;
+  }
+</style>

+ 25 - 96
src/views/produce/index.vue

@@ -1,24 +1,6 @@
 <template>
   <div class="index_box">
-    <!-- <div class="menu-container">
-      <div
-        v-for="(item, index) in menuItems"
-        :key="item.label"
-        class="menu-item"
-        :class="{ active: isOpen }"
-        :style="getItemStyle(index)"
-        @click="handleItemClick(item)"
-      >
-        {{ item.label }}
-      </div>
-      <button class="toggle-btn" @click="toggleMenu">
-        {{ isOpen ? 'X' : '≡' }}
-      </button>
-    </div> -->
     <div class="content_box">
-      <!-- @tab-click="handleClick" -->
-      <!-- 工序名称 -->
-      <!-- <Search></Search> -->
       <div class="content_box_tab">
         <el-input
           style="width: 160px"
@@ -34,7 +16,6 @@
           stretch
           @tab-click="tabClickValue"
         >
-          <!-- :render-content="renderContent"-->
           <el-tab-pane label="工单" name="0">
             <div class="custom-tree-node">
               <el-tree
@@ -79,16 +60,6 @@
                 </span>
               </el-tree>
             </div>
-            <!-- <AssetTree @handleNodeClick="handleNodeClickNew" @setRootId="setRootId" id="0" :paramsType="'type'"
-              ref="treeList" eqDevice="sb" /> -->
-            <!-- <el-tree
-              :data="factoryworkstationList"
-              :props="defaultPropsTow"
-              node-key="id"
-              :highlight-current="true"
-              @node-click="handleNodeClick"
-            >
-            </el-tree>-->
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -103,8 +74,7 @@
               placeholder="请输入关键字"
               @clear="handleSearch"
             />
-            <!-- <el-input style="width: 180px" clearable v-model="taskName" placeholder="请输入工序进度" /> -->
-            <!--  -->
+
             <el-button
               size="mini"
               type="primary"
@@ -124,14 +94,8 @@
                   class="el-icon-question"
                   slot="reference"
                   style="color: #40a9ff; font-size: 14px"
-                ></i>
-                <!-- <el-button slot="reference">hover 激活</el-button> -->
-              </el-popover></template
-            >
-
-            <!--
-            <span>支持工单编码,产品编码,产品名称,产品规格,牌号,型号,批次号查询</span
-            > -->
+                ></i> </el-popover
+            ></template>
           </div>
           <div
             style="
@@ -150,7 +114,6 @@
           </div>
         </div>
 
-        <!-- :right-style="{ overflow: 'hidden' }" -->
         <ele-split-layout
           space="0px"
           width="45%"
@@ -188,15 +151,11 @@
               >
               </task-work-list>
             </div>
-            <!-- <div class="bottom">
-            <productionResource :BomObj="BomObj"></productionResource>
-          </div> -->
           </div>
           <!-- 右侧 详情 -->
           <template v-slot:content>
             <div class="right_main">
               <!-- 领料 -->
-              <!-- <div v-if="operationType == 'pick'"> -->
               <div v-if="operationType == 'pick' && activeName == '0'">
                 <pickDetails
                   ref="pickListRef"
@@ -225,15 +184,6 @@
                   :workPlanType="workPlanType"
                 ></warehousing>
 
-                <!-- // 设备 入库 -->
-                <!-- 普通报工 -->
-                <!-- <jobBooking
-                  v-else
-                  :workListIds="workListIds"
-                  ref="jobRef"
-                  :reportNeedFeed="reportNeedFeed"
-                ></jobBooking> -->
-
                 <jobBooking
                   v-else-if="isFinalCheckProduction && activeName == '0'"
                   :workListIds="workListIds"
@@ -248,15 +198,6 @@
                   style="background: #fff"
                   @success="successTask"
                 />
-
-                <!-- <workPlan
-                  style="width: 100%"
-                  v-else
-                  :workListIds="workListIds"
-                  ref="jobRef"
-                  :reportNeedFeed="reportNeedFeed"
-                >
-                </workPlan> -->
               </div>
 
               <!-- 工步 -->
@@ -302,13 +243,6 @@
                   @outScucc="outScucc"
                   v-if="isOutsource"
                 ></outsourceList>
-                <!--
-                <outsourceList
-                  :outsourceFormVal="outObj"
-                  @closeForm="closeForm"
-                  @outScucc="outScucc"
-                  v-if="isOutsource"
-                ></outsourceList> -->
 
                 <pleaseEntrust
                   :outsourceFormVal="outObj"
@@ -317,24 +251,6 @@
                   v-if="isPleaseEntrust"
                 ></pleaseEntrust>
               </div>
-
-              <!-- <div class="menu-container">
-                <div class="main-btn" @click="toggleMenu">
-                  <span>+</span>
-                </div>
-
-                <transition-group name="fan" tag="div">
-                  <div
-                    v-for="(btn, index) in buttons"
-                    :key="btn.label"
-                    class="sub-btn"
-                    :style="getBtnStyle(index)"
-                    v-show="isOpen"
-                  >
-                    {{ btn.label }}
-                  </div>
-                </transition-group>
-              </div> -->
             </div>
           </template>
         </ele-split-layout>
@@ -347,11 +263,7 @@
           :isPreProductionResult="isPreProductionResult"
           :activeName="activeName"
         ></footBtn>
-
-        <!-- <div class="box"> -->
-        <!-- </div> -->
       </div>
-      <!-- <footBtn @footBtn="footBtn"></footBtn> -->
     </div>
 
     <!--领料弹框 -->
@@ -365,9 +277,7 @@
     <wokePopup ref="wokePopupRef"></wokePopup>
     <!-- 检验报工 -->
     <workPlan ref="jobRefs" @closeWorkPlan="closeWorkPlan"> </workPlan>
-    <!-- <workes ref="jobRefs"> </workes> -->
 
-    <!-- :workListIds="workListIds" :taskId="taskObj.id" -->
     <!-- 工步 -->
     <workStep ref="workStepRef" />
     <!--  任务  -->
@@ -394,7 +304,6 @@
     <!-- 新增请托 -->
     <addPlease ref="addPleaseRef" @refresh="refreshPlease"></addPlease>
 
-    <!-- qualityInspection  -->
     <qualityInspection ref="qualityInspectionRef"></qualityInspection>
   </div>
 </template>
@@ -2162,9 +2071,20 @@
           )
             return;
 
+          const item = this.workData?.list?.[0];
+          if (!item) return null;
+
+          const req = {
+            taskId: this.taskObj.id,
+            workOrderId: this.workListIds[0],
+            productCode: item.productCode
+          };
+
           this.$refs.qualityInspectionRef.open(
             this.workData.list[0],
-            this.produceTaskInfo
+            this.produceTaskInfo,
+            '',
+            req
           );
         } else {
           if (!this.taskData) {
@@ -2200,7 +2120,16 @@
           (item) => item.sourceTaskId === row.taskId
         );
 
-        this.$refs.qualityInspectionRef.open(row, taskData, 1);
+        const item = this.workData?.list?.[0];
+        if (!item) return null;
+
+        const req = {
+          taskId: this.taskObj.id,
+          workOrderId: this.workListIds[0],
+          productCode: item.productCode
+        };
+
+        this.$refs.qualityInspectionRef.open(row, taskData, 1, req);
       },
 
       outsourcingAdd(type, activeName) {