Parcourir la source

修改NC代码的bug

695593266@qq.com il y a 7 mois
Parent
commit
c522e232fa

+ 12 - 0
src/api/produce/qualityInspection.js

@@ -70,3 +70,15 @@ export async function getBatchRecordList(params) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+//新增首件两检质检项
+export async function addInspectionsTerm(params) {
+  const res = await request.post(
+    `/mes/firstarticledualinspectionrecord/addItems`,
+    params
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

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

@@ -206,3 +206,12 @@ export async function getNCtaskListData(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+//NC任务报工
+export async function ncTaskReport(params) {
+  const res = await request.post('/aps/assign/eventReport', params);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 5 - 0
src/components/addDoc/index.vue

@@ -7,6 +7,7 @@
         type="primary"
         @click="handleUpload"
         :size="size"
+        :disabled="isDisabled"
       >
         上传</el-button
       >
@@ -45,6 +46,10 @@
           return [];
         }
       },
+      isDisabled: {
+        type: Boolean,
+        default: false
+      },
       size: {
         type: String,
         default: 'mini'

+ 3 - 1
src/main.js

@@ -35,6 +35,7 @@ import 'bpmn-js/dist/assets/diagram-js.css';
 import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css';
 import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css';
 import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css';
+import fileMain from '@/components/addDoc/index.vue';
 
 import { create, all } from 'mathjs'; // 引入mathjs工具并初始化
 const config = {
@@ -47,6 +48,7 @@ Vue.prototype.$math = create(all, config);
 import '@/icons';
 
 Vue.component('DictSelection', DictSelection);
+Vue.component('fileMain', fileMain);
 
 Vue.config.productionTip = false;
 
@@ -65,7 +67,7 @@ let instance = null;
 
 function render(props = {}) {
   const { container, routerBase, fileMain } = props;
-  Vue.component('fileMain', fileMain);
+  // Vue.component('fileMain', fileMain);
   // const router = new VueRouter({
   //   base: window.__POWERED_BY_QIANKUN__ ? routerBase : process.env.BASE_URL,
   //   mode: 'history',

+ 15 - 3
src/views/produce/components/bom/qualityTesting/inspectionTemplate.vue

@@ -24,6 +24,7 @@
               placeholder="请选择"
               style="width: 100%"
               clearable
+              :disabled="isFirst"
             >
               <el-option
                 :label="item.label"
@@ -176,7 +177,8 @@
           }
         ],
         where: { ...defaultWhere },
-        typeList: []
+        typeList: [],
+        isFirst: false
       };
     },
 
@@ -188,7 +190,6 @@
 
     methods: {
       datasource({ page, where, limit }) {
-        console.log(1111);
         return getTemplateList({
           qualitySchemeTemplateCode: this.where.qualitySchemeTemplateCode,
           qualitySchemeTemplateName: this.where.qualitySchemeTemplateName,
@@ -223,7 +224,9 @@
       selectionChangeHandle(val) {
         this.selection = val;
       },
-      open() {
+      open(type) {
+        this.isFirst = type ? true : false;
+        this.getInspectionType();
         this.visible = true;
       },
       search() {},
@@ -264,6 +267,15 @@
             return { value: key, label: item[key] };
           });
           this.typeList = list;
+
+          const name = this.typeList.find(
+            (item) => item.label == '首件两检'
+          )?.value;
+
+          if (this.isFirst) {
+            this.where.type = name ? name : '';
+            this.reload();
+          }
         }
       }
     }

+ 48 - 8
src/views/produce/components/qualityInspection/components/selfInspectionRequest.vue

@@ -51,6 +51,7 @@
               v-model="form.executeUserId"
               placeholder="请选择"
               clearable
+              filterable
             >
               <el-option
                 v-for="item in userList"
@@ -109,6 +110,15 @@
         @refresh="getData"
         :selection.sync="selection"
       >
+        <template v-slot:toolbar>
+          <el-button
+            type="primary"
+            @click="addInspection"
+            v-if="this.list.length == 0"
+            >选择质检方案</el-button
+          >
+        </template>
+
         <template v-slot:status="{ row }">
           <el-tag v-if="row.status == 0">待自检</el-tag>
           <el-tag v-if="row.status == 1">请托中</el-tag>
@@ -129,7 +139,7 @@
               <DictSelection
                 clearable
                 dictName="数学字符"
-                disabled
+                :disabled="!isAdd"
                 v-model="row.symbol"
               ></DictSelection>
             </div>
@@ -146,14 +156,14 @@
               <el-input
                 style="width: 45%"
                 v-model="row.minValue"
-                disabled
+                :disabled="!isAdd"
               ></el-input>
               <span>&nbsp;&nbsp;-</span>
 
               <el-input
                 style="width: 45%; margin-left: 10px"
                 v-model="row.maxValue"
-                disabled
+                :disabled="!isAdd"
               ></el-input>
             </div>
 
@@ -161,7 +171,7 @@
               <el-input
                 v-model="row.defaultValue"
                 placeholder="请输入"
-                disabled
+                :disabled="!isAdd"
               >
               </el-input>
             </div>
@@ -171,7 +181,7 @@
                 dictName="工艺参数单位"
                 clearable
                 filterable
-                disabled
+                :disabled="!isAdd"
                 v-model="row.unitName"
               >
               </DictSelection>
@@ -185,6 +195,11 @@
       <el-button @click="visible = false">取 消</el-button>
       <el-button type="primary" @click="submitSelf">提交</el-button>
     </span>
+
+    <inspectionTemplatePop
+      ref="inspectionTemplateRef"
+      @changeSel="changeSel"
+    ></inspectionTemplatePop>
   </ele-modal>
 </template>
 
@@ -192,11 +207,14 @@
   import { listOrganizations, getUserPage } from '@/api/system/organization';
   import {
     getDetail,
-    inspectionRequest
+    inspectionRequest,
+    addInspectionsTerm
   } from '@/api/produce/qualityInspection.js';
   import deptSelect from '@/components/CommomSelect/dept-select.vue';
+  import { getTemplateById } from '@/api/produce/bom.js';
+  import inspectionTemplatePop from '@/views/produce/components/bom/qualityTesting/inspectionTemplate.vue';
   export default {
-    components: { deptSelect },
+    components: { deptSelect, inspectionTemplatePop },
 
     data() {
       return {
@@ -242,7 +260,8 @@
             name: '紧急',
             value: 2
           }
-        ]
+        ],
+        isAdd: false
       };
     },
 
