695593266@qq.com 1 год назад
Родитель
Сommit
bc7c05df25

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

@@ -32,3 +32,21 @@ export async function getWarehouseList(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 查询工单详情
+export async function getDetailById(id) {
+  const res = await request.get(`/qms/quality_work_order/getDetailById/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 查询计划详情
+export async function planDetails(id) {
+  const res = await request.get(`/qms/quality_plan/getDetailByld/${id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 14 - 14
src/views/produce/components/footBtn.vue

@@ -82,7 +82,7 @@
             name: '异常',
             type: 'error',
             bjColor: '#cc0000'
-          },
+          }
           // {
           //   name: 'BOM',
           //   type: 'bom',
@@ -175,11 +175,11 @@
           }
         ],
         btnList4: [
-          {
-            name: '取样质检',
-            type: 'inspection',
-            bjColor: '#FBD114'
-          },
+          // {
+          //   name: '取样质检',
+          //   type: 'inspection',
+          //   bjColor: '#FBD114'
+          // },
           {
             name: '报工',
             type: 'job',
@@ -284,14 +284,14 @@
           //     this.btnList2.splice(0, 1);
           //   }
           // } else
-          if (v == 0 && this.clientEnvironmentId == 2) {
-            let arr = {
-              name: '取样质检',
-              type: 'inspection',
-              bjColor: '#FBD114'
-            };
-            this.btnList2.unshift(arr);
-          }
+          // if (v == 0 && this.clientEnvironmentId == 2) {
+          //   let arr = {
+          //     name: '取样质检',
+          //     type: 'inspection',
+          //     bjColor: '#FBD114'
+          //   };
+          //   this.btnList2.unshift(arr);
+          // }
         }
       }
     },

+ 4 - 0
src/views/produce/components/jobBooking/components/batchPackagingGrouping.vue

@@ -906,6 +906,10 @@
 
         this.objData.packInfo = packInfo;
         this.objData.taskType = this.objData.currentTaskDiagram.type;
+
+        console.log(this.objData.packInfo, 'this.objData.packInfo')
+
+        return
       },
 
       calculation() {

+ 18 - 2
src/views/produce/components/jobBooking/components/detailPackagingGrouping.vue

@@ -46,7 +46,7 @@
               <div class="item">
                 <div class="lable rx-cc">包装总数 </div>
                 <div class="content content_num">
-                  <span>{{ item.splitList.length }}</span>
+                  <span>{{ totalNumber }}</span>
                   <div class="unit">{{ item.packageUnit }}</div>
                 </div>
               </div>
@@ -235,7 +235,8 @@
             value: 4
           }
         ],
-        cacheKeyUrlMin: 'cacheKeyUrlMin'
+        cacheKeyUrlMin: 'cacheKeyUrlMin',
+        totalNumber: 0
         // clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo").clientEnvironmentId,
       };
     },
@@ -501,6 +502,21 @@
           // conversionUnit: this.objData.packInfo.minimumConversionUnit
         });
       }
