zhangwencui
10 小时以前 07ac0cb8287794acbff25fa02c22095f9499c6ff
src/pages/procurementManagement/procurementLedger/index.vue
@@ -50,6 +50,10 @@
              <text class="detail-value">{{ item.salesContractNo }}</text>
            </view> -->
            <view class="detail-row">
              <text class="detail-label">销售合同号</text>
              <text class="detail-value">{{ item.salesContractNo || '-' }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">供应商名称</text>
              <text class="detail-value">{{ item.supplierName }}</text>
            </view>
@@ -62,8 +66,28 @@
              <text class="detail-value">{{ item.paymentMethod }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">入库状态</text>
              <view class="detail-value">
                <u-tag :type="getStockInStatusType(item.stockInStatus)">
                  {{ item.stockInStatus || '-' }}
                </u-tag>
              </view>
            </view>
            <view class="detail-row">
              <text class="detail-label">合同金额(元)</text>
              <text class="detail-value highlight">{{ item.contractAmount }}</text>
              <text class="detail-value highlight">{{ formattedNumber(item.contractAmount) }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">实际合同金额(元)</text>
              <text class="detail-value highlight">{{ formattedNumber(item.netContractAmount) }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">签订日期</text>
              <text class="detail-value">{{ item.executionDate || '-' }}</text>
            </view>
            <view class="detail-row">
              <text class="detail-label">备注</text>
              <text class="detail-value">{{ item.remarks || '-' }}</text>
            </view>
            <up-divider></up-divider>
            <view class="detail-info">
@@ -131,6 +155,31 @@
    };
    return typeMap[status] || "";
  };
  const getStockInStatusType = status => {
    const typeMap = {
      待入库: "info",
      入库中: "warning",
      完全入库: "success",
    };
    return typeMap[status] || "info";
  };
  const getStockInApprovalStatusType = status => {
    const typeMap = {
      待入库: "info",
      入库中: "warning",
      完全入库: "success",
    };
    return typeMap[status] || "info";
  };
  const formattedNumber = value => {
    if (value === undefined || value === null || value === "") {
      return "0.00";
    }
    return parseFloat(value).toFixed(2);
  };
  // 搜索关键词
  const purchaseContractNumber = ref("");
@@ -153,7 +202,7 @@
      purchaseContractNumber: purchaseContractNumber.value,
    })
      .then(res => {
        ledgerList.value = res.data.records;
        ledgerList.value = res?.data?.records || [];
        closeToast();
      })
      .catch(() => {