fb851d937f9230670dbfa2251be0fdf233e830b2..a730efc30da7f6d9de0ed10718b3ea5011e8e8af
2026-09-21 gongchunyi
fix: 移除发货限制
a730ef 对比 | 目录
2026-09-21 gongchunyi
feat: 质检添加首检
e8edc8 对比 | 目录
2026-09-21 gongchunyi
fix: 销售订单未下发/发货则可以进行编辑
b13a73 对比 | 目录
已修改3个文件
77 ■■■■■ 文件已修改
src/views/qualityManagement/processInspection/components/formDia.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/processInspection/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/processInspection/components/formDia.vue
@@ -130,6 +130,17 @@
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="是否首检:"
                          prop="isFirstInspect">
              <el-radio-group v-model="form.isFirstInspect"
                              class="sampling-radio-group"
                              :disabled="isViewMode">
                <el-radio-button :label="1">是</el-radio-button>
                <el-radio-button :label="0">否</el-radio-button>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否抽检:"
                          prop="isSampling">
              <el-radio-group v-model="form.isSampling"
@@ -141,8 +152,10 @@
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="12"
                  v-if="form.isSampling === 1">
        </el-row>
        <el-row :gutter="30"
                v-if="form.isSampling === 1">
          <el-col :span="12">
            <el-form-item label="抽检数量:"
                          prop="samplingQuantity">
              <el-input-number :step="0.01"
@@ -286,6 +299,7 @@
      checkCompany: "",
      isSampling: 0,
      samplingQuantity: "",
      isFirstInspect: 0,
      isStockIn: 0,
    },
    rules: {
@@ -302,6 +316,7 @@
      checkCompany: [{ required: false, message: "请输入", trigger: "blur" }],
      isSampling: [{ required: true, message: "请选择是否抽检", trigger: "change" }],
      samplingQuantity: [{ required: true, message: "请输入抽检数量", trigger: "blur" }],
      isFirstInspect: [{ required: true, message: "请选择是否首检", trigger: "change" }],
    },
  });
  const userList = ref([]);
@@ -408,6 +423,7 @@
      checkCompany: "",
      isSampling: 0,
      samplingQuantity: "",
      isFirstInspect: 0,
      isStockIn: 0,
    };
    testStandardOptions.value = [];
src/views/qualityManagement/processInspection/index.vue
@@ -116,6 +116,18 @@
    width: 230
  },
  {
    label: "是否首检",
    prop: "isFirstInspect",
    width: 100,
    dataType: "tag",
    formatData: (params) => {
      return Number(params) === 1 ? "是" : "否";
    },
    formatType: (params) => {
      return Number(params) === 1 ? "success" : "info";
    },
  },
  {
    label: "检验员",
    prop: "checkName",
  },
src/views/salesManagement/salesLedger/index.vue
@@ -270,11 +270,17 @@
                       type="primary"
                       @click="openForm('view', scope.row)">详情
            </el-button>
            <el-button link
                       type="primary"
                       @click="openForm('edit', scope.row)"
                       :disabled="!scope.row.isEdit || scope.row.hasProductionRecord || !canEditLedger(scope.row)">编辑
            </el-button>
            <el-tooltip :content="editDisabledReason(scope.row)"
                        :disabled="!editDisabledReason(scope.row)"
                        placement="top">
              <span>
                <el-button link
                           type="primary"
                           @click="openForm('edit', scope.row)"
                           :disabled="isLedgerEditDisabled(scope.row)">编辑
                </el-button>
              </span>
            </el-tooltip>
            <el-button link
                       type="primary"
                       @click="openFileDialog(scope.row)">附件
@@ -1557,6 +1563,18 @@
  };
  const canEditLedger = row => isCurrentUserMaintainer(row);
  const canDeleteLedger = row => isCurrentUserMaintainer(row);
  /**
   * 需要生产的订单:生产计划已下发(含部分下发)后不可编辑;
   * 走库存的订单:已发货后不可编辑,否则可以编辑。
   */
  const editDisabledReason = row => {
    if (!row) return "";
    if (!canEditLedger(row)) return "当前系统登录人不是维护人,不能编辑数据";
    if (row.hasProductionRecord) return "生产计划已下发,不能编辑";
    if (!row.isEdit) return "订单已发货,不能编辑";
    return "";
  };
  const isLedgerEditDisabled = row => !!editDisabledReason(row);
  const sensitiveAmountFormatter = (row, column, cellValue) => {
    if (!isCurrentUserMaintainer(row)) {
      return "*****";
@@ -1733,9 +1751,12 @@
  };
  // 打开弹框
  const openForm = async (type, row) => {
    if (type === "edit" && row && !canEditLedger(row)) {
      proxy.$modal.msgWarning("当前系统登录人不是维护人,不能编辑数据");
      return;
    if (type === "edit" && row) {
      const disabledReason = editDisabledReason(row);
      if (disabledReason) {
        proxy.$modal.msgWarning(disabledReason);
        return;
      }
    }
    operationType.value = type;
    form.value = {};
@@ -2500,15 +2521,9 @@
  /**
   * 判断是否可以发货
   * 只有在产品状态是充足,发货状态是待发货和审核拒绝的时候才可以发货
   * @param row 行数据
   */
  const canShip = row => {
    // 产品状态必须是充足(approveStatus === 1)
    if (row.approveStatus !== 1) {
      return false;
    }
    // 获取发货状态
    const shippingStatus = row.shippingStatus;
@@ -2563,7 +2578,7 @@
    // 检查是否可以发货
    if (!canShip(row)) {
      proxy.$modal.msgWarning(
        "只有在产品状态是充足,发货状态是待发货或审核拒绝的时候才可以发货"
        "只有在发货状态是待发货、审核拒绝或部分发货的时候才可以发货"
      );
      return;
    }