+
+      if (this.objData.product && this.objData.product.length != 0) {
+        this.totalNumber = this.objData.product.reduce((acc, pro) => {
+          return pro.feedQuantity ? acc + Number(pro.feedQuantity) : acc;
+        }, 0);
+      }
+
+      if (
+        this.objData.semiProductList &&
+        this.objData.semiProductList.length != 0
+      ) {
+        this.totalNumber = this.objData.product.reduce((acc, pro) => {
+          return pro.feedQuantity ? acc + Number(pro.feedQuantity) : acc;
+        }, 0);
+      }
     },
 
     methods: {

+ 0 - 1
src/views/produce/components/jobBooking/details.vue

@@ -186,7 +186,6 @@
 
           <div
             v-if="
-              clientEnvironmentId != 2 &&
               objData &&
               objData.currentTaskDiagram.type == 4 &&
               clientEnvironmentId != 3

+ 3 - 10
src/views/produce/components/jobBooking/index.vue

@@ -165,8 +165,7 @@
             item.product &&
             item.product.length != 0 &&
             item.singleReport == 0 &&
-            clientEnvironmentId != 3 &&
-            clientEnvironmentId != 2
+            clientEnvironmentId != 3
           "
           :item="item"
           :list="item.product"
@@ -293,7 +292,6 @@
 
         <div
           v-if="
-            clientEnvironmentId != 2 &&
             item &&
             item.currentTaskDiagram.type == 4 &&
             clientEnvironmentId != 3
@@ -604,8 +602,7 @@
                 } else if (
                   this.taskObj.type == 4 &&
                   obj.singleReport == 0 &&
-                  this.clientEnvironmentId != 3 &&
-                  this.clientEnvironmentId != 2
+                  this.clientEnvironmentId != 3
                 ) {
                   if (obj.pickOutInList && obj.pickOutInList.length != 0) {
                     obj.product = obj.pickOutInList;
@@ -1073,11 +1070,7 @@
         }
 
         console.log(this.item, '9999999999');
-        if (
-          this.taskObj.type == 4 &&
-          this.clientEnvironmentId != 3 &&
-          this.clientEnvironmentId != 2
-        ) {
+        if (this.taskObj.type == 4 && this.clientEnvironmentId != 3) {
           this.checkPack();
 
           // if (!isPack) {

+ 5 - 1
src/views/produce/components/outsourcing/index.vue

@@ -1,6 +1,10 @@
 <template>
   <div class="index_box">
     <div class="c_header_title">
+      <!-- <el-tabs type="border-card">
+        <div class="c_title">委外记录</div>
+        <div class="c_title">请托记录</div>
+      </el-tabs> -->
       <div class="c_title">委外记录</div>
     </div>
     <div>
@@ -123,7 +127,7 @@
           </el-select>
         </el-form-item>
 
-        <el-form-item label="计划交期:" prop="requireDeliveryTime">
+        <el-form-item label="交付交期:" prop="requireDeliveryTime">
           <el-date-picker
             v-model="attributeData.requireDeliveryTime"
             value-format="yyyy-MM-dd HH:mm:ss"

+ 73 - 73
src/views/produce/components/warehousing/index.vue

@@ -202,7 +202,6 @@
             item.currentTaskDiagram.type == 5 &&
             item.singleReport == 1 &&
             clientEnvironmentId != 3 &&
-            clientEnvironmentId != 2 &&
             item.semiProductList
           "
         >
@@ -306,7 +305,6 @@
 
         <div
           v-if="
-            clientEnvironmentId != 2 &&
             item.product &&
             item.currentTaskDiagram.type == 5 &&
             clientEnvironmentId != 3 &&
@@ -410,7 +408,7 @@
           <!-- </div> -->
         </div>
 
-        <div v-if="clientEnvironmentId == 2">
+        <!-- <div v-if="clientEnvironmentId == 2">
           <div class="item">
             <div>
               <div class="text">仓库</div>
@@ -455,7 +453,7 @@
               </div>
             </div>
           </div>
-        </div>
+        </div> -->
 
         <!-- item.currentTaskDiagram.type == 4 ? item.pickOutInList : item.semiProductList -->
 
@@ -822,75 +820,77 @@
             .catch((e) => {
               this.loading.close();
             });
-        } else if (this.clientEnvironmentId == 2) {
-          if (!this.warehouseId) {
-            return this.$message.warning('请选择仓库');
-          }
-
-          const listData = this.List.map((item) => {
-            let categoryId = '',
-              rootCategoryLevelId = '';
-            if (item.product.length) {
-              categoryId = item.categoryId;
-              rootCategoryLevelId = item.rootCategoryLevelId;
-            }
-
-            let storageInfo = {
-              inWarehouseSpecType:
-                this.clientEnvironmentId !== 3 || this.clientEnvironmentId !== 2
-                  ? Number(this.inWarehouseSpecType)
-                  : '',
-              warehouseId: this.warehouseId,
-              inWarehouseType: this.inWarehouseType,
-              toWarehouseList: this.clientEnvironmentId == 3 ? this.tgList : []
-            };
-
-            if (this.clientEnvironmentId == 2) {
-              let num = '';
-              if (item.workReportInfo && item.workReportInfo?.formedNum) {
-                num = item.workReportInfo.formedNum;
-              }
-
-              storageInfo.packingReportList = [
-                {
-                  code: item.productCode,
-                  categoryId: categoryId,
-                  workOrderId: item.workOrderId,
-                  rootCategoryLevelId: rootCategoryLevelId,
-                  totalQuantity: num,
-                  quantity: num,
-                  unit: item.unit,
-                  packingNum: 1,
-                  taskId: -1
-                }
-              ];
-              item.storageInfo = storageInfo;
-            }
-
-            return {
-              ...item
-            };
-          });
-
-          console.log(listData, 'listData');
-          this.loading = this.$loading({
-            lock: true,
-            text: '加载中',
-            background: 'rgba(0, 0, 0, 0.7)'
-          });
-
-          jobSave(listData)
-            .then((res) => {
-              console.log(res);
-              this.$message.success('入库成功');
-              this.loading.close();
-              this.getList(this.idsList);
-              this.$emit('warehouseSuccess', 'warehouseSuccess');
-            })
-            .catch((e) => {
-              this.loading.close();
-            });
-        } else if (this.clientEnvironmentId == 3) {
+        }
+        // else if (this.clientEnvironmentId == 2) {
+        //   if (!this.warehouseId) {
+        //     return this.$message.warning('请选择仓库');
+        //   }
+
+        //   const listData = this.List.map((item) => {
+        //     let categoryId = '',
+        //       rootCategoryLevelId = '';
+        //     if (item.product.length) {
+        //       categoryId = item.categoryId;
+        //       rootCategoryLevelId = item.rootCategoryLevelId;
+        //     }
+
+        //     let storageInfo = {
+        //       inWarehouseSpecType:
+        //         this.clientEnvironmentId !== 3 || this.clientEnvironmentId !== 2
+        //           ? Number(this.inWarehouseSpecType)
+        //           : '',
+        //       warehouseId: this.warehouseId,
+        //       inWarehouseType: this.inWarehouseType,
+        //       toWarehouseList: this.clientEnvironmentId == 3 ? this.tgList : []
+        //     };
+
+        //     if (this.clientEnvironmentId == 2) {
+        //       let num = '';
+        //       if (item.workReportInfo && item.workReportInfo?.formedNum) {
+        //         num = item.workReportInfo.formedNum;
+        //       }
+
+        //       storageInfo.packingReportList = [
+        //         {
+        //           code: item.productCode,
+        //           categoryId: categoryId,
+        //           workOrderId: item.workOrderId,
+        //           rootCategoryLevelId: rootCategoryLevelId,
+        //           totalQuantity: num,
+        //           quantity: num,
+        //           unit: item.unit,
+        //           packingNum: 1,
+        //           taskId: -1
+        //         }
+        //       ];
+        //       item.storageInfo = storageInfo;
+        //     }
+
+        //     return {
+        //       ...item
+        //     };
+        //   });
+
+        //   console.log(listData, 'listData');
+        //   this.loading = this.$loading({
+        //     lock: true,
+        //     text: '加载中',
+        //     background: 'rgba(0, 0, 0, 0.7)'
+        //   });
+
+        //   jobSave(listData)
+        //     .then((res) => {
+        //       console.log(res);
+        //       this.$message.success('入库成功');
+        //       this.loading.close();
+        //       this.getList(this.idsList);
+        //       this.$emit('warehouseSuccess', 'warehouseSuccess');
+        //     })
+        //     .catch((e) => {
+        //       this.loading.close();
+        //     });
+        // }
+        else if (this.clientEnvironmentId == 3) {
           let _arr = [];
 
           console.log(this.List, 'this.List');

+ 78 - 23
src/views/produce/components/workPlan/components/baseInfo.vue

@@ -159,32 +159,40 @@
         </el-col>
       </el-row>
       <el-row>
-        <!-- <el-col :span="6">
-          <el-form-item label="合格数:" prop="qualifiedNumber">
+        <el-col :span="6">
+          <el-form-item
+            label="合格数:"
+            prop="qualifiedNumber"
+            v-if="showArrange == '1'"
+          >
             <el-input
               type="number"
               :min="0"
               disabled
               @input="limitation('qualifiedNumber')"
-              @blur="quantityCalculation"
+              @blur="quantityCalculation('qualifiedNumber')"
               v-model="form.qualifiedNumber"
               placeholder="请输入"
             ></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="6">
-          <el-form-item label="不合格数:" prop="noQualifiedNumber">
+          <el-form-item
+            label="不合格数:"
+            prop="noQualifiedNumber"
+            v-if="showArrange == '1'"
+          >
             <el-input
               type="number"
               :min="0"
               disabled
               @input="limitation('noQualifiedNumber')"
-              @blur="quantityCalculation"
+              @blur="quantityCalculation('noQualifiedNumber')"
               v-model="form.noQualifiedNumber"
               placeholder="请输入"
             ></el-input>
           </el-form-item>
-        </el-col> -->
+        </el-col>
         <el-col :span="6">
           <el-form-item label="合格率:" prop="qualificationRate">
             <el-input v-model="form.qualificationRate" disabled />
@@ -288,7 +296,7 @@
               v-model="form.qualityResults"
               placeholder="请选择"
               style="width: 100%"
-              disabled
+              :disabled="showArrange == '0'"
             >
               <el-option label="合格" :value="1" />
               <el-option label="不合格" :value="2" />
@@ -296,6 +304,37 @@
           </el-form-item>
         </el-col>
 
+        <el-col :span="6">
+          <el-form-item label="总重量:" prop="totalWeight">
+            <el-input
+              type="number"
+              :disabled="btnType == 'detail'"
+              v-model="form.totalWeight"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="总数量:" prop="total">
+            <el-input
+              type="number"
+              v-model="form.total"
+              @input="inputTotal"
+              disabled
+            />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="showArrange == '1' ? 24 : 12">
+          <el-form-item label="备注:" prop="remark">
+            <el-input
+              type="textarea"
+              v-model="form.remark"
+              placeholder="请输入"
+              :disabled="btnType == 'detail'"
+            />
+          </el-form-item>
+        </el-col>
+
         <el-col :span="6" v-if="parseInt(qualityType1) == 2">
           <el-form-item label="工艺路线:">
             <el-input
@@ -350,7 +389,7 @@
             />
           </el-form-item>
         </el-col> -->
-        <el-col :span="6">
+        <!-- <el-col :span="6">
           <el-form-item label="备注:" prop="remark">
             <el-input
               type="textarea"
@@ -359,7 +398,7 @@
               :disabled="btnType == 'detail'"
             />
           </el-form-item>
-        </el-col>
+        </el-col> -->
         <el-col :span="8">
           <el-form-item label="附件:" prop="accessory">
             <fileUpload
@@ -384,7 +423,7 @@
   import { getUserPage } from '@/api/system/organization';
 
   import { getProduceTaskList } from '@/api/aps';
-  import { getByCode } from '@/api/system/dictionary-data';
+  import { getByCode, parameterGetByCode } from '@/api/system/dictionary-data';
 
   export default {
     components: {
@@ -481,14 +520,28 @@
         produceTaskList: [],
         inspectionStandardsList: [],
         qualityModeList: [],
-        isExpanded: false
+        isExpanded: false,
+        showArrange: '1'
       };
     },
     created() {
       this.getDictListIqoCode('measurement_type');
       this.getQualityModeList('quality_method_code');
+      // 是否展示合格不合格
+      this.getCode();
     },
     methods: {
+      getCode() {
+        parameterGetByCode({
+          code: 'qms_show_arrange'
+        }).then((res) => {
+          if (res) {
+            this.showArrange = res.value || '1';
+            // this.time_calc_code = res.value || '0';
+          }
+        });
+      },
+
       // *** 只能输入大于0的数字
       limitation(val) {
         this.form[val] =
@@ -496,18 +549,20 @@
       },
       // *** 计算合格数 不合格数
       quantityCalculation() {
-        // let qualifiedNumber = this.form.qualifiedNumber - 0;
-        // let noQualifiedNumber = this.form.noQualifiedNumber - 0;
-        // let total = qualifiedNumber + noQualifiedNumber;
-        // let passRate = ((qualifiedNumber / total) * 100).toFixed(2);
-        // let failureRate = ((noQualifiedNumber / total) * 100).toFixed(2);
-        // this.form.qualificationRate = passRate + '%';
-        // this.form.noQualificationRate = failureRate + '%';
-        // if (total != this.form.total) {
-        //   this.$message.warning('合格数加上不合格数需要等于总数量');
-        //   return false;
-        // }
-        // return true;
+        let qualifiedNumber = this.form.qualifiedNumber - 0;
+        let noQualifiedNumber = this.form.noQualifiedNumber - 0;
+        let total = qualifiedNumber + noQualifiedNumber;
+        if (total != this.form.total) {
+          let val =
+            e == 'qualifiedNumber' ? 'noQualifiedNumber' : 'qualifiedNumber';
+          this.$message.warning('合格数加上不合格数需要等于总数量');
+          this.form[e] = this.form.total - this.form[val];
+          return false;
+        }
+        let passRate = ((qualifiedNumber / total) * 100).toFixed(2);
+        let failureRate = ((noQualifiedNumber / total) * 100).toFixed(2);
+        this.form.qualificationRate = passRate + '%';
+        this.form.noQualificationRate = failureRate + '%';
         return true;
       },
 

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

@@ -0,0 +1,354 @@
+<template>
+  <ele-modal
+    :visible.sync="visible"
+    v-if="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="true"
+    :close-on-press-escape="false"
+    :maxable="true"
+    append-to-body
+    width="90%"
+  >
+    <div class="ele-body">
+      <el-card shadow="never" class="tabs_box">
+        <el-tabs v-model="activeName" type="card">
+          <el-tab-pane label="基本信息" name="1">
+            <el-form ref="form1" :model="form" label-width="94px">
+              <el-row>
+                <el-col
+                  :span="item.span"
+                  v-for="(item, index) in infoList"
+                  :key="index"
+                >
+                  <el-form-item :label="`${item.label}:`">
+                    <el-input :value="form[item.prop]" disabled />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="样品数">
+                    <el-input :value="form.sampleQuantity" disabled />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="合格数">
+                    <el-input :value="form.qualifiedNumber" disabled />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="不合格数">
+                    <el-input :value="form.noQualifiedNumber" disabled />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6" v-for="el in disposeTypeList">
+                  <el-form-item :label="disposalName(el.disposeType)">
+                    <el-input :value="el.measureQuantity" disabled />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item label="备注">
+                    <el-input :value="form.remark" disabled />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+          </el-tab-pane>
+          <el-tab-pane label="样品信息" name="2">
+            <el-form label-width="110px">
+              <el-row>
+                <el-col :span="6" v-if="showArrange == '1'">
+                  <el-form-item label="样品合格数:">
+                    <el-input
+                      disabled
+                      v-model="form.sampleQualifiedNumber"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6" v-if="showArrange == '1'">
+                  <el-form-item label="样品不合格数:">
+                    <el-input
+                      disabled
+                      v-model="form.sampleNoQualifiedNumber"
+                    ></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="样品合格率:">
+                    <el-input v-model="form.sampleQualificationRate" disabled />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="样品不合格率:">
+                    <el-input
+                      v-model="form.sampleNoQualificationRate"
+                      disabled
+                    />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="6">
+                  <el-form-item label="样品类型:">
+                    <el-input
+                      disabled
+                      :value="sampletypeVal(form.conditionType)"
+                    />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="样品数量:">
+                    <el-input disabled v-model="form.sampleQuantity" />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                  <el-form-item label="样品重量:">
+                    <el-input disabled v-model="form.sampleWeight" />
+                  </el-form-item>
+                </el-col>
+              </el-row>
+            </el-form>
+          </el-tab-pane>
+          <el-tab-pane label="质检内容" name="3">
+            <el-tabs v-model="inspectionName">
+              <el-tab-pane label="来源清单" name="1">
+                <ele-pro-table
+                  :columns="tableColumns1"
+                  :datasource="sourceData1"
+                  :initLoad="false"
+                  :needPage="false"
+                  :toolkit="[]"
+                  height="calc(100vh - 330px)"
+                >
+                </ele-pro-table>
+              </el-tab-pane>
+              <el-tab-pane label="样品清单" name="2">
+                <ele-pro-table
+                  :columns="tableColumns2"
+                  :datasource="sourceData2"
+                  :initLoad="false"
+                  :needPage="false"
+                  :toolkit="[]"
+                  height="calc(100vh - 330px)"
+                >
+                </ele-pro-table
+              ></el-tab-pane>
+              <el-tab-pane label="质检方案" name="3">
+                <ele-pro-table
+                  :columns="tableColumns3"
+                  :datasource="sourceData3"
+                  :initLoad="false"
+                  :needPage="false"
+                  :toolkit="[]"
+                  height="calc(100vh - 330px)"
+                >
+                </ele-pro-table
+              ></el-tab-pane>
+            </el-tabs>
+          </el-tab-pane>
+          <el-tab-pane label="样品处置" name="4">
+            <ele-pro-table
+              :columns="tableColumns4"
+              :datasource="sourceData4"
+              :initLoad="false"
+              :needPage="false"
+              :toolkit="[]"
+              height="calc(100vh - 260px)"
+            >
+            </ele-pro-table>
+          </el-tab-pane>
+          <el-tab-pane label="不良品处置" name="5">
+            <ele-pro-table
+              :columns="tableColumns5"
+              :datasource="sourceData5"
+              :initLoad="false"
+              :needPage="false"
+              :toolkit="[]"
+              height="calc(100vh - 260px)"
+            >
+            </ele-pro-table>
+          </el-tab-pane>
+        </el-tabs>
+        <!-- <el-button class="go_back" @click="goBack">返回</el-button> -->
+      </el-card>
+    </div>
+  </ele-modal>
+</template>
+
+<script>
+  import { getDetailById, planDetails } from '@/api/produce/workPlan';
+  import detailMixins from './mixins/detailMixins';
+  import { parameterGetByCode, getByCode } from '@/api/system/dictionary-data';
+  export default {
+    mixins: [detailMixins],
+    data() {
+      return {
+        activeName: '1',
+        inspectionName: '1',
+        sourceData1: [],
+        sourceData2: [],
+        sourceData3: [],
+        sourceData4: [],
+        sourceData5: [],
+        disposeTypeList: [],
+        form: {},
+        showArrange: '0',
+        visible: false,
+        itemData: {}
+      };
+    },
+    computed: {
+      sampletypeVal() {
+        return (row) => {
+          if (row == 1) return '整样';
+          if (row == 2) return '小样';
+          return '';
+        };
+      },
+      disposalName() {
+        return (type) => {
+          return this.disposeTypeMap[type] || '';
+        };
+      }
+    },
+    created() {
+      // this.getData();
+      // 是否展示合格不合格
+      // this.getCode();
+    },
+    methods: {
+      getCode() {
+        parameterGetByCode({
+          code: 'qms_show_arrange'
+        }).then((res) => {
+          if (res) {
+            this.showArrange = res.value || '1';
+            // this.time_calc_code = res.value || '0';
+          }
+        });
+      },
+
+      open(item) {
+        this.itemData = item;
+        this.getCode();
+        this.getData();
+        this.visible = true;
+      },
+
+      async getData() {
+        // let id = this.$route.query.id;
+        // let name = this.$route.query.name;
+        let id = this.itemData.id;
+        let name = '工单';
+        try {
+          const api = name == '计划' ? planDetails : getDetailById;
+          const result = await api(id);
+          console.log(result, 'result');
+          const res = result.data;
+          let obj = {};
+          this.infoList.map((item) => {
+            obj[item.prop] = res[item.prop];
+          });
+          this.form = obj;
+          this.fieldAssign(res, obj);
+          this.sampleInfo(res);
+        } catch (err) {
+          console.log(err, 'err');
+        }
+      },
+      sampleInfo(res) {
+        this.$set(
+          this.form,
+          'sampleNoQualifiedNumber',
+          res.sampleNoQualifiedNumber
+        );
+        this.$set(
+          this.form,
+          'sampleQualificationRate',
+          res.sampleQualificationRate
+        );
+        this.$set(
+          this.form,
+          'sampleNoQualificationRate',
+          res.sampleNoQualificationRate
+        );
+        this.$set(this.form, 'conditionType', res.conditionType);
+        this.$set(this.form, 'sampleQuantity', res.sampleQuantity);
+        this.$set(this.form, 'sampleWeight', res.sampleWeight);
+        this.$set(this.form, 'qualifiedNumber', res.qualifiedNumber);
+        this.$set(this.form, 'noQualifiedNumber', res.noQualifiedNumber);
+        this.$set(this.form, 'remark', res.remark);
+        this.sourceData5 = res.unqualifiedDetail || [];
+        this.sourceData4 = res.qualitySampleList || [];
+        this.sourceData2 = res.qualitySampleList || [];
+        this.sourceData3 = res.templateList || [];
+        this.sourceData1 = res.qualityInventoryList || [];
+        this.disposeTypeList = res.disposeTypeList || [];
+      },
+      async fieldAssign(res, obj) {
+        if (res.qualityMode == 1) {
+          obj.qualityModeName = '全检';
+        } else if (res.qualityMode == 2) {
+          obj.qualityModeName = '抽检';
+        } else {
+          obj.qualityModeName = '';
+        }
+        if (res.qualityResults == 1) {
+          obj.qualityResultsName = '全检';
+        } else if (res.qualityResults == 2) {
+          obj.qualityResultsName = '抽检';
+        } else {
+          obj.qualityResultsName = '';
+        }
+        let val = res.inspectionStandards;
+        obj.inspectionStandardsName = await this.getDictListIqoCode(val);
+      },
+      async getDictListIqoCode(value) {
+        let { data: res } = await getByCode('measurement_type');
+        if (value > 0) {
+          return res[value - 1][value];
+        }
+        return '';
+      },
+      handleClose() {
+        this.visible = false;
+      },
+
+      goBack() {
+        console.log(this.$route.query, '000000000000');
+        let path = this.$route.query.path || '';
+        if (path) {
+          this.$router.push({ path: '/inspectionWork' });
+        } else {
+          this.$router.go(-1);
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .ele-body {
+    width: 100%;
+    height: calc(100% - 32px);
+    box-sizing: border-box;
+
+    .el-card {
+      width: 100%;
+      height: 100%;
+    }
+  }
+
+  ::v-deep .el-tabs__content {
+    margin-top: 16px;
+  }
+
+  .tabs_box {
+    position: relative;
+
+    .go_back {
+      position: absolute;
+      right: 25px;
+      top: 19px;
+      z-index: 99;
+    }
+  }
+</style>

+ 12 - 3
src/views/produce/components/workPlan/detailsIndex.vue

@@ -30,7 +30,7 @@
         <el-link
           type="primary"
           :underline="false"
-          @click="openEdit('detail', row)"
+          @click="openEdits('detail', row)"
           >{{ row.code }}</el-link
         >
       </template>
@@ -125,12 +125,15 @@
     />
 
     <edit ref="editRef" @done="done" />
+
+    <detailsOrder ref="detailsRef" />
   </div>
 </template>
 <script>
   import Certificate from './components/Certificate.vue';
   import search from './components/search.vue';
   import edit from './edit.vue';
+  import detailsOrder from './details.vue';
   import jimureportBrowse from '@/components/jimureport/browseModal.vue';
   import {
     getList,
@@ -158,7 +161,8 @@
       search,
       jimureportBrowse,
       Certificate,
-      edit
+      edit,
+      detailsOrder
     },
     data() {
       return {
@@ -453,6 +457,11 @@
         return res;
       },
 
+      openEdits(type, row) {
+        console.log(this.$refs.detailsRef);
+        this.$refs.detailsRef.open(row);
+      },
+
       // async getSourceList({ page, limit }) {
       //   const res = await getList({
       //     produceSourceTaskId: this.dataWork.taskId,
@@ -537,7 +546,7 @@
       },
       done() {
         console.log(22222);
-        this.$refs.search.search();
+        // this.$refs.search.search();
         // this.getSourceList({
         //   page: 1,
         //   limit: 10

+ 13 - 1
src/views/produce/components/workPlan/edit.vue

@@ -399,6 +399,7 @@
             this.sampleList = [];
           }
         }
+        this.calculate([]);
       },
       //根据类型判断样品清单现实列表数据
       async getProSamList(list) {
@@ -441,6 +442,7 @@
                   });
                 }
                 this.sampleList = ProductSampleList;
+                this.calculate(this.sampleList);
                 const pNum = ProductSampleList.reduce((sum, item) => {
                   return sum + Number(item.weight || 0);
                 }, 0);
@@ -458,6 +460,7 @@
                   });
                 }
                 this.sampleList = ProductSampleList;
+                this.calculate(this.sampleList);
                 const pNum = ProductSampleList.reduce((sum, item) => {
                   return sum + Number(item.weight || 0);
                 }, 0);
@@ -509,6 +512,7 @@
                 });
               }
               this.sampleList = ProductSampleList;
