ysy 1 년 전
부모
커밋
ca624e271d

+ 129 - 54
src/views/produce/components/jobBooking/components/oneJobQualityBomPL.vue

@@ -147,10 +147,17 @@
       </el-table-column>
     </el-table>
 
-    <div style="display: flex; justify-content: center; margin: 12px auto;"  v-if="!isDetails">
-      <el-button size="mini" style="background-color: #157a2c; color: #fff; width: 180px;"  @click="handSample()">取样</el-button>
+    <div
+      style="display: flex; justify-content: center; margin: 12px auto"
+      v-if="!isDetails"
+    >
+      <el-button
+        size="mini"
+        style="background-color: #157a2c; color: #fff; width: 180px"
+        @click="handSample()"
+        >取样</el-button
+      >
     </div>
-     
 
     <div class="title_box rx-bc mt6">
       <div class="name">报工信息 </div>
@@ -158,7 +165,6 @@
       <div class="rx-bc"> </div>
     </div>
 
-
     <el-table
       ref="oneJobQualityBomPL"
       class="table_content"
@@ -168,11 +174,15 @@
       stripe
       border
       :default-expand-all="true"
+      v-if="item.sampleQuality && item.sampleQuality.length > 0"
     >
       <el-table-column type="expand" label="取样" width="80">
         <template slot-scope="{ row, $index }">
-           
-          <div class="material" :key="$index" v-if="row.extInfo.batchReportInfo.length > 0">
+          <div
+            class="material"
+            :key="$index"
+            v-if="row.extInfo.batchReportInfo.length > 0"
+          >
             <div class="btn_end">
               <div class="content_table2">
                 <div class="head row rx-sc">
@@ -181,7 +191,6 @@
                     >报工总重量 /{{ row.extInfo.weightUnit }}
                   </div>
                   <div class="item ww33">处置</div>
-                
                 </div>
 
                 <div class="table">
@@ -231,47 +240,107 @@
                         </el-option>
                       </el-select>
                     </div>
-
-               
                   </div>
                 </div>
               </div>
             </div>
           </div>
 
+          <div
+            class="material"
+            :key="$index"
+            v-if="row.extInfo.batchReportInfo.length == 0"
+          >
+            <div style="display: flex; align-items: center;">
+              质检结果: &nbsp;&nbsp;&nbsp;
+              <el-select
+                size="mini"
+                class="content_num"
+                filterable
+                v-model="row.extInfo.appearance"
+                placeholder="请选择"
+                style="width: 300px;"
+                :disabled="isDetails"
+              >
+                <el-option
+                  v-for="item in qualityList"
+                  :label="item.name"
+                  :value="item.value"
+                  :key="item.value"
+                >
+                </el-option>
+              </el-select>
+
+              &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
+              处置: &nbsp;&nbsp;&nbsp;
+              <el-select
+                size="mini"
+                class="content_num"
+                filterable
+                v-model="row.extInfo.taskId"
+                placeholder="请选择"
+                style="width: 300px;"
+                @change="(e) => selectName2(e, $index)"
+                :disabled="isDetails"
+              >
+              <el-option
+                 v-for="item in stepsList"
+                :label="item.taskTypeName"
+                :value="item.taskId"
+                :key="item.taskId"
+                >
+                 </el-option>
+              </el-select>
+
+            </div>
 
-          <div class="material" :key="$index" v-if="row.extInfo.batchReportInfo.length == 0">
-            <div class="btn_start"  v-for="(qua,qudIdx) in row.extInfo.qualityParam" :key="qudIdx">
-              <el-tag size="mini">质检类型:{{ qua.categoryLevelName}}</el-tag>
-              <div class="content_table2" style="margin-top: 6px;">
-                <div class="head row rx-sc" v-if="qua.parameterStandards.length > 0">
+            <div
+              class="btn_start"
+              v-for="(qua, qudIdx) in row.extInfo.qualityParam"
+              :key="qudIdx"
+            >
+              <el-tag size="mini">质检类型:{{ qua.categoryLevelName }}</el-tag>
+              <div class="content_table2" style="margin-top: 6px">
+                <div
+                  class="head row rx-sc"
+                  v-if="qua.parameterStandards.length > 0"
+                >
                   <div class="item ww33">
-                    {{ qua.parameterStandards[0].singleWeightDivision  != 'undefined undefined' ?  qua.parameterStandards[0].singleWeightDivision : '默认值'}}
+                    {{
+                      qua.parameterStandards[0].singleWeightDivision !=
+                      'undefined undefined'
+                        ? qua.parameterStandards[0].singleWeightDivision
+                        : '默认值'
+                    }}
                   </div>
-                  <div class="item ww33"
-                    >	{{ qua.parameterStandards[0].tolerance   != 'undefined undefined' ?  qua.parameterStandards[0].tolerance : '质检标准'}}
+                  <div class="item ww33">
+                    {{
+                      qua.parameterStandards[0].tolerance !=
+                      'undefined undefined'
+                        ? qua.parameterStandards[0].tolerance
+                        : '质检标准'
+                    }}
                   </div>
                   <div class="item ww33">质检结果参数</div>
-                
                 </div>
 
                 <div class="table" v-if="qua.parameterStandards.length > 0">
                   <div
                     class="tr row rx-sc"
-                  v-for="(quaItem, quaItemIdx) in qua.parameterStandards"
+                    v-for="(quaItem, quaItemIdx) in qua.parameterStandards"
                     :key="quaItemIdx"
                   >
                     <div class="item ww33">
-                      <div >{{quaItem.defaultValue }}</div>
-                
+                      <div>{{ quaItem.defaultValue }}</div>
                     </div>
 
                     <div class="item ww33">
-                      <div>{{ quaItem.symbol }}{{quaItem.toleranceValue }}</div>
-             
+                      <div
+                        >{{ quaItem.symbol }}{{ quaItem.toleranceValue }}</div
+                      >
                     </div>
                     <div class="item ww33 rx-cc">
-                      <div v-if="isDetails">{{  quaItem.remark }}</div>
+                      <div v-if="isDetails">{{ quaItem.remark }}</div>
                       <el-input
                         v-else
                         class="content_num"
@@ -279,9 +348,6 @@
                         v-model="quaItem.remark"
                       ></el-input>
                     </div>
-
-
-               
                   </div>
                 </div>
               </div>
@@ -338,14 +404,7 @@
           {{ row.extInfo.heatNumber }}
         </template>
       </el-table-column>
-
-
-
     </el-table>
-    
-
-
-
   </div>
 </template>
 
@@ -376,7 +435,18 @@
 
     data() {
       return {
-        stepsList: []
+        stepsList: [],
+
+        qualityList: [
+          {
+            name: '合格',
+            value: 1
+          },
+          {
+            name: '不合格',
+            value: 2
+          }
+        ]
       };
     },
 
@@ -410,24 +480,19 @@
         }
       },
 
-
       handSample() {
-
-				let param = {
-					taskId:this.taskObj.id,
-					workOrderId: this.list[0].workOrderId,
-					dispose: this.list,
-
-				}
-
-        sample(param).then(res => {
-          this.item.sampleQuality = res || []
-					this.$forceUpdate()
-        })
+        let param = {
+          taskId: this.taskObj.id,
+          workOrderId: this.list[0].workOrderId,
+          dispose: this.list
+        };
+
+        sample(param).then((res) => {
+          this.item.sampleQuality = res || [];
+          this.$forceUpdate();
+        });
       },
 
-
-      
       selectName(value, idx, yyIdx) {
         const taskObj = this.stepsList.find((item) => item.taskId === value);
         this.$set(
@@ -436,8 +501,20 @@
           taskObj.taskTypeName
         );
         this.$forceUpdate();
-      }
+      },
+
+      selectName2(value, idx) {
+        console.log(value, idx);
 
+        const taskObj = this.stepsList.find((item) => item.taskId === value);
+        this.$set(
+          this.item.sampleQuality[idx].extInfo,
+          'taskName',
+          taskObj.taskTypeName
+        );
+        this.$forceUpdate();
+
+      }
     },
 
     created() {
@@ -477,10 +554,9 @@
     margin-bottom: 10px;
   }
 
-  .btn_start{
+  .btn_start {
     text-align: left;
     margin-top: 6px;
-  
   }
 
   .content_table2 {
@@ -512,7 +588,6 @@
         width: 33.333%;
       }
 
-
       .ww25 {
         width: 25%;
       }

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

@@ -526,6 +526,16 @@
           }
         }
 
+        if(this.clientEnvironmentId == 3 && type == 2 && this.taskObj.type == 6)  {
+          this.List.forEach((L) => {
+            if(L.singleReport ==  0) {
+              L.semiProductList = []
+            }
+          })
+        }
+
+        return false
+
         jobSave(this.List)
           .then((res) => {
             this.loading.close();

+ 16 - 8
src/views/produce/components/produceOrder.vue

@@ -1,10 +1,8 @@
 <template>
   <div>
-
-
     <ele-pro-table
       ref="table"
-     :height="internalIsFullscreen ? '400px' : '300px'"
+      :height="internalIsFullscreen ? '400px' : '300px'"
       :columns="columns"
       width="100%"
       :datasource="datasource"
@@ -25,10 +23,8 @@
         }}</el-link>
       </template>
 
-   
-
       <template v-slot:singleReport="{ row }">
-         <el-tag> {{row.singleReport == 1 ? '单个报工' : '批量报工'}}</el-tag>
+        <el-tag> {{ row.singleReport == 1 ? '单个报工' : '批量报工' }}</el-tag>
       </template>
 
       <template v-slot:formingNum="{ row }">
@@ -250,6 +246,20 @@
         });
       },
       handleSelectionChange(val) {
+        let initReportValue = val[0].singleReport;
+        let allSame = true;
+
+        val.forEach((item) => {
+          if (item.singleReport !== initReportValue) {
+            allSame = false;
+          }
+        });
+
+        if (!allSame) {
+          return this.$message.warning('请选择报工类型相同的工单');
+        }
+
+        
         let ids = [];
         ids = val.map((item) => {
           return item.id;
@@ -260,7 +270,6 @@
 
       rowClick(e) {
         this.$emit('rowClick', e, this.taskObj.id);
-      
       },
 
       handRoute(row) {
@@ -281,7 +290,6 @@
 
 <style lang="scss" scoped>
   .table {
-
     min-height: calc((100vh - 70px - 50px - 80px - 20px) / 2);
     max-height: 68vh;
   }