sen
2025-08-18 238c45af2339810d98d05dd10fd1d31068c12938
ui/admin-ui3/src/views/cwgl/pendingSettlementBusiness/index.vue
@@ -308,17 +308,26 @@
      minWidth: 120,
    },
      relatedBillName: {
      label: '关联联账单名称',
        isCreate: {
      label: '是否已入账', dataType: 'string',
      type: 'select',
      fixed: 'right',
      minWidth: 120,
      search: true,
      dicUrl: '/system/dict/data/type/sys_whether_type',
    },
    billName: {
      label: '关联账单名称',
      fixed: 'right',
      minWidth: 120,
      search: true,
    },
    isIncomeMatched: {
      label: '是否匹配收入',
      type: 'select',
      dataType: 'string',
      minWidth: 120,
      dicUrl: '/system/dict/data/type/sys_matching_status',
    },
    isCostMatched: {
@@ -329,13 +338,7 @@
      dicUrl: '/system/dict/data/type/sys_matching_status',
    },
    
    isCreate: {
      label: '是否已入账', dataType: 'string',
      type: 'select',
      fixed: 'right',
      minWidth: 120,
      dicUrl: '/system/dict/data/type/sys_whether_type',
    },
    relatedBillStatus: {
      minWidth: 120,
      label: '关联账单状态',
@@ -442,15 +445,25 @@
      crudRef.value.rowEdit(selectionList.value[0]);
    },
    handleSelectionChangeFunc: (selection: any) => {
      if (selection.every((item: any) => item.isCreate == '0')) {
      if (selection.length > 0) {
        // 检查是否所有记录都是未入账状态(isCreate == '0')
        const allNotCreated = selection.every((item: any) => item.isCreate == '0');
        // 检查是否所有记录的客户名称都相同
        const sameCustomer = selection.every((item: any) => item.customerName === selection[0].customerName);
        if (allNotCreated && sameCustomer) {
        generateDisabled.value = false;
      } else {
        generateDisabled.value = true;
        if (selection.length > 0) {
          if (!allNotCreated) {
          proxy.$message.warning('请选择未入账的记录');
          } else if (!sameCustomer) {
            proxy.$message.warning('请选择相同客户名称的记录');
        }
      }
      selectionList.value = selection;
      } else {
        generateDisabled.value = false;
      }
      selectionList.value = selection;
    }
  })