+              this.calculate(this.sampleList);
               const pNum = ProductSampleList.reduce((sum, item) => {
                 return sum + Number(item.weight || 0);
               }, 0);
@@ -526,6 +530,7 @@
                 });
               }
               this.sampleList = ProductSampleList;
+              this.calculate(this.sampleList);
               const pNum = ProductSampleList.reduce((sum, item) => {
                 return sum + Number(item.weight || 0);
               }, 0);
@@ -573,6 +578,7 @@
         }
 
         this.sampleList = dataList;
+        this.calculate(this.sampleList);
         this.sampleNumber = this.sampleList.length;
       },
       // 切换检验方式为全检后生成样品
@@ -877,6 +883,7 @@
         } else if (val == 2) {
           console.log(data, 'datadatadatadataxiaoyang');
         }
+        this.calculate(this.sampleList);
       },
       async handleSampleSubmit(data, specifications) {
         this.sampleList = [];
@@ -924,6 +931,7 @@
           console.error('取样处理失败:', error);
           this.$message.error('取样处理失败');
         }
+        this.calculate(this.sampleList);
       },
       // 当计量类型 是数量的时候 取整样 校验
       validateSampleQuantity(sampleCount, specifications) {
@@ -1048,7 +1056,7 @@
         //   newItem.measureUnit = unit;
         //   return newItem;
         // });
-
+        this.calculate(this.sampleList);
         this.$refs.tabsRef.tabsChange('2');
       },
 
