3 天以前 a7e44da36abba1226fe208fbaac56abcf035a129
Merge remote-tracking branch 'origin/dev_NEW_pro' into dev_NEW_pro
已修改3个文件
72 ■■■■ 文件已修改
src/views/productionManagement/processRoute/processRouteItem/index.vue 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/productStructure/Detail/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/productionManagement/processRoute/processRouteItem/index.vue
@@ -1166,15 +1166,15 @@
    row.processId = value || "";
    syncProcessOperationFields(row);
    
    // 同一层级只能选一样的工序
    // 检查同一层级是否已经有其他不同的工序被选中
    const siblings = findSiblings(bomDataValue.value.dataList, row.tempId);
    if (siblings && value) {
      siblings.forEach(sibling => {
        if (sibling.tempId !== row.tempId) {
          sibling.processId = value;
          syncProcessOperationFields(sibling);
        }
      const hasDifferentProcess = siblings.some(sibling => {
        return sibling.tempId !== row.tempId && sibling.processId && sibling.processId !== value;
      });
      if (hasDifferentProcess) {
        ElMessage.warning("同一层级已存在不同的工序,请先统一工序后再进行修改");
      }
    }
  };
@@ -1391,10 +1391,35 @@
      }
    };
    // 校验同一层级的工序是否一致
    const validateProcessConsistency = (items) => {
      if (!items || items.length === 0) return;
      // 检查当前层级
      const processes = items.filter(item => item.processId).map(item => item.processId);
      if (processes.length > 1) {
        const uniqueProcesses = [...new Set(processes)];
        if (uniqueProcesses.length > 1) {
          ElMessage.error("同一层级的工序必须一致");
          isValid = false;
          return;
        }
      }
      // 递归检查子级
      items.forEach(item => {
        if (item.children && item.children.length > 0) {
          validateProcessConsistency(item.children);
        }
      });
    };
    bomDataValue.value.dataList.forEach(item => {
      validateItem(item, true);
    });
    validateProcessConsistency(bomDataValue.value.dataList);
    return isValid;
  };
src/views/productionManagement/productStructure/Detail/index.vue
@@ -336,15 +336,15 @@
    row.processId = value || "";
    syncProcessOperationFields(row);
    
    // 同一层级只能选一样的工序
    // 检查同一层级是否已经有其他不同的工序被选中
    const siblings = findSiblings(dataValue.dataList, row.tempId);
    if (siblings && value) {
      siblings.forEach(sibling => {
        if (sibling.tempId !== row.tempId) {
          sibling.processId = value;
          syncProcessOperationFields(sibling);
        }
      const hasDifferentProcess = siblings.some(sibling => {
        return sibling.tempId !== row.tempId && sibling.processId && sibling.processId !== value;
      });
      if (hasDifferentProcess) {
        ElMessage.warning("同一层级已存在不同的工序,请先统一工序后再进行修改");
      }
    }
  };
src/views/salesManagement/salesLedger/index.vue
@@ -284,10 +284,15 @@
          <el-col :span="12">
            <el-form-item label="销售合同号:"
                          prop="salesContractNo">
              <el-input v-model="form.salesContractNo"
                        placeholder="自动生成"
                        clearable
                        disabled />
              <div style="display: flex; align-items: center; gap: 12px;width: 100%;">
                <el-checkbox v-model="form.autoGenerateContractNo" v-if="operationType === 'add'">自动生成
                </el-checkbox>
                <el-input v-model="form.salesContractNo"
                          :placeholder="form.autoGenerateContractNo ? '自动生成' : '请输入'"
                          clearable
                          :disabled="form.autoGenerateContractNo" />
              </div>
            </el-form-item>
          </el-col>
          <el-col :span="12">
@@ -1069,6 +1074,7 @@
    },
    form: {
      salesContractNo: "",
      autoGenerateContractNo: true,
      salesman: "",
      customerId: "",
      entryPerson: "",
@@ -1587,6 +1593,8 @@
      form.value.entryDate = getCurrentDate();
      // 签订日期默认为当天
      form.value.executionDate = getCurrentDate();
      // 默认自动生成销售合同号
      form.value.autoGenerateContractNo = true;
    } else {
      currentId.value = row.id;
      getSalesLedgerWithProducts({ id: row.id, type: 1 }).then(res => {
@@ -1594,6 +1602,8 @@
        form.value.entryPerson = Number(res.entryPerson);
        productData.value = form.value.productData;
        fileList.value = form.value.storageBlobVOs;
        // 编辑时设置自动生成为false,允许手动修改
        form.value.autoGenerateContractNo = false;
      });
    }
    // let userAll = await userStore.getInfo()
@@ -1730,6 +1740,9 @@
        }
        form.value.storageBlobDTOs = fileList;
        form.value.type = 1;
        if (form.value.autoGenerateContractNo) {
          form.value.salesContractNo = '';
        }
        addOrUpdateSalesLedger(form.value).then(res => {
          proxy.$modal.msgSuccess("提交成功");
          closeDia();
@@ -3007,4 +3020,4 @@
      page-break-after: avoid;
    }
  }
</style>
</style>