gaoluyang
7 小时以前 10a8da68d9db10313c67e0f193c160e9740d95cd
src/views/salesManagement/deliveryLedger/index.vue
@@ -40,19 +40,12 @@
        <el-table-column label="发货车牌号" prop="shippingCarNumber" show-overflow-tooltip />
        <el-table-column label="快递公司" prop="expressCompany" show-overflow-tooltip />
        <el-table-column label="快递单号" prop="expressNumber" show-overflow-tooltip />
        <el-table-column label="审核状态" prop="status" align="center" width="120">
          <template #default="scope">
            <el-tag :type="getApprovalStatusType(scope.row.status)">
              {{ getApprovalStatusText(scope.row.status) }}
            </el-tag>
          </template>
        </el-table-column>
        <el-table-column fixed="right" label="操作" width="220" align="center">
          <template #default="scope">
            <el-button 
              link 
              type="primary"
              :disabled="!isApproved(scope.row.status)"
              :disabled="!canSupplement(scope.row)"
              @click="openForm('edit', scope.row)">补充发货信息</el-button>
            <el-button
              link
@@ -81,6 +74,7 @@
                v-model="form.type"
                placeholder="请选择发货类型"
                style="width: 100%"
                disabled
                @change="handleShippingTypeChange"
              >
                <el-option label="货车" value="货车" />
@@ -354,12 +348,6 @@
// 打开弹框
const openForm = async (type, row) => {
  // 补充发货信息:仅“审核通过”允许编辑
  if (type === 'edit' && row && !isApproved(row.status)) {
    proxy.$modal.msgWarning("只有审核通过的数据才可以补充发货信息");
    return;
  }
  operationType.value = type;
  const baseUrl = import.meta.env.VITE_APP_BASE_API;
  
@@ -410,7 +398,6 @@
    };
    deliveryFileList.value = [];
  }
  dialogFormVisible.value = true;
};
@@ -691,6 +678,15 @@
  return statusStr === '审核通过' || statusStr === '3';
};
// 检查是否可以补充发货信息(审核通过且没有发货车牌号或快递单号)
const canSupplement = (row) => {
  // 如果有发货车牌号或快递单号,则不能补充
  if (row?.shippingCarNumber || row?.expressNumber) {
    return false;
  }
  return true;
};
// 检查审核状态是否为"审核中"
const isApproving = (status) => {
  if (status === null || status === undefined || status === '') {