@@ -1355,6 +1363,7 @@
         } else {
           // this.$set(this.sampleList, null, list);
           this.sampleList = list;
+          this.calculate(this.sampleList);
         }
         this.activeName = '2';
         // *** 选完批量质检调用
@@ -1450,6 +1459,7 @@
         ) {
           this.getProSamList(sData);
         }
+        this.calculate(this.sampleList);
       },
 
       //从来源数组取样到目标数组
@@ -1575,6 +1585,7 @@
           this.sampleList = this.sampleList.splice(0, sampleCount);
         }
         this.form.sampleNumber = this.sampleList.length;
+        this.calculate(this.sampleList);
       },
       // 小数点数据判断
       formatNumber(a, b, maxDecimals = 4) {
@@ -1767,6 +1778,7 @@
         }
         // 更改
         this.sampleList = dataList;
+        this.calculate(this.sampleList);
         this.sampleNumber = this.sampleList.length;
       },
 

+ 10 - 2
src/views/produce/components/workPlan/index.vue

@@ -40,7 +40,7 @@
             <el-link
               type="primary"
               :underline="false"
-              @click="openEdit('detail', row)"
+              @click="openEdits('detail', row)"
               >{{ row.code }}</el-link
             >
           </template>
@@ -138,6 +138,8 @@
       />
 
       <edit ref="editRef" @close="close" @done="done" />
