From 36653c98622c8a74cb850575b2001457121b794c Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期四, 25 一月 2024 16:16:22 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before

---
 src/views/quality/rawMaterial/rawMaterial-form.vue    |   10 ++-
 src/views/quality/processconfiguration/index.vue      |    2 
 src/views/quality/finishedProductInspection/index.vue |   40 +++++++++++--
 src/api/quality/finishedProduct.js                    |   11 +++
 src/views/product/producttraceability/index.vue       |   40 ++++++++----
 src/views/quality/rawMaterial/index.vue               |    1 
 src/views/common/ztt-remote-select.vue                |   29 +++++++--
 7 files changed, 97 insertions(+), 36 deletions(-)

diff --git a/src/api/quality/finishedProduct.js b/src/api/quality/finishedProduct.js
index 7d56c3c..c875312 100644
--- a/src/api/quality/finishedProduct.js
+++ b/src/api/quality/finishedProduct.js
@@ -85,4 +85,13 @@
     method: 'post',
     params: obj
   })
-}
\ No newline at end of file
+}
+
+export function downloadReport(data) {
+    return request({
+      url: '/mes/qualityFinishedInspect/downloadReport',
+      method: 'post',
+      data: data,
+      responseType: 'blob',
+    })
+  }
diff --git a/src/views/common/ztt-remote-select.vue b/src/views/common/ztt-remote-select.vue
index 72a4002..4eaed0b 100644
--- a/src/views/common/ztt-remote-select.vue
+++ b/src/views/common/ztt-remote-select.vue
@@ -20,7 +20,7 @@
         value="title"
         disabled
       >
-        <span v-for="(col, j) in columns" :key="col.prop">{{ col.label }}</span>
+        <span v-for="(col, j) in columns" :key="col.prop"><span>{{ col.label }}</span></span>
       </el-option>
       <el-option
         class="lmes-select-body"
@@ -29,13 +29,23 @@
         :label="formatter(item)"
         :value="item[valueColumn]"
       >
-        <span v-for="(col, j) in columns" :key="col.prop + i">{{
-          col.formatter
-            ? col.formatter(item[col.prop])
-            : item[col.prop]
-            ? item[col.prop]
-            : '--'
-        }}</span>
+        <span v-for="(col, j) in columns" :key="col.prop + i">
+          <el-tooltip :content="col.formatter
+                  ? col.formatter(item[col.prop])
+                  : item[col.prop]
+                  ? item[col.prop]
+                  : '--'">
+              <span style="overflow: hidden;">
+                {{
+                col.formatter
+                  ? col.formatter(item[col.prop])
+                  : item[col.prop]
+                  ? item[col.prop]
+                  : '--'
+                }}
+              </span>
+            </el-tooltip>
+        </span>
       </el-option>
     </el-select>
   </div>
@@ -111,6 +121,7 @@
   text-align: center;
   font-size: 13px;
   line-height: 44px;
+  
 }
 
 .lmes-select-head span,
@@ -121,6 +132,8 @@
   padding: 0 10px !important;
 }
 
+
+
 .lmes-select-head,
 .lmes-select-body,
 .lmes-select-nodata {
diff --git a/src/views/product/producttraceability/index.vue b/src/views/product/producttraceability/index.vue
index 9bcd856..a86a177 100644
--- a/src/views/product/producttraceability/index.vue
+++ b/src/views/product/producttraceability/index.vue
@@ -94,7 +94,7 @@
                       </div>
                     </el-col>
                   </el-row>
-                </el-col>
+                </el-col>changePart
                 <el-col
                   :span="10"
                   :offset="1"
@@ -1001,19 +1001,31 @@
       selectLoading: false,
       systemNo: null,
       selectedProductSystemNo: null,
-      valueColumn: 'systemNo',
+      valueColumn: 'customerOrderId',
       partColumn: [
         {
-          prop: 'batchNo',
-          label: '鎵规鍙�'
+          prop: 'customerOrderNo',
+          label: '閿�鍞鍗曞彿'
         },
         {
-          prop: 'systemNo',
-          label: '绯荤粺鍙�'
+          prop: 'entityName',
+          label: '椤圭洰鍚嶇О'
+        }, 
+        {
+          prop: 'partNo',
+          label: '浜у搧缂栧彿'
+        }, 
+        {
+          prop: 'productName',
+          label: '浜у搧鍚嶇О'
         },
         {
-          prop: 'partName',
-          label: '闆朵欢鍚嶇О'
+          prop: 'specs',
+          label: '浜у搧鍨嬪彿'
+        }, 
+        {
+          prop: 'productType',
+          label: '浜у搧绫诲瀷'
         }
       ],
       partList: [],
@@ -1182,14 +1194,14 @@
       const part = this.partList.find((item) => ele.systemNo === item.systemNo)
       if (part !== undefined) {
         partLabel =
-          '绯荤粺鍙凤細' +
-          part.systemNo +
+          '閿�鍞鍗曞彿锛�' +
+          part.customerOrderNo +
           '     ' +
-          '闆朵欢鍚嶇О锛�' +
-          part.partName +
+          '浜у搧鍚嶇О锛�' +
+          part.productName +
           '     ' +
-          '鎵规鍙凤細' +
-          part.batchNo
+          '浜у搧缂栧彿锛�' +
+          part.partNo
       }
       return partLabel
     },
diff --git a/src/views/quality/finishedProductInspection/index.vue b/src/views/quality/finishedProductInspection/index.vue
index a5a809e..d71804a 100644
--- a/src/views/quality/finishedProductInspection/index.vue
+++ b/src/views/quality/finishedProductInspection/index.vue
@@ -2,7 +2,7 @@
 	<div class="content-main">
 		<div class="rawPage">
             <basic-container>
-                <ttable 
+                <ttable
                 :table="table"
                 @handleSelectionChange="handleSelectionChange"
                 :prelang="prelang"
@@ -33,11 +33,12 @@
     import ttable from '@/views/common/ztt-table.vue'
     import * as fecha from 'element-ui/lib/utils/date'
 	import finishedProductInspectionAdd from './finishedProduct-form'
-    import { page,deletePro,exportExaminationProducts,queryById } from '@/api/quality/finishedProduct'
+    import { page,deletePro,exportExaminationProducts,queryById,downloadReport } from '@/api/quality/finishedProduct'
     import { transform } from '@/util/fileTransform'
     import { mapGetters } from 'vuex'
     import printTemplate from './finishedProducter-print.vue'
     import PrintJS from 'print-js'
+    import { transformZip } from '@/util/fileTransform'
 	export default {
     components: {
         finishedProductInspectionAdd,
@@ -46,6 +47,7 @@
     },
     data() {
         return {
+            multipleSelection: [],
             printFormData: null,
             printDialogVisible: false,
             result:[{label:'鍏ㄩ儴',value: ''},{label:'鍚堟牸',value: '1'},{label:'涓嶅悎鏍�',value: '0'}],
@@ -198,7 +200,7 @@
             },
         }
     },
-    created() { 
+    created() {
         if(this.permissions.quality_finishedProductInspection_download){
             this.table.toolbar.push({
                 text: '涓嬭浇妫�楠屾姤鍛�',
@@ -227,6 +229,28 @@
     },
     methods: {
         downloadProReport(){
+            let selection = this.multipleSelection
+            if(!selection || selection.length < 1){
+                this.$message.error("璇峰厛閫夋嫨妫�楠屾暟鎹�")
+                return
+            }else{
+                let arr = selection.filter(s=>{
+                    return s.result==null || s.result==''
+                })
+                if(arr.length > 0){
+                    this.$message.error("鍙兘閫夋嫨宸叉娴嬬殑鏁版嵁")
+                    return
+                }
+                let ids = []
+                selection.forEach(ele=>{
+                    ids.push(ele.id)
+                })
+                downloadReport({ids : ids}).then(res=>{
+                    transformZip(res)
+                }).catch(error=>{
+                    console.log(error)
+                })
+            }
         },
         //鎵撳嵃鎸夐挳
         printFun() {
@@ -285,11 +309,11 @@
             }
             this.$router.push({
                 name: 'finishedProductForm',
-                query: { 
+                query: {
                     id: row == null ? null : row.id,
                 },
                 params: {
-                    resultVal: row == null ? null : row.result 
+                    resultVal: row == null ? null : row.result
                 }
             })
         },
@@ -305,7 +329,9 @@
         formatDateTime(row, column, cellValue) {
             return cellValue ? fecha.format(new Date(cellValue), 'yyyy-MM-dd') : ''
         },
-        handleSelectionChange(){ },
+        handleSelectionChange(val){
+            this.multipleSelection = val
+        },
         getData() {
             this.$refs.finishedProduct.getDataList()
         },
@@ -397,4 +423,4 @@
     flex: 1;
     overflow-y: scroll;
 } */
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/quality/processconfiguration/index.vue b/src/views/quality/processconfiguration/index.vue
index d6d25d3..4338b63 100644
--- a/src/views/quality/processconfiguration/index.vue
+++ b/src/views/quality/processconfiguration/index.vue
@@ -304,7 +304,7 @@
             fun: this.Submitreview,
             show: {
                 key: 'state',
-                val: ['0']
+                val: [0]
             }
           })
     }
diff --git a/src/views/quality/rawMaterial/index.vue b/src/views/quality/rawMaterial/index.vue
index 661b2ea..ecdd037 100644
--- a/src/views/quality/rawMaterial/index.vue
+++ b/src/views/quality/rawMaterial/index.vue
@@ -393,7 +393,6 @@
         formatJudgeState(row, column, cellValue){
             if(cellValue != undefined && cellValue != null && cellValue != ''){
                 if(cellValue == 0){
-                    console.log(cellValue);
                     return "<span style='color:#E84738;'>涓嶅悎鏍�</span>"
                 }
                 return "<span style='color:#34BD66;'>鍚堟牸</span>"
diff --git a/src/views/quality/rawMaterial/rawMaterial-form.vue b/src/views/quality/rawMaterial/rawMaterial-form.vue
index 00bbc6d..2e2a60c 100644
--- a/src/views/quality/rawMaterial/rawMaterial-form.vue
+++ b/src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -892,10 +892,12 @@
             for(var i=0;i<row.testValueList.length;i++){
               let val = row.testValueList[i]
               let reg = /(^-?[0-9]{1,6}$)|(^-?[0-9]{1,6}[\.]{1}[0-9]{1,3}$)/
-              if(!reg.test(val) && !['鏄�','鍚�'].includes(val)){
-                  row.testValueList[i] = null
-                  this.$message.error("璇疯緭鍏�6浣嶆暟瀛楁垨閫夋嫨鏄惁")
-                  isTrue = false
+              if(val.slice(-1)!='.'){
+                  if(!reg.test(val) && !['鏄�','鍚�'].includes(val)){
+                      row.testValueList[i] = null
+                      this.$message.error("璇疯緭鍏�6浣嶆暟瀛楁垨閫夋嫨鏄惁")
+                      isTrue = false
+                  }
               }
             }
             if(!isTrue){

--
Gitblit v1.9.3