From 4c4fe478fabb409c904802d53f121db090ec3dca Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 25 二月 2026 14:44:30 +0800
Subject: [PATCH] 业务管理:1.原材料标签打印内容调整;2.成品抽样页面优化;3.页面刷新保留筛选条件

---
 src/components/Table/lims-table.vue                                      |    8 ++--
 src/views/business/outsourcingFinishProduct/index.vue                    |    4 +-
 src/views/business/finishedProductSampling/index.vue                     |   56 ++++++++++++++++++++++------
 src/views/business/materialOrderComponents/materialOrder/printDialog.vue |    3 +
 src/utils/base64Util.js                                                  |   33 ++++++++++++++++
 src/views/business/materialOrder/index.vue                               |    5 +-
 6 files changed, 88 insertions(+), 21 deletions(-)

diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index ce5d647..6e3cec6 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -502,19 +502,19 @@
   padding-left: 10px !important;
 }
 
-.lims-table .highlight-warning-row-border td:first-child {
+.lims-table >>>.highlight-warning-row-border td:first-child {
   border-left: 4px solid #ffcd29;
 }
 
-.lims-table .highlight-warning-row-border td:last-child {
+.lims-table >>>.highlight-warning-row-border td:last-child {
   border-right: 4px solid #ffcd29;
 }
 
-.lims-table .highlight-danger-row-border td:first-child {
+.lims-table >>>.highlight-danger-row-border td:first-child {
   border-left: 4px solid #f56c6c;
 }
 
-.lims-table .highlight-danger-row-border td:last-child {
+.lims-table >>>.highlight-danger-row-border td:last-child {
   border-right: 4px solid #f56c6c;
 }
 >>>.red-row td {
diff --git a/src/utils/base64Util.js b/src/utils/base64Util.js
new file mode 100644
index 0000000..3496d8d
--- /dev/null
+++ b/src/utils/base64Util.js
@@ -0,0 +1,33 @@
+/**
+ * 瀛楃涓诧紙鍚腑鏂囷級杞� Base64 缂栫爜
+ * @param {string} str - 瑕佽浆鎹㈢殑瀛楃涓�
+ * @returns {string} Base64 缂栫爜缁撴灉
+ */
+export function stringToBase64(str) {
+  // 姝ラ1锛氬皢瀛楃涓茶浆涓� UTF-8 缂栫爜鐨勪簩杩涘埗鏁版嵁
+  const utf8Bytes = new TextEncoder().encode(str);
+  // 姝ラ2锛氬皢浜岃繘鍒舵暟鎹浆涓� ASCII 瀛楃涓诧紙閬垮厤 btoa 鎶ラ敊锛�
+  let asciiStr = '';
+  for (let i = 0; i < utf8Bytes.length; i++) {
+    asciiStr += String.fromCharCode(utf8Bytes[i]);
+  }
+  // 姝ラ3锛氳浆 Base64
+  return btoa(asciiStr);
+}
+
+/**
+ * Base64 缂栫爜杞洖瀛楃涓诧紙鍚腑鏂囷級
+ * @param {string} base64Str - Base64 缂栫爜瀛楃涓�
+ * @returns {string} 鍘熷瓧绗︿覆
+ */
+export function base64ToString(base64Str) {
+  // 姝ラ1锛欱ase64 瑙g爜涓� ASCII 瀛楃涓�
+  const asciiStr = atob(base64Str);
+  // 姝ラ2锛氬皢 ASCII 瀛楃涓茶浆鍥� UTF-8 浜岃繘鍒舵暟鎹�
+  const utf8Bytes = new Uint8Array(asciiStr.length);
+  for (let i = 0; i < asciiStr.length; i++) {
+    utf8Bytes[i] = asciiStr.charCodeAt(i);
+  }
+  // 姝ラ3锛氳В鐮佷负鍘熷瓧绗︿覆
+  return new TextDecoder().decode(utf8Bytes);
+}
diff --git a/src/views/business/finishedProductSampling/index.vue b/src/views/business/finishedProductSampling/index.vue
index e013681..7f6c6db 100644
--- a/src/views/business/finishedProductSampling/index.vue
+++ b/src/views/business/finishedProductSampling/index.vue
@@ -3,11 +3,17 @@
   <div style="padding: 10px 0">
     <div class="card">
       <div class="title">
-        <el-button size="small" type="primary" @click="addTemQuarter">鏂板</el-button>
-        <el-button size="small" type="primary" @click="quarterSample">瀛e害鎶芥牱</el-button>
-        <el-button size="small" type="primary" @click="handleStockList">鍒锋柊</el-button>
+        <span style="font-size:12px;color:grey;">鍒囨崲IFS鍩�:</span>
+        <el-select style="margin: 0 10px" v-model="queryParamOne.contract" @change="handleStockList" size="mini" placeholder="鍒囨崲鍩�">
+          <el-option label="ZTNS" value="ZTNS"/>
+          <el-option label="KJNS" value="KJNS"/>
+        </el-select>
+        <el-button size="mini" type="primary" @click="addTemQuarter">鏂板</el-button>
+        <el-button size="mini" type="primary" @click="quarterSample">瀛e害鎶芥牱</el-button>
+        <el-button size="mini" @click="handleStockList">鍒锋柊</el-button>
       </div>
       <el-table
+        border
         ref="finishedproducttransferTable"
         v-loading="tableLoading"
         :data="stockList"
@@ -18,12 +24,20 @@
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" width="45"></el-table-column>
+        <el-table-column type="index" align="center" width="60" label="搴忓彿"></el-table-column>
+        <el-table-column label="IFS鍩�" prop="contract" width="100" min-width="100" align="center">
+          <template slot-scope="scope">
+            <el-tag v-if="scope.row.contract==='ZTNS'" type="success">{{scope.row.contract}}</el-tag>
+            <el-tag v-else>{{scope.row.contract}}</el-tag>
+          </template>
+        </el-table-column>
         <el-table-column
-          :show-overflow-tooltip="true"
           align="center"
           label="瀹㈡埛璁㈠崟缂栧彿"
           prop="customerOrderNo"
-          width="140"
+          width="160"
+          min-width="160"
+          show-overflow-tooltip
         >
           <template slot="header" slot-scope="scope">
             <div style="line-height: 14px;margin-bottom: 6px">瀹㈡埛璁㈠崟缂栧彿</div>
@@ -46,7 +60,9 @@
           align="center"
           label="鎴愬搧闆朵欢鍙�"
           prop="partNo"
-          width="140"
+          width="180"
+          min-width="180"
+          show-overflow-tooltip
         >
           <template slot="header" slot-scope="scope">
             <div style="line-height: 14px;margin-bottom: 6px">鎴愬搧闆朵欢鍙�</div>
@@ -69,7 +85,8 @@
           align="center"
           label="闆朵欢鍚嶇О"
           prop="partName"
-          width="140"
+          min-width="140"
+          show-overflow-tooltip
         >
           <template slot="header" slot-scope="scope">
             <div style="line-height: 14px;margin-bottom: 6px">闆朵欢鍚嶇О</div>
@@ -89,11 +106,11 @@
           </template>
         </el-table-column>
         <el-table-column
-          :show-overflow-tooltip="true"
           align="center"
           label="浠撳簱"
           prop="warehouseName"
           width="140"
+          min-width="140"
         >
           <template slot="header" slot-scope="scope">
             <div style="line-height: 14px;margin-bottom: 6px">浠撳簱</div>
@@ -113,11 +130,11 @@
           </template>
         </el-table-column>
         <el-table-column
-          :show-overflow-tooltip="true"
           align="center"
           label="搴撲綅鍙�"
           prop="locationNo"
           width="140"
+          min-width="140"
         >
           <template slot="header" slot-scope="scope">
             <div style="line-height: 14px;margin-bottom: 6px">搴撲綅鍙�</div>
@@ -137,11 +154,11 @@
           </template>
         </el-table-column>
         <el-table-column
-          :show-overflow-tooltip="true"
           align="center"
           label="搴撲綅鍚嶇О"
           prop="locationName"
           width="140"
+          min-width="140"
         >
           <template slot="header" slot-scope="scope">
             <div style="line-height: 14px;margin-bottom: 6px">搴撲綅鍚嶇О</div>
@@ -164,7 +181,9 @@
           align="center"
           label="鎵规鍙�"
           prop="partBatchNo"
-          width="140"
+          width="160"
+          min-width="16"
+          show-overflow-tooltip
         >
           <template slot="header" slot-scope="scope">
             <div style="line-height: 14px;margin-bottom: 6px">鎵规鍙�</div>
@@ -188,6 +207,8 @@
           label="鍏ュ簱鏉ユ簮"
           prop="inSource"
           width="140"
+          min-width="140"
+          show-overflow-tooltip
         >
           <template slot="header" slot-scope="scope">
             <div style="line-height: 14px;margin-bottom: 6px">鍏ュ簱鏉ユ簮</div>
@@ -211,6 +232,8 @@
           label="澶栨姢棰滆壊"
           prop="outerColor"
           width="140"
+          min-width="140"
+          show-overflow-tooltip
         >
           <template slot="header" slot-scope="scope">
             <div style="line-height: 14px;margin-bottom: 6px">澶栨姢棰滆壊</div>
@@ -234,6 +257,8 @@
           label="搴撳瓨鏁伴噺"
           prop="stockQuantity"
           width="140"
+          min-width="140"
+          show-overflow-tooltip
         >
         </el-table-column>
         <el-table-column
@@ -241,11 +266,14 @@
           label="鍙敤搴撳瓨鏁伴噺"
           prop="availableStockQuantity"
           width="140"
+          min-width="140"
+          show-overflow-tooltip
         >
           <template slot-scope="scope">
             <span>{{ scope.row.availableStockQuantity }}</span>
           </template>
         </el-table-column>
+        <el-table-column label="搴撳瓨鍗曚綅" prop="unit" align="center" width="140" min-width="140"></el-table-column>
       </el-table>
       <div class="pagin-page" style="margin-top: 0;margin-bottom: 0;">
         <el-pagination
@@ -278,6 +306,7 @@
     return {
       stockList: [],
       queryParamOne: {
+        contract:"ZTNS",
         partNo: null,
         partName: null,
         warehouseName: null,
@@ -354,10 +383,11 @@
       getIfsStock(newReqParam).then((response) => {
         this.tableLoading = false
         const resData = response.data
-        this.queryReport.total = resData.total
+        this.queryReport.total = resData.count
         const resStockList = resData.data
         resStockList.forEach((item) => {
           this.stockList.push({
+            contract:item.CONTRACT,
             partNo: item.PART_NO,
             partName: item.PART_DESC,
             warehouseName: item.WAREHOUSE_ID,
@@ -369,6 +399,7 @@
             outerColor: item.ATTR4,
             customerOrderNo: item.ATTR6,
             inSource: item.ATTR23,
+            unit:item.UNIT_MEAS
           })
         })
       }).catch(() => {
@@ -377,6 +408,7 @@
     },
     getFinalParam() {
       const newReqParam = {
+        contract: this.queryParamOne.contract,
         partNo: this.queryParamOne.partNo,
         partDescription: this.queryParamOne.partName,
         warehouse: this.queryParamOne.warehouseName
diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index 2c6df80..39e4bdc 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -1272,7 +1272,7 @@
               type: 'success',
               message: '鏀捐鎴愬姛!'
             });
-            this.refresh()
+            this.refreshTable()
           }
         })
       }).catch(() => {
@@ -1425,7 +1425,7 @@
         if (res.code === 200) {
           this.exemptionVisible = false
           this.$message.success('鎿嶄綔鎴愬姛')
-          this.refresh()
+          this.refreshTable()
         }
         this.exemptionLoading = false
       }).catch(err => {
@@ -1597,6 +1597,7 @@
       this.multipleSelection = val
     },
     changeRowClass({ row, rowIndex }) {
+      console.log(row,row.isFirst==1)
       if (row.isFirst == 1) {
         return 'highlight-danger-row-border'
       }
diff --git a/src/views/business/materialOrderComponents/materialOrder/printDialog.vue b/src/views/business/materialOrderComponents/materialOrder/printDialog.vue
index fe99554..3dca547 100644
--- a/src/views/business/materialOrderComponents/materialOrder/printDialog.vue
+++ b/src/views/business/materialOrderComponents/materialOrder/printDialog.vue
@@ -128,6 +128,7 @@
 <script>
 import PrintJS from "print-js";
 import {printLabel} from "@/api/business/rawMaterialOrder";
+import {stringToBase64} from '@/utils/base64Util'
 
 export default {
   name: "printDialog",
@@ -168,7 +169,7 @@
               console.log('item---', item)
               item.sendTime = item.sendTime && item.sendTime.substring(0, 10)
               item.sampleNumber = item.qtyArrived + item.buyUnitMeas
-              this.$set(item, 'barcode', item.entrustCode)
+              this.$set(item, 'barcode', item.entrustCode+","+stringToBase64(item.color))
               this.$set(item, 'isLeave', item.labelStatus === '2')
             })
             this.barcodeData = res.data
diff --git a/src/views/business/outsourcingFinishProduct/index.vue b/src/views/business/outsourcingFinishProduct/index.vue
index d103971..d3ae946 100644
--- a/src/views/business/outsourcingFinishProduct/index.vue
+++ b/src/views/business/outsourcingFinishProduct/index.vue
@@ -1046,7 +1046,7 @@
               type: 'success',
               message: '鏀捐鎴愬姛!'
             });
-            this.refresh()
+            this.refreshTable()
           }
         })
       }).catch(() => {
@@ -1185,7 +1185,7 @@
         if (res.code === 200) {
           this.exemptionVisible = false
           this.$message.success('鎿嶄綔鎴愬姛')
-          this.refresh()
+          this.refreshTable()
         }
         this.exemptionLoading = false
       }).catch(err => {

--
Gitblit v1.9.3