+
+      <detailsOrder ref="detailsRef" />
     </div>
   </ele-modal>
 </template>
@@ -145,6 +147,7 @@
   import Certificate from './components/Certificate.vue';
   import search from './components/search.vue';
   import edit from './edit.vue';
+  import detailsOrder from './details.vue';
   import jimureportBrowse from '@/components/jimureport/browseModal.vue';
   import {
     getList,
@@ -162,7 +165,8 @@
       search,
       jimureportBrowse,
       Certificate,
-      edit
+      edit,
+      detailsOrder
     },
     data() {
       return {
@@ -489,6 +493,10 @@
         });
       },
 
+      openEdits(type, row) {
+        this.$refs.detailsRef.open(row);
+      },
+
       async openEdit(type, row) {
         if (type == 'edit') {
           const code = await verificationQualityInspector(row.id);

+ 669 - 0
src/views/produce/components/workPlan/mixins/detailMixins.js

@@ -0,0 +1,669 @@
+const qualityResultList = { 1: '合格', 2: '不合格' };
+const disposalStatustList = { 0: '待处置', 1: '处置中', 2: '处置完成' };
+export default {
+  data() {
+    return {
+      infoList: [
+        {
+          label: '编码',
+          prop: 'code',
+          span: 6
+        },
+        {
+          label: '产品名称',
+          prop: 'productName',
+          span: 6
+        },
+        {
+          label: '产品编码',
+          prop: 'productCode',
+          span: 6
+        },
+        {
+          label: '批次号',
+          prop: 'batchNo',
+          span: 6
+        },
+        {
+          label: '规格',
+          prop: 'specification',
+          span: 6
+        },
+        {
+          label: '型号',
+          prop: 'modelType',
+          span: 6
+        },
+        {
+          label: '牌号',
+          prop: 'brandNo',
+          span: 6
+        },
+        {
+          label: '计量类型',
+          prop: 'inspectionStandardsName',
+          span: 6
+        },
+        {
+          label: '质检部门',
+          prop: 'groupName',
+          span: 6
+        },
+        {
+          label: '质检人',
+          prop: 'qualityName',
+          span: 6
+        },
+
+        {
+          label: '质检时间',
+          prop: 'qualityTime',
+          span: 6
+        },
+        {
+          label: '工时(h)',
+          prop: 'hours',
+          span: 6
+        },
+        {
+          label: '合格率',
+          prop: 'qualificationRate',
+          span: 6
+        },
+        {
+          label: '不合格率',
+          prop: 'noQualificationRate',
+          span: 6
+        },
+        {
+          label: '检验方式',
+          prop: 'qualityModeName',
+          span: 6
+        },
+
+        {
+          label: '质检结果',
+          prop: 'qualityResultsName',
+          span: 6
+        },
+        {
+          label: '总重量',
+          prop: 'totalWeight',
+          span: 6
+        },
+        {
+          label: '总数量',
+          prop: 'total',
+          span: 6
+        },
+      ],
+      disposeTypeMap: {
+        1: '返工',
+        2: '返修',
+        3: '报废',
+        4: '降级使用',
+        5: '让步接收',
+        6: '留样',
+        7: '消耗',
+        8: '回用/归批',
+        9: '转试销',
+        10: '退货'
+      },
+      tableColumns1: [
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          fixed: 'left'
+        },
+        {
+          label: '编码',
+          prop: 'categoryCode',
+          width: 150,
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '名称',
+          prop: 'categoryName',
+          width: '150',
+          align: 'center',
+          width: 120,
+          showOverflowTooltip: true
+        },
+        {
+          label: '批次号',
+          prop: 'batchNo',
+          align: 'center',
+          width: 120,
+          showOverflowTooltip: true
+        },
+        {
+          label: '发货条码',
+          prop: 'barcodes',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '包装编码',
+          prop: 'packageNo',
+          align: 'center',
+          width: 120,
+          showOverflowTooltip: true
+        },
+        { label: '包装数量', prop: 'packingQuantity', align: 'center' },
+        { label: '包装单位', prop: 'packingUnit', align: 'center' },
+        { label: '计量数量', prop: 'measureQuantity', align: 'center' },
+        { label: '计量单位', prop: 'measureUnit', align: 'center' },
+        {
+          label: '物料代号',
+          prop: 'materielDesignation',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '客户代号',
+          prop: 'clientCode',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '供应商名称',
+          prop: 'supplierName',
+          align: 'center',
+          width: 120,
+          showOverflowTooltip: true
+        },
+        {
+          label: '供应商代号',
+          prop: 'supplierCode',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        { label: '刻码', prop: 'engrave', align: 'center' },
+        { label: '重量', prop: 'weight', align: 'center' },
+        { label: '重量单位', prop: 'weightUnit', align: 'center' },
+        {
+          label: '仓库',
+          prop: 'warehouseName',
+          align: 'center',
+          width: 120,
+          showOverflowTooltip: true
+        },
+        { label: '货区', prop: 'areaName', align: 'center' },
+        { label: '货架', prop: 'goodsShelfName', align: 'center' },
+        { label: '货位', prop: 'goodsAllocationName', align: 'center' },
+        {
+          label: '生产日期',
+          prop: 'productionDate',
+          align: 'center',
+          width: 120,
+          showOverflowTooltip: true
+        },
+        {
+          label: '采购日期',
+          prop: 'purchaseDate',
+          align: 'center',
+          width: 120,
+          showOverflowTooltip: true
+        }
+      ],
+      tableColumns2: [
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          fixed: 'left'
+        },
+        {
+          label: '样品编码',
+          prop: 'sampleCode',
+          width: '200',
+          align: 'center',
+          fixed: 'left',
+          showOverflowTooltip: true
+        },
+        {
+          label: '编码',
+          prop: 'categoryCode',
+          align: 'center',
+          fixed: 'left',
+          width: '150',
+          showOverflowTooltip: true
+        },
+        {
+          label: '名称',
+          prop: 'categoryName',
+          align: 'center',
+          width: '150',
+          showOverflowTooltip: true
+        },
+        {
+          label: '批次号',
+          prop: 'batchNo',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '发货条码',
+          prop: 'barcodes',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '包装编码',
+          prop: 'packageNo',
+          align: 'center',
+          width: '170',
+          showOverflowTooltip: true
+        },
+        { label: '包装数量', prop: 'packingQuantity', align: 'center' },
+        { label: '包装单位', prop: 'packingUnit', align: 'center' },
+        { label: '计量数量', prop: 'measureQuantity', align: 'center' },
+        { label: '计量单位', prop: 'measureUnit', align: 'center' },
+        {
+          label: '供应商名称',
+          prop: 'supplierName',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          label: '供应商代号',
+          prop: 'supplierCode',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          label: '物料代号',
+          prop: 'materielDesignation',
+          align: 'center',
+          slot: 'materielDesignation',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          label: '客户代号',
+          prop: 'clientCode',
+          align: 'center',
+          slot: 'clientCode',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          label: '刻码',
+          prop: 'engrave',
+          align: 'center',
+          slot: 'engrave',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          label: '重量',
+          prop: 'weight',
+          align: 'center',
+          slot: 'weight',
+          width: '120'
+        },
+        {
+          label: '重量单位',
+          prop: 'weightUnit',
+          align: 'center',
+          width: 100
+        },
+        {
+          label: '仓库',
+          prop: 'warehouseName',
+          align: 'center',
+          width: 150,
+          showOverflowTooltip: true
+        },
+        {
+          label: '货区',
+          prop: 'areaName',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        { label: '货架', prop: 'goodsShelfName', align: 'center' },
+        { label: '货位', prop: 'goodsAllocationName', align: 'center' },
+        {
+          label: '生产日期',
+          prop: 'productionDate',
+          align: 'center',
+          width: 150,
+          showOverflowTooltip: true
+        },
+        {
+          label: '采购日期',
+          prop: 'purchaseDate',
+          align: 'center',
+          width: 150,
+          showOverflowTooltip: true
+        },
+        {
+          label: '处置状态',
+          prop: 'disposeType',
+          align: 'center',
+          formatter: (_row) => {
+            return this.disposeTypeMap[_row.disposeType] || '';
+          }
+        },
+        {
+          label: '处置时间',
+          prop: 'disposeTime',
+          align: 'center',
+          showOverflowTooltip: true,
+          width: 150
+        },
+        {
+          label: '质检状态',
+          prop: 'qualityStatus',
+          align: 'center',
+          formatter: (row) => {
+            if (row.qualityStatus == 0) {
+              return '未检';
+            }
+            if (row.qualityStatus == 1) {
+              return '已检';
+            }
+            if (row.qualityStatus == 2) {
+              return '待检';
+            }
+          }
+        }
+      ],
+      tableColumns3: [
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          fixed: 'left'
+        },
+        {
+          label: '质检方案编码',
+          prop: 'qualitySchemeTemplateCode',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '质检方案名称',
+          prop: 'qualitySchemeTemplateName',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '质检类型',
+          prop: 'categoryLevelClassName',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '质检项编码',
+          prop: 'inspectionCode',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '质检项名称',
+          prop: 'inspectionName',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '工艺参数',
+          prop: 'defaultValue',
+          align: 'center',
+          showOverflowTooltip: true,
+          slot: 'defaultValue'
+        }
+      ],
+      tableColumns4: [
+        {
+          type: 'index',
+          columnKey: 'index',
+          align: 'center',
+          label: '序号',
+          width: 55,
+          showOverflowTooltip: true
+        },
+        {
+          label: '样品编码',
+          prop: 'sampleCode',
+          minWidth: '150',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '物品编码',
+          prop: 'categoryCode',
+          minWidth: '150',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '物品名称',
+          prop: 'categoryName',
+          minWidth: '180',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'batchNo',
+          label: '批次号',
+          align: 'center',
+          minWidth: '120',
+          showOverflowTooltip: true
+        },
+        {
+          label: '规格',
+          prop: 'specification',
+          width: '120',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '牌号',
+          prop: 'brandNum',
+          width: '120',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'modelType',
+          label: '型号',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'measureQuantity',
+          label: '计量数量',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'measureUnit',
+          label: '计量单位',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+
+        {
+          prop: 'weight',
+          label: '重量',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'weightUnit',
+          label: '重量单位',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'disposalStatus',
+          label: '处置状态',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true,
+          formatter: (row, column, cellValue) => {
+            return disposalStatustList[cellValue ? cellValue : 0];
+          }
+        },
+        {
+          prop: 'disposeType',
+          label: '处置类型',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true,
+          formatter: (row, column, cellValue) => {
+            return this.disposeTypeMap[cellValue];
+          }
+        },
+        {
+          prop: 'qualityResults',
+          label: '质检结果',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true,
+          formatter: (row, column, cellValue) => {
+            return qualityResultList[cellValue];
+          }
+        }
+      ],
+      tableColumns5: [
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          label: '样品编码',
+          prop: 'sampleCode',
+          width: '150',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'categoryCode',
+          label: '物品编码',
+          width: '150',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'categoryName',
+          label: '物品名称',
+          width: '150',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          label: '规格',
+          prop: 'specification',
+          width: '120',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'brandNum',
+          label: '牌号',
+          align: 'center'
+        },
+        {
+          prop: 'modelType',
+          label: '型号',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'batchNo',
+          label: '批次号',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'weight',
+          label: '重量',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'weightUnit',
+          label: '重量单位',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'engrave',
+          label: '刻码',
+          align: 'center'
+        },
+        { label: '计量数量', prop: 'measureQuantity', align: 'center' },
+        { label: '计量单位', prop: 'measureUnit', align: 'center' },
+        {
+          prop: 'produceRoutingName',
+          label: '工艺路线',
+          align: 'center'
+        },
+        {
+          prop: 'produceTaskName',
+          label: '工序',
+          align: 'center'
+        },
+        {
+          prop: 'unqualifiedReason',
+          label: '原因',
+          align: 'center'
+        },
+        {
+          prop: 'disposeTime',
+          label: '处置时间',
+          align: 'center',
+          width: '180',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'disposalStatus',
+          label: '处置状态',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true,
+          formatter: (row, column, cellValue) => {
+            return disposalStatustList[cellValue ? cellValue : 0];
+          }
+        },
+        {
+          prop: 'disposeType',
+          label: '处置类型',
+          align: 'center',
+          width: '120',
+          showOverflowTooltip: true,
+          formatter: (_row) => {
+            return this.disposeTypeMap[_row.disposeType];
+          }
+        }
+      ]
+    };
+  }
+};

+ 1 - 0
src/views/produceOrder/components/details/index.vue

@@ -115,6 +115,7 @@
       open(row) {
         this.workOrderInfo = row;
         this.routeObj.id = this.workOrderInfo.id;
+        console.log(this.workOrderInfo.id, 'workOrderInfo.id');
         this.getTaskFn();
         this.drawer = true;
       },

+ 1 - 0
src/views/produceOrder/index.vue

@@ -480,6 +480,7 @@
             prop: 'planType',
             label: '计划类型',
             align: 'center',
+            showOverflowTooltip: true,
             formatter: (row) => {
               const obj = this.planType.find((i) => i.value == row.planType);
               return obj && obj.label;

+ 16 - 4
src/views/produceOrder/workReport.vue

@@ -152,6 +152,7 @@
                         :workListIds="workListIds"
                         ref="wareRef"
                         @warehouseSuccess="warehouseSuccess"
+                        :workPlanType="workPlanType"
                       ></warehousing>
 
                       <!-- // 设备 入库 -->
@@ -169,6 +170,7 @@
                         ref="jobRef"
                         :reportNeedFeed="reportNeedFeed"
                         @jobSuccess="jobSuccess"
+                        :workPlanType="workPlanType"
                       ></jobBooking>
 
                       <!-- <workPlan
@@ -259,7 +261,7 @@
       <!-- 工艺文件 -->
       <wokePopup ref="wokePopupRef"></wokePopup>
       <!-- 检验报工 -->
-      <workPlan ref="jobRefs"> </workPlan>
+      <workPlan ref="jobRefs" @closeWorkPlan="closeWorkPlan"> </workPlan>
       <!-- <workes ref="jobRefs"> </workes> -->
 
       <!-- :workListIds="workListIds" :taskId="taskObj.id" -->
@@ -395,7 +397,8 @@
         },
         newId: '',
         curTaskObj: null,
-        produceList: []
+        produceList: [],
+        workPlanType: ''
       };
     },
 