@@ -328,6 +347,27 @@
         this.userList = list || [];
       },
 
+      addInspection() {
+        this.$refs.inspectionTemplateRef.open('first');
+      },
+
+      async changeSel(list) {
+        await getTemplateById(list.id).then(({ data }) => {
+          data.inspectionItemVOList.forEach((item) => {
+            item.qualitySchemeTemplateCode = data.qualitySchemeTemplateCode;
+            item.qualitySchemeTemplateName = data.qualitySchemeTemplateName;
+          });
+          this.isAdd = true;
+          this.addInspectionsTerm(data.inspectionItemVOList);
+        });
+      },
+
+      async addInspectionsTerm(list) {
+        const res = await addInspectionsTerm(...list);
+
+        console.log(res);
+      },
+
       submitSelf() {
         this.$refs.form.validate((valid) => {
           if (!valid) {

+ 1 - 18
src/views/produce/components/qualityInspection/index.vue

@@ -198,22 +198,6 @@
         this.getData();
       },
 
-      // 获取数据
-      // async getData() {
-      //   this.loading = true;
-      //   const data = await getQualityInspectionList({
-      //     workOrderId: this.workOrder.id,
-      //     produceTaskId:
-      //       this.type == 1
-      //         ? this.produceTaskInfo.sourceTaskId
-      //         : this.produceTaskInfo.id,
-      //     produceTaskInstanceId:
-      //       this.type == 1 ? this.produceTaskInfo.id : this.workOrder.taskId
-      //   });
-      //   this.list = data.list || [];
-      //   this.loading = false;
-      // },
-
       // 获取数据
       async getData() {
         this.loading = true;
@@ -228,8 +212,7 @@
               : this.produceTaskInfo?.id,
             produceTaskInstanceId: isSourceTask
               ? this.produceTaskInfo?.id
-              : this.workOrder?.taskId,
-            type: isSourceTask ? 2 : 1
+              : this.workOrder?.taskId
           };
 
           const { list = [] } = await getQualityInspectionList(params);

+ 17 - 8
src/views/produce/index.vue

@@ -920,17 +920,26 @@
             data: this.workData.list
           };
 
-          // const result = await this.checkQualityResult();
-          // if (!result) return;
+          let resultValue = '0';
+          await parameterGetByCode({
+            code: 'first_article_dual_inspection_for_report'
+          }).then((res) => {
+            resultValue = res.value;
+          });
 
-          // const firstArticleResult =
-          //   result.firstArticleDualInspectionResult ?? true;
+          if (resultValue == '1') {
+            const result = await this.checkQualityResult();
+            if (!result) return;
 
-          // this.isFinalCheckProduction = firstArticleResult;
+            const firstArticleResult =
+              result.firstArticleDualInspectionResult ?? true;
 
-          // if (!firstArticleResult) {
-          //   return this.$message.warning('请完成首件两检再报工!');
-          // }
+            this.isFinalCheckProduction = firstArticleResult;
+
+            if (!firstArticleResult) {
+              return this.$message.warning('请完成首件两检再报工!');
+            }
+          }
 
           if (
             this.taskObj.type == 2 ||

+ 290 - 0
src/views/taskList/components/ncReport.vue

@@ -0,0 +1,290 @@
+<template>
+  <ele-modal
+    :before-close="cancel"
+    :close-on-click-modal="false"
+    :maxable="true"
+    :title="title"
+    :visible.sync="detailsVisible"
+    v-if="detailsVisible"
+    append-to-body
+    custom-class="ele-dialog-form"
+    width="75vw"
+  >
+    <el-form
+      ref="form"
+      :model="form"
+      :rules="rules"
+      label-position="right"
+      label-width="110px"
+    >
+      <el-row>
+        <headerTitle style="margin-top: 15px" title="报工信息"></headerTitle>
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item
+            :rules="{
+              required: true,
+              message: '请选择实际开始时间',
+              trigger: 'change'
+            }"
+            label="实际开始时间"
+            prop="realStartTime"
+          >
+            <el-date-picker
+              style="width: 100%"
+              v-model="form.realStartTime"
+              :disabled="type == 'detail'"
+              class="time_select"
+              placeholder="选择实际开始时间"
+              type="datetime"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              @change="handleTimeChange"
+            ></el-date-picker>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item
+            :rules="{
+              required: true,
+              message: '请选择实际结束时间',
+              trigger: 'change'
+            }"
+            label="实际结束时间"
+            prop="realEndTime"
+          >
+            <el-date-picker
+              style="width: 100%"
+              v-model="form.realEndTime"
+              :disabled="type == 'detail'"
+              class="time_select"
+              placeholder="选择实际结束时间"
+              type="datetime"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              @change="handleTimeChange"
+            ></el-date-picker>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item label="牌号" prop="brandNum">
+            <el-input
+              v-model.number="form.brandNum"
+              disabled
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item label="名称" prop="categoryName">
+            <el-input
+              v-model.number="form.categoryName"
+              disabled
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item label="编码" prop="categoryCode">
+            <el-input
+              v-model.number="form.categoryCode"
+              disabled
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item label="任务编号" prop="code">
+            <el-input
+              v-model.number="form.code"
+              disabled
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item label="计划编号" prop="productionPlanCode">
+            <el-input
+              v-model.number="form.productionPlanCode"
+              disabled
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item label="工艺路线" prop="produceRoutingName">
+            <el-input
+              v-model.number="form.produceRoutingName"
+              disabled
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item label="工序名称" prop="taskName">
+            <el-input
+              v-model.number="form.taskName"
+              disabled
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item label="型号" prop="modelType">
+            <el-input
+              v-model.number="form.modelType"
+              disabled
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item label="规格" prop="specification">
+            <el-input
+              v-model.number="form.specification"
+              disabled
+              placeholder="请输入"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="8" :md="12" :sm="12" :xl="8" :xs="12">
+          <el-form-item label="附件" prop="fileParam">
+            <div style="display: flex; align-items: center">
+              <fileMain
+                v-model="form.fileParam"
+                :isDisabled="type == 'detail' ? true : false"
+              ></fileMain>
+              <!-- <fileUpload
+                v-model="form.fileParam"
+                module="main"
+                :limit="100"
+                :showLib="false"
+              >
+              </fileUpload> -->
+            </div>
+          </el-form-item>
+        </el-col>
+
+        <el-col :lg="24" :md="24" :sm="24" :xl="24" :xs="24">
+          <el-form-item label="备注" prop="remark">
+            <el-input
+              type="textarea"
+              :rows="4"
+              placeholder="请输入内容"
+              v-model="form.remark"
+              :disabled="type == 'detail'"
+            >
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-row class="tool_btn" v-if="type != 'detail'">
+        <el-button @click="cancel">取消</el-button>
+        <el-button type="primary" @click="submitAdd">报工</el-button>
+      </el-row>
+    </el-form>
+  </ele-modal>
+</template>
+
+<script>
+  import fileUpload from '@/components/upload/fileUpload';
+  import { ncTaskReport } from '@/api/workOrderList';
+  export default {
+    components: { fileUpload },
+    data() {
+      return {
+        title: '',
+        detailsVisible: '',
+        type: '',
+        form: {
+          realStartTime: '',
+          realEndTime: '',
+          brandNum: '',
+          categoryName: '',
+          categoryCode: '',
+          code: '',
+          productionPlanCode: '',
+          produceRoutingName: '',
+          taskName: '',
+          modelType: '',
+          specification: '',
+          fileParam: [],
+          reportRemark: ''
+        },
+        rules: {
+          realStartTime: [
+            { required: true, message: '请选择实际开始时间', trigger: 'change' }
+          ],
+
+          realEndTime: [
+            { required: true, message: '请选择实际结束时间', trigger: 'change' }
+          ],
+
+          remark: [
+            {
+              required: true,
+              message: '请输入备注',
+              trigger: 'blur'
+            }
+          ]
+        },
+        inputDis: false
+      };
+    },
+    methods: {
+      handleTimeChange() {},
+
+      open(item, type) {
+        this.title = 'nc任务报工';
+        this.type = type ? type : '';
+        this.detailsVisible = true;
+        this.form = JSON.parse(JSON.stringify(item));
+
+        this.$nextTick(() => {
+          this.$refs.form && this.$refs.form.clearValidate();
+        });
+      },
+
+      submitAdd() {
+        this.$refs.form.validate((valid) => {
+          if (!valid) {
+            return false;
+          }
+
+          this.form.fileParam = this.form.fileParam.map((item) => {
+            return { id: item };
+          });
+
+          ncTaskReport(this.form)
+            .then(() => {
+              this.$message.success('报工成功');
+              this.cancel();
+              this.$emit('refreshList');
+            })
+            .catch((err) => {
+              this.$message.error(err.message || '报工失败');
+            });
+        });
+      },
+
+      cancel() {
+        this.detailsVisible = false;
+      }
+    }
+  };
+</script>
+
+<style scoped lang="scss">
+  ::v-deep .tool_btn {
+    text-align: right;
+  }
+</style>

+ 95 - 128
src/views/taskList/index.vue

@@ -44,6 +44,15 @@
             >{{ row.assigneeCode }}
           </el-link>
         </template>
+
+        <template v-slot:code="{ row }" v-if="tabValue == '4'">
+          <el-link
+            :underline="false"
+            type="primary"
+            @click="detailsNC(row, 'detail')"
+            >{{ row.code }}
+          </el-link>
+        </template>
         <template v-slot:workOrderCode="{ row }">
           <el-link
             :underline="false"
@@ -70,16 +79,42 @@
             type="primary"
             @click="details('report', row)"
             v-if="
-              (row.disposalStatus == '1' || tabValue == '2') &&
-              row.totalFirstArticleDualInspectionStatus == 2
+              (row.disposalStatus == '1' &&
+                isInspection == '0' &&
+                tabValue != '4') ||
+              (row.totalFirstArticleDualInspectionStatus == 2 &&
+                isInspection == '1' &&
+                tabValue != '4')
             "
             >报工
           </el-link>
+
+          <el-link
+            :underline="false"
+            type="primary"
+            @click="details('report', row)"
+            v-if="tabValue == '4' && !row.status"
+            >报工
+          </el-link>
+          <!-- <el-link
+            :underline="false"
+            type="primary"
+            @click="details('report', row)"
+            v-if="
+              ((row.disposalStatus == '1' || tabValue == '2') &&
+                row.totalFirstArticleDualInspectionStatus == 2) ||
+              (!row.totalFirstArticleDualInspectionStatus &&
+                row.totalFirstArticleDualInspectionStatus != 0 &&
+                tabValue == '4' &&
+                row.status.code != 5)
+            "
+            >报工
+          </el-link> -->
           <el-link
             :underline="false"
             type="primary"
             @click="viewRecords(row.id)"
-            v-if="row.disposalStatus == '1' || tabValue == '2'"
+            v-if="row.disposalStatus == '1'"
             >报工记录
           </el-link>
 
@@ -92,8 +127,9 @@
             type="primary"
             @click="selfRequest(row)"
             v-if="
-              (row.disposalStatus == '1' || tabValue == '2') &&
-              row.hasFirstArticleDualInspection == 1
+              row.disposalStatus == '1' &&
+              tabValue != '4' &&
+              isInspection == '1'
             "
             >首件两检
           </el-link>
@@ -105,7 +141,8 @@
             v-if="
               row.disposalStatus != '1' &&
               row.disposalStatus != '2' &&
-              tabValue != '2'
+              tabValue != '2' &&
+              tabValue != '4'
             "
           >
             <el-button slot="reference" type="text">接收</el-button>
@@ -118,7 +155,8 @@
             v-if="
               row.disposalStatus != '1' &&
               row.disposalStatus != '2' &&
-              tabValue != '2'
+              tabValue != '2' &&
+              tabValue != '4'
             "
           >
             <el-button slot="reference" type="text">拒绝</el-button>
@@ -178,6 +216,8 @@
     </el-dialog>
 
     <qualityInspection ref="qualityInspectionRefs"></qualityInspection>
+
+    <nc-report ref="ncReportRef" @refreshList="reload"></nc-report>
   </div>
 </template>
 
@@ -198,13 +238,16 @@
   } from '@/api/workOrderList';
   import { revokeWork } from '@/api/manufacture/spreadWorkOrder';
   import qualityInspection from '@/views/produce/components/qualityInspection/index.vue';
+  import ncReport from './components/ncReport.vue';
+  import { parameterGetByCode } from '@/api/system/dictionary-data';
 
   export default {
     components: {
       TaskSearch,
       Ddtails,
       modifyDialog,
-      qualityInspection
+      qualityInspection,
+      ncReport
     },
     data() {
       return {
@@ -221,7 +264,8 @@
         },
         dialogFormVisible: false,
         teamList: [],
-        tableHeight: 'calc(100vh - 380px)'
+        tableHeight: 'calc(100vh - 380px)',
+        isInspection: '0'
       };
     },
     computed: {
@@ -554,13 +598,6 @@
             showOverflowTooltip: true,
             width: 200
           },
-          {
-            prop: 'productionCodes',
-            label: '生产编号',
-            align: 'center',
-            showOverflowTooltip: true,
-            width: 170
-          },
           {
             prop: 'brandNum',
             label: '牌号',
@@ -568,13 +605,7 @@
             showOverflowTooltip: true,
             width: 170
           },
-          {
-            prop: 'batchNo',
-            label: '批次号',
-            align: 'center',
-            width: 100,
-            showOverflowTooltip: true
-          },
+
           {
             prop: 'modelType',
             label: '型号',
@@ -589,50 +620,7 @@
             width: 200,
             showOverflowTooltip: true
           },
