From 4652431ce329b4dec6c4dcc0758d5c4ff97e0666 Mon Sep 17 00:00:00 2001
From: 86134 <aa>
Date: 星期六, 11 十一月 2023 09:57:10 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/product/workbench/productoutput-table.vue |  132 ++++++++++++++++++++++++++++++-------------
 1 files changed, 91 insertions(+), 41 deletions(-)

diff --git a/src/views/product/workbench/productoutput-table.vue b/src/views/product/workbench/productoutput-table.vue
index a264383..b722f1f 100644
--- a/src/views/product/workbench/productoutput-table.vue
+++ b/src/views/product/workbench/productoutput-table.vue
@@ -1,25 +1,14 @@
 <template>
-  <div
-    class="productoutput-div"
-    style="padding:0px 14px;height: 100%;overflow: auto;"
-  >
+  <div class="productoutput-div" style="padding:0px 14px;height: 100%;overflow: auto;">
     <div class="product-output-header">
       <div style="height:28px;line-height:28px;">
-        <el-divider class="pane-divider" direction="vertical"></el-divider
-        ><span style="font-size:14px;font-weight:bold">浜у嚭璁板綍鍒楄〃</span>
+        <el-divider class="pane-divider" direction="vertical"></el-divider><span
+          style="font-size:14px;font-weight:bold">浜у嚭璁板綍鍒楄〃</span>
       </div>
     </div>
-    <ttable
-      :table="table"
-      @handleSelectionChange="handleSelectionChange"
-      @currentChange="handleCurrentChange"
-      :uploadInfo="uploadInfo"
-      :prelang="prelang"
-      :options="options"
-      :ajaxFun="ajaxFun"
-      :paramObj="paramObj"
-      ref="productOutputForCheckTable"
-    >
+    <ttable :table="table" @handleSelectionChange="handleSelectionChange" @currentChange="handleCurrentChange"
+      :uploadInfo="uploadInfo" :prelang="prelang" :options="options" :ajaxFun="ajaxFun" :paramObj="paramObj"
+      ref="productOutputForCheckTable">
       <template #toolbar></template>
     </ttable>
 
@@ -177,12 +166,27 @@
       </el-col>
     </el-row> -->
     <!-- 寮圭獥, 鎵嬪姩鎶ユ -->
-    <qualityTestApplyForm
-      v-if="qualityTestApplyVisible"
-      ref="qualityTestApply"
-      @refreshDataList="getData"
-      :applyPartList="multipleSelection"
-    />
+    <el-dialog title="鍘熸潗鏂欐姇鍏�" :visible.sync="dialogVisible" width="40%">
+      <el-table :data="tableData" style="width: 100%;" height="30em" border empty-text="鏆傛棤鏁版嵁">
+        <el-table-column label="搴忓彿" type="index"></el-table-column>
+        <el-table-column prop="partNo" label="闆朵欢缂栧彿" width="180">
+        </el-table-column>
+        <el-table-column prop="partName" label="闆朵欢鍚嶇О" :show-overflow-tooltip="true" width="180">
+        </el-table-column>
+        <el-table-column prop="unit" label="鍗曚綅" min-width="60"></el-table-column>
+        <el-table-column prop="inputQuantity" label="浣跨敤鏁伴噺">
+          <template v-slot="scope">
+            <el-input v-model="scope.row.inputQuantity"></el-input>
+          </template>
+        </el-table-column>
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="rawMaterialApiUpdate">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
+    <qualityTestApplyForm v-if="qualityTestApplyVisible" ref="qualityTestApply" @refreshDataList="getData"
+      :applyPartList="multipleSelection" />
   </div>
 </template>
 <style lang="scss" scoped>
@@ -193,11 +197,13 @@
   justify-content: space-between;
   align-items: center;
 }
+
 .pane-divider {
   width: 4px;
   background-color: #4283ee;
 }