@@ -642,6 +645,7 @@
       },
 
       footBtn(t) {
+        this.workPlanType = '';
         // this.operationType = t;
         // 新增判断 *** 出现弹窗的时候不然右边数据消失
         if ((t == 'work' || t == 'workStep', t === 'task')) {
@@ -757,11 +761,15 @@
       },
 
       handIdx(index, item) {
+        console.log(this.routeList, 'routeList');
+        console.log(index, item, 'handIdx');
         if (item.count > 0 || index == this.desIndex) {
           this.taskId = item.taskId;
         } else {
-          this.$message.info('还未执行到此工序');
-          return;
+          if (item.taskId != -2) {
+            this.$message.info('还未执行到此工序');
+            return;
+          }
         }
 
         this.curTaskObj = JSON.parse(JSON.stringify(item));
@@ -826,6 +834,10 @@
         });
       },
 
+      closeWorkPlan(type) {
+        this.workPlanType = type;
+      },
+
       //获取工单列表
       getTaskInstanceByIdFn(workOrderId) {
         getTaskInstanceById(workOrderId).then((res) => {

+ 2 - 2
vue.config.js

@@ -35,13 +35,13 @@ module.exports = {
         // target: 'http://192.168.1.116: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.125:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',
         // target: 'http://192.168.1.211:18086',
         // target: 'http://192.168.1.33:18086',
-        target: 'http://192.168.1.251:18186',
+        // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18087',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {