Merge remote-tracking branch 'origin/dev_长治_健齿齿科器材' into dev_长治_健齿齿科器材
已修改3个文件
129 ■■■■■ 文件已修改
src/views/inventoryManagement/stockManagement/New.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/Qualified.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/deliveryLedger/index.vue 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/New.vue
@@ -42,20 +42,6 @@
        </el-form-item>
        <el-form-item
          label="生产日期"
          prop="productionDate"
        >
          <el-date-picker
            v-model="formState.productionDate"
            type="date"
            placeholder="请选择生产日期"
            value-format="YYYY-MM-DD"
            format="YYYY-MM-DD"
            style="width: 100%"
          />
        </el-form-item>
        <el-form-item
          label="供应商"
          prop="customer"
          :rules="[{ required: true, message: '请选择供应商', trigger: 'change' }]"
@@ -146,7 +132,6 @@
  productModelName: "",
  unit: "",
  batchNo: "",
  productionDate: "",
  customer: "",
  qualitity: 0,
  warnNum: 0,
@@ -175,7 +160,6 @@
    productModelName: "",
    unit: "",
    batchNo: "",
    productionDate: "",
    customer: "",
    qualitity: 0,
    warnNum: 0,
src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -67,11 +67,10 @@
        <el-table-column label="单位" prop="unit" show-overflow-tooltip />
        <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip />
        <el-table-column label="冻结数量" prop="lockedQuantity" show-overflow-tooltip />
        <el-table-column label="库存预警数量" width="120" prop="warnNum"  show-overflow-tooltip />
        <el-table-column label="生产日期" prop="productionDate" show-overflow-tooltip />
        <el-table-column label="库存预警数量" prop="warnNum"  show-overflow-tooltip />
        <el-table-column label="备注" prop="remark"  show-overflow-tooltip />
        <el-table-column label="最近更新时间" width="120" prop="updateTime" show-overflow-tooltip />
        <el-table-column fixed="right" label="操作" min-width="100" align="center">
        <el-table-column label="最近更新时间" prop="updateTime" show-overflow-tooltip />
        <el-table-column fixed="right" label="操作" min-width="120" align="center">
          <template #default="scope">
            <el-button link type="primary" size="small" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">领用</el-button>
            <el-button link type="primary" size="small" v-if="scope.row.unLockedQuantity > 0" @click="showFrozenModal(scope.row)">冻结</el-button>
src/views/salesManagement/deliveryLedger/index.vue
@@ -40,10 +40,10 @@
        <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">
        <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 :type="getShippingStatusType(scope.row.status)">
              {{ getShippingStatusText(scope.row.status) }}
            </el-tag>
          </template>
        </el-table-column>
@@ -53,7 +53,7 @@
              link 
              type="primary" 
              size="small" 
              :disabled="!isApproved(scope.row.status)"
              :disabled="isShipped(scope.row.status)"
              @click="openForm('edit', scope.row)">补充发货信息</el-button>
            <el-button
              link
@@ -65,7 +65,7 @@
              link 
              type="danger" 
              size="small" 
              :disabled="isApproving(scope.row.status)"
              :disabled="isShipped(scope.row.status)"
              @click="handleDeleteSingle(scope.row)">删除</el-button>
          </template>
        </el-table-column>
@@ -186,7 +186,7 @@
          <el-descriptions-item label="规格型号">{{ detailRow.specificationModel || '--' }}</el-descriptions-item>
          <el-descriptions-item label="发货类型">{{ detailRow.type || '--' }}</el-descriptions-item>
          <el-descriptions-item label="发货日期">{{ detailRow.shippingDate || '--' }}</el-descriptions-item>
          <el-descriptions-item label="审核状态">{{ getApprovalStatusText(detailRow.status) }}</el-descriptions-item>
          <el-descriptions-item label="发货状态">{{ getShippingStatusText(detailRow.status) }}</el-descriptions-item>
          <el-descriptions-item label="发货车牌号">{{ detailRow.shippingCarNumber || '--' }}</el-descriptions-item>
          <el-descriptions-item label="快递公司">{{ detailRow.expressCompany || '--' }}</el-descriptions-item>
          <el-descriptions-item label="快递单号" :span="2">{{ detailRow.expressNumber || '--' }}</el-descriptions-item>