-.productoutput-div >>> .inspection-btn {
+
+.productoutput-div>>>.inspection-btn {
   background-image: -webkit-linear-gradient(139deg, #5f6eef 0%, #2783ff 100%);
   background-image: -moz-linear-gradient(139deg, #5f6eef 0%, #2783ff 100%);
   background-image: linear-gradient(139deg, #5f6eef 0%, #2783ff 100%);
@@ -206,26 +212,30 @@
   border-radius: 15px;
   padding: 6px 15px;
 }
-.productoutput-div >>> .inspection-btn span {
+
+.productoutput-div>>>.inspection-btn span {
   margin-left: 3px;
 }
-.productoutput-div >>> .commonTable .el-table__header th {
+
+.productoutput-div>>>.commonTable .el-table__header th {
   background: #599ef4 !important;
   color: #fff !important;
   border: 0px !important;
 }
-.productoutput-div >>> .feed-btn-return {
+
+.productoutput-div>>>.feed-btn-return {
   background: url('/img/workbench/icon_bj.png') center center no-repeat;
   background-size: cover;
   font-size: 14px;
 }
 
-.productoutput-div >>> .feed-btn-return:before {
+.productoutput-div>>>.feed-btn-return:before {
   content: '鎶�';
   font-size: 14px;
   visibility: hidden;
 }
-.productoutput-div >>> .common-table-div {
+
+.productoutput-div>>>.common-table-div {
   margin: 0px 20px 0px !important;
 }
 
@@ -238,7 +248,8 @@
   border-radius: 15px;
   padding: 6px 15px;
 }
-.auto-judgment-btn >>> span {
+
+.auto-judgment-btn>>>span {
   margin-left: 3px;
 }
 </style>
@@ -252,7 +263,9 @@
   saveSelfSampleItem,
   getReportSampleForSelf,
   putReportSampleItem,
-  autoJudgmentSelf
+  autoJudgmentSelf,
+  rawMaterialApi,
+  rawMaterialApiUpdate
 } from '@/api/quality/report'
 import ttable from '@/views/common/ztt-table'
 import qualityTestApplyForm from './qualitytestapply-form'
@@ -275,6 +288,7 @@
   },
   data() {
     return {
+      tableData: [],
       paramObj: { workstationId: 0 },
       ajaxFun: fetchOutputList,
       addOrUpdateVisible: false,
@@ -317,7 +331,7 @@
             isSearch: true,
             searchInfoType: 'text'
           },
-          {
+          /* {
             minWidth: '160',
             prop: 'systemNo',
             label: '绯荤粺缂栧彿',
@@ -334,11 +348,11 @@
             isTrue: true,
             isSearch: true,
             searchInfoType: 'text'
-          },
+          }, */
           {
             minWidth: '160',
             prop: 'outBatchNo',
-            label: 'SN鍙�',
+            label: '搴忓垪鍙�',
             sort: true,
             isTrue: true,
             isSearch: true,
@@ -371,7 +385,11 @@
             isSearch: true,
             searchInfoType: 'text',
             formatter: (row, column, cellValue) => {
-              return cellValue.substring(1, cellValue.length - 2)
+              try{
+								return cellValue.substring(1, cellValue.length - 1)
+							}catch(e){
+								return null
+							}
             }
           },
           {
@@ -392,7 +410,7 @@
             isSearch: true,
             searchInfoType: 'datetimerange'
           },
-          {
+          /* {
             minWidth: '160',
             prop: 'startMeterMark',
             label: '璧峰绫虫爣',
@@ -409,7 +427,7 @@
             isTrue: true,
             isSearch: true,
             searchInfoType: 'text'
-          },
+          }, */
           {
             minWidth: '100',
             prop: 'productQty',
@@ -538,7 +556,22 @@
           //     icon: 'feed-btn-return',
           //     fun: this.qualityApply
           //   }
-        ]
+        ],
+        /* operator: [
+          {
+            text: '鎶曞叆',
+            icon: 'el-icon-circle-plus-outline',
+            type: 'text',
+            size: 'small',
+            fun: this.showHandleDiago
+          }
+        ],
+        operatorConfig: {
+          fixed: 'right',
+          label: '鎿嶄綔',
+          width: 100,
+          minWidth: 100
+        } */
       },
       booleanOptions: [
         { value: true, label: '鏄�' },
@@ -565,7 +598,8 @@
         isMoTestStandard: true,
         testStandardNo: '',
         reportSampleItemList: []
-      }
+      },
+      dialogVisible: false
     }
   },
   components: {
@@ -574,7 +608,7 @@
   },
   watch: {
     workstationId: {
-      handler: function(newVal, oldVal) {
+      handler: function (newVal, oldVal) {
         this.createdData()
       }
     },
@@ -639,6 +673,23 @@
     this.createdData()
   },
   methods: {
+    rawMaterialApiUpdate() {
+      rawMaterialApiUpdate(this.tableData).then(res => {
+        this.$message.success('鍘熸潗鏂欐姇鍏ヤ慨鏀规垚鍔�')
+        this.dialogVisible = false;
+      })
+    },
+    showHandleDiago(row) {
+      this.dialogVisible = true
+      this.tableData = []
+      rawMaterialApi(row.id).then(res => {
+        if(res.data.data[0] == null){
+          this.tableData = []
+        } else {
+          this.tableData = res.data.data
+        }
+      })
+    },
     // 鑾峰彇鏁版嵁鍒楄〃
     getData() {
       this.$refs.productOutputForCheckTable.getDataList()
@@ -656,7 +707,6 @@
       })
     },
     handleSelectionChange(val) {
-      console.log(val, 'ASSSS')
       this.multipleSelection = val
     },
     handleCurrentChange(val) {

--
Gitblit v1.9.3