业务管理:1.原材料标签打印内容调整;2.成品抽样页面优化;3.页面刷新保留筛选条件
已添加1个文件
已修改5个文件
109 ■■■■ 文件已修改
src/components/Table/lims-table.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/base64Util.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/finishedProductSampling/index.vue 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrderComponents/materialOrder/printDialog.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/outsourcingFinishProduct/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 {
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:Base64 è§£ç ä¸º 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);
}
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">季度抽样</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">季度抽样</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
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'
      }
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
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 => {