-          {
-            prop: 'quantity',
-            label: '任务数量',
-            align: 'center',
-            showOverflowTooltip: true,
-            width: 110
-          },
-          {
-            prop: 'weight',
-            label: '任务重量(kg)',
-            align: 'center',
-            showOverflowTooltip: true,
-            width: 110
-          },
-          {
-            prop: 'planStartTime',
-            label: '计划开始时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            width: 180
-          },
-
-          {
-            prop: 'planCompleteTime',
-            label: '计划结束时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            width: 180
-          },
-          {
-            prop: 'startTime',
-            label: '任务开始时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            width: 180
-          },
 
-          {
-            prop: 'endTime',
-            label: '任务结束时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            width: 180
-          },
           {
             label: '实际开始时间',
             prop: 'realStartTime',
@@ -647,20 +635,7 @@
             align: 'center',
             showOverflowTooltip: true
           },
-          {
-            label: '工时',
-            prop: 'durationText',
-            width: 150,
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'firstTaskName',
-            label: '首工序',
-            align: 'center',
-            width: 180,
-            showOverflowTooltip: true
-          },
+
           {
             prop: 'createTime',
             label: '创建时间',
@@ -668,48 +643,17 @@
             showOverflowTooltip: true,
             width: 180
           },
-          {
-            prop: 'statusText',
-            label: '状态',
-            align: 'center',
-            // formatter: (row) => {
-            //   const obj = this.statusOpt.find((i) => i.value == row.status);
-            //   return obj && obj.label;
-            // },
-            width: 120
-          },
-          {
-            prop: 'disposalStatus',
-            label: '任务接收状态',
-            align: 'center',
-            slot: 'disposalStatus',
-            width: 120
-          },
-          {
-            prop: 'customerName',
-            label: '客户名称',
-            align: 'center',
-            showOverflowTooltip: true,
-            width: 180
-          },
-          {
-            prop: 'serialNo',
-            label: '客户代号',
-            align: 'center',
-            showOverflowTooltip: true,
-            width: 180
-          },
 
           {
-            prop: 'simpleName',
-            label: '客户简称',
+            prop: 'remark',
+            label: '订单备注',
             align: 'center',
             showOverflowTooltip: true,
             width: 180
           },
           {
-            prop: 'remark',
-            label: '备注',
+            prop: 'reportRemark',
+            label: '报备注',
             align: 'center',
             showOverflowTooltip: true,
             width: 180
@@ -728,18 +672,7 @@
     },
     created() {},
     mounted() {
-      // if (this.$hasPermission('mes:taskreport:allorder')) {
-      //   this.tabValue = '2';
-      // }
-      // if (this.$hasPermission('mes:taskreport:myorder')) {
-      //   this.tabValue = '1';
-      // }
-      // if (
-      //   !this.$hasPermission('mes:taskreport:myorder') &&
-      //   !this.$hasPermission('mes:taskreport:allorder')
-      // ) {
-      //   this.tabValue = '';
-      // }
+      this.getInspections();
     },
     methods: {
       handleTabClick(e) {
@@ -811,6 +744,14 @@
         // if()
       },
 
+      async getInspections() {
+        await parameterGetByCode({
+          code: 'first_article_dual_inspection_for_report'
+        }).then((res) => {
+          this.isInspection = res.value ? res.value : '0';
+        });
+      },
+
       async chooseUser() {
         if (!this.form.userId) {
           return this.$message.warning('请选择转派人员');
@@ -861,6 +802,10 @@
         this.$refs.selfReportingRef.open(row, type);
       },
 
+      detailsNC(item, type) {
+        this.$refs.ncReportRef.open(item, type);
+      },
+
       // async receiveTask(item) {
       //   await taskManagement({
       //     id: item.id,
@@ -943,7 +888,29 @@
           reportQuantity: row.reportQuantity,
           lossQuantity: row.lossQuantity
         };
-        this.$refs.detailsRef.open(type, currentRow, form);
+        if (this.tabValue == '4') {
+          const data = {
+            realStartTime: '',
+            realEndTime: '',
+            brandNum: row.brandNum,
+            categoryName: row.categoryName,
+            categoryCode: row.categoryCode,
+            code: row.code,
+            productionPlanCode: row.productionPlanCode,
+            produceRoutingName: row.produceRoutingName,
+            taskName: row.taskName,
+            modelType: row.modelType,
+            specification: row.specification,
+            fileParam: [],
+            reportRemark: row.reportRemark,
+            id: row.id,
+            sourceTaskId: row.sourceTaskId
+          };
+
+          this.$refs.ncReportRef.open(data);
+        } else {
+          this.$refs.detailsRef.open(type, currentRow, form);
+        }
       },
       viewRecords(apsAssigneeId) {
         listUpdateRealTimeRecord(apsAssigneeId)