@@ -356,9 +356,9 @@
// 打开弹框
const openForm = async (type, row) => {
  // 补充发货信息:仅“审核通过”允许编辑
  if (type === 'edit' && row && !isApproved(row.status)) {
    proxy.$modal.msgWarning("只有审核通过的数据才可以补充发货信息");
  // 补充发货信息:仅“未发货”允许编辑
  if (type === 'edit' && row && isShipped(row.status)) {
    proxy.$modal.msgWarning("已发货的数据不能补充发货信息");
    return;
  }
  
@@ -486,10 +486,10 @@
    return;
  }
  
  // 检查选中的行是否有"审核中"状态
  const approvingRows = selectedRows.value.filter(row => isApproving(row.status));
  if (approvingRows.length > 0) {
    proxy.$modal.msgWarning("审核中的数据不能删除");
  // 已发货数据不允许删除
  const shippedRows = selectedRows.value.filter(row => isShipped(row.status));
  if (shippedRows.length > 0) {
    proxy.$modal.msgWarning("已发货的数据不能删除");
    return;
  }
  
@@ -512,9 +512,9 @@
// 单个删除
const handleDeleteSingle = (row) => {
  // 检查是否为"审核中"状态
  if (isApproving(row.status)) {
    proxy.$modal.msgWarning("审核中的数据不能删除");
  // 已发货数据不允许删除
  if (isShipped(row.status)) {
    proxy.$modal.msgWarning("已发货的数据不能删除");
    return;
  }
  
@@ -617,92 +617,60 @@
  }
};
// 获取审核状态文本
const getApprovalStatusText = (status) => {
// 获取发货状态文本
const getShippingStatusText = (status) => {
  if (status === null || status === undefined || status === '') {
    return '待审核';
    return '未发货';
  }
  // 如果是数字
  if (typeof status === 'number') {
    const statusMap = {
      0: '待审核',
      1: '审核中',
      2: '审核拒绝',
      3: '审核通过'
      0: '未发货',
      1: '已发货',
    };
    return statusMap[status] || '待审核';
    return statusMap[status] || '未发货';
  }
  // 如果是字符串,直接返回或映射
  const statusStr = String(status).trim();
  const statusTextMap = {
    '待审核': '待审核',
    '审核中': '审核中',
    '审核拒绝': '审核拒绝',
    '审核通过': '审核通过',
    '0': '待审核',
    '1': '审核中',
    '2': '审核拒绝',
    '3': '审核通过'
    '未发货': '未发货',
    '已发货': '已发货',
    '0': '未发货',
    '1': '已发货',
  };
  return statusTextMap[statusStr] || statusStr || '待审核';
  return statusTextMap[statusStr] || statusStr || '未发货';
};
// 获取审核状态标签类型(颜色)
const getApprovalStatusType = (status) => {
// 获取发货状态标签类型(颜色)
const getShippingStatusType = (status) => {
  if (status === null || status === undefined || status === '') {
    return 'info';
  }
  // 如果是数字
  if (typeof status === 'number') {
    const typeMap = {
      0: 'info',      // 待审核 - 灰色
      1: 'warning',   // 审核中 - 黄色
      2: 'danger',    // 审核拒绝 - 红色
      3: 'success'    // 审核通过 - 绿色
      0: 'info',     // 未发货 - 灰色
      1: 'success',  // 已发货 - 绿色
    };
    return typeMap[status] || 'info';
  }
  // 如果是字符串
  const statusStr = String(status).trim();
  const typeTextMap = {
    '待审核': 'info',
    '审核中': 'warning',
    '审核拒绝': 'danger',
    '审核通过': 'success',
    '未发货': 'info',
    '已发货': 'success',
    '0': 'info',
    '1': 'warning',
    '2': 'danger',
    '3': 'success'
    '1': 'success',
  };
  return typeTextMap[statusStr] || 'info';
};
// 检查审核状态是否为"审核通过"
const isApproved = (status) => {
// 是否已发货
const isShipped = (status) => {
  if (status === null || status === undefined || status === '') {
    return false;
  }
  // 如果是数字,3 表示审核通过
  if (typeof status === 'number') {
    return status === 3;
  }
  // 如果是字符串
  const statusStr = String(status).trim();
  return statusStr === '审核通过' || statusStr === '3';
};
// 检查审核状态是否为"审核中"
const isApproving = (status) => {
  if (status === null || status === undefined || status === '') {
    return false;
  }
  // 如果是数字,1 表示审核中
  if (typeof status === 'number') {
    return status === 1;
  }
  // 如果是字符串
  const statusStr = String(status).trim();
  return statusStr === '审核中' || statusStr === '1';
  return statusStr === '已发货' || statusStr === '1';
};
onMounted(() => {